File crash-allow-use-of-sadump-captured-KASLR-kernel.patch of Package crash.16727
This patch fix a problem that crash cannot open a dumpfile which is
captured by sadump in KASLR enabled kernel.
When KASLR feature is enabled, a kernel is placed on the memory randomly
and therefore crash cannot open a dumpfile captured by sadump because
addresses of kernel symbols in System.map or vmlinux are different from
To solve this problem, we need to calculate kaslr offset(the difference
between original symbol address and actual address) and phys_base, and
adjust symbol table of crash. In the case of dumpfile of kdump, these
information is included in the header, but dumpfile of sadump does not
have such a information.
This patch calculate kaslr offset and phys_base to solve this problem.
Please see the comment in the calc_kaslr_offset() for the detail idea.
The basic idea is getting register (IDTR and CR3) from dump header, and
calculate kaslr_offset/phys_base using them.
Signed-off-by: Takao Indoh <firstname.lastname@example.org>
symbols.c | 3 +++
1 file changed, 3 insertions(+)
@@ -1133,6 +1133,9 @@ symname_hash_install(struct syment *spn)
+ if (SADUMP_DUMPFILE())
+ kt->flags2 |= KASLR_CHECK;