Bug 212203 - KASAN: use console tracepoints for tests
Summary: KASAN: use console tracepoints for tests
Status: RESOLVED CODE_FIX
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Sanitizers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: MM/Sanitizers virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-09 16:33 UTC by Andrey Konovalov
Modified: 2022-12-24 01:33 UTC (History)
1 user (show)

See Also:
Kernel Version: upstream
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Andrey Konovalov 2021-03-09 16:33:53 UTC
Currently, KASAN-KUnit tests check a per-task flag set in KASAN bug reporting routines to make sure that KASAN can detect bugs as expected. Instead, KASAN could use console tracepoints like KFENCE/KCSAN do.

This will allow to port more tests to KUnit, like ones that trigger a KASAN bug report in a different task (see kasan_rcu_uaf test in lib/test_kasan_module.c).

This will also allow to be perform more checks on the content of reports.
Comment 1 Andrey Konovalov 2022-09-24 20:29:05 UTC
Mailed a patch series that makes KASAN tests use console tracepoints to check whether a report has been printed and makes two more tests KUnit-compatible [1]. Checking reports' contents for correctness is not implemented is this series.

[1] https://lore.kernel.org/linux-mm/653d43e9a6d9aad2ae148a941dab048cb8e765a8.1664044241.git.andreyknvl@google.com/
Comment 2 Andrey Konovalov 2022-12-24 01:33:20 UTC
Resolved with [1].

Checking reports' contents is tracked in [2].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ce0ea19d50e4e97a8da69f616ffa8afbb532a93
[2] https://bugzilla.kernel.org/show_bug.cgi?id=198441

Note You need to log in before you can comment on or make changes to this bug.