Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_key_alloc

Proto:static int selinux_key_alloc(struct key *k, const struct cred *cred, unsigned long flags)

Type:int

Parameter:

TypeParameterName
struct key *k
const struct cred *cred
unsigned longflags
6543  ksec = 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).
6544  If Not ksec Then Return -ENOMEM
6547  tsec = selinux_cred(cred)
6548  If keycreate SID Then SID of key = keycreate SID
6550  Else SID of key = current SID
6553  security data for this key = ksec
6554  Return 0