Skip to content

Commit c456013

Browse files
richardweinbergerjmberg-intel
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 76eeb9b commit c456013

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/um/os-Linux/util.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020

2121
void stack_protections(unsigned long address)
2222
{
23-
if (mprotect((void *) address, UM_THREAD_SIZE,
24-
PROT_READ | PROT_WRITE | PROT_EXEC) < 0)
23+
if (mprotect((void *) address, UM_THREAD_SIZE, PROT_READ | PROT_WRITE) < 0)
2524
panic("protecting stack failed, errno = %d", errno);
2625
}
2726

0 commit comments

Comments
 (0)