函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sel_netnode_insert - Insert a new node into the table*@node: the new node record* Description:* Add a new node record to the network address hash table.

函数原型:static void sel_netnode_insert(struct sel_netnode *node)

返回类型:void

参数:

类型参数名称
struct sel_netnode *node
151  : address family 恒等于PF_INET
152  idx等于sel_netnode_hashfn_ipv4 - IPv4 hashing function for the node table*@addr: IPv4 address* Description:* This is the IPv4 hashing function for the node interface table, it returns* the bucket number for the given IP address.
153  退出
154  : address family 恒等于PF_INET6
155  idx等于sel_netnode_hashfn_ipv6 - IPv6 hashing function for the node table*@addr: IPv6 address* Description:* This is the IPv6 hashing function for the node interface table, it returns* the bucket number for the given IP address.
156  退出
157  默认
158  BUG()
159  返回
164  添加RCU保护项
165  如果size恒等于SEL_NETNODE_HASH_BKT_LIMIT
167  tail等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(链表前项, lockdep_is_held( & sel_netnode_lock)), structsel_netnode, list)
171  删除不需要重新初始化的列表项
172  kfree_rcu() - kfree an object after a grace period(tail, rcu)
173  否则size自加
调用者
名称描述
sel_netnode_sid_slowsel_netnode_sid_slow - Lookup the SID of a network address using the policy*@addr: the IP address*@family: the address family*@sid: node SID* Description:* This function determines the SID of a network address by quering the* security policy