From: Al Viro <viro@ftp.linux.org.uk>
To: Matt Helsley <matthltc@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>, Chris Wright <chrisw@sous-sol.org>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>,
"Hallyn, Serge" <serue@us.ibm.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] Simplify /proc/<pid|self>/exe symlink code
Date: Fri, 13 Jul 2007 03:07:10 +0100 [thread overview]
Message-ID: <20070713020710.GA21668@ftp.linux.org.uk> (raw)
In-Reply-To: <1184292012.13479.14.camel@localhost.localdomain>
On Thu, Jul 12, 2007 at 07:00:12PM -0700, Matt Helsley wrote:
> This patch avoids holding the mmap semaphore while walking VMAs in response to
> programs which read or follow the /proc/<pid|self>/exe symlink. This also allows
> us to merge mmu and nommu proc_exe_link() functions. The costs are holding the
> task lock, a separate reference to the executable file stored in the task
> struct, and increased code in fork, exec, and exit paths.
I don't think it's a food idea. Consider a program that deliberately
creates an executable anon memory, copies the binary there, jumps there
and unmaps the original. In the current tree you'll get nothing
pinning the binary; with your patch it will remained busy.
It's not a common situation, of course, but there are legitimate uses
for such technics...
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-07-13 2:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-13 2:00 Matt Helsley
2007-07-13 2:07 ` Al Viro [this message]
2007-07-16 19:31 ` Matt Helsley
2007-07-13 2:21 ` Andrew Morton
2007-07-13 19:54 ` Matt Helsley
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=20070713020710.GA21668@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthltc@us.ibm.com \
--cc=peterz@infradead.org \
--cc=serue@us.ibm.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