RFC kasan: hw_tags: Add option to tag only at allocation time
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 19 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | kasan: hw_tags: Use KASAN_PAGE_REDZONE for vmalloc redzoningmm/ | +1 | 0 replies | |
| 2/2 | kasan: hw_tags: Add boot option to elide free time poisoningDocumentation/ mm/ mm/ | +68 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] kasan: hw_tags: Add option to tag only at allocation time
Introduce a boot option to tag only at allocation time of the objects. This reduces KASAN MTE overhead, the tradeoff being reduced ability of catching bugs.
Now, when a memory object will be freed, it will retain the random tag it had at allocation time. This compromises on catching UAF bugs, till the time the object is not reallocated, at which point it will have a new random tag.
Hence, not catching "use-after-free-before-reallocation" and not catching "double-free" will be the compromise for reduced KASAN overhead.
This is an RFC because we are not clear about the performance benefit.
Android folks, please help with testing!
---
Applies on Linus master (9716c086c8e8).
Dev Jain (2):
kasan: hw_tags: Use KASAN_PAGE_REDZONE for vmalloc redzoning
kasan: hw_tags: Add boot option to elide free time poisoning
Documentation/dev-tools/kasan.rst | 4 +++ mm/kasan/hw_tags.c | 45 +++++++++++++++++++++++++++++-- mm/kasan/kasan.h | 23 +++++++++++++++- 3 files changed, 69 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0