Bug 218358 - KASAN (hw-tags): respect page_alloc sampling for large kmalloc
Summary: KASAN (hw-tags): respect page_alloc sampling for large kmalloc
Status: NEW
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Sanitizers (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: MM/Sanitizers virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-10 03:00 UTC by Andrey Konovalov
Modified: 2024-01-10 03:03 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.