This change finally adds capabilities to handles. Included changes: - j6_handle_t is now again 64 bits, with the highest 8 bits being a type code, and the next highest 24 bits being the capability mask, so that programs can check type/caps without calling the kernel. - The definitions grammar now includes a `capabilities [ ]` section on objects, to list what capabilities are relevant. - j6/caps.h is auto-generated from object capability lists - init_libj6 again sets __handle_self and __handle_sys, this is a bit of a hack. - A new syscall, j6_handle_list, will return the list of existing handles owned by the calling process. - syscall_verify.cpp.cog now actually checks that the needed capabilities exist on handles before allowing the call.
38 lines
935 B
Modula-2
38 lines
935 B
Modula-2
import "objects/kobject.def"
|
|
|
|
import "objects/channel.def"
|
|
import "objects/endpoint.def"
|
|
import "objects/event.def"
|
|
import "objects/process.def"
|
|
import "objects/system.def"
|
|
import "objects/thread.def"
|
|
import "objects/vma.def"
|
|
|
|
interface syscalls [syscall] {
|
|
uid 01d9b6a948961097
|
|
|
|
expose object system
|
|
expose object kobject
|
|
expose object event
|
|
expose object process
|
|
expose object thread
|
|
expose object channel
|
|
expose object endpoint
|
|
expose object vma
|
|
|
|
# Simple no-op syscall for testing
|
|
function noop
|
|
|
|
# Write a message to the kernel log
|
|
function log {
|
|
param message string
|
|
}
|
|
|
|
# Get a list of handles owned by this process. If the
|
|
# supplied list is not big enough, will set the size
|
|
# needed in `size` and return j6_err_insufficient
|
|
function handle_list {
|
|
param handles object kobject [list inout optional] # A list of handles to be filled
|
|
}
|
|
}
|