函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\selinuxfs.c Create Date:2022-07-27 20:37:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sel_read_bool

函数原型:static ssize_t sel_read_bool(struct file *filep, char __user *buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *filep
char __user *buf
size_tcount
loff_t *ppos
1167  fsi等于s_fs_info
1168  char * page = NULL
1172  index等于Stat data, not accessed from path walking 按位与SEL_INO_MASK
1173  name等于name
1175  mutex_lock( & mutex)
1177  ret等于负EINVAL
1178  如果index大于等于bool_num字符串比较则转到:out_unlock
1182  ret等于负ENOMEM
1183  page等于get_zeroed_page(GFP_KERNEL)
1184  如果非page则转到:out_unlock
1187  cur_enforcing等于security_get_bool_value(state, index)
1188  如果cur_enforcing小于0则
1189  ret等于cur_enforcing
1190  转到:out_unlock
1192  length等于格式化输出字符串
1194  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1195  ret等于simple_read_from_buffer(buf, count, ppos, page, length)
1196  out_free :
1197  free_page((unsignedlong)page)
1198  返回:ret
1200  out_unlock :
1201  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1202  转到:out_free