diff --git a/kernel/syscall/skeleton.cc b/kernel/syscall/skeleton.cc index 061eb90..0f26ba7 100644 --- a/kernel/syscall/skeleton.cc +++ b/kernel/syscall/skeleton.cc @@ -256,7 +256,7 @@ int receive(Vault& v, void* buffer, size_t size) { if(total_len - (i*4096) > 4096) copy_from_phys(v, paddr+offset, buffer, 4096-offset); else - copy_from_phys(v, paddr, buffer, total_len - (i*4096)); + copy_from_phys(v, paddr, buffer, total_len - (i*4096)); //last page } return ipc->pid; @@ -276,8 +276,7 @@ bool reply(Vault& v, const void* buffer, size_t size) { Thread* other_thread = v.thread_list[ipc->pid]; if (other_thread == nullptr) return false; - uintptr_t phys_ptr = isMapped((uintptr_t)buffer, current_thread->paging_tree->l4 ); - ipc->ptr = phys_ptr + ((uintptr_t)buffer & 0xFFF); + ipc->ptr = (uintptr_t)buffer; ipc->size = size; ipc->pid = current_thread->id; ipc->is_answer = true;