Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:25:34

0001 /*
0002    This file is part of Valgrind, a dynamic binary instrumentation
0003    framework.
0004 
0005    Copyright (C) 2012-2017 Citrix
0006 
0007    This program is free software; you can redistribute it and/or
0008    modify it under the terms of the GNU General Public License as
0009    published by the Free Software Foundation; either version 2 of the
0010    License, or (at your option) any later version.
0011 
0012    This program is distributed in the hope that it will be useful, but
0013    WITHOUT ANY WARRANTY; without even the implied warranty of
0014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015    General Public License for more details.
0016 
0017    You should have received a copy of the GNU General Public License
0018    along with this program; if not, see <http://www.gnu.org/licenses/>.
0019 
0020    The GNU General Public License is contained in the file COPYING.
0021 */
0022 
0023 /* Contributed by Andrew Cooper <andrew.cooper3@citrix.com>
0024    and Ian Campbell <ian.campbell@citrix.com> */
0025 
0026 #ifndef __VKI_XEN_XSM_H
0027 #define __VKI_XEN_XSM_H
0028 
0029 #define VKI_XEN_FLASK_INTERFACE_VERSION 1
0030 
0031 struct vki_xen_flask_sid_context {
0032     /* IN/OUT: sid to convert to/from string */
0033     vki_uint32_t sid;
0034     /* IN: size of the context buffer
0035      * OUT: actual size of the output context string
0036      */
0037     vki_uint32_t size;
0038     VKI_XEN_GUEST_HANDLE(char) context;
0039 };
0040 
0041 struct vki_xen_flask_op {
0042     vki_uint32_t cmd;
0043 #define VKI_FLASK_LOAD              1
0044 #define VKI_FLASK_GETENFORCE        2
0045 #define VKI_FLASK_SETENFORCE        3
0046 #define VKI_FLASK_CONTEXT_TO_SID    4
0047 #define VKI_FLASK_SID_TO_CONTEXT    5
0048 #define VKI_FLASK_ACCESS            6
0049 #define VKI_FLASK_CREATE            7
0050 #define VKI_FLASK_RELABEL           8
0051 #define VKI_FLASK_USER              9
0052 #define VKI_FLASK_POLICYVERS        10
0053 #define VKI_FLASK_GETBOOL           11
0054 #define VKI_FLASK_SETBOOL           12
0055 #define VKI_FLASK_COMMITBOOLS       13
0056 #define VKI_FLASK_MLS               14
0057 #define VKI_FLASK_DISABLE           15
0058 #define VKI_FLASK_GETAVC_THRESHOLD  16
0059 #define VKI_FLASK_SETAVC_THRESHOLD  17
0060 #define VKI_FLASK_AVC_HASHSTATS     18
0061 #define VKI_FLASK_AVC_CACHESTATS    19
0062 #define VKI_FLASK_MEMBER            20
0063 #define VKI_FLASK_ADD_OCONTEXT      21
0064 #define VKI_FLASK_DEL_OCONTEXT      22
0065 #define VKI_FLASK_GET_PEER_SID      23
0066 #define VKI_FLASK_RELABEL_DOMAIN    24
0067     vki_uint32_t interface_version; /* VKI_XEN_FLASK_INTERFACE_VERSION */
0068     union {
0069         //struct vki_xen_flask_load load;
0070         //struct vki_xen_flask_setenforce enforce;
0071         /* FLASK_CONTEXT_TO_SID and FLASK_SID_TO_CONTEXT */
0072         struct vki_xen_flask_sid_context sid_context;
0073         //struct vki_xen_flask_access access;
0074         /* FLASK_CREATE, FLASK_RELABEL, FLASK_MEMBER */
0075         //struct vki_xen_flask_transition transition;
0076         //struct vki_xen_flask_userlist userlist;
0077         /* FLASK_GETBOOL, FLASK_SETBOOL */
0078         //struct vki_xen_flask_boolean boolean;
0079         //struct vki_xen_flask_setavc_threshold setavc_threshold;
0080         //struct vki_xen_flask_hash_stats hash_stats;
0081         //struct vki_xen_flask_cache_stats cache_stats;
0082         /* FLASK_ADD_OCONTEXT, FLASK_DEL_OCONTEXT */
0083         //struct vki_xen_flask_ocontext ocontext;
0084         //struct vki_xen_flask_peersid peersid;
0085         //struct vki_xen_flask_relabel relabel;
0086     } u;
0087 };
0088 
0089 #endif // __VKI_XEN_XSM_H
0090 
0091 /*--------------------------------------------------------------------*/
0092 /*--- end                                                          ---*/
0093 /*--------------------------------------------------------------------*/