The patch titled Subject: kasan: add compiler barriers to KUNIT_EXPECT_KASAN_FAIL has been removed from the -mm tree. Its filename was kasan-add-compiler-barriers-to-kunit_expect_kasan_fail.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Subject: kasan: add compiler barriers to KUNIT_EXPECT_KASAN_FAIL It might not be obvious to the compiler that the expression must be executed between writing and reading to fail_data. In this case, the compiler might reorder or optimize away some of the accesses, and the tests will fail. Add compiler barriers around the expression in KUNIT_EXPECT_KASAN_FAIL. Link: https://lkml.kernel.org/r/a37dab02f89ad93cc986a87866da74fb8be1850d.1609871239.git.andreyknvl@xxxxxxxxxx Link: https://linux-review.googlesource.com/id/I046079f48641a1d36fe627fc8827a9249102fd50Signed-off-by: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Cc: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Cc: Branislav Rankov <Branislav.Rankov@xxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx> Cc: Evgenii Stepanov <eugenis@xxxxxxxxxx> Cc: Kevin Brodsky <kevin.brodsky@xxxxxxx> Cc: Marco Elver <elver@xxxxxxxxxx> Cc: Vincenzo Frascino <vincenzo.frascino@xxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/test_kasan.c | 2 ++ 1 file changed, 2 insertions(+) --- a/lib/test_kasan.c~kasan-add-compiler-barriers-to-kunit_expect_kasan_fail +++ a/lib/test_kasan.c @@ -79,7 +79,9 @@ static void kasan_test_exit(struct kunit NULL, \ &resource, \ "kasan_data", &fail_data); \ + barrier(); \ expression; \ + barrier(); \ KUNIT_EXPECT_EQ(test, \ fail_data.report_expected, \ fail_data.report_found); \ _ Patches currently in -mm which might be from andreyknvl@xxxxxxxxxx are kasan-fix-hw_tags-boot-parameters.patch kasan-adopt-kmalloc_uaf2-test-to-hw_tags-mode.patch kasan-fix-memory-corruption-in-kasan_bitops_tags-test.patch kasan-fix-bug-detection-via-ksize-for-hw_tags-mode.patch kasan-add-proper-page-allocator-tests.patch