syzkaller/executor
Aleksandr Nogikh 3e8f6c2755 executor: make exit code during fail() depend on fault injection
fail()'s are often used during the validation of kernel reactions to
queries that were issued by pseudo syscalls implementations. As fault
injection may cause the kernel not to succeed in handling these
queries (e.g. socket writes or reads may fail), this could ultimately
lead to unwanted "lost connection to test machine" crashes.

In order to avoid this and, on the other hand, to still have the
ability to signal a disastrous situation, the exit code of this
function now depends on the current context.

All fail() invocations during system call execution with enabled fault
injection lead to termination with zero exit code. In all other cases,
the exit code is kFailStatus.

This is achieved by introduction of a special thread-specific variable
`current_thread` that allows to access information about the thread in
which the current code is executing.

Also, this commit eliminates current_cover as it is no longer needed.
2020-09-22 10:12:23 +02:00
..
android executor: minor cleanup of android sandbox 2020-03-11 12:09:17 +01:00
common_akaros.h executor: fix do_sandbox_none on akaros and test 2019-01-31 11:35:53 +01:00
common_bsd.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
common_fuchsia.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
common_kvm_amd64.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
common_kvm_arm64.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
common_linux.h all: integrate with mac80211_hwsim 2020-09-22 10:12:23 +02:00
common_test.h sys/test/test: add a hanging test 2020-09-12 13:03:27 +02:00
common_usb_linux.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
common_usb_netbsd.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
common_usb.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
common_windows.h executor: fix do_sandbox_none on akaros and test 2019-01-31 11:35:53 +01:00
common.h executor: forbid inlining of 'remove_dir' 2020-09-18 09:58:50 +02:00
executor_akaros.h executor: change syscall argument type to intptr_t 2019-05-07 08:48:35 +02:00
executor_bsd.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00
executor_fuchsia.h executor/fuchsia: Don't map memory as executable. 2020-06-05 16:46:48 -03:00
executor_linux.h executor: make exit code during fail() depend on fault injection 2020-09-22 10:12:23 +02:00
executor_test.h executor: change syscall argument type to intptr_t 2019-05-07 08:48:35 +02:00
executor_windows.h executor: change syscall argument type to intptr_t 2019-05-07 08:48:35 +02:00
executor.cc executor: make exit code during fail() depend on fault injection 2020-09-22 10:12:23 +02:00
gen.go executor: enable KVM generator only on AMD64 arch 2020-06-17 17:43:56 +02:00
kvm_gen.cc Makefile: enable clang-tidy in presubmit tests 2020-08-04 16:54:02 +02:00
kvm.h sys: improve kvm description 2017-01-28 19:58:31 +01:00
kvm.S executor: remove unused kvm_asm64_vm86 2019-01-17 10:52:20 +01:00
kvm.S.h all: fix marking of auto-generated files 2020-07-29 13:36:11 +02:00
nocover.h executor: Protect the coverage buffer 2019-06-04 16:24:36 +02:00
stub.go .golangci.yml: enable godot checker 2020-06-05 12:23:19 +02:00
style_test.go executor: fix definition of __NR_io_uring_setup 2020-09-15 08:40:10 +02:00
test_linux.h executor: add some code style checks 2020-08-06 15:27:41 +02:00
test.h executor: warn about C89-style var declarations 2020-08-14 09:40:08 +02:00