makedumpfile: Read and process filter commands from config file.
Subsystems (3)
PATCH 5/6 makedumpfile: Read and process filter commands from config file.
From: Mahesh Salgaonkar <[email protected]>
This patch enables to makedumpfile to read and process filter commands from specified config file. It builds a list of filter info consisting of memory address (paddr) and size to be filtered out. This list is used during read_pfn() function to filter out user specified kernel data from vmcore before writing it to compressed DUMPFILE. The filtered memory locations are filled with 'X' (0x58) character.
The filter command syntax is:
erase <Symbol>[.member[...]] [size <SizeValue>[K|M]] erase <Symbol>[.member[...]] [size <SizeSymbol>] erase <Symbol>[.member[...]] [nullify]
Below are the examples how filter commands in config file look like:
erase modules
erase cred_jar.name size 10
erase vmlist.addr nullify
This is useful feature for the customers who wants to erase the customer sensitive data like security keys, in DUMPFILE before sending it to support team for analysis.
The man page for filter.conf(8) has been introduced that describes the config file format and erase command syntax.
---
Makefile | 8 - filter.conf | 82 +++++ filter.conf.8 | 213 ++++++++++++++ makedumpfile.c | 841 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ makedumpfile.h | 60 ++++ 5 files changed, 1203 insertions(+), 1 deletions(-) create mode 100644 filter.conf create mode 100644 filter.conf.8
Makefile +7 -1
@@ -37,12 +37,18 @@ makedumpfile: $(SRC) $(OBJ_ARCH) grep -v "^.TH MAKEDUMPFILE 8" makedumpfile.8 >> temp.8 mv temp.8 makedumpfile.8 gzip -c ./makedumpfile.8 > ./makedumpfile.8.gz + echo .TH FILTER.CONF 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8 + grep -v "^.TH FILTER.CONF 8" filter.conf.8 >> temp.8 + mv temp.8 filter.conf.8 + gzip -c ./filter.conf.8 > ./filter.conf.8.gz clean: - rm -f $(OBJ) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz + rm -f $(OBJ) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz filter.conf.8.gz install: cp makedumpfile ${DESTDIR}/bin cp makedumpfile-R.pl ${DESTDIR}/bin cp makedumpfile.8.gz ${DESTDIR}/usr/share/man/man8 + cp filter.conf.8.gz ${DESTDIR}/usr/share/man/man8 + cp filter.conf ${DESTDIR}/etc/filter.conf.sample
filter.conf new file +82 -0
82 lines not on this page · raw message
filter.conf.8 new file +213 -0
213 lines not on this page · raw message
makedumpfile.c +841 -0
893 lines not on this page · raw message
makedumpfile.h +60 -0
72 lines not on this page · raw message
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec