github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/pkg/vminfo/netbsd.go (about)

     1  // Copyright 2024 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 vminfo
     5  
     6  import (
     7  	"github.com/google/syzkaller/prog"
     8  )
     9  
    10  type netbsd struct {
    11  	nopChecker
    12  }
    13  
    14  func (netbsd) syscallCheck(ctx *checkContext, call *prog.Syscall) string {
    15  	switch call.CallName {
    16  	case "openat":
    17  		return supportedOpenat(ctx, call)
    18  	case "syz_usb_connect", "syz_usb_disconnect":
    19  		return ctx.rootCanOpen("/dev/vhci0")
    20  	default:
    21  		return ""
    22  	}
    23  }