From: Patricia Alfonso <trishalfonso@google.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
Brendan Higgins <brendanhiggins@google.com>,
David Gow <davidgow@google.com>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
vincent.guittot@linaro.org, LKML <linux-kernel@vger.kernel.org>,
kasan-dev <kasan-dev@googlegroups.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
kunit-dev@googlegroups.com
Subject: Re: [RFC PATCH 2/2] KUnit: KASAN Integration
Date: Fri, 28 Feb 2020 16:49:52 -0800 [thread overview]
Message-ID: <CAKFsvUJhbk6cOXKgQ1+9=eDRDES1AB0rSTM+zid-yfk2U-qhYw@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+b0LHp15GNchK_TPxaqX8zscqgBw-Jm2Y3yq8Bn=dRbeQ@mail.gmail.com>
On Thu, Feb 27, 2020 at 6:45 AM Dmitry Vyukov <dvyukov@google.com> wrote:
>
> On Thu, Feb 27, 2020 at 3:44 AM 'Patricia Alfonso' via kasan-dev
> <kasan-dev@googlegroups.com> wrote:
> >
> > Integrate KASAN into KUnit testing framework.
> > - Fail tests when KASAN reports an error that is not expected
> > - Use KUNIT_EXPECT_KASAN_FAIL to expect a KASAN error in KASAN tests
> > - KUnit struct added to current task to keep track of the current test
> > from KASAN code
> > - Booleans representing if a KASAN report is expected and if a KASAN
> > report is found added to kunit struct
> > - This prints "line# has passed" or "line# has failed"
> >
> > Signed-off-by: Patricia Alfonso <trishalfonso@google.com>
>
> This does not build for me:
>
> $ make
> scripts/kconfig/conf --syncconfig Kconfig
> CC arch/x86/kernel/asm-offsets.s
> UPD include/generated/asm-offsets.h
> CALL scripts/checksyscalls.sh
> CALL scripts/atomic/check-atomics.sh
> DESCEND objtool
> CC init/main.o
> In file included from ./include/linux/uaccess.h:11,
> from ./arch/x86/include/asm/fpu/xstate.h:5,
> from ./arch/x86/include/asm/pgtable.h:26,
> from ./include/linux/kasan.h:15,
> from ./include/linux/slab.h:136,
> from ./include/kunit/test.h:16,
> from ./include/linux/sched.h:35,
> from ./include/linux/ioprio.h:5,
> from ./include/linux/fs.h:39,
> from ./include/linux/proc_fs.h:9,
> from init/main.c:18:
> ./arch/x86/include/asm/uaccess.h: In function ‘set_fs’:
> ./arch/x86/include/asm/uaccess.h:31:9: error: dereferencing pointer to
> incomplete type ‘struct task_struct’
> 31 | current->thread.addr_limit = fs;
> | ^~
> make[1]: *** [scripts/Makefile.build:268: init/main.o] Error 1
> make: *** [Makefile:1681: init] Error 2
>
>
> On bfdc6d91a25f4545bcd1b12e3219af4838142ef1 config:
> https://pastebin.com/raw/nwnL2N9w
I'm sorry. It seems I only ever tested locally on UML. As Alan
suggested, removing "#include <kunit/test.h>" from
include/linux/sched.h seems to fix this problem.
--
Best,
Patricia Alfonso
next prev parent reply other threads:[~2020-02-29 0:50 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 2:43 [RFC PATCH 1/2] Port KASAN Tests to KUnit Patricia Alfonso
2020-02-27 2:43 ` [RFC PATCH 2/2] KUnit: KASAN Integration Patricia Alfonso
2020-02-27 14:04 ` Alan Maguire
2020-02-29 0:46 ` Patricia Alfonso
2020-03-03 16:40 ` Alan Maguire
2020-03-05 2:14 ` Patricia Alfonso
2020-03-05 7:46 ` Alan Maguire
2020-03-10 21:42 ` Brendan Higgins
2020-03-10 21:42 ` Brendan Higgins
2020-03-10 21:39 ` Brendan Higgins
2020-03-10 21:39 ` Brendan Higgins
2020-02-27 14:39 ` Dmitry Vyukov
2020-02-29 1:09 ` Patricia Alfonso
2020-03-01 6:26 ` Dmitry Vyukov
2020-02-27 14:43 ` Dmitry Vyukov
2020-02-29 1:23 ` Patricia Alfonso
2020-03-01 6:29 ` Dmitry Vyukov
2020-03-04 1:26 ` Patricia Alfonso
2020-03-04 6:23 ` Dmitry Vyukov
2020-03-05 0:07 ` Patricia Alfonso
2020-03-05 6:44 ` Dmitry Vyukov
2020-02-27 14:45 ` Dmitry Vyukov
2020-02-29 0:49 ` Patricia Alfonso [this message]
2020-03-04 6:35 ` Dmitry Vyukov
2020-02-27 13:56 ` [RFC PATCH 1/2] Port KASAN Tests to KUnit Andrey Konovalov
2020-02-27 15:16 ` Alan Maguire
2020-02-27 14:19 ` Dmitry Vyukov
2020-02-29 1:56 ` Patricia Alfonso
2020-03-01 6:39 ` Dmitry Vyukov
2020-03-02 17:52 ` Kees Cook
2020-03-02 22:36 ` Brendan Higgins
2020-03-02 23:02 ` Kees Cook
2020-03-06 23:58 ` Patricia Alfonso
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='CAKFsvUJhbk6cOXKgQ1+9=eDRDES1AB0rSTM+zid-yfk2U-qhYw@mail.gmail.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;
as well as URLs for NNTP newsgroup(s).