函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_overflow.c Create Date:2022-07-27 07:28:39
Last Modify:2022-05-18 10:03:51 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Allocator uses a trailing node argument --------+ (e.g. kmalloc_node())* Allocator uses the gfp_t argument -----------+ | (e.g. kmalloc())* Allocator uses a special leading argument + | | (e.g. devm_kmalloc())* | | |

函数原型:static int __attribute__((__section__(".init.text"))) __attribute__((__cold__))test_kvmalloc(void *arg)

返回类型:int

参数:

类型参数名称
void *arg
555  a等于5乘4096
555  b等于0的反除5乘4096加1
555  ptr等于kvmalloc(1, ((((gfp_t)(0x400u | 0x800u)) | ((gfp_t)0x40u) | ((gfp_t)0x80u)) | ((gfp_t)0x2000u)))
555  如果非ptr
555  printk("\0014"KBUILD_MODNAME": kvmalloc failed regular allocation?!\n", )
555  返回:1
555  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.
555  ptr等于kvmalloc(a * b, ((((gfp_t)(0x400u | 0x800u)) | ((gfp_t)0x40u) | ((gfp_t)0x80u)) | ((gfp_t)0x2000u)))
555  如果非ptr
555  printk("\0014"KBUILD_MODNAME": kvmalloc unexpectedly failed bad wrapping?!\n", )
555  返回:1
555  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.
555  ptr等于kvmalloc(array_size() - Calculate size of 2-dimensional array.*@a: dimension one*@b: dimension two* Calculates size of 2-dimensional array: @a *@b.* Returns: number of bytes needed to represent the array or SIZE_MAX on* overflow., ((((gfp_t)(0x400u | 0x800u)) | ((gfp_t)0x40u) | ((gfp_t)0x80u)) | ((gfp_t)0x2000u)))
555  如果ptr
555  printk("\0014"KBUILD_MODNAME": kvmalloc missed saturation!\n", )
555  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.
555  返回:1
555  printk("\0016"KBUILD_MODNAME": kvmalloc detected saturation\n", )
555  返回:0
调用者
名称描述
test_overflow_allocationAllocator uses a trailing node argument --------+ (e.g. kmalloc_node())* Allocator uses the gfp_t argument -----------+ | (e.g. kmalloc())* Allocator uses a special leading argument + | | (e.g. devm_kmalloc())* | | |