From: Bryan Donlan <bdonlan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: KOSAKI Motohiro
<kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org>,
Americo Wang
<xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Timo Sirainen <tss-X3B1VOXEql0@public.gmane.org>,
Ulrich Drepper <drepper-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
On Mon, Nov 9, 2009 at 5:47 PM, Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3Sm6D+HspMUB@public.gmane.orgg> 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: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091101211321.F3FC.A69D9226@jp.fujitsu.com>
[not found] ` <20091101211321.F3FC.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-11-03 9:47 ` [PATCH v4] Added PR_SET_PROCTITLE_AREA option for prctl() Américo Wang
[not found] ` <20091103094703.GB11134-lyUE10xJyvyny3qCrzbmXA@public.gmane.org>
2009-11-03 14:07 ` KOSAKI Motohiro
[not found] ` <20091103230548.0B45.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-11-03 15:26 ` [PATCH v5] " KOSAKI Motohiro
[not found] ` <20091104002544.0B4A.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-11-03 16:12 ` Américo Wang
2009-11-09 22:47 ` Andrew Morton
[not found] ` <20091109144717.0cd17421.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
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-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=drepper-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tss-X3B1VOXEql0@public.gmane.org \
--cc=xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).