函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:policy_update

函数原型:static ssize_t policy_update(unsigned int mask, const char __user *buf, size_t size, loff_t *pos, struct aa_ns *ns)

返回类型:ssize_t

参数:

类型参数名称
unsigned intmask
const char __user *buf
size_tsize
loff_t *pos
struct aa_ns *ns
450  label等于gin_current_label_crit_section - current's confining label and update it* Returns: up to date confining label or the ns unconfined label (NOT NULL)* Not safe to call inside locks* The returned reference must be put with end_current_label_crit_section()*
455  error等于aa_may_manage_policy(label, ns, mask)
456  如果error则返回:error
459  data等于aa_simple_write_to_buffer - common routine for getting policy from user*@userbuf: user buffer to copy data from (NOT NULL)*@alloc_size: size of user buffer (REQUIRES: @alloc_size >= @copy_size)*@copy_size: size of data to copy from user buffer*@pos:
460  error等于错误
461  如果非是错误
462  error等于aa_replace_profiles - replace profile(s) on the profile list*@policy_ns: namespace load is occurring on*@label: label that is attempting to load/replace policy*@mask: permission mask*@udata: serialized data stream (NOT NULL)* unpack and replace a profile
463  aa_put_loaddata(data)
465  d_label_crit_section - put a reference found with begin_current_label..*@label: label reference to put* Should only be used with a reference obtained with* begin_current_label_crit_section and never used in situations where the* task cred may be updated
467  返回:error
调用者
名称描述
profile_load.load file hook fn to load policy
profile_replace.replace file hook fn to load and/or replace policy