[lkml]   [2020]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 1/2] Port KASAN Tests to KUnit
On Sat, Feb 29, 2020 at 2:56 AM Patricia Alfonso
<> wrote:
> On Thu, Feb 27, 2020 at 6:19 AM Dmitry Vyukov <> wrote:
> >
> > .On Thu, Feb 27, 2020 at 3:44 AM Patricia Alfonso
> > > - pr_info("out-of-bounds in copy_from_user()\n");
> > > - unused = copy_from_user(kmem, usermem, size + 1);
> >
> > Why is all of this removed?
> > Most of these tests are hard earned and test some special corner cases.
> >
> I just moved it inside IS_MODULE(CONFIG_TEST_KASAN) instead because I
> don't think there is a way to rewrite this without it being a module.

You mean these are unconditionally crashing the machine? If yes,
please add a comment about this.

Theoretically we could have a notion of "death tests" similar to gunit:
KUnit test runner wrapper would need to spawn a separete process per
each such test. Under non-KUnit test runner these should probably be
disabled by default and only run if specifically requested (a-la
Could also be used to test other things that unconditionally panic,
e.g. +Kees may be happy for unit tests for some of the
hardening/fortification features.
I am not asking to bundle this with this change of course.

 \ /
  Last update: 2020-03-01 07:40    [W:0.049 / U:3.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site