diff mbox series

[5/6] linux: Sync Linux 6.6 elf.h

Message ID 20231030213245.2626895-6-adhemerval.zanella@linaro.org
State Superseded
Headers show
Series Update from Linux 6.6 | expand

Commit Message

Adhemerval Zanella Oct. 30, 2023, 9:32 p.m. UTC
It adds NT_X86_SHST (2fab02b25ae7cf5), NT_RISCV_CSR/NT_RISCV_VECTOR
(9300f00439743c4), and NT_LOONGARCH_HW_BREAK/NT_LOONGARCH_HW_WATCH
(1a69f7a161a78ae).
---
 elf/elf.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Florian Weimer Oct. 31, 2023, 8:29 a.m. UTC | #1
* Adhemerval Zanella:

> It adds NT_X86_SHST (2fab02b25ae7cf5), NT_RISCV_CSR/NT_RISCV_VECTOR
> (9300f00439743c4), and NT_LOONGARCH_HW_BREAK/NT_LOONGARCH_HW_WATCH
> (1a69f7a161a78ae).
> ---
>  elf/elf.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 73a64baa79..50b73fa329 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -796,6 +796,8 @@ typedef struct
>  #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */
>  #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */
>  #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */
> +/* Old binutils treats 0x203 as a CET state */
> +#define NT_X86_SHST	0x204		/* x86 SHSTK state */
>  #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */
>  #define NT_S390_TIMER	0x301		/* s390 timer register */
>  #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator reg

That comment will be outdated soon.  I'm not sure it's helpful.
Gabriel Ravier Oct. 31, 2023, 10:21 a.m. UTC | #2
On 10/31/23 08:29, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> It adds NT_X86_SHST (2fab02b25ae7cf5), NT_RISCV_CSR/NT_RISCV_VECTOR
>> (9300f00439743c4), and NT_LOONGARCH_HW_BREAK/NT_LOONGARCH_HW_WATCH
>> (1a69f7a161a78ae).
>> ---
>>   elf/elf.h | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/elf/elf.h b/elf/elf.h
>> index 73a64baa79..50b73fa329 100644
>> --- a/elf/elf.h
>> +++ b/elf/elf.h
>> @@ -796,6 +796,8 @@ typedef struct
>>   #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */
>>   #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */
>>   #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */
>> +/* Old binutils treats 0x203 as a CET state */
>> +#define NT_X86_SHST	0x204		/* x86 SHSTK state */
>>   #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */
>>   #define NT_S390_TIMER	0x301		/* s390 timer register */
>>   #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator reg
> That comment will be outdated soon.  I'm not sure it's helpful.

For what reason will it find itself outdated ?
Florian Weimer Oct. 31, 2023, 10:37 a.m. UTC | #3
* Gabriel Ravier:

> On 10/31/23 08:29, Florian Weimer wrote:
>> * Adhemerval Zanella:
>>
>>> It adds NT_X86_SHST (2fab02b25ae7cf5), NT_RISCV_CSR/NT_RISCV_VECTOR
>>> (9300f00439743c4), and NT_LOONGARCH_HW_BREAK/NT_LOONGARCH_HW_WATCH
>>> (1a69f7a161a78ae).
>>> ---
>>>   elf/elf.h | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/elf/elf.h b/elf/elf.h
>>> index 73a64baa79..50b73fa329 100644
>>> --- a/elf/elf.h
>>> +++ b/elf/elf.h
>>> @@ -796,6 +796,8 @@ typedef struct
>>>   #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */
>>>   #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */
>>>   #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */
>>> +/* Old binutils treats 0x203 as a CET state */
>>> +#define NT_X86_SHST	0x204		/* x86 SHSTK state */
>>>   #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */
>>>   #define NT_S390_TIMER	0x301		/* s390 timer register */
>>>   #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator reg
>> That comment will be outdated soon.  I'm not sure it's helpful.
>
> For what reason will it find itself outdated ?

The binutils versions that treat this as the CET flag will age out
fairly quickly, I think.
Adhemerval Zanella Oct. 31, 2023, 2:14 p.m. UTC | #4
On 31/10/23 07:37, Florian Weimer wrote:
> * Gabriel Ravier:
> 
>> On 10/31/23 08:29, Florian Weimer wrote:
>>> * Adhemerval Zanella:
>>>
>>>> It adds NT_X86_SHST (2fab02b25ae7cf5), NT_RISCV_CSR/NT_RISCV_VECTOR
>>>> (9300f00439743c4), and NT_LOONGARCH_HW_BREAK/NT_LOONGARCH_HW_WATCH
>>>> (1a69f7a161a78ae).
>>>> ---
>>>>   elf/elf.h | 6 ++++++
>>>>   1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/elf/elf.h b/elf/elf.h
>>>> index 73a64baa79..50b73fa329 100644
>>>> --- a/elf/elf.h
>>>> +++ b/elf/elf.h
>>>> @@ -796,6 +796,8 @@ typedef struct
>>>>   #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */
>>>>   #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */
>>>>   #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */
>>>> +/* Old binutils treats 0x203 as a CET state */
>>>> +#define NT_X86_SHST	0x204		/* x86 SHSTK state */
>>>>   #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */
>>>>   #define NT_S390_TIMER	0x301		/* s390 timer register */
>>>>   #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator reg
>>> That comment will be outdated soon.  I'm not sure it's helpful.
>>
>> For what reason will it find itself outdated ?
> 
> The binutils versions that treat this as the CET flag will age out
> fairly quickly, I think.

I don't have a strong preference, I will remove it.
diff mbox series

Patch

diff --git a/elf/elf.h b/elf/elf.h
index 73a64baa79..50b73fa329 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -796,6 +796,8 @@  typedef struct
 #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */
 #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */
 #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */
+/* Old binutils treats 0x203 as a CET state */
+#define NT_X86_SHST	0x204		/* x86 SHSTK state */
 #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */
 #define NT_S390_TIMER	0x301		/* s390 timer register */
 #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator register */
@@ -834,6 +836,8 @@  typedef struct
 #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers.  */
 #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode.  */
 #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers.  */
+#define NT_RISCV_CSR	0x900		/* RISC-V Control and Status Registers */
+#define NT_RISCV_VECTOR	0x901		/* RISC-V vector registers */
 #define NT_LOONGARCH_CPUCFG	0xa00	/* LoongArch CPU config registers.  */
 #define NT_LOONGARCH_CSR	0xa01	/* LoongArch control and
 					   status registers.  */
@@ -843,6 +847,8 @@  typedef struct
 					   SIMD Extension registers.  */
 #define NT_LOONGARCH_LBT	0xa04	/* LoongArch Loongson Binary
 					   Translation registers.  */
+#define NT_LOONGARCH_HW_BREAK	0xa05   /* LoongArch hardware breakpoint registers */
+#define NT_LOONGARCH_HW_WATCH	0xa06   /* LoongArch hardware watchpoint registers */
 
 /* Legal values for the note segment descriptor types for object files.  */