Message ID | 20240108125025.1389849-2-adhemerval.zanella@linaro.org |
---|---|
State | Accepted |
Commit | b7fc4a07f206a640e6d807d72f5c1ee3ea7a25b6 |
Headers | show |
Series | x86: Move CET infrastructure to x86_64 | expand |
On Mon, Jan 8, 2024 at 4:50 AM Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > The CET is only supported for x86_64 and there is no plan to add > kernel support for i386. Move the Makefile fules and tests from the files > generic x86 folder to x86_64 one. > > Checked on x86_64-linux-gnu and i686-linux-gnu. > --- > sysdeps/unix/sysv/linux/x86/Makefile | 27 -- > sysdeps/unix/sysv/linux/x86_64/Makefile | 27 ++ > .../linux/{x86 => x86_64}/include/asm/prctl.h | 0 > .../{x86 => x86_64}/tst-cet-property-1.c | 0 > .../{x86 => x86_64}/tst-cet-property-2.c | 0 > .../{x86 => x86_64}/tst-cet-property-dep-2.S | 0 > .../{x86 => x86_64}/tst-cet-setcontext-1.c | 0 > .../linux/{x86 => x86_64}/tst-cet-vfork-1.c | 0 > sysdeps/x86/Makefile | 238 ----------------- > sysdeps/x86_64/Makefile | 243 ++++++++++++++++++ > sysdeps/{x86 => x86_64}/tst-cet-legacy-1.c | 0 > .../tst-cet-legacy-10-static.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-10.c | 0 > .../tst-cet-legacy-10a-static.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-10a.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-1a.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-2.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-2a.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-3.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-4.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-4a.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-4b.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-4c.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-5.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-5a.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-5b.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-6.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-6a.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-6b.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-7.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-8.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-9-static.c | 0 > sysdeps/{x86 => x86_64}/tst-cet-legacy-9.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-1.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-2.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-4.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-5.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-5a.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-5b.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-5c.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-6.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-6a.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-6b.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-6c.c | 0 > .../{x86 => x86_64}/tst-cet-legacy-mod-6d.c | 0 > .../tst-shstk-legacy-1-extra.S | 0 > .../tst-shstk-legacy-1a-static.c | 0 > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1a.c | 0 > .../tst-shstk-legacy-1b-static.c | 0 > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1b.c | 0 > .../tst-shstk-legacy-1c-static.c | 0 > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1c.c | 0 > .../tst-shstk-legacy-1d-static.c | 0 > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1d.c | 0 > .../tst-shstk-legacy-1e-static.c | 0 > .../tst-shstk-legacy-1e-static.sh | 0 > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e.c | 0 > .../{x86 => x86_64}/tst-shstk-legacy-1e.sh | 0 > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1f.c | 0 > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1g.c | 0 > .../{x86 => x86_64}/tst-shstk-legacy-1g.sh | 0 > .../{x86 => x86_64}/tst-shstk-legacy-mod-1.c | 0 > 62 files changed, 270 insertions(+), 265 deletions(-) > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/include/asm/prctl.h (100%) > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-property-1.c (100%) > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-property-2.c (100%) > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-property-dep-2.S (100%) > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-setcontext-1.c (100%) > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-vfork-1.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-1.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10a-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-1a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-2.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-2a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-3.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4b.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4c.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-5.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-5a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-5b.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-6.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-6a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-6b.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-7.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-8.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-9-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-9.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-1.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-2.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-4.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5b.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5c.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6b.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6c.c (100%) > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6d.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1-extra.S (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1a-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1a.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1b-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1b.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1c-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1c.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1d-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1d.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e-static.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e-static.sh (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e.sh (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1f.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1g.c (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1g.sh (100%) > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-mod-1.c (100%) > > diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile > index 9dfdd689a9..743b633b65 100644 > --- a/sysdeps/unix/sysv/linux/x86/Makefile > +++ b/sysdeps/unix/sysv/linux/x86/Makefile > @@ -21,30 +21,3 @@ endif > ifeq ($(subdir),setjmp) > tests += tst-saved_mask-1 > endif > - > -ifneq ($(enable-cet),no) > -ifeq ($(subdir),elf) > -tests += tst-cet-property-1 tst-cet-property-2 > - > -CFLAGS-tst-cet-property-1.o += -fcf-protection > -ASFLAGS-tst-cet-property-dep-2.o += -fcf-protection > - > -$(objpfx)tst-cet-property-2: $(objpfx)tst-cet-property-dep-2.o > -$(objpfx)tst-cet-property-2.out: $(objpfx)tst-cet-property-2 \ > - $(objpfx)tst-cet-property-1.out > - env $(run-program-env) $(test-via-rtld-prefix) \ > - $(objpfx)tst-cet-property-2 \ > - < $(objpfx)tst-cet-property-1.out > $@; \ > - $(evaluate-test) > -endif > - > -ifeq ($(subdir),posix) > -tests += tst-cet-vfork-1 > -CFLAGS-tst-cet-vfork-1.c += -mshstk > -endif > - > -ifeq ($(subdir),stdlib) > -tests += tst-cet-setcontext-1 > -CFLAGS-tst-cet-setcontext-1.c += -mshstk > -endif > -endif > diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile > index 06b873949e..4223feb95f 100644 > --- a/sysdeps/unix/sysv/linux/x86_64/Makefile > +++ b/sysdeps/unix/sysv/linux/x86_64/Makefile > @@ -64,3 +64,30 @@ $(objpfx)libx86-64-isa-level.so: $(objpfx)libx86-64-isa-level-1.so > cp $< $@ > endif > endif # $(subdir) == elf > + > +ifneq ($(enable-cet),no) > +ifeq ($(subdir),elf) > +tests += tst-cet-property-1 tst-cet-property-2 > + > +CFLAGS-tst-cet-property-1.o += -fcf-protection > +ASFLAGS-tst-cet-property-dep-2.o += -fcf-protection > + > +$(objpfx)tst-cet-property-2: $(objpfx)tst-cet-property-dep-2.o > +$(objpfx)tst-cet-property-2.out: $(objpfx)tst-cet-property-2 \ > + $(objpfx)tst-cet-property-1.out > + env $(run-program-env) $(test-via-rtld-prefix) \ > + $(objpfx)tst-cet-property-2 \ > + < $(objpfx)tst-cet-property-1.out > $@; \ > + $(evaluate-test) > +endif > + > +ifeq ($(subdir),posix) > +tests += tst-cet-vfork-1 > +CFLAGS-tst-cet-vfork-1.c += -mshstk > +endif > + > +ifeq ($(subdir),stdlib) > +tests += tst-cet-setcontext-1 > +CFLAGS-tst-cet-setcontext-1.c += -mshstk > +endif > +endif > diff --git a/sysdeps/unix/sysv/linux/x86/include/asm/prctl.h b/sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h > similarity index 100% > rename from sysdeps/unix/sysv/linux/x86/include/asm/prctl.h > rename to sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-1.c > similarity index 100% > rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-1.c > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c > similarity index 100% > rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-dep-2.S > similarity index 100% > rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-dep-2.S > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-setcontext-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c > similarity index 100% > rename from sysdeps/unix/sysv/linux/x86/tst-cet-setcontext-1.c > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-vfork-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c > similarity index 100% > rename from sysdeps/unix/sysv/linux/x86/tst-cet-vfork-1.c > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c > diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile > index 5c8ab64c4d..bf913594c1 100644 > --- a/sysdeps/x86/Makefile > +++ b/sysdeps/x86/Makefile > @@ -93,12 +93,6 @@ endif # $(subdir) == math > ifeq ($(subdir),setjmp) > gen-as-const-headers += jmp_buf-ssp.sym > sysdep_routines += __longjmp_cancel > -ifneq ($(enable-cet),no) > -tests += \ > - tst-setjmp-cet \ > -# tests > -tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on > -endif > endif > > ifeq ($(subdir),string) > @@ -139,238 +133,6 @@ CFLAGS-tst-wcscmp-rtm.c += -mrtm > CFLAGS-tst-wcsncmp-rtm.c += -mrtm -Wno-error > endif > > -ifneq ($(enable-cet),no) > -ifeq ($(subdir),elf) > -sysdep-dl-routines += dl-cet > - > -tests += \ > - tst-cet-legacy-1 \ > - tst-cet-legacy-1a \ > - tst-cet-legacy-2 \ > - tst-cet-legacy-2a \ > - tst-cet-legacy-3 \ > - tst-cet-legacy-4 \ > - tst-cet-legacy-5a \ > - tst-cet-legacy-6a \ > - tst-cet-legacy-7 \ > - tst-cet-legacy-8 \ > - tst-cet-legacy-9 \ > - tst-cet-legacy-9-static \ > - tst-cet-legacy-10 \ > - tst-cet-legacy-10-static \ > - tst-cet-legacy-10a \ > - tst-cet-legacy-10a-static \ > -# tests > -tests-static += \ > - tst-cet-legacy-9-static \ > - tst-cet-legacy-10-static \ > - tst-cet-legacy-10a-static \ > -# tests-static > -tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd) > - > -tests += \ > - tst-shstk-legacy-1a \ > - tst-shstk-legacy-1a-static \ > - tst-shstk-legacy-1b \ > - tst-shstk-legacy-1b-static \ > - tst-shstk-legacy-1c \ > - tst-shstk-legacy-1c-static \ > - tst-shstk-legacy-1d \ > - tst-shstk-legacy-1d-static \ > - tst-shstk-legacy-1e \ > - tst-shstk-legacy-1e-static \ > - tst-shstk-legacy-1f \ > - tst-shstk-legacy-1g \ > -# tests > -modules-names += \ > - tst-shstk-legacy-mod-1 \ > -# modules-names > -tests-static += \ > - tst-shstk-legacy-1a-static \ > - tst-shstk-legacy-1b-static \ > - tst-shstk-legacy-1c-static \ > - tst-shstk-legacy-1d-static \ > - tst-shstk-legacy-1e-static \ > -# tests-static > -extra-objs += \ > - tst-shstk-legacy-1-extra.o \ > -# extra-objs > - > -tests += \ > - tst-cet-legacy-4a \ > - tst-cet-legacy-4b \ > - tst-cet-legacy-4c \ > - tst-cet-legacy-5b \ > - tst-cet-legacy-6b \ > -# tests > -modules-names += \ > - tst-cet-legacy-mod-1 \ > - tst-cet-legacy-mod-2 \ > - tst-cet-legacy-mod-4 \ > - tst-cet-legacy-mod-5a \ > - tst-cet-legacy-mod-5b \ > - tst-cet-legacy-mod-5c \ > - tst-cet-legacy-mod-6a \ > - tst-cet-legacy-mod-6b \ > - tst-cet-legacy-mod-6c \ > -# modules-names > - > -CFLAGS-tst-cet-legacy-2.c += -fcf-protection=none -fcf-protection=branch > -CFLAGS-tst-cet-legacy-2a.c += -fcf-protection > -CFLAGS-tst-cet-legacy-mod-1.c += -fcf-protection=none > -CFLAGS-tst-cet-legacy-mod-2.c += -fcf-protection=none > -CFLAGS-tst-cet-legacy-3.c += -fcf-protection=none > -CFLAGS-tst-cet-legacy-4.c += -fcf-protection=none -fcf-protection=branch > -CPPFLAGS-tst-cet-legacy-4a.c += -DCET_IS_PERMISSIVE=1 > -CFLAGS-tst-cet-legacy-4a.c += -fcf-protection > -CFLAGS-tst-cet-legacy-4b.c += -fcf-protection > -CFLAGS-tst-cet-legacy-mod-4.c += -fcf-protection=none > -CFLAGS-tst-cet-legacy-5a.c += -fcf-protection -mshstk > -ifeq ($(enable-cet),permissive) > -CPPFLAGS-tst-cet-legacy-5a.c += -DCET_IS_PERMISSIVE=1 > -endif > -CFLAGS-tst-cet-legacy-5b.c += -fcf-protection -mshstk > -CPPFLAGS-tst-cet-legacy-5b.c += -DCET_DISABLED_BY_ENV=1 > -CFLAGS-tst-cet-legacy-mod-5a.c += -fcf-protection=none -fcf-protection=branch > -CFLAGS-tst-cet-legacy-mod-5b.c += -fcf-protection > -CFLAGS-tst-cet-legacy-mod-5c.c += -fcf-protection > -CFLAGS-tst-cet-legacy-6a.c += -fcf-protection -mshstk > -ifeq ($(enable-cet),permissive) > -CPPFLAGS-tst-cet-legacy-6a.c += -DCET_IS_PERMISSIVE=1 > -endif > -CFLAGS-tst-cet-legacy-6b.c += -fcf-protection -mshstk > -CPPFLAGS-tst-cet-legacy-6b.c += -DCET_DISABLED_BY_ENV=1 > -CFLAGS-tst-cet-legacy-mod-6a.c += -fcf-protection=none -fcf-protection=branch > -CFLAGS-tst-cet-legacy-mod-6b.c += -fcf-protection > -CFLAGS-tst-cet-legacy-mod-6c.c += -fcf-protection > -CFLAGS-tst-cet-legacy-7.c += -fcf-protection=none > -CFLAGS-tst-cet-legacy-10.c += -mshstk > -CFLAGS-tst-cet-legacy-10-static.c += -mshstk > -CFLAGS-tst-cet-legacy-10a.c += -fcf-protection=none > -CFLAGS-tst-cet-legacy-10a-static.c += -fcf-protection=none > - > -tst-cet-legacy-4-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-cet-legacy-6-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-cet-legacy-10-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-cet-legacy-10-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-cet-legacy-10a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-cet-legacy-10a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > - > -CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none > -CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none > -CFLAGS-tst-shstk-legacy-1d.c += -fcf-protection=none > -CFLAGS-tst-shstk-legacy-1d-static.c += -fcf-protection=none > -CFLAGS-tst-shstk-legacy-1f.c += -fcf-protection=none > - > -$(objpfx)tst-cet-legacy-1: $(objpfx)tst-cet-legacy-mod-1.so \ > - $(objpfx)tst-cet-legacy-mod-2.so > -$(objpfx)tst-cet-legacy-1a: $(objpfx)tst-cet-legacy-mod-1.so \ > - $(objpfx)tst-cet-legacy-mod-2.so > -$(objpfx)tst-cet-legacy-2: $(objpfx)tst-cet-legacy-mod-2.so > -$(objpfx)tst-cet-legacy-2.out: $(objpfx)tst-cet-legacy-mod-1.so > -$(objpfx)tst-cet-legacy-2a: $(objpfx)tst-cet-legacy-mod-2.so > -$(objpfx)tst-cet-legacy-2a.out: $(objpfx)tst-cet-legacy-mod-1.so > -$(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so > -$(objpfx)tst-cet-legacy-5a.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > - $(objpfx)tst-cet-legacy-mod-5b.so > -$(objpfx)tst-cet-legacy-mod-5a.so: $(objpfx)tst-cet-legacy-mod-5c.so > -$(objpfx)tst-cet-legacy-mod-5b.so: $(objpfx)tst-cet-legacy-mod-5c.so > -$(objpfx)tst-cet-legacy-6a.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > - $(objpfx)tst-cet-legacy-mod-6b.so > -$(objpfx)tst-cet-legacy-mod-6a.so: $(objpfx)tst-cet-legacy-mod-6c.so > -$(objpfx)tst-cet-legacy-mod-6b.so: $(objpfx)tst-cet-legacy-mod-6c.so > -LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete > -$(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so > -tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive > -$(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so > -tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on > -$(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so > -tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off > -$(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > - $(objpfx)tst-cet-legacy-mod-5b.so > -tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > -$(objpfx)tst-cet-legacy-6b.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > - $(objpfx)tst-cet-legacy-mod-6b.so > -tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > -tst-cet-legacy-9-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > -tst-cet-legacy-9-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > - > -tst-shstk-legacy-1a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-shstk-legacy-1a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -$(objpfx)tst-shstk-legacy-1a: $(objpfx)tst-shstk-legacy-1-extra.o > -$(objpfx)tst-shstk-legacy-1a-static: $(objpfx)tst-shstk-legacy-1-extra.o > -tst-shstk-legacy-1b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-shstk-legacy-1b-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -$(objpfx)tst-shstk-legacy-1b: $(objpfx)tst-shstk-legacy-1-extra.o > -$(objpfx)tst-shstk-legacy-1b-static: $(objpfx)tst-shstk-legacy-1-extra.o > -tst-shstk-legacy-1c-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > -tst-shstk-legacy-1c-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > -$(objpfx)tst-shstk-legacy-1c: $(objpfx)tst-shstk-legacy-1-extra.o > -$(objpfx)tst-shstk-legacy-1c-static: $(objpfx)tst-shstk-legacy-1-extra.o > -tst-shstk-legacy-1d-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -tst-shstk-legacy-1d-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -$(objpfx)tst-shstk-legacy-1d: $(objpfx)tst-shstk-legacy-1-extra.o > -$(objpfx)tst-shstk-legacy-1d-static: $(objpfx)tst-shstk-legacy-1-extra.o > -$(objpfx)tst-shstk-legacy-1e: $(objpfx)tst-shstk-legacy-1-extra.o > -$(objpfx)tst-shstk-legacy-1e-static: $(objpfx)tst-shstk-legacy-1-extra.o > -$(objpfx)tst-shstk-legacy-1e.out: \ > - $(..)/sysdeps/x86/tst-shstk-legacy-1e.sh $(objpfx)tst-shstk-legacy-1e > - $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > - $(evaluate-test) > -$(objpfx)tst-shstk-legacy-1e-static.out: \ > - $(..)/sysdeps/x86/tst-shstk-legacy-1e-static.sh \ > - $(objpfx)tst-shstk-legacy-1e-static > - $(SHELL) $< $(common-objpfx) 2> $@; \ > - $(evaluate-test) > -tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > -$(objpfx)tst-shstk-legacy-1f: $(objpfx)tst-shstk-legacy-mod-1.so > -$(objpfx)tst-shstk-legacy-mod-1.so: \ > - $(objpfx)tst-shstk-legacy-mod-1.os \ > - $(objpfx)tst-shstk-legacy-1-extra.os > -$(objpfx)tst-shstk-legacy-1g: $(objpfx)tst-shstk-legacy-mod-1.so > -$(objpfx)tst-shstk-legacy-1g.out: \ > - $(..)/sysdeps/x86/tst-shstk-legacy-1g.sh $(objpfx)tst-shstk-legacy-1g > - $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > - $(evaluate-test) > -endif > - > -# Add -fcf-protection to CFLAGS when CET is enabled. > -CFLAGS-.o += -fcf-protection > -CFLAGS-.os += -fcf-protection > -CFLAGS-.op += -fcf-protection > -CFLAGS-.oS += -fcf-protection > - > -# Compile assembly codes with <cet.h> when CET is enabled. > -asm-CPPFLAGS += -fcf-protection -include cet.h > - > -ifeq ($(subdir),elf) > -ifeq (yes,$(build-shared)) > -tests-special += $(objpfx)check-cet.out > -endif > - > -# FIXME: Can't use all-built-dso in elf/Makefile since this file is > -# processed before elf/Makefile. Duplicate it here. > -cet-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \ > - $(filter-out $(common-objpfx)linkobj/libc.so, \ > - $(sort $(wildcard $(addprefix $(common-objpfx), \ > - */lib*.so \ > - iconvdata/*.so)))) > - > -$(cet-built-dso:=.note): %.note: % > - @rm -f $@T > - LC_ALL=C $(READELF) -n $< > $@T > - test -s $@T > - mv -f $@T $@ > -common-generated += $(cet-built-dso:$(common-objpfx)%=%.note) > - > -$(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ > - $(cet-built-dso:=.note) > - LC_ALL=C $(AWK) -f $^ > $@; \ > - $(evaluate-test) > -generated += check-cet.out > -endif > -endif > - > ifeq ($(subdir),posix) > tests += \ > tst-sysconf-cache-linesize \ > diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile > index 836e03a224..98f0e04f90 100644 > --- a/sysdeps/x86_64/Makefile > +++ b/sysdeps/x86_64/Makefile > @@ -233,6 +233,249 @@ tests += \ > tst-rsi-wcslen > endif > > + > +ifeq ($(subdir),setjmp) > +ifneq ($(enable-cet),no) > +tests += \ > + tst-setjmp-cet \ > +# tests > +tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on > +endif > +endif > + > + > +ifneq ($(enable-cet),no) > +ifeq ($(subdir),elf) > +sysdep-dl-routines += dl-cet > + > +tests += \ > + tst-cet-legacy-1 \ > + tst-cet-legacy-1a \ > + tst-cet-legacy-2 \ > + tst-cet-legacy-2a \ > + tst-cet-legacy-3 \ > + tst-cet-legacy-4 \ > + tst-cet-legacy-5a \ > + tst-cet-legacy-6a \ > + tst-cet-legacy-7 \ > + tst-cet-legacy-8 \ > + tst-cet-legacy-9 \ > + tst-cet-legacy-9-static \ > + tst-cet-legacy-10 \ > + tst-cet-legacy-10-static \ > + tst-cet-legacy-10a \ > + tst-cet-legacy-10a-static \ > +# tests > +tests-static += \ > + tst-cet-legacy-9-static \ > + tst-cet-legacy-10-static \ > + tst-cet-legacy-10a-static \ > +# tests-static > +tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd) > + > +tests += \ > + tst-shstk-legacy-1a \ > + tst-shstk-legacy-1a-static \ > + tst-shstk-legacy-1b \ > + tst-shstk-legacy-1b-static \ > + tst-shstk-legacy-1c \ > + tst-shstk-legacy-1c-static \ > + tst-shstk-legacy-1d \ > + tst-shstk-legacy-1d-static \ > + tst-shstk-legacy-1e \ > + tst-shstk-legacy-1e-static \ > + tst-shstk-legacy-1f \ > + tst-shstk-legacy-1g \ > +# tests > +modules-names += \ > + tst-shstk-legacy-mod-1 \ > +# modules-names > +tests-static += \ > + tst-shstk-legacy-1a-static \ > + tst-shstk-legacy-1b-static \ > + tst-shstk-legacy-1c-static \ > + tst-shstk-legacy-1d-static \ > + tst-shstk-legacy-1e-static \ > +# tests-static > +extra-objs += \ > + tst-shstk-legacy-1-extra.o \ > +# extra-objs > + > +tests += \ > + tst-cet-legacy-4a \ > + tst-cet-legacy-4b \ > + tst-cet-legacy-4c \ > + tst-cet-legacy-5b \ > + tst-cet-legacy-6b \ > +# tests > +modules-names += \ > + tst-cet-legacy-mod-1 \ > + tst-cet-legacy-mod-2 \ > + tst-cet-legacy-mod-4 \ > + tst-cet-legacy-mod-5a \ > + tst-cet-legacy-mod-5b \ > + tst-cet-legacy-mod-5c \ > + tst-cet-legacy-mod-6a \ > + tst-cet-legacy-mod-6b \ > + tst-cet-legacy-mod-6c \ > +# modules-names > + > +CFLAGS-tst-cet-legacy-2.c += -fcf-protection=none -fcf-protection=branch > +CFLAGS-tst-cet-legacy-2a.c += -fcf-protection > +CFLAGS-tst-cet-legacy-mod-1.c += -fcf-protection=none > +CFLAGS-tst-cet-legacy-mod-2.c += -fcf-protection=none > +CFLAGS-tst-cet-legacy-3.c += -fcf-protection=none > +CFLAGS-tst-cet-legacy-4.c += -fcf-protection=none -fcf-protection=branch > +CPPFLAGS-tst-cet-legacy-4a.c += -DCET_IS_PERMISSIVE=1 > +CFLAGS-tst-cet-legacy-4a.c += -fcf-protection > +CFLAGS-tst-cet-legacy-4b.c += -fcf-protection > +CFLAGS-tst-cet-legacy-mod-4.c += -fcf-protection=none > +CFLAGS-tst-cet-legacy-5a.c += -fcf-protection -mshstk > +ifeq ($(enable-cet),permissive) > +CPPFLAGS-tst-cet-legacy-5a.c += -DCET_IS_PERMISSIVE=1 > +endif > +CFLAGS-tst-cet-legacy-5b.c += -fcf-protection -mshstk > +CPPFLAGS-tst-cet-legacy-5b.c += -DCET_DISABLED_BY_ENV=1 > +CFLAGS-tst-cet-legacy-mod-5a.c += -fcf-protection=none -fcf-protection=branch > +CFLAGS-tst-cet-legacy-mod-5b.c += -fcf-protection > +CFLAGS-tst-cet-legacy-mod-5c.c += -fcf-protection > +CFLAGS-tst-cet-legacy-6a.c += -fcf-protection -mshstk > +ifeq ($(enable-cet),permissive) > +CPPFLAGS-tst-cet-legacy-6a.c += -DCET_IS_PERMISSIVE=1 > +endif > +CFLAGS-tst-cet-legacy-6b.c += -fcf-protection -mshstk > +CPPFLAGS-tst-cet-legacy-6b.c += -DCET_DISABLED_BY_ENV=1 > +CFLAGS-tst-cet-legacy-mod-6a.c += -fcf-protection=none -fcf-protection=branch > +CFLAGS-tst-cet-legacy-mod-6b.c += -fcf-protection > +CFLAGS-tst-cet-legacy-mod-6c.c += -fcf-protection > +CFLAGS-tst-cet-legacy-7.c += -fcf-protection=none > +CFLAGS-tst-cet-legacy-10.c += -mshstk > +CFLAGS-tst-cet-legacy-10-static.c += -mshstk > +CFLAGS-tst-cet-legacy-10a.c += -fcf-protection=none > +CFLAGS-tst-cet-legacy-10a-static.c += -fcf-protection=none > + > +tst-cet-legacy-4-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-cet-legacy-6-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-cet-legacy-10-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-cet-legacy-10-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-cet-legacy-10a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-cet-legacy-10a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > + > +CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none > +CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none > +CFLAGS-tst-shstk-legacy-1d.c += -fcf-protection=none > +CFLAGS-tst-shstk-legacy-1d-static.c += -fcf-protection=none > +CFLAGS-tst-shstk-legacy-1f.c += -fcf-protection=none > + > +$(objpfx)tst-cet-legacy-1: $(objpfx)tst-cet-legacy-mod-1.so \ > + $(objpfx)tst-cet-legacy-mod-2.so > +$(objpfx)tst-cet-legacy-1a: $(objpfx)tst-cet-legacy-mod-1.so \ > + $(objpfx)tst-cet-legacy-mod-2.so > +$(objpfx)tst-cet-legacy-2: $(objpfx)tst-cet-legacy-mod-2.so > +$(objpfx)tst-cet-legacy-2.out: $(objpfx)tst-cet-legacy-mod-1.so > +$(objpfx)tst-cet-legacy-2a: $(objpfx)tst-cet-legacy-mod-2.so > +$(objpfx)tst-cet-legacy-2a.out: $(objpfx)tst-cet-legacy-mod-1.so > +$(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so > +$(objpfx)tst-cet-legacy-5a.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > + $(objpfx)tst-cet-legacy-mod-5b.so > +$(objpfx)tst-cet-legacy-mod-5a.so: $(objpfx)tst-cet-legacy-mod-5c.so > +$(objpfx)tst-cet-legacy-mod-5b.so: $(objpfx)tst-cet-legacy-mod-5c.so > +$(objpfx)tst-cet-legacy-6a.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > + $(objpfx)tst-cet-legacy-mod-6b.so > +$(objpfx)tst-cet-legacy-mod-6a.so: $(objpfx)tst-cet-legacy-mod-6c.so > +$(objpfx)tst-cet-legacy-mod-6b.so: $(objpfx)tst-cet-legacy-mod-6c.so > +LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete > +$(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so > +tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive > +$(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so > +tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on > +$(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so > +tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off > +$(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > + $(objpfx)tst-cet-legacy-mod-5b.so > +tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > +$(objpfx)tst-cet-legacy-6b.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > + $(objpfx)tst-cet-legacy-mod-6b.so > +tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > +tst-cet-legacy-9-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > +tst-cet-legacy-9-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > + > +tst-shstk-legacy-1a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-shstk-legacy-1a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +$(objpfx)tst-shstk-legacy-1a: $(objpfx)tst-shstk-legacy-1-extra.o > +$(objpfx)tst-shstk-legacy-1a-static: $(objpfx)tst-shstk-legacy-1-extra.o > +tst-shstk-legacy-1b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-shstk-legacy-1b-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +$(objpfx)tst-shstk-legacy-1b: $(objpfx)tst-shstk-legacy-1-extra.o > +$(objpfx)tst-shstk-legacy-1b-static: $(objpfx)tst-shstk-legacy-1-extra.o > +tst-shstk-legacy-1c-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > +tst-shstk-legacy-1c-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > +$(objpfx)tst-shstk-legacy-1c: $(objpfx)tst-shstk-legacy-1-extra.o > +$(objpfx)tst-shstk-legacy-1c-static: $(objpfx)tst-shstk-legacy-1-extra.o > +tst-shstk-legacy-1d-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +tst-shstk-legacy-1d-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +$(objpfx)tst-shstk-legacy-1d: $(objpfx)tst-shstk-legacy-1-extra.o > +$(objpfx)tst-shstk-legacy-1d-static: $(objpfx)tst-shstk-legacy-1-extra.o > +$(objpfx)tst-shstk-legacy-1e: $(objpfx)tst-shstk-legacy-1-extra.o > +$(objpfx)tst-shstk-legacy-1e-static: $(objpfx)tst-shstk-legacy-1-extra.o > +$(objpfx)tst-shstk-legacy-1e.out: \ > + $(..)/sysdeps/x86_64/tst-shstk-legacy-1e.sh $(objpfx)tst-shstk-legacy-1e > + $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > + $(evaluate-test) > +$(objpfx)tst-shstk-legacy-1e-static.out: \ > + $(..)/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh \ > + $(objpfx)tst-shstk-legacy-1e-static > + $(SHELL) $< $(common-objpfx) 2> $@; \ > + $(evaluate-test) > +tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > +$(objpfx)tst-shstk-legacy-1f: $(objpfx)tst-shstk-legacy-mod-1.so > +$(objpfx)tst-shstk-legacy-mod-1.so: \ > + $(objpfx)tst-shstk-legacy-mod-1.os \ > + $(objpfx)tst-shstk-legacy-1-extra.os > +$(objpfx)tst-shstk-legacy-1g: $(objpfx)tst-shstk-legacy-mod-1.so > +$(objpfx)tst-shstk-legacy-1g.out: \ > + $(..)/sysdeps/x86_64/tst-shstk-legacy-1g.sh $(objpfx)tst-shstk-legacy-1g > + $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > + $(evaluate-test) > +endif > + > +# Add -fcf-protection to CFLAGS when CET is enabled. > +CFLAGS-.o += -fcf-protection > +CFLAGS-.os += -fcf-protection > +CFLAGS-.op += -fcf-protection > +CFLAGS-.oS += -fcf-protection > + > +# Compile assembly codes with <cet.h> when CET is enabled. > +asm-CPPFLAGS += -fcf-protection -include cet.h > + > +ifeq ($(subdir),elf) > +ifeq (yes,$(build-shared)) > +tests-special += $(objpfx)check-cet.out > +endif > + > +# FIXME: Can't use all-built-dso in elf/Makefile since this file is > +# processed before elf/Makefile. Duplicate it here. > +cet-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \ > + $(filter-out $(common-objpfx)linkobj/libc.so, \ > + $(sort $(wildcard $(addprefix $(common-objpfx), \ > + */lib*.so \ > + iconvdata/*.so)))) > + > +$(cet-built-dso:=.note): %.note: % > + @rm -f $@T > + LC_ALL=C $(READELF) -n $< > $@T > + test -s $@T > + mv -f $@T $@ > +common-generated += $(cet-built-dso:$(common-objpfx)%=%.note) > + > +$(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ > + $(cet-built-dso:=.note) > + LC_ALL=C $(AWK) -f $^ > $@; \ > + $(evaluate-test) > +generated += check-cet.out > +endif # $(subdir) == elf > +endif # $(enable) != no > + > do-tests-clean common-mostlyclean: tst-x86_64-1-clean > > .PHONY: tst-x86_64-1-clean > diff --git a/sysdeps/x86/tst-cet-legacy-1.c b/sysdeps/x86_64/tst-cet-legacy-1.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-1.c > rename to sysdeps/x86_64/tst-cet-legacy-1.c > diff --git a/sysdeps/x86/tst-cet-legacy-10-static.c b/sysdeps/x86_64/tst-cet-legacy-10-static.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-10-static.c > rename to sysdeps/x86_64/tst-cet-legacy-10-static.c > diff --git a/sysdeps/x86/tst-cet-legacy-10.c b/sysdeps/x86_64/tst-cet-legacy-10.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-10.c > rename to sysdeps/x86_64/tst-cet-legacy-10.c > diff --git a/sysdeps/x86/tst-cet-legacy-10a-static.c b/sysdeps/x86_64/tst-cet-legacy-10a-static.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-10a-static.c > rename to sysdeps/x86_64/tst-cet-legacy-10a-static.c > diff --git a/sysdeps/x86/tst-cet-legacy-10a.c b/sysdeps/x86_64/tst-cet-legacy-10a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-10a.c > rename to sysdeps/x86_64/tst-cet-legacy-10a.c > diff --git a/sysdeps/x86/tst-cet-legacy-1a.c b/sysdeps/x86_64/tst-cet-legacy-1a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-1a.c > rename to sysdeps/x86_64/tst-cet-legacy-1a.c > diff --git a/sysdeps/x86/tst-cet-legacy-2.c b/sysdeps/x86_64/tst-cet-legacy-2.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-2.c > rename to sysdeps/x86_64/tst-cet-legacy-2.c > diff --git a/sysdeps/x86/tst-cet-legacy-2a.c b/sysdeps/x86_64/tst-cet-legacy-2a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-2a.c > rename to sysdeps/x86_64/tst-cet-legacy-2a.c > diff --git a/sysdeps/x86/tst-cet-legacy-3.c b/sysdeps/x86_64/tst-cet-legacy-3.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-3.c > rename to sysdeps/x86_64/tst-cet-legacy-3.c > diff --git a/sysdeps/x86/tst-cet-legacy-4.c b/sysdeps/x86_64/tst-cet-legacy-4.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-4.c > rename to sysdeps/x86_64/tst-cet-legacy-4.c > diff --git a/sysdeps/x86/tst-cet-legacy-4a.c b/sysdeps/x86_64/tst-cet-legacy-4a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-4a.c > rename to sysdeps/x86_64/tst-cet-legacy-4a.c > diff --git a/sysdeps/x86/tst-cet-legacy-4b.c b/sysdeps/x86_64/tst-cet-legacy-4b.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-4b.c > rename to sysdeps/x86_64/tst-cet-legacy-4b.c > diff --git a/sysdeps/x86/tst-cet-legacy-4c.c b/sysdeps/x86_64/tst-cet-legacy-4c.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-4c.c > rename to sysdeps/x86_64/tst-cet-legacy-4c.c > diff --git a/sysdeps/x86/tst-cet-legacy-5.c b/sysdeps/x86_64/tst-cet-legacy-5.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-5.c > rename to sysdeps/x86_64/tst-cet-legacy-5.c > diff --git a/sysdeps/x86/tst-cet-legacy-5a.c b/sysdeps/x86_64/tst-cet-legacy-5a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-5a.c > rename to sysdeps/x86_64/tst-cet-legacy-5a.c > diff --git a/sysdeps/x86/tst-cet-legacy-5b.c b/sysdeps/x86_64/tst-cet-legacy-5b.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-5b.c > rename to sysdeps/x86_64/tst-cet-legacy-5b.c > diff --git a/sysdeps/x86/tst-cet-legacy-6.c b/sysdeps/x86_64/tst-cet-legacy-6.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-6.c > rename to sysdeps/x86_64/tst-cet-legacy-6.c > diff --git a/sysdeps/x86/tst-cet-legacy-6a.c b/sysdeps/x86_64/tst-cet-legacy-6a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-6a.c > rename to sysdeps/x86_64/tst-cet-legacy-6a.c > diff --git a/sysdeps/x86/tst-cet-legacy-6b.c b/sysdeps/x86_64/tst-cet-legacy-6b.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-6b.c > rename to sysdeps/x86_64/tst-cet-legacy-6b.c > diff --git a/sysdeps/x86/tst-cet-legacy-7.c b/sysdeps/x86_64/tst-cet-legacy-7.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-7.c > rename to sysdeps/x86_64/tst-cet-legacy-7.c > diff --git a/sysdeps/x86/tst-cet-legacy-8.c b/sysdeps/x86_64/tst-cet-legacy-8.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-8.c > rename to sysdeps/x86_64/tst-cet-legacy-8.c > diff --git a/sysdeps/x86/tst-cet-legacy-9-static.c b/sysdeps/x86_64/tst-cet-legacy-9-static.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-9-static.c > rename to sysdeps/x86_64/tst-cet-legacy-9-static.c > diff --git a/sysdeps/x86/tst-cet-legacy-9.c b/sysdeps/x86_64/tst-cet-legacy-9.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-9.c > rename to sysdeps/x86_64/tst-cet-legacy-9.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-1.c b/sysdeps/x86_64/tst-cet-legacy-mod-1.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-1.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-1.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-2.c b/sysdeps/x86_64/tst-cet-legacy-mod-2.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-2.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-2.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-4.c b/sysdeps/x86_64/tst-cet-legacy-mod-4.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-4.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-4.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5.c b/sysdeps/x86_64/tst-cet-legacy-mod-5.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-5.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-5.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5a.c b/sysdeps/x86_64/tst-cet-legacy-mod-5a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-5a.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-5a.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5b.c b/sysdeps/x86_64/tst-cet-legacy-mod-5b.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-5b.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-5b.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5c.c b/sysdeps/x86_64/tst-cet-legacy-mod-5c.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-5c.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-5c.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6.c b/sysdeps/x86_64/tst-cet-legacy-mod-6.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-6.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-6.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6a.c b/sysdeps/x86_64/tst-cet-legacy-mod-6a.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-6a.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-6a.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6b.c b/sysdeps/x86_64/tst-cet-legacy-mod-6b.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-6b.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-6b.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6c.c b/sysdeps/x86_64/tst-cet-legacy-mod-6c.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-6c.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-6c.c > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6d.c b/sysdeps/x86_64/tst-cet-legacy-mod-6d.c > similarity index 100% > rename from sysdeps/x86/tst-cet-legacy-mod-6d.c > rename to sysdeps/x86_64/tst-cet-legacy-mod-6d.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1-extra.S b/sysdeps/x86_64/tst-shstk-legacy-1-extra.S > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1-extra.S > rename to sysdeps/x86_64/tst-shstk-legacy-1-extra.S > diff --git a/sysdeps/x86/tst-shstk-legacy-1a-static.c b/sysdeps/x86_64/tst-shstk-legacy-1a-static.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1a-static.c > rename to sysdeps/x86_64/tst-shstk-legacy-1a-static.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1a.c b/sysdeps/x86_64/tst-shstk-legacy-1a.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1a.c > rename to sysdeps/x86_64/tst-shstk-legacy-1a.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1b-static.c b/sysdeps/x86_64/tst-shstk-legacy-1b-static.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1b-static.c > rename to sysdeps/x86_64/tst-shstk-legacy-1b-static.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1b.c b/sysdeps/x86_64/tst-shstk-legacy-1b.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1b.c > rename to sysdeps/x86_64/tst-shstk-legacy-1b.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1c-static.c b/sysdeps/x86_64/tst-shstk-legacy-1c-static.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1c-static.c > rename to sysdeps/x86_64/tst-shstk-legacy-1c-static.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1c.c b/sysdeps/x86_64/tst-shstk-legacy-1c.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1c.c > rename to sysdeps/x86_64/tst-shstk-legacy-1c.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1d-static.c b/sysdeps/x86_64/tst-shstk-legacy-1d-static.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1d-static.c > rename to sysdeps/x86_64/tst-shstk-legacy-1d-static.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1d.c b/sysdeps/x86_64/tst-shstk-legacy-1d.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1d.c > rename to sysdeps/x86_64/tst-shstk-legacy-1d.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1e-static.c b/sysdeps/x86_64/tst-shstk-legacy-1e-static.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1e-static.c > rename to sysdeps/x86_64/tst-shstk-legacy-1e-static.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1e-static.sh b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1e-static.sh > rename to sysdeps/x86_64/tst-shstk-legacy-1e-static.sh > diff --git a/sysdeps/x86/tst-shstk-legacy-1e.c b/sysdeps/x86_64/tst-shstk-legacy-1e.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1e.c > rename to sysdeps/x86_64/tst-shstk-legacy-1e.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1e.sh b/sysdeps/x86_64/tst-shstk-legacy-1e.sh > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1e.sh > rename to sysdeps/x86_64/tst-shstk-legacy-1e.sh > diff --git a/sysdeps/x86/tst-shstk-legacy-1f.c b/sysdeps/x86_64/tst-shstk-legacy-1f.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1f.c > rename to sysdeps/x86_64/tst-shstk-legacy-1f.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1g.c b/sysdeps/x86_64/tst-shstk-legacy-1g.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1g.c > rename to sysdeps/x86_64/tst-shstk-legacy-1g.c > diff --git a/sysdeps/x86/tst-shstk-legacy-1g.sh b/sysdeps/x86_64/tst-shstk-legacy-1g.sh > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-1g.sh > rename to sysdeps/x86_64/tst-shstk-legacy-1g.sh > diff --git a/sysdeps/x86/tst-shstk-legacy-mod-1.c b/sysdeps/x86_64/tst-shstk-legacy-mod-1.c > similarity index 100% > rename from sysdeps/x86/tst-shstk-legacy-mod-1.c > rename to sysdeps/x86_64/tst-shstk-legacy-mod-1.c > -- > 2.34.1 > OK with the commit message typo fix. Thanks.
On Mon, Jan 8, 2024 at 6:54 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > On Mon, Jan 8, 2024 at 4:50 AM Adhemerval Zanella > <adhemerval.zanella@linaro.org> wrote: > > > > The CET is only supported for x86_64 and there is no plan to add > > kernel support for i386. Move the Makefile fules and tests from the > files > > generic x86 folder to x86_64 one. > > > > Checked on x86_64-linux-gnu and i686-linux-gnu. > > --- > > sysdeps/unix/sysv/linux/x86/Makefile | 27 -- > > sysdeps/unix/sysv/linux/x86_64/Makefile | 27 ++ > > .../linux/{x86 => x86_64}/include/asm/prctl.h | 0 > > .../{x86 => x86_64}/tst-cet-property-1.c | 0 > > .../{x86 => x86_64}/tst-cet-property-2.c | 0 > > .../{x86 => x86_64}/tst-cet-property-dep-2.S | 0 > > .../{x86 => x86_64}/tst-cet-setcontext-1.c | 0 > > .../linux/{x86 => x86_64}/tst-cet-vfork-1.c | 0 > > sysdeps/x86/Makefile | 238 ----------------- > > sysdeps/x86_64/Makefile | 243 ++++++++++++++++++ > > sysdeps/{x86 => x86_64}/tst-cet-legacy-1.c | 0 > > .../tst-cet-legacy-10-static.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-10.c | 0 > > .../tst-cet-legacy-10a-static.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-10a.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-1a.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-2.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-2a.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-3.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-4.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-4a.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-4b.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-4c.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-5.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-5a.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-5b.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-6.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-6a.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-6b.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-7.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-8.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-9-static.c | 0 > > sysdeps/{x86 => x86_64}/tst-cet-legacy-9.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-1.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-2.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-4.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-5.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-5a.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-5b.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-5c.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-6.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-6a.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-6b.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-6c.c | 0 > > .../{x86 => x86_64}/tst-cet-legacy-mod-6d.c | 0 > > .../tst-shstk-legacy-1-extra.S | 0 > > .../tst-shstk-legacy-1a-static.c | 0 > > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1a.c | 0 > > .../tst-shstk-legacy-1b-static.c | 0 > > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1b.c | 0 > > .../tst-shstk-legacy-1c-static.c | 0 > > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1c.c | 0 > > .../tst-shstk-legacy-1d-static.c | 0 > > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1d.c | 0 > > .../tst-shstk-legacy-1e-static.c | 0 > > .../tst-shstk-legacy-1e-static.sh | 0 > > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e.c | 0 > > .../{x86 => x86_64}/tst-shstk-legacy-1e.sh | 0 > > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1f.c | 0 > > sysdeps/{x86 => x86_64}/tst-shstk-legacy-1g.c | 0 > > .../{x86 => x86_64}/tst-shstk-legacy-1g.sh | 0 > > .../{x86 => x86_64}/tst-shstk-legacy-mod-1.c | 0 > > 62 files changed, 270 insertions(+), 265 deletions(-) > > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/include/asm/prctl.h (100%) > > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-property-1.c (100%) > > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-property-2.c (100%) > > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-property-dep-2.S (100%) > > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-setcontext-1.c (100%) > > rename sysdeps/unix/sysv/linux/{x86 => x86_64}/tst-cet-vfork-1.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-1.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10a-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-10a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-1a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-2.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-2a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-3.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4b.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-4c.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-5.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-5a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-5b.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-6.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-6a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-6b.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-7.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-8.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-9-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-9.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-1.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-2.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-4.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5b.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-5c.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6b.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6c.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-cet-legacy-mod-6d.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1-extra.S (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1a-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1a.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1b-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1b.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1c-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1c.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1d-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1d.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e-static.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e-static.sh (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1e.sh (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1f.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1g.c (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-1g.sh (100%) > > rename sysdeps/{x86 => x86_64}/tst-shstk-legacy-mod-1.c (100%) > > > > diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile > > index 9dfdd689a9..743b633b65 100644 > > --- a/sysdeps/unix/sysv/linux/x86/Makefile > > +++ b/sysdeps/unix/sysv/linux/x86/Makefile > > @@ -21,30 +21,3 @@ endif > > ifeq ($(subdir),setjmp) > > tests += tst-saved_mask-1 > > endif > > - > > -ifneq ($(enable-cet),no) > > -ifeq ($(subdir),elf) > > -tests += tst-cet-property-1 tst-cet-property-2 > > - > > -CFLAGS-tst-cet-property-1.o += -fcf-protection > > -ASFLAGS-tst-cet-property-dep-2.o += -fcf-protection > > - > > -$(objpfx)tst-cet-property-2: $(objpfx)tst-cet-property-dep-2.o > > -$(objpfx)tst-cet-property-2.out: $(objpfx)tst-cet-property-2 \ > > - $(objpfx)tst-cet-property-1.out > > - env $(run-program-env) $(test-via-rtld-prefix) \ > > - $(objpfx)tst-cet-property-2 \ > > - < $(objpfx)tst-cet-property-1.out > $@; \ > > - $(evaluate-test) > > -endif > > - > > -ifeq ($(subdir),posix) > > -tests += tst-cet-vfork-1 > > -CFLAGS-tst-cet-vfork-1.c += -mshstk > > -endif > > - > > -ifeq ($(subdir),stdlib) > > -tests += tst-cet-setcontext-1 > > -CFLAGS-tst-cet-setcontext-1.c += -mshstk > > -endif > > -endif > > diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile > > index 06b873949e..4223feb95f 100644 > > --- a/sysdeps/unix/sysv/linux/x86_64/Makefile > > +++ b/sysdeps/unix/sysv/linux/x86_64/Makefile > > @@ -64,3 +64,30 @@ $(objpfx)libx86-64-isa-level.so: $(objpfx)libx86-64-isa-level-1.so > > cp $< $@ > > endif > > endif # $(subdir) == elf > > + > > +ifneq ($(enable-cet),no) > > +ifeq ($(subdir),elf) > > +tests += tst-cet-property-1 tst-cet-property-2 > > + > > +CFLAGS-tst-cet-property-1.o += -fcf-protection > > +ASFLAGS-tst-cet-property-dep-2.o += -fcf-protection > > + > > +$(objpfx)tst-cet-property-2: $(objpfx)tst-cet-property-dep-2.o > > +$(objpfx)tst-cet-property-2.out: $(objpfx)tst-cet-property-2 \ > > + $(objpfx)tst-cet-property-1.out > > + env $(run-program-env) $(test-via-rtld-prefix) \ > > + $(objpfx)tst-cet-property-2 \ > > + < $(objpfx)tst-cet-property-1.out > $@; \ > > + $(evaluate-test) > > +endif > > + > > +ifeq ($(subdir),posix) > > +tests += tst-cet-vfork-1 > > +CFLAGS-tst-cet-vfork-1.c += -mshstk > > +endif > > + > > +ifeq ($(subdir),stdlib) > > +tests += tst-cet-setcontext-1 > > +CFLAGS-tst-cet-setcontext-1.c += -mshstk > > +endif > > +endif > > diff --git a/sysdeps/unix/sysv/linux/x86/include/asm/prctl.h b/sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h > > similarity index 100% > > rename from sysdeps/unix/sysv/linux/x86/include/asm/prctl.h > > rename to sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h > > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-1.c > > similarity index 100% > > rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c > > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-1.c > > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c > > similarity index 100% > > rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c > > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c > > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-dep-2.S > > similarity index 100% > > rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S > > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-dep-2.S > > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-setcontext-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c > > similarity index 100% > > rename from sysdeps/unix/sysv/linux/x86/tst-cet-setcontext-1.c > > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c > > diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-vfork-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c > > similarity index 100% > > rename from sysdeps/unix/sysv/linux/x86/tst-cet-vfork-1.c > > rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c > > diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile > > index 5c8ab64c4d..bf913594c1 100644 > > --- a/sysdeps/x86/Makefile > > +++ b/sysdeps/x86/Makefile > > @@ -93,12 +93,6 @@ endif # $(subdir) == math > > ifeq ($(subdir),setjmp) > > gen-as-const-headers += jmp_buf-ssp.sym > > sysdep_routines += __longjmp_cancel > > -ifneq ($(enable-cet),no) > > -tests += \ > > - tst-setjmp-cet \ > > -# tests > > -tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on > > -endif > > endif > > > > ifeq ($(subdir),string) > > @@ -139,238 +133,6 @@ CFLAGS-tst-wcscmp-rtm.c += -mrtm > > CFLAGS-tst-wcsncmp-rtm.c += -mrtm -Wno-error > > endif > > > > -ifneq ($(enable-cet),no) > > -ifeq ($(subdir),elf) > > -sysdep-dl-routines += dl-cet > > - > > -tests += \ > > - tst-cet-legacy-1 \ > > - tst-cet-legacy-1a \ > > - tst-cet-legacy-2 \ > > - tst-cet-legacy-2a \ > > - tst-cet-legacy-3 \ > > - tst-cet-legacy-4 \ > > - tst-cet-legacy-5a \ > > - tst-cet-legacy-6a \ > > - tst-cet-legacy-7 \ > > - tst-cet-legacy-8 \ > > - tst-cet-legacy-9 \ > > - tst-cet-legacy-9-static \ > > - tst-cet-legacy-10 \ > > - tst-cet-legacy-10-static \ > > - tst-cet-legacy-10a \ > > - tst-cet-legacy-10a-static \ > > -# tests > > -tests-static += \ > > - tst-cet-legacy-9-static \ > > - tst-cet-legacy-10-static \ > > - tst-cet-legacy-10a-static \ > > -# tests-static > > -tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd) > > - > > -tests += \ > > - tst-shstk-legacy-1a \ > > - tst-shstk-legacy-1a-static \ > > - tst-shstk-legacy-1b \ > > - tst-shstk-legacy-1b-static \ > > - tst-shstk-legacy-1c \ > > - tst-shstk-legacy-1c-static \ > > - tst-shstk-legacy-1d \ > > - tst-shstk-legacy-1d-static \ > > - tst-shstk-legacy-1e \ > > - tst-shstk-legacy-1e-static \ > > - tst-shstk-legacy-1f \ > > - tst-shstk-legacy-1g \ > > -# tests > > -modules-names += \ > > - tst-shstk-legacy-mod-1 \ > > -# modules-names > > -tests-static += \ > > - tst-shstk-legacy-1a-static \ > > - tst-shstk-legacy-1b-static \ > > - tst-shstk-legacy-1c-static \ > > - tst-shstk-legacy-1d-static \ > > - tst-shstk-legacy-1e-static \ > > -# tests-static > > -extra-objs += \ > > - tst-shstk-legacy-1-extra.o \ > > -# extra-objs > > - > > -tests += \ > > - tst-cet-legacy-4a \ > > - tst-cet-legacy-4b \ > > - tst-cet-legacy-4c \ > > - tst-cet-legacy-5b \ > > - tst-cet-legacy-6b \ > > -# tests > > -modules-names += \ > > - tst-cet-legacy-mod-1 \ > > - tst-cet-legacy-mod-2 \ > > - tst-cet-legacy-mod-4 \ > > - tst-cet-legacy-mod-5a \ > > - tst-cet-legacy-mod-5b \ > > - tst-cet-legacy-mod-5c \ > > - tst-cet-legacy-mod-6a \ > > - tst-cet-legacy-mod-6b \ > > - tst-cet-legacy-mod-6c \ > > -# modules-names > > - > > -CFLAGS-tst-cet-legacy-2.c += -fcf-protection=none -fcf-protection=branch > > -CFLAGS-tst-cet-legacy-2a.c += -fcf-protection > > -CFLAGS-tst-cet-legacy-mod-1.c += -fcf-protection=none > > -CFLAGS-tst-cet-legacy-mod-2.c += -fcf-protection=none > > -CFLAGS-tst-cet-legacy-3.c += -fcf-protection=none > > -CFLAGS-tst-cet-legacy-4.c += -fcf-protection=none -fcf-protection=branch > > -CPPFLAGS-tst-cet-legacy-4a.c += -DCET_IS_PERMISSIVE=1 > > -CFLAGS-tst-cet-legacy-4a.c += -fcf-protection > > -CFLAGS-tst-cet-legacy-4b.c += -fcf-protection > > -CFLAGS-tst-cet-legacy-mod-4.c += -fcf-protection=none > > -CFLAGS-tst-cet-legacy-5a.c += -fcf-protection -mshstk > > -ifeq ($(enable-cet),permissive) > > -CPPFLAGS-tst-cet-legacy-5a.c += -DCET_IS_PERMISSIVE=1 > > -endif > > -CFLAGS-tst-cet-legacy-5b.c += -fcf-protection -mshstk > > -CPPFLAGS-tst-cet-legacy-5b.c += -DCET_DISABLED_BY_ENV=1 > > -CFLAGS-tst-cet-legacy-mod-5a.c += -fcf-protection=none -fcf-protection=branch > > -CFLAGS-tst-cet-legacy-mod-5b.c += -fcf-protection > > -CFLAGS-tst-cet-legacy-mod-5c.c += -fcf-protection > > -CFLAGS-tst-cet-legacy-6a.c += -fcf-protection -mshstk > > -ifeq ($(enable-cet),permissive) > > -CPPFLAGS-tst-cet-legacy-6a.c += -DCET_IS_PERMISSIVE=1 > > -endif > > -CFLAGS-tst-cet-legacy-6b.c += -fcf-protection -mshstk > > -CPPFLAGS-tst-cet-legacy-6b.c += -DCET_DISABLED_BY_ENV=1 > > -CFLAGS-tst-cet-legacy-mod-6a.c += -fcf-protection=none -fcf-protection=branch > > -CFLAGS-tst-cet-legacy-mod-6b.c += -fcf-protection > > -CFLAGS-tst-cet-legacy-mod-6c.c += -fcf-protection > > -CFLAGS-tst-cet-legacy-7.c += -fcf-protection=none > > -CFLAGS-tst-cet-legacy-10.c += -mshstk > > -CFLAGS-tst-cet-legacy-10-static.c += -mshstk > > -CFLAGS-tst-cet-legacy-10a.c += -fcf-protection=none > > -CFLAGS-tst-cet-legacy-10a-static.c += -fcf-protection=none > > - > > -tst-cet-legacy-4-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-cet-legacy-6-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-cet-legacy-10-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-cet-legacy-10-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-cet-legacy-10a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-cet-legacy-10a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > - > > -CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none > > -CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none > > -CFLAGS-tst-shstk-legacy-1d.c += -fcf-protection=none > > -CFLAGS-tst-shstk-legacy-1d-static.c += -fcf-protection=none > > -CFLAGS-tst-shstk-legacy-1f.c += -fcf-protection=none > > - > > -$(objpfx)tst-cet-legacy-1: $(objpfx)tst-cet-legacy-mod-1.so \ > > - $(objpfx)tst-cet-legacy-mod-2.so > > -$(objpfx)tst-cet-legacy-1a: $(objpfx)tst-cet-legacy-mod-1.so \ > > - $(objpfx)tst-cet-legacy-mod-2.so > > -$(objpfx)tst-cet-legacy-2: $(objpfx)tst-cet-legacy-mod-2.so > > -$(objpfx)tst-cet-legacy-2.out: $(objpfx)tst-cet-legacy-mod-1.so > > -$(objpfx)tst-cet-legacy-2a: $(objpfx)tst-cet-legacy-mod-2.so > > -$(objpfx)tst-cet-legacy-2a.out: $(objpfx)tst-cet-legacy-mod-1.so > > -$(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so > > -$(objpfx)tst-cet-legacy-5a.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > > - $(objpfx)tst-cet-legacy-mod-5b.so > > -$(objpfx)tst-cet-legacy-mod-5a.so: $(objpfx)tst-cet-legacy-mod-5c.so > > -$(objpfx)tst-cet-legacy-mod-5b.so: $(objpfx)tst-cet-legacy-mod-5c.so > > -$(objpfx)tst-cet-legacy-6a.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > > - $(objpfx)tst-cet-legacy-mod-6b.so > > -$(objpfx)tst-cet-legacy-mod-6a.so: $(objpfx)tst-cet-legacy-mod-6c.so > > -$(objpfx)tst-cet-legacy-mod-6b.so: $(objpfx)tst-cet-legacy-mod-6c.so > > -LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete > > -$(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so > > -tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive > > -$(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so > > -tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on > > -$(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so > > -tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off > > -$(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > > - $(objpfx)tst-cet-legacy-mod-5b.so > > -tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > -$(objpfx)tst-cet-legacy-6b.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > > - $(objpfx)tst-cet-legacy-mod-6b.so > > -tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > -tst-cet-legacy-9-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > -tst-cet-legacy-9-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > - > > -tst-shstk-legacy-1a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-shstk-legacy-1a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -$(objpfx)tst-shstk-legacy-1a: $(objpfx)tst-shstk-legacy-1-extra.o > > -$(objpfx)tst-shstk-legacy-1a-static: $(objpfx)tst-shstk-legacy-1-extra.o > > -tst-shstk-legacy-1b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-shstk-legacy-1b-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -$(objpfx)tst-shstk-legacy-1b: $(objpfx)tst-shstk-legacy-1-extra.o > > -$(objpfx)tst-shstk-legacy-1b-static: $(objpfx)tst-shstk-legacy-1-extra.o > > -tst-shstk-legacy-1c-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > > -tst-shstk-legacy-1c-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > > -$(objpfx)tst-shstk-legacy-1c: $(objpfx)tst-shstk-legacy-1-extra.o > > -$(objpfx)tst-shstk-legacy-1c-static: $(objpfx)tst-shstk-legacy-1-extra.o > > -tst-shstk-legacy-1d-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -tst-shstk-legacy-1d-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -$(objpfx)tst-shstk-legacy-1d: $(objpfx)tst-shstk-legacy-1-extra.o > > -$(objpfx)tst-shstk-legacy-1d-static: $(objpfx)tst-shstk-legacy-1-extra.o > > -$(objpfx)tst-shstk-legacy-1e: $(objpfx)tst-shstk-legacy-1-extra.o > > -$(objpfx)tst-shstk-legacy-1e-static: $(objpfx)tst-shstk-legacy-1-extra.o > > -$(objpfx)tst-shstk-legacy-1e.out: \ > > - $(..)/sysdeps/x86/tst-shstk-legacy-1e.sh $(objpfx)tst-shstk-legacy-1e > > - $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > > - $(evaluate-test) > > -$(objpfx)tst-shstk-legacy-1e-static.out: \ > > - $(..)/sysdeps/x86/tst-shstk-legacy-1e-static.sh \ > > - $(objpfx)tst-shstk-legacy-1e-static > > - $(SHELL) $< $(common-objpfx) 2> $@; \ > > - $(evaluate-test) > > -tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > -$(objpfx)tst-shstk-legacy-1f: $(objpfx)tst-shstk-legacy-mod-1.so > > -$(objpfx)tst-shstk-legacy-mod-1.so: \ > > - $(objpfx)tst-shstk-legacy-mod-1.os \ > > - $(objpfx)tst-shstk-legacy-1-extra.os > > -$(objpfx)tst-shstk-legacy-1g: $(objpfx)tst-shstk-legacy-mod-1.so > > -$(objpfx)tst-shstk-legacy-1g.out: \ > > - $(..)/sysdeps/x86/tst-shstk-legacy-1g.sh $(objpfx)tst-shstk-legacy-1g > > - $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > > - $(evaluate-test) > > -endif > > - > > -# Add -fcf-protection to CFLAGS when CET is enabled. > > -CFLAGS-.o += -fcf-protection > > -CFLAGS-.os += -fcf-protection > > -CFLAGS-.op += -fcf-protection > > -CFLAGS-.oS += -fcf-protection > > - > > -# Compile assembly codes with <cet.h> when CET is enabled. > > -asm-CPPFLAGS += -fcf-protection -include cet.h > > - > > -ifeq ($(subdir),elf) > > -ifeq (yes,$(build-shared)) > > -tests-special += $(objpfx)check-cet.out > > -endif > > - > > -# FIXME: Can't use all-built-dso in elf/Makefile since this file is > > -# processed before elf/Makefile. Duplicate it here. > > -cet-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \ > > - $(filter-out $(common-objpfx)linkobj/libc.so, \ > > - $(sort $(wildcard $(addprefix $(common-objpfx), \ > > - */lib*.so \ > > - iconvdata/*.so)))) > > - > > -$(cet-built-dso:=.note): %.note: % > > - @rm -f $@T > > - LC_ALL=C $(READELF) -n $< > $@T > > - test -s $@T > > - mv -f $@T $@ > > -common-generated += $(cet-built-dso:$(common-objpfx)%=%.note) > > - > > -$(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ > > - $(cet-built-dso:=.note) > > - LC_ALL=C $(AWK) -f $^ > $@; \ > > - $(evaluate-test) > > -generated += check-cet.out > > -endif > > -endif > > - > > ifeq ($(subdir),posix) > > tests += \ > > tst-sysconf-cache-linesize \ > > diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile > > index 836e03a224..98f0e04f90 100644 > > --- a/sysdeps/x86_64/Makefile > > +++ b/sysdeps/x86_64/Makefile > > @@ -233,6 +233,249 @@ tests += \ > > tst-rsi-wcslen > > endif > > > > + > > +ifeq ($(subdir),setjmp) > > +ifneq ($(enable-cet),no) > > +tests += \ > > + tst-setjmp-cet \ > > +# tests > > +tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on > > +endif > > +endif > > + > > + > > +ifneq ($(enable-cet),no) > > +ifeq ($(subdir),elf) > > +sysdep-dl-routines += dl-cet > > + > > +tests += \ > > + tst-cet-legacy-1 \ > > + tst-cet-legacy-1a \ > > + tst-cet-legacy-2 \ > > + tst-cet-legacy-2a \ > > + tst-cet-legacy-3 \ > > + tst-cet-legacy-4 \ > > + tst-cet-legacy-5a \ > > + tst-cet-legacy-6a \ > > + tst-cet-legacy-7 \ > > + tst-cet-legacy-8 \ > > + tst-cet-legacy-9 \ > > + tst-cet-legacy-9-static \ > > + tst-cet-legacy-10 \ > > + tst-cet-legacy-10-static \ > > + tst-cet-legacy-10a \ > > + tst-cet-legacy-10a-static \ > > +# tests > > +tests-static += \ > > + tst-cet-legacy-9-static \ > > + tst-cet-legacy-10-static \ > > + tst-cet-legacy-10a-static \ > > +# tests-static > > +tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd) > > + > > +tests += \ > > + tst-shstk-legacy-1a \ > > + tst-shstk-legacy-1a-static \ > > + tst-shstk-legacy-1b \ > > + tst-shstk-legacy-1b-static \ > > + tst-shstk-legacy-1c \ > > + tst-shstk-legacy-1c-static \ > > + tst-shstk-legacy-1d \ > > + tst-shstk-legacy-1d-static \ > > + tst-shstk-legacy-1e \ > > + tst-shstk-legacy-1e-static \ > > + tst-shstk-legacy-1f \ > > + tst-shstk-legacy-1g \ > > +# tests > > +modules-names += \ > > + tst-shstk-legacy-mod-1 \ > > +# modules-names > > +tests-static += \ > > + tst-shstk-legacy-1a-static \ > > + tst-shstk-legacy-1b-static \ > > + tst-shstk-legacy-1c-static \ > > + tst-shstk-legacy-1d-static \ > > + tst-shstk-legacy-1e-static \ > > +# tests-static > > +extra-objs += \ > > + tst-shstk-legacy-1-extra.o \ > > +# extra-objs > > + > > +tests += \ > > + tst-cet-legacy-4a \ > > + tst-cet-legacy-4b \ > > + tst-cet-legacy-4c \ > > + tst-cet-legacy-5b \ > > + tst-cet-legacy-6b \ > > +# tests > > +modules-names += \ > > + tst-cet-legacy-mod-1 \ > > + tst-cet-legacy-mod-2 \ > > + tst-cet-legacy-mod-4 \ > > + tst-cet-legacy-mod-5a \ > > + tst-cet-legacy-mod-5b \ > > + tst-cet-legacy-mod-5c \ > > + tst-cet-legacy-mod-6a \ > > + tst-cet-legacy-mod-6b \ > > + tst-cet-legacy-mod-6c \ > > +# modules-names > > + > > +CFLAGS-tst-cet-legacy-2.c += -fcf-protection=none -fcf-protection=branch > > +CFLAGS-tst-cet-legacy-2a.c += -fcf-protection > > +CFLAGS-tst-cet-legacy-mod-1.c += -fcf-protection=none > > +CFLAGS-tst-cet-legacy-mod-2.c += -fcf-protection=none > > +CFLAGS-tst-cet-legacy-3.c += -fcf-protection=none > > +CFLAGS-tst-cet-legacy-4.c += -fcf-protection=none -fcf-protection=branch > > +CPPFLAGS-tst-cet-legacy-4a.c += -DCET_IS_PERMISSIVE=1 > > +CFLAGS-tst-cet-legacy-4a.c += -fcf-protection > > +CFLAGS-tst-cet-legacy-4b.c += -fcf-protection > > +CFLAGS-tst-cet-legacy-mod-4.c += -fcf-protection=none > > +CFLAGS-tst-cet-legacy-5a.c += -fcf-protection -mshstk > > +ifeq ($(enable-cet),permissive) > > +CPPFLAGS-tst-cet-legacy-5a.c += -DCET_IS_PERMISSIVE=1 > > +endif > > +CFLAGS-tst-cet-legacy-5b.c += -fcf-protection -mshstk > > +CPPFLAGS-tst-cet-legacy-5b.c += -DCET_DISABLED_BY_ENV=1 > > +CFLAGS-tst-cet-legacy-mod-5a.c += -fcf-protection=none -fcf-protection=branch > > +CFLAGS-tst-cet-legacy-mod-5b.c += -fcf-protection > > +CFLAGS-tst-cet-legacy-mod-5c.c += -fcf-protection > > +CFLAGS-tst-cet-legacy-6a.c += -fcf-protection -mshstk > > +ifeq ($(enable-cet),permissive) > > +CPPFLAGS-tst-cet-legacy-6a.c += -DCET_IS_PERMISSIVE=1 > > +endif > > +CFLAGS-tst-cet-legacy-6b.c += -fcf-protection -mshstk > > +CPPFLAGS-tst-cet-legacy-6b.c += -DCET_DISABLED_BY_ENV=1 > > +CFLAGS-tst-cet-legacy-mod-6a.c += -fcf-protection=none -fcf-protection=branch > > +CFLAGS-tst-cet-legacy-mod-6b.c += -fcf-protection > > +CFLAGS-tst-cet-legacy-mod-6c.c += -fcf-protection > > +CFLAGS-tst-cet-legacy-7.c += -fcf-protection=none > > +CFLAGS-tst-cet-legacy-10.c += -mshstk > > +CFLAGS-tst-cet-legacy-10-static.c += -mshstk > > +CFLAGS-tst-cet-legacy-10a.c += -fcf-protection=none > > +CFLAGS-tst-cet-legacy-10a-static.c += -fcf-protection=none > > + > > +tst-cet-legacy-4-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-cet-legacy-6-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-cet-legacy-10-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-cet-legacy-10-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-cet-legacy-10a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-cet-legacy-10a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > + > > +CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none > > +CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none > > +CFLAGS-tst-shstk-legacy-1d.c += -fcf-protection=none > > +CFLAGS-tst-shstk-legacy-1d-static.c += -fcf-protection=none > > +CFLAGS-tst-shstk-legacy-1f.c += -fcf-protection=none > > + > > +$(objpfx)tst-cet-legacy-1: $(objpfx)tst-cet-legacy-mod-1.so \ > > + $(objpfx)tst-cet-legacy-mod-2.so > > +$(objpfx)tst-cet-legacy-1a: $(objpfx)tst-cet-legacy-mod-1.so \ > > + $(objpfx)tst-cet-legacy-mod-2.so > > +$(objpfx)tst-cet-legacy-2: $(objpfx)tst-cet-legacy-mod-2.so > > +$(objpfx)tst-cet-legacy-2.out: $(objpfx)tst-cet-legacy-mod-1.so > > +$(objpfx)tst-cet-legacy-2a: $(objpfx)tst-cet-legacy-mod-2.so > > +$(objpfx)tst-cet-legacy-2a.out: $(objpfx)tst-cet-legacy-mod-1.so > > +$(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so > > +$(objpfx)tst-cet-legacy-5a.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > > + $(objpfx)tst-cet-legacy-mod-5b.so > > +$(objpfx)tst-cet-legacy-mod-5a.so: $(objpfx)tst-cet-legacy-mod-5c.so > > +$(objpfx)tst-cet-legacy-mod-5b.so: $(objpfx)tst-cet-legacy-mod-5c.so > > +$(objpfx)tst-cet-legacy-6a.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > > + $(objpfx)tst-cet-legacy-mod-6b.so > > +$(objpfx)tst-cet-legacy-mod-6a.so: $(objpfx)tst-cet-legacy-mod-6c.so > > +$(objpfx)tst-cet-legacy-mod-6b.so: $(objpfx)tst-cet-legacy-mod-6c.so > > +LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete > > +$(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so > > +tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive > > +$(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so > > +tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on > > +$(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so > > +tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off > > +$(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \ > > + $(objpfx)tst-cet-legacy-mod-5b.so > > +tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > +$(objpfx)tst-cet-legacy-6b.out: $(objpfx)tst-cet-legacy-mod-6a.so \ > > + $(objpfx)tst-cet-legacy-mod-6b.so > > +tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > +tst-cet-legacy-9-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > +tst-cet-legacy-9-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK > > + > > +tst-shstk-legacy-1a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-shstk-legacy-1a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +$(objpfx)tst-shstk-legacy-1a: $(objpfx)tst-shstk-legacy-1-extra.o > > +$(objpfx)tst-shstk-legacy-1a-static: $(objpfx)tst-shstk-legacy-1-extra.o > > +tst-shstk-legacy-1b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-shstk-legacy-1b-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +$(objpfx)tst-shstk-legacy-1b: $(objpfx)tst-shstk-legacy-1-extra.o > > +$(objpfx)tst-shstk-legacy-1b-static: $(objpfx)tst-shstk-legacy-1-extra.o > > +tst-shstk-legacy-1c-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > > +tst-shstk-legacy-1c-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK > > +$(objpfx)tst-shstk-legacy-1c: $(objpfx)tst-shstk-legacy-1-extra.o > > +$(objpfx)tst-shstk-legacy-1c-static: $(objpfx)tst-shstk-legacy-1-extra.o > > +tst-shstk-legacy-1d-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +tst-shstk-legacy-1d-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +$(objpfx)tst-shstk-legacy-1d: $(objpfx)tst-shstk-legacy-1-extra.o > > +$(objpfx)tst-shstk-legacy-1d-static: $(objpfx)tst-shstk-legacy-1-extra.o > > +$(objpfx)tst-shstk-legacy-1e: $(objpfx)tst-shstk-legacy-1-extra.o > > +$(objpfx)tst-shstk-legacy-1e-static: $(objpfx)tst-shstk-legacy-1-extra.o > > +$(objpfx)tst-shstk-legacy-1e.out: \ > > + $(..)/sysdeps/x86_64/tst-shstk-legacy-1e.sh $(objpfx)tst-shstk-legacy-1e > > + $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > > + $(evaluate-test) > > +$(objpfx)tst-shstk-legacy-1e-static.out: \ > > + $(..)/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh \ > > + $(objpfx)tst-shstk-legacy-1e-static > > + $(SHELL) $< $(common-objpfx) 2> $@; \ > > + $(evaluate-test) > > +tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK > > +$(objpfx)tst-shstk-legacy-1f: $(objpfx)tst-shstk-legacy-mod-1.so > > +$(objpfx)tst-shstk-legacy-mod-1.so: \ > > + $(objpfx)tst-shstk-legacy-mod-1.os \ > > + $(objpfx)tst-shstk-legacy-1-extra.os > > +$(objpfx)tst-shstk-legacy-1g: $(objpfx)tst-shstk-legacy-mod-1.so > > +$(objpfx)tst-shstk-legacy-1g.out: \ > > + $(..)/sysdeps/x86_64/tst-shstk-legacy-1g.sh $(objpfx)tst-shstk-legacy-1g > > + $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ > > + $(evaluate-test) > > +endif > > + > > +# Add -fcf-protection to CFLAGS when CET is enabled. > > +CFLAGS-.o += -fcf-protection > > +CFLAGS-.os += -fcf-protection > > +CFLAGS-.op += -fcf-protection > > +CFLAGS-.oS += -fcf-protection > > + > > +# Compile assembly codes with <cet.h> when CET is enabled. > > +asm-CPPFLAGS += -fcf-protection -include cet.h > > + > > +ifeq ($(subdir),elf) > > +ifeq (yes,$(build-shared)) > > +tests-special += $(objpfx)check-cet.out > > +endif > > + > > +# FIXME: Can't use all-built-dso in elf/Makefile since this file is > > +# processed before elf/Makefile. Duplicate it here. > > +cet-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \ > > + $(filter-out $(common-objpfx)linkobj/libc.so, \ > > + $(sort $(wildcard $(addprefix $(common-objpfx), \ > > + */lib*.so \ > > + iconvdata/*.so)))) > > + > > +$(cet-built-dso:=.note): %.note: % > > + @rm -f $@T > > + LC_ALL=C $(READELF) -n $< > $@T > > + test -s $@T > > + mv -f $@T $@ > > +common-generated += $(cet-built-dso:$(common-objpfx)%=%.note) > > + > > +$(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ > > + $(cet-built-dso:=.note) > > + LC_ALL=C $(AWK) -f $^ > $@; \ > > + $(evaluate-test) > > +generated += check-cet.out > > +endif # $(subdir) == elf > > +endif # $(enable) != no > > + > > do-tests-clean common-mostlyclean: tst-x86_64-1-clean > > > > .PHONY: tst-x86_64-1-clean > > diff --git a/sysdeps/x86/tst-cet-legacy-1.c b/sysdeps/x86_64/tst-cet-legacy-1.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-1.c > > rename to sysdeps/x86_64/tst-cet-legacy-1.c > > diff --git a/sysdeps/x86/tst-cet-legacy-10-static.c b/sysdeps/x86_64/tst-cet-legacy-10-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-10-static.c > > rename to sysdeps/x86_64/tst-cet-legacy-10-static.c > > diff --git a/sysdeps/x86/tst-cet-legacy-10.c b/sysdeps/x86_64/tst-cet-legacy-10.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-10.c > > rename to sysdeps/x86_64/tst-cet-legacy-10.c > > diff --git a/sysdeps/x86/tst-cet-legacy-10a-static.c b/sysdeps/x86_64/tst-cet-legacy-10a-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-10a-static.c > > rename to sysdeps/x86_64/tst-cet-legacy-10a-static.c > > diff --git a/sysdeps/x86/tst-cet-legacy-10a.c b/sysdeps/x86_64/tst-cet-legacy-10a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-10a.c > > rename to sysdeps/x86_64/tst-cet-legacy-10a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-1a.c b/sysdeps/x86_64/tst-cet-legacy-1a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-1a.c > > rename to sysdeps/x86_64/tst-cet-legacy-1a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-2.c b/sysdeps/x86_64/tst-cet-legacy-2.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-2.c > > rename to sysdeps/x86_64/tst-cet-legacy-2.c > > diff --git a/sysdeps/x86/tst-cet-legacy-2a.c b/sysdeps/x86_64/tst-cet-legacy-2a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-2a.c > > rename to sysdeps/x86_64/tst-cet-legacy-2a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-3.c b/sysdeps/x86_64/tst-cet-legacy-3.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-3.c > > rename to sysdeps/x86_64/tst-cet-legacy-3.c > > diff --git a/sysdeps/x86/tst-cet-legacy-4.c b/sysdeps/x86_64/tst-cet-legacy-4.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-4.c > > rename to sysdeps/x86_64/tst-cet-legacy-4.c > > diff --git a/sysdeps/x86/tst-cet-legacy-4a.c b/sysdeps/x86_64/tst-cet-legacy-4a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-4a.c > > rename to sysdeps/x86_64/tst-cet-legacy-4a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-4b.c b/sysdeps/x86_64/tst-cet-legacy-4b.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-4b.c > > rename to sysdeps/x86_64/tst-cet-legacy-4b.c > > diff --git a/sysdeps/x86/tst-cet-legacy-4c.c b/sysdeps/x86_64/tst-cet-legacy-4c.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-4c.c > > rename to sysdeps/x86_64/tst-cet-legacy-4c.c > > diff --git a/sysdeps/x86/tst-cet-legacy-5.c b/sysdeps/x86_64/tst-cet-legacy-5.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-5.c > > rename to sysdeps/x86_64/tst-cet-legacy-5.c > > diff --git a/sysdeps/x86/tst-cet-legacy-5a.c b/sysdeps/x86_64/tst-cet-legacy-5a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-5a.c > > rename to sysdeps/x86_64/tst-cet-legacy-5a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-5b.c b/sysdeps/x86_64/tst-cet-legacy-5b.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-5b.c > > rename to sysdeps/x86_64/tst-cet-legacy-5b.c > > diff --git a/sysdeps/x86/tst-cet-legacy-6.c b/sysdeps/x86_64/tst-cet-legacy-6.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-6.c > > rename to sysdeps/x86_64/tst-cet-legacy-6.c > > diff --git a/sysdeps/x86/tst-cet-legacy-6a.c b/sysdeps/x86_64/tst-cet-legacy-6a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-6a.c > > rename to sysdeps/x86_64/tst-cet-legacy-6a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-6b.c b/sysdeps/x86_64/tst-cet-legacy-6b.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-6b.c > > rename to sysdeps/x86_64/tst-cet-legacy-6b.c > > diff --git a/sysdeps/x86/tst-cet-legacy-7.c b/sysdeps/x86_64/tst-cet-legacy-7.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-7.c > > rename to sysdeps/x86_64/tst-cet-legacy-7.c > > diff --git a/sysdeps/x86/tst-cet-legacy-8.c b/sysdeps/x86_64/tst-cet-legacy-8.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-8.c > > rename to sysdeps/x86_64/tst-cet-legacy-8.c > > diff --git a/sysdeps/x86/tst-cet-legacy-9-static.c b/sysdeps/x86_64/tst-cet-legacy-9-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-9-static.c > > rename to sysdeps/x86_64/tst-cet-legacy-9-static.c > > diff --git a/sysdeps/x86/tst-cet-legacy-9.c b/sysdeps/x86_64/tst-cet-legacy-9.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-9.c > > rename to sysdeps/x86_64/tst-cet-legacy-9.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-1.c b/sysdeps/x86_64/tst-cet-legacy-mod-1.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-1.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-1.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-2.c b/sysdeps/x86_64/tst-cet-legacy-mod-2.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-2.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-2.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-4.c b/sysdeps/x86_64/tst-cet-legacy-mod-4.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-4.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-4.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5.c b/sysdeps/x86_64/tst-cet-legacy-mod-5.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-5.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-5.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5a.c b/sysdeps/x86_64/tst-cet-legacy-mod-5a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-5a.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-5a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5b.c b/sysdeps/x86_64/tst-cet-legacy-mod-5b.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-5b.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-5b.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-5c.c b/sysdeps/x86_64/tst-cet-legacy-mod-5c.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-5c.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-5c.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6.c b/sysdeps/x86_64/tst-cet-legacy-mod-6.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-6.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-6.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6a.c b/sysdeps/x86_64/tst-cet-legacy-mod-6a.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-6a.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-6a.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6b.c b/sysdeps/x86_64/tst-cet-legacy-mod-6b.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-6b.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-6b.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6c.c b/sysdeps/x86_64/tst-cet-legacy-mod-6c.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-6c.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-6c.c > > diff --git a/sysdeps/x86/tst-cet-legacy-mod-6d.c b/sysdeps/x86_64/tst-cet-legacy-mod-6d.c > > similarity index 100% > > rename from sysdeps/x86/tst-cet-legacy-mod-6d.c > > rename to sysdeps/x86_64/tst-cet-legacy-mod-6d.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1-extra.S b/sysdeps/x86_64/tst-shstk-legacy-1-extra.S > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1-extra.S > > rename to sysdeps/x86_64/tst-shstk-legacy-1-extra.S > > diff --git a/sysdeps/x86/tst-shstk-legacy-1a-static.c b/sysdeps/x86_64/tst-shstk-legacy-1a-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1a-static.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1a-static.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1a.c b/sysdeps/x86_64/tst-shstk-legacy-1a.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1a.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1a.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1b-static.c b/sysdeps/x86_64/tst-shstk-legacy-1b-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1b-static.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1b-static.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1b.c b/sysdeps/x86_64/tst-shstk-legacy-1b.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1b.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1b.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1c-static.c b/sysdeps/x86_64/tst-shstk-legacy-1c-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1c-static.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1c-static.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1c.c b/sysdeps/x86_64/tst-shstk-legacy-1c.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1c.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1c.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1d-static.c b/sysdeps/x86_64/tst-shstk-legacy-1d-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1d-static.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1d-static.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1d.c b/sysdeps/x86_64/tst-shstk-legacy-1d.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1d.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1d.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1e-static.c b/sysdeps/x86_64/tst-shstk-legacy-1e-static.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1e-static.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1e-static.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1e-static.sh b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1e-static.sh > > rename to sysdeps/x86_64/tst-shstk-legacy-1e-static.sh > > diff --git a/sysdeps/x86/tst-shstk-legacy-1e.c b/sysdeps/x86_64/tst-shstk-legacy-1e.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1e.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1e.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1e.sh b/sysdeps/x86_64/tst-shstk-legacy-1e.sh > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1e.sh > > rename to sysdeps/x86_64/tst-shstk-legacy-1e.sh > > diff --git a/sysdeps/x86/tst-shstk-legacy-1f.c b/sysdeps/x86_64/tst-shstk-legacy-1f.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1f.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1f.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1g.c b/sysdeps/x86_64/tst-shstk-legacy-1g.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1g.c > > rename to sysdeps/x86_64/tst-shstk-legacy-1g.c > > diff --git a/sysdeps/x86/tst-shstk-legacy-1g.sh b/sysdeps/x86_64/tst-shstk-legacy-1g.sh > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-1g.sh > > rename to sysdeps/x86_64/tst-shstk-legacy-1g.sh > > diff --git a/sysdeps/x86/tst-shstk-legacy-mod-1.c b/sysdeps/x86_64/tst-shstk-legacy-mod-1.c > > similarity index 100% > > rename from sysdeps/x86/tst-shstk-legacy-mod-1.c > > rename to sysdeps/x86_64/tst-shstk-legacy-mod-1.c > > -- > > 2.34.1 > > > > OK with the commit message typo fix. > > Thanks. > > -- > H.J. With --enable-cet on x86-64, I got make[2]: Entering directory '/export/gnu/import/git/sources/glibc/iconv' /usr/bin/install -c -m 644 ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h /usr/include/asm/prctl.h /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 make[2]: Leaving directory '/export/gnu/import/git/sources/glibc/iconv' make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 make[1]: Leaving directory '/export/gnu/import/git/sources/glibc' make: *** [Makefile:9: all] Error 2 make[2]: Entering directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' ../Makerules:327: update target '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.h' due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.stmp : ../Makeconfig:1216: update target '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.h' due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.stmp : ../Makerules:1126: update target '/usr/include/asm/prctl.h' due to: ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h force-install /usr/bin/install -c -m 644 ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h /usr/include/asm/prctl.h /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 make[2]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 make[1]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc' make: *** [Makefile:9: all] Error 2
On 09/01/24 14:59, H.J. Lu wrote: > > With --enable-cet on x86-64, I got > > make[2]: Entering directory '/export/gnu/import/git/sources/glibc/iconv' > /usr/bin/install -c -m 644 > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > /usr/include/asm/prctl.h > /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied > make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 > make[2]: Leaving directory '/export/gnu/import/git/sources/glibc/iconv' > make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 > make[1]: Leaving directory '/export/gnu/import/git/sources/glibc' > make: *** [Makefile:9: all] Error 2 > > make[2]: Entering directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' > ../Makerules:327: update target > '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.h' > due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.stmp > : > ../Makeconfig:1216: update target > '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.h' > due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.stmp > : > ../Makerules:1126: update target '/usr/include/asm/prctl.h' due to: > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > force-install > /usr/bin/install -c -m 644 > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > /usr/include/asm/prctl.h > /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied > make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 > make[2]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' > make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 > make[1]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc' > make: *** [Makefile:9: all] Error 2 I am not sure why is triggering it, maybe a stale .d file? I did test with clean build with and without --enable-cet and both 'make check' and 'make install DESTDIR=...' did not trigger any regression.
On Tue, Jan 9, 2024 at 10:13 AM Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> wrote: > > > > On 09/01/24 14:59, H.J. Lu wrote: > > > > With --enable-cet on x86-64, I got > > > > make[2]: Entering directory '/export/gnu/import/git/sources/glibc/iconv' > > /usr/bin/install -c -m 644 > > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > > /usr/include/asm/prctl.h > > /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied > > make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 > > make[2]: Leaving directory '/export/gnu/import/git/sources/glibc/iconv' > > make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 > > make[1]: Leaving directory '/export/gnu/import/git/sources/glibc' > > make: *** [Makefile:9: all] Error 2 > > > > make[2]: Entering directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' > > ../Makerules:327: update target > > '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.h' > > due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.stmp > > : > > ../Makeconfig:1216: update target > > '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.h' > > due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.stmp > > : > > ../Makerules:1126: update target '/usr/include/asm/prctl.h' due to: > > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > > force-install > > /usr/bin/install -c -m 644 > > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > > /usr/include/asm/prctl.h > > /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied > > make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 > > make[2]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' > > make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 > > make[1]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc' > > make: *** [Makefile:9: all] Error 2 > > I am not sure why is triggering it, maybe a stale .d file? I don't know. It failed with a fresh build. > I did test with clean build with and without --enable-cet and both > 'make check' and 'make install DESTDIR=...' did not trigger any > regression.
diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile index 9dfdd689a9..743b633b65 100644 --- a/sysdeps/unix/sysv/linux/x86/Makefile +++ b/sysdeps/unix/sysv/linux/x86/Makefile @@ -21,30 +21,3 @@ endif ifeq ($(subdir),setjmp) tests += tst-saved_mask-1 endif - -ifneq ($(enable-cet),no) -ifeq ($(subdir),elf) -tests += tst-cet-property-1 tst-cet-property-2 - -CFLAGS-tst-cet-property-1.o += -fcf-protection -ASFLAGS-tst-cet-property-dep-2.o += -fcf-protection - -$(objpfx)tst-cet-property-2: $(objpfx)tst-cet-property-dep-2.o -$(objpfx)tst-cet-property-2.out: $(objpfx)tst-cet-property-2 \ - $(objpfx)tst-cet-property-1.out - env $(run-program-env) $(test-via-rtld-prefix) \ - $(objpfx)tst-cet-property-2 \ - < $(objpfx)tst-cet-property-1.out > $@; \ - $(evaluate-test) -endif - -ifeq ($(subdir),posix) -tests += tst-cet-vfork-1 -CFLAGS-tst-cet-vfork-1.c += -mshstk -endif - -ifeq ($(subdir),stdlib) -tests += tst-cet-setcontext-1 -CFLAGS-tst-cet-setcontext-1.c += -mshstk -endif -endif diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile index 06b873949e..4223feb95f 100644 --- a/sysdeps/unix/sysv/linux/x86_64/Makefile +++ b/sysdeps/unix/sysv/linux/x86_64/Makefile @@ -64,3 +64,30 @@ $(objpfx)libx86-64-isa-level.so: $(objpfx)libx86-64-isa-level-1.so cp $< $@ endif endif # $(subdir) == elf + +ifneq ($(enable-cet),no) +ifeq ($(subdir),elf) +tests += tst-cet-property-1 tst-cet-property-2 + +CFLAGS-tst-cet-property-1.o += -fcf-protection +ASFLAGS-tst-cet-property-dep-2.o += -fcf-protection + +$(objpfx)tst-cet-property-2: $(objpfx)tst-cet-property-dep-2.o +$(objpfx)tst-cet-property-2.out: $(objpfx)tst-cet-property-2 \ + $(objpfx)tst-cet-property-1.out + env $(run-program-env) $(test-via-rtld-prefix) \ + $(objpfx)tst-cet-property-2 \ + < $(objpfx)tst-cet-property-1.out > $@; \ + $(evaluate-test) +endif + +ifeq ($(subdir),posix) +tests += tst-cet-vfork-1 +CFLAGS-tst-cet-vfork-1.c += -mshstk +endif + +ifeq ($(subdir),stdlib) +tests += tst-cet-setcontext-1 +CFLAGS-tst-cet-setcontext-1.c += -mshstk +endif +endif diff --git a/sysdeps/unix/sysv/linux/x86/include/asm/prctl.h b/sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h similarity index 100% rename from sysdeps/unix/sysv/linux/x86/include/asm/prctl.h rename to sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-1.c similarity index 100% rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-1.c diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c similarity index 100% rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-dep-2.S similarity index 100% rename from sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-property-dep-2.S diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-setcontext-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c similarity index 100% rename from sysdeps/unix/sysv/linux/x86/tst-cet-setcontext-1.c rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c diff --git a/sysdeps/unix/sysv/linux/x86/tst-cet-vfork-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c similarity index 100% rename from sysdeps/unix/sysv/linux/x86/tst-cet-vfork-1.c rename to sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile index 5c8ab64c4d..bf913594c1 100644 --- a/sysdeps/x86/Makefile +++ b/sysdeps/x86/Makefile @@ -93,12 +93,6 @@ endif # $(subdir) == math ifeq ($(subdir),setjmp) gen-as-const-headers += jmp_buf-ssp.sym sysdep_routines += __longjmp_cancel -ifneq ($(enable-cet),no) -tests += \ - tst-setjmp-cet \ -# tests -tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on -endif endif ifeq ($(subdir),string) @@ -139,238 +133,6 @@ CFLAGS-tst-wcscmp-rtm.c += -mrtm CFLAGS-tst-wcsncmp-rtm.c += -mrtm -Wno-error endif -ifneq ($(enable-cet),no) -ifeq ($(subdir),elf) -sysdep-dl-routines += dl-cet - -tests += \ - tst-cet-legacy-1 \ - tst-cet-legacy-1a \ - tst-cet-legacy-2 \ - tst-cet-legacy-2a \ - tst-cet-legacy-3 \ - tst-cet-legacy-4 \ - tst-cet-legacy-5a \ - tst-cet-legacy-6a \ - tst-cet-legacy-7 \ - tst-cet-legacy-8 \ - tst-cet-legacy-9 \ - tst-cet-legacy-9-static \ - tst-cet-legacy-10 \ - tst-cet-legacy-10-static \ - tst-cet-legacy-10a \ - tst-cet-legacy-10a-static \ -# tests -tests-static += \ - tst-cet-legacy-9-static \ - tst-cet-legacy-10-static \ - tst-cet-legacy-10a-static \ -# tests-static -tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd) - -tests += \ - tst-shstk-legacy-1a \ - tst-shstk-legacy-1a-static \ - tst-shstk-legacy-1b \ - tst-shstk-legacy-1b-static \ - tst-shstk-legacy-1c \ - tst-shstk-legacy-1c-static \ - tst-shstk-legacy-1d \ - tst-shstk-legacy-1d-static \ - tst-shstk-legacy-1e \ - tst-shstk-legacy-1e-static \ - tst-shstk-legacy-1f \ - tst-shstk-legacy-1g \ -# tests -modules-names += \ - tst-shstk-legacy-mod-1 \ -# modules-names -tests-static += \ - tst-shstk-legacy-1a-static \ - tst-shstk-legacy-1b-static \ - tst-shstk-legacy-1c-static \ - tst-shstk-legacy-1d-static \ - tst-shstk-legacy-1e-static \ -# tests-static -extra-objs += \ - tst-shstk-legacy-1-extra.o \ -# extra-objs - -tests += \ - tst-cet-legacy-4a \ - tst-cet-legacy-4b \ - tst-cet-legacy-4c \ - tst-cet-legacy-5b \ - tst-cet-legacy-6b \ -# tests -modules-names += \ - tst-cet-legacy-mod-1 \ - tst-cet-legacy-mod-2 \ - tst-cet-legacy-mod-4 \ - tst-cet-legacy-mod-5a \ - tst-cet-legacy-mod-5b \ - tst-cet-legacy-mod-5c \ - tst-cet-legacy-mod-6a \ - tst-cet-legacy-mod-6b \ - tst-cet-legacy-mod-6c \ -# modules-names - -CFLAGS-tst-cet-legacy-2.c += -fcf-protection=none -fcf-protection=branch -CFLAGS-tst-cet-legacy-2a.c += -fcf-protection -CFLAGS-tst-cet-legacy-mod-1.c += -fcf-protection=none -CFLAGS-tst-cet-legacy-mod-2.c += -fcf-protection=none -CFLAGS-tst-cet-legacy-3.c += -fcf-protection=none -CFLAGS-tst-cet-legacy-4.c += -fcf-protection=none -fcf-protection=branch -CPPFLAGS-tst-cet-legacy-4a.c += -DCET_IS_PERMISSIVE=1 -CFLAGS-tst-cet-legacy-4a.c += -fcf-protection -CFLAGS-tst-cet-legacy-4b.c += -fcf-protection -CFLAGS-tst-cet-legacy-mod-4.c += -fcf-protection=none -CFLAGS-tst-cet-legacy-5a.c += -fcf-protection -mshstk -ifeq ($(enable-cet),permissive) -CPPFLAGS-tst-cet-legacy-5a.c += -DCET_IS_PERMISSIVE=1 -endif -CFLAGS-tst-cet-legacy-5b.c += -fcf-protection -mshstk -CPPFLAGS-tst-cet-legacy-5b.c += -DCET_DISABLED_BY_ENV=1 -CFLAGS-tst-cet-legacy-mod-5a.c += -fcf-protection=none -fcf-protection=branch -CFLAGS-tst-cet-legacy-mod-5b.c += -fcf-protection -CFLAGS-tst-cet-legacy-mod-5c.c += -fcf-protection -CFLAGS-tst-cet-legacy-6a.c += -fcf-protection -mshstk -ifeq ($(enable-cet),permissive) -CPPFLAGS-tst-cet-legacy-6a.c += -DCET_IS_PERMISSIVE=1 -endif -CFLAGS-tst-cet-legacy-6b.c += -fcf-protection -mshstk -CPPFLAGS-tst-cet-legacy-6b.c += -DCET_DISABLED_BY_ENV=1 -CFLAGS-tst-cet-legacy-mod-6a.c += -fcf-protection=none -fcf-protection=branch -CFLAGS-tst-cet-legacy-mod-6b.c += -fcf-protection -CFLAGS-tst-cet-legacy-mod-6c.c += -fcf-protection -CFLAGS-tst-cet-legacy-7.c += -fcf-protection=none -CFLAGS-tst-cet-legacy-10.c += -mshstk -CFLAGS-tst-cet-legacy-10-static.c += -mshstk -CFLAGS-tst-cet-legacy-10a.c += -fcf-protection=none -CFLAGS-tst-cet-legacy-10a-static.c += -fcf-protection=none - -tst-cet-legacy-4-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-cet-legacy-6-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-cet-legacy-10-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-cet-legacy-10-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-cet-legacy-10a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-cet-legacy-10a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK - -CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none -CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none -CFLAGS-tst-shstk-legacy-1d.c += -fcf-protection=none -CFLAGS-tst-shstk-legacy-1d-static.c += -fcf-protection=none -CFLAGS-tst-shstk-legacy-1f.c += -fcf-protection=none - -$(objpfx)tst-cet-legacy-1: $(objpfx)tst-cet-legacy-mod-1.so \ - $(objpfx)tst-cet-legacy-mod-2.so -$(objpfx)tst-cet-legacy-1a: $(objpfx)tst-cet-legacy-mod-1.so \ - $(objpfx)tst-cet-legacy-mod-2.so -$(objpfx)tst-cet-legacy-2: $(objpfx)tst-cet-legacy-mod-2.so -$(objpfx)tst-cet-legacy-2.out: $(objpfx)tst-cet-legacy-mod-1.so -$(objpfx)tst-cet-legacy-2a: $(objpfx)tst-cet-legacy-mod-2.so -$(objpfx)tst-cet-legacy-2a.out: $(objpfx)tst-cet-legacy-mod-1.so -$(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so -$(objpfx)tst-cet-legacy-5a.out: $(objpfx)tst-cet-legacy-mod-5a.so \ - $(objpfx)tst-cet-legacy-mod-5b.so -$(objpfx)tst-cet-legacy-mod-5a.so: $(objpfx)tst-cet-legacy-mod-5c.so -$(objpfx)tst-cet-legacy-mod-5b.so: $(objpfx)tst-cet-legacy-mod-5c.so -$(objpfx)tst-cet-legacy-6a.out: $(objpfx)tst-cet-legacy-mod-6a.so \ - $(objpfx)tst-cet-legacy-mod-6b.so -$(objpfx)tst-cet-legacy-mod-6a.so: $(objpfx)tst-cet-legacy-mod-6c.so -$(objpfx)tst-cet-legacy-mod-6b.so: $(objpfx)tst-cet-legacy-mod-6c.so -LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete -$(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so -tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive -$(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so -tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on -$(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so -tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off -$(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \ - $(objpfx)tst-cet-legacy-mod-5b.so -tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK -$(objpfx)tst-cet-legacy-6b.out: $(objpfx)tst-cet-legacy-mod-6a.so \ - $(objpfx)tst-cet-legacy-mod-6b.so -tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK -tst-cet-legacy-9-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK -tst-cet-legacy-9-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK - -tst-shstk-legacy-1a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-shstk-legacy-1a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -$(objpfx)tst-shstk-legacy-1a: $(objpfx)tst-shstk-legacy-1-extra.o -$(objpfx)tst-shstk-legacy-1a-static: $(objpfx)tst-shstk-legacy-1-extra.o -tst-shstk-legacy-1b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-shstk-legacy-1b-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -$(objpfx)tst-shstk-legacy-1b: $(objpfx)tst-shstk-legacy-1-extra.o -$(objpfx)tst-shstk-legacy-1b-static: $(objpfx)tst-shstk-legacy-1-extra.o -tst-shstk-legacy-1c-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK -tst-shstk-legacy-1c-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK -$(objpfx)tst-shstk-legacy-1c: $(objpfx)tst-shstk-legacy-1-extra.o -$(objpfx)tst-shstk-legacy-1c-static: $(objpfx)tst-shstk-legacy-1-extra.o -tst-shstk-legacy-1d-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -tst-shstk-legacy-1d-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -$(objpfx)tst-shstk-legacy-1d: $(objpfx)tst-shstk-legacy-1-extra.o -$(objpfx)tst-shstk-legacy-1d-static: $(objpfx)tst-shstk-legacy-1-extra.o -$(objpfx)tst-shstk-legacy-1e: $(objpfx)tst-shstk-legacy-1-extra.o -$(objpfx)tst-shstk-legacy-1e-static: $(objpfx)tst-shstk-legacy-1-extra.o -$(objpfx)tst-shstk-legacy-1e.out: \ - $(..)/sysdeps/x86/tst-shstk-legacy-1e.sh $(objpfx)tst-shstk-legacy-1e - $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ - $(evaluate-test) -$(objpfx)tst-shstk-legacy-1e-static.out: \ - $(..)/sysdeps/x86/tst-shstk-legacy-1e-static.sh \ - $(objpfx)tst-shstk-legacy-1e-static - $(SHELL) $< $(common-objpfx) 2> $@; \ - $(evaluate-test) -tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK -$(objpfx)tst-shstk-legacy-1f: $(objpfx)tst-shstk-legacy-mod-1.so -$(objpfx)tst-shstk-legacy-mod-1.so: \ - $(objpfx)tst-shstk-legacy-mod-1.os \ - $(objpfx)tst-shstk-legacy-1-extra.os -$(objpfx)tst-shstk-legacy-1g: $(objpfx)tst-shstk-legacy-mod-1.so -$(objpfx)tst-shstk-legacy-1g.out: \ - $(..)/sysdeps/x86/tst-shstk-legacy-1g.sh $(objpfx)tst-shstk-legacy-1g - $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ - $(evaluate-test) -endif - -# Add -fcf-protection to CFLAGS when CET is enabled. -CFLAGS-.o += -fcf-protection -CFLAGS-.os += -fcf-protection -CFLAGS-.op += -fcf-protection -CFLAGS-.oS += -fcf-protection - -# Compile assembly codes with <cet.h> when CET is enabled. -asm-CPPFLAGS += -fcf-protection -include cet.h - -ifeq ($(subdir),elf) -ifeq (yes,$(build-shared)) -tests-special += $(objpfx)check-cet.out -endif - -# FIXME: Can't use all-built-dso in elf/Makefile since this file is -# processed before elf/Makefile. Duplicate it here. -cet-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \ - $(filter-out $(common-objpfx)linkobj/libc.so, \ - $(sort $(wildcard $(addprefix $(common-objpfx), \ - */lib*.so \ - iconvdata/*.so)))) - -$(cet-built-dso:=.note): %.note: % - @rm -f $@T - LC_ALL=C $(READELF) -n $< > $@T - test -s $@T - mv -f $@T $@ -common-generated += $(cet-built-dso:$(common-objpfx)%=%.note) - -$(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ - $(cet-built-dso:=.note) - LC_ALL=C $(AWK) -f $^ > $@; \ - $(evaluate-test) -generated += check-cet.out -endif -endif - ifeq ($(subdir),posix) tests += \ tst-sysconf-cache-linesize \ diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 836e03a224..98f0e04f90 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -233,6 +233,249 @@ tests += \ tst-rsi-wcslen endif + +ifeq ($(subdir),setjmp) +ifneq ($(enable-cet),no) +tests += \ + tst-setjmp-cet \ +# tests +tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on +endif +endif + + +ifneq ($(enable-cet),no) +ifeq ($(subdir),elf) +sysdep-dl-routines += dl-cet + +tests += \ + tst-cet-legacy-1 \ + tst-cet-legacy-1a \ + tst-cet-legacy-2 \ + tst-cet-legacy-2a \ + tst-cet-legacy-3 \ + tst-cet-legacy-4 \ + tst-cet-legacy-5a \ + tst-cet-legacy-6a \ + tst-cet-legacy-7 \ + tst-cet-legacy-8 \ + tst-cet-legacy-9 \ + tst-cet-legacy-9-static \ + tst-cet-legacy-10 \ + tst-cet-legacy-10-static \ + tst-cet-legacy-10a \ + tst-cet-legacy-10a-static \ +# tests +tests-static += \ + tst-cet-legacy-9-static \ + tst-cet-legacy-10-static \ + tst-cet-legacy-10a-static \ +# tests-static +tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd) + +tests += \ + tst-shstk-legacy-1a \ + tst-shstk-legacy-1a-static \ + tst-shstk-legacy-1b \ + tst-shstk-legacy-1b-static \ + tst-shstk-legacy-1c \ + tst-shstk-legacy-1c-static \ + tst-shstk-legacy-1d \ + tst-shstk-legacy-1d-static \ + tst-shstk-legacy-1e \ + tst-shstk-legacy-1e-static \ + tst-shstk-legacy-1f \ + tst-shstk-legacy-1g \ +# tests +modules-names += \ + tst-shstk-legacy-mod-1 \ +# modules-names +tests-static += \ + tst-shstk-legacy-1a-static \ + tst-shstk-legacy-1b-static \ + tst-shstk-legacy-1c-static \ + tst-shstk-legacy-1d-static \ + tst-shstk-legacy-1e-static \ +# tests-static +extra-objs += \ + tst-shstk-legacy-1-extra.o \ +# extra-objs + +tests += \ + tst-cet-legacy-4a \ + tst-cet-legacy-4b \ + tst-cet-legacy-4c \ + tst-cet-legacy-5b \ + tst-cet-legacy-6b \ +# tests +modules-names += \ + tst-cet-legacy-mod-1 \ + tst-cet-legacy-mod-2 \ + tst-cet-legacy-mod-4 \ + tst-cet-legacy-mod-5a \ + tst-cet-legacy-mod-5b \ + tst-cet-legacy-mod-5c \ + tst-cet-legacy-mod-6a \ + tst-cet-legacy-mod-6b \ + tst-cet-legacy-mod-6c \ +# modules-names + +CFLAGS-tst-cet-legacy-2.c += -fcf-protection=none -fcf-protection=branch +CFLAGS-tst-cet-legacy-2a.c += -fcf-protection +CFLAGS-tst-cet-legacy-mod-1.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-mod-2.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-3.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-4.c += -fcf-protection=none -fcf-protection=branch +CPPFLAGS-tst-cet-legacy-4a.c += -DCET_IS_PERMISSIVE=1 +CFLAGS-tst-cet-legacy-4a.c += -fcf-protection +CFLAGS-tst-cet-legacy-4b.c += -fcf-protection +CFLAGS-tst-cet-legacy-mod-4.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-5a.c += -fcf-protection -mshstk +ifeq ($(enable-cet),permissive) +CPPFLAGS-tst-cet-legacy-5a.c += -DCET_IS_PERMISSIVE=1 +endif +CFLAGS-tst-cet-legacy-5b.c += -fcf-protection -mshstk +CPPFLAGS-tst-cet-legacy-5b.c += -DCET_DISABLED_BY_ENV=1 +CFLAGS-tst-cet-legacy-mod-5a.c += -fcf-protection=none -fcf-protection=branch +CFLAGS-tst-cet-legacy-mod-5b.c += -fcf-protection +CFLAGS-tst-cet-legacy-mod-5c.c += -fcf-protection +CFLAGS-tst-cet-legacy-6a.c += -fcf-protection -mshstk +ifeq ($(enable-cet),permissive) +CPPFLAGS-tst-cet-legacy-6a.c += -DCET_IS_PERMISSIVE=1 +endif +CFLAGS-tst-cet-legacy-6b.c += -fcf-protection -mshstk +CPPFLAGS-tst-cet-legacy-6b.c += -DCET_DISABLED_BY_ENV=1 +CFLAGS-tst-cet-legacy-mod-6a.c += -fcf-protection=none -fcf-protection=branch +CFLAGS-tst-cet-legacy-mod-6b.c += -fcf-protection +CFLAGS-tst-cet-legacy-mod-6c.c += -fcf-protection +CFLAGS-tst-cet-legacy-7.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-10.c += -mshstk +CFLAGS-tst-cet-legacy-10-static.c += -mshstk +CFLAGS-tst-cet-legacy-10a.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-10a-static.c += -fcf-protection=none + +tst-cet-legacy-4-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-cet-legacy-6-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-cet-legacy-10-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-cet-legacy-10-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-cet-legacy-10a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-cet-legacy-10a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK + +CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none +CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none +CFLAGS-tst-shstk-legacy-1d.c += -fcf-protection=none +CFLAGS-tst-shstk-legacy-1d-static.c += -fcf-protection=none +CFLAGS-tst-shstk-legacy-1f.c += -fcf-protection=none + +$(objpfx)tst-cet-legacy-1: $(objpfx)tst-cet-legacy-mod-1.so \ + $(objpfx)tst-cet-legacy-mod-2.so +$(objpfx)tst-cet-legacy-1a: $(objpfx)tst-cet-legacy-mod-1.so \ + $(objpfx)tst-cet-legacy-mod-2.so +$(objpfx)tst-cet-legacy-2: $(objpfx)tst-cet-legacy-mod-2.so +$(objpfx)tst-cet-legacy-2.out: $(objpfx)tst-cet-legacy-mod-1.so +$(objpfx)tst-cet-legacy-2a: $(objpfx)tst-cet-legacy-mod-2.so +$(objpfx)tst-cet-legacy-2a.out: $(objpfx)tst-cet-legacy-mod-1.so +$(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so +$(objpfx)tst-cet-legacy-5a.out: $(objpfx)tst-cet-legacy-mod-5a.so \ + $(objpfx)tst-cet-legacy-mod-5b.so +$(objpfx)tst-cet-legacy-mod-5a.so: $(objpfx)tst-cet-legacy-mod-5c.so +$(objpfx)tst-cet-legacy-mod-5b.so: $(objpfx)tst-cet-legacy-mod-5c.so +$(objpfx)tst-cet-legacy-6a.out: $(objpfx)tst-cet-legacy-mod-6a.so \ + $(objpfx)tst-cet-legacy-mod-6b.so +$(objpfx)tst-cet-legacy-mod-6a.so: $(objpfx)tst-cet-legacy-mod-6c.so +$(objpfx)tst-cet-legacy-mod-6b.so: $(objpfx)tst-cet-legacy-mod-6c.so +LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete +$(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so +tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive +$(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so +tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on +$(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so +tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off +$(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \ + $(objpfx)tst-cet-legacy-mod-5b.so +tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK +$(objpfx)tst-cet-legacy-6b.out: $(objpfx)tst-cet-legacy-mod-6a.so \ + $(objpfx)tst-cet-legacy-mod-6b.so +tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK +tst-cet-legacy-9-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK +tst-cet-legacy-9-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK + +tst-shstk-legacy-1a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-shstk-legacy-1a-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +$(objpfx)tst-shstk-legacy-1a: $(objpfx)tst-shstk-legacy-1-extra.o +$(objpfx)tst-shstk-legacy-1a-static: $(objpfx)tst-shstk-legacy-1-extra.o +tst-shstk-legacy-1b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-shstk-legacy-1b-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +$(objpfx)tst-shstk-legacy-1b: $(objpfx)tst-shstk-legacy-1-extra.o +$(objpfx)tst-shstk-legacy-1b-static: $(objpfx)tst-shstk-legacy-1-extra.o +tst-shstk-legacy-1c-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK +tst-shstk-legacy-1c-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK +$(objpfx)tst-shstk-legacy-1c: $(objpfx)tst-shstk-legacy-1-extra.o +$(objpfx)tst-shstk-legacy-1c-static: $(objpfx)tst-shstk-legacy-1-extra.o +tst-shstk-legacy-1d-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-shstk-legacy-1d-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +$(objpfx)tst-shstk-legacy-1d: $(objpfx)tst-shstk-legacy-1-extra.o +$(objpfx)tst-shstk-legacy-1d-static: $(objpfx)tst-shstk-legacy-1-extra.o +$(objpfx)tst-shstk-legacy-1e: $(objpfx)tst-shstk-legacy-1-extra.o +$(objpfx)tst-shstk-legacy-1e-static: $(objpfx)tst-shstk-legacy-1-extra.o +$(objpfx)tst-shstk-legacy-1e.out: \ + $(..)/sysdeps/x86_64/tst-shstk-legacy-1e.sh $(objpfx)tst-shstk-legacy-1e + $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ + $(evaluate-test) +$(objpfx)tst-shstk-legacy-1e-static.out: \ + $(..)/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh \ + $(objpfx)tst-shstk-legacy-1e-static + $(SHELL) $< $(common-objpfx) 2> $@; \ + $(evaluate-test) +tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +$(objpfx)tst-shstk-legacy-1f: $(objpfx)tst-shstk-legacy-mod-1.so +$(objpfx)tst-shstk-legacy-mod-1.so: \ + $(objpfx)tst-shstk-legacy-mod-1.os \ + $(objpfx)tst-shstk-legacy-1-extra.os +$(objpfx)tst-shstk-legacy-1g: $(objpfx)tst-shstk-legacy-mod-1.so +$(objpfx)tst-shstk-legacy-1g.out: \ + $(..)/sysdeps/x86_64/tst-shstk-legacy-1g.sh $(objpfx)tst-shstk-legacy-1g + $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' 2> $@; \ + $(evaluate-test) +endif + +# Add -fcf-protection to CFLAGS when CET is enabled. +CFLAGS-.o += -fcf-protection +CFLAGS-.os += -fcf-protection +CFLAGS-.op += -fcf-protection +CFLAGS-.oS += -fcf-protection + +# Compile assembly codes with <cet.h> when CET is enabled. +asm-CPPFLAGS += -fcf-protection -include cet.h + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +tests-special += $(objpfx)check-cet.out +endif + +# FIXME: Can't use all-built-dso in elf/Makefile since this file is +# processed before elf/Makefile. Duplicate it here. +cet-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \ + $(filter-out $(common-objpfx)linkobj/libc.so, \ + $(sort $(wildcard $(addprefix $(common-objpfx), \ + */lib*.so \ + iconvdata/*.so)))) + +$(cet-built-dso:=.note): %.note: % + @rm -f $@T + LC_ALL=C $(READELF) -n $< > $@T + test -s $@T + mv -f $@T $@ +common-generated += $(cet-built-dso:$(common-objpfx)%=%.note) + +$(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ + $(cet-built-dso:=.note) + LC_ALL=C $(AWK) -f $^ > $@; \ + $(evaluate-test) +generated += check-cet.out +endif # $(subdir) == elf +endif # $(enable) != no + do-tests-clean common-mostlyclean: tst-x86_64-1-clean .PHONY: tst-x86_64-1-clean diff --git a/sysdeps/x86/tst-cet-legacy-1.c b/sysdeps/x86_64/tst-cet-legacy-1.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-1.c rename to sysdeps/x86_64/tst-cet-legacy-1.c diff --git a/sysdeps/x86/tst-cet-legacy-10-static.c b/sysdeps/x86_64/tst-cet-legacy-10-static.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-10-static.c rename to sysdeps/x86_64/tst-cet-legacy-10-static.c diff --git a/sysdeps/x86/tst-cet-legacy-10.c b/sysdeps/x86_64/tst-cet-legacy-10.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-10.c rename to sysdeps/x86_64/tst-cet-legacy-10.c diff --git a/sysdeps/x86/tst-cet-legacy-10a-static.c b/sysdeps/x86_64/tst-cet-legacy-10a-static.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-10a-static.c rename to sysdeps/x86_64/tst-cet-legacy-10a-static.c diff --git a/sysdeps/x86/tst-cet-legacy-10a.c b/sysdeps/x86_64/tst-cet-legacy-10a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-10a.c rename to sysdeps/x86_64/tst-cet-legacy-10a.c diff --git a/sysdeps/x86/tst-cet-legacy-1a.c b/sysdeps/x86_64/tst-cet-legacy-1a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-1a.c rename to sysdeps/x86_64/tst-cet-legacy-1a.c diff --git a/sysdeps/x86/tst-cet-legacy-2.c b/sysdeps/x86_64/tst-cet-legacy-2.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-2.c rename to sysdeps/x86_64/tst-cet-legacy-2.c diff --git a/sysdeps/x86/tst-cet-legacy-2a.c b/sysdeps/x86_64/tst-cet-legacy-2a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-2a.c rename to sysdeps/x86_64/tst-cet-legacy-2a.c diff --git a/sysdeps/x86/tst-cet-legacy-3.c b/sysdeps/x86_64/tst-cet-legacy-3.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-3.c rename to sysdeps/x86_64/tst-cet-legacy-3.c diff --git a/sysdeps/x86/tst-cet-legacy-4.c b/sysdeps/x86_64/tst-cet-legacy-4.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-4.c rename to sysdeps/x86_64/tst-cet-legacy-4.c diff --git a/sysdeps/x86/tst-cet-legacy-4a.c b/sysdeps/x86_64/tst-cet-legacy-4a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-4a.c rename to sysdeps/x86_64/tst-cet-legacy-4a.c diff --git a/sysdeps/x86/tst-cet-legacy-4b.c b/sysdeps/x86_64/tst-cet-legacy-4b.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-4b.c rename to sysdeps/x86_64/tst-cet-legacy-4b.c diff --git a/sysdeps/x86/tst-cet-legacy-4c.c b/sysdeps/x86_64/tst-cet-legacy-4c.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-4c.c rename to sysdeps/x86_64/tst-cet-legacy-4c.c diff --git a/sysdeps/x86/tst-cet-legacy-5.c b/sysdeps/x86_64/tst-cet-legacy-5.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-5.c rename to sysdeps/x86_64/tst-cet-legacy-5.c diff --git a/sysdeps/x86/tst-cet-legacy-5a.c b/sysdeps/x86_64/tst-cet-legacy-5a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-5a.c rename to sysdeps/x86_64/tst-cet-legacy-5a.c diff --git a/sysdeps/x86/tst-cet-legacy-5b.c b/sysdeps/x86_64/tst-cet-legacy-5b.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-5b.c rename to sysdeps/x86_64/tst-cet-legacy-5b.c diff --git a/sysdeps/x86/tst-cet-legacy-6.c b/sysdeps/x86_64/tst-cet-legacy-6.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-6.c rename to sysdeps/x86_64/tst-cet-legacy-6.c diff --git a/sysdeps/x86/tst-cet-legacy-6a.c b/sysdeps/x86_64/tst-cet-legacy-6a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-6a.c rename to sysdeps/x86_64/tst-cet-legacy-6a.c diff --git a/sysdeps/x86/tst-cet-legacy-6b.c b/sysdeps/x86_64/tst-cet-legacy-6b.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-6b.c rename to sysdeps/x86_64/tst-cet-legacy-6b.c diff --git a/sysdeps/x86/tst-cet-legacy-7.c b/sysdeps/x86_64/tst-cet-legacy-7.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-7.c rename to sysdeps/x86_64/tst-cet-legacy-7.c diff --git a/sysdeps/x86/tst-cet-legacy-8.c b/sysdeps/x86_64/tst-cet-legacy-8.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-8.c rename to sysdeps/x86_64/tst-cet-legacy-8.c diff --git a/sysdeps/x86/tst-cet-legacy-9-static.c b/sysdeps/x86_64/tst-cet-legacy-9-static.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-9-static.c rename to sysdeps/x86_64/tst-cet-legacy-9-static.c diff --git a/sysdeps/x86/tst-cet-legacy-9.c b/sysdeps/x86_64/tst-cet-legacy-9.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-9.c rename to sysdeps/x86_64/tst-cet-legacy-9.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-1.c b/sysdeps/x86_64/tst-cet-legacy-mod-1.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-1.c rename to sysdeps/x86_64/tst-cet-legacy-mod-1.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-2.c b/sysdeps/x86_64/tst-cet-legacy-mod-2.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-2.c rename to sysdeps/x86_64/tst-cet-legacy-mod-2.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-4.c b/sysdeps/x86_64/tst-cet-legacy-mod-4.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-4.c rename to sysdeps/x86_64/tst-cet-legacy-mod-4.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-5.c b/sysdeps/x86_64/tst-cet-legacy-mod-5.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-5.c rename to sysdeps/x86_64/tst-cet-legacy-mod-5.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-5a.c b/sysdeps/x86_64/tst-cet-legacy-mod-5a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-5a.c rename to sysdeps/x86_64/tst-cet-legacy-mod-5a.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-5b.c b/sysdeps/x86_64/tst-cet-legacy-mod-5b.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-5b.c rename to sysdeps/x86_64/tst-cet-legacy-mod-5b.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-5c.c b/sysdeps/x86_64/tst-cet-legacy-mod-5c.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-5c.c rename to sysdeps/x86_64/tst-cet-legacy-mod-5c.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-6.c b/sysdeps/x86_64/tst-cet-legacy-mod-6.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-6.c rename to sysdeps/x86_64/tst-cet-legacy-mod-6.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-6a.c b/sysdeps/x86_64/tst-cet-legacy-mod-6a.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-6a.c rename to sysdeps/x86_64/tst-cet-legacy-mod-6a.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-6b.c b/sysdeps/x86_64/tst-cet-legacy-mod-6b.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-6b.c rename to sysdeps/x86_64/tst-cet-legacy-mod-6b.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-6c.c b/sysdeps/x86_64/tst-cet-legacy-mod-6c.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-6c.c rename to sysdeps/x86_64/tst-cet-legacy-mod-6c.c diff --git a/sysdeps/x86/tst-cet-legacy-mod-6d.c b/sysdeps/x86_64/tst-cet-legacy-mod-6d.c similarity index 100% rename from sysdeps/x86/tst-cet-legacy-mod-6d.c rename to sysdeps/x86_64/tst-cet-legacy-mod-6d.c diff --git a/sysdeps/x86/tst-shstk-legacy-1-extra.S b/sysdeps/x86_64/tst-shstk-legacy-1-extra.S similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1-extra.S rename to sysdeps/x86_64/tst-shstk-legacy-1-extra.S diff --git a/sysdeps/x86/tst-shstk-legacy-1a-static.c b/sysdeps/x86_64/tst-shstk-legacy-1a-static.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1a-static.c rename to sysdeps/x86_64/tst-shstk-legacy-1a-static.c diff --git a/sysdeps/x86/tst-shstk-legacy-1a.c b/sysdeps/x86_64/tst-shstk-legacy-1a.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1a.c rename to sysdeps/x86_64/tst-shstk-legacy-1a.c diff --git a/sysdeps/x86/tst-shstk-legacy-1b-static.c b/sysdeps/x86_64/tst-shstk-legacy-1b-static.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1b-static.c rename to sysdeps/x86_64/tst-shstk-legacy-1b-static.c diff --git a/sysdeps/x86/tst-shstk-legacy-1b.c b/sysdeps/x86_64/tst-shstk-legacy-1b.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1b.c rename to sysdeps/x86_64/tst-shstk-legacy-1b.c diff --git a/sysdeps/x86/tst-shstk-legacy-1c-static.c b/sysdeps/x86_64/tst-shstk-legacy-1c-static.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1c-static.c rename to sysdeps/x86_64/tst-shstk-legacy-1c-static.c diff --git a/sysdeps/x86/tst-shstk-legacy-1c.c b/sysdeps/x86_64/tst-shstk-legacy-1c.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1c.c rename to sysdeps/x86_64/tst-shstk-legacy-1c.c diff --git a/sysdeps/x86/tst-shstk-legacy-1d-static.c b/sysdeps/x86_64/tst-shstk-legacy-1d-static.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1d-static.c rename to sysdeps/x86_64/tst-shstk-legacy-1d-static.c diff --git a/sysdeps/x86/tst-shstk-legacy-1d.c b/sysdeps/x86_64/tst-shstk-legacy-1d.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1d.c rename to sysdeps/x86_64/tst-shstk-legacy-1d.c diff --git a/sysdeps/x86/tst-shstk-legacy-1e-static.c b/sysdeps/x86_64/tst-shstk-legacy-1e-static.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1e-static.c rename to sysdeps/x86_64/tst-shstk-legacy-1e-static.c diff --git a/sysdeps/x86/tst-shstk-legacy-1e-static.sh b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1e-static.sh rename to sysdeps/x86_64/tst-shstk-legacy-1e-static.sh diff --git a/sysdeps/x86/tst-shstk-legacy-1e.c b/sysdeps/x86_64/tst-shstk-legacy-1e.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1e.c rename to sysdeps/x86_64/tst-shstk-legacy-1e.c diff --git a/sysdeps/x86/tst-shstk-legacy-1e.sh b/sysdeps/x86_64/tst-shstk-legacy-1e.sh similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1e.sh rename to sysdeps/x86_64/tst-shstk-legacy-1e.sh diff --git a/sysdeps/x86/tst-shstk-legacy-1f.c b/sysdeps/x86_64/tst-shstk-legacy-1f.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1f.c rename to sysdeps/x86_64/tst-shstk-legacy-1f.c diff --git a/sysdeps/x86/tst-shstk-legacy-1g.c b/sysdeps/x86_64/tst-shstk-legacy-1g.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1g.c rename to sysdeps/x86_64/tst-shstk-legacy-1g.c diff --git a/sysdeps/x86/tst-shstk-legacy-1g.sh b/sysdeps/x86_64/tst-shstk-legacy-1g.sh similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-1g.sh rename to sysdeps/x86_64/tst-shstk-legacy-1g.sh diff --git a/sysdeps/x86/tst-shstk-legacy-mod-1.c b/sysdeps/x86_64/tst-shstk-legacy-mod-1.c similarity index 100% rename from sysdeps/x86/tst-shstk-legacy-mod-1.c rename to sysdeps/x86_64/tst-shstk-legacy-mod-1.c