From: Al Viro <viro@ZenIV.linux.org.uk>
To: Meredydd Luff <meredydd@senatehouse.org>
Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH signal#execve2] syscalls,x86: Add execveat() system call (v3)
Date: Wed, 12 Sep 2012 02:16:54 +0100 [thread overview]
Message-ID: <20120912011654.GQ13973@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1347411352-12392-1-git-send-email-meredydd@senatehouse.org>
On Wed, Sep 12, 2012 at 01:55:52AM +0100, Meredydd Luff wrote:
> Al (in particular): I've reworked this on top of your generic
> execve() changes, as well as incorporating feedback from HPA.
> Could you take another look please (and merge if all is well)?
>
> [v3: now rebased onto signal.git#execve2, and takes a flags
> parameter which understands AT_SYMLINK_NOFOLLOW; all thanks to
> feedback from https://lkml.org/lkml/2012/8/1/418]
>
> HPA is already on record calling for an execveat() which also does
> fexecve()'s job: https://lkml.org/lkml/2006/7/11/556.
> And the current glibc hack for fexecve() is already causing problems
> in the wild. Eg: https://bugzilla.redhat.com/show_bug.cgi?id=241609,
> https://lkml.org/lkml/2006/12/27/123, and as recounted at
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514043.
Please, declare open_execat(), leaving open_exec() as it is (i.e. a
trivial wrapper for open_execat()). Would cut down on the patch
footprint a bit...
> + bprm->filename = filename ?:
> + (const char *) file->f_path.dentry->d_name.name;
Absolutely not. If nothing else, ->d_name can change on rename() *and*
get underlying memory freed. At zero notice.
next prev parent reply other threads:[~2012-09-12 1:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 0:55 [PATCH signal#execve2] syscalls,x86: Add execveat() system call (v3) Meredydd Luff
2012-09-12 1:16 ` Al Viro [this message]
2013-01-06 16:31 ` Al Viro
2013-01-08 12:39 ` Meredydd Luff
2014-04-22 11:47 ` David Drysdale
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=20120912011654.GQ13973@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meredydd@senatehouse.org \
--cc=mingo@redhat.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