Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\selinuxfs.c Create Date:2022-07-28 19:05:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sel_read_bool

Proto:static ssize_t sel_read_bool(struct file *filep, char __user *buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
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  If index >= bool_num || strcmp(name, bool_pending_names[index]) Then Go to out_unlock
1182  ret = -ENOMEM
1183  page = get_zeroed_page(GFP_KERNEL)
1184  If Not page Then Go to out_unlock
1187  cur_enforcing = security_get_bool_value(state, index)
1188  If cur_enforcing < 0 Then
1189  ret = cur_enforcing
1190  Go to out_unlock
1192  length = scnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
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  Return 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  Go to out_free