函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sel_commit_bools_write

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

返回类型:ssize_t

参数:

类型参数名称
struct file *filep
const char __user *buf
size_tcount
loff_t *ppos
1266  fsi等于s_fs_info
1267  char * page = NULL
1271  如果count大于等于PAGE_SIZE则返回:负ENOMEM
1275  如果ppos不等于0则返回:负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  如果是错误则返回:错误
1282  mutex_lock( & mutex)
1284  length等于avc_has_perm - Check permissions and perform any appropriate auditing
1288  如果length则转到:out
1291  length等于负EINVAL
1292  如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments不等于1则转到:out
1295  length等于0
1296  如果new_valuebool_pending_valueslength等于security_set_bools(state, bool_num, bool_pending_values)
1300  如果非lengthlength等于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  释放内存
1306  返回:length