diff mbox series

[2/5] elf: Introduce the ARM MTE ELF segment type

Message ID 20211208121941.494956-3-catalin.marinas@arm.com (mailing list archive)
State New, archived
Headers show
Series arm64: mte: add core dump support | expand

Commit Message

Catalin Marinas Dec. 8, 2021, 12:19 p.m. UTC
Memory tags will be dumped in the core file as segments with their own
type. Discussions with the binutils and the generic ABI community
settled on using new definitions in the PT_*PROC space (and to be
documented in the processor-specific ABIs).

Introduce PT_ARM_MEMTAG_MTE as (PT_LOPROC + 0x1). Not included in this
patch since there is no upstream support but the CHERI/BSD community
will also reserve:

  #define PT_ARM_MEMTAG_CHERI    (PT_LOPROC + 0x2)
  #define PT_RISCV_MEMTAG_CHERI  (PT_LOPROC + 0x3)

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 include/uapi/linux/elf.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Luis Machado Jan. 3, 2022, 5:28 p.m. UTC | #1
On 12/8/21 9:19 AM, Catalin Marinas wrote:
> Memory tags will be dumped in the core file as segments with their own
> type. Discussions with the binutils and the generic ABI community
> settled on using new definitions in the PT_*PROC space (and to be
> documented in the processor-specific ABIs).
> 
> Introduce PT_ARM_MEMTAG_MTE as (PT_LOPROC + 0x1). Not included in this
> patch since there is no upstream support but the CHERI/BSD community
> will also reserve:
> 
>    #define PT_ARM_MEMTAG_CHERI    (PT_LOPROC + 0x2)
>    #define PT_RISCV_MEMTAG_CHERI  (PT_LOPROC + 0x3)
> 
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> ---
>   include/uapi/linux/elf.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
> index 61bf4774b8f2..fe8e5b74cb39 100644
> --- a/include/uapi/linux/elf.h
> +++ b/include/uapi/linux/elf.h
> @@ -40,6 +40,9 @@ typedef __s64	Elf64_Sxword;
>   
>   #define PT_GNU_STACK	(PT_LOOS + 0x474e551)
>   
> +/* ARM MTE memory tag segment type */
> +#define PT_ARM_MEMTAG_MTE	(PT_LOPROC + 0x1)
> +
>   /*
>    * Extended Numbering
>    *
> 

Sorry for the delay. This looks good from the debugger's side.

Acked-by: Luis Machado <luis.machado@linaro.org>
diff mbox series

Patch

diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index 61bf4774b8f2..fe8e5b74cb39 100644
--- a/include/uapi/linux/elf.h
+++ b/include/uapi/linux/elf.h
@@ -40,6 +40,9 @@  typedef __s64	Elf64_Sxword;
 
 #define PT_GNU_STACK	(PT_LOOS + 0x474e551)
 
+/* ARM MTE memory tag segment type */
+#define PT_ARM_MEMTAG_MTE	(PT_LOPROC + 0x1)
+
 /*
  * Extended Numbering
  *