diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-13 22:31:43 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-13 22:31:43 -0400 |
| commit | 548506392b789f58b1556a6ffca917441e1d89fd (patch) | |
| tree | 58e4b747446ea64e7951e523353f58510b3a8b2f /sys/syscall.c | |
| parent | c5e3bb7917689bc9ed54fee23a143144fade802d (diff) | |
| download | jove-kernel-548506392b789f58b1556a6ffca917441e1d89fd.tar.gz jove-kernel-548506392b789f58b1556a6ffca917441e1d89fd.tar.bz2 jove-kernel-548506392b789f58b1556a6ffca917441e1d89fd.zip | |
ipc functions. work on process spawning
Diffstat (limited to 'sys/syscall.c')
| -rw-r--r-- | sys/syscall.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/syscall.c b/sys/syscall.c index 0c40418..7d43d66 100644 --- a/sys/syscall.c +++ b/sys/syscall.c @@ -116,6 +116,12 @@ syscall_handler(uintmax_t message_path_raw, uint16_t message_pathlen) jove_owned_obj_t *pagedir = lockstack_push(&ctx.lockstack, pcb_getpagedir(ctx.objdir)); uintptr_t message_vptr = message_unmap(ctx.message.obj, pagedir); + if(message_vptr == 0) { + klogf("Process %i tried to call syscall with unmapped message %P\n", + pcb_getpid(pcb), message_path, message_pathlen); + sysret = -EBADOBJ; + goto release_return; + } size_t messagelen = 0x1000; void *messagedata = (void*)message_getdata(ctx.message.obj); @@ -160,7 +166,7 @@ fail_target_busy: sysret = _syscall_handle_switch(&ctx); remap_return: - message_remap(ctx.message.obj, pagedir, message_vptr); + message_map(ctx.message.obj, pagedir, message_vptr); release_return: lockstack_popall(&ctx.lockstack); |
