函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:avc_insert - Insert an AVC entry.*@ssid: source security identifier*@tsid: target security identifier*@tclass: target security class*@avd: resulting av decision*@xp_node: resulting extended permissions* Insert an AVC entry for the SID pair

函数原型:static struct avc_node *avc_insert(struct selinux_avc *avc, unsigned int ssid, unsigned int tsid, u16 tclass, struct av_decision *avd, struct avc_xperms_node *xp_node)

返回类型:struct avc_node

参数:

类型参数名称
struct selinux_avc *avc
unsigned intssid
unsigned inttsid
u16tclass
struct av_decision *avd
struct avc_xperms_node *xp_node
617  struct avc_node * pos, * node = NULL
623  如果avc_latest_notif_update(avc, seqno, 1)则返回:NULL
626  node等于avc_alloc_node(avc)
627  如果非node则返回:NULL
630  avc_node_populate(node, ssid, tsid, tclass, avd)
631  如果avc_xperms_populate(node, xp_node)则
632  avc_node_kill(avc, node)
633  返回:NULL
636  hvalue等于avc_hash(ssid, tsid, tclass)
637  head等于 head for avc_node->list [hvalue]
638  lock等于 lock for writes [hvalue]
639  spin_lock_irqsave(lock, flag)
641  如果ssid恒等于ssidtsid恒等于tsidtclass恒等于tclass
644  avc_node_replace(avc, node, pos)
645  转到:found
648  添加哈希记录
649  found :
650  spin_unlock_irqrestore(lock, flag)
651  返回:node
调用者
名称描述
avc_compute_avSlow-path helper function for avc_has_perm_noaudit,* when the avc_node lookup fails