diff options
author | Anton Lindqvist <anton@cvs.openbsd.org> | 2023-01-08 06:56:02 +0000 |
---|---|---|
committer | Anton Lindqvist <anton@cvs.openbsd.org> | 2023-01-08 06:56:02 +0000 |
commit | 284f7fa9b94b37b49969a37888b5e3d563e91454 (patch) | |
tree | c20287484e91e4f8b552d42293b3cad05b26c7f5 | |
parent | 3606bd5eba2313448ab6cdd55f8550da8ef2d820 (diff) |
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.
-rw-r--r-- | regress/sys/kern/noexec/testfly.S | 13 |
1 files changed, 11 insertions, 2 deletions
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) |