Memory Detection Tool KASAN in the Linux Kernel (7) – Implementation Based on Slab

Technical experience sharing, welcome to follow and provide guidance. In the previous article, we detailed the layout of KASAN shadow memory. This article analyzes the implementation principles of KASAN under slab. kmem_cache Layout For the slab layout with KASAN enabled, the structure has undergone some changes, as shown below: struct kmem_cache { …… #ifdef CONFIG_KASAN … Read more

Differences Between kmalloc, malloc, and vmalloc in Linux Systems

malloc: is a function provided by the C standard library, operating in user spaceIt requests memory from the operating system through system calls, then manages these memory pools to allocate to applications. The returned pointer points to a block of memory that is contiguous in the virtual address space, but may not be contiguous at … Read more