diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-25 14:00:41 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-29 14:53:56 +0000 |
| commit | 88ec97282e185df0bdc0d760bcd5f0a2e4891362 (patch) | |
| tree | 95b6a8de04d1edcddd7526df75328c5da8c664df /sys/syz-sysgen | |
| parent | 337657e0d5b5c120b163c09fbcfc49ae5897cb39 (diff) | |
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.
Diffstat (limited to 'sys/syz-sysgen')
| -rw-r--r-- | sys/syz-sysgen/sysgen.go | 7 |
1 files changed, 5 insertions, 2 deletions
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, } } |
