Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:smk_ipv6_port_label - Smack port access table management*@sock: socket*@address: address* Create or update the port list entry

Proto:static void smk_ipv6_port_label(struct socket *sock, struct sockaddr *address)

Type:void

Parameter:

TypeParameterName
struct socket *sock
struct sockaddr *address
2530  sk = sk
2532  ssp = sk_security
2534  port = 0
2536  If (address == NULL) Then
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  If sk != socket initialized on Then Continue
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  Return
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  Return
2559  addr6 = address
2560  port = ntohs( Transport layer port # )
2564  If port == 0 Then Return
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  If he port number != port || Socket type != type Then Continue
2575  If smk_can_reuse != 1 Then
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  Return
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  Return
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 = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2592  If (spp == NULL) Then Return
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  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
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  Return
Caller
NameDescribe
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