函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:update_effective_progs

函数原型:static int update_effective_progs(struct cgroup *cgrp, enum bpf_attach_type type)

返回类型:int

参数:

类型参数名称
struct cgroup *cgrp
enum bpf_attach_typetype
244  desc等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(css, structcgroup, self)
246  如果判断percpu无计数引用则继续下一循环
249  err等于mpute a chain of effective programs for a given cgroup:* start from the list of programs in this cgroup and add* all parent programs.* Note that parent's F_ALLOW_OVERRIDE-type program is yielding* to programs in this cgroup
250  如果err则转到:cleanup
256  desc等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(css, structcgroup, self)
258  如果判断percpu无计数引用
263  继续下一循环
266  activate_effective_progs(desc, type, temp storage for effective prog array used by prog_attach/detach )
267  temp storage for effective prog array used by prog_attach/detach = NULL
270  返回:0
272  cleanup :
277  desc等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(css, structcgroup, self)
279  bpf_prog_array_free( temp storage for effective prog array used by prog_attach/detach )
280  temp storage for effective prog array used by prog_attach/detach = NULL
283  返回:err
调用者
名称描述
__cgroup_bpf_attach__cgroup_bpf_attach() - Attach the program to a cgroup, and* propagate the change to descendants*@cgrp: The cgroup which descendants to traverse*@prog: A program to attach*@type: Type of attach operation*@flags: Option flags
__cgroup_bpf_detach__cgroup_bpf_detach() - Detach the program from a cgroup, and* propagate the change to descendants*@cgrp: The cgroup which descendants to traverse*@prog: A program to detach or NULL*@type: Type of detach operation* Must be called with cgroup_mutex held.