diff options
author | Andrey Konovalov <andreyknvl@google.com> | 2021-03-15 16:20:19 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2021-04-11 12:57:45 +0300 |
commit | e80a76aa1a91018d919d2210366943f9bf17009e (patch) | |
tree | 1062ce71ffb0e6a77729fbc3dd1daecadaa01054 /mm/kasan/report.c | |
parent | eab0e6e17d876381b4d47996eef3b5fd46ea4011 (diff) | |
download | linux-e80a76aa1a91018d919d2210366943f9bf17009e.tar.xz |
kasan, arm64: tests supports for HW_TAGS async mode
This change adds KASAN-KUnit tests support for the async HW_TAGS mode.
In async mode, tag fault aren't being generated synchronously when a
bad access happens, but are instead explicitly checked for by the kernel.
As each KASAN-KUnit test expect a fault to happen before the test is over,
check for faults as a part of the test handler.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-10-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'mm/kasan/report.c')
-rw-r--r-- | mm/kasan/report.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 8b0843a2cdd7..14bd51ea2348 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -366,6 +366,11 @@ void kasan_report_async(void) { unsigned long flags; +#if IS_ENABLED(CONFIG_KUNIT) + if (current->kunit_test) + kasan_update_kunit_status(current->kunit_test); +#endif /* IS_ENABLED(CONFIG_KUNIT) */ + start_report(&flags); pr_err("BUG: KASAN: invalid-access\n"); pr_err("Asynchronous mode enabled: no access details available\n"); |