From: Nathan Lynch <ntl@pobox.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, roland@redhat.com,
linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] elf loader support for auxvec base platform string
Date: Thu, 17 Jul 2008 12:39:30 -0500 [thread overview]
Message-ID: <20080717173930.GG9594@localdomain> (raw)
In-Reply-To: <20080717000951.5f8cab37.akpm@linux-foundation.org>
Andrew Morton wrote:
> > On Tue, 2008-07-15 at 18:58 -0500, Nathan Lynch wrote:
> > > diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
> > > index d48ff5f..834c2c4 100644
> > > --- a/fs/binfmt_elf.c
> > > +++ b/fs/binfmt_elf.c
> > > @@ -131,6 +131,10 @@ static int padzero(unsigned long elf_bss)
> > > #define STACK_ALLOC(sp, len) ({ sp -= len ; sp; })
> > > #endif
> > >
> > > +#ifndef ELF_BASE_PLATFORM
> > > +#define ELF_BASE_PLATFORM NULL
> > > +#endif
>
> Please add a comment which explains what this is.
>
> Please also add a comment telling the world in which header file the
> architecture *must* define this macro and then ensure that that header is
> included into this file by reliable means. asm/elf.h looks OK.
Okay.
> > > @@ -172,6 +178,19 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
> > > return -EFAULT;
> > > }
> > >
> > > + /*
> > > + * If this architecture has a "base" platform capability
> > > + * string, copy it to userspace.
> > > + */
> > > + u_base_platform = NULL;
> > > + if (k_base_platform) {
> > > + size_t len = strlen(k_base_platform) + 1;
> > > +
> > > + u_base_platform = (elf_addr_t __user *)STACK_ALLOC(p, len);
> > > + if (__copy_to_user(u_base_platform, k_base_platform, len))
> > > + return -EFAULT;
> > > + }
>
> >From my reading, this change will result in no additional code
> generation on non-powerpc architectures. This is good. If poss, could
> you please verify that theory and perhaps drop a note in the changelog
> about that?
That was the intent, yes. However:
$ scripts/bloat-o-meter vmlinux-x86-{before,after}
add/remove: 0/0 grow/shrink: 2/0 up/down: 18/0 (18)
function old new delta
init_mm 784 800 +16
load_elf_binary 11946 11948 +2
(x86_64_defconfig, gcc 4.2.3)
The init_mm/mm_struct bloat is expected (although I'd like to avoid
that), but evidently it has some small effect on load_elf_binary.
next prev parent reply other threads:[~2008-07-17 17:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 23:58 AT_BASE_PLATFORM (v2) Nathan Lynch
2008-07-15 23:58 ` [PATCH] elf loader support for auxvec base platform string Nathan Lynch
2008-07-17 6:35 ` Benjamin Herrenschmidt
2008-07-17 7:09 ` Andrew Morton
2008-07-17 17:39 ` Nathan Lynch [this message]
2008-07-17 22:19 ` [PATCH v3] " Nathan Lynch
2008-07-17 22:42 ` Andrew Morton
2008-07-17 23:35 ` John Reiser
2008-07-18 18:28 ` Nathan Lynch
2008-07-18 20:31 ` John Reiser
2008-07-18 20:52 ` Andrew Morton
2008-07-21 3:24 ` Benjamin Herrenschmidt
2008-07-21 3:40 ` Andrew Morton
2008-07-21 9:33 ` Benjamin Herrenschmidt
2008-07-21 18:48 ` [PATCH v4] " Nathan Lynch
2008-07-22 2:03 ` Benjamin Herrenschmidt
2008-07-17 16:10 ` [PATCH] " Linus Torvalds
2008-07-17 19:35 ` Nathan Lynch
2008-07-21 3:19 ` Benjamin Herrenschmidt
2008-07-15 23:58 ` [PATCH] enable AT_BASE_PLATFORM aux vector for powerpc Nathan Lynch
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=20080717173930.GG9594@localdomain \
--to=ntl@pobox.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=roland@redhat.com \
--cc=torvalds@linux-foundation.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).