Bug 218358

Summary: KASAN (hw-tags): respect page_alloc sampling for large kmalloc
Product: Memory Management Reporter: Andrey Konovalov (andreyknvl)
Component: SanitizersAssignee: MM/Sanitizers virtual assignee (mm_sanitizers)
Status: NEW ---    
Severity: normal CC: kasan-dev
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Andrey Konovalov 2024-01-10 03:00:08 UTC
Currently, KASAN always poisons/unpoisons large kmalloc allocations (the ones that fall back onto page_alloc) without checking whether the poisoning was excluded due to page_alloc sampling.

We need to add checks similar to the one in kasan_mempool_poison_pages to kasan_mempool_poison_object, kasan_kmalloc_large, and kasan_kfree_large.
Comment 1 Andrey Konovalov 2024-01-10 03:03:32 UTC
This becomes obsolete if https://bugzilla.kernel.org/show_bug.cgi?id=218322 is implemented.