From b2f369e56e13dc135d57c53210ea7ab38b239e94 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Fri, 4 Oct 2019 13:43:02 +0200 Subject: executor, host, csource: Add support to enable KCSAN By default, the current KCSAN .config does not enable KCSAN during boot, since we encounter races during boot which would prevent syzkaller from ever executing. This adds support to detect if KCSAN is available, and enables it on the fuzzer host. --- executor/common_linux.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index 2d36b998e..13bc71011 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -2778,3 +2778,11 @@ static void setup_binfmt_misc() write_file("/proc/sys/fs/binfmt_misc/register", ":syz1:M:1:\x02::./file0:POC"); } #endif + +#if SYZ_EXECUTOR || SYZ_ENABLE_KCSAN +static void setup_kcsan() +{ + if (!write_file("/proc/kcsaninfo", "on")) + fail("failed to enable KCSAN"); +} +#endif -- cgit mrf-deployment