diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-04-10 22:49:06 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-10 21:57:19 +0200 |
commit | 2f4ab64e8c2c1a69f8a08e4ac4379f1747e580e1 (patch) | |
tree | aebaae2962c281afb52c0f326e70ffe203cc63b2 /Kernel/KSyms.cpp | |
parent | 07a3002d39eb85225024ecacd420579e1c7f4175 (diff) | |
download | serenity-2f4ab64e8c2c1a69f8a08e4ac4379f1747e580e1.zip |
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.
Diffstat (limited to 'Kernel/KSyms.cpp')
-rw-r--r-- | Kernel/KSyms.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/KSyms.cpp b/Kernel/KSyms.cpp index d6c4798fd2..0c3cb45f5a 100644 --- a/Kernel/KSyms.cpp +++ b/Kernel/KSyms.cpp @@ -124,7 +124,7 @@ NEVER_INLINE static void dump_backtrace_impl(FlatPtr base_pointer, bool use_ksym if (use_ksyms) { 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]) { - if ((FlatPtr)stack_ptr < kernel_load_base) + if ((FlatPtr)stack_ptr < kernel_mapping_base) break; void* fault_at; |