Commit 919beb4e authored by Matt Redfearn's avatar Matt Redfearn Committed by Ralf Baechle
Browse files

MIPS: KASLR: Print relocation Information on boot

When debugging a relocated kernel, the addresses of the relocated
symbols and the offset applied is essential information. If the kernel
is compiled with debugging information, then print this information
during bootup using the same function as the panic notifier.

[ Fixed spelling mistake pointed out by
Sergei Shtylyov <>.]

Signed-off-by: default avatarMatt Redfearn <>
Cc: Aaro Koskinen <>
Cc: Masahiro Yamada <>
Cc: Alexander Sverdlin <>
Cc: Jaedon Shin <>
Cc: Jonas Gorski <>
Cc: Paul Burton <>

Signed-off-by: default avatarRalf Baechle <>
parent 405bc8fd
......@@ -477,9 +477,18 @@ static void __init bootmem_init(void)
if (__pa_symbol(_text) > __pa_symbol(VMLINUX_LOAD_ADDRESS)) {
unsigned long offset;
extern void show_kernel_relocation(const char *level);
offset = __pa_symbol(_text) - __pa_symbol(VMLINUX_LOAD_ADDRESS);
free_bootmem(__pa_symbol(VMLINUX_LOAD_ADDRESS), offset);
* This information is necessary when debugging the kernel
* But is a security vulnerability otherwise!
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment