From: Richard Weinberger Date: Sat, 26 Jul 2025 12:29:30 +0000 (+0200) Subject: um: Don't mark stack executable X-Git-Tag: v6.17-rc7~21^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c45601306aa5831c3e59158f95b8e34f27e9ea09;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Johannes Berg --- diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index 4193e04d7e4a7..e3ad71a0d13c4 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); }