mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
Kernel: Use kernel_mapping_base as the minimum kernel stack address
Since KASLR was added kernel_load_base only signifies the address at which the kernel image start, not the start of kernel memory, meaning that a valid kernel stack can be allocated before it in memory. We use kernel_mapping_base, the lowest address covered by the kernel page directory, as the minimal address when performing safety checks during backtrace generation.
This commit is contained in:
parent
07a3002d39
commit
2f4ab64e8c
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ NEVER_INLINE static void dump_backtrace_impl(FlatPtr base_pointer, bool use_ksym
|
||||||
if (use_ksyms) {
|
if (use_ksyms) {
|
||||||
FlatPtr copied_stack_ptr[2];
|
FlatPtr copied_stack_ptr[2];
|
||||||
for (FlatPtr* stack_ptr = (FlatPtr*)base_pointer; stack_ptr && recognized_symbol_count < max_recognized_symbol_count; stack_ptr = (FlatPtr*)copied_stack_ptr[0]) {
|
for (FlatPtr* stack_ptr = (FlatPtr*)base_pointer; stack_ptr && recognized_symbol_count < max_recognized_symbol_count; stack_ptr = (FlatPtr*)copied_stack_ptr[0]) {
|
||||||
if ((FlatPtr)stack_ptr < kernel_load_base)
|
if ((FlatPtr)stack_ptr < kernel_mapping_base)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
void* fault_at;
|
void* fault_at;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue