[Backport: fix conflicts with commitd9f210a14d("ANDROID: kunit: Provision kunit as a vendor module") that removed CONFIG_KUNIT checks.] Async mode support has already been implemented in commite80a76aa1a("kasan, arm64: tests supports for HW_TAGS async mode") but then got accidentally broken in commit99734b535d("kasan: detect false-positives in tests"). Restore the changes removed by the latter patch and adapt them for asymm mode: add a sync_fault flag to kunit_kasan_expectation that only get set if the MTE fault was synchronous, and reenable MTE on such faults in tests. Also rename kunit_kasan_expectation to kunit_kasan_status and move its definition to mm/kasan/kasan.h from include/linux/kasan.h, as this structure is only internally used by KASAN. Also put the structure definition under IS_ENABLED(CONFIG_KUNIT). Link: https://lkml.kernel.org/r/133970562ccacc93ba19d754012c562351d4a8c8.1645033139.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Cc: Marco Elver <elver@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit ed6d74446cbfb88c747d4b32477a9d46132694db) Bug: 217222520 Change-Id: I8be7f20e72efe7ad81999dc75c848fb89664602c Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
37 KiB
37 KiB