[PATCH 1/2] No-exec support for ppc64
Paul Mackerras
paulus at samba.org
Mon Mar 14 21:13:36 EST 2005
Jake Moilanen writes:
> diff -puN fs/binfmt_elf.c~nx-user-ppc64 fs/binfmt_elf.c
> --- linux-2.6-bk/fs/binfmt_elf.c~nx-user-ppc64 2005-03-08 16:08:54 -06:00
> +++ linux-2.6-bk-moilanen/fs/binfmt_elf.c 2005-03-08 16:08:54 -06:00
> @@ -99,6 +99,8 @@ static int set_brk(unsigned long start,
> up_write(¤t->mm->mmap_sem);
> if (BAD_ADDR(addr))
> return addr;
> +
> + sys_mprotect(start, end-start, PROT_READ|PROT_WRITE|PROT_EXEC);
I don't think I can push that upstream. What happens if you leave
that out?
More generally, we are making a user-visible change, even for programs
that aren't marked as having non-executable stack or heap, because we
are now enforcing that the program can't execute from mappings that
don't have PROT_EXEC. Perhaps we should enforce the requirement for
execute permission only on those programs that indicate somehow that
they can handle it?
Paul.
More information about the Linuxppc64-dev
mailing list