函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_pivotroot

函数原型:int aa_pivotroot(struct aa_label *label, const struct path *old_path, const struct path *new_path)

返回类型:int

参数:

类型参数名称
struct aa_label *label
const struct path *old_path
const struct path *new_path
694  struct aa_label * target = NULL
695  char * old_buffer = NULL, * new_buffer = NULL, * info = NULL
698  AA_BUG(!label)
699  AA_BUG(!old_path)
700  AA_BUG(!new_path)
702  old_buffer等于aa_get_buffer(false)
703  new_buffer等于aa_get_buffer(false)
704  error等于负ENOMEM
705  如果非old_buffer或非new_buffer则转到:out
707  target等于_label_build - abstract out the build of a label transition*@L: label the transition is being computed for*@P: profile parameter derived from L by this macro, can be passed to FN*@GFP: memory allocation type to use(label, profile, GFP_KERNEL, helper fn for transition on pivotroot* Returns: label for transition or ERR_PTR. Does not return NULL)
710  如果非target
711  info等于"label build failed"
712  error等于负ENOMEM
713  转到:fail
714  否则如果非是错误
715  error等于aa_replace_current_label - replace the current tasks label*@label: new label (NOT NULL)* Returns: 0 or error on failure
716  如果error
719  转到:out
721  否则error等于错误
724  out :
725  aa_put_buffer(old_buffer)
726  aa_put_buffer(new_buffer)
728  返回:error
730  fail :
732  error等于fn_for_each(label, profile, audit_mount - handle the auditing of mount operations*@profile: the profile being enforced (NOT NULL)*@op: operation being mediated (NOT NULL)*@name: name of object being mediated (MAYBE NULL)*@src_name: src_name of object being mediated )
738  转到:out
调用者
名称描述
apparmor_sb_pivotroot