public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: H.J. Lu <hjl@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] x86/cet: Check CPU_FEATURE_ACTIVE when CET is disabled
Date: Tue, 19 Dec 2023 14:58:27 +0000 (GMT)	[thread overview]
Message-ID: <20231219145827.4AB5E3857437@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=71c0cc3357fe6d72f1dbef1c695e54b117d91b96

commit 71c0cc3357fe6d72f1dbef1c695e54b117d91b96
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Mar 10 13:18:10 2023 -0800

    x86/cet: Check CPU_FEATURE_ACTIVE when CET is disabled
    
    Verify that CPU_FEATURE_ACTIVE (SHSTK) works properly when CET is
    disabled.

Diff:
---
 sysdeps/x86/Makefile                    | 5 +++++
 sysdeps/x86/tst-cet-legacy-10a-static.c | 2 ++
 sysdeps/x86/tst-cet-legacy-10a.c        | 2 ++
 3 files changed, 9 insertions(+)

diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
index a41598adf9..23f3ac1430 100644
--- a/sysdeps/x86/Makefile
+++ b/sysdeps/x86/Makefile
@@ -156,10 +156,13 @@ tests += \
   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)
 
@@ -226,6 +229,8 @@ 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
 
 CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none
 CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none
diff --git a/sysdeps/x86/tst-cet-legacy-10a-static.c b/sysdeps/x86/tst-cet-legacy-10a-static.c
new file mode 100644
index 0000000000..05073a5d1e
--- /dev/null
+++ b/sysdeps/x86/tst-cet-legacy-10a-static.c
@@ -0,0 +1,2 @@
+#pragma GCC target ("shstk")
+#include "tst-cet-legacy-10.c"
diff --git a/sysdeps/x86/tst-cet-legacy-10a.c b/sysdeps/x86/tst-cet-legacy-10a.c
new file mode 100644
index 0000000000..05073a5d1e
--- /dev/null
+++ b/sysdeps/x86/tst-cet-legacy-10a.c
@@ -0,0 +1,2 @@
+#pragma GCC target ("shstk")
+#include "tst-cet-legacy-10.c"

                 reply	other threads:[~2023-12-19 14:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231219145827.4AB5E3857437@sourceware.org \
    --to=hjl@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).