aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2017-02-07 12:09:14 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-02-17 01:40:25 -0500
commita4a81d8eebdc1d209d034f62a082a5131e4242b5 (patch)
treea275f4fbae1f20d2abbd847d74ff17d3cdd7bbb4
parent57d7f939e7bdd746992f5c318a78697ba837c523 (diff)
s390/kdump: Use "LINUX" ELF note name instead of "CORE"
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. Cc: stable@vger.kernel.org # v4.4+ Reported-by: Philipp Rudo <prudo@linux.vnet.ibm.com> Reviewed-by: Philipp Rudo <prudo@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/crash_dump.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c
index f9293bfefb7f..408b4f4fda0f 100644
--- a/arch/s390/kernel/crash_dump.c
+++ b/arch/s390/kernel/crash_dump.c
@@ -329,7 +329,11 @@ static void *nt_init_name(void *buf, Elf64_Word type, void *desc, int d_len,
329 329
330static inline void *nt_init(void *buf, Elf64_Word type, void *desc, int d_len) 330static inline void *nt_init(void *buf, Elf64_Word type, void *desc, int d_len)
331{ 331{
332 return nt_init_name(buf, type, desc, d_len, KEXEC_CORE_NOTE_NAME); 332 const char *note_name = "LINUX";
333
334 if (type == NT_PRPSINFO || type == NT_PRSTATUS || type == NT_PRFPREG)
335 note_name = KEXEC_CORE_NOTE_NAME;
336 return nt_init_name(buf, type, desc, d_len, note_name);
333} 337}
334 338
335/* 339/*