public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] fix ifunc with static pie [BZ #27072]
@ 2021-01-12 17:21 Szabolcs Nagy
  2021-01-12 17:21 ` [PATCH v3 1/5] configure: Require PI_STATIC_AND_HIDDEN for static pie Szabolcs Nagy
                   ` (4 more replies)
  0 siblings, 5 replies; 34+ messages in thread
From: Szabolcs Nagy @ 2021-01-12 17:21 UTC (permalink / raw)
  To: libc-alpha

v3:
- refactor tunables: move internals out of dl-tunables.h
- use generated max string length in the tunables list
  instead of magic values.

v2:
- check PI_STATIC_AND_HIDDEN for --enable-static-pie
- change string buffer sizes in the tunables
- fix env_alias == NULL logic in __tunables_init
- move __ehdr_start processing after self relocation


force pushed into nsz/bug27072 branch (with a gcc8 bug
workaround for aarch64)

Issues that are not addressed:
- tunables try to allocate memory even with non-suid exe.
  allocation is only needed for rewriting the GLIBC_TUNABLES
  env var. i think a case can be made that if anything there
  is TUNABLE_SECLEVEL_SXID_ERASE then this env var would be
  simply dropped.
- tunable list is not optimized for compactness.
- all symbols are forced hidden in libc.a, but i think lib*.a
  should do the same. (other than lib*_nonshared.a)

Szabolcs Nagy (5):
  configure: Require PI_STATIC_AND_HIDDEN for static pie
  Make libc symbols hidden in static PIE
  elf: Make the tunable struct definition internal only
  elf: Avoid RELATIVE relocs in __tunables_init
  csu: Move static pie self relocation later [BZ #27072]

 configure                | 14 +++++++++++++
 configure.ac             |  5 +++++
 csu/libc-start.c         | 44 +++++++++++++++++++++++-----------------
 elf/dl-tunable-types.h   | 42 +++++++++++++++++++++++++++++---------
 elf/dl-tunables.c        |  2 +-
 elf/dl-tunables.h        | 35 ++++++++------------------------
 include/libc-symbols.h   |  8 ++++++--
 scripts/gen-tunables.awk | 16 +++++++++++++--
 8 files changed, 105 insertions(+), 61 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2021-01-18 16:22 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 17:21 [PATCH v3 0/5] fix ifunc with static pie [BZ #27072] Szabolcs Nagy
2021-01-12 17:21 ` [PATCH v3 1/5] configure: Require PI_STATIC_AND_HIDDEN for static pie Szabolcs Nagy
2021-01-12 18:38   ` Adhemerval Zanella
2021-01-12 17:22 ` [PATCH v3 2/5] Make libc symbols hidden in static PIE Szabolcs Nagy
2021-01-12 23:09   ` H.J. Lu
2021-01-13  0:02     ` H.J. Lu
2021-01-13  0:33       ` H.J. Lu
2021-01-13  1:19         ` H.J. Lu
2021-01-13  9:50           ` Szabolcs Nagy
2021-01-14 11:17             ` Szabolcs Nagy
2021-01-14 15:39               ` H.J. Lu
2021-01-15  3:36               ` H.J. Lu
2021-01-15  4:29                 ` H.J. Lu
2021-01-15 11:25                 ` Szabolcs Nagy
2021-01-15 13:43                   ` H.J. Lu
2021-01-15 14:27                     ` Szabolcs Nagy
2021-01-15 15:28                       ` H.J. Lu
2021-01-15 22:42                         ` H.J. Lu
2021-01-16  0:41                           ` H.J. Lu
2021-01-16 13:18                             ` H.J. Lu
2021-01-18 16:22                               ` Szabolcs Nagy
2021-01-12 17:22 ` [PATCH v3 3/5] elf: Make the tunable struct definition internal only Szabolcs Nagy
2021-01-13 17:38   ` Adhemerval Zanella
2021-01-12 17:22 ` [PATCH v3 4/5] elf: Avoid RELATIVE relocs in __tunables_init Szabolcs Nagy
2021-01-13 17:42   ` Adhemerval Zanella
2021-01-12 17:23 ` [PATCH v3 5/5] csu: Move static pie self relocation later [BZ #27072] Szabolcs Nagy
2021-01-12 22:55   ` H.J. Lu
2021-01-14 15:49     ` H.J. Lu
2021-01-14 15:52       ` H.J. Lu
2021-01-14 16:01         ` H.J. Lu
2021-01-14 16:26           ` H.J. Lu
2021-01-14 17:19             ` Szabolcs Nagy
2021-01-14 17:59               ` Szabolcs Nagy
2021-01-14 17:05           ` Szabolcs Nagy

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).