函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static void sel_netport_insert(struct sel_netport *port)

返回类型:void

参数:

类型参数名称
struct sel_netport *port
111  idx等于sel_netport_hashfn - Hashing function for the port table*@pnum: port number* Description:* This is the hashing function for the port table, it returns the bucket* number for the given port.
112  添加RCU保护项
113  如果size恒等于SEL_NETPORT_HASH_BKT_LIMIT
115  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_netport_lock)), structsel_netport, list)
120  删除不需要重新初始化的列表项
121  kfree_rcu() - kfree an object after a grace period(tail, rcu)
122  否则size自加
调用者
名称描述
sel_netport_sid_slowsel_netport_sid_slow - Lookup the SID of a network address using the policy*@protocol: protocol*@pnum: port*@sid: port SID* Description:* This function determines the SID of a network port by quering the security* policy