github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/pkg/subsystem/linux/rules.go (about) 1 // Copyright 2023 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 linux 5 6 type customRules struct { 7 // The mapping between a Linux subsystem name and its system calls. 8 subsystemCalls map[string][]string 9 // These emails do not represent separate subsystems, even though they seem to 10 // per all criteria we have. 11 notSubsystemEmails map[string]struct{} 12 // These subsystems need to be extracted even without mailing lists. 13 // Key is the subsystem name, value is the list of raw names in MAINTAINERS. 14 extraSubsystems map[string][]string 15 // For these subsystems we do not generate monthly reminders. 16 noReminders map[string]struct{} 17 // We don't want to tag these subsystems in the reports of its sub-subsystem bugs. 18 noIndirectCc map[string]struct{} 19 // Extra child->[]parent links (on top of the inferred ones). 20 addParents map[string][]string 21 } 22 23 var ( 24 linuxSubsystemRules = &customRules{ 25 subsystemCalls: map[string][]string{ 26 "adfs": {"syz_mount_image$adfs"}, 27 "affs": {"syz_mount_image$affs"}, 28 "bcachefs": {"syz_mount_image$bcachefs"}, 29 "befs": {"syz_mount_image$befs"}, 30 "bfs": {"syz_mount_image$bfs"}, 31 "bluetooth": {"syz_emit_vhci"}, 32 "btrfs": {"syz_mount_image$btrfs"}, 33 "cramfs": {"syz_mount_image$cramfs"}, 34 "efs": {"syz_mount_image$efs"}, 35 "erofs": {"syz_mount_image$erofs"}, 36 "ext4": {"syz_mount_image$ext4"}, 37 "f2fs": {"syz_mount_image$f2fs"}, 38 "fat": { 39 "syz_mount_image$msdos", 40 "syz_mount_image$vfat", 41 "syz_mount_image$exfat", 42 }, 43 "fuse": {"syz_fuse_handle_req"}, 44 "gfs2": {"syz_mount_image$gfs2", "syz_mount_image$gfs2meta"}, 45 "hfs": {"syz_mount_image$hfs", "syz_mount_image$hfsplus"}, 46 "hpfs": {"syz_mount_image$hpfs"}, 47 "input": {"syz_usb_connect$hid"}, 48 "io-uring": {"syz_io_uring_setup"}, 49 "isofs": {"syz_mount_image$iso9660"}, 50 "jffs2": {"syz_mount_image$jffs2"}, 51 "jfs": {"syz_mount_image$jfs"}, 52 "kvm": {"syz_kvm_setup_cpu"}, 53 "minix": {"syz_mount_image$minix"}, 54 "nilfs": {"syz_mount_image$nilfs2"}, 55 "ntfs3": {"syz_mount_image$ntfs", "syz_mount_image$ntfs3"}, 56 "ocfs2": {"syz_mount_image$ocfs2"}, 57 "omfs": {"syz_mount_image$omfs"}, 58 "qnx4": {"syz_mount_image$qnx4"}, 59 "qnx6": {"syz_mount_image$qnx6"}, 60 "reiserfs": {"syz_mount_image$reiserfs"}, 61 "romfs": {"syz_mount_image$romfs"}, 62 "squashfs": {"syz_mount_image$squashfs"}, 63 "sysv": {"syz_mount_image$sysv"}, 64 "tmpfs": {"syz_mount_image$tmpfs"}, 65 "ubifs": {"syz_mount_image$ubifs"}, 66 "udf": {"syz_mount_image$udf"}, 67 "ufs": {"syz_mount_image$ufs"}, 68 "usb": { 69 "syz_usb_connect", 70 "syz_usb_connect$hid", 71 "syz_usb_connect$printer", 72 "syz_usb_connect$cdc_ecm", 73 "syz_usb_connect$cdc_ncm", 74 "syz_usb_connect$uac1", 75 }, 76 "vxfs": {"syz_mount_image$vxfs"}, 77 "wireless": {"syz_80211_join_ibss", "syz_80211_inject_frame"}, 78 "xfs": {"syz_mount_image$xfs"}, 79 "zonefs": {"syz_mount_image$zonefs"}, 80 }, 81 notSubsystemEmails: map[string]struct{}{ 82 "linaro-mm-sig@lists.linaro.org": {}, 83 "samba-technical@lists.samba.org": {}, 84 "storagedev@microchip.com": {}, 85 "coreteam@netfilter.org": {}, 86 "SHA-cyfmac-dev-list@infineon.com": {}, 87 }, 88 extraSubsystems: map[string][]string{ 89 "bfs": {"BFS FILE SYSTEM"}, 90 "exfat": {"EXFAT FILE SYSTEM", "VFAT/FAT/MSDOS FILESYSTEM"}, 91 "fuse": {"FUSE: FILESYSTEM IN USERSPACE"}, 92 "hfs": {"HFS FILESYSTEM", "HFSPLUS FILESYSTEM"}, 93 "isofs": {"ISOFS FILESYSTEM"}, 94 "kernfs": {"KERNFS"}, 95 "udf": {"UDF FILESYSTEM"}, 96 "nfc": {"NFC SUBSYSTEM"}, 97 "iomap": {"FILESYSTEMS [IOMAP]"}, 98 "xfs": {"XFS FILESYSTEM"}, 99 "jffs2": {"JOURNALLING FLASH FILE SYSTEM V2 (JFFS2)"}, 100 }, 101 noReminders: map[string]struct{}{ 102 // Many misclassified bugs end up in `kernel`, so there's no sense 103 // in generating monthly reports for it. 104 "kernel": {}, 105 }, 106 addParents: map[string][]string{ 107 // By MAINTAINERS, wireless is somewhat separate, but it's better to keep it as a net child. 108 "wireless": {"net"}, 109 }, 110 noIndirectCc: map[string]struct{}{ 111 "fs": {}, 112 }, 113 } 114 )