diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-12-22 13:20:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-23 23:08:10 +0100 |
commit | 8e3d1a42e3177096a1e7b84387c9f30627d3124e (patch) | |
tree | 2a4c55b2875a2938b6c37d6baedb30fdbbb9e3dd /Userland/DevTools | |
parent | d1ef8e63f75b18a744ba65105a0e7e0aac56e6c2 (diff) | |
download | serenity-8e3d1a42e3177096a1e7b84387c9f30627d3124e.zip |
Kernel+UE+LibC: Store address as void* in SC_m{re,}map_params
Most other syscalls pass address arguments as `void*` instead of
`uintptr_t`, so let's do that here too. Besides improving consistency,
this commit makes `strace` correctly pretty-print these arguments in
hex.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp index 07ca7dade8..704127175a 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp +++ b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp @@ -877,7 +877,7 @@ u32 Emulator::virt$mmap(u32 params_addr) if (params.addr) { // If MAP_FIXED is specified, existing mappings that intersect the requested range are removed. if (params.flags & MAP_FIXED) - virt$munmap(params.addr, requested_size); + virt$munmap((FlatPtr)params.addr, requested_size); result = m_range_allocator.allocate_specific(VirtualAddress { params.addr }, requested_size); } else { // mmap(nullptr, …, MAP_FIXED) is technically okay, but tends to be a bug. @@ -926,7 +926,7 @@ FlatPtr Emulator::virt$mremap(FlatPtr params_addr) mmu().copy_from_vm(¶ms, params_addr, sizeof(params)); // FIXME: Support regions that have been split in the past (e.g. due to mprotect or munmap). - if (auto* region = mmu().find_region({ m_cpu.ds(), params.old_address })) { + if (auto* region = mmu().find_region({ m_cpu.ds(), (FlatPtr)params.old_address })) { if (!is<MmapRegion>(*region)) return -EINVAL; VERIFY(region->size() == params.old_size); |