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:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:smack_sk_alloc_security - Allocate a socket blob*@sk: the socket*@family: unused*@gfp_flags: memory allocation flags* Assign Smack pointers to current* Returns 0 on success, -ENOMEM is there's no memory

Proto:static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags)

Type:int

Parameter:

TypeParameterName
struct sock *sk
intfamily
gfp_tgfp_flags
2246  skp = Present a pointer to the smack label in the current task blob.
2249  ssp = 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).
2250  If (ssp == NULL) Then Return -ENOMEM
2256  If Value for the false possibility is greater at compile time(flags & I am a kernel thread ) Then
2257  inbound label = smack_known_web
2258  outbound label = smack_known_web
2259  Else
2260  inbound label = skp
2261  outbound label = skp
2263  TCP peer label = NULL
2265  sk_security = ssp
2267  Return 0