summaryrefslogtreecommitdiff
path: root/vmcore-dmesg/Makefile
AgeCommit message (Collapse)Author
2019-01-09util_lib: Add functionality to read elf notesBhupesh Sharma
'vmcore-dmesg.c' already implements functionality to read 'vmcoreinfo' from vmcore file. The same can be used in other features as well (one of which is reading the elf notes from 'kcore' file), so there is merit in moving this to the utility libraries (util_lib). Newer kernel versions (>= 4.19, with commit 23c85094fe1895caefdd ["proc/kcore: add vmcoreinfo note to /proc/kcore"], available), have 'kcore' which now contains a new PT_NOTE which carries the VMCOREINFO information. If the same is available, we can benefit by using it in 'kexec-tools'. This is especially useful for architectures like arm64 as we can get kernel symbols like 'PHYS_OFFSET' from the '/proc/kcore' itself and use it to calculate 'phys_offset' before we make a call to 'set_phys_offset()'. For older kernels, we can try and determine the PHYS_OFFSET value from PT_LOAD segments inside 'kcore' via some jugglery of the correct virtual and physical address combinations. Subsequent patch(es) in this series will use the same feature to read the 'kcore' file. This patch also makes some of the functions which were earlier present in 'vmcore-dmesg.c' as non-static, so as to allow future patches to use them as library functions. Also we add the capability to read 'NUMBER(PHYS_OFFSET)' from vmcoreinfo to the already present 'scan_vmcoreinfo()' code. Future patches can look at reading more vmcoreinfo information (for e.g. 'kaslr_offset()' for x86_64 and arm64) by using the same framework. Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2012-02-08Fix out-of-tree buildTyler Hall
Use automatic variables for prerequisites when copying man pages and include a makefile relative to $(srcdir). Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2010-09-09kexec-tools: Add vmcore-dmesgEric W. Biederman
vmcore-dmesg is a trivial utility to extract the dmesg from a vmcore. This was written in reaction to problems I was having building makedumpfile, and using makedumpfile for extracting dmesg. makedumpfile does a whole lot of things, uses a whole lot of libraries and which make it hard to compile and a little bit clunky to remember the command line switches. So I have written the trivial vmcore-dmesg program that reads a vmcore either /proc/vmcore or a saved version vmcore and writes the dmesg to stdout. There is nothing to vmcore-dmesg and all of the arch dependencies are wrapped up in generating the core file. Which means a vmcore-dmesg should work with core files of all architectures without needing a rebuild. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> [ horms@verge.net.au removed trailing white-space ] Signed-off-by: Simon Horman <horms@verge.net.au>