public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/27181] __tunables_init can oom fail
Date: Thu, 21 Jan 2021 15:59:30 +0000	[thread overview]
Message-ID: <bug-27181-131-zKoxHEHSgc@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27181-131@http.sourceware.org/bugzilla/>

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

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Szabolcs Nagy <nsz@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bfe04789a8d9014cf3177137651f8f93dd4a00ca

commit bfe04789a8d9014cf3177137651f8f93dd4a00ca
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Tue Jan 12 16:28:27 2021 +0000

    elf: Avoid RELATIVE relocs in __tunables_init

    With static pie linking pointers in the tunables list need
    RELATIVE relocs since the absolute address is not known at link
    time. We want to avoid relocations so the static pie self
    relocation can be done after tunables are initialized.

    This is a simple fix that embeds the tunable strings into the
    tunable list instead of using pointers.  It is possible to have
    a more compact representation of tunables with some additional
    complexity in the generator and tunable parser logic.  Such
    optimization will be useful if the list of tunables grows.

    There is still an issue that tunables_strdup allocates and the
    failure handling code path is sufficiently complex that it can
    easily have RELATIVE relocations.  It is possible to avoid the
    early allocation and only change environment variables in a
    setuid exe after relocations are processed.  But that is a
    bigger change and early failure is fatal anyway so it is not
    as critical to fix right away. This is bug 27181.

    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

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

  reply	other threads:[~2021-01-21 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 11:02 [Bug dynamic-link/27181] New: " nsz at gcc dot gnu.org
2021-01-21 15:59 ` cvs-commit at gcc dot gnu.org [this message]
2024-05-01 18:05 ` [Bug dynamic-link/27181] " adhemerval.zanella at linaro dot org

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=bug-27181-131-zKoxHEHSgc@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).