summaryrefslogtreecommitdiff
path: root/kexec/crashdump.h
diff options
context:
space:
mode:
authorCliff Wickman <cpw@sgi.com>2010-08-23 16:18:05 -0500
committerSimon Horman <horms@verge.net.au>2010-08-24 10:22:02 +0900
commit242acd25db83d99a8f6ea48d14c215dd64f3635f (patch)
treea118d4b205885a3f3c103cd68954e4bea833d943 /kexec/crashdump.h
parent3f2012bd7947ec327dc942ab91f115388630cc36 (diff)
kexec: extend KCORE_ELF_HEADERS_SIZE for large memory
A customer has seen the kexec command exhaust its buffer for the ELF headers from /proc/kcore. It found 147 program headers, which requires a buffer of over 8k. (This overflow was on an SGI UV with an extremely large memory, hence many ram ranges.) The default buffer size of 4k is configured in KCORE_ELF_HEADERS_SIZE. The easy solution would probably be to increase the buffer to 16k. That is room for 291 entries, on x86_64. You might want to make the command dynamically enlarge the buffer when it is found to be too small, but I don't think this command's use of a little more memory is of concern. So there is probably no reason to change the program logic in this area. Diffed against kexec-tools-2.0.2 Signed-off-by: Cliff Wickman <cpw@sgi.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/crashdump.h')
-rw-r--r--kexec/crashdump.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/crashdump.h b/kexec/crashdump.h
index b6e60cc..31f711c 100644
--- a/kexec/crashdump.h
+++ b/kexec/crashdump.h
@@ -7,8 +7,8 @@ extern int get_xen_vmcoreinfo(uint64_t *addr, uint64_t *len);
/* Need to find a better way to determine per cpu notes section size. */
#define MAX_NOTE_BYTES 1024
-/* Expecting ELF headers to fit in 4K. Increase it if you need more. */
-#define KCORE_ELF_HEADERS_SIZE 4096
+/* Expecting ELF headers to fit in 16K. Increase it if you need more. */
+#define KCORE_ELF_HEADERS_SIZE 16384
/* The address of the ELF header is passed to the secondary kernel
* using the kernel command line option memmap=nnn.
* The smallest unit the kernel accepts is in kilobytes,