Thread (7 messages) 7 messages, 4 authors, 2009-11-10

Re: [PATCH v5] Added PR_SET_PROCTITLE_AREA option for prctl()

flat view

From: Bryan Donlan <hidden>
Date: 2009-11-10 00:00:34
Also in: lkml

On Mon, Nov 9, 2009 at 5:47 PM, Andrew Morton [off-list ref] wrote:
What happens if userspace unmaps the memory after telling the kernel to
use it?

Will processes which try to read the command line get an error reading
/proc?  If so, do all the commandline-reading programs in the world
handle this in an appropriate fashion?
This case can already occur in the current code; the userspace process
would have to munmap() the top of its stack, but it certainly can do
so if it tries. In any case, access_process_vm() then returns 0
because of the fault, and thus /proc/pid/cmdline is seen to have zero
length. Since a zero-length /proc/pid/cmdline occurs with kernel
threads as well, we know this isn't a problem.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help