From 88ec97282e185df0bdc0d760bcd5f0a2e4891362 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 25 Apr 2024 14:00:41 +0200 Subject: pkg/host: explicitly disable syz_execute_func Disable the syscall in descriptions rather than in the code. This makes it more visible for users that it's disabled, and makes it less special (will not need to move this logic to host). Also change the condition in syz-sysgen to be more precise, otherwise syz_execute_func becomes unused function. --- sys/syz-sysgen/sysgen.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/syz-sysgen') diff --git a/sys/syz-sysgen/sysgen.go b/sys/syz-sysgen/sysgen.go index 313cb60d8..b1ed731bb 100644 --- a/sys/syz-sysgen/sysgen.go +++ b/sys/syz-sysgen/sysgen.go @@ -12,6 +12,7 @@ import ( "path/filepath" "reflect" "sort" + "strings" "sync" "text/template" @@ -342,8 +343,10 @@ func newSyscallData(target *targets.Target, sc *prog.Syscall, attrs []uint64) Sy Name: sc.Name, CallName: callName, NR: int32(sc.NR), - NeedCall: (!target.HasCallNumber(sc.CallName) || patchCallName) && !sc.Attrs.Disabled, - Attrs: attrs, + NeedCall: (!target.HasCallNumber(sc.CallName) || patchCallName) && + // These are declared in the compiler for internal purposes. + !strings.HasPrefix(sc.Name, "syz_builtin"), + Attrs: attrs, } } -- cgit mrf-deployment