github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/lsm.txt (about)

     1  # Copyright 2024 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <uapi/linux/lsm.h>
     5  
     6  lsm_set_self_attr(attr flags[lsm_attr_flags], ctx ptr[in, lsm_ctx], size bytesize[ctx], flags const[0])
     7  lsm_get_self_attr(attr flags[lsm_attr_flags], ctx ptr[out, lsm_ctx], size ptr[inout, bytesize[ctx, intptr]], flags flags[lsm_get_self_attr_flags])
     8  lsm_list_modules(ids ptr[out, array[int64]], size ptr[inout, bytesize[ids, intptr]], flags const[0])
     9  
    10  lsm_ctx {
    11  	id	flags[lsm_id_flags, int64]
    12  	flags	int64
    13  	len	bytesize[parent, int64]
    14  	ctx_len	bytesize[ctx, int64]
    15  	ctx	array[int8]
    16  }
    17  
    18  lsm_attr_flags = LSM_ATTR_UNDEF, LSM_ATTR_CURRENT, LSM_ATTR_EXEC, LSM_ATTR_FSCREATE, LSM_ATTR_KEYCREATE, LSM_ATTR_PREV, LSM_ATTR_SOCKCREATE
    19  
    20  lsm_id_flags = LSM_ID_UNDEF, LSM_ID_CAPABILITY, LSM_ID_SELINUX, LSM_ID_SMACK, LSM_ID_TOMOYO, LSM_ID_APPARMOR, LSM_ID_YAMA, LSM_ID_LOADPIN, LSM_ID_SAFESETID, LSM_ID_LOCKDOWN, LSM_ID_BPF, LSM_ID_LANDLOCK
    21  
    22  lsm_get_self_attr_flags = LSM_FLAG_SINGLE