mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Capability checking for thread_control, exregs, mutex, cap_control,
ipc, and map system calls.
The visualised model is implemented in code that compiles, but
actual functionality hasn't been tested.
Need to add:
- Dynamic assignment of initial resources matching with what's
defined in the configuration.
- A paged-thread-group, since that would be a logical group of
seperation from a capability point-of-view.
- Resource ids for various tasks. E.g.
- Memory capabilities don't have target resources.
- Thread capability assumes current container for THREAD_CREATE.
- Mutex syscall assumes current thread (this one may not need
any changing)
- cap_control syscall assumes current thread. It may happen to
be that another thread's capability list is manipulated.
Last but not least:
- A simple and easy-to-use userspace library for dynamic expansion
of resource domains as new resources are created such as threads.
24 lines
639 B
C
24 lines
639 B
C
/*
|
|
* Syscall API for capability manipulation
|
|
*
|
|
* Copyright (C) 2009 Bahadir Balban
|
|
*/
|
|
#ifndef __API_CAPABILITY_H__
|
|
#define __API_CAPABILITY_H__
|
|
|
|
/* Capability syscall request types */
|
|
#define CAP_CONTROL_NCAPS 0x00
|
|
#define CAP_CONTROL_READ 0x01
|
|
#define CAP_CONTROL_SHARE 0x02
|
|
#define CAP_CONTROL_GRANT 0x03
|
|
#define CAP_CONTROL_MODIFY 0x05
|
|
|
|
#define CAP_SHARE_MASK 0x1F
|
|
#define CAP_SHARE_SPACE 0x01
|
|
#define CAP_SHARE_CONTAINER 0x02
|
|
#define CAP_SHARE_GROUP 0x04
|
|
#define CAP_SHARE_CHILD 0x08 /* All that we are pager of */
|
|
#define CAP_SHARE_SIBLING 0x10 /* All that have a common pager */
|
|
|
|
#endif /* __API_CAPABILITY_H__ */
|