public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] readelf: Support NT_X86_CET
@ 2020-09-10 22:53 H.J. Lu
  2020-09-10 22:57 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2020-09-10 22:53 UTC (permalink / raw)
  To: binutils

	* readelf.c (get_note_type): Support NT_X86_CET.
---
 binutils/readelf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/binutils/readelf.c b/binutils/readelf.c
index cb4208f7b9..95720ea055 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -17953,6 +17953,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
 	return _("NT_386_IOPERM (x86 I/O permissions)");
       case NT_X86_XSTATE:
 	return _("NT_X86_XSTATE (x86 XSAVE extended state)");
+      case NT_X86_CET:
+	return _("NT_X86_CET (x86 CET state)");
       case NT_S390_HIGH_GPRS:
 	return _("NT_S390_HIGH_GPRS (s390 upper register halves)");
       case NT_S390_TIMER:
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] readelf: Support NT_X86_CET
  2020-09-10 22:53 [PATCH] readelf: Support NT_X86_CET H.J. Lu
@ 2020-09-10 22:57 ` H.J. Lu
  2020-09-11 12:49   ` [PATCH] x86: Add NT_X86_CET note H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2020-09-10 22:57 UTC (permalink / raw)
  To: Binutils

On Thu, Sep 10, 2020 at 3:53 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
>         * readelf.c (get_note_type): Support NT_X86_CET.
> ---
>  binutils/readelf.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index cb4208f7b9..95720ea055 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -17953,6 +17953,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
>         return _("NT_386_IOPERM (x86 I/O permissions)");
>        case NT_X86_XSTATE:
>         return _("NT_X86_XSTATE (x86 XSAVE extended state)");
> +      case NT_X86_CET:
> +       return _("NT_X86_CET (x86 CET state)");
>        case NT_S390_HIGH_GPRS:
>         return _("NT_S390_HIGH_GPRS (s390 upper register halves)");
>        case NT_S390_TIMER:
> --
> 2.26.2
>

Never mind.  This needs NT_X86_CET from the kernel.

-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] x86: Add NT_X86_CET note
  2020-09-10 22:57 ` H.J. Lu
@ 2020-09-11 12:49   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2020-09-11 12:49 UTC (permalink / raw)
  To: Binutils

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

On Thu, Sep 10, 2020 at 3:57 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Sep 10, 2020 at 3:53 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> >         * readelf.c (get_note_type): Support NT_X86_CET.
> > ---
> >  binutils/readelf.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/binutils/readelf.c b/binutils/readelf.c
> > index cb4208f7b9..95720ea055 100644
> > --- a/binutils/readelf.c
> > +++ b/binutils/readelf.c
> > @@ -17953,6 +17953,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
> >         return _("NT_386_IOPERM (x86 I/O permissions)");
> >        case NT_X86_XSTATE:
> >         return _("NT_X86_XSTATE (x86 XSAVE extended state)");
> > +      case NT_X86_CET:
> > +       return _("NT_X86_CET (x86 CET state)");
> >        case NT_S390_HIGH_GPRS:
> >         return _("NT_S390_HIGH_GPRS (s390 upper register halves)");
> >        case NT_S390_TIMER:
> > --
> > 2.26.2
> >
>
> Never mind.  This needs NT_X86_CET from the kernel.

Here is the patch I am checking in.

-- 
H.J.

[-- Attachment #2: 0001-x86-Add-NT_X86_CET-note.patch --]
[-- Type: text/x-patch, Size: 1682 bytes --]

From d5e04b96d0223ac2faf7797a06bd9037bb8cd0dc Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 10 Sep 2020 11:13:05 -0700
Subject: [PATCH] x86: Add NT_X86_CET note

Define NT_X86_CET which is the proposed note for CET state to support
Intel CET in Linux kernel.  Will double check it after Intel CET patches
have been merged into Linux kernel.

binutils/

	* readelf.c (get_note_type): Support NT_X86_CET.

include/

	* elf/common.h (NT_X86_CET): New.
---
 binutils/readelf.c   | 2 ++
 include/elf/common.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/binutils/readelf.c b/binutils/readelf.c
index cb4208f7b9..95720ea055 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -17953,6 +17953,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
 	return _("NT_386_IOPERM (x86 I/O permissions)");
       case NT_X86_XSTATE:
 	return _("NT_X86_XSTATE (x86 XSAVE extended state)");
+      case NT_X86_CET:
+	return _("NT_X86_CET (x86 CET 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 805058146a..571e21af29 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -619,6 +619,8 @@
 					/*   note name must be "LINUX".  */
 #define NT_X86_XSTATE	0x202		/* x86 XSAVE extended state */
 					/*   note name must be "LINUX".  */
+#define NT_X86_CET	0x203		/* x86 CET state.  */
+					/*   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 */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-11 12:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 22:53 [PATCH] readelf: Support NT_X86_CET H.J. Lu
2020-09-10 22:57 ` H.J. Lu
2020-09-11 12:49   ` [PATCH] x86: Add NT_X86_CET note H.J. Lu

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).