mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Make capabilities/handles global
Instead of handles / capabilities having numeric ids that are only valid for the owning process, they are now global in a system capabilities table. This will allow for specifying capabilities in IPC that doesn't need to be kernel-controlled. Processes will still need to be granted access to given capabilities, but that can become a simpler system call than the current method of sending them through mailbox messages (and worse, having to translate every one into a new capability like was the case before). In order to track which handles a process has access to, a new node_set based on node_map allows for an efficient storage and lookup of handles.
This commit is contained in:
@@ -57,13 +57,13 @@ load_program(
|
||||
return false;
|
||||
}
|
||||
|
||||
res = j6_process_give_handle(proc, sys, nullptr);
|
||||
res = j6_process_give_handle(proc, sys);
|
||||
if (res != j6_status_ok) {
|
||||
sprintf(err_msg, " ** error loading program '%s': giving system handle: %lx", prog.filename, res);
|
||||
return false;
|
||||
}
|
||||
|
||||
res = j6_process_give_handle(proc, slp, nullptr);
|
||||
res = j6_process_give_handle(proc, slp);
|
||||
if (res != j6_status_ok) {
|
||||
sprintf(err_msg, " ** error loading program '%s': giving SLP handle: %lx", prog.filename, res);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user