Memory Detection Tool KASAN in the Linux Kernel (8) – Implementation Based on Buddy System

Technical experience sharing, welcome to follow and provide guidance. In “KASAN (7) – Implementation Based on Slab”, the slab situation has been analyzed, but there is still a part based on the buddy system. The implementation of KASAN on the buddy system is quite special, and this article analyzes the KASAN implementation under the buddy … Read more

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

KASAN (4) – Inline Instrumentation Analysis

Technical experience sharing, welcome to follow and provide guidance. In “KASAN (1) – Simple Practice”, we did not explain the configuration CONFIG_KASAN_INLINE in detail, but simply explained it based on the kernel documentation. Here, we will provide a detailed introduction to the inline detection process of KASAN based on practical analysis. What is INLINE Mode … Read more

Linux Kernel Memory Detection Tool KASAN (1) – Simple Practice

Technical experience sharing, welcome to follow and provide guidance. I briefly introduced KASAN in my article “Debugging Memory Leaks in the Kernel”. At that time, my understanding of the implementation principles of KASAN was still shallow. Recently, I plan to comprehensively learn and understand KASAN, and then consolidate my memory by writing this series of … Read more