mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
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.
This commit is contained in:
parent
d1ef8e63f7
commit
8e3d1a42e3
5 changed files with 8 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue