sched: enforce ref-counting on current task/thread pointers

This commit is contained in:
2026-04-01 18:17:05 +01:00
parent 15c2207ab9
commit 512356ac2d
28 changed files with 364 additions and 103 deletions
+10 -5
View File
@@ -3,21 +3,26 @@
kern_status_t sys_kern_config_get(kern_config_key_t key, void *ptr, size_t len)
{
struct task *self = current_task();
struct task *self = get_current_task();
kern_status_t status = KERN_OK;
switch (key) {
case KERN_CFG_PAGE_SIZE:
if (!validate_access_w(self, ptr, sizeof(uintptr_t))) {
return KERN_MEMORY_FAULT;
status = KERN_MEMORY_FAULT;
break;
}
*(uint32_t *)ptr = VM_PAGE_SIZE;
return KERN_OK;
status = KERN_OK;
break;
default:
return KERN_INVALID_ARGUMENT;
status = KERN_INVALID_ARGUMENT;
break;
}
return KERN_UNSUPPORTED;
put_current_task(self);
return status;
}
kern_status_t sys_kern_config_set(