Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Stricly for CIPSO level manipulation.* Set the category bit number in a smack label sized buffer.

Proto:static inline void smack_catset_bit(unsigned int cat, char *catsetp)

Type:void

Parameter:

TypeParameterName
unsigned intcat
char *catsetp
172  If cat == 0 || cat > Maximum number of bytes for the levels in a CIPSO IP option.* Why 23? CIPSO is constrained to 30, so a 32 byte buffer is* bigger than can be used, and 24 is the next lower multiple* of 8, and there are too many issues if there isn't space set * 8 Then Return
175  catsetp[(cat - 1) / 8] |= 0x80 >> (cat - 1) % 8
Caller
NameDescribe
smk_set_cipsosmk_set_cipso - do the work for write() for cipso and cipso2*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start*@format: /smack/cipso or /smack/cipso2