error detector. KFENCE detects heap out-of-bounds access, use-after-free, and
invalid-free errors.
-KFENCE is designed to be enabled in production kernels, and has near zero
+KFENCE is designed to be low overhead but does not implement the typical
+memory allocation features for its samples like memory policies, NUMA and
+management of emergency memory pools. It has near zero
performance overhead. Compared to KASAN, KFENCE trades performance for
precision. The main motivation behind KFENCE's design, is that with enough
total uptime KFENCE will detect bugs in code paths not typically exercised by
help
KFENCE is a low-overhead sampling-based detector of heap out-of-bounds
access, use-after-free, and invalid-free errors. KFENCE is designed
- to have negligible cost to permit enabling it in production
- environments.
+ to have negligible cost. KFENCE does not support NUMA features
+ and other memory allocator features for it sample allocations.
See <file:Documentation/dev-tools/kfence.rst> for more details.
detect, albeit at very different performance profiles. If you can
afford to use KASAN, continue using KASAN, for example in test
environments. If your kernel targets production use, and cannot
- enable KASAN due to its cost, consider using KFENCE.
+ enable KASAN due to its cost and you are not using NUMA and have
+ no use of the memory reserve logic of the memory allocators,
+ consider using KFENCE.
if KFENCE