[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:
@@ -60,16 +60,15 @@ channel_pump_loop()
|
||||
return 3;
|
||||
|
||||
uint64_t tag = j6_proto_sl_register;
|
||||
uint64_t data = "jsix.protocol.stream.ouput"_id;
|
||||
size_t data_len = sizeof(data);
|
||||
uint64_t proto_id = "jsix.protocol.stream.ouput"_id;
|
||||
size_t handle_count = 1;
|
||||
result = j6_mailbox_call(slp, &tag,
|
||||
&data, &data_len,
|
||||
result = j6_mailbox_call(slp,
|
||||
&tag, &proto_id,
|
||||
&cout_write, &handle_count);
|
||||
if (result != j6_status_ok)
|
||||
return 4;
|
||||
|
||||
if (tag != j6_proto_base_status || data != j6_status_ok)
|
||||
if (tag != j6_proto_base_status)
|
||||
return 5;
|
||||
|
||||
result = j6_system_request_iopl(g_handle_sys, 3);
|
||||
|
||||
Reference in New Issue
Block a user