Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sel_commit_bools_write

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

Type:ssize_t

Parameter:

TypeParameterName
struct file *filep
const char __user *buf
size_tcount
loff_t *ppos
1266  fsi = s_fs_info
1267  char * page = NULL
1271  If count >= PAGE_SIZE Then Return -ENOMEM
1275  If ppos != 0 Then Return -EINVAL
1278  page = memdup_user_nul - duplicate memory region from user space and NUL-terminate*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure.
1279  If IS_ERR(page) Then Return PTR_ERR(page)
1282  mutex_lock( & mutex)
1284  length = avc_has_perm - Check permissions and perform any appropriate auditing
1288  If length Then Go to out
1291  length = -EINVAL
1292  If sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments != 1 Then Go to out
1295  length = 0
1296  If new_value && bool_pending_values Then length = security_set_bools(state, bool_num, bool_pending_values)
1300  If Not length Then length = count
1303  out :
1304  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.
1305  kfree(page)
1306  Return length