From 23bf86af9a2ba03cda2b5b913bafb76ce8ce14b8 Mon Sep 17 00:00:00 2001 From: Anton Lindqvist Date: Sun, 23 Oct 2022 08:10:02 +0200 Subject: executor: cope with mimmutable(2) on OpenBSD Pages residing in the BSS section are by now flagged as immutable on OpenBSD. Meaning that their corresponding permissions cannot change. The input_data therefore needs to be explicitly marked as mutable. Should hopefully bring syzbot on OpenBSD back. --- executor/executor.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/executor/executor.cc b/executor/executor.cc index 61e669f39..47ecdadeb 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -37,6 +37,12 @@ #define __thread __declspec(thread) #endif +#if GOOS_openbsd +#define MUTABLE __attribute__((section(".openbsd.mutable"))) +#else +#define MUTABLE +#endif + #ifndef GIT_REVISION #define GIT_REVISION "unknown" #endif @@ -220,8 +226,7 @@ static int running; uint32 completed; bool is_kernel_64_bit = true; -ALIGNED(INPUT_DATA_ALIGNMENT) -static char input_data[kMaxInput]; +MUTABLE ALIGNED(INPUT_DATA_ALIGNMENT) static char input_data[kMaxInput]; // Checksum kinds. static const uint64 arg_csum_inet = 0; -- cgit mrf-deployment