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. --- pkg/csource/csource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/csource') diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index eda16bca9..d8a4a5a01 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -254,7 +254,7 @@ func (ctx *context) generateSyscallDefines() { if ctx.target.OS == "linux" && ctx.target.PtrSize == 4 { // This is a dirty hack. // On 32-bit linux mmap translated to old_mmap syscall which has a different signature. - // mmap2 has the right signature. executor translates mmap to mmap2, do the same here. + // mmap2 has the right signature. syz-extract translates mmap to mmap2, do the same here. ctx.printf("#undef __NR_mmap\n") ctx.printf("#define __NR_mmap __NR_mmap2\n") } -- cgit mrf-deployment