From 7061d1973b6243565cfac50a853543fdffb5a073 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 23 Nov 2017 08:51:04 +0100 Subject: sys/syz-extract: fix mmap on arm __NR_mmap is missing on arm entirely, so we disable mmap during generate. Patch mmap to mmap2 right in syz-extract, so that mmap is never missing. --- executor/executor_linux.cc | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'executor/executor_linux.cc') diff --git a/executor/executor_linux.cc b/executor/executor_linux.cc index 14eba3ae8..8b38dbf21 100644 --- a/executor/executor_linux.cc +++ b/executor/executor_linux.cc @@ -72,16 +72,6 @@ int main(int argc, char** argv) install_segv_handler(); use_temporary_dir(); -#if defined(__i386__) || defined(__arm__) - // mmap syscall on i386/arm is translated to old_mmap and has different signature. - // As a workaround fix it up to mmap2, which has signature that we expect. - // pkg/csource has the same hack. - for (size_t i = 0; i < sizeof(syscalls) / sizeof(syscalls[0]); i++) { - if (strcmp(syscalls[i].name, "mmap") == 0) - syscalls[i].sys_nr = __NR_mmap2; - } -#endif - int pid = -1; switch (flag_sandbox) { case sandbox_none: -- cgit mrf-deployment