public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: libc-stable@sourceware.org
Cc: Carlos O'Donell <carlos@redhat.com>
Subject: [PATCH 00/27] Improve LD_AUDIT support in glibc 2.34.
Date: Tue, 12 Apr 2022 14:41:38 -0400	[thread overview]
Message-ID: <20220412184205.3343677-1-carlos@redhat.com> (raw)

The following sequence of commits is taken from upstream and improves
the glibc 2.34 audit support to be in line with the audit support in
glibc 2.35.

A total of 15 generic tests are backported and their correct operation
is verified. Two specific aarch64 tests are backported and their
correct operation is verified. The aarch64 tests ensure that the
specific issues with aarch64 and LD_AUDIT are resolved.

LAV_CURRENT is bumped to 2 in the glibc 2.34 release branch, meaning
that all existing audit modules must be rebuilt. The dynamic loader
will not load modules with LAV_CURRENT version 1.

The community was consulted on the backport:
"Backporting LD_AUDIT fixes to the glibc 2.34 release branch?"
https://sourceware.org/pipermail/libc-alpha/2022-March/137395.html
with Debian, Canonical and SUSE responding positively.

Rice University expressed support for the backport as a downstream
user and indicated they would be OK to rebuild auditors for the new
LAV_CURRENT version.

Tested without regression on armv7hl, i686, x86_64, aarch64, ppc64le,
and s390x.

Adhemerval Zanella (21):
  elf: Fix elf_get_dynamic_info definition
  elf: Fix dynamic-link.h usage on rtld.c
  elf: Fix elf_get_dynamic_info() for bootstrap
  elf: Move LAV_CURRENT to link_lavcurrent.h
  elf: Move la_activity (LA_ACT_ADD) after _dl_add_to_namespace_list()
    (BZ #28062)
  elf: Add _dl_audit_objopen
  elf: Add _dl_audit_activity_map and _dl_audit_activity_nsid
  elf: Add _dl_audit_objsearch
  elf: Add _dl_audit_objclose
  elf: Add _dl_audit_symbind_alt and _dl_audit_symbind
  elf: Add _dl_audit_preinit
  elf: Add _dl_audit_pltenter
  elf: Add _dl_audit_pltexit
  elf: Avoid unnecessary slowdown from profiling with audit (BZ#15533)
  elf: Add audit tests for modules with TLSDESC
  elf: Issue audit la_objopen for vDSO
  elf: Do not fail for failed dlmopen on audit modules (BZ #28061)
  elf: Add la_activity during application exit
  elf: Fix initial-exec TLS access on audit modules (BZ #28096)
  elf: Issue la_symbind for bind-now (BZ #23734)
  hppa: Fix bind-now audit (BZ #28857)

Ben Woodard (1):
  elf: Fix runtime linker auditing on aarch64 (BZ #26643)

Carlos O'Donell (1):
  NEWS: Update fixed bug list for LD_AUDIT backports.

Fangrui Song (2):
  powerpc: Delete unneeded ELF_MACHINE_BEFORE_RTLD_RELOC
  elf: Avoid nested functions in the loader [BZ #27220]

H.J. Lu (1):
  elf: Replace tst-audit24bmod2.so with tst-audit24bmod2

Szabolcs Nagy (1):
  Fix elf/tst-audit25a with default bind now toolchains

 NEWS                                        |  25 ++
 bits/link_lavcurrent.h                      |  25 ++
 csu/libc-start.c                            |  23 +-
 elf/Makefile                                | 152 +++++++-
 elf/Versions                                |   1 +
 elf/dl-audit.c                              | 382 ++++++++++++++++++++
 elf/dl-close.c                              |  69 +---
 elf/dl-conflict.c                           |  40 +-
 elf/dl-fini.c                               |  24 +-
 elf/dl-load.c                               | 144 +++-----
 elf/dl-object.c                             |  17 +-
 elf/dl-open.c                               |  22 +-
 elf/dl-reloc-static-pie.c                   |  17 +-
 elf/dl-reloc.c                              |  77 ++--
 elf/dl-runtime.c                            | 253 ++-----------
 elf/dl-static-tls.h                         |  51 +++
 elf/dl-support.c                            |   8 +
 elf/dl-sym-post.h                           |  47 +--
 elf/dl-tls.c                                |  17 +-
 elf/do-rel.h                                |  69 +++-
 elf/dynamic-link.h                          |  92 ++---
 elf/get-dynamic-info.h                      | 122 ++++---
 elf/link.h                                  |   2 +-
 elf/rtld.c                                  | 108 ++----
 elf/setup-vdso.h                            |   4 +-
 elf/sotruss-lib.c                           |   7 +
 elf/tst-audit-tlsdesc-dlopen.c              |  67 ++++
 elf/tst-audit-tlsdesc-mod1.c                |  41 +++
 elf/tst-audit-tlsdesc-mod2.c                |  33 ++
 elf/tst-audit-tlsdesc.c                     |  60 +++
 elf/tst-audit18.c                           | 129 +++++++
 elf/tst-audit18mod.c                        |  23 ++
 elf/tst-audit19a.c                          |  38 ++
 elf/tst-audit19b.c                          |  94 +++++
 elf/tst-audit19bmod.c                       |  23 ++
 elf/tst-audit20.c                           |  25 ++
 elf/tst-audit21.c                           |  42 +++
 elf/tst-audit22.c                           | 124 +++++++
 elf/tst-audit23.c                           | 239 ++++++++++++
 elf/tst-audit23mod.c                        |  23 ++
 elf/tst-audit24a.c                          |  36 ++
 elf/tst-audit24amod1.c                      |  31 ++
 elf/tst-audit24amod2.c                      |  25 ++
 elf/tst-audit24b.c                          |  37 ++
 elf/tst-audit24bmod1.c                      |  31 ++
 elf/tst-audit24bmod2.c                      |  23 ++
 elf/tst-audit24c.c                          |   2 +
 elf/tst-audit24d.c                          |  36 ++
 elf/tst-audit24dmod1.c                      |  33 ++
 elf/tst-audit24dmod2.c                      |  28 ++
 elf/tst-audit24dmod3.c                      |  31 ++
 elf/tst-audit24dmod4.c                      |  25 ++
 elf/tst-audit25a.c                          | 129 +++++++
 elf/tst-audit25b.c                          | 128 +++++++
 elf/tst-audit25mod1.c                       |  30 ++
 elf/tst-audit25mod2.c                       |  30 ++
 elf/tst-audit25mod3.c                       |  22 ++
 elf/tst-audit25mod4.c                       |  22 ++
 elf/tst-auditmod-tlsdesc.c                  |  25 ++
 elf/tst-auditmod18.c                        |  73 ++++
 elf/tst-auditmod19a.c                       |  25 ++
 elf/tst-auditmod19b.c                       |  46 +++
 elf/tst-auditmod20.c                        |  57 +++
 elf/tst-auditmod21a.c                       |  80 ++++
 elf/tst-auditmod21b.c                       |  22 ++
 elf/tst-auditmod22.c                        |  51 +++
 elf/tst-auditmod23.c                        |  74 ++++
 elf/tst-auditmod24.h                        |  29 ++
 elf/tst-auditmod24a.c                       | 116 ++++++
 elf/tst-auditmod24b.c                       | 104 ++++++
 elf/tst-auditmod24c.c                       |   3 +
 elf/tst-auditmod24d.c                       | 122 +++++++
 elf/tst-auditmod25.c                        |  79 ++++
 include/dlfcn.h                             |   2 +
 include/link.h                              |   2 +
 nptl/allocatestack.c                        |   2 +-
 sysdeps/aarch64/Makefile                    |  20 +
 sysdeps/aarch64/bits/link.h                 |  26 +-
 sysdeps/aarch64/dl-audit-check.h            |  28 ++
 sysdeps/aarch64/dl-link.sym                 |   6 +-
 sysdeps/aarch64/dl-machine.h                |  30 +-
 sysdeps/aarch64/dl-trampoline.S             |  83 +++--
 sysdeps/aarch64/tst-audit26.c               |  37 ++
 sysdeps/aarch64/tst-audit26mod.c            |  33 ++
 sysdeps/aarch64/tst-audit26mod.h            |  50 +++
 sysdeps/aarch64/tst-audit27.c               |  64 ++++
 sysdeps/aarch64/tst-audit27mod.c            |  95 +++++
 sysdeps/aarch64/tst-audit27mod.h            |  67 ++++
 sysdeps/aarch64/tst-auditmod26.c            | 103 ++++++
 sysdeps/aarch64/tst-auditmod27.c            | 180 +++++++++
 sysdeps/alpha/dl-machine.h                  |  22 +-
 sysdeps/alpha/dl-trampoline.S               |   8 +-
 sysdeps/arc/dl-machine.h                    |  28 +-
 sysdeps/arm/dl-machine-rel.h                |  33 ++
 sysdeps/arm/dl-machine.h                    |  46 ++-
 sysdeps/arm/dl-trampoline.S                 |   2 +-
 sysdeps/csky/dl-machine.h                   |  25 +-
 sysdeps/generic/dl-audit-check.h            |  23 ++
 sysdeps/generic/dl-fixup-attribute.h        |  24 ++
 sysdeps/generic/dl-lookupcfg.h              |   3 +
 sysdeps/generic/dl-machine-rel.h            |  29 ++
 sysdeps/generic/dl-machine.h                |   2 +
 sysdeps/generic/ldsodefs.h                  |  54 ++-
 sysdeps/hppa/dl-lookupcfg.h                 |   7 +-
 sysdeps/hppa/dl-machine.h                   |  29 +-
 sysdeps/hppa/dl-runtime.c                   |   2 +-
 sysdeps/hppa/dl-trampoline.S                |   6 +-
 sysdeps/i386/dl-fixup-attribute.h           |  30 ++
 sysdeps/i386/dl-machine-rel.h               |  33 ++
 sysdeps/i386/dl-machine.h                   |  75 ++--
 sysdeps/i386/dl-trampoline.S                |   2 +-
 sysdeps/ia64/dl-lookupcfg.h                 |   3 +
 sysdeps/ia64/dl-machine.h                   |  28 +-
 sysdeps/ia64/dl-trampoline.S                |  16 +-
 sysdeps/m68k/dl-machine.h                   |  25 +-
 sysdeps/m68k/dl-trampoline.S                |   2 +-
 sysdeps/microblaze/dl-machine.h             |  25 +-
 sysdeps/mips/dl-machine-rel.h               |  27 ++
 sysdeps/mips/dl-machine.h                   |  64 ++--
 sysdeps/nios2/dl-machine.h                  |  27 +-
 sysdeps/powerpc/dl-lookupcfg.h              |  39 ++
 sysdeps/powerpc/powerpc32/dl-machine.h      |  25 +-
 sysdeps/powerpc/powerpc64/dl-funcdesc.h     |  34 ++
 sysdeps/powerpc/powerpc64/dl-irel.h         |   2 +-
 sysdeps/powerpc/powerpc64/dl-machine.h      |  40 +-
 sysdeps/powerpc/powerpc64/dl-trampoline.S   |   4 +-
 sysdeps/riscv/dl-machine.h                  |  28 +-
 sysdeps/s390/s390-32/dl-machine.h           |  25 +-
 sysdeps/s390/s390-32/dl-trampoline.h        |   4 +-
 sysdeps/s390/s390-64/dl-machine.h           |  25 +-
 sysdeps/s390/s390-64/dl-trampoline.h        |   2 +-
 sysdeps/sh/dl-machine.h                     |  25 +-
 sysdeps/sh/dl-trampoline.S                  |   4 +-
 sysdeps/sparc/sparc32/dl-machine.h          |  24 +-
 sysdeps/sparc/sparc32/dl-trampoline.S       |   2 +-
 sysdeps/sparc/sparc64/dl-machine.h          |  24 +-
 sysdeps/sparc/sparc64/dl-trampoline.S       |   2 +-
 sysdeps/unix/sysv/linux/powerpc/libc-vdso.h |   2 +-
 sysdeps/x86_64/dl-machine.h                 |  32 +-
 sysdeps/x86_64/dl-runtime.h                 |   2 +-
 sysdeps/x86_64/dl-trampoline.h              |   6 +-
 141 files changed, 5045 insertions(+), 1198 deletions(-)
 create mode 100644 bits/link_lavcurrent.h
 create mode 100644 elf/dl-audit.c
 create mode 100644 elf/dl-static-tls.h
 create mode 100644 elf/tst-audit-tlsdesc-dlopen.c
 create mode 100644 elf/tst-audit-tlsdesc-mod1.c
 create mode 100644 elf/tst-audit-tlsdesc-mod2.c
 create mode 100644 elf/tst-audit-tlsdesc.c
 create mode 100644 elf/tst-audit18.c
 create mode 100644 elf/tst-audit18mod.c
 create mode 100644 elf/tst-audit19a.c
 create mode 100644 elf/tst-audit19b.c
 create mode 100644 elf/tst-audit19bmod.c
 create mode 100644 elf/tst-audit20.c
 create mode 100644 elf/tst-audit21.c
 create mode 100644 elf/tst-audit22.c
 create mode 100644 elf/tst-audit23.c
 create mode 100644 elf/tst-audit23mod.c
 create mode 100644 elf/tst-audit24a.c
 create mode 100644 elf/tst-audit24amod1.c
 create mode 100644 elf/tst-audit24amod2.c
 create mode 100644 elf/tst-audit24b.c
 create mode 100644 elf/tst-audit24bmod1.c
 create mode 100644 elf/tst-audit24bmod2.c
 create mode 100644 elf/tst-audit24c.c
 create mode 100644 elf/tst-audit24d.c
 create mode 100644 elf/tst-audit24dmod1.c
 create mode 100644 elf/tst-audit24dmod2.c
 create mode 100644 elf/tst-audit24dmod3.c
 create mode 100644 elf/tst-audit24dmod4.c
 create mode 100644 elf/tst-audit25a.c
 create mode 100644 elf/tst-audit25b.c
 create mode 100644 elf/tst-audit25mod1.c
 create mode 100644 elf/tst-audit25mod2.c
 create mode 100644 elf/tst-audit25mod3.c
 create mode 100644 elf/tst-audit25mod4.c
 create mode 100644 elf/tst-auditmod-tlsdesc.c
 create mode 100644 elf/tst-auditmod18.c
 create mode 100644 elf/tst-auditmod19a.c
 create mode 100644 elf/tst-auditmod19b.c
 create mode 100644 elf/tst-auditmod20.c
 create mode 100644 elf/tst-auditmod21a.c
 create mode 100644 elf/tst-auditmod21b.c
 create mode 100644 elf/tst-auditmod22.c
 create mode 100644 elf/tst-auditmod23.c
 create mode 100644 elf/tst-auditmod24.h
 create mode 100644 elf/tst-auditmod24a.c
 create mode 100644 elf/tst-auditmod24b.c
 create mode 100644 elf/tst-auditmod24c.c
 create mode 100644 elf/tst-auditmod24d.c
 create mode 100644 elf/tst-auditmod25.c
 create mode 100644 sysdeps/aarch64/dl-audit-check.h
 create mode 100644 sysdeps/aarch64/tst-audit26.c
 create mode 100644 sysdeps/aarch64/tst-audit26mod.c
 create mode 100644 sysdeps/aarch64/tst-audit26mod.h
 create mode 100644 sysdeps/aarch64/tst-audit27.c
 create mode 100644 sysdeps/aarch64/tst-audit27mod.c
 create mode 100644 sysdeps/aarch64/tst-audit27mod.h
 create mode 100644 sysdeps/aarch64/tst-auditmod26.c
 create mode 100644 sysdeps/aarch64/tst-auditmod27.c
 create mode 100644 sysdeps/arm/dl-machine-rel.h
 create mode 100644 sysdeps/generic/dl-audit-check.h
 create mode 100644 sysdeps/generic/dl-fixup-attribute.h
 create mode 100644 sysdeps/generic/dl-machine-rel.h
 create mode 100644 sysdeps/i386/dl-fixup-attribute.h
 create mode 100644 sysdeps/i386/dl-machine-rel.h
 create mode 100644 sysdeps/mips/dl-machine-rel.h
 create mode 100644 sysdeps/powerpc/dl-lookupcfg.h
 create mode 100644 sysdeps/powerpc/powerpc64/dl-funcdesc.h

-- 
2.35.1


             reply	other threads:[~2022-04-12 18:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 18:41 Carlos O'Donell [this message]
2022-04-12 18:41 ` [PATCH 01/27] powerpc: Delete unneeded ELF_MACHINE_BEFORE_RTLD_RELOC Carlos O'Donell
2022-04-12 18:41 ` [PATCH 02/27] elf: Avoid nested functions in the loader [BZ #27220] Carlos O'Donell
2022-04-12 18:41 ` [PATCH 03/27] elf: Fix elf_get_dynamic_info definition Carlos O'Donell
2022-04-12 18:41 ` [PATCH 04/27] elf: Fix dynamic-link.h usage on rtld.c Carlos O'Donell
2022-04-12 18:41 ` [PATCH 05/27] elf: Fix elf_get_dynamic_info() for bootstrap Carlos O'Donell
2022-04-12 18:41 ` [PATCH 06/27] elf: Move LAV_CURRENT to link_lavcurrent.h Carlos O'Donell
2022-04-12 18:41 ` [PATCH 07/27] elf: Move la_activity (LA_ACT_ADD) after _dl_add_to_namespace_list() (BZ #28062) Carlos O'Donell
2022-04-12 18:41 ` [PATCH 08/27] elf: Add _dl_audit_objopen Carlos O'Donell
2022-04-12 18:41 ` [PATCH 09/27] elf: Add _dl_audit_activity_map and _dl_audit_activity_nsid Carlos O'Donell
2022-04-12 18:41 ` [PATCH 10/27] elf: Add _dl_audit_objsearch Carlos O'Donell
2022-04-12 18:41 ` [PATCH 11/27] elf: Add _dl_audit_objclose Carlos O'Donell
2022-04-12 18:41 ` [PATCH 12/27] elf: Add _dl_audit_symbind_alt and _dl_audit_symbind Carlos O'Donell
2022-04-12 18:41 ` [PATCH 13/27] elf: Add _dl_audit_preinit Carlos O'Donell
2022-04-12 18:41 ` [PATCH 14/27] elf: Add _dl_audit_pltenter Carlos O'Donell
2022-04-12 18:41 ` [PATCH 15/27] elf: Add _dl_audit_pltexit Carlos O'Donell
2022-04-12 18:41 ` [PATCH 16/27] elf: Avoid unnecessary slowdown from profiling with audit (BZ#15533) Carlos O'Donell
2022-04-12 18:41 ` [PATCH 17/27] elf: Add audit tests for modules with TLSDESC Carlos O'Donell
2022-04-12 18:41 ` [PATCH 18/27] elf: Issue audit la_objopen for vDSO Carlos O'Donell
2022-04-12 18:41 ` [PATCH 19/27] elf: Do not fail for failed dlmopen on audit modules (BZ #28061) Carlos O'Donell
2022-04-12 18:41 ` [PATCH 20/27] elf: Add la_activity during application exit Carlos O'Donell
2022-04-12 18:41 ` [PATCH 21/27] elf: Fix initial-exec TLS access on audit modules (BZ #28096) Carlos O'Donell
2022-04-12 18:42 ` [PATCH 22/27] elf: Issue la_symbind for bind-now (BZ #23734) Carlos O'Donell
2022-04-12 18:42 ` [PATCH 23/27] elf: Fix runtime linker auditing on aarch64 (BZ #26643) Carlos O'Donell
2022-04-12 18:42 ` [PATCH 24/27] Fix elf/tst-audit25a with default bind now toolchains Carlos O'Donell
2022-04-12 18:42 ` [PATCH 25/27] elf: Replace tst-audit24bmod2.so with tst-audit24bmod2 Carlos O'Donell
2022-04-12 18:42 ` [PATCH 26/27] hppa: Fix bind-now audit (BZ #28857) Carlos O'Donell
2022-04-12 18:42 ` [PATCH 27/27] NEWS: Update fixed bug list for LD_AUDIT backports Carlos O'Donell

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=20220412184205.3343677-1-carlos@redhat.com \
    --to=carlos@redhat.com \
    --cc=libc-stable@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).