xen: Implement the xsm_op hypercall
[valgrind.git] / include / vki / vki-xen-xsm.h
blob8c798178b0d5b280340d4d1e51b07f8033c48cd8
1 #ifndef __VKI_XEN_XSM_H
2 #define __VKI_XEN_XSM_H
4 #define VKI_XEN_FLASK_INTERFACE_VERSION 1
6 struct vki_xen_flask_sid_context {
7 /* IN/OUT: sid to convert to/from string */
8 vki_uint32_t sid;
9 /* IN: size of the context buffer
10 * OUT: actual size of the output context string
12 vki_uint32_t size;
13 VKI_XEN_GUEST_HANDLE(char) context;
16 struct vki_xen_flask_op {
17 vki_uint32_t cmd;
18 #define VKI_FLASK_LOAD 1
19 #define VKI_FLASK_GETENFORCE 2
20 #define VKI_FLASK_SETENFORCE 3
21 #define VKI_FLASK_CONTEXT_TO_SID 4
22 #define VKI_FLASK_SID_TO_CONTEXT 5
23 #define VKI_FLASK_ACCESS 6
24 #define VKI_FLASK_CREATE 7
25 #define VKI_FLASK_RELABEL 8
26 #define VKI_FLASK_USER 9
27 #define VKI_FLASK_POLICYVERS 10
28 #define VKI_FLASK_GETBOOL 11
29 #define VKI_FLASK_SETBOOL 12
30 #define VKI_FLASK_COMMITBOOLS 13
31 #define VKI_FLASK_MLS 14
32 #define VKI_FLASK_DISABLE 15
33 #define VKI_FLASK_GETAVC_THRESHOLD 16
34 #define VKI_FLASK_SETAVC_THRESHOLD 17
35 #define VKI_FLASK_AVC_HASHSTATS 18
36 #define VKI_FLASK_AVC_CACHESTATS 19
37 #define VKI_FLASK_MEMBER 20
38 #define VKI_FLASK_ADD_OCONTEXT 21
39 #define VKI_FLASK_DEL_OCONTEXT 22
40 #define VKI_FLASK_GET_PEER_SID 23
41 #define VKI_FLASK_RELABEL_DOMAIN 24
42 vki_uint32_t interface_version; /* VKI_XEN_FLASK_INTERFACE_VERSION */
43 union {
44 //struct vki_xen_flask_load load;
45 //struct vki_xen_flask_setenforce enforce;
46 /* FLASK_CONTEXT_TO_SID and FLASK_SID_TO_CONTEXT */
47 struct vki_xen_flask_sid_context sid_context;
48 //struct vki_xen_flask_access access;
49 /* FLASK_CREATE, FLASK_RELABEL, FLASK_MEMBER */
50 //struct vki_xen_flask_transition transition;
51 //struct vki_xen_flask_userlist userlist;
52 /* FLASK_GETBOOL, FLASK_SETBOOL */
53 //struct vki_xen_flask_boolean boolean;
54 //struct vki_xen_flask_setavc_threshold setavc_threshold;
55 //struct vki_xen_flask_hash_stats hash_stats;
56 //struct vki_xen_flask_cache_stats cache_stats;
57 /* FLASK_ADD_OCONTEXT, FLASK_DEL_OCONTEXT */
58 //struct vki_xen_flask_ocontext ocontext;
59 //struct vki_xen_flask_peersid peersid;
60 //struct vki_xen_flask_relabel relabel;
61 } u;
64 #endif // __VKI_XEN_XSM_H
66 /*--------------------------------------------------------------------*/
67 /*--- end ---*/
68 /*--------------------------------------------------------------------*/