[PATCH 0/6] cet: Multi-threaded permissive SHSTK dlopen + test
Arjun Shankar
arjun@redhat.com
Mon Nov 23 12:46:54 GMT 2026
Hi all,
This patch series contains:
1. A fix to ensure that CPU_FEATURE_ACTIVE is not cached between calls when
querying SHSTK/IBT status.
2. Various test/coverage fixes.
3. A new feature to allow dlopen of legacy shared library in permissive
SHSTK mode even when multi-threaded, using a setxid broadcast to disable
other threads' SHSTK in addition to our own.
Arjun Shankar (6):
cet: Ensure that CPU_FEATURE_ACTIVE does not cache SHSTK/IBT status
cet: Do not override enable-cet=permissive during 'make check'
cet: Correctly run dlopen tests with SHSTK enabled in hwcaps
cet: Add new legacy shared library dlopen test
cet: Correctly run linux tests with SHSTK enabled in hwcaps
cet: Support multi-threaded dlopen of legacy object in permissive mode
Makefile.in | 10 +-
configure | 2 +-
configure.ac | 2 +-
elf/Makefile | 1 +
elf/dl-setxid.c | 19 +++
elf/rtld.c | 1 +
nptl/Versions | 1 +
nptl/nptl_setxid.c | 5 +-
sysdeps/generic/ldsodefs.h | 13 ++
sysdeps/generic/setxid-post.h | 22 ++++
sysdeps/nptl/dl-setxid.c | 40 ++++++
sysdeps/nptl/dl-setxid.h | 27 ++++
sysdeps/nptl/pthreadP.h | 3 +-
.../sysv/linux/x86/bits/platform/features.h | 4 +-
sysdeps/unix/sysv/linux/x86_64/Makefile | 2 +
sysdeps/x86_64/Makefile | 24 +++-
sysdeps/x86_64/configure | 4 +-
sysdeps/x86_64/configure.ac | 5 +-
sysdeps/x86_64/dl-cet.c | 24 +++-
sysdeps/x86_64/nptl/setxid-post.h | 29 +++++
sysdeps/x86_64/tst-cet-legacy-4.c | 30 +++--
sysdeps/x86_64/tst-cet-legacy-4d.c | 1 +
sysdeps/x86_64/tst-cet-legacy-mt-dlopen.c | 116 ++++++++++++++++++
23 files changed, 357 insertions(+), 28 deletions(-)
create mode 100644 elf/dl-setxid.c
create mode 100644 sysdeps/generic/setxid-post.h
create mode 100644 sysdeps/nptl/dl-setxid.c
create mode 100644 sysdeps/nptl/dl-setxid.h
create mode 100644 sysdeps/x86_64/nptl/setxid-post.h
create mode 100644 sysdeps/x86_64/tst-cet-legacy-4d.c
create mode 100644 sysdeps/x86_64/tst-cet-legacy-mt-dlopen.c
--
2.56.0
More information about the Libc-alpha
mailing list