From: Patricia Alfonso <trishalfonso@google.com>
To: davidgow@google.com, brendanhiggins@google.com,
aryabinin@virtuozzo.com, dvyukov@google.com, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org
Cc: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
Patricia Alfonso <trishalfonso@google.com>
Subject: [PATCH v3 0/4] KUnit-KASAN Integration
Date: Wed, 1 Apr 2020 11:09:03 -0700 [thread overview]
Message-ID: <20200401180907.202604-1-trishalfonso@google.com> (raw)
This patchset contains everything needed to integrate KASAN and KUnit.
KUnit will be able to:
(1) Fail tests when an unexpected KASAN error occurs
(2) Pass tests when an expected KASAN error occurs
Convert KASAN tests to KUnit with the exception of copy_user_test
because KUnit is unable to test those.
Add documentation on how to run the KASAN tests with KUnit and what to
expect when running these tests.
Depends on [1].
Changes since v2:
- Due to Alan's changes in [1], KUnit can be built as a module.
- The name of the tests that could not be run with KUnit has been
changed to be more generic: test_kasan_module.
- Documentation on how to run the new KASAN tests and what to expect
when running them has been added.
- Some variables and functions are now static.
- Now save/restore panic_on_warn in a similar way to kasan_multi_shot
and renamed the init/exit functions to be more generic to accommodate.
- Due to [2] in kasan_strings, kasan_memchr, and
kasan_memcmp will fail if CONFIG_AMD_MEM_ENCRYPT is enabled so return
early and print message explaining this circumstance.
- Changed preprocessor checks to C checks where applicable.
[1] https://lore.kernel.org/linux-kselftest/1585313122-26441-1-git-send-email-alan.maguire@oracle.com/T/#t
[2] https://bugzilla.kernel.org/show_bug.cgi?id=206337
Patricia Alfonso (4):
Add KUnit Struct to Current Task
KUnit: KASAN Integration
KASAN: Port KASAN Tests to KUnit
KASAN: Testing Documentation
Documentation/dev-tools/kasan.rst | 70 +++
include/kunit/test.h | 5 +
include/linux/kasan.h | 6 +
include/linux/sched.h | 4 +
lib/Kconfig.kasan | 15 +-
lib/Makefile | 3 +-
lib/kunit/test.c | 13 +-
lib/test_kasan.c | 686 +++++++++++++-----------------
lib/test_kasan_module.c | 76 ++++
mm/kasan/report.c | 33 ++
10 files changed, 521 insertions(+), 390 deletions(-)
create mode 100644 lib/test_kasan_module.c
--
2.26.0.rc2.310.g2932bb562d-goog
next reply other threads:[~2020-04-01 18:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 18:09 Patricia Alfonso [this message]
2020-04-01 18:09 ` [PATCH v3 2/4] KUnit: KASAN Integration Patricia Alfonso
2020-04-02 10:23 ` Dmitry Vyukov
2020-04-02 15:54 ` Andrey Konovalov
2020-04-02 16:37 ` Patricia Alfonso
2020-04-02 16:40 ` Andrey Konovalov
2020-04-01 18:09 ` [PATCH v3 4/4] KASAN: Testing Documentation Patricia Alfonso
2020-04-02 10:34 ` Dmitry Vyukov
2020-04-01 18:09 ` [PATCH v3 1/4] Add KUnit Struct to Current Task Patricia Alfonso
2020-04-01 18:09 ` [PATCH v3 3/4] KASAN: Port KASAN Tests to KUnit Patricia Alfonso
2020-04-02 10:32 ` Dmitry Vyukov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200401180907.202604-1-trishalfonso@google.com \
--to=trishalfonso@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=brendanhiggins@google.com \
--cc=davidgow@google.com \
--cc=dvyukov@google.com \
--cc=juri.lelli@redhat.com \
--cc=kasan-dev@googlegroups.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox