mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: linux-kernel@vger.kernel.org
Subject: /proc/${pid}/auxv
Date: Sun, 02 Apr 2006 01:14:30 -0800 (PST)	[thread overview]
Message-ID: <20060402.011430.02794933.davem@davemloft.net> (raw)


I think this needs to be handled by the binfmt of the current thread
because the size of the auxv words themselves is binfmt dependent.

For core file output, the binfmt handler does the auxv writing and
it interpretes the type of the entry words correctly.

So what happens now is that, for a 32-bit ELF binary executing on
64-bit kernel, /proc/${pid}/auxv will report an extra AT_NULL entry or
garbage at the end (because it's interpreting 32-bit words as 64-bit
words when trying to find the AT_NULL that ends the auxv vector).
Whereas core file generation will find the end accurately and place
only the exact number of AUXV entries into the core file.

There is actually a gdb testsuite case that checks that the auxv
provided by /proc/${pid}/auxv matches what ends up on the core file,
which is the only reason that I noticed this :-)

             reply	other threads:[~2006-04-02  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02  9:14 David S. Miller [this message]
2006-04-10  5:52 ` /proc/${pid}/auxv David S. Miller

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=20060402.011430.02794933.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome