elf: Define note name macros
Status from this message: Applied to for-next/execve, thanks!
Get series with b4
b4 am [email protected] change-id 20241210-elf-b80ea3949c39Versions newest first
- v5 Latest6 patches 2 repliesApplied
- v46 patches 6 repliesSuperseded
- v36 patches 10 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 5 patches | 9 replies | Superseded | |
| v1 | 1 patch | 3 replies | Superseded |
Changes in v5 from the cover letter
- Noted that patch "elf: Define note name macros" allows removing duplicate definitions of note names.
- Reordered NT_GNU_PROPERTY_TYPE_0 to precede notes used in ET_CORE to show its not specific to ET_CORE.
- Link to v4: https://lore.kernel.org/r/[email protected]
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | elf: Define note name macrosinclude/ | +84 | 1 reply | |
| 2/6 | binfmt_elf: Use note name macrosfs/ fs/ | +14 | 0 replies | |
| 3/6 | powerpc: Use note name macrosarch/ arch/ | +5 | 0 replies | |
| 4/6 | crash: Use note name macrosfs/ include/ kernel/ | +8 | 0 replies | |
| 5/6 | s390/crash: Use note name macrosarch/ | +23 | 0 replies | |
| 6/6 | crash: Remove KEXEC_CORE_NOTE_NAMEinclude/ include/ | +0 | 0 replies |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Baoquan He | Dave Martin | Heiko Carstens |
|---|---|---|---|
| 1/6 | A-b | R-b | |
| 2/6 | A-b | R-b | |
| 3/6 | A-b | R-b | |
| 4/6 | A-b | R-b | |
| 5/6 | R-b | A-b | |
| 6/6 | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v5 0/6] elf: Define note name macros
elf.h had a comment saying:
Quoted 5 lines
Notes used in
ET_CORE. Architectures export some of the arch register sets using the corresponding note types via thePTRACE_GETREGSETandPTRACE_SETREGSETrequests.
The note name for these types is "LINUX", exceptNT_PRFPREGthat 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.
---
Changes in v5:
- Noted that patch "elf: Define note name macros" allows removing duplicate definitions of note names.
- Reordered NT_GNU_PROPERTY_TYPE_0 to precede notes used in ET_CORE to show its not specific to ET_CORE.
- Link to v4: https://lore.kernel.org/r/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
---
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 | 89 ++++++++++++++++++++++++++++-- kernel/crash_core.c | 2 +- 10 files changed, 134 insertions(+), 75 deletions(-)
---
base-commit: a32e14f8aef69b42826cf0998b068a43d486a9e9
change-id: 20241210-elf-b80ea3949c39
Best regards,
Signature · 1 line
Akihiko Odaki <[email protected]>