From: Roland McGrath <roland@redhat.com>
To: Amerigo Wang <amwang@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Serge Hallyn <serue@us.ibm.com>,
David Howells <dhowells@redhat.com>,
James Morris <jmorris@namei.org>,
linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Patch 3/3] elf: use a macro instead of a raw number
Date: Thu, 2 Jul 2009 02:55:54 -0700 (PDT) [thread overview]
Message-ID: <20090702095554.4913B404FD@magilla.sf.frob.com> (raw)
In-Reply-To: Amerigo Wang's message of Thursday, 2 July 2009 17:38:41 +0800 <4A4C8021.8070509@redhat.com>
> But in the kernel code, pr_fname is copied from ->comm, they should
> be equal, shouldn't they?
The point is that we are not at liberty to change the size of pr_fname.
Its size and layout are known to userland and thus set in stone. To
have a larger size, we would have to invent a new NT_* type code with a
new layout that would also be known to userland. It's not worth the
bother.
Nowadays a debugger can see AT_EXECFN in auxv (NT_AUXV in core files,
/proc/pid/auxv live), and look at that address in the user memory (core
file or process). That's clobberable on the user-mode stack, but it can
be of unbounded size.
Thanks,
Roland
next prev parent reply other threads:[~2009-07-02 9:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 5:06 [Patch 1/3] elf: fix one check-after-use Amerigo Wang
2009-07-01 5:06 ` [Patch 2/3] elf: clean up fill_note_info() Amerigo Wang
2009-07-01 19:29 ` Andrew Morton
2009-07-02 9:40 ` Amerigo Wang
2009-07-01 5:06 ` [Patch 3/3] elf: use a macro instead of a raw number Amerigo Wang
2009-07-01 7:38 ` Roland McGrath
2009-07-02 9:38 ` Amerigo Wang
2009-07-02 9:55 ` Roland McGrath [this message]
2009-07-01 7:39 ` [Patch 1/3] elf: fix one check-after-use Roland McGrath
2009-07-01 15:13 ` James Morris
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=20090702095554.4913B404FD@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=dhowells@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
--cc=viro@zeniv.linux.org.uk \
/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).