aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-07 10:50:09 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-07 10:50:09 +0100
commit11cf581658a20cdac580c279fde8893876be46f0 (patch)
tree65fd642f52efce55b14d4d3885ecb94b32fe87ed /executor
parentc8a1847658268fbadf20aa486107f2e553a8c768 (diff)
executor: fix ifdef's for csource
There is test failure on travis: https://travis-ci.org/google/syzkaller/jobs/349948391 I can't reproduce it locally, and it only happened on 1.8, but not on 1.9? But this seems to be what could have provoked such failure.
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h3
-rw-r--r--executor/common_linux.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/executor/common.h b/executor/common.h
index 21fb31e9a..9cc300fb8 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -83,7 +83,8 @@ const int kErrorStatus = 68;
#if defined(SYZ_EXECUTOR) || (defined(SYZ_REPEAT) && defined(SYZ_WAIT_REPEAT)) || \
defined(SYZ_USE_TMP_DIR) || defined(SYZ_TUN_ENABLE) || defined(SYZ_SANDBOX_NAMESPACE) || \
defined(SYZ_SANDBOX_NONE) || defined(SYZ_SANDBOX_SETUID) || defined(__NR_syz_kvm_setup_cpu) || \
- defined(__NR_syz_init_net_socket)
+ defined(__NR_syz_init_net_socket) && \
+ (defined(SYZ_SANDBOX_NONE) || defined(SYZ_SANDBOX_SETUID) || defined(SYZ_SANDBOX_NAMESPACE))
// logical error (e.g. invalid input program), use as an assert() alernative
NORETURN PRINTF static void fail(const char* msg, ...)
{
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 414b80f37..36eff74ef 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -124,7 +124,7 @@
defined(SYZ_USE_TMP_DIR) || defined(SYZ_HANDLE_SEGV) || defined(SYZ_TUN_ENABLE) || \
defined(SYZ_SANDBOX_NAMESPACE) || defined(SYZ_SANDBOX_SETUID) || \
defined(SYZ_SANDBOX_NONE) || defined(SYZ_FAULT_INJECTION) || \
- defined(__NR_syz_kvm_setup_cpu) || defined(__NR_syz_init_net_socket)
+ defined(__NR_syz_kvm_setup_cpu) || defined(__NR_syz_init_net_socket) && (defined(SYZ_SANDBOX_NONE) || defined(SYZ_SANDBOX_SETUID) || defined(SYZ_SANDBOX_NAMESPACE))
// One does not simply exit.
// _exit can in fact fail.
// syzkaller did manage to generate a seccomp filter that prohibits exit_group syscall.