Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_overflow.c Create Date:2022-07-28 06:31:05
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_kzalloc(void *arg)

Type:int

Parameter:

TypeParameterName
void *arg
549  a = 5 * 4096
549  b = ~0 / 5 * 4096 + 1
549  ptr = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
549  If Not ptr Then
549  printk("\0014"KBUILD_MODNAME": kzalloc failed regular allocation?!\n", )
549  Return 1
549  kfree(ptr)
549  ptr = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
549  If Not ptr Then
549  printk("\0014"KBUILD_MODNAME": kzalloc unexpectedly failed bad wrapping?!\n", )
549  Return 1
549  kfree(ptr)
549  ptr = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
549  If ptr Then
549  printk("\0014"KBUILD_MODNAME": kzalloc missed saturation!\n", )
549  kfree(ptr)
549  Return 1
549  printk("\0016"KBUILD_MODNAME": kzalloc detected saturation\n", )
549  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())* | | |