[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200319164227.87419-1-trishalfonso@google.com>
Date: Thu, 19 Mar 2020 09:42:24 -0700
From: Patricia Alfonso <trishalfonso@...gle.com>
To: davidgow@...gle.com, brendanhiggins@...gle.com,
aryabinin@...tuozzo.com, dvyukov@...gle.com, mingo@...hat.com,
peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org
Cc: linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com,
kunit-dev@...glegroups.com, linux-kselftest@...r.kernel.org,
Patricia Alfonso <trishalfonso@...gle.com>
Subject: [RFC PATCH v2 0/3] KASAN/KUnit Integration
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
KASAN Tests have been converted to KUnit with the exception of
copy_user_test because KUnit is unable to test those. I am working on
documentation on how to use these new tests to be included in the next
version of this patchset.
Changes since v1:
- Make use of Alan Maguire's suggestion to use his patch that allows
static resources for integration instead of adding a new attribute to
the kunit struct
- All KUNIT_EXPECT_KASAN_FAIL statements are local to each test
- The definition of KUNIT_EXPECT_KASAN_FAIL is local to the
test_kasan.c file since it seems this is the only place this will
be used.
- Integration relies on KUnit being builtin
- copy_user_test has been separated into its own file since KUnit
is unable to test these. This can be run as a module just as before,
using CONFIG_TEST_KASAN_USER
- The addition to the current task has been separated into its own
patch as this is a significant enough change to be on its own.
Patricia Alfonso (3):
Add KUnit Struct to Current Task
KUnit: KASAN Integration
KASAN: Port KASAN Tests to KUnit
include/kunit/test.h | 10 +
include/linux/sched.h | 4 +
lib/Kconfig.kasan | 13 +-
lib/Makefile | 1 +
lib/kunit/test.c | 10 +-
lib/test_kasan.c | 639 +++++++++++++++----------------------
lib/test_kasan_copy_user.c | 75 +++++
mm/kasan/report.c | 33 ++
8 files changed, 400 insertions(+), 385 deletions(-)
create mode 100644 lib/test_kasan_copy_user.c
--
2.25.1.696.g5e7596f4ac-goog
Powered by blists - more mailing lists