diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-07-30 16:14:46 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-07-30 16:15:38 -0700 |
commit | 98864ed0e055583707e37cdb7d41a9cdeac4473b (patch) | |
tree | acf6ed5508969c54b0489b917d40df7e9a79236e /grp | |
parent | c92a00d865638cebcfd13cfe0c3e811f565fe43b (diff) | |
download | glibc-98864ed0e055583707e37cdb7d41a9cdeac4473b.tar.gz glibc-98864ed0e055583707e37cdb7d41a9cdeac4473b.tar.xz glibc-98864ed0e055583707e37cdb7d41a9cdeac4473b.zip |
x86/CET: Fix property note parser [BZ #23467]
GNU_PROPERTY_X86_FEATURE_1_AND may not be the first property item. We need to check each property item until we reach the end of the property or find GNU_PROPERTY_X86_FEATURE_1_AND. This patch adds 2 tests. The first test checks if IBT is enabled and the second test reads the output from the first test to check if IBT is is enabled. The second second test fails if IBT isn't enabled properly. Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ #23467] * sysdeps/unix/sysv/linux/x86/Makefile (tests): Add tst-cet-property-1 and tst-cet-property-2 if CET is enabled. (CFLAGS-tst-cet-property-1.o): New. (ASFLAGS-tst-cet-property-dep-2.o): Likewise. ($(objpfx)tst-cet-property-2): Likewise. ($(objpfx)tst-cet-property-2.out): Likewise. * sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c: New file. * sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c: Likewise. * sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S: Likewise. * sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Parse each property item until GNU_PROPERTY_X86_FEATURE_1_AND is found.
Diffstat (limited to 'grp')
0 files changed, 0 insertions, 0 deletions