函数逻辑报告 |
Source Code:lib\test_overflow.c |
Create Date:2022-07-27 07:28:45 |
Last Modify:2022-05-18 10:03:51 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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_devm_kzalloc(void *arg)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
void * | arg |
560 | a等于5乘4096 |
560 | b等于0的反除5乘4096加1 |
560 | ptr等于devm_kzalloc(arg, 1, ((((gfp_t)(0x400u | 0x800u)) | ((gfp_t)0x40u) | ((gfp_t)0x80u)) | ((gfp_t)0x2000u))) |
560 | 如果非ptr则 |
560 | printk("\0014"KBUILD_MODNAME": devm_kzalloc failed regular allocation?!\n", ) |
560 | 返回:1 |
560 | devm_kfree(arg, ptr) |
560 | ptr等于devm_kzalloc(arg, a * b, ((((gfp_t)(0x400u | 0x800u)) | ((gfp_t)0x40u) | ((gfp_t)0x80u)) | ((gfp_t)0x2000u))) |
560 | 如果非ptr则 |
560 | printk("\0014"KBUILD_MODNAME": devm_kzalloc unexpectedly failed bad wrapping?!\n", ) |
560 | 返回:1 |
560 | devm_kfree(arg, ptr) |
560 | ptr等于devm_kzalloc(arg, 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))) |
560 | 如果ptr则 |
560 | printk("\0014"KBUILD_MODNAME": devm_kzalloc missed saturation!\n", ) |
560 | devm_kfree(arg, ptr) |
560 | 返回:1 |
560 | printk("\0016"KBUILD_MODNAME": devm_kzalloc detected saturation\n", ) |
560 | 返回:0 |
名称 | 描述 |
---|---|
test_overflow_allocation | 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())* | | | |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |