Re: [PATCH v3 08/15] kasan: add compiler barriers to KUNIT_EXPECT_KASAN_FAIL

2021-01-15 Thread Alexander Potapenko
On Thu, Jan 14, 2021 at 8:36 PM Andrey Konovalov wrote: > > 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

[PATCH v3 08/15] kasan: add compiler barriers to KUNIT_EXPECT_KASAN_FAIL

2021-01-14 Thread Andrey Konovalov
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