Bug 215583

Summary: KASAN (hw-tags): retry tests when tags accidentally match
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-02-08 21:04:08 UTC
With HW_TAGS KASAN, there's a noticeable probability of neighboring pages/objects getting the same tag, which might lead to test failures. I only observed this with the pagealloc_oob_right() test, but others might be affected as well.

We need to retry running the affected tests if tags happened to match. Currently, only the kmalloc_uaf2() does this.

Or, alternatively, addressing [1] and [2] should fix this as well.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=203505
[2] https://bugzilla.kernel.org/show_bug.cgi?id=212177