函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smackfs.c Create Date:2022-07-27 20:55:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Stricly for CIPSO level manipulation.* Set the category bit number in a smack label sized buffer.

函数原型:static inline void smack_catset_bit(unsigned int cat, char *catsetp)

返回类型:void

参数:

类型参数名称
unsigned intcat
char *catsetp
172  如果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则返回
175  catsetp[(cat - 1) / 8]或等于0x80右移cat减1的差取模8位
调用者
名称描述
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