diff options
author | Richard Weinberger <richard@nod.at> | 2025-07-26 14:29:30 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2025-09-10 14:24:13 +0200 |
commit | c45601306aa5831c3e59158f95b8e34f27e9ea09 (patch) | |
tree | 5ff0cb5427e6becf1c3677730b414b2808dc7c2f | |
parent | 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c (diff) |
um: Don't mark stack executable
On one of my machines UML failed to start after enabling
SELinux.
UML failed to start because SELinux's execmod rule denies
executable pages on a modified file mapping.
Historically UML marks it's stack rwx.
AFAICT, these days this is no longer needed, so let's remove
PROT_EXEC.
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | arch/um/os-Linux/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index 4193e04d7e4a..e3ad71a0d13c 100644 --- a/arch/um/os-Linux/util.c +++ b/arch/um/os-Linux/util.c @@ -20,8 +20,7 @@ void stack_protections(unsigned long address) { - if (mprotect((void *) address, UM_THREAD_SIZE, - PROT_READ | PROT_WRITE | PROT_EXEC) < 0) + if (mprotect((void *) address, UM_THREAD_SIZE, PROT_READ | PROT_WRITE) < 0) panic("protecting stack failed, errno = %d", errno); } |