函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_socket_getpeersec_stream - pull in packet label*@sock: the socket*@optval: user's destination*@optlen: size thereof*@len: max thereof* returns zero on success, an error code otherwise

函数原型:static int smack_socket_getpeersec_stream(struct socket *sock, char __user *optval, int __user *optlen, unsigned len)

返回类型:int

参数:

类型参数名称
struct socket *sock
char __user *optval
int __user *optlen
unsignedlen
3961  rcp等于""
3962  slen等于1
3963  rc等于0
3965  ssp等于sk_security
3966  如果( TCP peer label != NULL)则
3967  rcp等于smk_known
3968  slen等于strlen - Find the length of a string*@s: The string to be sized加1
3971  如果slen大于lenrc等于负ERANGE
3973  否则如果copy_to_user(optval, rcp, slen)不等于0则rc等于负EFAULT
3976  如果put_user - Write a simple value into user space(slen, optlen)不等于0则rc等于负EFAULT
3979  返回:rc