Commit 0331460e authored by Catalin Marinas's avatar Catalin Marinas Committed by Suren Baghdasaryan
Browse files

UPSTREAM: 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: default avatarCatalin Marinas <catalin.marinas@arm.com>
Fixes: 761b9b36 ("elf: Introduce the ARM MTE ELF segment type")
Cc: Will Deacon <will@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Machado <luis.machado@arm.com>
Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>
Link: https://lore.kernel.org/r/20220425151833.2603830-1-catalin.marinas@arm.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>

(cherry picked from commit c35fe2a6)
Bug: 236350065
Signed-off-by: default avatarYee <Lee&lt;yee.lee@mediatek.com>
Change-Id: Ib225128b2ab20cff5fbfc728a99b39e40bf4aebd
parent 1a0fcd51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment