Wrapper for Syzkaller reproducers
PATCH v4 1/1 Wrapper for Syzkaller reproducers
Allows one to run the Syzkaller reproducers as part of the LTP.
---
V4:
+ Remove space in Makefile x86 check
+ Modify and add to README
.gitmodules | 4 + configure.ac | 12 ++ include/mk/features.mk.in | 2 + runtest/.gitignore | 1 + testcases/kernel/Makefile | 1 + testcases/kernel/syzkaller-repros/.gitignore | 1 + testcases/kernel/syzkaller-repros/Makefile | 105 +++++++++++++++ testcases/kernel/syzkaller-repros/README.md | 70 ++++++++++ testcases/kernel/syzkaller-repros/syzwrap.c | 134 +++++++++++++++++++ testcases/linux-arts | 1 + 10 files changed, 331 insertions(+) create mode 100644 runtest/.gitignore create mode 100644 testcases/kernel/syzkaller-repros/.gitignore create mode 100644 testcases/kernel/syzkaller-repros/Makefile create mode 100644 testcases/kernel/syzkaller-repros/README.md create mode 100644 testcases/kernel/syzkaller-repros/syzwrap.c create mode 160000 testcases/linux-arts
.gitmodules +4 -0
@@ -1,3 +1,7 @@ [submodule "testcases/kernel/mce-test"] path = testcases/kernel/mce-test url = git://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/mce-test.git +[submodule "testcases/linux-arts"] + path = testcases/linux-arts + url = https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-arts.git + shallow = true
configure.ac +12 -0
@@ -271,6 +271,18 @@ else AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) fi +AC_ARG_WITH([syzkaller-repros], + [AC_HELP_STRING([--with-syzkaller-repros], + [compile and install Syzkaller reproducers (default=no)])], + [with_syzkaller_repros=$withval], + [with_syzkaller_repros=no] +) +if test "x$with_syzkaller_repros" = xyes; then + AC_SUBST([WITH_SYZKALLER_REPROS],["yes"]) +else + AC_SUBST([WITH_SYZKALLER_REPROS],["no"]) +fi + # TODO: testcases/realtime requires bash and python. AC_ARG_WITH([realtime-testsuite], [AC_HELP_STRING([--with-realtime-testsuite],
include/mk/features.mk.in +2 -0
@@ -47,3 +47,5 @@ WITH_REALTIME_TESTSUITE := no else WITH_REALTIME_TESTSUITE := @WITH_REALTIME_TESTSUITE@ endif + +WITH_SYZKALLER_REPROS := @WITH_SYZKALLER_REPROS@
runtest/.gitignore new file +1 -0
@@ -0,0 +1 @@ +syzkaller*
testcases/kernel/Makefile +1 -0
@@ -53,6 +53,7 @@ SUBDIRS += connectors \ sched \ security \ sound \ + syzkaller-repros \ tracing \ uevents \
testcases/kernel/syzkaller-repros/.gitignore new file +1 -0
@@ -0,0 +1 @@ +syzwrap
testcases/kernel/syzkaller-repros/Makefile new file +105 -0
105 lines not on this page · raw message
testcases/kernel/syzkaller-repros/README.md new file +70 -0
70 lines not on this page · raw message
testcases/kernel/syzkaller-repros/syzwrap.c new file +134 -0
134 lines not on this page · raw message
testcases/linux-arts new file +1 -0
@@ -0,0 +1 @@ +Subproject commit e39dd38466d956a7a9b6c061163cba783cf09b2e
Signature · 1 line
2.26.2
PATCH v4 1/1 Wrapper for Syzkaller reproducers
Quoted 5 lines · Richard Palethorpe
Allows one to run the Syzkaller reproducers as part of the LTP.
Signed-off-by Richard Palethorpe <[email protected]>Reviewed-by Pter Vorel <[email protected]>
+
testcases/kernel/syzkaller-repros/syzwrap.c line 63
Quoted 4 lines
testcases/kernel/syzkaller-repros/syzwrap.c new file +3
-0+static void setup (void ) +{ +tst_taint_init (TST_TAINT_W |TST_TAINT_D |TST_TAINT_L );
My only concern is that the limitation is too strict for syzkaller.
Because if one of the tests (near the top of the name rankings) trigger a WARNING in SUT kernel, the syzwrap.c will be skipping all remaining test cases.
Maybe we can just use 'TST_TAINT_D' here, and I wish to hear more opinions from others.
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20200615/25a83f68/attachment.htm>
PATCH v4 1/1 Wrapper for Syzkaller reproducers
Hello Li,
Quoted 9 lines · Li Wang
Quoted 5 lines · Richard Palethorpe
Allows one to run the Syzkaller reproducers as part of the LTP.
Signed-off-by Richard Palethorpe <[email protected]>Reviewed-by Pter Vorel <[email protected]>Reviewed-by Li Wang <[email protected]>
Thanks!
Quoted 9 lines
+
testcases/kernel/syzkaller-repros/syzwrap.c line 63
Quoted 4 lines
testcases/kernel/syzkaller-repros/syzwrap.c new file +3
-0+static void setup (void ) +{ +tst_taint_init (TST_TAINT_W |TST_TAINT_D |TST_TAINT_L );My only concern is that the limitation is too strict for syzkaller.
Quoted 10 lines
Because if one of the tests (near the top of the name rankings) trigger a WARNING in SUT kernel, the
syzwrap.cwill be skipping all remaining test cases.Maybe we can just use '
TST_TAINT_D' here, and I wish to hear more opinions from others.Signature · 2 lines
Regards, Li Wang
You should restart/reset the SUT if the kernel is tainted. Please see the README section on test runner requirements.
It might even be best to panic on warn instead of relying on syzwrap or the test runner detecting the taint.
So far I have found enough warnings are caused by bugs that you can't reliably continue testing afterwards.
OTOH the LTP library should maybe provide some args to override taints, but that is not specific to syzwrap.
Signature · 2 lines
Thank you, Richard.