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.
37 lines
639 B
Modula-2
37 lines
639 B
Modula-2
import "objects/process.def"
|
|
|
|
object vma : kobject {
|
|
uid d6a12b63b3ed3937
|
|
cname vm_area
|
|
|
|
capabilities [
|
|
map
|
|
unmap
|
|
resize
|
|
]
|
|
|
|
method create [constructor] {
|
|
param size size
|
|
param flags uint32
|
|
}
|
|
|
|
method create_map [constructor cap:map] {
|
|
param size size
|
|
param address address
|
|
param flags uint32
|
|
}
|
|
|
|
method map [cap:map] {
|
|
param process object process
|
|
param address address
|
|
}
|
|
|
|
method unmap [cap:unmap] {
|
|
param process object process
|
|
}
|
|
|
|
method resize [cap:resize] {
|
|
param size size [inout]
|
|
}
|
|
}
|