Skip to content

Commit 66c2112

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Will Deacon: "Rename and reallocate the PT_ARM_MEMTAG_MTE ELF segment type. This is a fix to the MTE ELF ABI for a bug that was added during the most recent merge window as part of the coredump support. The issue is that the value assigned to the new PT_ARM_MEMTAG_MTE segment type has already been allocated to PT_AARCH64_UNWIND by the ELF ABI, so we've bumped the value and changed the name of the identifier to be better aligned with the existing one" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: elf: Fix the arm64 MTE ELF segment name and value
2 parents 38d741c + c35fe2a commit 66c2112

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Documentation/arm64/memory-tagging-extension.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ Core dump support
228228
-----------------
229229

230230
The allocation tags for user memory mapped with ``PROT_MTE`` are dumped
231-
in the core file as additional ``PT_ARM_MEMTAG_MTE`` segments. The
231+
in the core file as additional ``PT_AARCH64_MEMTAG_MTE`` segments. The
232232
program header for such segment is defined as:
233233

234-
:``p_type``: ``PT_ARM_MEMTAG_MTE``
234+
:``p_type``: ``PT_AARCH64_MEMTAG_MTE``
235235
:``p_flags``: 0
236236
:``p_offset``: segment file offset
237237
:``p_vaddr``: segment virtual address, same as the corresponding

arch/arm64/kernel/elfcore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
9595
for_each_mte_vma(current, vma) {
9696
struct elf_phdr phdr;
9797

98-
phdr.p_type = PT_ARM_MEMTAG_MTE;
98+
phdr.p_type = PT_AARCH64_MEMTAG_MTE;
9999
phdr.p_offset = offset;
100100
phdr.p_vaddr = vma->vm_start;
101101
phdr.p_paddr = 0;

include/uapi/linux/elf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef __s64 Elf64_Sxword;
4242

4343

4444
/* ARM MTE memory tag segment type */
45-
#define PT_ARM_MEMTAG_MTE (PT_LOPROC + 0x1)
45+
#define PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 0x2)
4646

4747
/*
4848
* Extended Numbering

0 commit comments

Comments
 (0)