linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] elf: Define note name macros
@ 2025-01-04 14:38 Akihiko Odaki
  2025-01-04 14:38 ` [PATCH v2 1/5] " Akihiko Odaki
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Akihiko Odaki @ 2025-01-04 14:38 UTC (permalink / raw)
  To: Eric Biederman, Kees Cook, Catalin Marinas, Mark Brown,
	Dave Martin, Baoquan He, Vivek Goyal, Dave Young
  Cc: linux-mm, linux-kernel, linuxppc-dev, linux-s390, kexec, devel,
	Akihiko Odaki

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.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
Changes in v2:
- Added a macro definition for each note type instead of trying to
  describe in a comment.
- Link to v1: https://lore.kernel.org/r/20241225-elf-v1-1-79e940350d50@daynix.com

---
Akihiko Odaki (5):
      elf: Define note name macros
      binfmt_elf: Use note name macros
      powwerpc: Use note name macros
      crash: Use note name macros
      crash: Remove KEXEC_CORE_NOTE_NAME

 arch/powerpc/kernel/fadump.c               |  2 +-
 arch/powerpc/platforms/powernv/opal-core.c |  8 +--
 arch/s390/kernel/crash_dump.c              |  2 +-
 fs/binfmt_elf.c                            | 21 ++++----
 fs/binfmt_elf_fdpic.c                      |  8 +--
 fs/proc/kcore.c                            | 12 ++---
 include/linux/kexec.h                      |  2 -
 include/linux/vmcore_info.h                |  3 +-
 include/uapi/linux/elf.h                   | 86 ++++++++++++++++++++++++++++--
 kernel/crash_core.c                        |  2 +-
 10 files changed, 111 insertions(+), 35 deletions(-)
---
base-commit: a32e14f8aef69b42826cf0998b068a43d486a9e9
change-id: 20241210-elf-b80ea3949c39

Best regards,
-- 
Akihiko Odaki <akihiko.odaki@daynix.com>



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-01-06 17:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-04 14:38 [PATCH v2 0/5] elf: Define note name macros Akihiko Odaki
2025-01-04 14:38 ` [PATCH v2 1/5] " Akihiko Odaki
2025-01-06  2:21   ` Baoquan He
2025-01-06  5:07     ` Akihiko Odaki
2025-01-06  6:06       ` Baoquan He
2025-01-06 14:39   ` Dave Martin
2025-01-06 16:48   ` Kees Cook
2025-01-06 17:23     ` Dave Martin
2025-01-04 14:38 ` [PATCH v2 2/5] binfmt_elf: Use " Akihiko Odaki
2025-01-04 14:38 ` [PATCH v2 3/5] powwerpc: " Akihiko Odaki
2025-01-04 14:38 ` [PATCH v2 4/5] crash: " Akihiko Odaki
2025-01-04 14:38 ` [PATCH v2 5/5] crash: Remove KEXEC_CORE_NOTE_NAME Akihiko Odaki
2025-01-06 14:51   ` Dave Martin
2025-01-06  6:07 ` [PATCH v2 0/5] elf: Define note name macros Baoquan He
2025-01-06 15:23 ` Dave Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox