函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_sk_alloc_security - Allocate a socket blob*@sk: the socket*@family: unused*@gfp_flags: memory allocation flags* Assign Smack pointers to current* Returns 0 on success, -ENOMEM is there's no memory

函数原型:static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags)

返回类型:int

参数:

类型参数名称
struct sock *sk
intfamily
gfp_tgfp_flags
2246  skp等于Present a pointer to the smack label in the current task blob.
2249  ssp等于分配内存并置零
2250  如果(ssp == NULL)则返回:负ENOMEM
2256  如果此条件成立可能性小(为编译器优化)(flags & I am a kernel thread )则
2257  inbound label 等于smack_known_web
2258  outbound label 等于smack_known_web
2259  否则
2260  inbound label 等于skp
2261  outbound label 等于skp
2263  TCP peer label = NULL
2265  sk_security等于ssp
2267  返回:0