summaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorPhilipp Rudo <prudo@linux.ibm.com>2018-07-19 11:13:45 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-07-31 17:43:43 +0200
commit8cce437fbb5c1f2af2f63834fa05082596beca5d (patch)
tree9350eed87fba41b5f7fee8744a079040cba4b6ae /.clang-format
parent5223c671674c507cc9bcabdfc5a9b449c178330a (diff)
downloadlinux-8cce437fbb5c1f2af2f63834fa05082596beca5d.tar.bz2
s390/kdump: Fix elfcorehdr size calculation
Before the memory for the elfcorehdr is allocated the required size is estimated with alloc_size = 0x1000 + get_cpu_cnt() * 0x4a0 + mem_chunk_cnt * sizeof(Elf64_Phdr); Where 0x4a0 is used as size for the ELF notes to store the register contend. This size is 8 bytes too small. Usually this does not immediately cause a problem because the page reserved for overhead (Elf_Ehdr, vmcoreinfo, etc.) is pretty generous. So usually there is enough spare memory to counter the mis-calculated per cpu size. However, with growing overhead and/or a huge cpu count the allocated size gets too small for the elfcorehdr. Ultimately a BUG_ON is triggered causing the crash kernel to panic. Fix this by properly calculating the required size instead of relying on magic numbers. Fixes: a62bc07392539 ("s390/kdump: add support for vector extension") Signed-off-by: Philipp Rudo <prudo@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions