]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kasan: test: clean up ksize_uaf
authorAndrey Konovalov <andreyknvl@gmail.com>
Mon, 23 Aug 2021 23:59:25 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:03 +0000 (09:34 +1000)
commitc1f4d699c75a9f53195e813e6e38db4ced1f1514
treef3bb49fadef703001a60445060c0aa4e17ecfc4c
parent97420c52bed1e66bf674fb9c336c78c4565a1d14
kasan: test: clean up ksize_uaf

Some KASAN tests use global variables to store function returns values so
that the compiler doesn't optimize away these functions.

ksize_uaf() doesn't call any functions, so it doesn't need to use
kasan_int_result.  Use volatile accesses instead, to be consistent with
other similar tests.

Link: https://lkml.kernel.org/r/a1fc34faca4650f4a6e4dfb3f8d8d82c82eb953a.1628779805.git.andreyknvl@gmail.com
Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
lib/test_kasan.c