linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* elf_set_personality()
@ 2012-02-27 12:36 Peter De Schrijver
  2012-02-27 13:04 ` elf_set_personality() Russell King - ARM Linux
  0 siblings, 1 reply; 8+ messages in thread
From: Peter De Schrijver @ 2012-02-27 12:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Commit ID 5e143436d04465c937c1a242808a99c46393af3e
(fix personality flag propagation across an exec) makes a child process
inherit a number of personality flags from its parent. This includes the
READ_IMPLIES_EXEC flag. Unfortunately this causes problems when debugging
android applications using gdbserver. It appears that gdbserver on android
has an executable stack. This causes the kernel to set the READ_IMPLIES_EXEC
flag on the gdbserver process. So the child android process will also get this
flag. As soon as the android tries to mmap a readonly android shmem segment
(using the ashmem driver), ashmem will return EPERM, because the segment has
been exposed as readonly without exec permissions and the kernel will modify
any readonly mmap request into read and execute.

Why does the READ_IMPLIES_EXEC flag need to be propagated? Would it be
acceptable to not propagate it to child processes?

Thanks,

Peter.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-27 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27 12:36 elf_set_personality() Peter De Schrijver
2012-02-27 13:04 ` elf_set_personality() Russell King - ARM Linux
2012-02-27 15:03   ` elf_set_personality() Peter De Schrijver
2012-02-27 15:20     ` elf_set_personality() Robert Love
2012-02-27 16:41       ` elf_set_personality() Russell King - ARM Linux
2012-02-27 17:09         ` elf_set_personality() Robert Love
2012-02-27 17:16           ` elf_set_personality() Russell King - ARM Linux
2012-02-27 17:18             ` elf_set_personality() Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).