Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\netnode.c Create Date:2022-07-28 19:09:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static void sel_netnode_insert(struct sel_netnode *node)

Type:void

Parameter:

TypeParameterName
struct sel_netnode *node
151  Case 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  Break
154  Case 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  Break
157  Default
158  BUG()
159  Return
164  list_add_rcu - add a new entry to rcu-protected list*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head
165  If size == SEL_NETNODE_HASH_BKT_LIMIT Then
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(prev, lockdep_is_held( & sel_netnode_lock)), structsel_netnode, list)
171  list_del_rcu - deletes entry from list without re-initialization*@entry: the element to delete from the list
172  kfree_rcu() - kfree an object after a grace period(tail, rcu)
173  Else size++
Caller
NameDescribe
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