aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/elfcore.c
diff options
context:
space:
mode:
authorCatalin Marinas <[email protected]>2022-04-25 16:18:33 +0100
committerWill Deacon <[email protected]>2022-04-28 11:37:06 +0100
commitc35fe2a68f29a0bda15ae994154cacaae5f69791 (patch)
tree123bc1df66adb383b774cde5cf4be32ff3839d24 /arch/arm64/kernel/elfcore.c
parent23bc8f69f0eceecbb87c3801d2e48827d2dca92b (diff)
elf: Fix the arm64 MTE ELF segment name and value
Unfortunately, the name/value choice for the MTE ELF segment type (PT_ARM_MEMTAG_MTE) was pretty poor: LOPROC+1 is already in use by PT_AARCH64_UNWIND, as defined in the AArch64 ELF ABI (https://github.com/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst). Update the ELF segment type value to LOPROC+2 and also change the define to PT_AARCH64_MEMTAG_MTE to match the AArch64 ELF ABI namespace. The AArch64 ELF ABI document is updating accordingly (segment type not previously mentioned in the document). Signed-off-by: Catalin Marinas <[email protected]> Fixes: 761b9b366cec ("elf: Introduce the ARM MTE ELF segment type") Cc: Will Deacon <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Eric Biederman <[email protected]> Cc: Kees Cook <[email protected]> Cc: Luis Machado <[email protected]> Cc: Richard Earnshaw <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'arch/arm64/kernel/elfcore.c')
-rw-r--r--arch/arm64/kernel/elfcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/elfcore.c b/arch/arm64/kernel/elfcore.c
index 2b3f3d0544b9..98d67444a5b6 100644
--- a/arch/arm64/kernel/elfcore.c
+++ b/arch/arm64/kernel/elfcore.c
@@ -95,7 +95,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
for_each_mte_vma(current, vma) {
struct elf_phdr phdr;
- phdr.p_type = PT_ARM_MEMTAG_MTE;
+ phdr.p_type = PT_AARCH64_MEMTAG_MTE;
phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0;