Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_sk_alloc_security

Proto:static int selinux_sk_alloc_security(struct sock *sk, int family, gfp_t priority)

Type:int

Parameter:

TypeParameterName
struct sock *sk
intfamily
gfp_tpriority
5139  sksec = 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).
5140  If Not sksec Then Return -ENOMEM
5143  SID of peer = SECINITSID_UNLABELED
5144  SID of this object = SECINITSID_UNLABELED
5145  sock security class = SECCLASS_SOCKET
5146  selinux_netlbl_sk_security_reset(sksec)
5147  sk_security = sksec
5149  Return 0