Capability-enabled kernel running 2_posix test OK.

This commit is contained in:
Bahadir Balban
2009-10-27 15:59:07 +02:00
parent d1f25763ac
commit 5840d6d696
12 changed files with 244 additions and 154 deletions

View File

@@ -5,9 +5,9 @@
#define THREAD_CREATE 0x0000
#define THREAD_RUN 0x0001
#define THREAD_SUSPEND 0x0002
#define THREAD_RESUME 0x0003
#define THREAD_DESTROY 0x0004
#define THREAD_RECYCLE 0x0005
#define THREAD_DESTROY 0x0003
#define THREAD_RECYCLE 0x0004
#define THREAD_WAIT 0x0005
#define THREAD_CREATE_MASK 0x0FF0
#define TC_SHARE_CAPS 0x0010 /* Share all thread capabilities */

View File

@@ -28,7 +28,7 @@
#define CAP_RTYPE_TGROUP (1 << 17)
#define CAP_RTYPE_SPACE (1 << 18)
#define CAP_RTYPE_CONTAINER (1 << 19)
#define CAP_RTYPE_UMUTEX (1 << 20) /* Don't mix with pool version */
#define CAP_RTYPE_PGGROUP (1 << 20) /* Group of paged threads */
#define CAP_RTYPE_VIRTMEM (1 << 21)
#define CAP_RTYPE_PHYSMEM (1 << 22)
#define CAP_RTYPE_CPUPOOL (1 << 23)
@@ -37,7 +37,6 @@
#define CAP_RTYPE_MUTEXPOOL (1 << 26)
#define CAP_RTYPE_MAPPOOL (1 << 27) /* For pmd spending */
#define CAP_RTYPE_CAPPOOL (1 << 28) /* For new cap generation */
#define CAP_RTYPE_PGGROUP (1 << 29) /* Group of paged threads */
#define cap_rtype(c) ((c)->type & CAP_RTYPE_MASK)
@@ -48,9 +47,10 @@
/* Thread control capability */
#define CAP_TCTRL_CREATE (1 << 0)
#define CAP_TCTRL_DESTROY (1 << 1)
#define CAP_TCTRL_SUSPEND (1 << 2)
#define CAP_TCTRL_RESUME (1 << 3)
#define CAP_TCTRL_RUN (1 << 2)
#define CAP_TCTRL_SUSPEND (1 << 3)
#define CAP_TCTRL_RECYCLE (1 << 4)
#define CAP_TCTRL_WAIT (1 << 5)
/* Exchange registers capability */
#define CAP_EXREGS_RW_PAGER (1 << 0)

View File

@@ -142,7 +142,7 @@ struct capability *cap_list_find_by_rtype(struct cap_list *clist,
/* Capability checking on system calls */
int cap_map_check(struct ktcb *task, unsigned long phys, unsigned long virt,
unsigned long npages, unsigned int flags, l4id_t tid);
unsigned long npages, unsigned int flags);
int cap_thread_check(struct ktcb *task, unsigned int flags,
struct task_ids *ids);
int cap_exregs_check(struct ktcb *task, struct exregs_data *exregs);