]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86/CET: Add tests with legacy non-CET shared objects
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 25 Jul 2018 11:46:53 +0000 (04:46 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 25 Jul 2018 11:47:05 +0000 (04:47 -0700)
commitfddcd003776ce242526e809ebfbdcccf31e486c6
tree6817a7d3eed75e9066fb5b7f8982f9ec9706b04c
parent9aa3113a42d94d7bbf9bb4d50ef0d23b95e66123
x86/CET: Add tests with legacy non-CET shared objects

Check binary compatibility of CET-enabled executables:

1. When CET-enabled executable is used with legacy non-CET shared object
at run-time, ld.so should disable SHSTK and put legacy non-CET shared
objects in legacy bitmap.
2. When IBT-enabled executable dlopens legacy non-CET shared object,
ld.so should put legacy shared object in legacy bitmap.
3. Use GLIBC_TUNABLES=glibc.tune.x86_shstk=[on|off|permissive] to
control how SHSTK is enabled.

* sysdeps/x86/Makefile (tests): Add tst-cet-legacy-1,
tst-cet-legacy-2, tst-cet-legacy-2a, tst-cet-legacy-3,
tst-cet-legacy-4, tst-cet-legacy-4a, tst-cet-legacy-4b
and tst-cet-legacy-4c.
(modules-names): Add tst-cet-legacy-mod-1, tst-cet-legacy-mod-2
and tst-cet-legacy-mod-4.
(CFLAGS-tst-cet-legacy-2.c): New.
(CFLAGS-tst-cet-legacy-mod-1.c): Likewise.
(CFLAGS-tst-cet-legacy-mod-2.c): Likewise.
(CFLAGS-tst-cet-legacy-3.c): Likewise.
(CFLAGS-tst-cet-legacy-4.c): Likewise.
(CFLAGS-tst-cet-legacy-mod-4.c): Likewise.
($(objpfx)tst-cet-legacy-1): Likewise.
($(objpfx)tst-cet-legacy-2): Likewise.
($(objpfx)tst-cet-legacy-2.out): Likewise.
($(objpfx)tst-cet-legacy-2a): Likewise.
($(objpfx)tst-cet-legacy-2a.out): Likewise.
($(objpfx)tst-cet-legacy-4): Likewise.
($(objpfx)tst-cet-legacy-4.out): Likewise.
($(objpfx)tst-cet-legacy-4a): Likewise.
($(objpfx)tst-cet-legacy-4a.out): Likewise.
(tst-cet-legacy-4a-ENV): Likewise.
($(objpfx)tst-cet-legacy-4b): Likewise.
($(objpfx)tst-cet-legacy-4b.out): Likewise.
(tst-cet-legacy-4b-ENV): Likewise.
($(objpfx)tst-cet-legacy-4c): Likewise.
($(objpfx)tst-cet-legacy-4c.out): Likewise.
(tst-cet-legacy-4c-ENV): Likewise.
* sysdeps/x86/tst-cet-legacy-1.c: New file.
* sysdeps/x86/tst-cet-legacy-2.c: Likewise.
* sysdeps/x86/tst-cet-legacy-2a.c: Likewise.
* sysdeps/x86/tst-cet-legacy-3.c: Likewise.
* sysdeps/x86/tst-cet-legacy-4.c: Likewise.
* sysdeps/x86/tst-cet-legacy-4a.c: Likewise.
* sysdeps/x86/tst-cet-legacy-4b.c: Likewise.
* sysdeps/x86/tst-cet-legacy-4c.c: Likewise.
* sysdeps/x86/tst-cet-legacy-mod-1.c: Likewise.
* sysdeps/x86/tst-cet-legacy-mod-2.c: Likewise.
* sysdeps/x86/tst-cet-legacy-mod-4.c: Likewise.
13 files changed:
ChangeLog
sysdeps/x86/Makefile
sysdeps/x86/tst-cet-legacy-1.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-2.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-2a.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-3.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-4.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-4a.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-4b.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-4c.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-mod-1.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-mod-2.c [new file with mode: 0644]
sysdeps/x86/tst-cet-legacy-mod-4.c [new file with mode: 0644]