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

Name:aa_u16_chunck - test and do bounds checking for a u16 size based chunk*@e: serialized data read head (NOT NULL)*@chunk: start address for chunk of data (NOT NULL)* Returns: the size of chunk found with the read head at the end of the chunk.

Proto:static size_t unpack_u16_chunk(struct aa_ext *e, char **chunk)

Type:size_t

Parameter:

TypeParameterName
struct aa_ext *e
char **chunk
224  size = 0
225  pos = pointer to current position in the buffer
227  If Not st if read will be in packed data bounds Then Go to fail
229  size = le16_to_cpu(get value from possibly mis-aligned location((__le16 * )pointer to current position in the buffer ))
230  pointer to current position in the buffer += sizeof(__le16)
231  If Not st if read will be in packed data bounds Then Go to fail
233  chunk = pointer to current position in the buffer
234  pointer to current position in the buffer += size
235  Return size
237  fail :
238  pointer to current position in the buffer = pos
239  Return 0
Caller
NameDescribe
unpack_nameXpack_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
unpack_str