github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/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/pkg/cover"
     8  	"github.com/google/syzkaller/prog"
     9  )
    10  
    11  type netbsd int
    12  
    13  func (netbsd) RequiredFiles() []string {
    14  	return nil
    15  }
    16  
    17  func (netbsd) checkFiles() []string {
    18  	return nil
    19  }
    20  
    21  func (netbsd) parseModules(files filesystem) ([]cover.KernelModule, error) {
    22  	return nil, nil
    23  }
    24  
    25  func (netbsd) machineInfos() []machineInfoFunc {
    26  	return nil
    27  }
    28  
    29  func (netbsd) syscallCheck(ctx *checkContext, call *prog.Syscall) string {
    30  	switch call.CallName {
    31  	case "openat":
    32  		return supportedOpenat(ctx, call)
    33  	case "syz_usb_connect", "syz_usb_disconnect":
    34  		return ctx.rootCanOpen("/dev/vhci0")
    35  	default:
    36  		return ""
    37  	}
    38  }