函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:deflate_compress

函数原型:static int deflate_compress(const char *src, size_t slen, char **dst, size_t *dlen)

返回类型:int

参数:

类型参数名称
const char *src
size_tslen
char **dst
size_t *dlen
1054  stglen等于This function is equivalent to deflateEnd followed by deflateInit,but does not free and reallocate all the internal compression state
1056  memset( & strm, 0, strm的长度)
1058  如果stglen小于slen则返回:负EFBIG
1061  memory allocated for this stream 等于kvzalloc(zlib_deflate_workspacesize(32K LZ77 window , Maximum value for memLevel in deflateInit2 ), GFP_KERNEL)
1064  如果非 memory allocated for this stream 则返回:负ENOMEM
1067  error等于This function adds the data at next_in (avail_in bytes) to the outputhistory without performing any output( & strm, aa_g_rawdata_compression_level)
1068  如果error不等于Allowed flush values; see deflate() and inflate() below for details
1069  error等于负ENOMEM
1070  转到:fail_deflate_init
1073  stgbuf等于kvzalloc(stglen, GFP_KERNEL)
1074  如果非stgbuf
1075  error等于负ENOMEM
1076  转到:fail_stg_alloc
1079  next input byte 等于src
1080  number of bytes available at next_in 等于slen
1081  next output byte should be put there 等于stgbuf
1082  remaining free space at next_out 等于stglen
1084  error等于zlib_deflate( & strm, Z_FINISH)
1085  如果error不等于Z_STREAM_END
1086  error等于负EINVAL
1087  转到:fail_deflate
1089  error等于0
1091  如果Determine if an address is within the vmalloc range* On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there* is no special casing required.
1092  dstbuf等于kvzalloc( total nb of bytes output so far , GFP_KERNEL)
1093  如果dstbuf
1097  否则dstbuf等于krealloc - reallocate memory. The contents will remain unchanged.*@p: object to reallocate memory for.*@new_size: how many bytes of memory are required.*@flags: the type of memory to allocate.* The contents of the object pointed to are preserved up to the
1105  如果非dstbuf
1106  error等于负ENOMEM
1107  转到:fail_deflate
1110  dst等于dstbuf
1111  dlen等于 total nb of bytes output so far
1113  fail_stg_alloc :
1114  zlib_deflateEnd( & strm)
1115  fail_deflate_init :
1116  kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
1117  返回:error
1119  fail_deflate :
1120  kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
1121  转到:fail_stg_alloc
调用者
名称描述
compress_loaddata