public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15846] New: getauxval api is broken
@ 2013-08-17 23:54 bugdal at aerifal dot cx
  2013-12-10  0:57 ` [Bug libc/15846] " ppluzhnikov at google dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bugdal at aerifal dot cx @ 2013-08-17 23:54 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15846

            Bug ID: 15846
           Summary: getauxval api is broken
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: bugdal at aerifal dot cx
                CC: drepper.fsp at gmail dot com

getauxval is documented to (and does) return 0 if the requested item is not
found. Unfortunately, 0 is also a valid value for many items, e.g.
getauxval(AT_UID), or perhaps worse, getauxval(AT_EXECFD).

Ideally, the error return should be changed to something not otherwise
used/usable, e.g. -1UL. Short of that, perhaps getauxval could at least set
errno to ENOENT when the item is not found and guarantee that errno will be
undisturbed on success.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
@ 2013-12-10  0:57 ` ppluzhnikov at google dot com
  2013-12-12 23:19 ` brooks at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ppluzhnikov at google dot com @ 2013-12-10  0:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15846

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppluzhnikov at google dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
  2013-12-10  0:57 ` [Bug libc/15846] " ppluzhnikov at google dot com
@ 2013-12-12 23:19 ` brooks at gcc dot gnu.org
  2013-12-18 18:53 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: brooks at gcc dot gnu.org @ 2013-12-12 23:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15846

Brooks Moses <brooks at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brooks at gcc dot gnu.org

--- Comment #1 from Brooks Moses <brooks at gcc dot gnu.org> ---
Patch proposed to set errno to ENOENT:

https://sourceware.org/ml/libc-alpha/2013-12/msg00353.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
  2013-12-10  0:57 ` [Bug libc/15846] " ppluzhnikov at google dot com
  2013-12-12 23:19 ` brooks at gcc dot gnu.org
@ 2013-12-18 18:53 ` cvs-commit at gcc dot gnu.org
  2013-12-18 18:55 ` brooks at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-12-18 18:53 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15846

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b9ab448f980e296eac21ac65f53783967cc6037b (commit)
      from  f889953b44da50bf8a7824c97d09dbe03fd11b83 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b9ab448f980e296eac21ac65f53783967cc6037b

commit b9ab448f980e296eac21ac65f53783967cc6037b
Author: Brooks Moses <bmoses@google.com>
Date:   Wed Dec 11 16:58:12 2013 -0800

    Add error reporting (via errno) to getauxval().

    [BZ 15846] As discussed in the recent thread on my $EXEC_ORIGIN patch
    and in BZ 15846, getauxval() presently has no unambiguous way of
    reporting an error condition.  It currently returns zero on error, but
    this may also be a valid result for some auxv entries.  As there is no
    clear invalid result for all current and future auxv entries, this patch
    sets errno (following a suggestion in the BZ entry).

    This version of the patch also adds documentation and tests for the
    value-not-found conditions in getauxval().

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |   11 +++++++++++
 elf/tst-auxv.c      |   28 ++++++++++++++++++++++++++--
 manual/startup.texi |    3 ++-
 misc/getauxval.c    |    3 +++
 misc/sys/auxv.h     |    4 ++--
 5 files changed, 44 insertions(+), 5 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
                   ` (2 preceding siblings ...)
  2013-12-18 18:53 ` cvs-commit at gcc dot gnu.org
@ 2013-12-18 18:55 ` brooks at gcc dot gnu.org
  2013-12-18 19:07 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: brooks at gcc dot gnu.org @ 2013-12-18 18:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15846

Brooks Moses <brooks at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.19

--- Comment #3 from Brooks Moses <brooks at gcc dot gnu.org> ---
Resolved by setting errno to ENOENT on error, as per the above patch.

Rich, if you think this is insufficient, please feel free to reopen.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
                   ` (3 preceding siblings ...)
  2013-12-18 18:55 ` brooks at gcc dot gnu.org
@ 2013-12-18 19:07 ` cvs-commit at gcc dot gnu.org
  2013-12-18 20:11 ` bugdal at aerifal dot cx
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-12-18 19:07 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15846

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a588438951a271ca10623fb8c7e25693c7ebea67 (commit)
      from  b9ab448f980e296eac21ac65f53783967cc6037b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a588438951a271ca10623fb8c7e25693c7ebea67

commit a588438951a271ca10623fb8c7e25693c7ebea67
Author: Brooks Moses <bmoses@google.com>
Date:   Wed Dec 18 11:06:37 2013 -0800

    Updated NEWS to mention resolution of bug 15846.

-----------------------------------------------------------------------

Summary of changes:
 NEWS |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
                   ` (4 preceding siblings ...)
  2013-12-18 19:07 ` cvs-commit at gcc dot gnu.org
@ 2013-12-18 20:11 ` bugdal at aerifal dot cx
  2014-03-15  0:51 ` brooks at gcc dot gnu.org
  2014-06-13  9:45 ` fweimer at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: bugdal at aerifal dot cx @ 2013-12-18 20:11 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15846

--- Comment #5 from Rich Felker <bugdal at aerifal dot cx> ---
Brooks, this fix is completely acceptable to me; in fact it seems to be the
only fix that was possible without leaving ambiguity or adding a new API. So I
agree with closing the bug as fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
                   ` (5 preceding siblings ...)
  2013-12-18 20:11 ` bugdal at aerifal dot cx
@ 2014-03-15  0:51 ` brooks at gcc dot gnu.org
  2014-06-13  9:45 ` fweimer at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: brooks at gcc dot gnu.org @ 2014-03-15  0:51 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15846

Brooks Moses <brooks at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |brooks at gcc dot gnu.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libc/15846] getauxval api is broken
  2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
                   ` (6 preceding siblings ...)
  2014-03-15  0:51 ` brooks at gcc dot gnu.org
@ 2014-06-13  9:45 ` fweimer at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13  9:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15846

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-06-13  9:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-17 23:54 [Bug libc/15846] New: getauxval api is broken bugdal at aerifal dot cx
2013-12-10  0:57 ` [Bug libc/15846] " ppluzhnikov at google dot com
2013-12-12 23:19 ` brooks at gcc dot gnu.org
2013-12-18 18:53 ` cvs-commit at gcc dot gnu.org
2013-12-18 18:55 ` brooks at gcc dot gnu.org
2013-12-18 19:07 ` cvs-commit at gcc dot gnu.org
2013-12-18 20:11 ` bugdal at aerifal dot cx
2014-03-15  0:51 ` brooks at gcc dot gnu.org
2014-06-13  9:45 ` fweimer at redhat dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).