函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sel_ib_pkey_sid_slow - Lookup the SID of a pkey using the policy*@subnet_prefix: subnet prefix*@pkey_num: pkey number*@sid: pkey SID* Description:* This function determines the SID of a pkey by querying the security* policy

函数原型:static int sel_ib_pkey_sid_slow(u64 subnet_prefix, u16 pkey_num, unsigned int *sid)

返回类型:int

参数:

类型参数名称
u64subnet_prefix
u16pkey_num
unsigned int *sid
134  struct sel_ib_pkey * new = NULL
137  spin_lock_irqsave( & sel_ib_pkey_lock, flags)
138  pkey等于sel_ib_pkey_find - Search for a pkey record*@subnet_prefix: subnet_prefix*@pkey_num: pkey_num* Description:* Search the pkey table and return the matching record. If an entry* can not be found in the table return NULL.
139  如果pkey
140  sid等于 SID of pkey
141  spin_unlock_irqrestore( & sel_ib_pkey_lock, flags)
142  返回:0
145  ret等于security_ib_pkey_sid( & selinux_state, subnet_prefix, pkey_num, sid)
147  如果ret则转到:out
153  new等于分配内存并置零
154  如果非new则转到:out
157  Port subnet prefix 等于subnet_prefix
158  PKey number 等于pkey_num
159  SID of pkey 等于sid
160  sel_ib_pkey_insert - Insert a new pkey into the table*@pkey: the new pkey record* Description:* Add a new pkey record to the hash table.
162  out :
163  spin_unlock_irqrestore( & sel_ib_pkey_lock, flags)
164  返回:ret
调用者
名称描述
sel_ib_pkey_sidsel_ib_pkey_sid - Lookup the SID of a PKEY*@subnet_prefix: subnet_prefix*@pkey_num: pkey number*@sid: pkey SID* Description:* This function determines the SID of a PKEY using the fastest method* possible