Skip to content
Commit 2a879ca1 authored by Alexander Potapenko's avatar Alexander Potapenko Committed by Qais Yousef
Browse files

ANDROID: kasan: fix interoperability with KFENCE

MTE-related KASAN changes were preceded by noticeable KASAN refactorings
that were backported to android12-5.10, but not android12-5.4.
As a result, some last-minute mm changes fixing "kfence, kasan: make KFENCE
compatible with KASAN"
(https://android.googlesource.com/kernel/common/+/f03825db4d6834a9d97e96eee2404a36ca79dafa

)
did not make it to android12-5.4.

Given that they do not exist as separate upstream commits and do not
apply cleanly to 5.4 kernels, reimplement them.

These changes boil down to skipping KASAN poisoning for KFENCE-allocated
objects and to resetting the object tag in __kasan_kmalloc().

Bug: 172318110
Bug: 190593700
Signed-off-by: default avatarAlexander Potapenko <glider@google.com>
Change-Id: I117ea37a1d41514a3c5beaf87386bb5f2f0046c8
(cherry picked from commit 2975020cd06cc96fd46258494e5ee10e62fbbeb1)
parent e5f6b8e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment