Use reference counting to track filetime of process PD
All checks were successful
Build documentation / build-and-deploy (push) Successful in 26s

This commit is contained in:
2026-01-14 23:11:06 +01:00
parent 270ff507d4
commit 7cd5623d36
6 changed files with 44 additions and 27 deletions

View File

@@ -66,16 +66,16 @@ DEFINE_SYSCALL (sys_proc_create_resource_mem) {
int vis = (int)a2;
uintptr_t* out_paddr_buf = (uintptr_t*)a3;
spin_lock (&proc->pd.lock, &ctxprpd);
spin_lock (&proc->pd->lock, &ctxprpd);
uintptr_t out_paddr_buf_paddr = mm_v2p (&proc->pd, (uintptr_t)out_paddr_buf, 0);
uintptr_t out_paddr_buf_paddr = mm_v2p (proc->pd, (uintptr_t)out_paddr_buf, 0);
if (!mm_validate_buffer (&proc->pd, (uintptr_t)out_paddr_buf, sizeof (uintptr_t), 0)) {
spin_unlock (&proc->pd.lock, &ctxprpd);
if (!mm_validate_buffer (proc->pd, (uintptr_t)out_paddr_buf, sizeof (uintptr_t), 0)) {
spin_unlock (&proc->pd->lock, &ctxprpd);
return -SR_BAD_ADDRESS_SPACE;
}
spin_unlock (&proc->pd.lock, &ctxprpd);
spin_unlock (&proc->pd->lock, &ctxprpd);
uintptr_t* out_paddr_buf_vaddr = (uintptr_t*)((uintptr_t)hhdm->offset + out_paddr_buf_paddr);