diff options
author | Takao Indoh <indou.takao@jp.fujitsu.com> | 2017-10-26 20:33:01 +0900 |
---|---|---|
committer | Atsushi Kumagai <ats-kumagai@wm.jp.nec.com> | 2018-01-23 11:41:24 +0900 |
commit | 13d3059c6df80d121b095d0ccf6bd1c287323bc5 (patch) | |
tree | 97db624c73aeda807128385de0bf913b25634f21 /makedumpfile.c | |
parent | b4f7d95d068af12b4e271b808c27523f1d584132 (diff) |
[PATCH v3 4/4] sadump: Fix a KASLR problem of sadump while kdump is working
In the calc_kaslr_offset(), kaslr_offset and phys_base are calculated
using IDTR and CR3, but this solution does not work in the following
cases.
1) If the dump is captured on early stage of kernel boot, IDTR points
early IDT table(early_idts) instead of normal IDT(idt_table).
2) If the dump is captured whle kdump is working, IDTR points IDT table
of 2nd kernel, not 1st kernel.
This patch fixes the case 2). Current implementation does not support
the case 1), need enhancement in the future. This patch gets kernel boot
parameter from "saved_command_line" and check if "elfcorehdr=" is
included in the parameter. If it's included, we are in the 2nd kernel.
Retrieve vmcoreinfo from address of "elfcorehdr=" and get kaslr_offset
and phys_base from vmcoreinfo.
Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
Diffstat (limited to 'makedumpfile.c')
-rw-r--r-- | makedumpfile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/makedumpfile.c b/makedumpfile.c index ac6de73..dc2bd4d 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -1556,6 +1556,7 @@ get_symbol_info(void) SYMBOL_INIT(divide_error, "divide_error"); SYMBOL_INIT(idt_table, "idt_table"); + SYMBOL_INIT(saved_command_line, "saved_command_line"); return TRUE; } |