]> www.infradead.org Git - users/jedix/linux-maple.git/commit
elf: Define note name macros
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Wed, 15 Jan 2025 05:47:58 +0000 (14:47 +0900)
committerKees Cook <kees@kernel.org>
Tue, 11 Feb 2025 00:47:07 +0000 (16:47 -0800)
commit7da8e4ad4df0dd12f37357af62ce1b63e75ae2e6
tree26e027e8edacfd38d732bfe0245dae5cc687bd06
parenta64dcfb451e254085a7daee5fe51bf22959d52d3
elf: Define note name macros

elf.h had a comment saying:
> Notes used in ET_CORE. Architectures export some of the arch register
> sets using the corresponding note types via the PTRACE_GETREGSET and
> PTRACE_SETREGSET requests.
> The note name for these types is "LINUX", except NT_PRFPREG that is
> named "CORE".

However, NT_PRSTATUS is also named "CORE". It is also unclear what
"these types" refers to.

To fix these problems, define a name for each note type. The added
definitions are macros so the kernel and userspace can directly refer to
them to remove their duplicate definitions of note names.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Link: https://lore.kernel.org/r/20250115-elf-v5-1-0f9e55bbb2fc@daynix.com
Signed-off-by: Kees Cook <kees@kernel.org>
include/uapi/linux/elf.h