Bug 215758

Summary: KASAN (hw-tags): tag vmalloced per-cpu areas
Product: Memory Management Reporter: Andrey Konovalov (andreyknvl)
Component: SanitizersAssignee: MM/Sanitizers virtual assignee (mm_sanitizers)
Status: NEW ---    
Severity: normal CC: kasan-dev
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: upstream Subsystem:
Regression: No Bisected commit-id:

Description Andrey Konovalov 2022-03-27 15:04:12 UTC
Currently, HW_TAGS KASAN does not tag the per-CPU areas allocated by pcpu_get_vm_areas(). The problem with these is that they are not mapped in mm/vmalloc.c but in percpu-vm.c, and the HW_TAGS mode cannot tag memory before it is mapped.

Add custom annotations to percpu-vm.c to tag these per-CPU areas.

The implementation should be in sync with the SW_TAGS mode.
Comment 1 Andrey Konovalov 2022-03-29 18:02:15 UTC
Related bug: https://bugzilla.kernel.org/show_bug.cgi?id=215019