函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_ipv6_port_check - check Smack port access*@sk: socket*@address: address*@act: the action being taken* Create or update the port list entry

函数原型:static int smk_ipv6_port_check(struct sock *sk, struct sockaddr_in6 *address, int act)

返回类型:int

参数:

类型参数名称
struct sock *sk
struct sockaddr_in6 *address
intact
2620  ssp等于sk_security
2621  struct smack_known * skp = NULL
2625  如果act恒等于SMK_RECEIVING
2626  skp等于smack_ipv6host_label - check host based restrictions*@sip: the object end* looks for host based access restrictions* This version will only be appropriate for really small sets of single label* hosts
2627  object等于 inbound label
2628  否则
2629  skp等于 outbound label
2630  object等于smack_ipv6host_label - check host based restrictions*@sip: the object end* looks for host based access restrictions* This version will only be appropriate for really small sets of single label* hosts
2636  如果(skp != NULL && object != NULL)则返回:smk_ipv6_check - check Smack access*@subject: subject Smack label*@object: object Smack label*@address: address*@act: the action being taken* Check an IPv6 access
2638  如果(skp == NULL)则skp等于smack_net_ambient
2640  如果(object == NULL)则object等于smack_net_ambient
2646  如果非smk_ipv6_localhost - Check for local ipv6 host address*@sip: the address* Returns boolean true if this is the localhost address则返回:smk_ipv6_check - check Smack access*@subject: subject Smack label*@object: object Smack label*@address: address*@act: the action being taken* Check an IPv6 access
2652  如果act恒等于SMK_RECEIVING则返回:0
2655  port等于ntohs( Transport layer port # )
2656  _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
2658  如果he port number 不等于portSocket type 不等于sk_type则继续下一循环
2660  object等于bound label
2661  如果act恒等于SMK_CONNECTING TCP peer label 等于utgoing label
2663  退出
2665  _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()
2667  返回:smk_ipv6_check - check Smack access*@subject: subject Smack label*@object: object Smack label*@address: address*@act: the action being taken* Check an IPv6 access
调用者
名称描述
smack_socket_connectsmack_socket_connect - connect access check*@sock: the socket*@sap: the other end*@addrlen: size of sap* Verifies that a connection may be possible* Returns 0 on success, and error code otherwise
smack_socket_sendmsgsmack_socket_sendmsg - Smack check based on destination host*@sock: the socket*@msg: the message*@size: the size of the message* Return 0 if the current subject can write to the destination host.
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