Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_overflow.c Create Date:2022-07-28 06:31:14
Last Modify:2022-05-18 10:03:51 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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())* | | |

Proto:static int __attribute__((__section__(".init.text"))) __attribute__((__cold__))test_kvzalloc_node(void *arg)

Type:int

Parameter:

TypeParameterName
void *arg
558  a = 5 * 4096
558  b = ~0 / 5 * 4096 + 1
558  ptr = kvzalloc_node(1, ((((gfp_t)(0x400u | 0x800u)) | ((gfp_t)0x40u) | ((gfp_t)0x80u)) | ((gfp_t)0x2000u)), ( - 1))
558  If Not ptr Then
558  printk("\0014"KBUILD_MODNAME": kvzalloc_node failed regular allocation?!\n", )
558  Return 1
558  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.
558  ptr = kvzalloc_node(a * b, ((((gfp_t)(0x400u | 0x800u)) | ((gfp_t)0x40u) | ((gfp_t)0x80u)) | ((gfp_t)0x2000u)), ( - 1))
558  If Not ptr Then
558  printk("\0014"KBUILD_MODNAME": kvzalloc_node unexpectedly failed bad wrapping?!\n", )
558  Return 1
558  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.
558  ptr = kvzalloc_node(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)), ( - 1))
558  If ptr Then
558  printk("\0014"KBUILD_MODNAME": kvzalloc_node missed saturation!\n", )
558  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.
558  Return 1
558  printk("\0016"KBUILD_MODNAME": kvzalloc_node detected saturation\n", )
558  Return 0
Caller
NameDescribe
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())* | | |