From: Bryan Donlan <bdonlan@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Americo Wang <xiyou.wangcong@gmail.com>,
Timo Sirainen <tss@iki.fi>, Ulrich Drepper <drepper@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-api@vger.kernel.org
Subject: Re: [PATCH v5] Added PR_SET_PROCTITLE_AREA option for prctl()
Date: Mon, 9 Nov 2009 19:00:17 -0500 [thread overview]
Message-ID: <3e8340490911091600v3a0e9b67r279349ac852d604a@mail.gmail.com> (raw)
In-Reply-To: <20091109144717.0cd17421.akpm@linux-foundation.org>
On Mon, Nov 9, 2009 at 5:47 PM, Andrew Morton <akpm@linux-foundation.org> 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.
next prev parent reply other threads:[~2009-11-10 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 12:16 [PATCH v4] " KOSAKI Motohiro
2009-11-03 9:47 ` Américo Wang
2009-11-03 14:07 ` KOSAKI Motohiro
2009-11-03 15:26 ` [PATCH v5] " KOSAKI Motohiro
2009-11-03 16:12 ` Américo Wang
2009-11-09 22:47 ` Andrew Morton
2009-11-10 0:00 ` Bryan Donlan [this message]
2009-11-10 11:06 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e8340490911091600v3a0e9b67r279349ac852d604a@mail.gmail.com \
--to=bdonlan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tss@iki.fi \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®