mbox series

[v6,0/3] Improve surplus TLS accounting

Message ID cover.1594205502.git.szabolcs.nagy@arm.com
Headers show
Series Improve surplus TLS accounting | expand

Message

Szabolcs Nagy July 8, 2020, 10:58 a.m. UTC
Now with audit modules accounted too (in a separate patch).
DL_NNS is still constant so loading audit modules does not
work e.g. if rtld.nns is set to DL_NNS.

tested that

GLIBC_TUNABLES=glibc.rtld.nns=7 make t=elf/tst-auditmany test

works (7 ns reserved for user 9 audit modules are loaded) and

GLIBC_TUNABLES=glibc.rtld.nns=8 make t=elf/tst-auditmany test

fails (glibc exits early with error message).

Szabolcs Nagy (3):
  rtld: Add rtld.nns tunable for the number of supported namespaces
  rtld: Account static TLS surplus for audit modules
  rtld: Avoid using up static TLS surplus for optimizations [BZ #25051]

 csu/libc-tls.c             |  31 +++++-----
 elf/Makefile               |  29 +++++++++-
 elf/dl-reloc.c             |  37 +++++++++---
 elf/dl-tls.c               |  67 ++++++++++++++++++++--
 elf/dl-tunables.list       |  14 +++++
 elf/dynamic-link.h         |   5 +-
 elf/rtld.c                 |  32 ++++++++++-
 elf/tst-tls-ie-dlmopen.c   | 112 +++++++++++++++++++++++++++++++++++++
 elf/tst-tls-ie-mod.h       |  40 +++++++++++++
 elf/tst-tls-ie-mod0.c      |   4 ++
 elf/tst-tls-ie-mod1.c      |   4 ++
 elf/tst-tls-ie-mod2.c      |   4 ++
 elf/tst-tls-ie-mod3.c      |   4 ++
 elf/tst-tls-ie-mod4.c      |   4 ++
 elf/tst-tls-ie-mod5.c      |   4 ++
 elf/tst-tls-ie-mod6.c      |   4 ++
 elf/tst-tls-ie.c           | 111 ++++++++++++++++++++++++++++++++++++
 manual/tunables.texi       |  38 +++++++++++++
 sysdeps/generic/ldsodefs.h |  12 ++++
 19 files changed, 521 insertions(+), 35 deletions(-)
 create mode 100644 elf/tst-tls-ie-dlmopen.c
 create mode 100644 elf/tst-tls-ie-mod.h
 create mode 100644 elf/tst-tls-ie-mod0.c
 create mode 100644 elf/tst-tls-ie-mod1.c
 create mode 100644 elf/tst-tls-ie-mod2.c
 create mode 100644 elf/tst-tls-ie-mod3.c
 create mode 100644 elf/tst-tls-ie-mod4.c
 create mode 100644 elf/tst-tls-ie-mod5.c
 create mode 100644 elf/tst-tls-ie-mod6.c
 create mode 100644 elf/tst-tls-ie.c