Add --validate_kdump_headers command-line option. When this command-line option is specified, a whole part of page descriptor table is validated at the startup of crash utility. --- diskdump.c | 3 +++ main.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/diskdump.c b/diskdump.c index 5084b0d..9a94e7e 100644 --- a/diskdump.c +++ b/diskdump.c @@ -1060,6 +1060,9 @@ is_diskdump(char *file) if (CRASHDEBUG(1)) __diskdump_memory_dump(fp); + if (pc->flags2 & VALIDATE_KDUMP_HEADERS) + check_kdump_headers(); + if (pc->flags2 & GET_OSRELEASE) diskdump_get_osrelease(); diff --git a/main.c b/main.c index 0b6b927..110d9c9 100644 --- a/main.c +++ b/main.c @@ -72,6 +72,7 @@ static struct option long_options[] = { {"hash", required_argument, 0, 0}, {"offline", required_argument, 0, 0}, {"src", required_argument, 0, 0}, + {"validate_kdump_headers", 0, 0, 0}, {0, 0, 0, 0} }; @@ -300,6 +301,10 @@ main(int argc, char **argv) else if (STREQ(long_options[option_index].name, "src")) kt->source_tree = optarg; + else if (STREQ(long_options[option_index].name, + "validate_kdump_headers")) + pc->flags2 |= VALIDATE_KDUMP_HEADERS; + else { error(INFO, "internal error: option %s unhandled\n", long_options[option_index].name); -- 2.43.1 -- Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/ Contribution Guidelines: https://github.com/crash-utility/crash/wiki