Commit c4560130 authored by Richard Weinberger's avatar Richard Weinberger Committed by Johannes Berg
Browse files

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: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 76eeb9b8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
}