Commit 66c2112b authored by Linus Torvalds's avatar Linus Torvalds

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
parents 38d741cb c35fe2a6
...@@ -228,10 +228,10 @@ Core dump support ...@@ -228,10 +228,10 @@ Core dump support
----------------- -----------------
The allocation tags for user memory mapped with ``PROT_MTE`` are dumped The allocation tags for user memory mapped with ``PROT_MTE`` are dumped
in the core file as additional ``PT_ARM_MEMTAG_MTE`` segments. The in the core file as additional ``PT_AARCH64_MEMTAG_MTE`` segments. The
program header for such segment is defined as: program header for such segment is defined as:
:``p_type``: ``PT_ARM_MEMTAG_MTE`` :``p_type``: ``PT_AARCH64_MEMTAG_MTE``
:``p_flags``: 0 :``p_flags``: 0
:``p_offset``: segment file offset :``p_offset``: segment file offset
:``p_vaddr``: segment virtual address, same as the corresponding :``p_vaddr``: segment virtual address, same as the corresponding
......
...@@ -95,7 +95,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset) ...@@ -95,7 +95,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
for_each_mte_vma(current, vma) { for_each_mte_vma(current, vma) {
struct elf_phdr phdr; struct elf_phdr phdr;
phdr.p_type = PT_ARM_MEMTAG_MTE; phdr.p_type = PT_AARCH64_MEMTAG_MTE;
phdr.p_offset = offset; phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start; phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0; phdr.p_paddr = 0;
......
...@@ -42,7 +42,7 @@ typedef __s64 Elf64_Sxword; ...@@ -42,7 +42,7 @@ typedef __s64 Elf64_Sxword;
/* ARM MTE memory tag segment type */ /* ARM MTE memory tag segment type */
#define PT_ARM_MEMTAG_MTE (PT_LOPROC + 0x1) #define PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 0x2)
/* /*
* Extended Numbering * Extended Numbering
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment