aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-08-30 21:10:38 -0700
committerDmitry Vyukov <dvyukov@google.com>2018-08-30 21:45:04 -0700
commita4718693a3d9fcabb02299b2ec07c19d8208c539 (patch)
tree4646830d734816c5d6ab7bd5f71338ce3f9b1b54 /executor/executor_linux.h
parent4239b99abbcccac9104facbf2b040a5af4ffe1b1 (diff)
sys/linux: add syz_execute_func
The function executes random code. Update #310
Diffstat (limited to 'executor/executor_linux.h')
-rw-r--r--executor/executor_linux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h
index 2eab98560..c7af48144 100644
--- a/executor/executor_linux.h
+++ b/executor/executor_linux.h
@@ -25,7 +25,7 @@ static void os_init(int argc, char** argv, void* data, size_t data_size)
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
is_kernel_64_bit = detect_kernel_bitness();
- if (mmap(data, data_size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, 0) != data)
+ if (mmap(data, data_size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, 0) != data)
fail("mmap of data segment failed");
}