From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: Eric Biederman <ebiederm@xmission.com>,
Kees Cook <kees@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Mark Brown <broonie@kernel.org>,
Dave Martin <Dave.Martin@arm.com>, Baoquan He <bhe@redhat.com>,
Vivek Goyal <vgoyal@redhat.com>, Dave Young <dyoung@redhat.com>,
LEROY Christophe <christophe.leroy2@cs-soprasteria.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org,
kexec@lists.infradead.org, binutils@sourceware.org,
devel@daynix.com, Akihiko Odaki <akihiko.odaki@daynix.com>,
Heiko Carstens <hca@linux.ibm.com>
Subject: [PATCH v4 0/6] elf: Define note name macros
Date: Sat, 11 Jan 2025 14:48:43 +0900 [thread overview]
Message-ID: <20250111-elf-v4-0-b3841fa0dcd9@daynix.com> (raw)
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.
For userspace program developers
---------------------------------------------------
While the main purpose of new macros is documentation, they are also
hoped to be useful for userspace programs. Please check patch
"elf: Define note name macros" and if you have a suggestion to make it
more convenient for you, please share.
I added the Binutils mailing list to the CC as it contains code to parse
dumps. I'm also planning to share this series on LLVM Discourse.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
Changes in v4:
- s/powwerpc/powerpc/
- s/NT_INIT/nt_init/g s/NT_SIZE/nt_size/g
- Removed parentheses that have little value.
- Fixed the code alignment in get_cpu_elf_notes_size().
- Link to v3: https://lore.kernel.org/r/20250107-elf-v3-0-99cb505b1ab2@daynix.com
Changes in v3:
- Added patch "s390/crash: Use note name macros".
- Changed to interleave note name and type macros.
- Described NN_ and NT_ macros.
- Link to v2: https://lore.kernel.org/r/20250104-elf-v2-0-77dc2e06db4e@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 (6):
elf: Define note name macros
binfmt_elf: Use note name macros
powerpc: Use note name macros
crash: Use note name macros
s390/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 | 62 ++++++++-------------
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, 133 insertions(+), 73 deletions(-)
---
base-commit: a32e14f8aef69b42826cf0998b068a43d486a9e9
change-id: 20241210-elf-b80ea3949c39
Best regards,
--
Akihiko Odaki <akihiko.odaki@daynix.com>
next reply other threads:[~2025-01-11 5:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-11 5:48 Akihiko Odaki [this message]
2025-01-11 5:48 ` [PATCH v4 1/6] " Akihiko Odaki
2025-01-14 12:22 ` Dave Martin
2025-01-11 5:48 ` [PATCH v4 2/6] binfmt_elf: Use " Akihiko Odaki
2025-01-14 12:22 ` Dave Martin
2025-01-11 5:48 ` [PATCH v4 3/6] powerpc: " Akihiko Odaki
2025-01-14 12:23 ` Dave Martin
2025-01-11 5:48 ` [PATCH v4 4/6] crash: " Akihiko Odaki
2025-01-14 12:23 ` Dave Martin
2025-01-11 5:48 ` [PATCH v4 5/6] s390/crash: " Akihiko Odaki
2025-01-14 12:23 ` Dave Martin
2025-01-11 5:48 ` [PATCH v4 6/6] crash: Remove KEXEC_CORE_NOTE_NAME Akihiko Odaki
2025-01-14 12:23 ` Dave Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250111-elf-v4-0-b3841fa0dcd9@daynix.com \
--to=akihiko.odaki@daynix.com \
--cc=Dave.Martin@arm.com \
--cc=bhe@redhat.com \
--cc=binutils@sourceware.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy2@cs-soprasteria.com \
--cc=devel@daynix.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hca@linux.ibm.com \
--cc=kees@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox