Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slob.c Create Date:2022-07-28 15:36:21
Last Modify:2022-05-20 09:26:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:an't use ksize for kmem_cache_alloc memory, only kmalloc

Proto:size_t __ksize(const void *block)

Type:size_t

Parameter:

TypeParameterName
const void *block
568  BUG_ON(!block)
569  If Value for the false possibility is greater at compile time(block == ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.* Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.* ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.* Both make kfree a no-op.) Then Return 0
572  sp = virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(block)
573  If Value for the false possibility is greater at compile time(!PageSlab(sp)) Then Return Returns the number of bytes in this potentially compound page.
576  align = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, ARCH_KMALLOC_MINALIGN, Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.* Intended for arches that get misalignment faults even for 64 bit integer* aligned buffers.)
577  m = block - align
578  Return SLOB_UNITS( * m) * SLOB_UNIT
Caller
NameDescribe
kasan_unpoison_slab