mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Kernel: Remove some unnecessary casts to uintptr_t
VirtualAddress is constructible from uintptr_t and const void*. PhysicalAddress is constructible from uintptr_t but not const void*.
This commit is contained in:
parent
a246e9cd7e
commit
4b7a89911c
7 changed files with 41 additions and 31 deletions
|
@ -134,13 +134,13 @@ static void load_ksyms_from_data(const ByteBuffer& buffer)
|
|||
int recognized_symbol_count = 0;
|
||||
if (use_ksyms) {
|
||||
for (u32* stack_ptr = (u32*)ebp;
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress((uintptr_t)stack_ptr), sizeof(void*) * 2) : 1) && recognized_symbol_count < max_recognized_symbol_count; stack_ptr = (u32*)*stack_ptr) {
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress(stack_ptr), sizeof(void*) * 2) : 1) && recognized_symbol_count < max_recognized_symbol_count; stack_ptr = (u32*)*stack_ptr) {
|
||||
u32 retaddr = stack_ptr[1];
|
||||
recognized_symbols[recognized_symbol_count++] = { retaddr, ksymbolicate(retaddr) };
|
||||
}
|
||||
} else {
|
||||
for (u32* stack_ptr = (u32*)ebp;
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress((uintptr_t)stack_ptr), sizeof(void*) * 2) : 1); stack_ptr = (u32*)*stack_ptr) {
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress(stack_ptr), sizeof(void*) * 2) : 1); stack_ptr = (u32*)*stack_ptr) {
|
||||
u32 retaddr = stack_ptr[1];
|
||||
dbgprintf("%x (next: %x)\n", retaddr, stack_ptr ? (u32*)*stack_ptr : 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue