diff options
| author | Anton Lindqvist <anton@basename.se> | 2022-10-23 08:10:02 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-10-23 09:27:08 +0200 |
| commit | 23bf86af9a2ba03cda2b5b913bafb76ce8ce14b8 (patch) | |
| tree | cfb1427860817a42c5f00c9340410f6c43c2e671 /executor | |
| parent | c0b80a55c9c8cfe75e77c555ed0d4ae7aa373cc2 (diff) | |
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.
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/executor.cc | 9 |
1 files 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; |
