public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: H.J. Lu <hjl@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] x86: Add NT_X86_SHSTK note
Date: Thu, 28 Dec 2023 15:52:08 +0000 (GMT)	[thread overview]
Message-ID: <20231228155208.448E53858412@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eccdc733a50980adc99178645ea4d5c2949c7e90

commit eccdc733a50980adc99178645ea4d5c2949c7e90
Author: Schimpe, Christina <christina.schimpe@intel.com>
Date:   Wed Dec 27 14:19:21 2023 +0000

    x86: Add NT_X86_SHSTK note
    
    Define NT_X86_SHSTK which is the note for x86 Shadow Stack (SHSTK) to
    support Intel SHSTK in Linux kernel.
    For now only userspace shadow stack and kernel IBT are supported by the
    linux kernel.  This note should be used instead of NT_X86_CET introduced
    in the commit "x86: Add NT_X86_CET note", as it is outdated and only
    used by old binutils versions.

Diff:
---
 binutils/readelf.c   | 2 ++
 include/elf/common.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 775106fb99c..a464692e1b7 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -20079,6 +20079,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
 	return _("NT_X86_XSTATE (x86 XSAVE extended state)");
       case NT_X86_CET:
 	return _("NT_X86_CET (x86 CET state)");
+      case NT_X86_SHSTK:
+	return _("NT_X86_SHSTK (x86 SHSTK state)");
       case NT_S390_HIGH_GPRS:
 	return _("NT_S390_HIGH_GPRS (s390 upper register halves)");
       case NT_S390_TIMER:
diff --git a/include/elf/common.h b/include/elf/common.h
index 244b13361e5..690d78010c4 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -645,6 +645,9 @@
 					/*   note name must be "LINUX".  */
 #define NT_X86_CET	0x203		/* x86 CET state.  */
 					/*   note name must be "LINUX".  */
+#define NT_X86_SHSTK	0x204		/* x86 SHSTK state.  */
+					/* This replaces NT_X86_CET (0x203).  */
+					/*   note name must be "LINUX".  */
 #define NT_S390_HIGH_GPRS 0x300		/* S/390 upper halves of GPRs  */
 					/*   note name must be "LINUX".  */
 #define NT_S390_TIMER	0x301		/* S390 timer */

                 reply	other threads:[~2023-12-28 15:52 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=20231228155208.448E53858412@sourceware.org \
    --to=hjl@sourceware.org \
    --cc=bfd-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).