From: anton Date: Sun, 8 Jan 2023 06:56:01 +0000 (+0000) Subject: Due to xonly on arm64 it is no longer possible to read the testfly routine. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cbaa7298caefcce59fc710e38d8478d0babef428;p=openbsd Due to xonly on arm64 it is no longer possible to read the testfly routine. Put it in the rodata section allowing it to be copied. Note that testfly is never executed directly but only after placing it in a separate chunk of memory allowing its permissions to be mutated. --- diff --git a/regress/sys/kern/noexec/testfly.S b/regress/sys/kern/noexec/testfly.S index 4e78c8d97c5..dc40440f60a 100644 --- a/regress/sys/kern/noexec/testfly.S +++ b/regress/sys/kern/noexec/testfly.S @@ -1,4 +1,4 @@ -/* $OpenBSD: testfly.S,v 1.10 2021/06/20 16:48:50 deraadt Exp $ */ +/* $OpenBSD: testfly.S,v 1.11 2023/01/08 06:56:01 anton Exp $ */ /* * Copyright (c) 2002,2003 Michael Shalayeff @@ -32,7 +32,16 @@ .space 16384 -#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) +#if defined(__aarch64__) + .section .rodata + .globl testfly + .type testfly,#function +testfly: + ret +END(testfly) +#endif + +#if defined(__amd64__) || defined(__i386__) ENTRY(testfly) ret END(testfly)