函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__cgroup_bpf_check_dev_permission

函数原型:int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, short access, enum bpf_attach_type type)

返回类型:int

参数:

类型参数名称
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(当前进程)
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  返回:非allow