函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_ipv6_port_label - Smack port access table management*@sock: socket*@address: address* Create or update the port list entry

函数原型:static void smk_ipv6_port_label(struct socket *sock, struct sockaddr *address)

返回类型:void

参数:

类型参数名称
struct socket *sock
struct sockaddr *address
2530  sk等于sk
2532  ssp等于sk_security
2534  port等于0
2536  如果(address == NULL)则
2542  _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
2544  如果sk不等于socket initialized on 则继续下一循环
2546  bound label 等于 inbound label
2547  utgoing label 等于 outbound label
2548  _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()
2549  返回
2555  _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()
2556  返回
2559  addr6等于address
2560  port等于ntohs( Transport layer port # )
2564  如果port恒等于0则返回
2571  _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
2573  如果he port number 不等于portSocket type 不等于type则继续下一循环
2575  如果smk_can_reuse不等于1则
2576  _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()
2577  返回
2579  he port number 等于port
2580  socket initialized on 等于sk
2581  bound label 等于 inbound label
2582  utgoing label 等于 outbound label
2583  smk_can_reuse等于0
2584  _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()
2585  返回
2587  _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()
2591  spp等于分配内存并置零
2592  如果(spp == NULL)则返回
2595  he port number 等于port
2596  socket initialized on 等于sk
2597  bound label 等于 inbound label
2598  utgoing label 等于 outbound label
2599  Socket type 等于type
2600  smk_can_reuse等于0
2602  mutex_lock( & smack_ipv6_lock)
2603  添加RCU保护项
2604  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
2605  返回
调用者
名称描述
smack_inode_setsecuritysmack_inode_setsecurity - set smack xattrs*@inode: the object*@name: attribute name*@value: attribute value*@size: size of the attribute*@flags: unused* Sets the named attribute in the appropriate blob* Returns 0 on success, or an error code
smack_socket_bindsmack_socket_bind - record port binding information.*@sock: the socket*@address: the port address*@addrlen: size of the address* Records the label bound to a port.* Returns 0 on success, and error code otherwise