]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: Add NT_X86_SHSTK note
authorSchimpe, Christina <christina.schimpe@intel.com>
Wed, 27 Dec 2023 14:19:21 +0000 (14:19 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 28 Dec 2023 15:51:14 +0000 (07:51 -0800)
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.

binutils/readelf.c
include/elf/common.h

index 775106fb99c5d8926c5e10a6e4e1f8662d60e8d4..a464692e1b785f40ceab3ab5add2531656f6aab6 100644 (file)
@@ -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:
index 244b13361e5e135058e582df06d339fb3b69ab82..690d78010c40a13e14130d9ae6990ac4523813bf 100644 (file)
                                        /*   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 */