函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sel_write_context

函数原型:static ssize_t sel_write_context(struct file *file, char *buf, size_t size)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
char *buf
size_tsize
590  fsi等于s_fs_info
591  state等于state
592  char * canon = NULL
596  length等于avc_has_perm - Check permissions and perform any appropriate auditing
599  如果length则转到:out
602  length等于security_context_to_sid(state, buf, size, & sid, GFP_KERNEL)
603  如果length则转到:out
606  length等于security_sid_to_context(state, sid, & canon, & len)
607  如果length则转到:out
610  length等于负ERANGE
611  如果len大于SIMPLE_TRANSACTION_LIMIT
612  打印错误信息("SELinux: %s: context size (%u) exceeds payload max\n", __func__, len)
614  转到:out
617  memcpy(buf, canon, len)
618  length等于len
619  out :
620  释放内存
621  返回:length