Yanyg - SAN Software Engineer

Linux Kernel Config Notes

目录

本文持续更新

1 CONFIG_DEBUG_ATOMIC_SLEEP

打开此选项时,

  • Sleep inside atomic section checking

2 CONFIG_KASAN - Kernel Address Sanitizer(防毒)

KASAN是动态内存错误检测器,为查找use-after-free(释放后使用)和out-of-bounds(越界使用)提供快速全面的方案。

Ref: https://www.kernel.org/doc/html/v4.12/dev-tools/kasan.html

KernelAddressSANitizer (KASAN) is a dynamic memory error detector. It provides a fast and comprehensive solution for finding use-after-free and out-of-bounds bugs.

KASAN uses compile-time instrumentation for checking every memory access, therefore you will need a GCC version 4.9.2 or later. GCC 5.0 or later is required for detection of out-of-bounds accesses to stack or global variables.

Currently KASAN is supported only for the x86_64 and arm64 architectures.

3 CONFIG_VMAP_STACK - Use a Virtually Mapped Stack(V34.9)

打开此选项调试内存泄漏和访问溢出。

Ref:

Fork Optimize
https://lkml.org/lkml/2016/9/16/178