github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/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 // TODO: we don't have subsystems for the following mount calls: 27 // - syz_mount_image$adfs 28 // - syz_mount_image$affs 29 // - syz_mount_image$befs 30 // - syz_mount_image$cramfs 31 // - syz_mount_image$efs 32 // - syz_mount_image$hpfs 33 // - syz_mount_image$minix 34 // - syz_mount_image$qnx4 35 // - syz_mount_image$qnx6 36 // - syz_mount_image$romfs 37 // - syz_mount_image$sysv 38 // - syz_mount_image$ufs 39 // - syz_mount_image$vxfs 40 // - syz_mount_image$zonefs 41 42 "bcachefs": {"syz_mount_image$bcachefs"}, 43 "bfs": {"syz_mount_image$bfs"}, 44 "bluetooth": {"syz_emit_vhci"}, 45 "btrfs": {"syz_mount_image$btrfs"}, 46 "erofs": {"syz_mount_image$erofs"}, 47 "ext4": {"syz_mount_image$ext4"}, 48 "f2fs": {"syz_mount_image$f2fs"}, 49 "exfat": { 50 "syz_mount_image$msdos", 51 "syz_mount_image$vfat", 52 "syz_mount_image$exfat", 53 }, 54 "fuse": {"syz_fuse_handle_req"}, 55 "gfs2": {"syz_mount_image$gfs2", "syz_mount_image$gfs2meta"}, 56 "hfs": {"syz_mount_image$hfs", "syz_mount_image$hfsplus"}, 57 "input": {"syz_usb_connect$hid"}, 58 "io-uring": {"syz_io_uring_setup"}, 59 "isofs": {"syz_mount_image$iso9660"}, 60 "jffs2": {"syz_mount_image$jffs2"}, 61 "jfs": {"syz_mount_image$jfs"}, 62 "kvm": {"syz_kvm_setup_cpu", "syz_kvm_vgic_v3_setup", "syz_kvm_setup_syzos_vm", "syz_kvm_add_vcpu"}, 63 "nilfs": {"syz_mount_image$nilfs2"}, 64 "ntfs3": {"syz_mount_image$ntfs", "syz_mount_image$ntfs3"}, 65 "ocfs2": {"syz_mount_image$ocfs2"}, 66 "karma": {"syz_mount_image$omfs"}, 67 "squashfs": {"syz_mount_image$squashfs"}, 68 "mm": {"syz_mount_image$tmpfs"}, 69 "mtd": {"syz_mount_image$ubifs"}, 70 "udf": {"syz_mount_image$udf"}, 71 "usb": { 72 "syz_usb_connect", 73 "syz_usb_connect$hid", 74 "syz_usb_connect$printer", 75 "syz_usb_connect$cdc_ecm", 76 "syz_usb_connect$cdc_ncm", 77 "syz_usb_connect$uac1", 78 }, 79 "wireless": {"syz_80211_join_ibss", "syz_80211_inject_frame"}, 80 "xfs": {"syz_mount_image$xfs"}, 81 }, 82 notSubsystemEmails: map[string]struct{}{ 83 "linaro-mm-sig@lists.linaro.org": {}, 84 "samba-technical@lists.samba.org": {}, 85 "storagedev@microchip.com": {}, 86 "coreteam@netfilter.org": {}, 87 "SHA-cyfmac-dev-list@infineon.com": {}, 88 "brcm80211-dev-list.pdl@broadcom.com": {}, 89 "tomoyo-dev-en@lists.osdn.me": {}, 90 "tomoyo-users-en@lists.osdn.me": {}, 91 "kernel@collabora.com": {}, 92 }, 93 extraSubsystems: map[string][]string{ 94 "bfs": {"BFS FILE SYSTEM"}, 95 "exfat": {"EXFAT FILE SYSTEM", "VFAT/FAT/MSDOS FILESYSTEM"}, 96 "fuse": {"FUSE: FILESYSTEM IN USERSPACE"}, 97 "hfs": {"HFS FILESYSTEM", "HFSPLUS FILESYSTEM"}, 98 "isofs": {"ISOFS FILESYSTEM"}, 99 "kernfs": {"KERNFS"}, 100 "udf": {"UDF FILESYSTEM"}, 101 "nfc": {"NFC SUBSYSTEM"}, 102 "iomap": {"FILESYSTEMS [IOMAP]"}, 103 "xfs": {"XFS FILESYSTEM"}, 104 "jffs2": {"JOURNALLING FLASH FILE SYSTEM V2 (JFFS2)"}, 105 "smc": {"SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS"}, // See #5838. 106 "kvm-x86": {"KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)"}, 107 "comedi": {"COMEDI DRIVERS"}, 108 }, 109 noReminders: map[string]struct{}{ 110 // Many misclassified bugs end up in `kernel`, so there's no sense 111 // in generating monthly reports for it. 112 "kernel": {}, 113 }, 114 addParents: map[string][]string{ 115 // By MAINTAINERS, wireless is somewhat separate, but it's better to keep it as a net child. 116 "wireless": {"net"}, 117 }, 118 noIndirectCc: map[string]struct{}{ 119 "fs": {}, 120 }, 121 } 122 )