This commit fix the situation that it couldn't output register
informatio which is located in vmalloc address because of
kaslr enable. KASLR is the default after 4.6 kernel of arm64.
Change-Id: Ied75938e89d31d1e6386ac88e5e4d9a97f1159e4
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
* don't attempt to dump non-kernel addresses or
* values that are probably just small negative numbers
*/
- if (addr < PAGE_OFFSET || addr > -256UL)
- return;
+ if (addr < PAGE_OFFSET || addr > -256UL) {
+ /*
+ * If kaslr is enabled, Kernel code is able to
+ * locate in VMALLOC address.
+ */
+ if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) {
+ if (addr < (unsigned long)KERNEL_START ||
+ addr > (unsigned long)KERNEL_END)
+ return;
+ } else {
+ return;
+ }
+ }
printk("\n%s: %#lx:\n", name, addr);