提交 f59d4739 编写于 作者: C Cui GaoSheng 提交者: Zheng Zengkai

arm32: kaslr: Print the real kaslr offset when kernel panic

hulk inclusion
category: bugfix
bugzilla: 47952
CVE: NA

------------------------------------------------------------------------

The bss section is cleared when the kernel is started, and __kaslr_offset
variable is located in the bss section, __kaslr_offset is reset to zero,
so we move __kaslr_offset from bss section to data section.
Signed-off-by: NCui GaoSheng <cuigaosheng1@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 9a0e4e77
......@@ -103,11 +103,11 @@ ENTRY(stext)
#ifdef CONFIG_RANDOMIZE_BASE
str_l r3, __kaslr_offset, r9 @ offset in r3 if entered via kaslr ep
.section ".bss", "aw", %nobits
.pushsection .data @ data in bss will be cleared
.align 2
ENTRY(__kaslr_offset)
.long 0 @ will be wiped before entering C code
.previous
.popsection
#endif
#ifdef CONFIG_ARM_VIRT_EXT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册