[PATCH v3 3/6] powwerpc: Use note name macros

2025-01-07 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Acked-by: Baoquan He Signed-off-by: Akihiko Odaki --- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH v3 1/6] elf: Define note name macros

2025-01-07 Thread Akihiko Odaki
t; 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:

[PATCH v3 2/6] binfmt_elf: Use note name macros

2025-01-07 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He --- fs/binfmt_elf.c | 21 ++--- fs/binfmt_elf_fdpic.c | 8 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/fs/binfmt_elf.c

[PATCH v3 0/6] elf: Define note name macros

2025-01-07 Thread Akihiko Odaki
r 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 --- Changes in v3: - Added patch "s390/crash: Use note name macros". - Changed to interleave

[PATCH v3 4/6] crash: Use note name macros

2025-01-07 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He --- fs/proc/kcore.c | 12 ++-- include/linux/vmcore_info.h | 2 +- kernel/crash_core.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)

[PATCH v3 6/6] crash: Remove KEXEC_CORE_NOTE_NAME

2025-01-07 Thread Akihiko Odaki
KEXEC_CORE_NOTE_NAME is no longer used. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He --- include/linux/kexec.h | 2 -- include/linux/vmcore_info.h | 1 - 2 files changed, 3 deletions(-) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index f0e9f8eda7a3..c840431eadda

[PATCH v3 5/6] s390/crash: Use note name macros

2025-01-07 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki --- arch/s390/kernel/crash_dump.c | 62 --- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/k

Re: [PATCH v2 1/5] elf: Define note name macros

2025-01-05 Thread Akihiko Odaki
On 2025/01/06 11:21, Baoquan He wrote: On 01/04/25 at 11:38pm, Akihiko Odaki wrote: 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

Re: [PATCH v3 5/6] s390/crash: Use note name macros

2025-01-08 Thread Akihiko Odaki
On 2025/01/08 22:50, Dave Martin wrote: On Wed, Jan 08, 2025 at 01:53:51PM +0900, Akihiko Odaki wrote: On 2025/01/08 1:17, Dave Martin wrote: Hi, On Tue, Jan 07, 2025 at 09:45:56PM +0900, Akihiko Odaki wrote: Use note name macros to match with the userspace's expectation. Signed-o

[PATCH v4 1/6] elf: Define note name macros

2025-01-10 Thread Akihiko Odaki
t; 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:

[PATCH v4 2/6] binfmt_elf: Use note name macros

2025-01-10 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He --- fs/binfmt_elf.c | 21 ++--- fs/binfmt_elf_fdpic.c | 8 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/fs/binfmt_elf.c

[PATCH v4 0/6] elf: Define note name macros

2025-01-10 Thread Akihiko Odaki
r 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 --- Changes in v4: - s/powwerpc/powerpc/ - s/NT_INIT/nt_init/g s/NT_SIZE/nt_size/g - Rem

[PATCH v4 6/6] crash: Remove KEXEC_CORE_NOTE_NAME

2025-01-10 Thread Akihiko Odaki
KEXEC_CORE_NOTE_NAME is no longer used. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He --- include/linux/kexec.h | 2 -- include/linux/vmcore_info.h | 1 - 2 files changed, 3 deletions(-) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index f0e9f8eda7a3..c840431eadda

[PATCH v4 4/6] crash: Use note name macros

2025-01-10 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He --- fs/proc/kcore.c | 12 ++-- include/linux/vmcore_info.h | 2 +- kernel/crash_core.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)

[PATCH v4 5/6] s390/crash: Use note name macros

2025-01-10 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Heiko Carstens --- arch/s390/kernel/crash_dump.c | 62 --- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/arch/s390/k

[PATCH v4 3/6] powerpc: Use note name macros

2025-01-10 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Acked-by: Baoquan He Signed-off-by: Akihiko Odaki --- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH v2 5/5] crash: Remove KEXEC_CORE_NOTE_NAME

2025-01-04 Thread Akihiko Odaki
Now KEXEC_CORE_NOTE_NAME is only used at one place and it does not seem to provide any value anymore. Replace the remaining usage with the literal and remove the macro. Signed-off-by: Akihiko Odaki --- arch/s390/kernel/crash_dump.c | 2 +- include/linux/kexec.h | 2 -- include/linux

[PATCH v2 0/5] elf: Define note name macros

2025-01-04 Thread Akihiko Odaki
t; 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-of

[PATCH v2 1/5] elf: Define note name macros

2025-01-04 Thread Akihiko Odaki
t; 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-of

[PATCH v2 3/5] powwerpc: Use note name macros

2025-01-04 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki --- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/k

[PATCH v2 4/5] crash: Use note name macros

2025-01-04 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki --- fs/proc/kcore.c | 12 ++-- include/linux/vmcore_info.h | 2 +- kernel/crash_core.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs

[PATCH v2 2/5] binfmt_elf: Use note name macros

2025-01-04 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki --- fs/binfmt_elf.c | 21 ++--- fs/binfmt_elf_fdpic.c | 8 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c

[PATCH v5 6/6] crash: Remove KEXEC_CORE_NOTE_NAME

2025-01-14 Thread Akihiko Odaki
KEXEC_CORE_NOTE_NAME is no longer used. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He Reviewed-by: Dave Martin --- include/linux/kexec.h | 2 -- include/linux/vmcore_info.h | 1 - 2 files changed, 3 deletions(-) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index

[PATCH v5 1/6] elf: Define note name macros

2025-01-14 Thread Akihiko Odaki
eir duplicate definitions of note names. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He --- include/uapi/linux/elf.h | 89 +--- 1 file changed, 84 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index b44

[PATCH v5 0/6] elf: Define note name macros

2025-01-14 Thread Akihiko Odaki
r 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 --- Changes in v5: - Noted that patch "elf: Define note name macros" allows removing duplicat

[PATCH v5 2/6] binfmt_elf: Use note name macros

2025-01-14 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He Reviewed-by: Dave Martin --- fs/binfmt_elf.c | 21 ++--- fs/binfmt_elf_fdpic.c | 8 2 files changed, 14 insertions(+), 15 deletions(-) diff

[PATCH v5 5/6] s390/crash: Use note name macros

2025-01-14 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Heiko Carstens Reviewed-by: Dave Martin --- arch/s390/kernel/crash_dump.c | 62 --- 1 file changed, 23 insertions(+), 39 deletions(-) diff --

[PATCH v5 4/6] crash: Use note name macros

2025-01-14 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He Reviewed-by: Dave Martin --- fs/proc/kcore.c | 12 ++-- include/linux/vmcore_info.h | 2 +- kernel/crash_core.c | 2 +- 3 files changed, 8 inser

[PATCH v5 3/6] powerpc: Use note name macros

2025-01-14 Thread Akihiko Odaki
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki Acked-by: Baoquan He Reviewed-by: Dave Martin --- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 8 2 files changed, 5 insertions(

Re: [PATCH v3 5/6] s390/crash: Use note name macros

2025-01-07 Thread Akihiko Odaki
On 2025/01/08 1:17, Dave Martin wrote: Hi, On Tue, Jan 07, 2025 at 09:45:56PM +0900, Akihiko Odaki wrote: Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki --- arch/s390/kernel/crash_dump.c | 62 --- 1

Re: [PATCH v3 2/6] binfmt_elf: Use note name macros

2025-01-07 Thread Akihiko Odaki
On 2025/01/08 1:18, Dave Martin wrote: On Tue, Jan 07, 2025 at 09:45:53PM +0900, Akihiko Odaki wrote: Use note name macros to match with the userspace's expectation. Also (and more importantly) get rid of duplicated knowledge about the mapping of note types to note names, so that elf.h i