函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_from_secattr - Convert a netlabel attr.mls.lvl/attr.mls.cat pair to smack*@sap: netlabel secattr*@ssp: socket security information* Returns a pointer to a Smack label entry found on the label list.

函数原型:static struct smack_known *smack_from_secattr(struct netlbl_lsm_secattr *sap, struct socket_smack *ssp)

返回类型:struct smack_known

参数:

类型参数名称
struct netlbl_lsm_secattr *sap
struct socket_smack *ssp
3720  found等于0
3724  如果flags按位与NETLBL_SECATTR_MLS_LVL的值不等于0则
3735  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
3737  如果lvl不等于lvl则继续下一循环
3742  如果flags按位与NETLBL_SECATTR_MLS_CAT的值恒等于0则
3743  如果flags按位与NETLBL_SECATTR_MLS_CAT的值恒等于0则found等于1
3746  退出
3748 acat恒等于kcat循环
3754  如果acat小于0或kcat小于0则退出
3757  如果acat恒等于kcat
3758  found等于1
3759  退出
3762  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
3764  如果found则返回:skp
3767  如果ssp不等于NULL inbound label 恒等于smack_known_star则返回:smack_known_web
3769  返回:smack_known_star
3771  如果flags按位与NETLBL_SECATTR_SECID的值不等于0则返回:smack_from_secid(secid)
3781  返回:smack_net_ambient
调用者
名称描述
smack_socket_sock_rcv_skbsmack_socket_sock_rcv_skb - Smack packet delivery access check*@sk: socket*@skb: packet* Returns 0 if the packet should be delivered, an error code otherwise
smack_socket_getpeersec_dgramsmack_socket_getpeersec_dgram - pull in packet label*@sock: the peer socket*@skb: packet data*@secid: pointer to where to put the secid of the packet* Sets the netlabel socket state on sk from parent
smack_inet_conn_requestsmack_inet_conn_request - Smack access check on connect*@sk: socket involved*@skb: packet*@req: unused* Returns 0 if a task with the packet label could write to* the socket, otherwise an error code