aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vminfo/netbsd.go
blob: 13b666f91aae66df7227f8ae6bb0cf0ded356634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2024 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package vminfo

import (
	"github.com/google/syzkaller/prog"
)

type netbsd struct {
	nopChecker
}

func (netbsd) syscallCheck(ctx *checkContext, call *prog.Syscall) string {
	switch call.CallName {
	case "openat":
		return supportedOpenat(ctx, call)
	case "syz_usb_connect", "syz_usb_disconnect":
		return ctx.rootCanOpen("/dev/vhci0")
	default:
		return ""
	}
}