Commit 836f9814 authored by Michael Holzheu's avatar Michael Holzheu Committed by Greg Kroah-Hartman

s390/kdump: Use "LINUX" ELF note name instead of "CORE"

commit a4a81d8e upstream.

In binutils/libbfd (bfd/elf.c) it is enforced that all s390 specific ELF
notes like e.g. NT_S390_PREFIX or NT_S390_CTRS have "LINUX" specified
as note name. Otherwise the notes are ignored.

For /proc/vmcore we currently use "CORE" for these notes.

Up to now this has not been a real problem because the dump analysis tool
"crash" does not check the note name. But it will break all programs that
use libbfd for processing ELF notes.

So fix this and use "LINUX" for all s390 specific notes to comply with
libbfd.
Reported-by: default avatarPhilipp Rudo <prudo@linux.vnet.ibm.com>
Reviewed-by: default avatarPhilipp Rudo <prudo@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f2659aa
...@@ -329,7 +329,11 @@ static void *nt_init_name(void *buf, Elf64_Word type, void *desc, int d_len, ...@@ -329,7 +329,11 @@ static void *nt_init_name(void *buf, Elf64_Word type, void *desc, int d_len,
static inline void *nt_init(void *buf, Elf64_Word type, void *desc, int d_len) static inline void *nt_init(void *buf, Elf64_Word type, void *desc, int d_len)
{ {
return nt_init_name(buf, type, desc, d_len, KEXEC_CORE_NOTE_NAME); const char *note_name = "LINUX";
if (type == NT_PRPSINFO || type == NT_PRSTATUS || type == NT_PRFPREG)
note_name = KEXEC_CORE_NOTE_NAME;
return nt_init_name(buf, type, desc, d_len, note_name);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment