Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cgroup.c Create Date:2022-07-28 13:27:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:update_effective_progs

Proto:static int update_effective_progs(struct cgroup *cgrp, enum bpf_attach_type type)

Type:int

Parameter:

TypeParameterName
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  If percpu_ref_is_zero - test whether a percpu refcount reached zero*@ref: percpu_ref to test* Returns %true if @ref reached zero.* This function is safe to call as long as @ref is between init and exit. Then Continue
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  If err Then Go to 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  If percpu_ref_is_zero - test whether a percpu refcount reached zero*@ref: percpu_ref to test* Returns %true if @ref reached zero.* This function is safe to call as long as @ref is between init and exit. Then
263  Continue
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  Return 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  Return err
Caller
NameDescribe
__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.