From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Cc: John Mellor-Crummey <johnmc@rice.edu>, Ben Woodard <woodard@redhat.com>
Subject: [PATCH v2 0/6] Some rtld-audit fixes
Date: Mon, 19 Jul 2021 11:33:03 -0300 [thread overview]
Message-ID: <20210719143309.2848878-1-adhemerval.zanella@linaro.org> (raw)
Changes from v1 [1]
- Fixed -fstack-protector-all tst-auditmod17.
- Simplify the _dl_call_libc_early_init call the 'Fix audit
regression' patch.
- Remove symbind check fr BZ#15333.
- Added the BZ#28096 fix.
---
This patchset fixes some rtld-audit issues brought by John
Mellor-Crummey [2] while trying to use it along with the HPCToolkit
tool. This should cover the issues listed as 'Tier 1' [3], modulo
the aarch64 onexi (which I plan to address in a different patch set)
and also an important 'Tier2' issue (BZ#28096) which prevents the
use of some glibc function that uses TLS internally on the audir
module.
The first patch fixes a regression issue introduced by a
__libc_early_init() change.
The second patch is long-standing issue where the lazy resolution
trampolines are used even when the audit modules does not implement
the PLT or symbol binding callback. The original patch from
Alexander Monakov is incomplete, since it also requires to take
la_symbind{32,64} in consideration.
The third patch add some tests to check if TLSDESC works along with
audit modules.
The forth patch fixes an issue when a dlmopen failure in a audit
module callback trigger an assert.
The fifth patch fixes another dlmopen failure when audit module
is used along with dlmopen. This patch was proposed along with
RTLD_SHARED support, so I added a regression test.
The final patch fixes an issue where the initial-exec TLS are reset
after the audit modules is already loader (thus clearing any state
that the library might update).
[1] https://patchwork.sourceware.org/project/glibc/list/?series=2443
[2] https://sourceware.org/pipermail/libc-alpha/2021-June/127636.html
[3] https://docs.google.com/document/d/1dVaDBdzySecxQqD6hLLzDrEF18M1UtjDna9gL5BWWI0/edit#
Adhemerval Zanella (5):
elf: Fix audit regression
elf: Avoid unnecessary slowdown from profiling with audit (BZ#15533)
elf: Add audit tests for modules with TLSDESC
elf: Do not fail for failed dlopem on audit modules (BZ #28061)
elf: Fix initial-exec TLS access on audit modules (BZ #28096)
Vivek Das Mohapatra (1):
elf: Suppress audit calls when a (new) namespace is empty (BZ #28062)
NEWS | 4 ++
elf/Makefile | 43 ++++++++++-
elf/dl-load.c | 7 +-
elf/dl-object.c | 3 +
elf/dl-open.c | 12 +---
elf/dl-reloc.c | 12 +++-
elf/dl-tls.c | 16 +++--
elf/rtld.c | 10 +--
elf/tst-audit-tlsdesc-audit.c | 23 ++++++
elf/tst-audit-tlsdesc-dlopen.c | 67 +++++++++++++++++
elf/tst-audit-tlsdesc.c | 60 ++++++++++++++++
elf/tst-audit17.c | 25 +++++++
elf/tst-audit18.c | 39 ++++++++++
elf/tst-audit19.c | 25 +++++++
elf/tst-audit20.c | 128 +++++++++++++++++++++++++++++++++
elf/tst-audit20mod.c | 26 +++++++
elf/tst-audit21.c | 42 +++++++++++
elf/tst-auditmod-tlsdesc1.c | 41 +++++++++++
elf/tst-auditmod-tlsdesc2.c | 33 +++++++++
elf/tst-auditmod17.c | 23 ++++++
elf/tst-auditmod18.c | 24 +++++++
elf/tst-auditmod19.c | 57 +++++++++++++++
elf/tst-auditmod20.c | 73 +++++++++++++++++++
elf/tst-auditmod21.c | 69 ++++++++++++++++++
include/link.h | 4 ++
25 files changed, 840 insertions(+), 26 deletions(-)
create mode 100644 elf/tst-audit-tlsdesc-audit.c
create mode 100644 elf/tst-audit-tlsdesc-dlopen.c
create mode 100644 elf/tst-audit-tlsdesc.c
create mode 100644 elf/tst-audit17.c
create mode 100644 elf/tst-audit18.c
create mode 100644 elf/tst-audit19.c
create mode 100644 elf/tst-audit20.c
create mode 100644 elf/tst-audit20mod.c
create mode 100644 elf/tst-audit21.c
create mode 100644 elf/tst-auditmod-tlsdesc1.c
create mode 100644 elf/tst-auditmod-tlsdesc2.c
create mode 100644 elf/tst-auditmod17.c
create mode 100644 elf/tst-auditmod18.c
create mode 100644 elf/tst-auditmod19.c
create mode 100644 elf/tst-auditmod20.c
create mode 100644 elf/tst-auditmod21.c
--
2.30.2
next reply other threads:[~2021-07-19 14:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 14:33 Adhemerval Zanella [this message]
2021-07-19 14:33 ` [PATCH v2 1/6] elf: Fix audit regression Adhemerval Zanella
2021-07-27 16:36 ` Florian Weimer
2021-07-19 14:33 ` [PATCH v2 2/6] elf: Avoid unnecessary slowdown from profiling with audit (BZ#15533) Adhemerval Zanella
2021-07-20 8:31 ` Alexander Monakov
2021-07-20 18:37 ` Adhemerval Zanella
2021-07-27 16:12 ` Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 3/6] elf: Add audit tests for modules with TLSDESC Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 4/6] elf: Do not fail for failed dlopem on audit modules (BZ #28061) Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 5/6] elf: Suppress audit calls when a (new) namespace is empty (BZ #28062) Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 6/6] elf: Fix initial-exec TLS access on audit modules (BZ #28096) Adhemerval Zanella
2021-07-20 22:09 ` [PATCH v2 0/6] Some rtld-audit fixes Michael Hudson-Doyle
2021-07-20 22:11 ` Michael Hudson-Doyle
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=20210719143309.2848878-1-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=johnmc@rice.edu \
--cc=libc-alpha@sourceware.org \
--cc=woodard@redhat.com \
/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).