diff options
author | Conrad Pankoff <deoxxa@fknsrs.biz> | 2019-12-24 11:01:23 +1100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-24 01:28:38 +0100 |
commit | 3aaeff483bfea969c4f056646fdd29045cc95891 (patch) | |
tree | eb02d209e211e6bc18a8becef856b6643c0e42b3 /Kernel/Thread.cpp | |
parent | a3590ca6022fd49e6775e08d64007cfc661cb64d (diff) | |
download | serenity-3aaeff483bfea969c4f056646fdd29045cc95891.zip |
Kernel: Add a size argument to validate_read_from_kernel
Diffstat (limited to 'Kernel/Thread.cpp')
-rw-r--r-- | Kernel/Thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index f07b4b2d6b..35f9366894 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -708,7 +708,7 @@ String Thread::backtrace_impl() const StringBuilder builder; Vector<RecognizedSymbol, 64> recognized_symbols; recognized_symbols.append({ tss().eip, ksymbolicate(tss().eip) }); - for (u32* stack_ptr = (u32*)frame_ptr(); process.validate_read_from_kernel(VirtualAddress((u32)stack_ptr)); stack_ptr = (u32*)*stack_ptr) { + for (u32* stack_ptr = (u32*)frame_ptr(); process.validate_read_from_kernel(VirtualAddress((u32)stack_ptr), sizeof(void*) * 2); stack_ptr = (u32*)*stack_ptr) { u32 retaddr = stack_ptr[1]; recognized_symbols.append({ retaddr, ksymbolicate(retaddr) }); } @@ -738,7 +738,7 @@ Vector<u32> Thread::raw_backtrace(u32 ebp) const ProcessPagingScope paging_scope(process); Vector<u32> backtrace; backtrace.append(ebp); - for (u32* stack_ptr = (u32*)ebp; process.validate_read_from_kernel(VirtualAddress((u32)stack_ptr)); stack_ptr = (u32*)*stack_ptr) { + for (u32* stack_ptr = (u32*)ebp; process.validate_read_from_kernel(VirtualAddress((u32)stack_ptr), sizeof(void*) * 2); stack_ptr = (u32*)*stack_ptr) { u32 retaddr = stack_ptr[1]; backtrace.append(retaddr); } |