github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/tools/syz-trace2syz/proggen/unsupported_calls.go (about)

     1  // Copyright 2018 syzkaller project authors. All rights reserved.
     2  // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  package proggen
     5  
     6  var (
     7  	// unsupportedCalls lists system calls that we should skip when parsing.
     8  	// Some of these are unsupported or not worth executing.
     9  	unsupportedCalls = map[string]bool{
    10  		// While we have system call descriptions for execve it is not worth adding
    11  		// the ones in traces. Every trace has an execve at the beginning which means
    12  		// all the system calls afterwards will not execute
    13  		"execve": true,
    14  		// Unsafe to set the addr argument to some random argument. Needs more care
    15  		"arch_prctl": true,
    16  		// Don't produce multithreaded programs.
    17  		"wait4": true,
    18  		"wait":  true,
    19  		"futex": true,
    20  		// Cannot obtain coverage from the forks.
    21  		"clone": true,
    22  		// Can support these calls but need to identify the ones in the trace that are worth keeping
    23  		"mmap":     true,
    24  		"msync":    true,
    25  		"mremap":   true,
    26  		"mprotect": true,
    27  		"madvise":  true,
    28  		"munmap":   true,
    29  		// Not interesting coverage
    30  		"getcwd": true,
    31  		"getcpu": true,
    32  		// Cannot evaluate sigset
    33  		"rt_sigprocmask":  true,
    34  		"rt_sigtimedwait": true,
    35  		"rt_sigreturn":    true,
    36  		"rt_sigqueueinfo": true,
    37  		"rt_sigsuspend":   true,
    38  		// Require function pointers which are not recovered by strace
    39  		"rt_sigaction": true,
    40  		// These 2 are issued by glibc for every process/thread start.
    41  		// Normal programs don't use them and it's unlikely we build
    42  		// something interesting with them (e.g. we won't get real robust list in memory).
    43  		"set_robust_list": true,
    44  		"set_tid_address": true,
    45  	}
    46  )