Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:unpack_secmark

Proto:static bool unpack_secmark(struct aa_ext *e, struct aa_profile *profile)

Type:bool

Parameter:

TypeParameterName
struct aa_ext *e
struct aa_profile *profile
577  pos = pointer to current position in the buffer
580  If pack_nameX - check is the next element is of type X with a name of @name*@e: serialized data extent information (NOT NULL)*@code: type code*@name: name to match to the serialized element Then
581  size = unpack_array(e, NULL)
583  secmark = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
585  If Not secmark Then Go to fail
588  secmark_count = size
590  When i < size cycle
591  If Not unpack_u8(e, & audit, NULL) Then Go to fail
593  If Not unpack_u8(e, & deny, NULL) Then Go to fail
595  If Not unpack_strdup(e, & label, NULL) Then Go to fail
598  If Not pack_nameX - check is the next element is of type X with a name of @name*@e: serialized data extent information (NOT NULL)*@code: type code*@name: name to match to the serialized element Then Go to fail
600  If Not pack_nameX - check is the next element is of type X with a name of @name*@e: serialized data extent information (NOT NULL)*@code: type code*@name: name to match to the serialized element Then Go to fail
604  Return 1
606  fail :
607  If secmark Then
608  When i < size cycle kfree(label)
610  kfree(secmark)
611  secmark_count = 0
612  secmark = NULL
615  pointer to current position in the buffer = pos
616  Return 0
Caller
NameDescribe
unpack_profilepack_profile - unpack a serialized profile*@e: serialized data extent information (NOT NULL)* NOTE: unpack profile sets audit struct if there is a failure