Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__cgroup_bpf_check_dev_permission

Proto:int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, short access, enum bpf_attach_type type)

Type:int

Parameter:

TypeParameterName
shortdev_type
u32major
u32minor
shortaccess
enum bpf_attach_typetype
765  struct bpf_cgroup_dev_ctx ctx = { access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* = (access << 16) | dev_type, major = major, minor = minor, }
770  allow = 1
772  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
773  cgrp = task_dfl_cgroup(current process)
774  allow = BPF_PROG_RUN_ARRAY( array of effective progs in this cgroup [type], & ctx, BPF_PROG_RUN)
776  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
778  Return Not allow