syzbot |
sign-in | mailing list | source | docs | ๐ฐ |
| ID | Workflow | Result | Correct | Bug | Created | Started | Finished | Revision | Error |
|---|---|---|---|---|---|---|---|---|---|
| 770c0407-c1fc-4070-a4e7-4ccade9bc122 | patching | โ | KASAN: slab-out-of-bounds Read in mcp2221_raw_event (2) | 2026/05/19 10:04 | 2026/05/19 10:04 | 2026/05/19 11:39 | 223544dc3097d6233a385835bc8dba2b716cc5f0 |
| BaseBranch | master |
| BaseCommit | RC |
| BaseRepository | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git |
| BugTitle | KASAN: slab-out-of-bounds Read in mcp2221_raw_event |
| CrashLogID | 5490884201676800 |
| CrashReportID | 6045328408576000 |
| KernelCommit | 187d0801404f415f22c0b31531982c7ea97fa341 |
| KernelConfig |
Show (270760 bytes)# # Automatically generated file; DO NOT EDIT. # Linux/x86_64 syzkaller Kernel Configuration # CONFIG_CC_VERSION_TEXT="Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136)" CONFIG_GCC_VERSION=0 CONFIG_CC_IS_CLANG=y CONFIG_CLANG_VERSION=200108 CONFIG_AS_IS_LLVM=y CONFIG_AS_VERSION=200108 CONFIG_LD_VERSION=0 CONFIG_LD_IS_LLD=y CONFIG_LLD_VERSION=200108 CONFIG_RUSTC_VERSION=108700 CONFIG_RUST_IS_AVAILABLE=y CONFIG_RUSTC_LLVM_VERSION=200101 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y CONFIG_TOOLS_SUPPORT_RELR=y CONFIG_CC_HAS_ASM_INLINE=y CONFIG_CC_HAS_ASSUME=y CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y CONFIG_CC_HAS_COUNTED_BY=y CONFIG_RUSTC_HAS_SLICE_AS_FLATTENED=y CONFIG_RUSTC_HAS_COERCE_POINTEE=y CONFIG_PAHOLE_VERSION=124 CONFIG_CONSTRUCTORS=y CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_TABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y # # General setup # CONFIG_INIT_ENV_ARG_LIMIT=32 # CONFIG_COMPILE_TEST is not set # CONFIG_WERROR is not set CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_BUILD_SALT="" CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_LZ4=y CONFIG_HAVE_KERNEL_ZSTD=y CONFIG_KERNEL_GZIP=y # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_LZMA is not set # CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set # CONFIG_KERNEL_LZ4 is not set # CONFIG_KERNEL_ZSTD is not set CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_SYSVIPC_COMPAT=y CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_WATCH_QUEUE=y CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_AUDIT=y CONFIG_HAVE_ARCH_AUDITSYSCALL=y CONFIG_AUDITSYSCALL=y # # IRQ subsystem # CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y CONFIG_GENERIC_IRQ_RESERVATION_MODE=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y # CONFIG_GENERIC_IRQ_DEBUGFS is not set # end of IRQ subsystem CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_ARCH_CLOCKSOURCE_INIT=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST_IDLE=y CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y CONFIG_CONTEXT_TRACKING=y CONFIG_CONTEXT_TRACKING_IDLE=y # # Timers subsystem # CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ_COMMON=y # CONFIG_HZ_PERIODIC is not set CONFIG_NO_HZ_IDLE=y # CONFIG_NO_HZ_FULL is not set CONFIG_CONTEXT_TRACKING_USER=y # CONFIG_CONTEXT_TRACKING_USER_FORCE is not set CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=125 CONFIG_POSIX_AUX_CLOCKS=y # end of Timers subsystem CONFIG_BPF=y CONFIG_HAVE_EBPF_JIT=y CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y # # BPF subsystem # CONFIG_BPF_SYSCALL=y CONFIG_BPF_JIT=y CONFIG_BPF_JIT_ALWAYS_ON=y CONFIG_BPF_JIT_DEFAULT_ON=y # CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set CONFIG_BPF_PRELOAD=y CONFIG_BPF_PRELOAD_UMD=y CONFIG_BPF_LSM=y # end of BPF subsystem CONFIG_PREEMPT_BUILD=y CONFIG_ARCH_HAS_PREEMPT_LAZY=y CONFIG_PREEMPT=y # CONFIG_PREEMPT_LAZY is not set CONFIG_PREEMPT_RT=y # CONFIG_PREEMPT_RT_NEEDS_BH_LOCK is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y # # CPU/Task time and stats accounting # CONFIG_VIRT_CPU_ACCOUNTING=y # CONFIG_TICK_CPU_ACCOUNTING is not set CONFIG_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_SCHED_AVG_IRQ=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y CONFIG_TASK_XACCT=y CONFIG_TASK_IO_ACCOUNTING=y CONFIG_PSI=y # CONFIG_PSI_DEFAULT_DISABLED is not set # end of CPU/Task time and stats accounting CONFIG_CPU_ISOLATION=y # # RCU Subsystem # CONFIG_TREE_RCU=y CONFIG_PREEMPT_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_TREE_SRCU=y CONFIG_TASKS_RCU_GENERIC=y CONFIG_NEED_TASKS_RCU=y CONFIG_TASKS_RCU=y CONFIG_TASKS_TRACE_RCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y # CONFIG_RCU_BOOST is not set # end of RCU Subsystem CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_IKHEADERS is not set CONFIG_LOG_BUF_SHIFT=18 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 # CONFIG_PRINTK_INDEX is not set CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y # # Scheduler features # # CONFIG_UCLAMP_TASK is not set # end of Scheduler features CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y CONFIG_CC_HAS_INT128=y CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough" CONFIG_GCC10_NO_ARRAY_BOUNDS=y CONFIG_GCC_NO_STRINGOP_OVERFLOW=y CONFIG_ARCH_SUPPORTS_INT128=y CONFIG_SLAB_OBJ_EXT=y CONFIG_CGROUPS=y CONFIG_PAGE_COUNTER=y # CONFIG_CGROUP_FAVOR_DYNMODS is not set CONFIG_MEMCG=y CONFIG_MEMCG_V1=y CONFIG_BLK_CGROUP=y CONFIG_CGROUP_WRITEBACK=y CONFIG_CGROUP_SCHED=y CONFIG_GROUP_SCHED_WEIGHT=y CONFIG_GROUP_SCHED_BANDWIDTH=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y # CONFIG_RT_GROUP_SCHED is not set CONFIG_SCHED_MM_CID=y CONFIG_CGROUP_PIDS=y CONFIG_CGROUP_RDMA=y # CONFIG_CGROUP_DMEM is not set CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_HUGETLB=y CONFIG_CPUSETS=y # CONFIG_CPUSETS_V1 is not set CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_CPUACCT=y CONFIG_CGROUP_PERF=y # CONFIG_CGROUP_BPF is not set CONFIG_CGROUP_MISC=y CONFIG_CGROUP_DEBUG=y CONFIG_SOCK_CGROUP_DATA=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_TIME_NS=y CONFIG_IPC_NS=y CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_CHECKPOINT_RESTORE=y # CONFIG_SCHED_AUTOGROUP is not set CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_RD_GZIP=y CONFIG_RD_BZIP2=y CONFIG_RD_LZMA=y CONFIG_RD_XZ=y CONFIG_RD_LZO=y CONFIG_RD_LZ4=y CONFIG_RD_ZSTD=y # CONFIG_BOOT_CONFIG is not set CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN=1021 CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_LD_ORPHAN_WARN=y CONFIG_LD_ORPHAN_WARN_LEVEL="warn" CONFIG_SYSCTL=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_SYSFS_SYSCALL=y CONFIG_HAVE_PCSPKR_PLATFORM=y CONFIG_EXPERT=y CONFIG_UID16=y CONFIG_MULTIUSER=y CONFIG_SGETMASK_SYSCALL=y CONFIG_FHANDLE=y CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_PCSPKR_PLATFORM=y # CONFIG_BASE_SMALL is not set CONFIG_FUTEX=y CONFIG_FUTEX_PI=y CONFIG_FUTEX_PRIVATE_HASH=y CONFIG_FUTEX_MPOL=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_IO_URING=y CONFIG_IO_URING_MOCK_FILE=y CONFIG_ADVISE_SYSCALLS=y CONFIG_MEMBARRIER=y CONFIG_KCMP=y CONFIG_RSEQ=y # CONFIG_RSEQ_STATS is not set # CONFIG_RSEQ_DEBUG_DEFAULT_ENABLE is not set CONFIG_CACHESTAT_SYSCALL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_SELFTEST is not set CONFIG_KALLSYMS_ALL=y CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_GUEST_PERF_EVENTS=y # # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y # CONFIG_DEBUG_PERF_USE_VMALLOC is not set # end of Kernel Performance Events And Counters CONFIG_SYSTEM_DATA_VERIFICATION=y CONFIG_PROFILING=y # CONFIG_RUST is not set CONFIG_TRACEPOINTS=y # # Kexec and crash features # CONFIG_CRASH_RESERVE=y CONFIG_VMCORE_INFO=y CONFIG_KEXEC_CORE=y CONFIG_KEXEC=y # CONFIG_KEXEC_FILE is not set # CONFIG_KEXEC_JUMP is not set CONFIG_CRASH_DUMP=y CONFIG_CRASH_HOTPLUG=y CONFIG_CRASH_MAX_MEMORY_RANGES=8192 # end of Kexec and crash features # # Live Update and Kexec HandOver # # CONFIG_KEXEC_HANDOVER is not set # end of Live Update and Kexec HandOver # end of General setup CONFIG_64BIT=y CONFIG_X86_64=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf64-x86-64" CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_MMU=y CONFIG_ARCH_MMAP_RND_BITS_MIN=28 CONFIG_ARCH_MMAP_RND_BITS_MAX=32 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_CSUM=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_AUDIT_ARCH=y CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000 CONFIG_HAVE_INTEL_TXT=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_PGTABLE_LEVELS=5 # # Processor type and features # CONFIG_SMP=y CONFIG_X86_X2APIC=y # CONFIG_X86_POSTED_MSI is not set CONFIG_X86_MPPARSE=y # CONFIG_X86_CPU_RESCTRL is not set CONFIG_X86_FRED=y CONFIG_X86_EXTENDED_PLATFORM=y # CONFIG_X86_NUMACHIP is not set # CONFIG_X86_VSMP is not set # CONFIG_X86_INTEL_MID is not set # CONFIG_X86_GOLDFISH is not set # CONFIG_X86_INTEL_LPSS is not set # CONFIG_X86_AMD_PLATFORM_DEVICE is not set CONFIG_IOSF_MBI=y # CONFIG_IOSF_MBI_DEBUG is not set CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_HYPERVISOR_GUEST=y CONFIG_PARAVIRT=y CONFIG_PARAVIRT_DEBUG=y CONFIG_PARAVIRT_SPINLOCKS=y CONFIG_X86_HV_CALLBACK_VECTOR=y # CONFIG_XEN is not set CONFIG_KVM_GUEST=y CONFIG_ARCH_CPUIDLE_HALTPOLL=y CONFIG_PVH=y # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set CONFIG_PARAVIRT_CLOCK=y # CONFIG_JAILHOUSE_GUEST is not set # CONFIG_ACRN_GUEST is not set # CONFIG_BHYVE_GUEST is not set CONFIG_CC_HAS_MARCH_NATIVE=y # CONFIG_X86_NATIVE_CPU is not set CONFIG_X86_INTERNODE_CACHE_SHIFT=6 CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_TSC=y CONFIG_X86_HAVE_PAE=y CONFIG_X86_CX8=y CONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y CONFIG_IA32_FEAT_CTL=y CONFIG_X86_VMX_FEATURE_NAMES=y CONFIG_PROCESSOR_SELECT=y CONFIG_BROADCAST_TLB_FLUSH=y CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_AMD=y # CONFIG_CPU_SUP_HYGON is not set # CONFIG_CPU_SUP_CENTAUR is not set # CONFIG_CPU_SUP_ZHAOXIN is not set CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_DMI=y # CONFIG_GART_IOMMU is not set CONFIG_BOOT_VESA_SUPPORT=y # CONFIG_MAXSMP is not set CONFIG_NR_CPUS_RANGE_BEGIN=2 CONFIG_NR_CPUS_RANGE_END=512 CONFIG_NR_CPUS_DEFAULT=64 CONFIG_NR_CPUS=8 CONFIG_SCHED_MC_PRIO=y CONFIG_X86_LOCAL_APIC=y CONFIG_ACPI_MADT_WAKEUP=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y CONFIG_X86_MCE=y # CONFIG_X86_MCELOG_LEGACY is not set CONFIG_X86_MCE_INTEL=y CONFIG_X86_MCE_AMD=y CONFIG_X86_MCE_THRESHOLD=y # CONFIG_X86_MCE_INJECT is not set # # Performance monitoring # CONFIG_PERF_EVENTS_INTEL_UNCORE=y CONFIG_PERF_EVENTS_INTEL_RAPL=y CONFIG_PERF_EVENTS_INTEL_CSTATE=y # CONFIG_PERF_EVENTS_AMD_POWER is not set CONFIG_PERF_EVENTS_AMD_UNCORE=y # CONFIG_PERF_EVENTS_AMD_BRS is not set # end of Performance monitoring CONFIG_X86_16BIT=y CONFIG_X86_ESPFIX64=y CONFIG_X86_VSYSCALL_EMULATION=y CONFIG_X86_IOPL_IOPERM=y CONFIG_MICROCODE=y # CONFIG_MICROCODE_LATE_LOADING is not set # CONFIG_MICROCODE_DBG is not set CONFIG_X86_MSR=y CONFIG_X86_CPUID=y CONFIG_X86_DIRECT_GBPAGES=y # CONFIG_X86_CPA_STATISTICS is not set CONFIG_NUMA=y CONFIG_AMD_NUMA=y CONFIG_X86_64_ACPI_NUMA=y CONFIG_NODES_SHIFT=6 CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y # CONFIG_ARCH_MEMORY_PROBE is not set CONFIG_ARCH_PROC_KCORE_TEXT=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 # CONFIG_X86_PMEM_LEGACY is not set # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set CONFIG_MTRR=y # CONFIG_MTRR_SANITIZER is not set CONFIG_X86_PAT=y CONFIG_X86_UMIP=y CONFIG_CC_HAS_IBT=y CONFIG_X86_CET=y CONFIG_X86_KERNEL_IBT=y CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y CONFIG_ARCH_PKEY_BITS=4 # CONFIG_X86_INTEL_TSX_MODE_OFF is not set CONFIG_X86_INTEL_TSX_MODE_ON=y # CONFIG_X86_INTEL_TSX_MODE_AUTO is not set CONFIG_X86_SGX=y CONFIG_X86_USER_SHADOW_STACK=y # CONFIG_INTEL_TDX_HOST is not set # CONFIG_EFI is not set CONFIG_HZ_100=y # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=100 CONFIG_SCHED_HRTICK=y CONFIG_ARCH_SUPPORTS_KEXEC=y CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y CONFIG_ARCH_SUPPORTS_KEXEC_PURGATORY=y CONFIG_ARCH_SUPPORTS_KEXEC_SIG=y CONFIG_ARCH_SUPPORTS_KEXEC_SIG_FORCE=y CONFIG_ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG=y CONFIG_ARCH_SUPPORTS_KEXEC_JUMP=y CONFIG_ARCH_SUPPORTS_KEXEC_HANDOVER=y CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y CONFIG_ARCH_DEFAULT_CRASH_DUMP=y CONFIG_ARCH_SUPPORTS_CRASH_HOTPLUG=y CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y CONFIG_PHYSICAL_START=0x1000000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000 CONFIG_HOTPLUG_CPU=y # CONFIG_COMPAT_VDSO is not set CONFIG_LEGACY_VSYSCALL_XONLY=y # CONFIG_LEGACY_VSYSCALL_NONE is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="earlyprintk=serial net.ifnames=0 sysctl.kernel.hung_task_all_cpu_backtrace=1 ima_policy=tcb nf-conntrack-ftp.ports=20000 nf-conntrack-tftp.ports=20000 nf-conntrack-sip.ports=20000 nf-conntrack-irc.ports=20000 nf-conntrack-sane.ports=20000 binder.debug_mask=0 rcupdate.rcu_expedited=1 rcupdate.rcu_cpu_stall_cputime=1 no_hash_pointers page_owner=on sysctl.vm.nr_hugepages=4 sysctl.vm.nr_overcommit_hugepages=4 secretmem.enable=1 sysctl.max_rcu_stall_to_panic=1 msr.allow_writes=off coredump_filter=0xffff root=/dev/sda console=ttyS0 vsyscall=native numa=fake=2 kvm-intel.nested=1 spec_store_bypass_disable=prctl nopcid vivid.n_devs=64 vivid.multiplanar=1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2 netrom.nr_ndevs=32 rose.rose_ndevs=32 smp.csd_lock_timeout=100000 watchdog_thresh=55 workqueue.watchdog_thresh=140 sysctl.net.core.netdev_unregister_timeout_secs=140 dummy_hcd.num=32 max_loop=32 nbds_max=32 comedi.comedi_num_legacy_minors=4 panic_on_warn=1" # CONFIG_CMDLINE_OVERRIDE is not set CONFIG_MODIFY_LDT_SYSCALL=y # CONFIG_STRICT_SIGALTSTACK_SIZE is not set CONFIG_HAVE_LIVEPATCH=y CONFIG_HAVE_KLP_BUILD=y CONFIG_X86_BUS_LOCK_DETECT=y # end of Processor type and features CONFIG_CC_HAS_SLS=y CONFIG_CC_HAS_RETURN_THUNK=y CONFIG_CC_HAS_ENTRY_PADDING=y CONFIG_FUNCTION_PADDING_CFI=11 CONFIG_FUNCTION_PADDING_BYTES=16 CONFIG_CALL_PADDING=y CONFIG_HAVE_CALL_THUNKS=y CONFIG_CALL_THUNKS=y CONFIG_PREFIX_SYMBOLS=y CONFIG_CPU_MITIGATIONS=y CONFIG_MITIGATION_PAGE_TABLE_ISOLATION=y CONFIG_MITIGATION_RETPOLINE=y CONFIG_MITIGATION_RETHUNK=y CONFIG_MITIGATION_UNRET_ENTRY=y CONFIG_MITIGATION_CALL_DEPTH_TRACKING=y # CONFIG_CALL_THUNKS_DEBUG is not set CONFIG_MITIGATION_IBPB_ENTRY=y CONFIG_MITIGATION_IBRS_ENTRY=y CONFIG_MITIGATION_SRSO=y # CONFIG_MITIGATION_SLS is not set CONFIG_MITIGATION_GDS=y CONFIG_MITIGATION_RFDS=y CONFIG_MITIGATION_SPECTRE_BHI=y CONFIG_MITIGATION_MDS=y CONFIG_MITIGATION_TAA=y CONFIG_MITIGATION_MMIO_STALE_DATA=y CONFIG_MITIGATION_L1TF=y CONFIG_MITIGATION_RETBLEED=y CONFIG_MITIGATION_SPECTRE_V1=y CONFIG_MITIGATION_SPECTRE_V2=y CONFIG_MITIGATION_SRBDS=y CONFIG_MITIGATION_SSB=y CONFIG_MITIGATION_ITS=y CONFIG_MITIGATION_TSA=y # CONFIG_MITIGATION_VMSCAPE is not set CONFIG_ARCH_HAS_ADD_PAGES=y # # Power management and ACPI options # CONFIG_ARCH_HIBERNATION_HEADER=y CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y # CONFIG_SUSPEND_SKIP_SYNC is not set CONFIG_HIBERNATE_CALLBACKS=y CONFIG_HIBERNATION=y CONFIG_HIBERNATION_SNAPSHOT_DEV=y CONFIG_HIBERNATION_COMP_LZO=y # CONFIG_HIBERNATION_COMP_LZ4 is not set CONFIG_HIBERNATION_DEF_COMP="lzo" CONFIG_PM_STD_PARTITION="" CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y # CONFIG_PM_AUTOSLEEP is not set # CONFIG_PM_USERSPACE_AUTOSLEEP is not set # CONFIG_PM_WAKELOCKS is not set # CONFIG_PM_QOS_CPU_SYSTEM_WAKEUP is not set CONFIG_PM=y CONFIG_PM_DEBUG=y # CONFIG_PM_ADVANCED_DEBUG is not set # CONFIG_PM_TEST_SUSPEND is not set CONFIG_PM_SLEEP_DEBUG=y # CONFIG_DPM_WATCHDOG is not set CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y CONFIG_PM_CLK=y # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set # CONFIG_ENERGY_MODEL is not set CONFIG_ARCH_SUPPORTS_ACPI=y CONFIG_ACPI=y CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y CONFIG_ACPI_THERMAL_LIB=y # CONFIG_ACPI_DEBUGGER is not set CONFIG_ACPI_SPCR_TABLE=y # CONFIG_ACPI_FPDT is not set CONFIG_ACPI_LPIT=y CONFIG_ACPI_SLEEP=y CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y CONFIG_ACPI_EC=y # CONFIG_ACPI_EC_DEBUGFS is not set CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_VIDEO=y CONFIG_ACPI_FAN=y # CONFIG_ACPI_TAD is not set CONFIG_ACPI_DOCK=y CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y CONFIG_ACPI_PROCESSOR_IDLE=y CONFIG_ACPI_CPPC_LIB=y CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y # CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set CONFIG_ACPI_THERMAL=y CONFIG_ACPI_PLATFORM_PROFILE=y CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y CONFIG_ACPI_TABLE_UPGRADE=y CONFIG_ACPI_DEBUG=y # CONFIG_ACPI_PCI_SLOT is not set CONFIG_ACPI_CONTAINER=y # CONFIG_ACPI_HOTPLUG_MEMORY is not set CONFIG_ACPI_HOTPLUG_IOAPIC=y # CONFIG_ACPI_SBS is not set # CONFIG_ACPI_HED is not set # CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set CONFIG_ACPI_NHLT=y CONFIG_ACPI_NFIT=y # CONFIG_NFIT_SECURITY_DEBUG is not set CONFIG_ACPI_NUMA=y # CONFIG_ACPI_HMAT is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y # CONFIG_ACPI_APEI is not set # CONFIG_ACPI_DPTF is not set # CONFIG_ACPI_EXTLOG is not set # CONFIG_ACPI_CONFIGFS is not set # CONFIG_ACPI_PFRUT is not set CONFIG_ACPI_PCC=y # CONFIG_ACPI_FFH is not set CONFIG_ACPI_MRRM=y CONFIG_PMIC_OPREGION=y CONFIG_BXT_WC_PMIC_OPREGION=y # CONFIG_CHT_WC_PMIC_OPREGION is not set CONFIG_X86_PM_TIMER=y # # CPU Frequency scaling # CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y # CONFIG_CPU_FREQ_STAT is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y # # CPU frequency scaling drivers # # CONFIG_CPUFREQ_DT is not set # CONFIG_CPUFREQ_DT_PLATDEV is not set CONFIG_X86_INTEL_PSTATE=y # CONFIG_X86_PCC_CPUFREQ is not set CONFIG_X86_AMD_PSTATE=y CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3 # CONFIG_X86_AMD_PSTATE_UT is not set CONFIG_X86_ACPI_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ_CPB=y # CONFIG_X86_POWERNOW_K8 is not set # CONFIG_X86_AMD_FREQ_SENSITIVITY is not set # CONFIG_X86_SPEEDSTEP_CENTRINO is not set # CONFIG_X86_P4_CLOCKMOD is not set # # shared options # CONFIG_CPUFREQ_ARCH_CUR_FREQ=y # end of CPU Frequency scaling # # CPU Idle # CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_CPU_IDLE_GOV_TEO is not set CONFIG_CPU_IDLE_GOV_HALTPOLL=y CONFIG_HALTPOLL_CPUIDLE=y # end of CPU Idle CONFIG_INTEL_IDLE=y # end of Power management and ACPI options # # Bus options (PCI etc.) # CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_MMCONF_FAM10H=y CONFIG_ISA_BUS=y CONFIG_ISA_DMA_API=y CONFIG_AMD_NB=y CONFIG_AMD_NODE=y # end of Bus options (PCI etc.) # # Binary Emulations # CONFIG_IA32_EMULATION=y # CONFIG_IA32_EMULATION_DEFAULT_DISABLED is not set CONFIG_COMPAT_32=y CONFIG_COMPAT=y CONFIG_COMPAT_FOR_U64_ALIGNMENT=y # end of Binary Emulations CONFIG_KVM_COMMON=y CONFIG_HAVE_KVM_PFNCACHE=y CONFIG_HAVE_KVM_IRQCHIP=y CONFIG_HAVE_KVM_IRQ_ROUTING=y CONFIG_HAVE_KVM_DIRTY_RING=y CONFIG_HAVE_KVM_DIRTY_RING_TSO=y CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y CONFIG_KVM_MMIO=y CONFIG_KVM_ASYNC_PF=y CONFIG_HAVE_KVM_MSI=y CONFIG_HAVE_KVM_READONLY_MEM=y CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y CONFIG_KVM_VFIO=y CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y CONFIG_KVM_GENERIC_PRE_FAULT_MEMORY=y CONFIG_KVM_COMPAT=y CONFIG_HAVE_KVM_IRQ_BYPASS=y CONFIG_HAVE_KVM_NO_POLL=y CONFIG_VIRT_XFER_TO_GUEST_WORK=y CONFIG_HAVE_KVM_PM_NOTIFIER=y CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y CONFIG_KVM_GENERIC_MMU_NOTIFIER=y CONFIG_KVM_ELIDE_TLB_FLUSH_IF_YOUNG=y CONFIG_KVM_MMU_LOCKLESS_AGING=y CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES=y CONFIG_KVM_GUEST_MEMFD=y CONFIG_VIRTUALIZATION=y CONFIG_KVM_X86=y CONFIG_KVM=y CONFIG_KVM_SW_PROTECTED_VM=y CONFIG_KVM_INTEL=y # CONFIG_KVM_INTEL_PROVE_VE is not set CONFIG_X86_SGX_KVM=y CONFIG_KVM_AMD=y CONFIG_KVM_IOAPIC=y # CONFIG_KVM_SMM is not set CONFIG_KVM_HYPERV=y CONFIG_KVM_XEN=y CONFIG_KVM_PROVE_MMU=y CONFIG_KVM_MAX_NR_VCPUS=1024 CONFIG_X86_REQUIRED_FEATURE_ALWAYS=y CONFIG_X86_REQUIRED_FEATURE_NOPL=y CONFIG_X86_REQUIRED_FEATURE_CX8=y CONFIG_X86_REQUIRED_FEATURE_CMOV=y CONFIG_X86_REQUIRED_FEATURE_CPUID=y CONFIG_X86_REQUIRED_FEATURE_FPU=y CONFIG_X86_REQUIRED_FEATURE_PAE=y CONFIG_X86_REQUIRED_FEATURE_PSE=y CONFIG_X86_REQUIRED_FEATURE_PGE=y CONFIG_X86_REQUIRED_FEATURE_MSR=y CONFIG_X86_REQUIRED_FEATURE_FXSR=y CONFIG_X86_REQUIRED_FEATURE_XMM=y CONFIG_X86_REQUIRED_FEATURE_XMM2=y CONFIG_X86_REQUIRED_FEATURE_LM=y CONFIG_X86_DISABLED_FEATURE_VME=y CONFIG_X86_DISABLED_FEATURE_K6_MTRR=y CONFIG_X86_DISABLED_FEATURE_CYRIX_ARR=y CONFIG_X86_DISABLED_FEATURE_CENTAUR_MCR=y CONFIG_X86_DISABLED_FEATURE_LAM=y CONFIG_X86_DISABLED_FEATURE_XENPV=y CONFIG_X86_DISABLED_FEATURE_TDX_GUEST=y CONFIG_X86_DISABLED_FEATURE_SEV_SNP=y CONFIG_AS_WRUSS=y CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y # # General architecture-dependent options # CONFIG_HOTPLUG_SMT=y CONFIG_ARCH_SUPPORTS_SCHED_SMT=y CONFIG_ARCH_SUPPORTS_SCHED_CLUSTER=y CONFIG_ARCH_SUPPORTS_SCHED_MC=y CONFIG_SCHED_SMT=y CONFIG_SCHED_CLUSTER=y CONFIG_SCHED_MC=y CONFIG_HOTPLUG_CORE_SYNC=y CONFIG_HOTPLUG_CORE_SYNC_DEAD=y CONFIG_HOTPLUG_CORE_SYNC_FULL=y CONFIG_HOTPLUG_SPLIT_STARTUP=y CONFIG_HOTPLUG_PARALLEL=y CONFIG_GENERIC_IRQ_ENTRY=y CONFIG_GENERIC_SYSCALL=y CONFIG_GENERIC_ENTRY=y # CONFIG_KPROBES is not set CONFIG_JUMP_LABEL=y # CONFIG_STATIC_KEYS_SELFTEST is not set # CONFIG_STATIC_CALL_SELFTEST is not set CONFIG_UPROBES=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_USER_RETURN_NOTIFIER=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_KPROBES_ON_FTRACE=y CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y CONFIG_HAVE_NMI=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_ARCH_HAS_SET_DIRECT_MAP=y CONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y CONFIG_ARCH_HAS_CPU_PASID=y CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y CONFIG_ARCH_WANTS_NO_INSTR=y CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_RSEQ=y CONFIG_HAVE_RUST=y CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y CONFIG_HAVE_PERF_EVENTS_NMI=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y CONFIG_UNWIND_USER=y CONFIG_HAVE_UNWIND_USER_FP=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y CONFIG_MMU_GATHER_TABLE_FREE=y CONFIG_MMU_GATHER_RCU_TABLE_FREE=y CONFIG_MMU_GATHER_MERGE_VMAS=y CONFIG_ARCH_WANT_IRQS_OFF_ACTIVATE_MM=y CONFIG_MMU_LAZY_TLB_REFCOUNT=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_ARCH_HAVE_EXTRA_ELF_NOTES=y CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS=y CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y CONFIG_HAVE_ARCH_SECCOMP=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_SECCOMP=y CONFIG_SECCOMP_FILTER=y # CONFIG_SECCOMP_CACHE_DEBUG is not set CONFIG_HAVE_ARCH_KSTACK_ERASE=y CONFIG_HAVE_STACKPROTECTOR=y CONFIG_STACKPROTECTOR=y CONFIG_STACKPROTECTOR_STRONG=y CONFIG_ARCH_SUPPORTS_LTO_CLANG=y CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y CONFIG_HAS_LTO_CLANG=y CONFIG_LTO_NONE=y # CONFIG_LTO_CLANG_FULL is not set # CONFIG_LTO_CLANG_THIN is not set CONFIG_ARCH_SUPPORTS_AUTOFDO_CLANG=y # CONFIG_AUTOFDO_CLANG is not set CONFIG_ARCH_SUPPORTS_PROPELLER_CLANG=y # CONFIG_PROPELLER_CLANG is not set CONFIG_ARCH_SUPPORTS_CFI=y # CONFIG_CFI is not set CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS=y CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC=y CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y CONFIG_HAVE_CONTEXT_TRACKING_USER=y CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_MOVE_PUD=y CONFIG_HAVE_MOVE_PMD=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y CONFIG_HAVE_ARCH_HUGE_VMAP=y CONFIG_HAVE_ARCH_HUGE_VMALLOC=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_HAVE_ARCH_SOFT_DIRTY=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_ARCH_HAS_EXECMEM_ROX=y CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_HAVE_ARCH_MMAP_RND_BITS=y CONFIG_HAVE_EXIT_THREAD=y CONFIG_ARCH_MMAP_RND_BITS=28 CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8 CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y CONFIG_HAVE_PAGE_SIZE_4KB=y CONFIG_PAGE_SIZE_4KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SHIFT=12 CONFIG_HAVE_OBJTOOL=y CONFIG_HAVE_JUMP_LABEL_HACK=y CONFIG_HAVE_NOINSTR_HACK=y CONFIG_HAVE_NOINSTR_VALIDATION=y CONFIG_HAVE_UACCESS_VALIDATION=y CONFIG_HAVE_STACK_VALIDATION=y CONFIG_HAVE_RELIABLE_STACKTRACE=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_COMPAT_OLD_SIGACTION=y CONFIG_COMPAT_32BIT_TIME=y CONFIG_ARCH_SUPPORTS_RT=y CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y CONFIG_RANDOMIZE_KSTACK_OFFSET=y # CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_STRICT_MODULE_RWX=y CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y # CONFIG_LOCK_EVENT_COUNTS is not set CONFIG_ARCH_HAS_MEM_ENCRYPT=y CONFIG_HAVE_STATIC_CALL=y CONFIG_HAVE_STATIC_CALL_INLINE=y CONFIG_HAVE_PREEMPT_DYNAMIC=y CONFIG_HAVE_PREEMPT_DYNAMIC_CALL=y CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y CONFIG_ARCH_HAS_ELFCORE_COMPAT=y CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y CONFIG_DYNAMIC_SIGFRAME=y CONFIG_HAVE_ARCH_NODE_DEV_GROUP=y CONFIG_ARCH_HAS_HW_PTE_YOUNG=y CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y CONFIG_ARCH_HAS_KERNEL_FPU_SUPPORT=y CONFIG_HAVE_GENERIC_TIF_BITS=y # # GCOV-based kernel profiling # # CONFIG_GCOV_KERNEL is not set CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y CONFIG_FUNCTION_ALIGNMENT_4B=y CONFIG_FUNCTION_ALIGNMENT_16B=y CONFIG_FUNCTION_ALIGNMENT=16 CONFIG_CC_HAS_SANE_FUNCTION_ALIGNMENT=y CONFIG_ARCH_HAS_CPU_ATTACK_VECTORS=y # end of General architecture-dependent options CONFIG_RT_MUTEXES=y CONFIG_MODULE_SIG_FORMAT=y CONFIG_MODULES=y # CONFIG_MODULE_DEBUG is not set # CONFIG_MODULE_FORCE_LOAD is not set CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y # CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set CONFIG_MODVERSIONS=y # CONFIG_GENKSYMS is not set CONFIG_GENDWARFKSYMS=y CONFIG_ASM_MODVERSIONS=y # CONFIG_EXTENDED_MODVERSIONS is not set # CONFIG_BASIC_MODVERSIONS is not set CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_MODULE_SIG=y # CONFIG_MODULE_SIG_FORCE is not set # CONFIG_MODULE_SIG_ALL is not set CONFIG_MODULE_SIG_SHA1=y # CONFIG_MODULE_SIG_SHA256 is not set # CONFIG_MODULE_SIG_SHA384 is not set # CONFIG_MODULE_SIG_SHA512 is not set # CONFIG_MODULE_SIG_SHA3_256 is not set # CONFIG_MODULE_SIG_SHA3_384 is not set # CONFIG_MODULE_SIG_SHA3_512 is not set CONFIG_MODULE_SIG_HASH="sha1" # CONFIG_MODULE_COMPRESS is not set # CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set CONFIG_MODPROBE_PATH="/sbin/modprobe" # CONFIG_TRIM_UNUSED_KSYMS is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y CONFIG_BLOCK_LEGACY_AUTOLOAD=y CONFIG_BLK_RQ_ALLOC_TIME=y CONFIG_BLK_CGROUP_RWSTAT=y CONFIG_BLK_CGROUP_PUNT_BIO=y CONFIG_BLK_DEV_BSG_COMMON=y CONFIG_BLK_ICQ=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y # CONFIG_BLK_DEV_WRITE_MOUNTED is not set CONFIG_BLK_DEV_ZONED=y CONFIG_BLK_DEV_THROTTLING=y CONFIG_BLK_WBT=y CONFIG_BLK_WBT_MQ=y CONFIG_BLK_CGROUP_IOLATENCY=y # CONFIG_BLK_CGROUP_FC_APPID is not set CONFIG_BLK_CGROUP_IOCOST=y CONFIG_BLK_CGROUP_IOPRIO=y CONFIG_BLK_DEBUG_FS=y # CONFIG_BLK_SED_OPAL is not set CONFIG_BLK_INLINE_ENCRYPTION=y CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y # # Partition Types # CONFIG_PARTITION_ADVANCED=y CONFIG_ACORN_PARTITION=y CONFIG_ACORN_PARTITION_CUMANA=y CONFIG_ACORN_PARTITION_EESOX=y CONFIG_ACORN_PARTITION_ICS=y CONFIG_ACORN_PARTITION_ADFS=y CONFIG_ACORN_PARTITION_POWERTEC=y CONFIG_ACORN_PARTITION_RISCIX=y CONFIG_AIX_PARTITION=y CONFIG_OSF_PARTITION=y CONFIG_AMIGA_PARTITION=y CONFIG_ATARI_PARTITION=y CONFIG_MAC_PARTITION=y CONFIG_MSDOS_PARTITION=y CONFIG_BSD_DISKLABEL=y CONFIG_MINIX_SUBPARTITION=y CONFIG_SOLARIS_X86_PARTITION=y CONFIG_UNIXWARE_DISKLABEL=y CONFIG_LDM_PARTITION=y # CONFIG_LDM_DEBUG is not set CONFIG_SGI_PARTITION=y CONFIG_ULTRIX_PARTITION=y CONFIG_SUN_PARTITION=y CONFIG_KARMA_PARTITION=y CONFIG_EFI_PARTITION=y CONFIG_SYSV68_PARTITION=y CONFIG_CMDLINE_PARTITION=y # CONFIG_OF_PARTITION is not set # end of Partition Types CONFIG_BLK_PM=y CONFIG_BLOCK_HOLDER_DEPRECATED=y CONFIG_BLK_MQ_STACKING=y # # IO Schedulers # CONFIG_MQ_IOSCHED_DEADLINE=y CONFIG_MQ_IOSCHED_KYBER=y CONFIG_IOSCHED_BFQ=y CONFIG_BFQ_GROUP_IOSCHED=y CONFIG_BFQ_CGROUP_DEBUG=y # end of IO Schedulers CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PADATA=y CONFIG_ASN1=y CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_RWSEM_SPIN_ON_OWNER=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y CONFIG_FREEZER=y # # Executable file formats # CONFIG_BINFMT_ELF=y CONFIG_COMPAT_BINFMT_ELF=y CONFIG_ELFCORE=y CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y CONFIG_BINFMT_SCRIPT=y CONFIG_BINFMT_MISC=y CONFIG_COREDUMP=y # end of Executable file formats # # Memory Management options # CONFIG_SWAP=y CONFIG_ZSWAP=y CONFIG_ZSWAP_DEFAULT_ON=y CONFIG_ZSWAP_SHRINKER_DEFAULT_ON=y # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842=y # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4 is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4HC is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT="842" CONFIG_ZSMALLOC=y # # Zsmalloc allocator options # # # Zsmalloc is a common backend allocator for zswap & zram # # CONFIG_ZSMALLOC_STAT is not set CONFIG_ZSMALLOC_CHAIN_SIZE=8 # end of Zsmalloc allocator options # # Slab allocator options # CONFIG_SLUB=y CONFIG_KVFREE_RCU_BATCHED=y # CONFIG_SLUB_TINY is not set CONFIG_SLAB_MERGE_DEFAULT=y # CONFIG_SLAB_FREELIST_RANDOM is not set # CONFIG_SLAB_FREELIST_HARDENED is not set # CONFIG_SLAB_BUCKETS is not set # CONFIG_SLUB_STATS is not set CONFIG_SLUB_CPU_PARTIAL=y # CONFIG_RANDOM_KMALLOC_CACHES is not set # end of Slab allocator options # CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set # CONFIG_COMPAT_BRK is not set CONFIG_SPARSEMEM=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_SPARSEMEM_VMEMMAP_PREINIT=y CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=y CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=y CONFIG_ARCH_WANT_HUGETLB_VMEMMAP_PREINIT=y CONFIG_HAVE_GUP_FAST=y CONFIG_NUMA_KEEP_MEMINFO=y CONFIG_MEMORY_ISOLATION=y CONFIG_EXCLUSIVE_SYSTEM_RAM=y CONFIG_HAVE_BOOTMEM_INFO_NODE=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y CONFIG_MEMORY_HOTPLUG=y # CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE is not set CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO=y # CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_KERNEL is not set # CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_MOVABLE is not set CONFIG_MEMORY_HOTREMOVE=y CONFIG_MHP_MEMMAP_ON_MEMORY=y CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y CONFIG_SPLIT_PTE_PTLOCKS=y CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y CONFIG_SPLIT_PMD_PTLOCKS=y CONFIG_MEMORY_BALLOON=y # CONFIG_BALLOON_COMPACTION is not set CONFIG_COMPACTION=y CONFIG_COMPACT_UNEVICTABLE_DEFAULT=0 CONFIG_PAGE_REPORTING=y CONFIG_MIGRATION=y CONFIG_DEVICE_MIGRATION=y CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y CONFIG_CONTIG_ALLOC=y CONFIG_PCP_BATCH_SCALE_MAX=5 CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_MMU_NOTIFIER=y CONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y # CONFIG_MEMORY_FAILURE is not set CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_WANTS_THP_SWAP=y CONFIG_PAGE_MAPCOUNT=y CONFIG_PGTABLE_HAS_HUGE_LEAVES=y CONFIG_HAVE_GIGANTIC_FOLIOS=y CONFIG_ASYNC_KERNEL_PGTABLE_FREE=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_USE_PERCPU_NUMA_NODE_ID=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_CMA=y # CONFIG_CMA_DEBUGFS is not set # CONFIG_CMA_SYSFS is not set CONFIG_CMA_AREAS=20 CONFIG_PAGE_BLOCK_MAX_ORDER=10 CONFIG_MEM_SOFT_DIRTY=y CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set CONFIG_PAGE_IDLE_FLAG=y # CONFIG_IDLE_PAGE_TRACKING is not set CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y CONFIG_ARCH_HAS_ZONE_DMA_SET=y CONFIG_ZONE_DMA=y CONFIG_ZONE_DMA32=y CONFIG_ZONE_DEVICE=y CONFIG_HMM_MIRROR=y CONFIG_GET_FREE_REGION=y CONFIG_DEVICE_PRIVATE=y CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y CONFIG_ARCH_HAS_PKEYS=y CONFIG_ARCH_USES_PG_ARCH_2=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_PERCPU_STATS=y # CONFIG_GUP_TEST is not set # CONFIG_DMAPOOL_TEST is not set CONFIG_ARCH_HAS_PTE_SPECIAL=y CONFIG_MAPPING_DIRTY_HELPERS=y CONFIG_KMAP_LOCAL=y CONFIG_MEMFD_CREATE=y CONFIG_SECRETMEM=y CONFIG_ANON_VMA_NAME=y CONFIG_HAVE_ARCH_USERFAULTFD_WP=y CONFIG_HAVE_ARCH_USERFAULTFD_MINOR=y CONFIG_USERFAULTFD=y # CONFIG_PTE_MARKER_UFFD_WP is not set # CONFIG_LRU_GEN is not set CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y CONFIG_PER_VMA_LOCK=y CONFIG_LOCK_MM_AND_FIND_VMA=y CONFIG_IOMMU_MM_DATA=y CONFIG_EXECMEM=y CONFIG_NUMA_MEMBLKS=y CONFIG_NUMA_EMU=y CONFIG_ARCH_HAS_USER_SHADOW_STACK=y CONFIG_ARCH_SUPPORTS_PT_RECLAIM=y CONFIG_PT_RECLAIM=y # # Data Access Monitoring # CONFIG_DAMON=y CONFIG_DAMON_VADDR=y CONFIG_DAMON_PADDR=y # CONFIG_DAMON_SYSFS is not set CONFIG_DAMON_RECLAIM=y # CONFIG_DAMON_LRU_SORT is not set # CONFIG_DAMON_STAT is not set # end of Data Access Monitoring # end of Memory Management options CONFIG_NET=y CONFIG_WANT_COMPAT_NETLINK_MESSAGES=y CONFIG_COMPAT_NETLINK_MESSAGES=y CONFIG_NET_INGRESS=y CONFIG_NET_EGRESS=y CONFIG_NET_XGRESS=y CONFIG_NET_REDIRECT=y CONFIG_SKB_DECRYPTED=y CONFIG_SKB_EXTENSIONS=y CONFIG_NET_DEVMEM=y CONFIG_NET_SHAPER=y CONFIG_NET_CRC32C=y # # Networking options # CONFIG_PACKET=y CONFIG_PACKET_DIAG=y CONFIG_INET_PSP=y CONFIG_UNIX=y CONFIG_AF_UNIX_OOB=y CONFIG_UNIX_DIAG=y CONFIG_TLS=y CONFIG_TLS_DEVICE=y CONFIG_TLS_TOE=y CONFIG_XFRM=y CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=y CONFIG_XFRM_USER=y CONFIG_XFRM_USER_COMPAT=y CONFIG_XFRM_INTERFACE=y CONFIG_XFRM_SUB_POLICY=y CONFIG_XFRM_MIGRATE=y CONFIG_XFRM_STATISTICS=y CONFIG_XFRM_AH=y CONFIG_XFRM_ESP=y CONFIG_XFRM_IPCOMP=y CONFIG_NET_KEY=y CONFIG_NET_KEY_MIGRATE=y # CONFIG_XFRM_IPTFS is not set CONFIG_XFRM_ESPINTCP=y CONFIG_SMC=y CONFIG_SMC_DIAG=y CONFIG_SMC_HS_CTRL_BPF=y CONFIG_DIBS=y CONFIG_DIBS_LO=y CONFIG_XDP_SOCKETS=y CONFIG_XDP_SOCKETS_DIAG=y CONFIG_NET_HANDSHAKE=y CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y CONFIG_IP_FIB_TRIE_STATS=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_MULTIPATH=y CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_ROUTE_CLASSID=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_RARP=y CONFIG_NET_IPIP=y CONFIG_NET_IPGRE_DEMUX=y CONFIG_NET_IP_TUNNEL=y CONFIG_NET_IPGRE=y CONFIG_NET_IPGRE_BROADCAST=y CONFIG_IP_MROUTE_COMMON=y CONFIG_IP_MROUTE=y CONFIG_IP_MROUTE_MULTIPLE_TABLES=y CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y CONFIG_SYN_COOKIES=y CONFIG_NET_IPVTI=y CONFIG_NET_UDP_TUNNEL=y CONFIG_NET_FOU=y CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_INET_AH=y CONFIG_INET_ESP=y CONFIG_INET_ESP_OFFLOAD=y CONFIG_INET_ESPINTCP=y CONFIG_INET_IPCOMP=y CONFIG_INET_TABLE_PERTURB_ORDER=16 CONFIG_INET_XFRM_TUNNEL=y CONFIG_INET_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_INET_UDP_DIAG=y CONFIG_INET_RAW_DIAG=y CONFIG_INET_DIAG_DESTROY=y CONFIG_TCP_CONG_ADVANCED=y CONFIG_TCP_CONG_BIC=y CONFIG_TCP_CONG_CUBIC=y CONFIG_TCP_CONG_WESTWOOD=y CONFIG_TCP_CONG_HTCP=y CONFIG_TCP_CONG_HSTCP=y CONFIG_TCP_CONG_HYBLA=y CONFIG_TCP_CONG_VEGAS=y CONFIG_TCP_CONG_NV=y CONFIG_TCP_CONG_SCALABLE=y CONFIG_TCP_CONG_LP=y CONFIG_TCP_CONG_VENO=y CONFIG_TCP_CONG_YEAH=y CONFIG_TCP_CONG_ILLINOIS=y CONFIG_TCP_CONG_DCTCP=y CONFIG_TCP_CONG_CDG=y CONFIG_TCP_CONG_BBR=y # CONFIG_DEFAULT_BIC is not set CONFIG_DEFAULT_CUBIC=y # CONFIG_DEFAULT_HTCP is not set # CONFIG_DEFAULT_HYBLA is not set # CONFIG_DEFAULT_VEGAS is not set # CONFIG_DEFAULT_VENO is not set # CONFIG_DEFAULT_WESTWOOD is not set # CONFIG_DEFAULT_DCTCP is not set # CONFIG_DEFAULT_CDG is not set # CONFIG_DEFAULT_BBR is not set # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_AO is not set CONFIG_TCP_MD5SIG=y CONFIG_IPV6=y CONFIG_IPV6_ROUTER_PREF=y CONFIG_IPV6_ROUTE_INFO=y CONFIG_IPV6_OPTIMISTIC_DAD=y CONFIG_INET6_AH=y CONFIG_INET6_ESP=y CONFIG_INET6_ESP_OFFLOAD=y CONFIG_INET6_ESPINTCP=y CONFIG_INET6_IPCOMP=y CONFIG_IPV6_MIP6=y CONFIG_IPV6_ILA=y CONFIG_INET6_XFRM_TUNNEL=y CONFIG_INET6_TUNNEL=y CONFIG_IPV6_VTI=y CONFIG_IPV6_SIT=y CONFIG_IPV6_SIT_6RD=y CONFIG_IPV6_NDISC_NODETYPE=y CONFIG_IPV6_TUNNEL=y CONFIG_IPV6_GRE=y CONFIG_IPV6_FOU=y CONFIG_IPV6_FOU_TUNNEL=y CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_SUBTREES=y CONFIG_IPV6_MROUTE=y CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y CONFIG_IPV6_PIMSM_V2=y CONFIG_IPV6_SEG6_LWTUNNEL=y CONFIG_IPV6_SEG6_HMAC=y CONFIG_IPV6_SEG6_BPF=y CONFIG_IPV6_RPL_LWTUNNEL=y # CONFIG_IPV6_IOAM6_LWTUNNEL is not set CONFIG_NETLABEL=y CONFIG_MPTCP=y CONFIG_INET_MPTCP_DIAG=y CONFIG_MPTCP_IPV6=y CONFIG_NETWORK_SECMARK=y CONFIG_NET_PTP_CLASSIFY=y # CONFIG_NETWORK_PHY_TIMESTAMPING is not set CONFIG_NETFILTER=y CONFIG_NETFILTER_ADVANCED=y CONFIG_BRIDGE_NETFILTER=y # # Core Netfilter Configuration # CONFIG_NETFILTER_INGRESS=y CONFIG_NETFILTER_EGRESS=y CONFIG_NETFILTER_SKIP_EGRESS=y CONFIG_NETFILTER_NETLINK=y CONFIG_NETFILTER_FAMILY_BRIDGE=y CONFIG_NETFILTER_FAMILY_ARP=y CONFIG_NETFILTER_BPF_LINK=y # CONFIG_NETFILTER_NETLINK_HOOK is not set CONFIG_NETFILTER_NETLINK_ACCT=y CONFIG_NETFILTER_NETLINK_QUEUE=y CONFIG_NETFILTER_NETLINK_LOG=y CONFIG_NETFILTER_NETLINK_OSF=y CONFIG_NF_CONNTRACK=y CONFIG_NF_LOG_SYSLOG=y CONFIG_NETFILTER_CONNCOUNT=y CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_ZONES=y # CONFIG_NF_CONNTRACK_PROCFS is not set CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_TIMEOUT=y CONFIG_NF_CONNTRACK_TIMESTAMP=y CONFIG_NF_CONNTRACK_LABELS=y CONFIG_NF_CONNTRACK_OVS=y CONFIG_NF_CT_PROTO_GRE=y CONFIG_NF_CT_PROTO_SCTP=y CONFIG_NF_CT_PROTO_UDPLITE=y CONFIG_NF_CONNTRACK_AMANDA=y CONFIG_NF_CONNTRACK_FTP=y CONFIG_NF_CONNTRACK_H323=y CONFIG_NF_CONNTRACK_IRC=y CONFIG_NF_CONNTRACK_BROADCAST=y CONFIG_NF_CONNTRACK_NETBIOS_NS=y CONFIG_NF_CONNTRACK_SNMP=y CONFIG_NF_CONNTRACK_PPTP=y CONFIG_NF_CONNTRACK_SANE=y CONFIG_NF_CONNTRACK_SIP=y CONFIG_NF_CONNTRACK_TFTP=y CONFIG_NF_CT_NETLINK=y CONFIG_NF_CT_NETLINK_TIMEOUT=y CONFIG_NF_CT_NETLINK_HELPER=y CONFIG_NETFILTER_NETLINK_GLUE_CT=y CONFIG_NF_NAT=y CONFIG_NF_NAT_AMANDA=y CONFIG_NF_NAT_FTP=y CONFIG_NF_NAT_IRC=y CONFIG_NF_NAT_SIP=y CONFIG_NF_NAT_TFTP=y CONFIG_NF_NAT_REDIRECT=y CONFIG_NF_NAT_MASQUERADE=y CONFIG_NF_NAT_OVS=y CONFIG_NETFILTER_SYNPROXY=y CONFIG_NF_TABLES=y CONFIG_NF_TABLES_INET=y CONFIG_NF_TABLES_NETDEV=y CONFIG_NFT_NUMGEN=y CONFIG_NFT_CT=y CONFIG_NFT_EXTHDR_DCCP=y CONFIG_NFT_FLOW_OFFLOAD=y CONFIG_NFT_CONNLIMIT=y CONFIG_NFT_LOG=y CONFIG_NFT_LIMIT=y CONFIG_NFT_MASQ=y CONFIG_NFT_REDIR=y CONFIG_NFT_NAT=y CONFIG_NFT_TUNNEL=y CONFIG_NFT_QUEUE=y CONFIG_NFT_QUOTA=y CONFIG_NFT_REJECT=y CONFIG_NFT_REJECT_INET=y CONFIG_NFT_COMPAT=y CONFIG_NFT_HASH=y CONFIG_NFT_FIB=y CONFIG_NFT_FIB_INET=y CONFIG_NFT_XFRM=y CONFIG_NFT_SOCKET=y CONFIG_NFT_OSF=y CONFIG_NFT_TPROXY=y CONFIG_NFT_SYNPROXY=y CONFIG_NF_DUP_NETDEV=y CONFIG_NFT_DUP_NETDEV=y CONFIG_NFT_FWD_NETDEV=y CONFIG_NFT_FIB_NETDEV=y CONFIG_NFT_REJECT_NETDEV=y CONFIG_NF_FLOW_TABLE_INET=y CONFIG_NF_FLOW_TABLE=y # CONFIG_NF_FLOW_TABLE_PROCFS is not set CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XTABLES_COMPAT=y # # Xtables combined modules # CONFIG_NETFILTER_XT_MARK=y CONFIG_NETFILTER_XT_CONNMARK=y CONFIG_NETFILTER_XT_SET=y # # Xtables targets # CONFIG_NETFILTER_XT_TARGET_AUDIT=y CONFIG_NETFILTER_XT_TARGET_CHECKSUM=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y CONFIG_NETFILTER_XT_TARGET_CONNMARK=y CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y # CONFIG_NETFILTER_XT_TARGET_CT is not set CONFIG_NETFILTER_XT_TARGET_DSCP=y # CONFIG_NETFILTER_XT_TARGET_HL is not set CONFIG_NETFILTER_XT_TARGET_HMARK=y CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y CONFIG_NETFILTER_XT_TARGET_LED=y CONFIG_NETFILTER_XT_TARGET_LOG=y CONFIG_NETFILTER_XT_TARGET_MARK=y CONFIG_NETFILTER_XT_NAT=y # CONFIG_NETFILTER_XT_TARGET_NETMAP is not set CONFIG_NETFILTER_XT_TARGET_NFLOG=y CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y CONFIG_NETFILTER_XT_TARGET_RATEEST=y # CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set CONFIG_NETFILTER_XT_TARGET_MASQUERADE=y CONFIG_NETFILTER_XT_TARGET_TEE=y CONFIG_NETFILTER_XT_TARGET_TPROXY=y CONFIG_NETFILTER_XT_TARGET_SECMARK=y CONFIG_NETFILTER_XT_TARGET_TCPMSS=y CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=y # # Xtables matches # CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y CONFIG_NETFILTER_XT_MATCH_BPF=y CONFIG_NETFILTER_XT_MATCH_CGROUP=y CONFIG_NETFILTER_XT_MATCH_CLUSTER=y CONFIG_NETFILTER_XT_MATCH_COMMENT=y CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y CONFIG_NETFILTER_XT_MATCH_CONNLABEL=y CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y CONFIG_NETFILTER_XT_MATCH_CONNMARK=y CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y CONFIG_NETFILTER_XT_MATCH_CPU=y CONFIG_NETFILTER_XT_MATCH_DCCP=y CONFIG_NETFILTER_XT_MATCH_DEVGROUP=y CONFIG_NETFILTER_XT_MATCH_DSCP=y CONFIG_NETFILTER_XT_MATCH_ECN=y CONFIG_NETFILTER_XT_MATCH_ESP=y CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y CONFIG_NETFILTER_XT_MATCH_HELPER=y CONFIG_NETFILTER_XT_MATCH_HL=y CONFIG_NETFILTER_XT_MATCH_IPCOMP=y CONFIG_NETFILTER_XT_MATCH_IPRANGE=y CONFIG_NETFILTER_XT_MATCH_IPVS=y CONFIG_NETFILTER_XT_MATCH_L2TP=y CONFIG_NETFILTER_XT_MATCH_LENGTH=y CONFIG_NETFILTER_XT_MATCH_LIMIT=y CONFIG_NETFILTER_XT_MATCH_MAC=y CONFIG_NETFILTER_XT_MATCH_MARK=y CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y CONFIG_NETFILTER_XT_MATCH_NFACCT=y CONFIG_NETFILTER_XT_MATCH_OSF=y CONFIG_NETFILTER_XT_MATCH_OWNER=y CONFIG_NETFILTER_XT_MATCH_POLICY=y CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y CONFIG_NETFILTER_XT_MATCH_QUOTA=y CONFIG_NETFILTER_XT_MATCH_RATEEST=y CONFIG_NETFILTER_XT_MATCH_REALM=y CONFIG_NETFILTER_XT_MATCH_RECENT=y CONFIG_NETFILTER_XT_MATCH_SCTP=y CONFIG_NETFILTER_XT_MATCH_SOCKET=y CONFIG_NETFILTER_XT_MATCH_STATE=y CONFIG_NETFILTER_XT_MATCH_STATISTIC=y CONFIG_NETFILTER_XT_MATCH_STRING=y CONFIG_NETFILTER_XT_MATCH_TCPMSS=y CONFIG_NETFILTER_XT_MATCH_TIME=y CONFIG_NETFILTER_XT_MATCH_U32=y # end of Core Netfilter Configuration CONFIG_IP_SET=y CONFIG_IP_SET_MAX=256 CONFIG_IP_SET_BITMAP_IP=y CONFIG_IP_SET_BITMAP_IPMAC=y CONFIG_IP_SET_BITMAP_PORT=y CONFIG_IP_SET_HASH_IP=y CONFIG_IP_SET_HASH_IPMARK=y CONFIG_IP_SET_HASH_IPPORT=y CONFIG_IP_SET_HASH_IPPORTIP=y CONFIG_IP_SET_HASH_IPPORTNET=y CONFIG_IP_SET_HASH_IPMAC=y CONFIG_IP_SET_HASH_MAC=y CONFIG_IP_SET_HASH_NETPORTNET=y CONFIG_IP_SET_HASH_NET=y CONFIG_IP_SET_HASH_NETNET=y CONFIG_IP_SET_HASH_NETPORT=y CONFIG_IP_SET_HASH_NETIFACE=y CONFIG_IP_SET_LIST_SET=y CONFIG_IP_VS=y CONFIG_IP_VS_IPV6=y # CONFIG_IP_VS_DEBUG is not set CONFIG_IP_VS_TAB_BITS=12 # # IPVS transport protocol load balancing support # CONFIG_IP_VS_PROTO_TCP=y CONFIG_IP_VS_PROTO_UDP=y CONFIG_IP_VS_PROTO_AH_ESP=y CONFIG_IP_VS_PROTO_ESP=y CONFIG_IP_VS_PROTO_AH=y CONFIG_IP_VS_PROTO_SCTP=y # # IPVS scheduler # CONFIG_IP_VS_RR=y CONFIG_IP_VS_WRR=y CONFIG_IP_VS_LC=y CONFIG_IP_VS_WLC=y CONFIG_IP_VS_FO=y CONFIG_IP_VS_OVF=y CONFIG_IP_VS_LBLC=y CONFIG_IP_VS_LBLCR=y CONFIG_IP_VS_DH=y CONFIG_IP_VS_SH=y CONFIG_IP_VS_MH=y CONFIG_IP_VS_SED=y CONFIG_IP_VS_NQ=y CONFIG_IP_VS_TWOS=y # # IPVS SH scheduler # CONFIG_IP_VS_SH_TAB_BITS=8 # # IPVS MH scheduler # CONFIG_IP_VS_MH_TAB_INDEX=12 # # IPVS application helper # CONFIG_IP_VS_FTP=y CONFIG_IP_VS_NFCT=y CONFIG_IP_VS_PE_SIP=y # # IP: Netfilter Configuration # CONFIG_NF_DEFRAG_IPV4=y CONFIG_NF_SOCKET_IPV4=y CONFIG_NF_TPROXY_IPV4=y CONFIG_NF_TABLES_IPV4=y CONFIG_NFT_REJECT_IPV4=y CONFIG_NFT_DUP_IPV4=y CONFIG_NFT_FIB_IPV4=y CONFIG_NF_TABLES_ARP=y CONFIG_NF_DUP_IPV4=y CONFIG_NF_LOG_ARP=y CONFIG_NF_LOG_IPV4=y CONFIG_NF_REJECT_IPV4=y CONFIG_NF_NAT_SNMP_BASIC=y CONFIG_NF_NAT_PPTP=y CONFIG_NF_NAT_H323=y CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_AH=y CONFIG_IP_NF_MATCH_ECN=y CONFIG_IP_NF_MATCH_RPFILTER=y CONFIG_IP_NF_MATCH_TTL=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_SYNPROXY=y CONFIG_IP_NF_TARGET_ECN=y CONFIG_NFT_COMPAT_ARP=y CONFIG_IP_NF_ARP_MANGLE=y # end of IP: Netfilter Configuration # # IPv6: Netfilter Configuration # CONFIG_NF_SOCKET_IPV6=y CONFIG_NF_TPROXY_IPV6=y CONFIG_NF_TABLES_IPV6=y CONFIG_NFT_REJECT_IPV6=y CONFIG_NFT_DUP_IPV6=y CONFIG_NFT_FIB_IPV6=y CONFIG_NF_DUP_IPV6=y CONFIG_NF_REJECT_IPV6=y CONFIG_NF_LOG_IPV6=y CONFIG_IP6_NF_IPTABLES=y CONFIG_IP6_NF_MATCH_AH=y CONFIG_IP6_NF_MATCH_EUI64=y CONFIG_IP6_NF_MATCH_FRAG=y CONFIG_IP6_NF_MATCH_OPTS=y CONFIG_IP6_NF_MATCH_HL=y CONFIG_IP6_NF_MATCH_IPV6HEADER=y CONFIG_IP6_NF_MATCH_MH=y CONFIG_IP6_NF_MATCH_RPFILTER=y CONFIG_IP6_NF_MATCH_RT=y CONFIG_IP6_NF_MATCH_SRH=y CONFIG_IP6_NF_TARGET_REJECT=y CONFIG_IP6_NF_TARGET_SYNPROXY=y CONFIG_IP6_NF_TARGET_NPT=y # end of IPv6: Netfilter Configuration CONFIG_NF_DEFRAG_IPV6=y CONFIG_NF_TABLES_BRIDGE=y CONFIG_NFT_BRIDGE_META=y CONFIG_NFT_BRIDGE_REJECT=y CONFIG_NF_CONNTRACK_BRIDGE=y CONFIG_BRIDGE_NF_EBTABLES=y CONFIG_BRIDGE_EBT_802_3=y CONFIG_BRIDGE_EBT_AMONG=y CONFIG_BRIDGE_EBT_ARP=y CONFIG_BRIDGE_EBT_IP=y CONFIG_BRIDGE_EBT_IP6=y CONFIG_BRIDGE_EBT_LIMIT=y CONFIG_BRIDGE_EBT_MARK=y CONFIG_BRIDGE_EBT_PKTTYPE=y CONFIG_BRIDGE_EBT_STP=y CONFIG_BRIDGE_EBT_VLAN=y CONFIG_BRIDGE_EBT_ARPREPLY=y CONFIG_BRIDGE_EBT_DNAT=y CONFIG_BRIDGE_EBT_MARK_T=y CONFIG_BRIDGE_EBT_REDIRECT=y CONFIG_BRIDGE_EBT_SNAT=y CONFIG_BRIDGE_EBT_LOG=y CONFIG_BRIDGE_EBT_NFLOG=y CONFIG_IP_SCTP=y # CONFIG_SCTP_DBG_OBJCNT is not set CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA256=y # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set CONFIG_INET_SCTP_DIAG=y CONFIG_RDS=y CONFIG_RDS_RDMA=y CONFIG_RDS_TCP=y # CONFIG_RDS_DEBUG is not set CONFIG_TIPC=y CONFIG_TIPC_MEDIA_IB=y CONFIG_TIPC_MEDIA_UDP=y CONFIG_TIPC_CRYPTO=y CONFIG_TIPC_DIAG=y CONFIG_ATM=y CONFIG_ATM_CLIP=y # CONFIG_ATM_CLIP_NO_ICMP is not set CONFIG_ATM_LANE=y CONFIG_ATM_MPOA=y CONFIG_ATM_BR2684=y # CONFIG_ATM_BR2684_IPFILTER is not set CONFIG_L2TP=y # CONFIG_L2TP_DEBUGFS is not set CONFIG_L2TP_V3=y CONFIG_L2TP_IP=y CONFIG_L2TP_ETH=y CONFIG_STP=y CONFIG_GARP=y CONFIG_MRP=y CONFIG_BRIDGE=y CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_BRIDGE_MRP=y CONFIG_BRIDGE_CFM=y CONFIG_NET_DSA=y # CONFIG_NET_DSA_TAG_NONE is not set # CONFIG_NET_DSA_TAG_AR9331 is not set CONFIG_NET_DSA_TAG_BRCM_COMMON=y CONFIG_NET_DSA_TAG_BRCM=y # CONFIG_NET_DSA_TAG_BRCM_LEGACY is not set # CONFIG_NET_DSA_TAG_BRCM_LEGACY_FCS is not set CONFIG_NET_DSA_TAG_BRCM_PREPEND=y # CONFIG_NET_DSA_TAG_HELLCREEK is not set # CONFIG_NET_DSA_TAG_GSWIP is not set # CONFIG_NET_DSA_TAG_DSA is not set # CONFIG_NET_DSA_TAG_EDSA is not set CONFIG_NET_DSA_TAG_MTK=y # CONFIG_NET_DSA_TAG_MXL_GSW1XX is not set # CONFIG_NET_DSA_TAG_KSZ is not set # CONFIG_NET_DSA_TAG_OCELOT is not set # CONFIG_NET_DSA_TAG_OCELOT_8021Q is not set CONFIG_NET_DSA_TAG_QCA=y CONFIG_NET_DSA_TAG_RTL4_A=y # CONFIG_NET_DSA_TAG_RTL8_4 is not set # CONFIG_NET_DSA_TAG_RZN1_A5PSW is not set # CONFIG_NET_DSA_TAG_LAN9303 is not set # CONFIG_NET_DSA_TAG_SJA1105 is not set # CONFIG_NET_DSA_TAG_TRAILER is not set # CONFIG_NET_DSA_TAG_VSC73XX_8021Q is not set # CONFIG_NET_DSA_TAG_XRS700X is not set # CONFIG_NET_DSA_TAG_YT921X is not set CONFIG_VLAN_8021Q=y CONFIG_VLAN_8021Q_GVRP=y CONFIG_VLAN_8021Q_MVRP=y CONFIG_LLC=y CONFIG_LLC2=y # CONFIG_ATALK is not set CONFIG_X25=y CONFIG_LAPB=y CONFIG_PHONET=y CONFIG_6LOWPAN=y # CONFIG_6LOWPAN_DEBUGFS is not set CONFIG_6LOWPAN_NHC=y CONFIG_6LOWPAN_NHC_DEST=y CONFIG_6LOWPAN_NHC_FRAGMENT=y CONFIG_6LOWPAN_NHC_HOP=y CONFIG_6LOWPAN_NHC_IPV6=y CONFIG_6LOWPAN_NHC_MOBILITY=y CONFIG_6LOWPAN_NHC_ROUTING=y CONFIG_6LOWPAN_NHC_UDP=y CONFIG_6LOWPAN_GHC_EXT_HDR_HOP=y CONFIG_6LOWPAN_GHC_UDP=y CONFIG_6LOWPAN_GHC_ICMPV6=y CONFIG_6LOWPAN_GHC_EXT_HDR_DEST=y CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG=y CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE=y CONFIG_IEEE802154=y CONFIG_IEEE802154_NL802154_EXPERIMENTAL=y CONFIG_IEEE802154_SOCKET=y CONFIG_IEEE802154_6LOWPAN=y CONFIG_MAC802154=y CONFIG_NET_SCHED=y # # Queueing/Scheduling # CONFIG_NET_SCH_HTB=y CONFIG_NET_SCH_HFSC=y CONFIG_NET_SCH_PRIO=y CONFIG_NET_SCH_MULTIQ=y CONFIG_NET_SCH_RED=y CONFIG_NET_SCH_SFB=y CONFIG_NET_SCH_SFQ=y CONFIG_NET_SCH_TEQL=y CONFIG_NET_SCH_TBF=y CONFIG_NET_SCH_CBS=y CONFIG_NET_SCH_ETF=y CONFIG_NET_SCH_MQPRIO_LIB=y CONFIG_NET_SCH_TAPRIO=y CONFIG_NET_SCH_GRED=y CONFIG_NET_SCH_NETEM=y CONFIG_NET_SCH_DRR=y CONFIG_NET_SCH_MQPRIO=y CONFIG_NET_SCH_SKBPRIO=y CONFIG_NET_SCH_CHOKE=y CONFIG_NET_SCH_QFQ=y CONFIG_NET_SCH_CODEL=y CONFIG_NET_SCH_FQ_CODEL=y CONFIG_NET_SCH_CAKE=y CONFIG_NET_SCH_FQ=y CONFIG_NET_SCH_HHF=y CONFIG_NET_SCH_PIE=y CONFIG_NET_SCH_FQ_PIE=y CONFIG_NET_SCH_INGRESS=y CONFIG_NET_SCH_PLUG=y CONFIG_NET_SCH_ETS=y # CONFIG_NET_SCH_DUALPI2 is not set CONFIG_NET_SCH_DEFAULT=y # CONFIG_DEFAULT_FQ is not set CONFIG_DEFAULT_CODEL=y # CONFIG_DEFAULT_FQ_CODEL is not set # CONFIG_DEFAULT_FQ_PIE is not set # CONFIG_DEFAULT_SFQ is not set # CONFIG_DEFAULT_PFIFO_FAST is not set CONFIG_DEFAULT_NET_SCH="pfifo_fast" # # Classification # CONFIG_NET_CLS=y CONFIG_NET_CLS_BASIC=y CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_FW=y CONFIG_NET_CLS_U32=y CONFIG_CLS_U32_PERF=y CONFIG_CLS_U32_MARK=y CONFIG_NET_CLS_FLOW=y CONFIG_NET_CLS_CGROUP=y CONFIG_NET_CLS_BPF=y CONFIG_NET_CLS_FLOWER=y CONFIG_NET_CLS_MATCHALL=y CONFIG_NET_EMATCH=y CONFIG_NET_EMATCH_STACK=32 CONFIG_NET_EMATCH_CMP=y CONFIG_NET_EMATCH_NBYTE=y CONFIG_NET_EMATCH_U32=y CONFIG_NET_EMATCH_META=y CONFIG_NET_EMATCH_TEXT=y CONFIG_NET_EMATCH_CANID=y CONFIG_NET_EMATCH_IPSET=y CONFIG_NET_EMATCH_IPT=y CONFIG_NET_CLS_ACT=y CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_GACT=y CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=y CONFIG_NET_ACT_SAMPLE=y CONFIG_NET_ACT_NAT=y CONFIG_NET_ACT_PEDIT=y CONFIG_NET_ACT_SIMP=y CONFIG_NET_ACT_SKBEDIT=y CONFIG_NET_ACT_CSUM=y CONFIG_NET_ACT_MPLS=y CONFIG_NET_ACT_VLAN=y CONFIG_NET_ACT_BPF=y CONFIG_NET_ACT_CONNMARK=y CONFIG_NET_ACT_CTINFO=y CONFIG_NET_ACT_SKBMOD=y CONFIG_NET_ACT_IFE=y CONFIG_NET_ACT_TUNNEL_KEY=y CONFIG_NET_ACT_CT=y CONFIG_NET_ACT_GATE=y CONFIG_NET_IFE_SKBMARK=y CONFIG_NET_IFE_SKBPRIO=y CONFIG_NET_IFE_SKBTCINDEX=y CONFIG_NET_TC_SKB_EXT=y CONFIG_NET_SCH_FIFO=y CONFIG_DCB=y CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=y CONFIG_BATMAN_ADV_BATMAN_V=y CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_MCAST=y # CONFIG_BATMAN_ADV_DEBUG is not set # CONFIG_BATMAN_ADV_TRACING is not set CONFIG_OPENVSWITCH=y CONFIG_OPENVSWITCH_GRE=y CONFIG_OPENVSWITCH_VXLAN=y CONFIG_OPENVSWITCH_GENEVE=y CONFIG_VSOCKETS=y CONFIG_VSOCKETS_DIAG=y CONFIG_VSOCKETS_LOOPBACK=y # CONFIG_VMWARE_VMCI_VSOCKETS is not set CONFIG_VIRTIO_VSOCKETS=y CONFIG_VIRTIO_VSOCKETS_COMMON=y CONFIG_NETLINK_DIAG=y CONFIG_MPLS=y CONFIG_NET_MPLS_GSO=y CONFIG_MPLS_ROUTING=y CONFIG_MPLS_IPTUNNEL=y CONFIG_NET_NSH=y CONFIG_HSR=y CONFIG_NET_SWITCHDEV=y CONFIG_NET_L3_MASTER_DEV=y CONFIG_QRTR=y CONFIG_QRTR_TUN=y # CONFIG_QRTR_MHI is not set CONFIG_NET_NCSI=y # CONFIG_NCSI_OEM_CMD_GET_MAC is not set # CONFIG_NCSI_OEM_CMD_KEEP_PHY is not set # CONFIG_PCPU_DEV_REFCNT is not set CONFIG_MAX_SKB_FRAGS=17 CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_SOCK_RX_QUEUE_MAPPING=y CONFIG_XPS=y CONFIG_CGROUP_NET_PRIO=y CONFIG_CGROUP_NET_CLASSID=y CONFIG_BQL=y CONFIG_NET_FLOW_LIMIT=y # # Network testing # # CONFIG_NET_PKTGEN is not set CONFIG_NET_DROP_MONITOR=y # end of Network testing # end of Networking options CONFIG_HAMRADIO=y # # Packet Radio protocols # CONFIG_AX25=y CONFIG_AX25_DAMA_SLAVE=y CONFIG_NETROM=y CONFIG_ROSE=y # # AX.25 network device drivers # CONFIG_MKISS=y CONFIG_6PACK=y CONFIG_BPQETHER=y # CONFIG_BAYCOM_SER_FDX is not set # CONFIG_BAYCOM_SER_HDX is not set # CONFIG_BAYCOM_PAR is not set # CONFIG_YAM is not set # end of AX.25 network device drivers CONFIG_CAN=y CONFIG_CAN_RAW=y CONFIG_CAN_BCM=y CONFIG_CAN_GW=y CONFIG_CAN_J1939=y CONFIG_CAN_ISOTP=y CONFIG_BT=y CONFIG_BT_BREDR=y CONFIG_BT_RFCOMM=y CONFIG_BT_RFCOMM_TTY=y CONFIG_BT_BNEP=y CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y CONFIG_BT_HIDP=y CONFIG_BT_LE=y CONFIG_BT_LE_L2CAP_ECRED=y CONFIG_BT_6LOWPAN=y CONFIG_BT_LEDS=y CONFIG_BT_MSFTEXT=y # CONFIG_BT_AOSPEXT is not set # CONFIG_BT_DEBUGFS is not set # CONFIG_BT_SELFTEST is not set # # Bluetooth device drivers # CONFIG_BT_INTEL=y CONFIG_BT_BCM=y CONFIG_BT_RTL=y CONFIG_BT_QCA=y CONFIG_BT_MTK=y CONFIG_BT_HCIBTUSB=y CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_POLL_SYNC=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB_MTK=y CONFIG_BT_HCIBTUSB_RTL=y # CONFIG_BT_HCIBTSDIO is not set CONFIG_BT_HCIUART=y CONFIG_BT_HCIUART_SERDEV=y CONFIG_BT_HCIUART_H4=y # CONFIG_BT_HCIUART_NOKIA is not set CONFIG_BT_HCIUART_BCSP=y # CONFIG_BT_HCIUART_ATH3K is not set CONFIG_BT_HCIUART_LL=y CONFIG_BT_HCIUART_3WIRE=y # CONFIG_BT_HCIUART_INTEL is not set # CONFIG_BT_HCIUART_BCM is not set # CONFIG_BT_HCIUART_RTL is not set CONFIG_BT_HCIUART_QCA=y CONFIG_BT_HCIUART_AG6XX=y CONFIG_BT_HCIUART_MRVL=y # CONFIG_BT_HCIUART_AML is not set CONFIG_BT_HCIBCM203X=y # CONFIG_BT_HCIBCM4377 is not set CONFIG_BT_HCIBPA10X=y CONFIG_BT_HCIBFUSB=y # CONFIG_BT_HCIDTL1 is not set # CONFIG_BT_HCIBT3C is not set # CONFIG_BT_HCIBLUECARD is not set CONFIG_BT_HCIVHCI=y CONFIG_BT_MRVL=y CONFIG_BT_MRVL_SDIO=y CONFIG_BT_ATH3K=y CONFIG_BT_MTKSDIO=y CONFIG_BT_MTKUART=y # CONFIG_BT_VIRTIO is not set # CONFIG_BT_NXPUART is not set # CONFIG_BT_INTEL_PCIE is not set # end of Bluetooth device drivers CONFIG_AF_RXRPC=y CONFIG_AF_RXRPC_IPV6=y # CONFIG_AF_RXRPC_INJECT_LOSS is not set # CONFIG_AF_RXRPC_INJECT_RX_DELAY is not set # CONFIG_AF_RXRPC_DEBUG is not set CONFIG_RXKAD=y # CONFIG_RXGK is not set # CONFIG_RXPERF is not set CONFIG_AF_KCM=y CONFIG_STREAM_PARSER=y CONFIG_MCTP=y CONFIG_FIB_RULES=y CONFIG_WIRELESS=y CONFIG_WEXT_CORE=y CONFIG_WEXT_PROC=y CONFIG_CFG80211=y # CONFIG_NL80211_TESTMODE is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set # CONFIG_CFG80211_CERTIFICATION_ONUS is not set CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y CONFIG_CFG80211_DEFAULT_PS=y CONFIG_CFG80211_DEBUGFS=y CONFIG_CFG80211_CRDA_SUPPORT=y CONFIG_CFG80211_WEXT=y CONFIG_MAC80211=y CONFIG_MAC80211_HAS_RC=y CONFIG_MAC80211_RC_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" CONFIG_MAC80211_MESH=y CONFIG_MAC80211_LEDS=y CONFIG_MAC80211_DEBUGFS=y # CONFIG_MAC80211_MESSAGE_TRACING is not set # CONFIG_MAC80211_DEBUG_MENU is not set CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 CONFIG_RFKILL=y CONFIG_RFKILL_LEDS=y CONFIG_RFKILL_INPUT=y # CONFIG_RFKILL_GPIO is not set CONFIG_NET_9P=y CONFIG_NET_9P_FD=y CONFIG_NET_9P_VIRTIO=y # CONFIG_NET_9P_USBG is not set CONFIG_NET_9P_RDMA=y # CONFIG_NET_9P_DEBUG is not set CONFIG_CAIF=y CONFIG_CAIF_DEBUG=y CONFIG_CAIF_NETDEV=y CONFIG_CAIF_USB=y CONFIG_CEPH_LIB=y # CONFIG_CEPH_LIB_PRETTYDEBUG is not set CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y CONFIG_NFC=y CONFIG_NFC_DIGITAL=y CONFIG_NFC_NCI=y # CONFIG_NFC_NCI_SPI is not set CONFIG_NFC_NCI_UART=y CONFIG_NFC_HCI=y CONFIG_NFC_SHDLC=y # # Near Field Communication (NFC) devices # # CONFIG_NFC_TRF7970A is not set # CONFIG_NFC_MEI_PHY is not set CONFIG_NFC_SIM=y CONFIG_NFC_PORT100=y CONFIG_NFC_VIRTUAL_NCI=y CONFIG_NFC_FDP=y # CONFIG_NFC_FDP_I2C is not set # CONFIG_NFC_PN544_I2C is not set CONFIG_NFC_PN533=y CONFIG_NFC_PN533_USB=y # CONFIG_NFC_PN533_I2C is not set # CONFIG_NFC_PN532_UART is not set # CONFIG_NFC_MICROREAD_I2C is not set CONFIG_NFC_MRVL=y CONFIG_NFC_MRVL_USB=y # CONFIG_NFC_MRVL_UART is not set # CONFIG_NFC_MRVL_I2C is not set # CONFIG_NFC_ST21NFCA_I2C is not set # CONFIG_NFC_ST_NCI_I2C is not set # CONFIG_NFC_ST_NCI_SPI is not set # CONFIG_NFC_NXP_NCI is not set # CONFIG_NFC_S3FWRN5_I2C is not set # CONFIG_NFC_S3FWRN82_UART is not set # CONFIG_NFC_ST95HF is not set # end of Near Field Communication (NFC) devices CONFIG_PSAMPLE=y CONFIG_NET_IFE=y CONFIG_LWTUNNEL=y CONFIG_LWTUNNEL_BPF=y CONFIG_DST_CACHE=y CONFIG_GRO_CELLS=y CONFIG_SOCK_VALIDATE_XMIT=y CONFIG_NET_SELFTESTS=y CONFIG_NET_SOCK_MSG=y CONFIG_NET_DEVLINK=y CONFIG_PAGE_POOL=y # CONFIG_PAGE_POOL_STATS is not set CONFIG_FAILOVER=y CONFIG_ETHTOOL_NETLINK=y # # Device Drivers # CONFIG_HAVE_PCI=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y CONFIG_PCIEPORTBUS=y CONFIG_HOTPLUG_PCI_PCIE=y CONFIG_PCIEAER=y # CONFIG_PCIEAER_INJECT is not set # CONFIG_PCIE_ECRC is not set CONFIG_PCIEASPM=y CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set # CONFIG_PCIEASPM_PERFORMANCE is not set CONFIG_PCIE_PME=y # CONFIG_PCIE_DPC is not set # CONFIG_PCIE_PTM is not set CONFIG_PCI_MSI=y CONFIG_PCI_QUIRKS=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_REALLOC_ENABLE_AUTO is not set # CONFIG_PCI_STUB is not set # CONFIG_PCI_PF_STUB is not set CONFIG_PCI_ATS=y # CONFIG_PCI_TSM is not set # CONFIG_PCI_DOE is not set CONFIG_PCI_ECAM=y CONFIG_PCI_LOCKLESS_CONFIG=y CONFIG_PCI_IOV=y # CONFIG_PCI_NPEM is not set CONFIG_PCI_PRI=y CONFIG_PCI_PASID=y # CONFIG_PCIE_TPH is not set # CONFIG_PCI_P2PDMA is not set CONFIG_PCI_LABEL=y # CONFIG_PCI_DYNAMIC_OF_NODES is not set # CONFIG_PCIE_BUS_TUNE_OFF is not set CONFIG_PCIE_BUS_DEFAULT=y # CONFIG_PCIE_BUS_SAFE is not set # CONFIG_PCIE_BUS_PERFORMANCE is not set # CONFIG_PCIE_BUS_PEER2PEER is not set CONFIG_VGA_ARB=y CONFIG_VGA_ARB_MAX_GPUS=16 CONFIG_HOTPLUG_PCI=y # CONFIG_HOTPLUG_PCI_ACPI is not set # CONFIG_HOTPLUG_PCI_CPCI is not set # CONFIG_HOTPLUG_PCI_OCTEONEP is not set # CONFIG_HOTPLUG_PCI_SHPC is not set # # PCI controller drivers # CONFIG_PCI_HOST_COMMON=y # CONFIG_PCI_FTPCI100 is not set CONFIG_PCI_HOST_GENERIC=y # CONFIG_VMD is not set # CONFIG_PCIE_XILINX is not set # # Cadence-based PCIe controllers # # CONFIG_PCIE_CADENCE_PLAT_HOST is not set # CONFIG_PCIE_CADENCE_PLAT_EP is not set # end of Cadence-based PCIe controllers # # DesignWare-based PCIe controllers # # CONFIG_PCI_MESON is not set # CONFIG_PCIE_INTEL_GW is not set # CONFIG_PCIE_DW_PLAT_HOST is not set # CONFIG_PCIE_DW_PLAT_EP is not set # end of DesignWare-based PCIe controllers # # Mobiveil-based PCIe controllers # # end of Mobiveil-based PCIe controllers # # PLDA-based PCIe controllers # # CONFIG_PCIE_MICROCHIP_HOST is not set # end of PLDA-based PCIe controllers # end of PCI controller drivers # # PCI Endpoint # CONFIG_PCI_ENDPOINT=y # CONFIG_PCI_ENDPOINT_CONFIGFS is not set # CONFIG_PCI_ENDPOINT_MSI_DOORBELL is not set # CONFIG_PCI_EPF_TEST is not set # CONFIG_PCI_EPF_NTB is not set # end of PCI Endpoint # # PCI switch controller drivers # # CONFIG_PCI_SW_SWITCHTEC is not set # end of PCI switch controller drivers # CONFIG_PCI_PWRCTRL_SLOT is not set # CONFIG_PCI_PWRCTRL_TC9563 is not set # CONFIG_CXL_BUS is not set CONFIG_PCCARD=y CONFIG_PCMCIA=y CONFIG_PCMCIA_LOAD_CIS=y CONFIG_CARDBUS=y # # PC-card bridges # CONFIG_YENTA=y CONFIG_YENTA_O2=y CONFIG_YENTA_RICOH=y CONFIG_YENTA_TI=y CONFIG_YENTA_ENE_TUNE=y CONFIG_YENTA_TOSHIBA=y # CONFIG_PD6729 is not set # CONFIG_I82092 is not set CONFIG_PCCARD_NONSTATIC=y # CONFIG_RAPIDIO is not set # CONFIG_PC104 is not set # # Generic Driver Options # CONFIG_AUXILIARY_BUS=y CONFIG_UEVENT_HELPER=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_DEVTMPFS_SAFE is not set CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # # Firmware loader # CONFIG_FW_LOADER=y # CONFIG_FW_LOADER_DEBUG is not set CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_FW_LOADER_COMPRESS=y # CONFIG_FW_LOADER_COMPRESS_XZ is not set # CONFIG_FW_LOADER_COMPRESS_ZSTD is not set CONFIG_FW_CACHE=y # CONFIG_FW_UPLOAD is not set # end of Firmware loader CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y CONFIG_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set CONFIG_DEBUG_DEVRES=y # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set CONFIG_GENERIC_CPU_DEVICES=y CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPI=y CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y # CONFIG_DMA_FENCE_TRACE is not set # CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set # end of Generic Driver Options # # Bus devices # # CONFIG_MOXTET is not set CONFIG_MHI_BUS=y # CONFIG_MHI_BUS_DEBUG is not set # CONFIG_MHI_BUS_PCI_GENERIC is not set # CONFIG_MHI_BUS_EP is not set # end of Bus devices CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y # # Firmware Drivers # # # ARM System Control and Management Interface Protocol # # end of ARM System Control and Management Interface Protocol # CONFIG_EDD is not set CONFIG_FIRMWARE_MEMMAP=y CONFIG_DMIID=y # CONFIG_DMI_SYSFS is not set CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y # CONFIG_ISCSI_IBFT is not set # CONFIG_FW_CFG_SYSFS is not set CONFIG_SYSFB=y # CONFIG_SYSFB_SIMPLEFB is not set CONFIG_GOOGLE_FIRMWARE=y # CONFIG_GOOGLE_SMI is not set # CONFIG_GOOGLE_CBMEM is not set CONFIG_GOOGLE_COREBOOT_TABLE=y CONFIG_GOOGLE_MEMCONSOLE=y # CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set # CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT is not set CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y CONFIG_GOOGLE_VPD=y # # Qualcomm firmware drivers # # end of Qualcomm firmware drivers # # Tegra firmware driver # # end of Tegra firmware driver # end of Firmware Drivers # CONFIG_FWCTL is not set CONFIG_GNSS=y # CONFIG_GNSS_MTK_SERIAL is not set # CONFIG_GNSS_SIRF_SERIAL is not set # CONFIG_GNSS_UBX_SERIAL is not set CONFIG_GNSS_USB=y CONFIG_MTD=y # CONFIG_MTD_TESTS is not set # # Partition parsers # # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_OF_PARTS is not set # CONFIG_MTD_REDBOOT_PARTS is not set # end of Partition parsers # # User Modules And Translation Layers # CONFIG_MTD_BLKDEVS=y CONFIG_MTD_BLOCK=y # # Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK. # CONFIG_FTL=y # CONFIG_NFTL is not set # CONFIG_INFTL is not set # CONFIG_RFD_FTL is not set # CONFIG_SSFDC is not set # CONFIG_SM_FTL is not set # CONFIG_MTD_OOPS is not set # CONFIG_MTD_SWAP is not set # CONFIG_MTD_PARTITIONED_MASTER is not set # # RAM/ROM/Flash chip drivers # # CONFIG_MTD_CFI is not set # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # end of RAM/ROM/Flash chip drivers # # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PLATRAM is not set # end of Mapping drivers for chip access # # Self-contained MTD device drivers # # CONFIG_MTD_PMC551 is not set # CONFIG_MTD_DATAFLASH is not set # CONFIG_MTD_MCHP23K256 is not set # CONFIG_MTD_MCHP48L640 is not set # CONFIG_MTD_SST25L is not set CONFIG_MTD_SLRAM=y CONFIG_MTD_PHRAM=y CONFIG_MTD_MTDRAM=y CONFIG_MTDRAM_TOTAL_SIZE=128 CONFIG_MTDRAM_ERASE_SIZE=4 CONFIG_MTD_BLOCK2MTD=y # # Disk-On-Chip Device Drivers # # CONFIG_MTD_DOCG3 is not set # end of Self-contained MTD device drivers # # NAND # # CONFIG_MTD_ONENAND is not set # CONFIG_MTD_RAW_NAND is not set # CONFIG_MTD_SPI_NAND is not set # # ECC engine support # # CONFIG_MTD_NAND_ECC_SW_HAMMING is not set # CONFIG_MTD_NAND_ECC_SW_BCH is not set # CONFIG_MTD_NAND_ECC_MXIC is not set # end of ECC engine support # end of NAND # # LPDDR & LPDDR2 PCM memory drivers # # CONFIG_MTD_LPDDR is not set # end of LPDDR & LPDDR2 PCM memory drivers # CONFIG_MTD_SPI_NOR is not set CONFIG_MTD_UBI=y CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_LIMIT=20 # CONFIG_MTD_UBI_FASTMAP is not set # CONFIG_MTD_UBI_GLUEBI is not set # CONFIG_MTD_UBI_BLOCK is not set # CONFIG_MTD_UBI_FAULT_INJECTION is not set # CONFIG_MTD_UBI_NVMEM is not set # CONFIG_MTD_HYPERBUS is not set CONFIG_DTC=y CONFIG_OF=y # CONFIG_OF_UNITTEST is not set CONFIG_OF_FLATTREE=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_KOBJ=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_RESERVED_MEM=y # CONFIG_OF_OVERLAY is not set CONFIG_OF_NUMA=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_PARPORT=y # CONFIG_PARPORT_PC is not set # CONFIG_PARPORT_1284 is not set CONFIG_PARPORT_NOT_PC=y CONFIG_PNP=y CONFIG_PNP_DEBUG_MESSAGES=y # # Protocols # CONFIG_PNPACPI=y CONFIG_BLK_DEV=y CONFIG_BLK_DEV_NULL_BLK=y CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION=y # CONFIG_BLK_DEV_FD is not set CONFIG_CDROM=y # CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set CONFIG_ZRAM=y # CONFIG_ZRAM_BACKEND_LZ4 is not set # CONFIG_ZRAM_BACKEND_LZ4HC is not set # CONFIG_ZRAM_BACKEND_ZSTD is not set # CONFIG_ZRAM_BACKEND_DEFLATE is not set # CONFIG_ZRAM_BACKEND_842 is not set CONFIG_ZRAM_BACKEND_FORCE_LZO=y CONFIG_ZRAM_BACKEND_LZO=y # CONFIG_ZRAM_DEF_COMP_LZORLE is not set CONFIG_ZRAM_DEF_COMP_LZO=y CONFIG_ZRAM_DEF_COMP="lzo" # CONFIG_ZRAM_WRITEBACK is not set # CONFIG_ZRAM_TRACK_ENTRY_ACTIME is not set # CONFIG_ZRAM_MEMORY_TRACKING is not set # CONFIG_ZRAM_MULTI_COMP is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP_MIN_COUNT=16 # CONFIG_BLK_DEV_DRBD is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_ATA_OVER_ETH=y CONFIG_VIRTIO_BLK=y # CONFIG_BLK_DEV_RBD is not set # CONFIG_BLK_DEV_UBLK is not set CONFIG_BLK_DEV_RNBD=y CONFIG_BLK_DEV_RNBD_CLIENT=y # CONFIG_BLK_DEV_ZONED_LOOP is not set # # NVME Support # CONFIG_NVME_CORE=y CONFIG_BLK_DEV_NVME=y CONFIG_NVME_MULTIPATH=y # CONFIG_NVME_VERBOSE_ERRORS is not set # CONFIG_NVME_HWMON is not set CONFIG_NVME_FABRICS=y CONFIG_NVME_RDMA=y CONFIG_NVME_FC=y CONFIG_NVME_TCP=y # CONFIG_NVME_TCP_TLS is not set # CONFIG_NVME_HOST_AUTH is not set CONFIG_NVME_TARGET=y # CONFIG_NVME_TARGET_DEBUGFS is not set # CONFIG_NVME_TARGET_PASSTHRU is not set CONFIG_NVME_TARGET_LOOP=y CONFIG_NVME_TARGET_RDMA=y CONFIG_NVME_TARGET_FC=y CONFIG_NVME_TARGET_FCLOOP=y CONFIG_NVME_TARGET_TCP=y # CONFIG_NVME_TARGET_TCP_TLS is not set # CONFIG_NVME_TARGET_AUTH is not set # CONFIG_NVME_TARGET_PCI_EPF is not set # end of NVME Support # # Misc devices # # CONFIG_AD525X_DPOT is not set # CONFIG_DUMMY_IRQ is not set # CONFIG_IBM_ASM is not set # CONFIG_PHANTOM is not set # CONFIG_RPMB is not set # CONFIG_TI_FPC202 is not set # CONFIG_TIFM_CORE is not set # CONFIG_ICS932S401 is not set # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_HP_ILO is not set # CONFIG_APDS9802ALS is not set # CONFIG_ISL29003 is not set # CONFIG_ISL29020 is not set # CONFIG_SENSORS_TSL2550 is not set # CONFIG_SENSORS_BH1770 is not set # CONFIG_SENSORS_APDS990X is not set # CONFIG_HMC6352 is not set # CONFIG_DS1682 is not set # CONFIG_VMWARE_BALLOON is not set # CONFIG_LATTICE_ECP3_CONFIG is not set # CONFIG_SRAM is not set # CONFIG_DW_XDATA_PCIE is not set # CONFIG_PCI_ENDPOINT_TEST is not set # CONFIG_XILINX_SDFEC is not set CONFIG_MISC_RTSX=y # CONFIG_HISI_HIKEY_USB is not set # CONFIG_OPEN_DICE is not set # CONFIG_NTSYNC is not set # CONFIG_VCPU_STALL_DETECTOR is not set # CONFIG_NSM is not set # CONFIG_C2PORT is not set # # EEPROM support # # CONFIG_EEPROM_AT24 is not set # CONFIG_EEPROM_AT25 is not set # CONFIG_EEPROM_MAX6875 is not set CONFIG_EEPROM_93CX6=y # CONFIG_EEPROM_93XX46 is not set # CONFIG_EEPROM_IDT_89HPESX is not set # CONFIG_EEPROM_EE1004 is not set # CONFIG_EEPROM_M24LR is not set # end of EEPROM support # CONFIG_CB710_CORE is not set # CONFIG_SENSORS_LIS3_I2C is not set # CONFIG_ALTERA_STAPL is not set CONFIG_INTEL_MEI=y CONFIG_INTEL_MEI_ME=y # CONFIG_INTEL_MEI_TXE is not set # CONFIG_INTEL_MEI_VSC_HW is not set CONFIG_VMWARE_VMCI=y # CONFIG_GENWQE is not set # CONFIG_BCM_VK is not set # CONFIG_MISC_ALCOR_PCI is not set # CONFIG_MISC_RTSX_PCI is not set CONFIG_MISC_RTSX_USB=y # CONFIG_UACCE is not set # CONFIG_PVPANIC is not set # CONFIG_GP_PCI1XXXX is not set # CONFIG_KEBA_CP500 is not set # end of Misc devices # # SCSI device support # CONFIG_SCSI_MOD=y CONFIG_RAID_ATTRS=y CONFIG_SCSI_COMMON=y CONFIG_SCSI=y CONFIG_SCSI_DMA=y CONFIG_SCSI_NETLINK=y CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_ST=y CONFIG_BLK_DEV_SR=y CONFIG_CHR_DEV_SG=y CONFIG_BLK_DEV_BSG=y # CONFIG_CHR_DEV_SCH is not set CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_LOGGING=y CONFIG_SCSI_SCAN_ASYNC=y # # SCSI Transports # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y CONFIG_SCSI_ISCSI_ATTRS=y CONFIG_SCSI_SAS_ATTRS=y CONFIG_SCSI_SAS_LIBSAS=y CONFIG_SCSI_SAS_ATA=y # CONFIG_SCSI_SAS_HOST_SMP is not set CONFIG_SCSI_SRP_ATTRS=y # end of SCSI Transports CONFIG_SCSI_LOWLEVEL=y # CONFIG_ISCSI_TCP is not set # CONFIG_ISCSI_BOOT_SYSFS is not set # CONFIG_SCSI_CXGB3_ISCSI is not set # CONFIG_SCSI_CXGB4_ISCSI is not set # CONFIG_SCSI_BNX2_ISCSI is not set # CONFIG_BE2ISCSI is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set CONFIG_SCSI_HPSA=y # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_3W_SAS is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC94XX is not set # CONFIG_SCSI_MVSAS is not set # CONFIG_SCSI_MVUMI is not set # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_ARCMSR is not set # CONFIG_SCSI_ESAS2R is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_MPT3SAS is not set # CONFIG_SCSI_MPT2SAS is not set # CONFIG_SCSI_MPI3MR is not set # CONFIG_SCSI_SMARTPQI is not set # CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_MYRB is not set # CONFIG_SCSI_MYRS is not set # CONFIG_VMWARE_PVSCSI is not set # CONFIG_LIBFC is not set # CONFIG_SCSI_SNIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FDOMAIN_PCI is not set # CONFIG_SCSI_ISCI is not set # CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_STEX is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_QLA_ISCSI is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_EFCT is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_WD719X is not set # CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_PMCRAID is not set # CONFIG_SCSI_PM8001 is not set # CONFIG_SCSI_BFA_FC is not set CONFIG_SCSI_VIRTIO=y # CONFIG_SCSI_CHELSIO_FCOE is not set # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set # CONFIG_SCSI_DH is not set # end of SCSI device support CONFIG_ATA=y CONFIG_SATA_HOST=y CONFIG_PATA_TIMINGS=y CONFIG_ATA_VERBOSE_ERROR=y CONFIG_ATA_FORCE=y CONFIG_ATA_ACPI=y # CONFIG_SATA_ZPODD is not set CONFIG_SATA_PMP=y # # Controllers with non-SFF native interface # CONFIG_SATA_AHCI=y CONFIG_SATA_MOBILE_LPM_POLICY=3 # CONFIG_SATA_AHCI_PLATFORM is not set # CONFIG_AHCI_DWC is not set # CONFIG_AHCI_CEVA is not set # CONFIG_SATA_INIC162X is not set # CONFIG_SATA_ACARD_AHCI is not set # CONFIG_SATA_SIL24 is not set CONFIG_ATA_SFF=y # # SFF controllers with custom DMA interface # # CONFIG_PDC_ADMA is not set # CONFIG_SATA_QSTOR is not set # CONFIG_SATA_SX4 is not set CONFIG_ATA_BMDMA=y # # SATA SFF controllers with BMDMA # CONFIG_ATA_PIIX=y # CONFIG_SATA_DWC is not set # CONFIG_SATA_MV is not set # CONFIG_SATA_NV is not set # CONFIG_SATA_PROMISE is not set # CONFIG_SATA_SIL is not set # CONFIG_SATA_SIS is not set # CONFIG_SATA_SVW is not set # CONFIG_SATA_ULI is not set # CONFIG_SATA_VIA is not set # CONFIG_SATA_VITESSE is not set # # PATA SFF controllers with BMDMA # # CONFIG_PATA_ALI is not set CONFIG_PATA_AMD=y # CONFIG_PATA_ARTOP is not set # CONFIG_PATA_ATIIXP is not set # CONFIG_PATA_ATP867X is not set # CONFIG_PATA_CMD64X is not set # CONFIG_PATA_CYPRESS is not set # CONFIG_PATA_EFAR is not set # CONFIG_PATA_HPT366 is not set # CONFIG_PATA_HPT37X is not set # CONFIG_PATA_HPT3X2N is not set # CONFIG_PATA_HPT3X3 is not set # CONFIG_PATA_IT8213 is not set # CONFIG_PATA_IT821X is not set # CONFIG_PATA_JMICRON is not set # CONFIG_PATA_MARVELL is not set # CONFIG_PATA_NETCELL is not set # CONFIG_PATA_NINJA32 is not set # CONFIG_PATA_NS87415 is not set CONFIG_PATA_OLDPIIX=y # CONFIG_PATA_OPTIDMA is not set # CONFIG_PATA_PDC2027X is not set # CONFIG_PATA_PDC_OLD is not set # CONFIG_PATA_RADISYS is not set # CONFIG_PATA_RDC is not set CONFIG_PATA_SCH=y # CONFIG_PATA_SERVERWORKS is not set # CONFIG_PATA_SIL680 is not set # CONFIG_PATA_SIS is not set # CONFIG_PATA_TOSHIBA is not set # CONFIG_PATA_TRIFLEX is not set # CONFIG_PATA_VIA is not set # CONFIG_PATA_WINBOND is not set # # PIO-only SFF controllers # # CONFIG_PATA_CMD640_PCI is not set # CONFIG_PATA_MPIIX is not set # CONFIG_PATA_NS87410 is not set # CONFIG_PATA_OPTI is not set # CONFIG_PATA_PCMCIA is not set # CONFIG_PATA_OF_PLATFORM is not set # CONFIG_PATA_RZ1000 is not set # # Generic fallback / legacy drivers # # CONFIG_PATA_ACPI is not set CONFIG_ATA_GENERIC=y # CONFIG_PATA_LEGACY is not set CONFIG_MD=y CONFIG_BLK_DEV_MD=y CONFIG_MD_BITMAP=y # CONFIG_MD_LLBITMAP is not set CONFIG_MD_AUTODETECT=y CONFIG_MD_BITMAP_FILE=y # CONFIG_MD_LINEAR is not set CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y CONFIG_MD_RAID10=y CONFIG_MD_RAID456=y # CONFIG_MD_CLUSTER is not set CONFIG_BCACHE=y # CONFIG_BCACHE_DEBUG is not set # CONFIG_BCACHE_ASYNC_REGISTRATION is not set CONFIG_BLK_DEV_DM_BUILTIN=y CONFIG_BLK_DEV_DM=y # CONFIG_DM_DEBUG is not set CONFIG_DM_BUFIO=y # CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set CONFIG_DM_BIO_PRISON=y CONFIG_DM_PERSISTENT_DATA=y # CONFIG_DM_UNSTRIPED is not set CONFIG_DM_CRYPT=y CONFIG_DM_SNAPSHOT=y CONFIG_DM_THIN_PROVISIONING=y CONFIG_DM_CACHE=y CONFIG_DM_CACHE_SMQ=y CONFIG_DM_WRITECACHE=y # CONFIG_DM_EBS is not set # CONFIG_DM_ERA is not set CONFIG_DM_CLONE=y CONFIG_DM_MIRROR=y # CONFIG_DM_LOG_USERSPACE is not set CONFIG_DM_RAID=y CONFIG_DM_ZERO=y CONFIG_DM_MULTIPATH=y CONFIG_DM_MULTIPATH_QL=y CONFIG_DM_MULTIPATH_ST=y # CONFIG_DM_MULTIPATH_HST is not set # CONFIG_DM_MULTIPATH_IOA is not set # CONFIG_DM_DELAY is not set # CONFIG_DM_DUST is not set # CONFIG_DM_INIT is not set CONFIG_DM_UEVENT=y CONFIG_DM_FLAKEY=y CONFIG_DM_VERITY=y # CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set CONFIG_DM_VERITY_FEC=y # CONFIG_DM_SWITCH is not set # CONFIG_DM_LOG_WRITES is not set CONFIG_DM_INTEGRITY=y CONFIG_DM_ZONED=y CONFIG_DM_AUDIT=y # CONFIG_DM_VDO is not set CONFIG_TARGET_CORE=y # CONFIG_TCM_IBLOCK is not set # CONFIG_TCM_FILEIO is not set # CONFIG_TCM_PSCSI is not set # CONFIG_LOOPBACK_TARGET is not set # CONFIG_ISCSI_TARGET is not set # CONFIG_SBP_TARGET is not set # CONFIG_REMOTE_TARGET is not set # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # CONFIG_FIREWIRE=y CONFIG_FIREWIRE_OHCI=y CONFIG_FIREWIRE_SBP2=y CONFIG_FIREWIRE_NET=y # CONFIG_FIREWIRE_NOSY is not set # end of IEEE 1394 (FireWire) support # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y CONFIG_MII=y CONFIG_NET_CORE=y CONFIG_BONDING=y CONFIG_DUMMY=y CONFIG_WIREGUARD=y # CONFIG_WIREGUARD_DEBUG is not set # CONFIG_OVPN is not set CONFIG_EQUALIZER=y CONFIG_NET_FC=y CONFIG_IFB=y CONFIG_NET_TEAM=y CONFIG_NET_TEAM_MODE_BROADCAST=y CONFIG_NET_TEAM_MODE_ROUNDROBIN=y CONFIG_NET_TEAM_MODE_RANDOM=y CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=y CONFIG_NET_TEAM_MODE_LOADBALANCE=y CONFIG_MACVLAN=y CONFIG_MACVTAP=y CONFIG_IPVLAN_L3S=y CONFIG_IPVLAN=y CONFIG_IPVTAP=y CONFIG_VXLAN=y CONFIG_GENEVE=y CONFIG_BAREUDP=y CONFIG_GTP=y # CONFIG_PFCP is not set # CONFIG_AMT is not set CONFIG_MACSEC=y CONFIG_NETCONSOLE=y # CONFIG_NETCONSOLE_DYNAMIC is not set # CONFIG_NETCONSOLE_EXTENDED_LOG is not set CONFIG_NETPOLL=y CONFIG_NET_POLL_CONTROLLER=y CONFIG_TUN=y CONFIG_TAP=y CONFIG_TUN_VNET_CROSS_LE=y CONFIG_VETH=y CONFIG_VIRTIO_NET=y CONFIG_NLMON=y # CONFIG_NETKIT is not set CONFIG_NET_VRF=y CONFIG_VSOCKMON=y # CONFIG_MHI_NET is not set # CONFIG_ARCNET is not set CONFIG_ATM_DRIVERS=y # CONFIG_ATM_DUMMY is not set CONFIG_ATM_TCP=y # CONFIG_ATM_LANAI is not set # CONFIG_ATM_ENI is not set # CONFIG_ATM_NICSTAR is not set # CONFIG_ATM_IDT77252 is not set # CONFIG_ATM_IA is not set # CONFIG_ATM_FORE200E is not set # CONFIG_ATM_HE is not set # CONFIG_ATM_SOLOS is not set CONFIG_CAIF_DRIVERS=y CONFIG_CAIF_TTY=y CONFIG_CAIF_VIRTIO=y # # Distributed Switch Architecture drivers # # CONFIG_B53 is not set # CONFIG_NET_DSA_BCM_SF2 is not set # CONFIG_NET_DSA_LOOP is not set # CONFIG_NET_DSA_HIRSCHMANN_HELLCREEK is not set # CONFIG_NET_DSA_LANTIQ_GSWIP is not set # CONFIG_NET_DSA_MXL_GSW1XX is not set # CONFIG_NET_DSA_MT7530 is not set # CONFIG_NET_DSA_MV88E6060 is not set # CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON is not set # CONFIG_NET_DSA_MV88E6XXX is not set # CONFIG_NET_DSA_AR9331 is not set # CONFIG_NET_DSA_QCA8K is not set # CONFIG_NET_DSA_SJA1105 is not set # CONFIG_NET_DSA_XRS700X_I2C is not set # CONFIG_NET_DSA_XRS700X_MDIO is not set # CONFIG_NET_DSA_REALTEK is not set # CONFIG_NET_DSA_KS8995 is not set # CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set # CONFIG_NET_DSA_SMSC_LAN9303_MDIO is not set # CONFIG_NET_DSA_VITESSE_VSC73XX_SPI is not set # CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM is not set # CONFIG_NET_DSA_YT921X is not set # end of Distributed Switch Architecture drivers CONFIG_ETHERNET=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_ADAPTEC is not set # CONFIG_NET_VENDOR_AGERE is not set # CONFIG_NET_VENDOR_ALACRITECH is not set CONFIG_NET_VENDOR_ALTEON=y # CONFIG_ACENIC is not set # CONFIG_ALTERA_TSE is not set CONFIG_NET_VENDOR_AMAZON=y # CONFIG_ENA_ETHERNET is not set # CONFIG_NET_VENDOR_AMD is not set # CONFIG_NET_VENDOR_AQUANTIA is not set # CONFIG_NET_VENDOR_ARC is not set CONFIG_NET_VENDOR_ASIX=y # CONFIG_SPI_AX88796C is not set # CONFIG_NET_VENDOR_ATHEROS is not set # CONFIG_CX_ECAT is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_CADENCE is not set # CONFIG_NET_VENDOR_CAVIUM is not set # CONFIG_NET_VENDOR_CHELSIO is not set CONFIG_NET_VENDOR_CISCO=y # CONFIG_ENIC is not set # CONFIG_NET_VENDOR_CORTINA is not set CONFIG_NET_VENDOR_DAVICOM=y # CONFIG_DM9051 is not set # CONFIG_DNET is not set # CONFIG_NET_VENDOR_DEC is not set # CONFIG_NET_VENDOR_DLINK is not set # CONFIG_NET_VENDOR_EMULEX is not set CONFIG_NET_VENDOR_ENGLEDER=y # CONFIG_TSNEP is not set # CONFIG_NET_VENDOR_EZCHIP is not set # CONFIG_NET_VENDOR_FUJITSU is not set CONFIG_NET_VENDOR_FUNGIBLE=y # CONFIG_FUN_ETH is not set CONFIG_NET_VENDOR_GOOGLE=y CONFIG_GVE=y CONFIG_NET_VENDOR_HISILICON=y # CONFIG_HIBMCGE is not set # CONFIG_NET_VENDOR_HUAWEI is not set CONFIG_NET_VENDOR_I825XX=y CONFIG_NET_VENDOR_INTEL=y CONFIG_E100=y CONFIG_E1000=y CONFIG_E1000E=y CONFIG_E1000E_HWTS=y # CONFIG_IGB is not set # CONFIG_IGBVF is not set # CONFIG_IXGBE is not set # CONFIG_IXGBEVF is not set # CONFIG_I40E is not set # CONFIG_I40EVF is not set # CONFIG_ICE is not set # CONFIG_FM10K is not set # CONFIG_IGC is not set # CONFIG_IDPF is not set # CONFIG_JME is not set # CONFIG_NET_VENDOR_ADI is not set CONFIG_NET_VENDOR_LITEX=y # CONFIG_LITEX_LITEETH is not set # CONFIG_NET_VENDOR_MARVELL is not set CONFIG_NET_VENDOR_MELLANOX=y # CONFIG_MLX4_EN is not set CONFIG_MLX4_CORE=y # CONFIG_MLX4_DEBUG is not set # CONFIG_MLX4_CORE_GEN2 is not set # CONFIG_MLX5_CORE is not set # CONFIG_MLXSW_CORE is not set # CONFIG_MLXFW is not set CONFIG_NET_VENDOR_META=y # CONFIG_FBNIC is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_MICROCHIP is not set # CONFIG_NET_VENDOR_MICROSEMI is not set CONFIG_NET_VENDOR_MICROSOFT=y CONFIG_NET_VENDOR_MUCSE=y # CONFIG_MGBE is not set # CONFIG_NET_VENDOR_MYRI is not set # CONFIG_FEALNX is not set # CONFIG_NET_VENDOR_NI is not set # CONFIG_NET_VENDOR_NATSEMI is not set # CONFIG_NET_VENDOR_NETERION is not set # CONFIG_NET_VENDOR_NETRONOME is not set # CONFIG_NET_VENDOR_NVIDIA is not set # CONFIG_NET_VENDOR_OKI is not set # CONFIG_ETHOC is not set # CONFIG_NET_VENDOR_PACKET_ENGINES is not set # CONFIG_NET_VENDOR_PENSANDO is not set # CONFIG_NET_VENDOR_QLOGIC is not set # CONFIG_NET_VENDOR_BROCADE is not set # CONFIG_NET_VENDOR_QUALCOMM is not set # CONFIG_NET_VENDOR_RDC is not set # CONFIG_NET_VENDOR_REALTEK is not set # CONFIG_NET_VENDOR_RENESAS is not set # CONFIG_NET_VENDOR_ROCKER is not set # CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_SILAN is not set # CONFIG_NET_VENDOR_SIS is not set # CONFIG_NET_VENDOR_SOLARFLARE is not set # CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_SOCIONEXT is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_SUN is not set # CONFIG_NET_VENDOR_SYNOPSYS is not set # CONFIG_NET_VENDOR_TEHUTI is not set # CONFIG_NET_VENDOR_TI is not set CONFIG_NET_VENDOR_VERTEXCOM=y # CONFIG_MSE102X is not set # CONFIG_NET_VENDOR_VIA is not set CONFIG_NET_VENDOR_WANGXUN=y # CONFIG_NGBE is not set # CONFIG_TXGBE is not set # CONFIG_TXGBEVF is not set # CONFIG_NGBEVF is not set # CONFIG_NET_VENDOR_WIZNET is not set # CONFIG_NET_VENDOR_XILINX is not set # CONFIG_NET_VENDOR_XIRCOM is not set CONFIG_FDDI=y # CONFIG_DEFXX is not set # CONFIG_SKFP is not set # CONFIG_HIPPI is not set CONFIG_MDIO_BUS=y CONFIG_PHYLINK=y CONFIG_PHYLIB=y CONFIG_SWPHY=y # CONFIG_LED_TRIGGER_PHY is not set CONFIG_PHYLIB_LEDS=y CONFIG_FIXED_PHY=y # CONFIG_SFP is not set # # MII PHY device drivers # # CONFIG_AS21XXX_PHY is not set # CONFIG_AIR_EN8811H_PHY is not set # CONFIG_AMD_PHY is not set # CONFIG_ADIN_PHY is not set # CONFIG_ADIN1100_PHY is not set # CONFIG_AQUANTIA_PHY is not set CONFIG_AX88796B_PHY=y # CONFIG_BROADCOM_PHY is not set # CONFIG_BCM54140_PHY is not set # CONFIG_BCM7XXX_PHY is not set # CONFIG_BCM84881_PHY is not set # CONFIG_BCM87XX_PHY is not set # CONFIG_CICADA_PHY is not set # CONFIG_CORTINA_PHY is not set # CONFIG_DAVICOM_PHY is not set # CONFIG_ICPLUS_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_INTEL_XWAY_PHY is not set # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_MARVELL_PHY is not set # CONFIG_MARVELL_10G_PHY is not set # CONFIG_MARVELL_88Q2XXX_PHY is not set # CONFIG_MARVELL_88X2222_PHY is not set # CONFIG_MAXLINEAR_GPHY is not set # CONFIG_MAXLINEAR_86110_PHY is not set # CONFIG_MEDIATEK_GE_PHY is not set # CONFIG_MICREL_PHY is not set # CONFIG_MICROCHIP_T1S_PHY is not set CONFIG_MICROCHIP_PHY=y # CONFIG_MICROCHIP_T1_PHY is not set # CONFIG_MICROSEMI_PHY is not set # CONFIG_MOTORCOMM_PHY is not set # CONFIG_NATIONAL_PHY is not set # CONFIG_NXP_CBTX_PHY is not set # CONFIG_NXP_C45_TJA11XX_PHY is not set # CONFIG_NXP_TJA11XX_PHY is not set # CONFIG_NCN26000_PHY is not set # CONFIG_AT803X_PHY is not set # CONFIG_QCA83XX_PHY is not set # CONFIG_QCA808X_PHY is not set # CONFIG_QCA807X_PHY is not set # CONFIG_QSEMI_PHY is not set CONFIG_REALTEK_PHY=y # CONFIG_REALTEK_PHY_HWMON is not set # CONFIG_RENESAS_PHY is not set # CONFIG_ROCKCHIP_PHY is not set CONFIG_SMSC_PHY=y # CONFIG_STE10XP is not set # CONFIG_TERANETICS_PHY is not set # CONFIG_DP83822_PHY is not set # CONFIG_DP83TC811_PHY is not set # CONFIG_DP83848_PHY is not set # CONFIG_DP83867_PHY is not set # CONFIG_DP83869_PHY is not set # CONFIG_DP83TD510_PHY is not set # CONFIG_DP83TG720_PHY is not set # CONFIG_VITESSE_PHY is not set # CONFIG_XILINX_GMII2RGMII is not set # CONFIG_PSE_CONTROLLER is not set CONFIG_CAN_DEV=y CONFIG_CAN_VCAN=y CONFIG_CAN_VXCAN=y CONFIG_CAN_NETLINK=y CONFIG_CAN_CALC_BITTIMING=y CONFIG_CAN_RX_OFFLOAD=y # CONFIG_CAN_CAN327 is not set # CONFIG_CAN_DUMMY is not set # CONFIG_CAN_FLEXCAN is not set # CONFIG_CAN_GRCAN is not set # CONFIG_CAN_KVASER_PCIEFD is not set CONFIG_CAN_SLCAN=y # CONFIG_CAN_C_CAN is not set # CONFIG_CAN_CC770 is not set # CONFIG_CAN_CTUCANFD_PCI is not set # CONFIG_CAN_CTUCANFD_PLATFORM is not set # CONFIG_CAN_ESD_402_PCI is not set CONFIG_CAN_IFI_CANFD=y # CONFIG_CAN_M_CAN is not set # CONFIG_CAN_PEAK_PCIEFD is not set # CONFIG_CAN_SJA1000 is not set # CONFIG_CAN_SOFTING is not set # # CAN SPI interfaces # # CONFIG_CAN_HI311X is not set # CONFIG_CAN_MCP251X is not set # CONFIG_CAN_MCP251XFD is not set # end of CAN SPI interfaces # # CAN USB interfaces # CONFIG_CAN_8DEV_USB=y CONFIG_CAN_EMS_USB=y CONFIG_CAN_ESD_USB=y CONFIG_CAN_ETAS_ES58X=y CONFIG_CAN_F81604=y CONFIG_CAN_GS_USB=y CONFIG_CAN_KVASER_USB=y CONFIG_CAN_MCBA_USB=y CONFIG_CAN_PEAK_USB=y CONFIG_CAN_UCAN=y # end of CAN USB interfaces # CONFIG_CAN_DEBUG_DEVICES is not set # # MCTP Device Drivers # # CONFIG_MCTP_SERIAL is not set # CONFIG_MCTP_TRANSPORT_I2C is not set # CONFIG_MCTP_TRANSPORT_USB is not set # end of MCTP Device Drivers CONFIG_FWNODE_MDIO=y CONFIG_OF_MDIO=y CONFIG_ACPI_MDIO=y # CONFIG_MDIO_BITBANG is not set # CONFIG_MDIO_BCM_UNIMAC is not set # CONFIG_MDIO_HISI_FEMAC is not set CONFIG_MDIO_MVUSB=y # CONFIG_MDIO_MSCC_MIIM is not set # CONFIG_MDIO_OCTEON is not set # CONFIG_MDIO_IPQ4019 is not set # CONFIG_MDIO_IPQ8064 is not set # CONFIG_MDIO_THUNDER is not set # # MDIO Multiplexers # # CONFIG_MDIO_BUS_MUX_GPIO is not set # CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set # CONFIG_MDIO_BUS_MUX_MMIOREG is not set # # PCS device drivers # # CONFIG_PCS_XPCS is not set # end of PCS device drivers # CONFIG_PLIP is not set CONFIG_PPP=y CONFIG_PPP_BSDCOMP=y CONFIG_PPP_DEFLATE=y CONFIG_PPP_FILTER=y CONFIG_PPP_MPPE=y CONFIG_PPP_MULTILINK=y CONFIG_PPPOATM=y CONFIG_PPPOE=y CONFIG_PPPOE_HASH_BITS_1=y # CONFIG_PPPOE_HASH_BITS_2 is not set # CONFIG_PPPOE_HASH_BITS_4 is not set # CONFIG_PPPOE_HASH_BITS_8 is not set CONFIG_PPPOE_HASH_BITS=1 CONFIG_PPTP=y CONFIG_PPPOL2TP=y CONFIG_PPP_ASYNC=y CONFIG_PPP_SYNC_TTY=y CONFIG_SLIP=y CONFIG_SLHC=y CONFIG_SLIP_COMPRESSED=y CONFIG_SLIP_SMART=y CONFIG_SLIP_MODE_SLIP6=y CONFIG_USB_NET_DRIVERS=y CONFIG_USB_CATC=y CONFIG_USB_KAWETH=y CONFIG_USB_PEGASUS=y CONFIG_USB_RTL8150=y CONFIG_USB_RTL8152=y CONFIG_USB_LAN78XX=y CONFIG_USB_USBNET=y CONFIG_USB_NET_AX8817X=y CONFIG_USB_NET_AX88179_178A=y CONFIG_USB_NET_CDCETHER=y CONFIG_USB_NET_CDC_EEM=y CONFIG_USB_NET_CDC_NCM=y CONFIG_USB_NET_HUAWEI_CDC_NCM=y CONFIG_USB_NET_CDC_MBIM=y CONFIG_USB_NET_DM9601=y CONFIG_USB_NET_SR9700=y CONFIG_USB_NET_SR9800=y CONFIG_USB_NET_SMSC75XX=y CONFIG_USB_NET_SMSC95XX=y CONFIG_USB_NET_GL620A=y CONFIG_USB_NET_NET1080=y CONFIG_USB_NET_PLUSB=y CONFIG_USB_NET_MCS7830=y CONFIG_USB_NET_RNDIS_HOST=y CONFIG_USB_NET_CDC_SUBSET_ENABLE=y CONFIG_USB_NET_CDC_SUBSET=y CONFIG_USB_ALI_M5632=y CONFIG_USB_AN2720=y CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_KC2190=y CONFIG_USB_NET_ZAURUS=y CONFIG_USB_NET_CX82310_ETH=y CONFIG_USB_NET_KALMIA=y CONFIG_USB_NET_QMI_WWAN=y CONFIG_USB_HSO=y CONFIG_USB_NET_INT51X1=y CONFIG_USB_CDC_PHONET=y CONFIG_USB_IPHETH=y CONFIG_USB_SIERRA_NET=y CONFIG_USB_VL600=y CONFIG_USB_NET_CH9200=y CONFIG_USB_NET_AQC111=y CONFIG_USB_RTL8153_ECM=y CONFIG_WLAN=y CONFIG_WLAN_VENDOR_ADMTEK=y # CONFIG_ADM8211 is not set CONFIG_ATH_COMMON=y CONFIG_WLAN_VENDOR_ATH=y # CONFIG_ATH_DEBUG is not set # CONFIG_ATH5K is not set # CONFIG_ATH5K_PCI is not set CONFIG_ATH9K_HW=y CONFIG_ATH9K_COMMON=y CONFIG_ATH9K_COMMON_DEBUG=y CONFIG_ATH9K_BTCOEX_SUPPORT=y CONFIG_ATH9K=y CONFIG_ATH9K_PCI=y CONFIG_ATH9K_AHB=y CONFIG_ATH9K_DEBUGFS=y # CONFIG_ATH9K_STATION_STATISTICS is not set CONFIG_ATH9K_DYNACK=y # CONFIG_ATH9K_WOW is not set CONFIG_ATH9K_RFKILL=y CONFIG_ATH9K_CHANNEL_CONTEXT=y CONFIG_ATH9K_PCOEM=y # CONFIG_ATH9K_PCI_NO_EEPROM is not set CONFIG_ATH9K_HTC=y CONFIG_ATH9K_HTC_DEBUGFS=y # CONFIG_ATH9K_HWRNG is not set CONFIG_ATH9K_COMMON_SPECTRAL=y CONFIG_CARL9170=y CONFIG_CARL9170_LEDS=y # CONFIG_CARL9170_DEBUGFS is not set CONFIG_CARL9170_WPC=y CONFIG_CARL9170_HWRNG=y CONFIG_ATH6KL=y # CONFIG_ATH6KL_SDIO is not set CONFIG_ATH6KL_USB=y # CONFIG_ATH6KL_DEBUG is not set # CONFIG_ATH6KL_TRACING is not set CONFIG_AR5523=y # CONFIG_WIL6210 is not set CONFIG_ATH10K=y CONFIG_ATH10K_CE=y CONFIG_ATH10K_PCI=y # CONFIG_ATH10K_AHB is not set # CONFIG_ATH10K_SDIO is not set CONFIG_ATH10K_USB=y # CONFIG_ATH10K_DEBUG is not set # CONFIG_ATH10K_DEBUGFS is not set CONFIG_ATH10K_LEDS=y # CONFIG_ATH10K_TRACING is not set # CONFIG_WCN36XX is not set CONFIG_ATH11K=y # CONFIG_ATH11K_PCI is not set # CONFIG_ATH11K_DEBUG is not set # CONFIG_ATH11K_DEBUGFS is not set # CONFIG_ATH11K_TRACING is not set # CONFIG_ATH12K is not set # CONFIG_WLAN_VENDOR_ATMEL is not set # CONFIG_WLAN_VENDOR_BROADCOM is not set # CONFIG_WLAN_VENDOR_INTEL is not set # CONFIG_WLAN_VENDOR_INTERSIL is not set # CONFIG_WLAN_VENDOR_MARVELL is not set # CONFIG_WLAN_VENDOR_MEDIATEK is not set # CONFIG_WLAN_VENDOR_MICROCHIP is not set CONFIG_WLAN_VENDOR_PURELIFI=y CONFIG_PLFXLC=y # CONFIG_WLAN_VENDOR_RALINK is not set # CONFIG_WLAN_VENDOR_REALTEK is not set # CONFIG_WLAN_VENDOR_RSI is not set CONFIG_WLAN_VENDOR_SILABS=y # CONFIG_WFX is not set # CONFIG_WLAN_VENDOR_ST is not set # CONFIG_WLAN_VENDOR_TI is not set # CONFIG_WLAN_VENDOR_ZYDAS is not set # CONFIG_WLAN_VENDOR_QUANTENNA is not set CONFIG_MAC80211_HWSIM=y CONFIG_VIRT_WIFI=y CONFIG_WAN=y CONFIG_HDLC=y CONFIG_HDLC_RAW=y CONFIG_HDLC_RAW_ETH=y CONFIG_HDLC_CISCO=y CONFIG_HDLC_FR=y CONFIG_HDLC_PPP=y CONFIG_HDLC_X25=y # CONFIG_FRAMER is not set # CONFIG_PCI200SYN is not set # CONFIG_WANXL is not set # CONFIG_PC300TOO is not set # CONFIG_FARSYNC is not set CONFIG_LAPBETHER=y CONFIG_IEEE802154_DRIVERS=y # CONFIG_IEEE802154_FAKELB is not set # CONFIG_IEEE802154_AT86RF230 is not set # CONFIG_IEEE802154_MRF24J40 is not set # CONFIG_IEEE802154_CC2520 is not set CONFIG_IEEE802154_ATUSB=y # CONFIG_IEEE802154_ADF7242 is not set # CONFIG_IEEE802154_CA8210 is not set # CONFIG_IEEE802154_MCR20A is not set CONFIG_IEEE802154_HWSIM=y # # Wireless WAN # CONFIG_WWAN=y # CONFIG_WWAN_DEBUGFS is not set # CONFIG_WWAN_HWSIM is not set CONFIG_MHI_WWAN_CTRL=y # CONFIG_MHI_WWAN_MBIM is not set # CONFIG_IOSM is not set # CONFIG_MTK_T7XX is not set # end of Wireless WAN CONFIG_VMXNET3=y # CONFIG_FUJITSU_ES is not set CONFIG_USB4_NET=y CONFIG_NETDEVSIM=y CONFIG_NET_FAILOVER=y CONFIG_ISDN=y CONFIG_ISDN_CAPI=y CONFIG_MISDN=y CONFIG_MISDN_DSP=y CONFIG_MISDN_L1OIP=y # # mISDN hardware drivers # # CONFIG_MISDN_HFCPCI is not set # CONFIG_MISDN_HFCMULTI is not set CONFIG_MISDN_HFCUSB=y # CONFIG_MISDN_AVMFRITZ is not set # CONFIG_MISDN_SPEEDFAX is not set # CONFIG_MISDN_INFINEON is not set # CONFIG_MISDN_W6692 is not set # CONFIG_MISDN_NETJET is not set # # Input device support # CONFIG_INPUT=y CONFIG_INPUT_LEDS=y CONFIG_INPUT_FF_MEMLESS=y CONFIG_INPUT_SPARSEKMAP=y # CONFIG_INPUT_MATRIXKMAP is not set CONFIG_INPUT_VIVALDIFMAP=y # # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_ADC is not set # CONFIG_KEYBOARD_ADP5588 is not set CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT1050 is not set # CONFIG_KEYBOARD_QT1070 is not set # CONFIG_KEYBOARD_QT2160 is not set # CONFIG_KEYBOARD_DLINK_DIR685 is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_GPIO is not set # CONFIG_KEYBOARD_GPIO_POLLED is not set # CONFIG_KEYBOARD_TCA8418 is not set # CONFIG_KEYBOARD_MATRIX is not set # CONFIG_KEYBOARD_LM8323 is not set # CONFIG_KEYBOARD_LM8333 is not set # CONFIG_KEYBOARD_MAX7359 is not set # CONFIG_KEYBOARD_MPR121 is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_OPENCORES is not set # CONFIG_KEYBOARD_PINEPHONE is not set # CONFIG_KEYBOARD_SAMSUNG is not set # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_OMAP4 is not set # CONFIG_KEYBOARD_TM2_TOUCHKEY is not set # CONFIG_KEYBOARD_TWL4030 is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_CAP11XX is not set # CONFIG_KEYBOARD_BCM is not set # CONFIG_KEYBOARD_CYPRESS_SF is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y CONFIG_MOUSE_PS2_ALPS=y CONFIG_MOUSE_PS2_BYD=y CONFIG_MOUSE_PS2_LOGIPS2PP=y CONFIG_MOUSE_PS2_SYNAPTICS=y CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y CONFIG_MOUSE_PS2_CYPRESS=y CONFIG_MOUSE_PS2_LIFEBOOK=y CONFIG_MOUSE_PS2_TRACKPOINT=y # CONFIG_MOUSE_PS2_ELANTECH is not set # CONFIG_MOUSE_PS2_SENTELIC is not set # CONFIG_MOUSE_PS2_TOUCHKIT is not set CONFIG_MOUSE_PS2_FOCALTECH=y # CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2_SMBUS=y # CONFIG_MOUSE_SERIAL is not set CONFIG_MOUSE_APPLETOUCH=y CONFIG_MOUSE_BCM5974=y # CONFIG_MOUSE_CYAPA is not set # CONFIG_MOUSE_ELAN_I2C is not set # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_MOUSE_GPIO is not set # CONFIG_MOUSE_SYNAPTICS_I2C is not set CONFIG_MOUSE_SYNAPTICS_USB=y CONFIG_INPUT_JOYSTICK=y # CONFIG_JOYSTICK_ANALOG is not set # CONFIG_JOYSTICK_A3D is not set # CONFIG_JOYSTICK_ADC is not set # CONFIG_JOYSTICK_ADI is not set # CONFIG_JOYSTICK_COBRA is not set # CONFIG_JOYSTICK_GF2K is not set # CONFIG_JOYSTICK_GRIP is not set # CONFIG_JOYSTICK_GRIP_MP is not set # CONFIG_JOYSTICK_GUILLEMOT is not set # CONFIG_JOYSTICK_INTERACT is not set # CONFIG_JOYSTICK_SIDEWINDER is not set # CONFIG_JOYSTICK_TMDC is not set CONFIG_JOYSTICK_IFORCE=y CONFIG_JOYSTICK_IFORCE_USB=y # CONFIG_JOYSTICK_IFORCE_232 is not set # CONFIG_JOYSTICK_WARRIOR is not set # CONFIG_JOYSTICK_MAGELLAN is not set # CONFIG_JOYSTICK_SPACEORB is not set # CONFIG_JOYSTICK_SPACEBALL is not set # CONFIG_JOYSTICK_STINGER is not set # CONFIG_JOYSTICK_TWIDJOY is not set # CONFIG_JOYSTICK_ZHENHUA is not set # CONFIG_JOYSTICK_DB9 is not set # CONFIG_JOYSTICK_GAMECON is not set # CONFIG_JOYSTICK_TURBOGRAFX is not set # CONFIG_JOYSTICK_AS5011 is not set # CONFIG_JOYSTICK_JOYDUMP is not set CONFIG_JOYSTICK_XPAD=y CONFIG_JOYSTICK_XPAD_FF=y CONFIG_JOYSTICK_XPAD_LEDS=y # CONFIG_JOYSTICK_WALKERA0701 is not set # CONFIG_JOYSTICK_PSXPAD_SPI is not set CONFIG_JOYSTICK_PXRC=y # CONFIG_JOYSTICK_QWIIC is not set # CONFIG_JOYSTICK_FSIA6B is not set # CONFIG_JOYSTICK_SENSEHAT is not set # CONFIG_JOYSTICK_SEESAW is not set CONFIG_INPUT_TABLET=y CONFIG_TABLET_USB_ACECAD=y CONFIG_TABLET_USB_AIPTEK=y CONFIG_TABLET_USB_HANWANG=y CONFIG_TABLET_USB_KBTAB=y CONFIG_TABLET_USB_PEGASUS=y # CONFIG_TABLET_SERIAL_WACOM4 is not set CONFIG_INPUT_TOUCHSCREEN=y # CONFIG_TOUCHSCREEN_ADS7846 is not set # CONFIG_TOUCHSCREEN_AD7877 is not set # CONFIG_TOUCHSCREEN_AD7879 is not set # CONFIG_TOUCHSCREEN_ADC is not set # CONFIG_TOUCHSCREEN_AR1021_I2C is not set # CONFIG_TOUCHSCREEN_ATMEL_MXT is not set # CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set # CONFIG_TOUCHSCREEN_BU21013 is not set # CONFIG_TOUCHSCREEN_BU21029 is not set # CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set # CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set # CONFIG_TOUCHSCREEN_CY8CTMA140 is not set # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set # CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set # CONFIG_TOUCHSCREEN_CYTTSP5 is not set # CONFIG_TOUCHSCREEN_DYNAPRO is not set # CONFIG_TOUCHSCREEN_HAMPSHIRE is not set # CONFIG_TOUCHSCREEN_EETI is not set # CONFIG_TOUCHSCREEN_EGALAX is not set # CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set # CONFIG_TOUCHSCREEN_EXC3000 is not set # CONFIG_TOUCHSCREEN_FUJITSU is not set # CONFIG_TOUCHSCREEN_GOODIX is not set # CONFIG_TOUCHSCREEN_GOODIX_BERLIN_I2C is not set # CONFIG_TOUCHSCREEN_GOODIX_BERLIN_SPI is not set # CONFIG_TOUCHSCREEN_HIDEEP is not set # CONFIG_TOUCHSCREEN_HIMAX_HX852X is not set # CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set # CONFIG_TOUCHSCREEN_HYNITRON_CSTXXX is not set # CONFIG_TOUCHSCREEN_HYNITRON_CST816X is not set # CONFIG_TOUCHSCREEN_ILI210X is not set # CONFIG_TOUCHSCREEN_ILITEK is not set # CONFIG_TOUCHSCREEN_S6SY761 is not set # CONFIG_TOUCHSCREEN_GUNZE is not set # CONFIG_TOUCHSCREEN_EKTF2127 is not set # CONFIG_TOUCHSCREEN_ELAN is not set # CONFIG_TOUCHSCREEN_ELO is not set # CONFIG_TOUCHSCREEN_WACOM_W8001 is not set # CONFIG_TOUCHSCREEN_WACOM_I2C is not set # CONFIG_TOUCHSCREEN_MAX11801 is not set # CONFIG_TOUCHSCREEN_MMS114 is not set # CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set # CONFIG_TOUCHSCREEN_MSG2638 is not set # CONFIG_TOUCHSCREEN_MTOUCH is not set # CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS is not set # CONFIG_TOUCHSCREEN_IMAGIS is not set # CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set # CONFIG_TOUCHSCREEN_INEXIO is not set # CONFIG_TOUCHSCREEN_PENMOUNT is not set # CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set # CONFIG_TOUCHSCREEN_TOUCHWIN is not set # CONFIG_TOUCHSCREEN_PIXCIR is not set # CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set CONFIG_TOUCHSCREEN_USB_COMPOSITE=y CONFIG_TOUCHSCREEN_USB_EGALAX=y CONFIG_TOUCHSCREEN_USB_PANJIT=y CONFIG_TOUCHSCREEN_USB_3M=y CONFIG_TOUCHSCREEN_USB_ITM=y CONFIG_TOUCHSCREEN_USB_ETURBO=y CONFIG_TOUCHSCREEN_USB_GUNZE=y CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y CONFIG_TOUCHSCREEN_USB_IRTOUCH=y CONFIG_TOUCHSCREEN_USB_IDEALTEK=y CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y CONFIG_TOUCHSCREEN_USB_GOTOP=y CONFIG_TOUCHSCREEN_USB_JASTEC=y CONFIG_TOUCHSCREEN_USB_ELO=y CONFIG_TOUCHSCREEN_USB_E2I=y CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y CONFIG_TOUCHSCREEN_USB_NEXIO=y CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set # CONFIG_TOUCHSCREEN_TSC_SERIO is not set # CONFIG_TOUCHSCREEN_TSC2004 is not set # CONFIG_TOUCHSCREEN_TSC2005 is not set # CONFIG_TOUCHSCREEN_TSC2007 is not set # CONFIG_TOUCHSCREEN_RM_TS is not set # CONFIG_TOUCHSCREEN_SILEAD is not set # CONFIG_TOUCHSCREEN_SIS_I2C is not set # CONFIG_TOUCHSCREEN_ST1232 is not set # CONFIG_TOUCHSCREEN_STMFTS is not set CONFIG_TOUCHSCREEN_SUR40=y # CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set # CONFIG_TOUCHSCREEN_SX8654 is not set # CONFIG_TOUCHSCREEN_TPS6507X is not set # CONFIG_TOUCHSCREEN_ZET6223 is not set # CONFIG_TOUCHSCREEN_ZFORCE is not set # CONFIG_TOUCHSCREEN_COLIBRI_VF50 is not set # CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set # CONFIG_TOUCHSCREEN_IQS5XX is not set # CONFIG_TOUCHSCREEN_IQS7211 is not set # CONFIG_TOUCHSCREEN_ZINITIX is not set # CONFIG_TOUCHSCREEN_HIMAX_HX83112B is not set CONFIG_INPUT_MISC=y # CONFIG_INPUT_AD714X is not set # CONFIG_INPUT_ATMEL_CAPTOUCH is not set # CONFIG_INPUT_AW86927 is not set # CONFIG_INPUT_BMA150 is not set # CONFIG_INPUT_E3X0_BUTTON is not set # CONFIG_INPUT_PCSPKR is not set # CONFIG_INPUT_MMA8450 is not set # CONFIG_INPUT_APANEL is not set # CONFIG_INPUT_GPIO_BEEPER is not set # CONFIG_INPUT_GPIO_DECODER is not set # CONFIG_INPUT_GPIO_VIBRA is not set # CONFIG_INPUT_ATLAS_BTNS is not set CONFIG_INPUT_ATI_REMOTE2=y CONFIG_INPUT_KEYSPAN_REMOTE=y # CONFIG_INPUT_KXTJ9 is not set CONFIG_INPUT_POWERMATE=y CONFIG_INPUT_YEALINK=y CONFIG_INPUT_CM109=y # CONFIG_INPUT_REGULATOR_HAPTIC is not set # CONFIG_INPUT_RETU_PWRBUTTON is not set # CONFIG_INPUT_TWL4030_PWRBUTTON is not set # CONFIG_INPUT_TWL4030_VIBRA is not set CONFIG_INPUT_UINPUT=y # CONFIG_INPUT_PCF8574 is not set # CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set # CONFIG_INPUT_DA7280_HAPTICS is not set # CONFIG_INPUT_ADXL34X is not set # CONFIG_INPUT_IBM_PANEL is not set CONFIG_INPUT_IMS_PCU=y # CONFIG_INPUT_IQS269A is not set # CONFIG_INPUT_IQS626A is not set # CONFIG_INPUT_IQS7222 is not set # CONFIG_INPUT_CMA3000 is not set # CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set # CONFIG_INPUT_DRV260X_HAPTICS is not set # CONFIG_INPUT_DRV2665_HAPTICS is not set # CONFIG_INPUT_DRV2667_HAPTICS is not set CONFIG_RMI4_CORE=y # CONFIG_RMI4_I2C is not set # CONFIG_RMI4_SPI is not set # CONFIG_RMI4_SMB is not set CONFIG_RMI4_F03=y CONFIG_RMI4_F03_SERIO=y CONFIG_RMI4_2D_SENSOR=y CONFIG_RMI4_F11=y CONFIG_RMI4_F12=y # CONFIG_RMI4_F1A is not set # CONFIG_RMI4_F21 is not set CONFIG_RMI4_F30=y # CONFIG_RMI4_F34 is not set CONFIG_RMI4_F3A=y # CONFIG_RMI4_F54 is not set # CONFIG_RMI4_F55 is not set # # Hardware I/O ports # CONFIG_SERIO=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # CONFIG_SERIO_ALTERA_PS2 is not set # CONFIG_SERIO_PS2MULT is not set # CONFIG_SERIO_ARC_PS2 is not set # CONFIG_SERIO_APBPS2 is not set # CONFIG_SERIO_GPIO_PS2 is not set CONFIG_USERIO=y # CONFIG_GAMEPORT is not set # end of Hardware I/O ports # end of Input device support # # Character devices # CONFIG_TTY=y CONFIG_VT=y CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_VT_CONSOLE=y CONFIG_VT_CONSOLE_SLEEP=y CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LEGACY_TIOCSTI=y CONFIG_LDISC_AUTOLOAD=y # # Serial drivers # CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_PNP=y # CONFIG_SERIAL_8250_16550A_VARIANTS is not set # CONFIG_SERIAL_8250_FINTEK is not set CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCILIB=y CONFIG_SERIAL_8250_PCI=y # CONFIG_SERIAL_8250_EXAR is not set # CONFIG_SERIAL_8250_CS is not set CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_MANY_PORTS=y # CONFIG_SERIAL_8250_PCI1XXXX is not set CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_DETECT_IRQ=y CONFIG_SERIAL_8250_RSA=y CONFIG_SERIAL_8250_DWLIB=y # CONFIG_SERIAL_8250_DW is not set # CONFIG_SERIAL_8250_RT288X is not set CONFIG_SERIAL_8250_LPSS=y CONFIG_SERIAL_8250_MID=y CONFIG_SERIAL_8250_PERICOM=y # CONFIG_SERIAL_8250_NI is not set # CONFIG_SERIAL_OF_PLATFORM is not set # # Non-8250 serial port support # # CONFIG_SERIAL_MAX3100 is not set # CONFIG_SERIAL_MAX310X is not set # CONFIG_SERIAL_UARTLITE is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_SIFIVE is not set # CONFIG_SERIAL_LANTIQ is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_SC16IS7XX is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_XILINX_PS_UART is not set # CONFIG_SERIAL_ARC is not set # CONFIG_SERIAL_RP2 is not set # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_FSL_LINFLEXUART is not set # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set # CONFIG_SERIAL_SPRD is not set # end of Serial drivers CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set CONFIG_N_HDLC=y # CONFIG_IPWIRELESS is not set CONFIG_N_GSM=y CONFIG_NOZOMI=y CONFIG_NULL_TTY=y CONFIG_HVC_DRIVER=y CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_CTRL_TTYPORT=y CONFIG_TTY_PRINTK=y CONFIG_TTY_PRINTK_LEVEL=6 # CONFIG_PRINTER is not set # CONFIG_PPDEV is not set CONFIG_VIRTIO_CONSOLE=y # CONFIG_IPMI_HANDLER is not set # CONFIG_SSIF_IPMI_BMC is not set # CONFIG_IPMB_DEVICE_INTERFACE is not set CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set # CONFIG_HW_RANDOM_INTEL is not set # CONFIG_HW_RANDOM_AMD is not set # CONFIG_HW_RANDOM_BA431 is not set # CONFIG_HW_RANDOM_VIA is not set CONFIG_HW_RANDOM_VIRTIO=y # CONFIG_HW_RANDOM_CCTRNG is not set # CONFIG_HW_RANDOM_XIPHERA is not set # CONFIG_APPLICOM is not set # CONFIG_MWAVE is not set # CONFIG_DEVMEM is not set CONFIG_NVRAM=y # CONFIG_DEVPORT is not set CONFIG_HPET=y CONFIG_HPET_MMAP=y CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HANGCHECK_TIMER is not set CONFIG_TCG_TPM=y # CONFIG_TCG_TPM2_HMAC is not set # CONFIG_HW_RANDOM_TPM is not set CONFIG_TCG_TIS_CORE=y CONFIG_TCG_TIS=y # CONFIG_TCG_TIS_SPI is not set # CONFIG_TCG_TIS_I2C is not set # CONFIG_TCG_TIS_I2C_CR50 is not set # CONFIG_TCG_TIS_I2C_ATMEL is not set # CONFIG_TCG_TIS_I2C_INFINEON is not set # CONFIG_TCG_TIS_I2C_NUVOTON is not set # CONFIG_TCG_NSC is not set # CONFIG_TCG_ATMEL is not set # CONFIG_TCG_INFINEON is not set CONFIG_TCG_CRB=y # CONFIG_TCG_VTPM_PROXY is not set # CONFIG_TCG_TIS_ST33ZP24_I2C is not set # CONFIG_TCG_TIS_ST33ZP24_SPI is not set # CONFIG_TELCLOCK is not set CONFIG_XILLYBUS_CLASS=y # CONFIG_XILLYBUS is not set CONFIG_XILLYUSB=y # end of Character devices # # I2C support # CONFIG_I2C=y CONFIG_ACPI_I2C_OPREGION=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_MUX=y # # Multiplexer I2C Chip support # # CONFIG_I2C_ARB_GPIO_CHALLENGE is not set # CONFIG_I2C_MUX_GPIO is not set # CONFIG_I2C_MUX_GPMUX is not set # CONFIG_I2C_MUX_LTC4306 is not set # CONFIG_I2C_MUX_PCA9541 is not set # CONFIG_I2C_MUX_PCA954x is not set CONFIG_I2C_MUX_REG=y # CONFIG_I2C_MUX_MLXCPLD is not set # end of Multiplexer I2C Chip support CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_SMBUS=y CONFIG_I2C_ALGOBIT=y # # I2C Hardware Bus support # # # PC SMBus host controller drivers # # CONFIG_I2C_ALI1535 is not set # CONFIG_I2C_ALI1563 is not set # CONFIG_I2C_ALI15X3 is not set # CONFIG_I2C_AMD756 is not set # CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_AMD_MP2 is not set CONFIG_I2C_I801=y # CONFIG_I2C_ISCH is not set # CONFIG_I2C_ISMT is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_CHT_WC is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_NVIDIA_GPU is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_ZHAOXIN is not set # # ACPI drivers # # CONFIG_I2C_SCMI is not set # # I2C system bus drivers (mostly embedded / system-on-chip) # # CONFIG_I2C_CBUS_GPIO is not set CONFIG_I2C_DESIGNWARE_CORE=y # CONFIG_I2C_DESIGNWARE_SLAVE is not set CONFIG_I2C_DESIGNWARE_PLATFORM=y # CONFIG_I2C_DESIGNWARE_BAYTRAIL is not set # CONFIG_I2C_DESIGNWARE_PCI is not set # CONFIG_I2C_EMEV2 is not set # CONFIG_I2C_GPIO is not set # CONFIG_I2C_OCORES is not set # CONFIG_I2C_PCA_PLATFORM is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_SIMTEC is not set # CONFIG_I2C_XILINX is not set # # External I2C/SMBus adapter drivers # CONFIG_I2C_DIOLAN_U2C=y CONFIG_I2C_DLN2=y CONFIG_I2C_LJCA=y CONFIG_I2C_CP2615=y # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PCI1XXXX is not set CONFIG_I2C_ROBOTFUZZ_OSIF=y # CONFIG_I2C_TAOS_EVM is not set CONFIG_I2C_TINY_USB=y CONFIG_I2C_VIPERBOARD=y # # Other I2C/SMBus bus drivers # # CONFIG_I2C_MLXCPLD is not set # CONFIG_I2C_VIRTIO is not set # end of I2C Hardware Bus support # CONFIG_I2C_STUB is not set CONFIG_I2C_SLAVE=y CONFIG_I2C_SLAVE_EEPROM=y # CONFIG_I2C_SLAVE_TESTUNIT is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # end of I2C support # CONFIG_I3C is not set CONFIG_SPI=y # CONFIG_SPI_DEBUG is not set CONFIG_SPI_MASTER=y # CONFIG_SPI_MEM is not set # # SPI Master Controller Drivers # # CONFIG_SPI_ALTERA is not set # CONFIG_SPI_AXI_SPI_ENGINE is not set # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_BUTTERFLY is not set # CONFIG_SPI_CADENCE is not set # CONFIG_SPI_CADENCE_QUADSPI is not set # CONFIG_SPI_CH341 is not set # CONFIG_SPI_DESIGNWARE is not set CONFIG_SPI_DLN2=y # CONFIG_SPI_GPIO is not set # CONFIG_SPI_LM70_LLP is not set # CONFIG_SPI_FSL_SPI is not set CONFIG_SPI_LJCA=y # CONFIG_SPI_MICROCHIP_CORE_QSPI is not set # CONFIG_SPI_MICROCHIP_CORE_SPI is not set # CONFIG_SPI_LANTIQ_SSC is not set # CONFIG_SPI_OC_TINY is not set # CONFIG_SPI_PCI1XXXX is not set # CONFIG_SPI_PXA2XX is not set # CONFIG_SPI_SC18IS602 is not set # CONFIG_SPI_SIFIVE is not set # CONFIG_SPI_MXIC is not set # CONFIG_SPI_VIRTIO is not set # CONFIG_SPI_XCOMM is not set # CONFIG_SPI_XILINX is not set # # SPI Multiplexer support # # CONFIG_SPI_MUX is not set # # SPI Protocol Masters # # CONFIG_SPI_SPIDEV is not set # CONFIG_SPI_LOOPBACK_TEST is not set # CONFIG_SPI_TLE62X0 is not set # CONFIG_SPI_SLAVE is not set CONFIG_SPI_DYNAMIC=y # CONFIG_SPMI is not set # CONFIG_HSI is not set CONFIG_PPS=y # CONFIG_PPS_DEBUG is not set # # PPS clients support # # CONFIG_PPS_CLIENT_KTIMER is not set # CONFIG_PPS_CLIENT_LDISC is not set # CONFIG_PPS_CLIENT_PARPORT is not set # CONFIG_PPS_CLIENT_GPIO is not set # CONFIG_PPS_GENERATOR is not set # # PTP clock support # CONFIG_PTP_1588_CLOCK=y CONFIG_PTP_1588_CLOCK_OPTIONAL=y # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # CONFIG_PTP_1588_CLOCK_KVM=y CONFIG_PTP_1588_CLOCK_VMCLOCK=y # CONFIG_PTP_1588_CLOCK_IDT82P33 is not set # CONFIG_PTP_1588_CLOCK_IDTCM is not set # CONFIG_PTP_1588_CLOCK_FC3W is not set # CONFIG_PTP_1588_CLOCK_MOCK is not set # CONFIG_PTP_1588_CLOCK_VMW is not set # CONFIG_PTP_1588_CLOCK_OCP is not set # CONFIG_PTP_NETC_V4_TIMER is not set # end of PTP clock support # # DPLL device support # # CONFIG_ZL3073X_I2C is not set # CONFIG_ZL3073X_SPI is not set # end of DPLL device support # CONFIG_PINCTRL is not set CONFIG_GPIOLIB_LEGACY=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_FASTPATH_LIMIT=512 CONFIG_OF_GPIO=y CONFIG_GPIO_ACPI=y CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_DEBUG_GPIO is not set # CONFIG_GPIO_SYSFS is not set # CONFIG_GPIO_CDEV is not set # # Memory mapped GPIO drivers # # CONFIG_GPIO_74XX_MMIO is not set # CONFIG_GPIO_ALTERA is not set # CONFIG_GPIO_AMDPT is not set # CONFIG_GPIO_CADENCE is not set # CONFIG_GPIO_DWAPB is not set # CONFIG_GPIO_FTGPIO010 is not set # CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_GRANITERAPIDS is not set # CONFIG_GPIO_GRGPIO is not set # CONFIG_GPIO_HLWD is not set # CONFIG_GPIO_ICH is not set # CONFIG_GPIO_LOGICVC is not set # CONFIG_GPIO_MB86S7X is not set # CONFIG_GPIO_POLARFIRE_SOC is not set # CONFIG_GPIO_SIFIVE is not set # CONFIG_GPIO_SYSCON is not set # CONFIG_GPIO_XILINX is not set # CONFIG_GPIO_AMD_FCH is not set # end of Memory mapped GPIO drivers # # Port-mapped I/O GPIO drivers # # CONFIG_GPIO_VX855 is not set # CONFIG_GPIO_F7188X is not set # CONFIG_GPIO_IT87 is not set # CONFIG_GPIO_SCH311X is not set # CONFIG_GPIO_WINBOND is not set # CONFIG_GPIO_WS16C48 is not set # end of Port-mapped I/O GPIO drivers # # I2C GPIO expanders # # CONFIG_GPIO_ADNP is not set # CONFIG_GPIO_FXL6408 is not set # CONFIG_GPIO_DS4520 is not set # CONFIG_GPIO_GW_PLD is not set # CONFIG_GPIO_MAX7300 is not set # CONFIG_GPIO_MAX732X is not set # CONFIG_GPIO_PCA953X is not set # CONFIG_GPIO_PCA9570 is not set # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_TPIC2810 is not set # end of I2C GPIO expanders # # MFD GPIO expanders # CONFIG_GPIO_DLN2=y CONFIG_GPIO_LJCA=y # CONFIG_GPIO_TWL4030 is not set # CONFIG_GPIO_WHISKEY_COVE is not set # end of MFD GPIO expanders # # PCI GPIO expanders # # CONFIG_GPIO_AMD8111 is not set # CONFIG_GPIO_BT8XX is not set # CONFIG_GPIO_ML_IOH is not set # CONFIG_GPIO_PCI_IDIO_16 is not set # CONFIG_GPIO_PCIE_IDIO_24 is not set # CONFIG_GPIO_RDC321X is not set # CONFIG_GPIO_SODAVILLE is not set # end of PCI GPIO expanders # # SPI GPIO expanders # # CONFIG_GPIO_74X164 is not set # CONFIG_GPIO_MAX3191X is not set # CONFIG_GPIO_MAX7301 is not set # CONFIG_GPIO_MC33880 is not set # CONFIG_GPIO_PISOSR is not set # CONFIG_GPIO_XRA1403 is not set # end of SPI GPIO expanders # # USB GPIO expanders # CONFIG_GPIO_VIPERBOARD=y # CONFIG_GPIO_MPSSE is not set # end of USB GPIO expanders # # Virtual GPIO drivers # # CONFIG_GPIO_AGGREGATOR is not set # CONFIG_GPIO_LATCH is not set # CONFIG_GPIO_MOCKUP is not set # CONFIG_GPIO_VIRTIO is not set # CONFIG_GPIO_SIM is not set # end of Virtual GPIO drivers # # GPIO Debugging utilities # # CONFIG_GPIO_SLOPPY_LOGIC_ANALYZER is not set # CONFIG_GPIO_VIRTUSER is not set # end of GPIO Debugging utilities # CONFIG_W1 is not set # CONFIG_POWER_RESET is not set # CONFIG_POWER_SEQUENCING is not set CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set CONFIG_POWER_SUPPLY_HWMON=y # CONFIG_GENERIC_ADC_BATTERY is not set # CONFIG_IP5XXX_POWER is not set # CONFIG_TEST_POWER is not set # CONFIG_CHARGER_ADP5061 is not set # CONFIG_BATTERY_CHAGALL is not set # CONFIG_BATTERY_CW2015 is not set # CONFIG_BATTERY_DS2780 is not set # CONFIG_BATTERY_DS2781 is not set # CONFIG_BATTERY_DS2782 is not set # CONFIG_BATTERY_SAMSUNG_SDI is not set # CONFIG_BATTERY_SBS is not set # CONFIG_CHARGER_SBS is not set # CONFIG_MANAGER_SBS is not set # CONFIG_BATTERY_BQ27XXX is not set # CONFIG_BATTERY_MAX17040 is not set # CONFIG_BATTERY_MAX17042 is not set # CONFIG_BATTERY_MAX1720X is not set CONFIG_CHARGER_ISP1704=y # CONFIG_CHARGER_MAX8903 is not set # CONFIG_CHARGER_TWL4030 is not set # CONFIG_CHARGER_TWL6030 is not set # CONFIG_CHARGER_LP8727 is not set # CONFIG_CHARGER_GPIO is not set # CONFIG_CHARGER_MANAGER is not set # CONFIG_CHARGER_LT3651 is not set # CONFIG_CHARGER_LTC4162L is not set # CONFIG_CHARGER_DETECTOR_MAX14656 is not set # CONFIG_CHARGER_MAX77976 is not set # CONFIG_CHARGER_MAX8971 is not set # CONFIG_CHARGER_MT6360 is not set # CONFIG_CHARGER_MT6370 is not set # CONFIG_CHARGER_BQ2415X is not set CONFIG_CHARGER_BQ24190=y # CONFIG_CHARGER_BQ24257 is not set # CONFIG_CHARGER_BQ24735 is not set # CONFIG_CHARGER_BQ2515X is not set # CONFIG_CHARGER_BQ25890 is not set # CONFIG_CHARGER_BQ25980 is not set # CONFIG_CHARGER_BQ256XX is not set # CONFIG_CHARGER_SMB347 is not set # CONFIG_BATTERY_GAUGE_LTC2941 is not set # CONFIG_BATTERY_GOLDFISH is not set # CONFIG_BATTERY_RT5033 is not set # CONFIG_CHARGER_RT9455 is not set # CONFIG_CHARGER_RT9467 is not set # CONFIG_CHARGER_RT9471 is not set # CONFIG_CHARGER_RT9756 is not set # CONFIG_FUEL_GAUGE_STC3117 is not set # CONFIG_CHARGER_UCS1002 is not set # CONFIG_CHARGER_BD99954 is not set # CONFIG_BATTERY_SURFACE is not set # CONFIG_CHARGER_SURFACE is not set # CONFIG_BATTERY_UG3105 is not set # CONFIG_FUEL_GAUGE_MM8013 is not set CONFIG_HWMON=y # CONFIG_HWMON_DEBUG_CHIP is not set # # Native drivers # # CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ABITUGURU3 is not set # CONFIG_SENSORS_AD7314 is not set # CONFIG_SENSORS_AD7414 is not set # CONFIG_SENSORS_AD7418 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1029 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ADM1177 is not set # CONFIG_SENSORS_ADM9240 is not set # CONFIG_SENSORS_ADT7310 is not set # CONFIG_SENSORS_ADT7410 is not set # CONFIG_SENSORS_ADT7411 is not set # CONFIG_SENSORS_ADT7462 is not set # CONFIG_SENSORS_ADT7470 is not set # CONFIG_SENSORS_ADT7475 is not set # CONFIG_SENSORS_AHT10 is not set CONFIG_SENSORS_AQUACOMPUTER_D5NEXT=y # CONFIG_SENSORS_AS370 is not set # CONFIG_SENSORS_ASC7621 is not set # CONFIG_SENSORS_ASUS_ROG_RYUJIN is not set # CONFIG_SENSORS_AXI_FAN_CONTROL is not set # CONFIG_SENSORS_K8TEMP is not set # CONFIG_SENSORS_K10TEMP is not set # CONFIG_SENSORS_FAM15H_POWER is not set # CONFIG_SENSORS_APPLESMC is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_CHIPCAP2 is not set CONFIG_SENSORS_CORSAIR_CPRO=y CONFIG_SENSORS_CORSAIR_PSU=y # CONFIG_SENSORS_DRIVETEMP is not set # CONFIG_SENSORS_DS620 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_DELL_SMM is not set # CONFIG_SENSORS_I5K_AMB is not set # CONFIG_SENSORS_F71805F is not set # CONFIG_SENSORS_F71882FG is not set # CONFIG_SENSORS_F75375S is not set # CONFIG_SENSORS_FSCHMD is not set # CONFIG_SENSORS_FTSTEUTATES is not set CONFIG_SENSORS_GIGABYTE_WATERFORCE=y # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_GPD is not set # CONFIG_SENSORS_G760A is not set # CONFIG_SENSORS_G762 is not set # CONFIG_SENSORS_GPIO_FAN is not set # CONFIG_SENSORS_HIH6130 is not set # CONFIG_SENSORS_HS3001 is not set # CONFIG_SENSORS_HTU31 is not set # CONFIG_SENSORS_IIO_HWMON is not set # CONFIG_SENSORS_I5500 is not set # CONFIG_SENSORS_CORETEMP is not set # CONFIG_SENSORS_ISL28022 is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_JC42 is not set CONFIG_SENSORS_POWERZ=y # CONFIG_SENSORS_POWR1220 is not set # CONFIG_SENSORS_LENOVO_EC is not set # CONFIG_SENSORS_LINEAGE is not set # CONFIG_SENSORS_LTC2945 is not set # CONFIG_SENSORS_LTC2947_I2C is not set # CONFIG_SENSORS_LTC2947_SPI is not set # CONFIG_SENSORS_LTC2990 is not set # CONFIG_SENSORS_LTC2991 is not set # CONFIG_SENSORS_LTC2992 is not set # CONFIG_SENSORS_LTC4151 is not set # CONFIG_SENSORS_LTC4215 is not set # CONFIG_SENSORS_LTC4222 is not set # CONFIG_SENSORS_LTC4245 is not set # CONFIG_SENSORS_LTC4260 is not set # CONFIG_SENSORS_LTC4261 is not set # CONFIG_SENSORS_LTC4282 is not set # CONFIG_SENSORS_MAX1111 is not set # CONFIG_SENSORS_MAX127 is not set # CONFIG_SENSORS_MAX16065 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_MAX1668 is not set # CONFIG_SENSORS_MAX197 is not set # CONFIG_SENSORS_MAX31722 is not set # CONFIG_SENSORS_MAX31730 is not set # CONFIG_SENSORS_MAX31760 is not set # CONFIG_MAX31827 is not set # CONFIG_SENSORS_MAX6620 is not set # CONFIG_SENSORS_MAX6621 is not set # CONFIG_SENSORS_MAX6639 is not set # CONFIG_SENSORS_MAX6650 is not set # CONFIG_SENSORS_MAX6697 is not set # CONFIG_SENSORS_MAX31790 is not set # CONFIG_SENSORS_MC34VR500 is not set # CONFIG_SENSORS_MCP3021 is not set # CONFIG_SENSORS_TC654 is not set # CONFIG_SENSORS_TPS23861 is not set # CONFIG_SENSORS_MR75203 is not set # CONFIG_SENSORS_ADCXX is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM70 is not set # CONFIG_SENSORS_LM73 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set # CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_LM92 is not set # CONFIG_SENSORS_LM93 is not set # CONFIG_SENSORS_LM95234 is not set # CONFIG_SENSORS_LM95241 is not set # CONFIG_SENSORS_LM95245 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set # CONFIG_SENSORS_NTC_THERMISTOR is not set # CONFIG_SENSORS_NCT6683 is not set # CONFIG_SENSORS_NCT6775 is not set # CONFIG_SENSORS_NCT6775_I2C is not set # CONFIG_SENSORS_NCT7363 is not set # CONFIG_SENSORS_NCT7802 is not set # CONFIG_SENSORS_NCT7904 is not set # CONFIG_SENSORS_NPCM7XX is not set CONFIG_SENSORS_NZXT_KRAKEN2=y # CONFIG_SENSORS_NZXT_KRAKEN3 is not set CONFIG_SENSORS_NZXT_SMART2=y # CONFIG_SENSORS_OCC_P8_I2C is not set # CONFIG_SENSORS_PCF8591 is not set # CONFIG_PMBUS is not set # CONFIG_SENSORS_PT5161L is not set # CONFIG_SENSORS_SBTSI is not set # CONFIG_SENSORS_SHT15 is not set # CONFIG_SENSORS_SHT21 is not set # CONFIG_SENSORS_SHT3x is not set # CONFIG_SENSORS_SHT4x is not set # CONFIG_SENSORS_SHTC1 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_DME1737 is not set # CONFIG_SENSORS_EMC1403 is not set # CONFIG_SENSORS_EMC2103 is not set # CONFIG_SENSORS_EMC2305 is not set # CONFIG_SENSORS_EMC6W201 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SCH5627 is not set # CONFIG_SENSORS_SCH5636 is not set # CONFIG_SENSORS_STTS751 is not set # CONFIG_SENSORS_SURFACE_FAN is not set # CONFIG_SENSORS_SURFACE_TEMP is not set # CONFIG_SENSORS_ADC128D818 is not set # CONFIG_SENSORS_ADS7828 is not set # CONFIG_SENSORS_ADS7871 is not set # CONFIG_SENSORS_AMC6821 is not set # CONFIG_SENSORS_INA209 is not set # CONFIG_SENSORS_INA2XX is not set # CONFIG_SENSORS_INA238 is not set # CONFIG_SENSORS_INA3221 is not set # CONFIG_SENSORS_SPD5118 is not set # CONFIG_SENSORS_TC74 is not set # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP102 is not set # CONFIG_SENSORS_TMP103 is not set # CONFIG_SENSORS_TMP108 is not set # CONFIG_SENSORS_TMP401 is not set # CONFIG_SENSORS_TMP421 is not set # CONFIG_SENSORS_TMP464 is not set # CONFIG_SENSORS_TMP513 is not set # CONFIG_SENSORS_TSC1641 is not set # CONFIG_SENSORS_VIA_CPUTEMP is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83773G is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83793 is not set # CONFIG_SENSORS_W83795 is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83L786NG is not set # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_SENSORS_XGENE is not set # # ACPI drivers # # CONFIG_SENSORS_ACPI_POWER is not set # CONFIG_SENSORS_ATK0110 is not set # CONFIG_SENSORS_ASUS_WMI is not set # CONFIG_SENSORS_ASUS_EC is not set # CONFIG_SENSORS_HP_WMI is not set CONFIG_THERMAL=y CONFIG_THERMAL_NETLINK=y # CONFIG_THERMAL_STATISTICS is not set # CONFIG_THERMAL_DEBUGFS is not set # CONFIG_THERMAL_CORE_TESTING is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y # CONFIG_THERMAL_OF is not set CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set # CONFIG_THERMAL_GOV_FAIR_SHARE is not set CONFIG_THERMAL_GOV_STEP_WISE=y # CONFIG_THERMAL_GOV_BANG_BANG is not set # CONFIG_THERMAL_GOV_USER_SPACE is not set # CONFIG_PCIE_THERMAL is not set # CONFIG_THERMAL_EMULATION is not set # CONFIG_THERMAL_MMIO is not set # # Intel thermal drivers # # CONFIG_INTEL_POWERCLAMP is not set CONFIG_X86_THERMAL_VECTOR=y # CONFIG_X86_PKG_TEMP_THERMAL is not set # CONFIG_INTEL_SOC_DTS_THERMAL is not set # # ACPI INT340X thermal drivers # # CONFIG_INT340X_THERMAL is not set # end of ACPI INT340X thermal drivers # CONFIG_INTEL_BXT_PMIC_THERMAL is not set # CONFIG_INTEL_PCH_THERMAL is not set # CONFIG_INTEL_TCC_COOLING is not set # CONFIG_INTEL_HFI_THERMAL is not set # end of Intel thermal drivers # CONFIG_GENERIC_ADC_THERMAL is not set CONFIG_WATCHDOG=y # CONFIG_WATCHDOG_CORE is not set # CONFIG_WATCHDOG_NOWAYOUT is not set CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y CONFIG_WATCHDOG_OPEN_TIMEOUT=0 # CONFIG_WATCHDOG_SYSFS is not set # CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set # # Watchdog Pretimeout Governors # # # Watchdog Device Drivers # # CONFIG_SOFT_WATCHDOG is not set # CONFIG_GPIO_WATCHDOG is not set # CONFIG_LENOVO_SE10_WDT is not set # CONFIG_LENOVO_SE30_WDT is not set # CONFIG_WDAT_WDT is not set # CONFIG_XILINX_WATCHDOG is not set # CONFIG_ZIIRAVE_WATCHDOG is not set # CONFIG_CADENCE_WATCHDOG is not set # CONFIG_DW_WATCHDOG is not set # CONFIG_TWL4030_WATCHDOG is not set # CONFIG_MAX63XX_WATCHDOG is not set # CONFIG_RETU_WATCHDOG is not set # CONFIG_ACQUIRE_WDT is not set # CONFIG_ADVANTECH_WDT is not set # CONFIG_ADVANTECH_EC_WDT is not set # CONFIG_ALIM1535_WDT is not set # CONFIG_ALIM7101_WDT is not set # CONFIG_EBC_C384_WDT is not set # CONFIG_EXAR_WDT is not set # CONFIG_F71808E_WDT is not set # CONFIG_SP5100_TCO is not set # CONFIG_SBC_FITPC2_WATCHDOG is not set # CONFIG_EUROTECH_WDT is not set # CONFIG_IB700_WDT is not set # CONFIG_IBMASR is not set # CONFIG_WAFER_WDT is not set # CONFIG_I6300ESB_WDT is not set # CONFIG_IE6XX_WDT is not set # CONFIG_INTEL_OC_WATCHDOG is not set # CONFIG_ITCO_WDT is not set # CONFIG_IT8712F_WDT is not set # CONFIG_IT87_WDT is not set # CONFIG_HP_WATCHDOG is not set # CONFIG_SC1200_WDT is not set # CONFIG_PC87413_WDT is not set # CONFIG_NV_TCO is not set # CONFIG_60XX_WDT is not set # CONFIG_SMSC_SCH311X_WDT is not set # CONFIG_SMSC37B787_WDT is not set # CONFIG_TQMX86_WDT is not set # CONFIG_VIA_WDT is not set # CONFIG_W83627HF_WDT is not set # CONFIG_W83877F_WDT is not set # CONFIG_W83977F_WDT is not set # CONFIG_MACHZ_WDT is not set # CONFIG_SBC_EPX_C3_WATCHDOG is not set # CONFIG_INTEL_MEI_WDT is not set # CONFIG_NI903X_WDT is not set # CONFIG_NIC7018_WDT is not set # CONFIG_MEN_A21_WDT is not set # # PCI-based Watchdog Cards # # CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set # # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=y CONFIG_SSB_POSSIBLE=y CONFIG_SSB=y CONFIG_SSB_PCIHOST_POSSIBLE=y # CONFIG_SSB_PCIHOST is not set CONFIG_SSB_PCMCIAHOST_POSSIBLE=y # CONFIG_SSB_PCMCIAHOST is not set CONFIG_SSB_SDIOHOST_POSSIBLE=y # CONFIG_SSB_SDIOHOST is not set # CONFIG_SSB_DRIVER_GPIO is not set CONFIG_BCMA_POSSIBLE=y CONFIG_BCMA=y CONFIG_BCMA_HOST_PCI_POSSIBLE=y # CONFIG_BCMA_HOST_PCI is not set # CONFIG_BCMA_HOST_SOC is not set # CONFIG_BCMA_DRIVER_PCI is not set # CONFIG_BCMA_DRIVER_GMAC_CMN is not set # CONFIG_BCMA_DRIVER_GPIO is not set # CONFIG_BCMA_DEBUG is not set # # Multifunction device drivers # CONFIG_MFD_CORE=y # CONFIG_MFD_ADP5585 is not set # CONFIG_MFD_ACT8945A is not set # CONFIG_MFD_AS3711 is not set # CONFIG_MFD_SMPRO is not set # CONFIG_MFD_AS3722 is not set # CONFIG_PMIC_ADP5520 is not set # CONFIG_MFD_AAT2870_CORE is not set # CONFIG_MFD_ATMEL_FLEXCOM is not set # CONFIG_MFD_ATMEL_HLCDC is not set # CONFIG_MFD_BCM590XX is not set # CONFIG_MFD_BD9571MWV is not set # CONFIG_MFD_AXP20X_I2C is not set # CONFIG_MFD_CGBC is not set # CONFIG_MFD_CS40L50_I2C is not set # CONFIG_MFD_CS40L50_SPI is not set # CONFIG_MFD_CS42L43_I2C is not set # CONFIG_MFD_CS42L43_SDW is not set # CONFIG_MFD_LOCHNAGAR is not set # CONFIG_MFD_MADERA is not set # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_SPI is not set # CONFIG_MFD_DA9052_I2C is not set # CONFIG_MFD_DA9055 is not set # CONFIG_MFD_DA9062 is not set # CONFIG_MFD_DA9063 is not set # CONFIG_MFD_DA9150 is not set CONFIG_MFD_DLN2=y # CONFIG_MFD_GATEWORKS_GSC is not set # CONFIG_MFD_MC13XXX_SPI is not set # CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_MFD_MP2629 is not set # CONFIG_MFD_PF1550 is not set # CONFIG_MFD_HI6421_PMIC is not set # CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set CONFIG_LPC_ICH=y # CONFIG_LPC_SCH is not set # CONFIG_INTEL_SOC_PMIC is not set CONFIG_INTEL_SOC_PMIC_BXTWC=y CONFIG_INTEL_SOC_PMIC_CHTWC=y # CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set # CONFIG_MFD_INTEL_LPSS_ACPI is not set # CONFIG_MFD_INTEL_LPSS_PCI is not set CONFIG_MFD_INTEL_PMC_BXT=y # CONFIG_MFD_IQS62X is not set # CONFIG_MFD_JANZ_CMODIO is not set # CONFIG_MFD_KEMPLD is not set # CONFIG_MFD_88PM800 is not set # CONFIG_MFD_88PM805 is not set # CONFIG_MFD_88PM860X is not set # CONFIG_MFD_88PM886_PMIC is not set # CONFIG_MFD_MAX5970 is not set # CONFIG_MFD_MAX14577 is not set # CONFIG_MFD_MAX77541 is not set # CONFIG_MFD_MAX77620 is not set # CONFIG_MFD_MAX77650 is not set # CONFIG_MFD_MAX77686 is not set # CONFIG_MFD_MAX77693 is not set # CONFIG_MFD_MAX77705 is not set # CONFIG_MFD_MAX77714 is not set # CONFIG_MFD_MAX77759 is not set # CONFIG_MFD_MAX77843 is not set # CONFIG_MFD_MAX8907 is not set # CONFIG_MFD_MAX8925 is not set # CONFIG_MFD_MAX8997 is not set # CONFIG_MFD_MAX8998 is not set CONFIG_MFD_MT6360=y CONFIG_MFD_MT6370=y # CONFIG_MFD_MT6397 is not set # CONFIG_MFD_MENF21BMC is not set # CONFIG_MFD_NCT6694 is not set # CONFIG_MFD_OCELOT is not set # CONFIG_EZX_PCAP is not set # CONFIG_MFD_CPCAP is not set CONFIG_MFD_VIPERBOARD=y # CONFIG_MFD_NTXEC is not set CONFIG_MFD_RETU=y # CONFIG_MFD_SY7636A is not set # CONFIG_MFD_RDC321X is not set # CONFIG_MFD_RT4831 is not set # CONFIG_MFD_RT5033 is not set # CONFIG_MFD_RT5120 is not set # CONFIG_MFD_RC5T583 is not set # CONFIG_MFD_RK8XX_I2C is not set # CONFIG_MFD_RK8XX_SPI is not set # CONFIG_MFD_RN5T618 is not set # CONFIG_MFD_SEC_I2C is not set # CONFIG_MFD_SI476X_CORE is not set # CONFIG_MFD_SM501 is not set # CONFIG_MFD_SKY81452 is not set # CONFIG_MFD_STMPE is not set CONFIG_MFD_SYSCON=y # CONFIG_MFD_LP3943 is not set # CONFIG_MFD_LP8788 is not set # CONFIG_MFD_TI_LMU is not set # CONFIG_MFD_BQ257XX is not set # CONFIG_MFD_PALMAS is not set # CONFIG_TPS6105X is not set # CONFIG_TPS65010 is not set # CONFIG_TPS6507X is not set # CONFIG_MFD_TPS65086 is not set # CONFIG_MFD_TPS65090 is not set # CONFIG_MFD_TPS65217 is not set # CONFIG_MFD_TI_LP873X is not set # CONFIG_MFD_TI_LP87565 is not set # CONFIG_MFD_TPS65218 is not set # CONFIG_MFD_TPS65219 is not set # CONFIG_MFD_TPS6586X is not set # CONFIG_MFD_TPS65910 is not set # CONFIG_MFD_TPS65912_I2C is not set # CONFIG_MFD_TPS65912_SPI is not set # CONFIG_MFD_TPS6594_I2C is not set # CONFIG_MFD_TPS6594_SPI is not set CONFIG_TWL4030_CORE=y # CONFIG_MFD_TWL4030_AUDIO is not set # CONFIG_TWL6040_CORE is not set # CONFIG_MFD_LM3533 is not set # CONFIG_MFD_TC3589X is not set # CONFIG_MFD_TQMX86 is not set # CONFIG_MFD_VX855 is not set # CONFIG_MFD_ARIZONA_I2C is not set # CONFIG_MFD_ARIZONA_SPI is not set # CONFIG_MFD_WM8400 is not set # CONFIG_MFD_WM831X_I2C is not set # CONFIG_MFD_WM831X_SPI is not set # CONFIG_MFD_WM8350_I2C is not set # CONFIG_MFD_WM8994 is not set # CONFIG_MFD_ROHM_BD718XX is not set # CONFIG_MFD_ROHM_BD71828 is not set # CONFIG_MFD_ROHM_BD957XMUF is not set # CONFIG_MFD_ROHM_BD96801 is not set # CONFIG_MFD_STPMIC1 is not set # CONFIG_MFD_STMFX is not set # CONFIG_MFD_ATC260X_I2C is not set # CONFIG_MFD_QCOM_PM8008 is not set # CONFIG_RAVE_SP_CORE is not set # CONFIG_MFD_INTEL_M10_BMC_SPI is not set # CONFIG_MFD_QNAP_MCU is not set # CONFIG_MFD_RSMU_I2C is not set # CONFIG_MFD_RSMU_SPI is not set # CONFIG_MFD_UPBOARD_FPGA is not set # CONFIG_MFD_MAX7360 is not set # end of Multifunction device drivers CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set # CONFIG_REGULATOR_NETLINK_EVENTS is not set # CONFIG_REGULATOR_88PG86X is not set # CONFIG_REGULATOR_ACT8865 is not set # CONFIG_REGULATOR_AD5398 is not set # CONFIG_REGULATOR_ADP5055 is not set # CONFIG_REGULATOR_AW37503 is not set # CONFIG_REGULATOR_DA9121 is not set # CONFIG_REGULATOR_DA9210 is not set # CONFIG_REGULATOR_DA9211 is not set # CONFIG_REGULATOR_FAN53555 is not set # CONFIG_REGULATOR_FAN53880 is not set # CONFIG_REGULATOR_GPIO is not set # CONFIG_REGULATOR_ISL9305 is not set # CONFIG_REGULATOR_ISL6271A is not set # CONFIG_REGULATOR_FP9931 is not set # CONFIG_REGULATOR_LP3971 is not set # CONFIG_REGULATOR_LP3972 is not set # CONFIG_REGULATOR_LP872X is not set # CONFIG_REGULATOR_LP8755 is not set # CONFIG_REGULATOR_LTC3589 is not set # CONFIG_REGULATOR_LTC3676 is not set # CONFIG_REGULATOR_MAX1586 is not set # CONFIG_REGULATOR_MAX77503 is not set # CONFIG_REGULATOR_MAX77857 is not set # CONFIG_REGULATOR_MAX8649 is not set # CONFIG_REGULATOR_MAX8660 is not set # CONFIG_REGULATOR_MAX8893 is not set # CONFIG_REGULATOR_MAX8952 is not set # CONFIG_REGULATOR_MAX20086 is not set # CONFIG_REGULATOR_MAX20411 is not set # CONFIG_REGULATOR_MAX77826 is not set # CONFIG_REGULATOR_MAX77838 is not set # CONFIG_REGULATOR_MCP16502 is not set # CONFIG_REGULATOR_MP5416 is not set # CONFIG_REGULATOR_MP8859 is not set # CONFIG_REGULATOR_MP886X is not set # CONFIG_REGULATOR_MPQ7920 is not set # CONFIG_REGULATOR_MT6311 is not set # CONFIG_REGULATOR_MT6360 is not set # CONFIG_REGULATOR_MT6370 is not set # CONFIG_REGULATOR_PCA9450 is not set # CONFIG_REGULATOR_PF9453 is not set # CONFIG_REGULATOR_PF0900 is not set # CONFIG_REGULATOR_PF530X is not set # CONFIG_REGULATOR_PF8X00 is not set # CONFIG_REGULATOR_PFUZE100 is not set # CONFIG_REGULATOR_PV88060 is not set # CONFIG_REGULATOR_PV88080 is not set # CONFIG_REGULATOR_PV88090 is not set # CONFIG_REGULATOR_RAA215300 is not set # CONFIG_REGULATOR_RT4801 is not set # CONFIG_REGULATOR_RT4803 is not set # CONFIG_REGULATOR_RT5133 is not set # CONFIG_REGULATOR_RT5190A is not set # CONFIG_REGULATOR_RT5739 is not set # CONFIG_REGULATOR_RT5759 is not set # CONFIG_REGULATOR_RT6160 is not set # CONFIG_REGULATOR_RT6190 is not set # CONFIG_REGULATOR_RT6245 is not set # CONFIG_REGULATOR_RTQ2134 is not set # CONFIG_REGULATOR_RTMV20 is not set # CONFIG_REGULATOR_RTQ6752 is not set # CONFIG_REGULATOR_RTQ2208 is not set # CONFIG_REGULATOR_SLG51000 is not set # CONFIG_REGULATOR_SY8106A is not set # CONFIG_REGULATOR_SY8824X is not set # CONFIG_REGULATOR_SY8827N is not set # CONFIG_REGULATOR_TPS51632 is not set # CONFIG_REGULATOR_TPS62360 is not set # CONFIG_REGULATOR_TPS6286X is not set # CONFIG_REGULATOR_TPS6287X is not set # CONFIG_REGULATOR_TPS65023 is not set # CONFIG_REGULATOR_TPS6507X is not set # CONFIG_REGULATOR_TPS65132 is not set # CONFIG_REGULATOR_TPS6524X is not set CONFIG_REGULATOR_TWL4030=y # CONFIG_REGULATOR_VCTRL is not set CONFIG_RC_CORE=y # CONFIG_LIRC is not set # CONFIG_RC_MAP is not set # CONFIG_RC_DECODERS is not set CONFIG_RC_DEVICES=y # CONFIG_IR_ENE is not set # CONFIG_IR_FINTEK is not set # CONFIG_IR_GPIO_CIR is not set # CONFIG_IR_HIX5HD2 is not set CONFIG_IR_IGORPLUGUSB=y CONFIG_IR_IGUANA=y CONFIG_IR_IMON=y CONFIG_IR_IMON_RAW=y # CONFIG_IR_ITE_CIR is not set CONFIG_IR_MCEUSB=y # CONFIG_IR_NUVOTON is not set CONFIG_IR_REDRAT3=y # CONFIG_IR_SERIAL is not set CONFIG_IR_STREAMZAP=y CONFIG_IR_TOY=y CONFIG_IR_TTUSBIR=y # CONFIG_IR_WINBOND_CIR is not set CONFIG_RC_ATI_REMOTE=y # CONFIG_RC_LOOPBACK is not set CONFIG_RC_XBOX_DVD=y CONFIG_CEC_CORE=y # # CEC support # # CONFIG_MEDIA_CEC_RC is not set CONFIG_MEDIA_CEC_SUPPORT=y # CONFIG_CEC_CH7322 is not set # CONFIG_CEC_NXP_TDA9950 is not set # CONFIG_CEC_GPIO is not set # CONFIG_CEC_SECO is not set # CONFIG_USB_EXTRON_DA_HD_4K_PLUS_CEC is not set CONFIG_USB_PULSE8_CEC=y CONFIG_USB_RAINSHADOW_CEC=y # end of CEC support CONFIG_MEDIA_SUPPORT=y CONFIG_MEDIA_SUPPORT_FILTER=y # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set # # Media device types # CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y CONFIG_MEDIA_RADIO_SUPPORT=y CONFIG_MEDIA_SDR_SUPPORT=y CONFIG_MEDIA_PLATFORM_SUPPORT=y CONFIG_MEDIA_TEST_SUPPORT=y # end of Media device types CONFIG_VIDEO_DEV=y CONFIG_MEDIA_CONTROLLER=y CONFIG_DVB_CORE=y # # Video4Linux options # CONFIG_VIDEO_V4L2_I2C=y CONFIG_VIDEO_V4L2_SUBDEV_API=y # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set CONFIG_VIDEO_TUNER=y CONFIG_V4L2_MEM2MEM_DEV=y # end of Video4Linux options # # Media controller options # CONFIG_MEDIA_CONTROLLER_DVB=y # end of Media controller options # # Digital TV options # # CONFIG_DVB_MMAP is not set # CONFIG_DVB_NET is not set CONFIG_DVB_MAX_ADAPTERS=16 # CONFIG_DVB_DYNAMIC_MINORS is not set # CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set # CONFIG_DVB_ULE_DEBUG is not set # end of Digital TV options # # Media drivers # # # Drivers filtered as selected at 'Filter media drivers' # # # Media drivers # CONFIG_MEDIA_USB_SUPPORT=y # # Webcam devices # CONFIG_USB_GSPCA=y CONFIG_USB_GSPCA_BENQ=y CONFIG_USB_GSPCA_CONEX=y CONFIG_USB_GSPCA_CPIA1=y CONFIG_USB_GSPCA_DTCS033=y CONFIG_USB_GSPCA_ETOMS=y CONFIG_USB_GSPCA_FINEPIX=y CONFIG_USB_GSPCA_JEILINJ=y CONFIG_USB_GSPCA_JL2005BCD=y CONFIG_USB_GSPCA_KINECT=y CONFIG_USB_GSPCA_KONICA=y CONFIG_USB_GSPCA_MARS=y CONFIG_USB_GSPCA_MR97310A=y CONFIG_USB_GSPCA_NW80X=y CONFIG_USB_GSPCA_OV519=y CONFIG_USB_GSPCA_OV534=y CONFIG_USB_GSPCA_OV534_9=y CONFIG_USB_GSPCA_PAC207=y CONFIG_USB_GSPCA_PAC7302=y CONFIG_USB_GSPCA_PAC7311=y CONFIG_USB_GSPCA_SE401=y CONFIG_USB_GSPCA_SN9C2028=y CONFIG_USB_GSPCA_SN9C20X=y CONFIG_USB_GSPCA_SONIXB=y CONFIG_USB_GSPCA_SONIXJ=y CONFIG_USB_GSPCA_SPCA1528=y CONFIG_USB_GSPCA_SPCA500=y CONFIG_USB_GSPCA_SPCA501=y CONFIG_USB_GSPCA_SPCA505=y CONFIG_USB_GSPCA_SPCA506=y CONFIG_USB_GSPCA_SPCA508=y CONFIG_USB_GSPCA_SPCA561=y CONFIG_USB_GSPCA_SQ905=y CONFIG_USB_GSPCA_SQ905C=y CONFIG_USB_GSPCA_SQ930X=y CONFIG_USB_GSPCA_STK014=y CONFIG_USB_GSPCA_STK1135=y CONFIG_USB_GSPCA_STV0680=y CONFIG_USB_GSPCA_SUNPLUS=y CONFIG_USB_GSPCA_T613=y CONFIG_USB_GSPCA_TOPRO=y CONFIG_USB_GSPCA_TOUPTEK=y CONFIG_USB_GSPCA_TV8532=y CONFIG_USB_GSPCA_VC032X=y CONFIG_USB_GSPCA_VICAM=y CONFIG_USB_GSPCA_XIRLINK_CIT=y CONFIG_USB_GSPCA_ZC3XX=y CONFIG_USB_GL860=y CONFIG_USB_M5602=y CONFIG_USB_STV06XX=y CONFIG_USB_PWC=y # CONFIG_USB_PWC_DEBUG is not set CONFIG_USB_PWC_INPUT_EVDEV=y CONFIG_USB_S2255=y CONFIG_VIDEO_USBTV=y CONFIG_USB_VIDEO_CLASS=y CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y # # Analog TV USB devices # CONFIG_VIDEO_GO7007=y CONFIG_VIDEO_GO7007_USB=y CONFIG_VIDEO_GO7007_LOADER=y CONFIG_VIDEO_GO7007_USB_S2250_BOARD=y CONFIG_VIDEO_HDPVR=y CONFIG_VIDEO_PVRUSB2=y CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_STK1160=y # # Analog/digital TV USB devices # CONFIG_VIDEO_AU0828=y CONFIG_VIDEO_AU0828_V4L2=y CONFIG_VIDEO_AU0828_RC=y CONFIG_VIDEO_CX231XX=y CONFIG_VIDEO_CX231XX_RC=y CONFIG_VIDEO_CX231XX_ALSA=y CONFIG_VIDEO_CX231XX_DVB=y # # Digital TV USB devices # CONFIG_DVB_AS102=y CONFIG_DVB_B2C2_FLEXCOP_USB=y # CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set CONFIG_DVB_USB_V2=y CONFIG_DVB_USB_AF9015=y CONFIG_DVB_USB_AF9035=y CONFIG_DVB_USB_ANYSEE=y CONFIG_DVB_USB_AU6610=y CONFIG_DVB_USB_AZ6007=y CONFIG_DVB_USB_CE6230=y CONFIG_DVB_USB_DVBSKY=y CONFIG_DVB_USB_EC168=y CONFIG_DVB_USB_GL861=y CONFIG_DVB_USB_LME2510=y CONFIG_DVB_USB_MXL111SF=y CONFIG_DVB_USB_RTL28XXU=y CONFIG_DVB_USB_ZD1301=y CONFIG_DVB_USB=y # CONFIG_DVB_USB_DEBUG is not set CONFIG_DVB_USB_A800=y CONFIG_DVB_USB_AF9005=y CONFIG_DVB_USB_AF9005_REMOTE=y CONFIG_DVB_USB_AZ6027=y CONFIG_DVB_USB_CINERGY_T2=y CONFIG_DVB_USB_CXUSB=y CONFIG_DVB_USB_CXUSB_ANALOG=y CONFIG_DVB_USB_DIB0700=y CONFIG_DVB_USB_DIB3000MC=y CONFIG_DVB_USB_DIBUSB_MB=y # CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set CONFIG_DVB_USB_DIBUSB_MC=y CONFIG_DVB_USB_DIGITV=y CONFIG_DVB_USB_DTT200U=y CONFIG_DVB_USB_DTV5100=y CONFIG_DVB_USB_DW2102=y CONFIG_DVB_USB_GP8PSK=y CONFIG_DVB_USB_M920X=y CONFIG_DVB_USB_NOVA_T_USB2=y CONFIG_DVB_USB_OPERA1=y CONFIG_DVB_USB_PCTV452E=y CONFIG_DVB_USB_TECHNISAT_USB2=y CONFIG_DVB_USB_TTUSB2=y CONFIG_DVB_USB_UMT_010=y CONFIG_DVB_USB_VP702X=y CONFIG_DVB_USB_VP7045=y CONFIG_SMS_USB_DRV=y CONFIG_DVB_TTUSB_BUDGET=y CONFIG_DVB_TTUSB_DEC=y # # Webcam, TV (analog/digital) USB devices # CONFIG_VIDEO_EM28XX=y CONFIG_VIDEO_EM28XX_V4L2=y CONFIG_VIDEO_EM28XX_ALSA=y CONFIG_VIDEO_EM28XX_DVB=y CONFIG_VIDEO_EM28XX_RC=y # # Software defined radio USB devices # CONFIG_USB_AIRSPY=y CONFIG_USB_HACKRF=y CONFIG_USB_MSI2500=y # CONFIG_MEDIA_PCI_SUPPORT is not set CONFIG_RADIO_ADAPTERS=y # CONFIG_RADIO_MAXIRADIO is not set # CONFIG_RADIO_SAA7706H is not set CONFIG_RADIO_SHARK=y CONFIG_RADIO_SHARK2=y CONFIG_RADIO_SI4713=y CONFIG_RADIO_TEA575X=y # CONFIG_RADIO_TEA5764 is not set # CONFIG_RADIO_TEF6862 is not set CONFIG_USB_DSBR=y CONFIG_USB_KEENE=y CONFIG_USB_MA901=y CONFIG_USB_MR800=y CONFIG_USB_RAREMONO=y CONFIG_RADIO_SI470X=y CONFIG_USB_SI470X=y # CONFIG_I2C_SI470X is not set CONFIG_USB_SI4713=y # CONFIG_PLATFORM_SI4713 is not set CONFIG_I2C_SI4713=y # CONFIG_MEDIA_PLATFORM_DRIVERS is not set # # MMC/SDIO DVB adapters # CONFIG_SMS_SDIO_DRV=y CONFIG_V4L_TEST_DRIVERS=y CONFIG_VIDEO_VIM2M=y CONFIG_VIDEO_VICODEC=y CONFIG_VIDEO_VIMC=y CONFIG_VIDEO_VIVID=y CONFIG_VIDEO_VIVID_CEC=y # CONFIG_VIDEO_VIVID_OSD is not set CONFIG_VIDEO_VIVID_MAX_DEVS=64 # CONFIG_VIDEO_VISL is not set CONFIG_DVB_TEST_DRIVERS=y CONFIG_DVB_VIDTV=y # # FireWire (IEEE 1394) Adapters # # CONFIG_DVB_FIREDTV is not set CONFIG_MEDIA_COMMON_OPTIONS=y # # common driver options # CONFIG_CYPRESS_FIRMWARE=y CONFIG_TTPCI_EEPROM=y CONFIG_UVC_COMMON=y CONFIG_VIDEO_CX2341X=y CONFIG_VIDEO_TVEEPROM=y CONFIG_DVB_B2C2_FLEXCOP=y CONFIG_SMS_SIANO_MDTV=y CONFIG_SMS_SIANO_RC=y CONFIG_SMS_SIANO_DEBUGFS=y CONFIG_VIDEO_V4L2_TPG=y CONFIG_VIDEOBUF2_CORE=y CONFIG_VIDEOBUF2_V4L2=y CONFIG_VIDEOBUF2_MEMOPS=y CONFIG_VIDEOBUF2_DMA_CONTIG=y CONFIG_VIDEOBUF2_VMALLOC=y CONFIG_VIDEOBUF2_DMA_SG=y # end of Media drivers # # Media ancillary drivers # CONFIG_MEDIA_ATTACH=y # CONFIG_VIDEO_IR_I2C is not set # CONFIG_VIDEO_CAMERA_SENSOR is not set # # Camera ISPs # # CONFIG_VIDEO_THP7312 is not set # end of Camera ISPs # CONFIG_VIDEO_CAMERA_LENS is not set # # Flash devices # # CONFIG_VIDEO_ADP1653 is not set # CONFIG_VIDEO_LM3560 is not set # CONFIG_VIDEO_LM3646 is not set # end of Flash devices # # Audio decoders, processors and mixers # # CONFIG_VIDEO_CS3308 is not set # CONFIG_VIDEO_CS5345 is not set CONFIG_VIDEO_CS53L32A=y CONFIG_VIDEO_MSP3400=y # CONFIG_VIDEO_SONY_BTF_MPX is not set # CONFIG_VIDEO_TDA1997X is not set # CONFIG_VIDEO_TDA7432 is not set # CONFIG_VIDEO_TDA9840 is not set # CONFIG_VIDEO_TEA6415C is not set # CONFIG_VIDEO_TEA6420 is not set # CONFIG_VIDEO_TLV320AIC23B is not set # CONFIG_VIDEO_TVAUDIO is not set # CONFIG_VIDEO_UDA1342 is not set # CONFIG_VIDEO_VP27SMPX is not set # CONFIG_VIDEO_WM8739 is not set CONFIG_VIDEO_WM8775=y # end of Audio decoders, processors and mixers # # RDS decoders # # CONFIG_VIDEO_SAA6588 is not set # end of RDS decoders # # Video decoders # # CONFIG_VIDEO_ADV7180 is not set # CONFIG_VIDEO_ADV7183 is not set # CONFIG_VIDEO_ADV748X is not set # CONFIG_VIDEO_ADV7604 is not set # CONFIG_VIDEO_ADV7842 is not set # CONFIG_VIDEO_BT819 is not set # CONFIG_VIDEO_BT856 is not set # CONFIG_VIDEO_BT866 is not set # CONFIG_VIDEO_ISL7998X is not set # CONFIG_VIDEO_LT6911UXE is not set # CONFIG_VIDEO_KS0127 is not set # CONFIG_VIDEO_MAX9286 is not set # CONFIG_VIDEO_ML86V7667 is not set # CONFIG_VIDEO_SAA7110 is not set CONFIG_VIDEO_SAA711X=y # CONFIG_VIDEO_TC358743 is not set # CONFIG_VIDEO_TC358746 is not set # CONFIG_VIDEO_TVP514X is not set # CONFIG_VIDEO_TVP5150 is not set # CONFIG_VIDEO_TVP7002 is not set # CONFIG_VIDEO_TW2804 is not set # CONFIG_VIDEO_TW9900 is not set # CONFIG_VIDEO_TW9903 is not set # CONFIG_VIDEO_TW9906 is not set # CONFIG_VIDEO_TW9910 is not set # CONFIG_VIDEO_VPX3220 is not set # # Video and audio decoders # # CONFIG_VIDEO_SAA717X is not set CONFIG_VIDEO_CX25840=y # end of Video decoders # # Video encoders # # CONFIG_VIDEO_ADV7170 is not set # CONFIG_VIDEO_ADV7175 is not set # CONFIG_VIDEO_ADV7343 is not set # CONFIG_VIDEO_ADV7393 is not set # CONFIG_VIDEO_ADV7511 is not set # CONFIG_VIDEO_AK881X is not set # CONFIG_VIDEO_SAA7127 is not set # CONFIG_VIDEO_SAA7185 is not set # CONFIG_VIDEO_THS8200 is not set # end of Video encoders # # Video improvement chips # # CONFIG_VIDEO_UPD64031A is not set # CONFIG_VIDEO_UPD64083 is not set # end of Video improvement chips # # Audio/Video compression chips # # CONFIG_VIDEO_SAA6752HS is not set # end of Audio/Video compression chips # # SDR tuner chips # # CONFIG_SDR_MAX2175 is not set # end of SDR tuner chips # # Miscellaneous helper chips # # CONFIG_VIDEO_I2C is not set # CONFIG_VIDEO_M52790 is not set # CONFIG_VIDEO_ST_MIPID02 is not set # CONFIG_VIDEO_THS7303 is not set # end of Miscellaneous helper chips # # Video serializers and deserializers # # CONFIG_VIDEO_DS90UB913 is not set # CONFIG_VIDEO_DS90UB953 is not set # CONFIG_VIDEO_DS90UB960 is not set # CONFIG_VIDEO_MAX96714 is not set # CONFIG_VIDEO_MAX96717 is not set # end of Video serializers and deserializers # # Media SPI Adapters # # CONFIG_CXD2880_SPI_DRV is not set # CONFIG_VIDEO_GS1662 is not set # end of Media SPI Adapters CONFIG_MEDIA_TUNER=y # # Customize TV tuners # # CONFIG_MEDIA_TUNER_E4000 is not set # CONFIG_MEDIA_TUNER_FC0011 is not set # CONFIG_MEDIA_TUNER_FC0012 is not set # CONFIG_MEDIA_TUNER_FC0013 is not set # CONFIG_MEDIA_TUNER_FC2580 is not set # CONFIG_MEDIA_TUNER_IT913X is not set # CONFIG_MEDIA_TUNER_M88RS6000T is not set # CONFIG_MEDIA_TUNER_MAX2165 is not set # CONFIG_MEDIA_TUNER_MC44S803 is not set CONFIG_MEDIA_TUNER_MSI001=y # CONFIG_MEDIA_TUNER_MT2060 is not set # CONFIG_MEDIA_TUNER_MT2063 is not set # CONFIG_MEDIA_TUNER_MT20XX is not set # CONFIG_MEDIA_TUNER_MT2131 is not set # CONFIG_MEDIA_TUNER_MT2266 is not set # CONFIG_MEDIA_TUNER_MXL301RF is not set # CONFIG_MEDIA_TUNER_MXL5005S is not set # CONFIG_MEDIA_TUNER_MXL5007T is not set # CONFIG_MEDIA_TUNER_QM1D1B0004 is not set # CONFIG_MEDIA_TUNER_QM1D1C0042 is not set # CONFIG_MEDIA_TUNER_QT1010 is not set # CONFIG_MEDIA_TUNER_R820T is not set # CONFIG_MEDIA_TUNER_SI2157 is not set # CONFIG_MEDIA_TUNER_SIMPLE is not set # CONFIG_MEDIA_TUNER_TDA18212 is not set # CONFIG_MEDIA_TUNER_TDA18218 is not set # CONFIG_MEDIA_TUNER_TDA18250 is not set # CONFIG_MEDIA_TUNER_TDA18271 is not set # CONFIG_MEDIA_TUNER_TDA827X is not set # CONFIG_MEDIA_TUNER_TDA8290 is not set # CONFIG_MEDIA_TUNER_TDA9887 is not set # CONFIG_MEDIA_TUNER_TEA5761 is not set # CONFIG_MEDIA_TUNER_TEA5767 is not set # CONFIG_MEDIA_TUNER_TUA9001 is not set # CONFIG_MEDIA_TUNER_XC2028 is not set # CONFIG_MEDIA_TUNER_XC4000 is not set # CONFIG_MEDIA_TUNER_XC5000 is not set # end of Customize TV tuners # # Customise DVB Frontends # # # Multistandard (satellite) frontends # # CONFIG_DVB_M88DS3103 is not set # CONFIG_DVB_MXL5XX is not set # CONFIG_DVB_STB0899 is not set # CONFIG_DVB_STB6100 is not set # CONFIG_DVB_STV090x is not set # CONFIG_DVB_STV0910 is not set # CONFIG_DVB_STV6110x is not set # CONFIG_DVB_STV6111 is not set # # Multistandard (cable + terrestrial) frontends # # CONFIG_DVB_DRXK is not set # CONFIG_DVB_MN88472 is not set # CONFIG_DVB_MN88473 is not set # CONFIG_DVB_SI2165 is not set # CONFIG_DVB_TDA18271C2DD is not set # # DVB-S (satellite) frontends # # CONFIG_DVB_CX24110 is not set # CONFIG_DVB_CX24116 is not set # CONFIG_DVB_CX24117 is not set # CONFIG_DVB_CX24120 is not set # CONFIG_DVB_CX24123 is not set # CONFIG_DVB_DS3000 is not set # CONFIG_DVB_MB86A16 is not set # CONFIG_DVB_MT312 is not set # CONFIG_DVB_S5H1420 is not set # CONFIG_DVB_SI21XX is not set # CONFIG_DVB_STB6000 is not set # CONFIG_DVB_STV0288 is not set # CONFIG_DVB_STV0299 is not set # CONFIG_DVB_STV0900 is not set # CONFIG_DVB_STV6110 is not set # CONFIG_DVB_TDA10071 is not set # CONFIG_DVB_TDA10086 is not set # CONFIG_DVB_TDA8083 is not set # CONFIG_DVB_TDA8261 is not set # CONFIG_DVB_TDA826X is not set # CONFIG_DVB_TS2020 is not set # CONFIG_DVB_TUA6100 is not set # CONFIG_DVB_TUNER_CX24113 is not set # CONFIG_DVB_TUNER_ITD1000 is not set # CONFIG_DVB_VES1X93 is not set # CONFIG_DVB_ZL10036 is not set # CONFIG_DVB_ZL10039 is not set # # DVB-T (terrestrial) frontends # CONFIG_DVB_AF9013=y CONFIG_DVB_AS102_FE=y # CONFIG_DVB_CX22700 is not set # CONFIG_DVB_CX22702 is not set # CONFIG_DVB_CXD2820R is not set # CONFIG_DVB_CXD2841ER is not set CONFIG_DVB_DIB3000MB=y CONFIG_DVB_DIB3000MC=y # CONFIG_DVB_DIB7000M is not set # CONFIG_DVB_DIB7000P is not set # CONFIG_DVB_DIB9000 is not set # CONFIG_DVB_DRXD is not set CONFIG_DVB_EC100=y CONFIG_DVB_GP8PSK_FE=y # CONFIG_DVB_L64781 is not set # CONFIG_DVB_MT352 is not set # CONFIG_DVB_NXT6000 is not set CONFIG_DVB_RTL2830=y CONFIG_DVB_RTL2832=y CONFIG_DVB_RTL2832_SDR=y # CONFIG_DVB_S5H1432 is not set # CONFIG_DVB_SI2168 is not set # CONFIG_DVB_SP887X is not set # CONFIG_DVB_STV0367 is not set # CONFIG_DVB_TDA10048 is not set # CONFIG_DVB_TDA1004X is not set # CONFIG_DVB_ZD1301_DEMOD is not set CONFIG_DVB_ZL10353=y # CONFIG_DVB_CXD2880 is not set # # DVB-C (cable) frontends # # CONFIG_DVB_STV0297 is not set # CONFIG_DVB_TDA10021 is not set # CONFIG_DVB_TDA10023 is not set # CONFIG_DVB_VES1820 is not set # # ATSC (North American/Korean Terrestrial/Cable DTV) frontends # # CONFIG_DVB_AU8522_DTV is not set # CONFIG_DVB_AU8522_V4L is not set # CONFIG_DVB_BCM3510 is not set # CONFIG_DVB_LG2160 is not set # CONFIG_DVB_LGDT3305 is not set # CONFIG_DVB_LGDT3306A is not set # CONFIG_DVB_LGDT330X is not set # CONFIG_DVB_MXL692 is not set # CONFIG_DVB_NXT200X is not set # CONFIG_DVB_OR51132 is not set # CONFIG_DVB_OR51211 is not set # CONFIG_DVB_S5H1409 is not set # CONFIG_DVB_S5H1411 is not set # # ISDB-T (terrestrial) frontends # # CONFIG_DVB_DIB8000 is not set # CONFIG_DVB_MB86A20S is not set # CONFIG_DVB_S921 is not set # # ISDB-S (satellite) & ISDB-T (terrestrial) frontends # # CONFIG_DVB_MN88443X is not set # CONFIG_DVB_TC90522 is not set # # Digital terrestrial only tuners/PLL # # CONFIG_DVB_PLL is not set # CONFIG_DVB_TUNER_DIB0070 is not set # CONFIG_DVB_TUNER_DIB0090 is not set # # SEC control devices for DVB-S # # CONFIG_DVB_A8293 is not set CONFIG_DVB_AF9033=y # CONFIG_DVB_ASCOT2E is not set # CONFIG_DVB_ATBM8830 is not set # CONFIG_DVB_HELENE is not set # CONFIG_DVB_HORUS3A is not set # CONFIG_DVB_ISL6405 is not set # CONFIG_DVB_ISL6421 is not set # CONFIG_DVB_ISL6423 is not set # CONFIG_DVB_IX2505V is not set # CONFIG_DVB_LGS8GL5 is not set # CONFIG_DVB_LGS8GXX is not set # CONFIG_DVB_LNBH25 is not set # CONFIG_DVB_LNBH29 is not set # CONFIG_DVB_LNBP21 is not set # CONFIG_DVB_LNBP22 is not set # CONFIG_DVB_M88RS2000 is not set # CONFIG_DVB_TDA665x is not set # CONFIG_DVB_DRX39XYJ is not set # # Common Interface (EN50221) controller drivers # # CONFIG_DVB_CXD2099 is not set # CONFIG_DVB_SP2 is not set # end of Customise DVB Frontends # # Tools to develop new frontends # # CONFIG_DVB_DUMMY_FE is not set # end of Media ancillary drivers # # Graphics support # CONFIG_APERTURE_HELPERS=y CONFIG_SCREEN_INFO=y CONFIG_VIDEO=y # CONFIG_AUXDISPLAY is not set # CONFIG_PANEL is not set CONFIG_AGP=y CONFIG_AGP_AMD64=y CONFIG_AGP_INTEL=y # CONFIG_AGP_SIS is not set # CONFIG_AGP_VIA is not set CONFIG_INTEL_GTT=y # CONFIG_VGA_SWITCHEROO is not set CONFIG_DRM=y # # DRM debugging options # # CONFIG_DRM_WERROR is not set CONFIG_DRM_DEBUG_MM=y # end of DRM debugging options CONFIG_DRM_KMS_HELPER=y # CONFIG_DRM_PANIC is not set # CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set # CONFIG_DRM_DEBUG_MODESET_LOCK is not set CONFIG_DRM_CLIENT=y CONFIG_DRM_CLIENT_LIB=y CONFIG_DRM_CLIENT_SELECTION=y CONFIG_DRM_CLIENT_SETUP=y # # Supported DRM clients # CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100 # CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set # CONFIG_DRM_CLIENT_LOG is not set CONFIG_DRM_CLIENT_DEFAULT_FBDEV=y CONFIG_DRM_CLIENT_DEFAULT="fbdev" # end of Supported DRM clients # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set CONFIG_DRM_DISPLAY_DP_AUX_BUS=y CONFIG_DRM_DISPLAY_HELPER=y # CONFIG_DRM_DISPLAY_DP_AUX_CEC is not set # CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV is not set CONFIG_DRM_DISPLAY_DP_HELPER=y CONFIG_DRM_TTM=y CONFIG_DRM_TTM_HELPER=y CONFIG_DRM_GEM_SHMEM_HELPER=y # # Drivers for system framebuffers # CONFIG_DRM_SYSFB_HELPER=y CONFIG_DRM_SIMPLEDRM=y # CONFIG_DRM_VESADRM is not set # end of Drivers for system framebuffers # # ARM devices # # CONFIG_DRM_KOMEDA is not set # end of ARM devices # CONFIG_DRM_RADEON is not set # CONFIG_DRM_AMDGPU is not set # CONFIG_DRM_NOUVEAU is not set # CONFIG_DRM_XE is not set CONFIG_DRM_VGEM=y CONFIG_DRM_VKMS=y CONFIG_DRM_VMWGFX=y # CONFIG_DRM_VMWGFX_MKSSTATS is not set # CONFIG_DRM_GMA500 is not set CONFIG_DRM_UDL=y # CONFIG_DRM_AST is not set # CONFIG_DRM_MGAG200 is not set # CONFIG_DRM_QXL is not set CONFIG_DRM_VIRTIO_GPU=y CONFIG_DRM_VIRTIO_GPU_KMS=y CONFIG_DRM_PANEL=y # # Display Panels # # CONFIG_DRM_PANEL_ABT_Y030XX067A is not set # CONFIG_DRM_PANEL_ARM_VERSATILE is not set # CONFIG_DRM_PANEL_AUO_A030JTN01 is not set # CONFIG_DRM_PANEL_LVDS is not set # CONFIG_DRM_PANEL_ILITEK_IL9322 is not set # CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set # CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set # CONFIG_DRM_PANEL_LG_LB035Q02 is not set # CONFIG_DRM_PANEL_LG_LG4573 is not set # CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set # CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set # CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set # CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set # CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set # CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set # CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set # CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set # CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set CONFIG_DRM_PANEL_EDP=y # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set # end of Display Panels CONFIG_DRM_BRIDGE=y CONFIG_DRM_PANEL_BRIDGE=y CONFIG_DRM_AUX_BRIDGE=y # # Display Interface Bridges # # CONFIG_DRM_CHIPONE_ICN6211 is not set # CONFIG_DRM_CHRONTEL_CH7033 is not set # CONFIG_DRM_DISPLAY_CONNECTOR is not set # CONFIG_DRM_I2C_NXP_TDA998X is not set # CONFIG_DRM_ITE_IT6263 is not set # CONFIG_DRM_ITE_IT6505 is not set # CONFIG_DRM_LONTIUM_LT8912B is not set # CONFIG_DRM_LONTIUM_LT9211 is not set # CONFIG_DRM_LONTIUM_LT9611 is not set # CONFIG_DRM_LONTIUM_LT9611UXC is not set # CONFIG_DRM_ITE_IT66121 is not set # CONFIG_DRM_LVDS_CODEC is not set # CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set # CONFIG_DRM_NWL_MIPI_DSI is not set # CONFIG_DRM_NXP_PTN3460 is not set # CONFIG_DRM_PARADE_PS8622 is not set # CONFIG_DRM_PARADE_PS8640 is not set # CONFIG_DRM_SAMSUNG_DSIM is not set # CONFIG_DRM_SIL_SII8620 is not set # CONFIG_DRM_SII902X is not set # CONFIG_DRM_SII9234 is not set # CONFIG_DRM_SIMPLE_BRIDGE is not set # CONFIG_DRM_SOLOMON_SSD2825 is not set # CONFIG_DRM_THINE_THC63LVD1024 is not set # CONFIG_DRM_TOSHIBA_TC358762 is not set # CONFIG_DRM_TOSHIBA_TC358764 is not set # CONFIG_DRM_TOSHIBA_TC358767 is not set # CONFIG_DRM_TOSHIBA_TC358768 is not set # CONFIG_DRM_TOSHIBA_TC358775 is not set # CONFIG_DRM_TI_DLPC3433 is not set # CONFIG_DRM_TI_TDP158 is not set # CONFIG_DRM_TI_TFP410 is not set # CONFIG_DRM_TI_SN65DSI83 is not set # CONFIG_DRM_TI_SN65DSI86 is not set # CONFIG_DRM_TI_TPD12S015 is not set # CONFIG_DRM_WAVESHARE_BRIDGE is not set # CONFIG_DRM_ANALOGIX_ANX6345 is not set # CONFIG_DRM_ANALOGIX_ANX78XX is not set # CONFIG_DRM_ANALOGIX_ANX7625 is not set # CONFIG_DRM_I2C_ADV7511 is not set # CONFIG_DRM_CDNS_DSI is not set # CONFIG_DRM_CDNS_MHDP8546 is not set # end of Display Interface Bridges # CONFIG_DRM_ETNAVIV is not set # CONFIG_DRM_HISI_HIBMC is not set # CONFIG_DRM_LOGICVC is not set # CONFIG_DRM_APPLETBDRM is not set # CONFIG_DRM_ARCPGU is not set CONFIG_DRM_BOCHS=y CONFIG_DRM_CIRRUS_QEMU=y CONFIG_DRM_GM12U320=y # CONFIG_DRM_PANEL_MIPI_DBI is not set # CONFIG_DRM_PIXPAPER is not set # CONFIG_TINYDRM_HX8357D is not set # CONFIG_TINYDRM_ILI9163 is not set # CONFIG_TINYDRM_ILI9225 is not set # CONFIG_TINYDRM_ILI9341 is not set # CONFIG_TINYDRM_ILI9486 is not set # CONFIG_TINYDRM_MI0283QT is not set # CONFIG_TINYDRM_REPAPER is not set # CONFIG_TINYDRM_SHARP_MEMORY is not set # CONFIG_DRM_VBOXVIDEO is not set CONFIG_DRM_GUD=y # CONFIG_DRM_ST7571_I2C is not set # CONFIG_DRM_ST7586 is not set # CONFIG_DRM_ST7735R is not set # CONFIG_DRM_SSD130X is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y # # Frame buffer Devices # CONFIG_FB=y # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_ARC is not set # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=y # CONFIG_FB_UVESA is not set CONFIG_FB_VESA=y # CONFIG_FB_N411 is not set # CONFIG_FB_HGA is not set # CONFIG_FB_OPENCORES is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_NVIDIA is not set # CONFIG_FB_RIVA is not set # CONFIG_FB_I740 is not set # CONFIG_FB_MATROX is not set # CONFIG_FB_RADEON is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set # CONFIG_FB_S3 is not set # CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_VIA is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set # CONFIG_FB_3DFX is not set # CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VT8623 is not set # CONFIG_FB_TRIDENT is not set # CONFIG_FB_ARK is not set # CONFIG_FB_PM3 is not set # CONFIG_FB_CARMINE is not set # CONFIG_FB_SMSCUFX is not set # CONFIG_FB_UDL is not set # CONFIG_FB_IBM_GXT4500 is not set CONFIG_FB_VIRTUAL=y # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set # CONFIG_FB_SSD1307 is not set # CONFIG_FB_SM712 is not set CONFIG_FB_CORE=y CONFIG_FB_NOTIFY=y CONFIG_FB_DEVICE=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SYS_FILLRECT=y CONFIG_FB_SYS_COPYAREA=y CONFIG_FB_SYS_IMAGEBLIT=y # CONFIG_FB_FOREIGN_ENDIAN is not set CONFIG_FB_SYSMEM_FOPS=y CONFIG_FB_DEFERRED_IO=y CONFIG_FB_IOMEM_FOPS=y CONFIG_FB_IOMEM_HELPERS=y CONFIG_FB_SYSMEM_HELPERS=y CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y CONFIG_FB_TILEBLITTING=y # end of Frame buffer Devices # # Backlight & LCD device support # CONFIG_LCD_CLASS_DEVICE=y # CONFIG_LCD_L4F00242T03 is not set # CONFIG_LCD_LMS283GF05 is not set # CONFIG_LCD_LTV350QV is not set # CONFIG_LCD_ILI922X is not set # CONFIG_LCD_ILI9320 is not set # CONFIG_LCD_TDO24M is not set # CONFIG_LCD_VGG2432A4 is not set # CONFIG_LCD_PLATFORM is not set # CONFIG_LCD_AMS369FG06 is not set # CONFIG_LCD_LMS501KF03 is not set # CONFIG_LCD_HX8357 is not set # CONFIG_LCD_OTM3225A is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_AW99706 is not set # CONFIG_BACKLIGHT_KTD253 is not set # CONFIG_BACKLIGHT_KTD2801 is not set # CONFIG_BACKLIGHT_KTZ8866 is not set # CONFIG_BACKLIGHT_MT6370 is not set # CONFIG_BACKLIGHT_APPLE is not set # CONFIG_BACKLIGHT_QCOM_WLED is not set # CONFIG_BACKLIGHT_SAHARA is not set # CONFIG_BACKLIGHT_ADP8860 is not set # CONFIG_BACKLIGHT_ADP8870 is not set # CONFIG_BACKLIGHT_LM3509 is not set # CONFIG_BACKLIGHT_LM3639 is not set # CONFIG_BACKLIGHT_PANDORA is not set # CONFIG_BACKLIGHT_GPIO is not set # CONFIG_BACKLIGHT_LV5207LP is not set # CONFIG_BACKLIGHT_BD6107 is not set # CONFIG_BACKLIGHT_ARCXCNN is not set # CONFIG_BACKLIGHT_LED is not set # end of Backlight & LCD device support CONFIG_VGASTATE=y CONFIG_VIDEOMODE_HELPERS=y CONFIG_HDMI=y # CONFIG_FIRMWARE_EDID is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set # end of Console display driver support CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y # CONFIG_LOGO_LINUX_CLUT224 is not set # CONFIG_TRACE_GPU_MEM is not set # end of Graphics support # CONFIG_DRM_ACCEL is not set CONFIG_SOUND=y CONFIG_SOUND_OSS_CORE=y CONFIG_SOUND_OSS_CORE_PRECLAIM=y CONFIG_SND=y CONFIG_SND_TIMER=y CONFIG_SND_PCM=y CONFIG_SND_HWDEP=y CONFIG_SND_SEQ_DEVICE=y CONFIG_SND_RAWMIDI=y CONFIG_SND_UMP=y CONFIG_SND_UMP_LEGACY_RAWMIDI=y CONFIG_SND_JACK=y CONFIG_SND_JACK_INPUT_DEV=y CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=y CONFIG_SND_PCM_OSS=y CONFIG_SND_PCM_OSS_PLUGINS=y CONFIG_SND_PCM_TIMER=y CONFIG_SND_HRTIMER=y # CONFIG_SND_DYNAMIC_MINORS is not set CONFIG_SND_SUPPORT_OLD_API=y CONFIG_SND_PROC_FS=y CONFIG_SND_VERBOSE_PROCFS=y CONFIG_SND_CTL_FAST_LOOKUP=y CONFIG_SND_DEBUG=y # CONFIG_SND_DEBUG_VERBOSE is not set CONFIG_SND_PCM_XRUN_DEBUG=y # CONFIG_SND_CTL_INPUT_VALIDATION is not set # CONFIG_SND_CTL_DEBUG is not set # CONFIG_SND_JACK_INJECTION_DEBUG is not set # CONFIG_SND_UTIMER is not set CONFIG_SND_VMASTER=y CONFIG_SND_DMA_SGBUF=y CONFIG_SND_CTL_LED=y CONFIG_SND_SEQUENCER=y CONFIG_SND_SEQ_DUMMY=y CONFIG_SND_SEQUENCER_OSS=y CONFIG_SND_SEQ_HRTIMER_DEFAULT=y CONFIG_SND_SEQ_MIDI_EVENT=y CONFIG_SND_SEQ_MIDI=y CONFIG_SND_SEQ_VIRMIDI=y # CONFIG_SND_SEQ_UMP is not set CONFIG_SND_DRIVERS=y # CONFIG_SND_PCSP is not set CONFIG_SND_DUMMY=y CONFIG_SND_ALOOP=y # CONFIG_SND_PCMTEST is not set CONFIG_SND_VIRMIDI=y # CONFIG_SND_MTPAV is not set # CONFIG_SND_MTS64 is not set # CONFIG_SND_SERIAL_U16550 is not set # CONFIG_SND_SERIAL_GENERIC is not set # CONFIG_SND_MPU401 is not set # CONFIG_SND_PORTMAN2X4 is not set CONFIG_SND_PCI=y # CONFIG_SND_AD1889 is not set # CONFIG_SND_ALS300 is not set # CONFIG_SND_ALS4000 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ASIHPI is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set # CONFIG_SND_AW2 is not set # CONFIG_SND_AZT3328 is not set # CONFIG_SND_BT87X is not set # CONFIG_SND_CA0106 is not set # CONFIG_SND_CMIPCI is not set # CONFIG_SND_OXYGEN is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set # CONFIG_SND_CTXFI is not set # CONFIG_SND_DARLA20 is not set # CONFIG_SND_GINA20 is not set # CONFIG_SND_LAYLA20 is not set # CONFIG_SND_DARLA24 is not set # CONFIG_SND_GINA24 is not set # CONFIG_SND_LAYLA24 is not set # CONFIG_SND_MONA is not set # CONFIG_SND_MIA is not set # CONFIG_SND_ECHO3G is not set # CONFIG_SND_INDIGO is not set # CONFIG_SND_INDIGOIO is not set # CONFIG_SND_INDIGODJ is not set # CONFIG_SND_INDIGOIOX is not set # CONFIG_SND_INDIGODJX is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set # CONFIG_SND_ENS1371 is not set # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set # CONFIG_SND_FM801 is not set # CONFIG_SND_HDSP is not set # CONFIG_SND_HDSPM is not set # CONFIG_SND_ICE1712 is not set # CONFIG_SND_ICE1724 is not set # CONFIG_SND_INTEL8X0 is not set # CONFIG_SND_INTEL8X0M is not set # CONFIG_SND_KORG1212 is not set # CONFIG_SND_LOLA is not set # CONFIG_SND_LX6464ES is not set # CONFIG_SND_MAESTRO3 is not set # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_PCXHR is not set # CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set # CONFIG_SND_SE6X is not set # CONFIG_SND_SONICVIBES is not set # CONFIG_SND_TRIDENT is not set # CONFIG_SND_VIA82XX is not set # CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VIRTUOSO is not set # CONFIG_SND_VX222 is not set # CONFIG_SND_YMFPCI is not set # # HD-Audio # CONFIG_SND_HDA=y CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_RECONFIG=y CONFIG_SND_HDA_INPUT_BEEP=y CONFIG_SND_HDA_INPUT_BEEP_MODE=1 CONFIG_SND_HDA_PATCH_LOADER=y CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 # CONFIG_SND_HDA_CTL_DEV_ID is not set CONFIG_SND_HDA_PREALLOC_SIZE=0 CONFIG_SND_HDA_INTEL=y # CONFIG_SND_HDA_ACPI is not set CONFIG_SND_HDA_GENERIC_LEDS=y CONFIG_SND_HDA_CODEC_ANALOG=y CONFIG_SND_HDA_CODEC_SIGMATEL=y CONFIG_SND_HDA_CODEC_VIA=y CONFIG_SND_HDA_CODEC_CONEXANT=y # CONFIG_SND_HDA_CODEC_SENARYTECH is not set CONFIG_SND_HDA_CODEC_CA0110=y CONFIG_SND_HDA_CODEC_CA0132=y # CONFIG_SND_HDA_CODEC_CA0132_DSP is not set CONFIG_SND_HDA_CODEC_CMEDIA=y # CONFIG_SND_HDA_CODEC_CM9825 is not set CONFIG_SND_HDA_CODEC_SI3054=y CONFIG_SND_HDA_GENERIC=y CONFIG_SND_HDA_CODEC_REALTEK=y # CONFIG_SND_HDA_CODEC_ALC260 is not set # CONFIG_SND_HDA_CODEC_ALC262 is not set # CONFIG_SND_HDA_CODEC_ALC268 is not set # CONFIG_SND_HDA_CODEC_ALC269 is not set # CONFIG_SND_HDA_CODEC_ALC662 is not set # CONFIG_SND_HDA_CODEC_ALC680 is not set # CONFIG_SND_HDA_CODEC_ALC861 is not set # CONFIG_SND_HDA_CODEC_ALC861VD is not set # CONFIG_SND_HDA_CODEC_ALC880 is not set # CONFIG_SND_HDA_CODEC_ALC882 is not set CONFIG_SND_HDA_CODEC_CIRRUS=y # CONFIG_SND_HDA_CODEC_CS420X is not set # CONFIG_SND_HDA_CODEC_CS421X is not set # CONFIG_SND_HDA_CODEC_CS8409 is not set CONFIG_SND_HDA_CODEC_HDMI=y # CONFIG_SND_HDA_CODEC_HDMI_GENERIC is not set # CONFIG_SND_HDA_CODEC_HDMI_SIMPLE is not set # CONFIG_SND_HDA_CODEC_HDMI_INTEL is not set # CONFIG_SND_HDA_CODEC_HDMI_ATI is not set # CONFIG_SND_HDA_CODEC_HDMI_NVIDIA is not set # CONFIG_SND_HDA_CODEC_HDMI_NVIDIA_MCP is not set # CONFIG_SND_HDA_CODEC_HDMI_TEGRA is not set # CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set # CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set CONFIG_SND_HDA_CORE=y CONFIG_SND_INTEL_NHLT=y CONFIG_SND_INTEL_DSP_CONFIG=y CONFIG_SND_INTEL_SOUNDWIRE_ACPI=y # end of HD-Audio # CONFIG_SND_SPI is not set CONFIG_SND_USB=y CONFIG_SND_USB_AUDIO=y CONFIG_SND_USB_AUDIO_MIDI_V2=y CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y CONFIG_SND_USB_UA101=y CONFIG_SND_USB_USX2Y=y CONFIG_SND_USB_CAIAQ=y CONFIG_SND_USB_CAIAQ_INPUT=y CONFIG_SND_USB_US122L=y # CONFIG_SND_USB_US144MKII is not set CONFIG_SND_USB_6FIRE=y CONFIG_SND_USB_HIFACE=y CONFIG_SND_BCD2000=y CONFIG_SND_USB_LINE6=y CONFIG_SND_USB_POD=y CONFIG_SND_USB_PODHD=y CONFIG_SND_USB_TONEPORT=y CONFIG_SND_USB_VARIAX=y # CONFIG_SND_FIREWIRE is not set CONFIG_SND_PCMCIA=y # CONFIG_SND_VXPOCKET is not set # CONFIG_SND_PDAUDIOCF is not set CONFIG_SND_SOC=y # CONFIG_SND_SOC_USB is not set # # Analog Devices # # CONFIG_SND_SOC_ADI_AXI_I2S is not set # CONFIG_SND_SOC_ADI_AXI_SPDIF is not set # end of Analog Devices # # AMD # # CONFIG_SND_SOC_AMD_ACP is not set # CONFIG_SND_SOC_AMD_ACP3x is not set # CONFIG_SND_SOC_AMD_RENOIR is not set # CONFIG_SND_SOC_AMD_ACP5x is not set # CONFIG_SND_SOC_AMD_ACP6x is not set # CONFIG_SND_AMD_ACP_CONFIG is not set # CONFIG_SND_SOC_AMD_ACP_COMMON is not set # CONFIG_SND_SOC_AMD_RPL_ACP6x is not set # end of AMD # # Apple # # end of Apple # # Atmel # # CONFIG_SND_SOC_MIKROE_PROTO is not set # end of Atmel # # Au1x # # end of Au1x # # Broadcom # # CONFIG_SND_BCM63XX_I2S_WHISTLER is not set # end of Broadcom # # Cirrus Logic # # end of Cirrus Logic # # DesignWare # # CONFIG_SND_DESIGNWARE_I2S is not set # end of DesignWare # # Freescale # # # Common SoC Audio options for Freescale CPUs: # # CONFIG_SND_SOC_FSL_ASRC is not set # CONFIG_SND_SOC_FSL_SAI is not set # CONFIG_SND_SOC_FSL_AUDMIX is not set # CONFIG_SND_SOC_FSL_SSI is not set # CONFIG_SND_SOC_FSL_SPDIF is not set # CONFIG_SND_SOC_FSL_ESAI is not set # CONFIG_SND_SOC_FSL_MICFIL is not set # CONFIG_SND_SOC_FSL_XCVR is not set # CONFIG_SND_SOC_IMX_AUDMUX is not set # end of Freescale # # Google # # CONFIG_SND_SOC_CHV3_I2S is not set # end of Google # # Hisilicon # # CONFIG_SND_I2S_HI6210_I2S is not set # end of Hisilicon # # JZ4740 # # end of JZ4740 # # Kirkwood # # end of Kirkwood # # Loongson # # end of Loongson # # Intel # # CONFIG_SND_SOC_INTEL_SST_TOPLEVEL is not set # CONFIG_SND_SOC_INTEL_AVS is not set # end of Intel # # Mediatek # # CONFIG_SND_SOC_MTK_BTCVSD is not set # end of Mediatek # # PXA # # end of PXA # # SoundWire (SDCA) # CONFIG_SND_SOC_SDCA_OPTIONAL=y # end of SoundWire (SDCA) # # ST SPEAr # # end of ST SPEAr # # Spreadtrum # # end of Spreadtrum # # STMicroelectronics STM32 # # end of STMicroelectronics STM32 # # Tegra # # end of Tegra # # Xilinx # # CONFIG_SND_SOC_XILINX_I2S is not set # CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set # CONFIG_SND_SOC_XILINX_SPDIF is not set # end of Xilinx # # Xtensa # # CONFIG_SND_SOC_XTFPGA_I2S is not set # end of Xtensa # CONFIG_SND_SOC_SOF_TOPLEVEL is not set CONFIG_SND_SOC_I2C_AND_SPI=y # # CODEC drivers # # CONFIG_SND_SOC_AC97_CODEC is not set # CONFIG_SND_SOC_ADAU1372_I2C is not set # CONFIG_SND_SOC_ADAU1372_SPI is not set # CONFIG_SND_SOC_ADAU1373 is not set # CONFIG_SND_SOC_ADAU1701 is not set # CONFIG_SND_SOC_ADAU1761_I2C is not set # CONFIG_SND_SOC_ADAU1761_SPI is not set # CONFIG_SND_SOC_ADAU7002 is not set # CONFIG_SND_SOC_ADAU7118_HW is not set # CONFIG_SND_SOC_ADAU7118_I2C is not set # CONFIG_SND_SOC_AK4104 is not set # CONFIG_SND_SOC_AK4118 is not set # CONFIG_SND_SOC_AK4375 is not set # CONFIG_SND_SOC_AK4458 is not set # CONFIG_SND_SOC_AK4554 is not set # CONFIG_SND_SOC_AK4613 is not set # CONFIG_SND_SOC_AK4619 is not set # CONFIG_SND_SOC_AK4642 is not set # CONFIG_SND_SOC_AK5386 is not set # CONFIG_SND_SOC_AK5558 is not set # CONFIG_SND_SOC_ALC5623 is not set # CONFIG_SND_SOC_AUDIO_IIO_AUX is not set # CONFIG_SND_SOC_AW8738 is not set # CONFIG_SND_SOC_AW88395 is not set # CONFIG_SND_SOC_AW88166 is not set # CONFIG_SND_SOC_AW88261 is not set # CONFIG_SND_SOC_AW88081 is not set # CONFIG_SND_SOC_AW87390 is not set # CONFIG_SND_SOC_AW88399 is not set # CONFIG_SND_SOC_BD28623 is not set # CONFIG_SND_SOC_BT_SCO is not set # CONFIG_SND_SOC_CHV3_CODEC is not set # CONFIG_SND_SOC_CS35L32 is not set # CONFIG_SND_SOC_CS35L33 is not set # CONFIG_SND_SOC_CS35L34 is not set # CONFIG_SND_SOC_CS35L35 is not set # CONFIG_SND_SOC_CS35L36 is not set # CONFIG_SND_SOC_CS35L41_SPI is not set # CONFIG_SND_SOC_CS35L41_I2C is not set # CONFIG_SND_SOC_CS35L45_SPI is not set # CONFIG_SND_SOC_CS35L45_I2C is not set # CONFIG_SND_SOC_CS35L56_I2C is not set # CONFIG_SND_SOC_CS35L56_SPI is not set # CONFIG_SND_SOC_CS35L56_SDW is not set # CONFIG_SND_SOC_CS42L42 is not set # CONFIG_SND_SOC_CS42L42_SDW is not set # CONFIG_SND_SOC_CS42L51_I2C is not set # CONFIG_SND_SOC_CS42L52 is not set # CONFIG_SND_SOC_CS42L56 is not set # CONFIG_SND_SOC_CS42L73 is not set # CONFIG_SND_SOC_CS42L83 is not set # CONFIG_SND_SOC_CS42L84 is not set # CONFIG_SND_SOC_CS4234 is not set # CONFIG_SND_SOC_CS4265 is not set # CONFIG_SND_SOC_CS4270 is not set # CONFIG_SND_SOC_CS4271_I2C is not set # CONFIG_SND_SOC_CS4271_SPI is not set # CONFIG_SND_SOC_CS42XX8_I2C is not set # CONFIG_SND_SOC_CS43130 is not set # CONFIG_SND_SOC_CS4341 is not set # CONFIG_SND_SOC_CS4349 is not set # CONFIG_SND_SOC_CS48L32 is not set # CONFIG_SND_SOC_CS53L30 is not set # CONFIG_SND_SOC_CS530X_I2C is not set # CONFIG_SND_SOC_CS530X_SPI is not set # CONFIG_SND_SOC_CX2072X is not set # CONFIG_SND_SOC_DA7213 is not set # CONFIG_SND_SOC_DMIC is not set # CONFIG_SND_SOC_ES7134 is not set # CONFIG_SND_SOC_ES7241 is not set # CONFIG_SND_SOC_ES8311 is not set # CONFIG_SND_SOC_ES8316 is not set # CONFIG_SND_SOC_ES8323 is not set # CONFIG_SND_SOC_ES8326 is not set # CONFIG_SND_SOC_ES8328_I2C is not set # CONFIG_SND_SOC_ES8328_SPI is not set # CONFIG_SND_SOC_ES8375 is not set # CONFIG_SND_SOC_ES8389 is not set # CONFIG_SND_SOC_FS210X is not set # CONFIG_SND_SOC_GTM601 is not set # CONFIG_SND_SOC_HDA is not set # CONFIG_SND_SOC_ICS43432 is not set # CONFIG_SND_SOC_IDT821034 is not set # CONFIG_SND_SOC_MAX98088 is not set # CONFIG_SND_SOC_MAX98090 is not set # CONFIG_SND_SOC_MAX98357A is not set # CONFIG_SND_SOC_MAX98504 is not set # CONFIG_SND_SOC_MAX9867 is not set # CONFIG_SND_SOC_MAX98927 is not set # CONFIG_SND_SOC_MAX98520 is not set # CONFIG_SND_SOC_MAX98363 is not set # CONFIG_SND_SOC_MAX98373_I2C is not set # CONFIG_SND_SOC_MAX98373_SDW is not set # CONFIG_SND_SOC_MAX98388 is not set # CONFIG_SND_SOC_MAX98390 is not set # CONFIG_SND_SOC_MAX98396 is not set # CONFIG_SND_SOC_MAX9860 is not set # CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set # CONFIG_SND_SOC_PCM1681 is not set # CONFIG_SND_SOC_PCM1754 is not set # CONFIG_SND_SOC_PCM1789_I2C is not set # CONFIG_SND_SOC_PCM179X_I2C is not set # CONFIG_SND_SOC_PCM179X_SPI is not set # CONFIG_SND_SOC_PCM186X_I2C is not set # CONFIG_SND_SOC_PCM186X_SPI is not set # CONFIG_SND_SOC_PCM3060_I2C is not set # CONFIG_SND_SOC_PCM3060_SPI is not set # CONFIG_SND_SOC_PCM3168A_I2C is not set # CONFIG_SND_SOC_PCM3168A_SPI is not set # CONFIG_SND_SOC_PCM5102A is not set # CONFIG_SND_SOC_PCM512x_I2C is not set # CONFIG_SND_SOC_PCM512x_SPI is not set # CONFIG_SND_SOC_PCM6240 is not set # CONFIG_SND_SOC_PEB2466 is not set # CONFIG_SND_SOC_PM4125_SDW is not set # CONFIG_SND_SOC_RT1017_SDCA_SDW is not set # CONFIG_SND_SOC_RT1308_SDW is not set # CONFIG_SND_SOC_RT1316_SDW is not set # CONFIG_SND_SOC_RT1318_SDW is not set # CONFIG_SND_SOC_RT1320_SDW is not set # CONFIG_SND_SOC_RT5616 is not set # CONFIG_SND_SOC_RT5631 is not set # CONFIG_SND_SOC_RT5640 is not set # CONFIG_SND_SOC_RT5659 is not set # CONFIG_SND_SOC_RT5682_SDW is not set # CONFIG_SND_SOC_RT700_SDW is not set # CONFIG_SND_SOC_RT711_SDW is not set # CONFIG_SND_SOC_RT711_SDCA_SDW is not set # CONFIG_SND_SOC_RT712_SDCA_SDW is not set # CONFIG_SND_SOC_RT712_SDCA_DMIC_SDW is not set # CONFIG_SND_SOC_RT721_SDCA_SDW is not set # CONFIG_SND_SOC_RT722_SDCA_SDW is not set # CONFIG_SND_SOC_RT715_SDW is not set # CONFIG_SND_SOC_RT715_SDCA_SDW is not set # CONFIG_SND_SOC_RT9120 is not set # CONFIG_SND_SOC_RT9123 is not set # CONFIG_SND_SOC_RT9123P is not set # CONFIG_SND_SOC_RTQ9124 is not set # CONFIG_SND_SOC_RTQ9128 is not set # CONFIG_SND_SOC_SDW_MOCKUP is not set # CONFIG_SND_SOC_SGTL5000 is not set # CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set # CONFIG_SND_SOC_SIMPLE_MUX is not set # CONFIG_SND_SOC_SMA1303 is not set # CONFIG_SND_SOC_SMA1307 is not set # CONFIG_SND_SOC_SPDIF is not set # CONFIG_SND_SOC_SRC4XXX_I2C is not set # CONFIG_SND_SOC_SSM2305 is not set # CONFIG_SND_SOC_SSM2518 is not set # CONFIG_SND_SOC_SSM2602_SPI is not set # CONFIG_SND_SOC_SSM2602_I2C is not set # CONFIG_SND_SOC_SSM3515 is not set # CONFIG_SND_SOC_SSM4567 is not set # CONFIG_SND_SOC_STA32X is not set # CONFIG_SND_SOC_STA350 is not set # CONFIG_SND_SOC_STI_SAS is not set # CONFIG_SND_SOC_TAS2552 is not set # CONFIG_SND_SOC_TAS2562 is not set # CONFIG_SND_SOC_TAS2764 is not set # CONFIG_SND_SOC_TAS2770 is not set # CONFIG_SND_SOC_TAS2780 is not set # CONFIG_SND_SOC_TAS2781_I2C is not set # CONFIG_SND_SOC_TAS5086 is not set # CONFIG_SND_SOC_TAS571X is not set # CONFIG_SND_SOC_TAS5720 is not set # CONFIG_SND_SOC_TAS5805M is not set # CONFIG_SND_SOC_TAS6424 is not set # CONFIG_SND_SOC_TDA7419 is not set # CONFIG_SND_SOC_TFA9879 is not set # CONFIG_SND_SOC_TFA989X is not set # CONFIG_SND_SOC_TLV320ADC3XXX is not set # CONFIG_SND_SOC_TLV320AIC23_I2C is not set # CONFIG_SND_SOC_TLV320AIC23_SPI is not set # CONFIG_SND_SOC_TLV320AIC31XX is not set # CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set # CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set # CONFIG_SND_SOC_TLV320AIC3X_I2C is not set # CONFIG_SND_SOC_TLV320AIC3X_SPI is not set # CONFIG_SND_SOC_TLV320ADCX140 is not set # CONFIG_SND_SOC_TS3A227E is not set # CONFIG_SND_SOC_TSCS42XX is not set # CONFIG_SND_SOC_TSCS454 is not set # CONFIG_SND_SOC_UDA1334 is not set # CONFIG_SND_SOC_UDA1342 is not set # CONFIG_SND_SOC_WCD937X_SDW is not set # CONFIG_SND_SOC_WCD938X_SDW is not set # CONFIG_SND_SOC_WCD939X_SDW is not set # CONFIG_SND_SOC_WM8510 is not set # CONFIG_SND_SOC_WM8523 is not set # CONFIG_SND_SOC_WM8524 is not set # CONFIG_SND_SOC_WM8580 is not set # CONFIG_SND_SOC_WM8711 is not set # CONFIG_SND_SOC_WM8728 is not set # CONFIG_SND_SOC_WM8731_I2C is not set # CONFIG_SND_SOC_WM8731_SPI is not set # CONFIG_SND_SOC_WM8737 is not set # CONFIG_SND_SOC_WM8741 is not set # CONFIG_SND_SOC_WM8750 is not set # CONFIG_SND_SOC_WM8753 is not set # CONFIG_SND_SOC_WM8770 is not set # CONFIG_SND_SOC_WM8776 is not set # CONFIG_SND_SOC_WM8782 is not set # CONFIG_SND_SOC_WM8804_I2C is not set # CONFIG_SND_SOC_WM8804_SPI is not set # CONFIG_SND_SOC_WM8903 is not set # CONFIG_SND_SOC_WM8904 is not set # CONFIG_SND_SOC_WM8940 is not set # CONFIG_SND_SOC_WM8960 is not set # CONFIG_SND_SOC_WM8961 is not set # CONFIG_SND_SOC_WM8962 is not set # CONFIG_SND_SOC_WM8974 is not set # CONFIG_SND_SOC_WM8978 is not set # CONFIG_SND_SOC_WM8985 is not set # CONFIG_SND_SOC_WSA881X is not set # CONFIG_SND_SOC_WSA883X is not set # CONFIG_SND_SOC_WSA884X is not set # CONFIG_SND_SOC_ZL38060 is not set # CONFIG_SND_SOC_MAX9759 is not set # CONFIG_SND_SOC_MT6351 is not set # CONFIG_SND_SOC_MT6357 is not set # CONFIG_SND_SOC_MT6358 is not set # CONFIG_SND_SOC_MT6660 is not set # CONFIG_SND_SOC_NAU8315 is not set # CONFIG_SND_SOC_NAU8325 is not set # CONFIG_SND_SOC_NAU8540 is not set # CONFIG_SND_SOC_NAU8810 is not set # CONFIG_SND_SOC_NAU8821 is not set # CONFIG_SND_SOC_NAU8822 is not set # CONFIG_SND_SOC_NAU8824 is not set # CONFIG_SND_SOC_NTP8918 is not set # CONFIG_SND_SOC_NTP8835 is not set # CONFIG_SND_SOC_TPA6130A2 is not set # CONFIG_SND_SOC_LPASS_WSA_MACRO is not set # CONFIG_SND_SOC_LPASS_VA_MACRO is not set # CONFIG_SND_SOC_LPASS_RX_MACRO is not set # CONFIG_SND_SOC_LPASS_TX_MACRO is not set # end of CODEC drivers # # Generic drivers # # CONFIG_SND_SIMPLE_CARD is not set # CONFIG_SND_AUDIO_GRAPH_CARD is not set # CONFIG_SND_AUDIO_GRAPH_CARD2 is not set # CONFIG_SND_TEST_COMPONENT is not set # end of Generic drivers CONFIG_SND_X86=y CONFIG_SND_VIRTIO=y CONFIG_HID_SUPPORT=y CONFIG_HID=y CONFIG_HID_BATTERY_STRENGTH=y CONFIG_HIDRAW=y CONFIG_UHID=y CONFIG_HID_GENERIC=y CONFIG_HID_HAPTIC=y # # Special HID drivers # CONFIG_HID_A4TECH=y CONFIG_HID_ACCUTOUCH=y CONFIG_HID_ACRUX=y CONFIG_HID_ACRUX_FF=y CONFIG_HID_APPLE=y CONFIG_HID_APPLEIR=y # CONFIG_HID_APPLETB_BL is not set # CONFIG_HID_APPLETB_KBD is not set CONFIG_HID_ASUS=y CONFIG_HID_AUREAL=y CONFIG_HID_BELKIN=y CONFIG_HID_BETOP_FF=y CONFIG_HID_BIGBEN_FF=y CONFIG_HID_CHERRY=y CONFIG_HID_CHICONY=y CONFIG_HID_CORSAIR=y CONFIG_HID_COUGAR=y CONFIG_HID_MACALLY=y CONFIG_HID_PRODIKEYS=y CONFIG_HID_CMEDIA=y CONFIG_HID_CP2112=y CONFIG_HID_CREATIVE_SB0540=y CONFIG_HID_CYPRESS=y CONFIG_HID_DRAGONRISE=y CONFIG_DRAGONRISE_FF=y CONFIG_HID_EMS_FF=y CONFIG_HID_ELAN=y CONFIG_HID_ELECOM=y CONFIG_HID_ELO=y CONFIG_HID_EVISION=y CONFIG_HID_EZKEY=y CONFIG_HID_FT260=y CONFIG_HID_GEMBIRD=y CONFIG_HID_GFRM=y CONFIG_HID_GLORIOUS=y CONFIG_HID_HOLTEK=y CONFIG_HOLTEK_FF=y CONFIG_HID_VIVALDI_COMMON=y # CONFIG_HID_GOODIX_SPI is not set CONFIG_HID_GOOGLE_STADIA_FF=y CONFIG_HID_VIVALDI=y CONFIG_HID_GT683R=y CONFIG_HID_KEYTOUCH=y CONFIG_HID_KYE=y # CONFIG_HID_KYSONA is not set CONFIG_HID_UCLOGIC=y CONFIG_HID_WALTOP=y CONFIG_HID_VIEWSONIC=y CONFIG_HID_VRC2=y CONFIG_HID_XIAOMI=y CONFIG_HID_GYRATION=y CONFIG_HID_ICADE=y CONFIG_HID_ITE=y CONFIG_HID_JABRA=y CONFIG_HID_TWINHAN=y CONFIG_HID_KENSINGTON=y CONFIG_HID_LCPOWER=y CONFIG_HID_LED=y CONFIG_HID_LENOVO=y CONFIG_HID_LETSKETCH=y CONFIG_HID_LOGITECH=y CONFIG_HID_LOGITECH_DJ=y CONFIG_HID_LOGITECH_HIDPP=y CONFIG_LOGITECH_FF=y CONFIG_LOGIRUMBLEPAD2_FF=y CONFIG_LOGIG940_FF=y CONFIG_LOGIWHEELS_FF=y CONFIG_HID_MAGICMOUSE=y CONFIG_HID_MALTRON=y CONFIG_HID_MAYFLASH=y CONFIG_HID_MEGAWORLD_FF=y CONFIG_HID_REDRAGON=y CONFIG_HID_MICROSOFT=y CONFIG_HID_MONTEREY=y CONFIG_HID_MULTITOUCH=y CONFIG_HID_NINTENDO=y CONFIG_NINTENDO_FF=y CONFIG_HID_NTI=y CONFIG_HID_NTRIG=y CONFIG_HID_NVIDIA_SHIELD=y CONFIG_NVIDIA_SHIELD_FF=y CONFIG_HID_ORTEK=y CONFIG_HID_PANTHERLORD=y CONFIG_PANTHERLORD_FF=y CONFIG_HID_PENMOUNT=y CONFIG_HID_PETALYNX=y CONFIG_HID_PICOLCD=y CONFIG_HID_PICOLCD_FB=y CONFIG_HID_PICOLCD_BACKLIGHT=y CONFIG_HID_PICOLCD_LCD=y CONFIG_HID_PICOLCD_LEDS=y CONFIG_HID_PICOLCD_CIR=y CONFIG_HID_PLANTRONICS=y CONFIG_HID_PLAYSTATION=y CONFIG_PLAYSTATION_FF=y CONFIG_HID_PXRC=y CONFIG_HID_RAZER=y CONFIG_HID_PRIMAX=y CONFIG_HID_RETRODE=y CONFIG_HID_ROCCAT=y CONFIG_HID_SAITEK=y CONFIG_HID_SAMSUNG=y CONFIG_HID_SEMITEK=y CONFIG_HID_SIGMAMICRO=y CONFIG_HID_SONY=y CONFIG_SONY_FF=y CONFIG_HID_SPEEDLINK=y CONFIG_HID_STEAM=y CONFIG_STEAM_FF=y CONFIG_HID_STEELSERIES=y CONFIG_HID_SUNPLUS=y CONFIG_HID_RMI=y CONFIG_HID_GREENASIA=y CONFIG_GREENASIA_FF=y CONFIG_HID_SMARTJOYPLUS=y CONFIG_SMARTJOYPLUS_FF=y CONFIG_HID_TIVO=y CONFIG_HID_TOPSEED=y CONFIG_HID_TOPRE=y CONFIG_HID_THINGM=y CONFIG_HID_THRUSTMASTER=y CONFIG_THRUSTMASTER_FF=y CONFIG_HID_UDRAW_PS3=y CONFIG_HID_U2FZERO=y # CONFIG_HID_UNIVERSAL_PIDFF is not set CONFIG_HID_WACOM=y CONFIG_HID_WIIMOTE=y # CONFIG_HID_WINWING is not set CONFIG_HID_XINMO=y CONFIG_HID_ZEROPLUS=y CONFIG_ZEROPLUS_FF=y CONFIG_HID_ZYDACRON=y CONFIG_HID_SENSOR_HUB=y CONFIG_HID_SENSOR_CUSTOM_SENSOR=y CONFIG_HID_ALPS=y CONFIG_HID_MCP2200=y CONFIG_HID_MCP2221=y # end of Special HID drivers # # HID-BPF support # # end of HID-BPF support CONFIG_I2C_HID=y CONFIG_I2C_HID_ACPI=y CONFIG_I2C_HID_OF=y # CONFIG_I2C_HID_OF_ELAN is not set # CONFIG_I2C_HID_OF_GOODIX is not set CONFIG_I2C_HID_CORE=y # # Intel ISH HID support # CONFIG_INTEL_ISH_HID=y CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER=y # end of Intel ISH HID support # # AMD SFH HID Support # CONFIG_AMD_SFH_HID=y # end of AMD SFH HID Support # # Surface System Aggregator Module HID support # CONFIG_SURFACE_HID=y CONFIG_SURFACE_KBD=y # end of Surface System Aggregator Module HID support CONFIG_SURFACE_HID_CORE=y # # Intel THC HID Support # # CONFIG_INTEL_THC_HID is not set # end of Intel THC HID Support # # USB HID support # CONFIG_USB_HID=y CONFIG_HID_PID=y CONFIG_USB_HIDDEV=y # end of USB HID support CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y CONFIG_USB_LED_TRIG=y CONFIG_USB_ULPI_BUS=y CONFIG_USB_CONN_GPIO=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB=y CONFIG_USB_PCI=y CONFIG_USB_PCI_AMD=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # # Miscellaneous USB options # CONFIG_USB_DEFAULT_PERSIST=y CONFIG_USB_FEW_INIT_RETRIES=y CONFIG_USB_DYNAMIC_MINORS=y CONFIG_USB_OTG=y # CONFIG_USB_OTG_PRODUCTLIST is not set # CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set CONFIG_USB_OTG_FSM=y CONFIG_USB_LEDS_TRIGGER_USBPORT=y CONFIG_USB_AUTOSUSPEND_DELAY=2 CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1 CONFIG_USB_MON=y # # USB Host Controller Drivers # CONFIG_USB_C67X00_HCD=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DBGCAP=y CONFIG_USB_XHCI_PCI=y CONFIG_USB_XHCI_PCI_RENESAS=y CONFIG_USB_XHCI_PLATFORM=y # CONFIG_USB_XHCI_SIDEBAND is not set CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_EHCI_PCI=y CONFIG_USB_EHCI_FSL=y CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_OXU210HP_HCD=y CONFIG_USB_ISP116X_HCD=y CONFIG_USB_MAX3421_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PCI=y # CONFIG_USB_OHCI_HCD_SSB is not set CONFIG_USB_OHCI_HCD_PLATFORM=y CONFIG_USB_UHCI_HCD=y CONFIG_USB_SL811_HCD=y CONFIG_USB_SL811_HCD_ISO=y CONFIG_USB_SL811_CS=y CONFIG_USB_R8A66597_HCD=y CONFIG_USB_HCD_BCMA=y CONFIG_USB_HCD_SSB=y # CONFIG_USB_HCD_TEST_MODE is not set # # USB Device Class drivers # CONFIG_USB_ACM=y CONFIG_USB_PRINTER=y CONFIG_USB_WDM=y CONFIG_USB_TMC=y # # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; see USB_STORAGE Help for more info # CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set CONFIG_USB_STORAGE_REALTEK=y CONFIG_REALTEK_AUTOPM=y CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y CONFIG_USB_STORAGE_USBAT=y CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y CONFIG_USB_STORAGE_ALAUDA=y CONFIG_USB_STORAGE_ONETOUCH=y CONFIG_USB_STORAGE_KARMA=y CONFIG_USB_STORAGE_CYPRESS_ATACB=y CONFIG_USB_STORAGE_ENE_UB6250=y CONFIG_USB_UAS=y # # USB Imaging devices # CONFIG_USB_MDC800=y CONFIG_USB_MICROTEK=y CONFIG_USBIP_CORE=y CONFIG_USBIP_VHCI_HCD=y CONFIG_USBIP_VHCI_HC_PORTS=8 CONFIG_USBIP_VHCI_NR_HCS=16 CONFIG_USBIP_HOST=y CONFIG_USBIP_VUDC=y # CONFIG_USBIP_DEBUG is not set # # USB dual-mode controller drivers # CONFIG_USB_CDNS_SUPPORT=y CONFIG_USB_CDNS_HOST=y CONFIG_USB_CDNS3=y CONFIG_USB_CDNS3_GADGET=y CONFIG_USB_CDNS3_HOST=y CONFIG_USB_CDNS3_PCI_WRAP=y CONFIG_USB_CDNSP_PCI=y CONFIG_USB_CDNSP_GADGET=y CONFIG_USB_CDNSP_HOST=y CONFIG_USB_MUSB_HDRC=y # CONFIG_USB_MUSB_HOST is not set # CONFIG_USB_MUSB_GADGET is not set CONFIG_USB_MUSB_DUAL_ROLE=y # # Platform Glue Layer # # # MUSB DMA mode # CONFIG_MUSB_PIO_ONLY=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_ULPI=y # CONFIG_USB_DWC3_HOST is not set CONFIG_USB_DWC3_GADGET=y # CONFIG_USB_DWC3_DUAL_ROLE is not set # # Platform Glue Driver Support # CONFIG_USB_DWC3_PCI=y CONFIG_USB_DWC3_HAPS=y CONFIG_USB_DWC3_OF_SIMPLE=y CONFIG_USB_DWC3_GENERIC_PLAT=y CONFIG_USB_DWC2=y CONFIG_USB_DWC2_HOST=y # # Gadget/Dual-role mode requires USB Gadget support to be enabled # # CONFIG_USB_DWC2_PERIPHERAL is not set # CONFIG_USB_DWC2_DUAL_ROLE is not set CONFIG_USB_DWC2_PCI=y # CONFIG_USB_DWC2_DEBUG is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_CHIPIDEA_PCI=y CONFIG_USB_CHIPIDEA_MSM=y CONFIG_USB_CHIPIDEA_NPCM=y # CONFIG_USB_CHIPIDEA_IMX is not set CONFIG_USB_CHIPIDEA_GENERIC=y # CONFIG_USB_CHIPIDEA_TEGRA is not set CONFIG_USB_ISP1760=y CONFIG_USB_ISP1760_HCD=y CONFIG_USB_ISP1761_UDC=y # CONFIG_USB_ISP1760_HOST_ROLE is not set # CONFIG_USB_ISP1760_GADGET_ROLE is not set CONFIG_USB_ISP1760_DUAL_ROLE=y # # USB port drivers # CONFIG_USB_SERIAL=y CONFIG_USB_SERIAL_CONSOLE=y CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_SIMPLE=y CONFIG_USB_SERIAL_AIRCABLE=y CONFIG_USB_SERIAL_ARK3116=y CONFIG_USB_SERIAL_BELKIN=y CONFIG_USB_SERIAL_CH341=y CONFIG_USB_SERIAL_WHITEHEAT=y CONFIG_USB_SERIAL_DIGI_ACCELEPORT=y CONFIG_USB_SERIAL_CP210X=y CONFIG_USB_SERIAL_CYPRESS_M8=y CONFIG_USB_SERIAL_EMPEG=y CONFIG_USB_SERIAL_FTDI_SIO=y CONFIG_USB_SERIAL_VISOR=y CONFIG_USB_SERIAL_IPAQ=y CONFIG_USB_SERIAL_IR=y CONFIG_USB_SERIAL_EDGEPORT=y CONFIG_USB_SERIAL_EDGEPORT_TI=y CONFIG_USB_SERIAL_F81232=y CONFIG_USB_SERIAL_F8153X=y CONFIG_USB_SERIAL_GARMIN=y CONFIG_USB_SERIAL_IPW=y CONFIG_USB_SERIAL_IUU=y CONFIG_USB_SERIAL_KEYSPAN_PDA=y CONFIG_USB_SERIAL_KEYSPAN=y CONFIG_USB_SERIAL_KLSI=y CONFIG_USB_SERIAL_KOBIL_SCT=y CONFIG_USB_SERIAL_MCT_U232=y CONFIG_USB_SERIAL_METRO=y CONFIG_USB_SERIAL_MOS7720=y CONFIG_USB_SERIAL_MOS7715_PARPORT=y CONFIG_USB_SERIAL_MOS7840=y CONFIG_USB_SERIAL_MXUPORT=y CONFIG_USB_SERIAL_NAVMAN=y CONFIG_USB_SERIAL_PL2303=y CONFIG_USB_SERIAL_OTI6858=y CONFIG_USB_SERIAL_QCAUX=y CONFIG_USB_SERIAL_QUALCOMM=y CONFIG_USB_SERIAL_SPCP8X5=y CONFIG_USB_SERIAL_SAFE=y # CONFIG_USB_SERIAL_SAFE_PADDED is not set CONFIG_USB_SERIAL_SIERRAWIRELESS=y CONFIG_USB_SERIAL_SYMBOL=y CONFIG_USB_SERIAL_TI=y CONFIG_USB_SERIAL_CYBERJACK=y CONFIG_USB_SERIAL_WWAN=y CONFIG_USB_SERIAL_OPTION=y CONFIG_USB_SERIAL_OMNINET=y CONFIG_USB_SERIAL_OPTICON=y CONFIG_USB_SERIAL_XSENS_MT=y CONFIG_USB_SERIAL_WISHBONE=y CONFIG_USB_SERIAL_SSU100=y CONFIG_USB_SERIAL_QT2=y CONFIG_USB_SERIAL_UPD78F0730=y CONFIG_USB_SERIAL_XR=y CONFIG_USB_SERIAL_DEBUG=y # # USB Miscellaneous drivers # CONFIG_USB_USS720=y CONFIG_USB_EMI62=y CONFIG_USB_EMI26=y CONFIG_USB_ADUTUX=y CONFIG_USB_SEVSEG=y CONFIG_USB_LEGOTOWER=y CONFIG_USB_LCD=y CONFIG_USB_CYPRESS_CY7C63=y CONFIG_USB_CYTHERM=y CONFIG_USB_IDMOUSE=y CONFIG_USB_APPLEDISPLAY=y CONFIG_APPLE_MFI_FASTCHARGE=y CONFIG_USB_LJCA=y # CONFIG_USB_USBIO is not set CONFIG_USB_SISUSBVGA=y CONFIG_USB_LD=y CONFIG_USB_TRANCEVIBRATOR=y CONFIG_USB_IOWARRIOR=y CONFIG_USB_TEST=y CONFIG_USB_EHSET_TEST_FIXTURE=y CONFIG_USB_ISIGHTFW=y CONFIG_USB_YUREX=y CONFIG_USB_EZUSB_FX2=y CONFIG_USB_HUB_USB251XB=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_HSIC_USB4604=y CONFIG_USB_LINK_LAYER_TEST=y CONFIG_USB_CHAOSKEY=y # CONFIG_USB_ONBOARD_DEV is not set CONFIG_USB_ATM=y CONFIG_USB_SPEEDTOUCH=y CONFIG_USB_CXACRU=y CONFIG_USB_UEAGLEATM=y CONFIG_USB_XUSBATM=y # # USB Physical Layer drivers # CONFIG_USB_PHY=y CONFIG_NOP_USB_XCEIV=y CONFIG_TAHVO_USB=y CONFIG_TAHVO_USB_HOST_BY_DEFAULT=y CONFIG_USB_ISP1301=y # end of USB Physical Layer drivers CONFIG_USB_GADGET=y # CONFIG_USB_GADGET_DEBUG is not set CONFIG_USB_GADGET_DEBUG_FILES=y CONFIG_USB_GADGET_DEBUG_FS=y CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 CONFIG_U_SERIAL_CONSOLE=y # # USB Peripheral Controller # CONFIG_USB_GR_UDC=y CONFIG_USB_R8A66597=y CONFIG_USB_PXA27X=y CONFIG_USB_SNP_CORE=y # CONFIG_USB_SNP_UDC_PLAT is not set # CONFIG_USB_M66592 is not set CONFIG_USB_BDC_UDC=y CONFIG_USB_AMD5536UDC=y CONFIG_USB_NET2280=y CONFIG_USB_GOKU=y CONFIG_USB_EG20T=y # CONFIG_USB_GADGET_XILINX is not set CONFIG_USB_MAX3420_UDC=y CONFIG_USB_CDNS2_UDC=y CONFIG_USB_DUMMY_HCD=y # end of USB Peripheral Controller CONFIG_USB_LIBCOMPOSITE=y CONFIG_USB_F_ACM=y CONFIG_USB_F_SS_LB=y CONFIG_USB_U_SERIAL=y CONFIG_USB_U_ETHER=y CONFIG_USB_U_AUDIO=y CONFIG_USB_F_SERIAL=y CONFIG_USB_F_OBEX=y CONFIG_USB_F_NCM=y CONFIG_USB_F_ECM=y CONFIG_USB_F_PHONET=y CONFIG_USB_F_EEM=y CONFIG_USB_F_SUBSET=y CONFIG_USB_F_RNDIS=y CONFIG_USB_F_MASS_STORAGE=y CONFIG_USB_F_FS=y CONFIG_USB_F_UAC1=y CONFIG_USB_F_UAC1_LEGACY=y CONFIG_USB_F_UAC2=y CONFIG_USB_F_UVC=y CONFIG_USB_F_MIDI=y CONFIG_USB_F_MIDI2=y CONFIG_USB_F_HID=y CONFIG_USB_F_PRINTER=y CONFIG_USB_F_TCM=y CONFIG_USB_CONFIGFS=y CONFIG_USB_CONFIGFS_SERIAL=y CONFIG_USB_CONFIGFS_ACM=y CONFIG_USB_CONFIGFS_OBEX=y CONFIG_USB_CONFIGFS_NCM=y CONFIG_USB_CONFIGFS_ECM=y CONFIG_USB_CONFIGFS_ECM_SUBSET=y CONFIG_USB_CONFIGFS_RNDIS=y CONFIG_USB_CONFIGFS_EEM=y CONFIG_USB_CONFIGFS_PHONET=y CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_USB_CONFIGFS_F_LB_SS=y CONFIG_USB_CONFIGFS_F_FS=y CONFIG_USB_CONFIGFS_F_UAC1=y CONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y CONFIG_USB_CONFIGFS_F_UAC2=y CONFIG_USB_CONFIGFS_F_MIDI=y CONFIG_USB_CONFIGFS_F_MIDI2=y CONFIG_USB_CONFIGFS_F_HID=y CONFIG_USB_CONFIGFS_F_UVC=y CONFIG_USB_CONFIGFS_F_PRINTER=y CONFIG_USB_CONFIGFS_F_TCM=y # # USB Gadget precomposed configurations # # CONFIG_USB_ZERO is not set # CONFIG_USB_AUDIO is not set # CONFIG_USB_ETH is not set # CONFIG_USB_G_NCM is not set CONFIG_USB_GADGETFS=y # CONFIG_USB_FUNCTIONFS is not set # CONFIG_USB_MASS_STORAGE is not set # CONFIG_USB_GADGET_TARGET is not set # CONFIG_USB_G_SERIAL is not set # CONFIG_USB_MIDI_GADGET is not set # CONFIG_USB_G_PRINTER is not set # CONFIG_USB_CDC_COMPOSITE is not set # CONFIG_USB_G_NOKIA is not set # CONFIG_USB_G_ACM_MS is not set # CONFIG_USB_G_MULTI is not set # CONFIG_USB_G_HID is not set # CONFIG_USB_G_DBGP is not set # CONFIG_USB_G_WEBCAM is not set CONFIG_USB_RAW_GADGET=y # end of USB Gadget precomposed configurations CONFIG_TYPEC=y CONFIG_TYPEC_TCPM=y CONFIG_TYPEC_TCPCI=y CONFIG_TYPEC_RT1711H=y CONFIG_TYPEC_MT6360=y CONFIG_TYPEC_TCPCI_MT6370=y CONFIG_TYPEC_TCPCI_MAXIM=y CONFIG_TYPEC_FUSB302=y CONFIG_TYPEC_WCOVE=y CONFIG_TYPEC_UCSI=y CONFIG_UCSI_CCG=y CONFIG_UCSI_ACPI=y CONFIG_UCSI_STM32G0=y CONFIG_TYPEC_TPS6598X=y CONFIG_TYPEC_ANX7411=y CONFIG_TYPEC_RT1719=y CONFIG_TYPEC_HD3SS3220=y CONFIG_TYPEC_STUSB160X=y CONFIG_TYPEC_WUSB3801=y # # USB Type-C Multiplexer/DeMultiplexer Switch support # CONFIG_TYPEC_MUX_FSA4480=y CONFIG_TYPEC_MUX_GPIO_SBU=y CONFIG_TYPEC_MUX_PI3USB30532=y CONFIG_TYPEC_MUX_INTEL_PMC=y # CONFIG_TYPEC_MUX_IT5205 is not set CONFIG_TYPEC_MUX_NB7VPQ904M=y # CONFIG_TYPEC_MUX_PS883X is not set CONFIG_TYPEC_MUX_PTN36502=y # CONFIG_TYPEC_MUX_TUSB1046 is not set CONFIG_TYPEC_MUX_WCD939X_USBSS=y # end of USB Type-C Multiplexer/DeMultiplexer Switch support # # USB Type-C Alternate Mode drivers # CONFIG_TYPEC_DP_ALTMODE=y CONFIG_TYPEC_NVIDIA_ALTMODE=y # CONFIG_TYPEC_TBT_ALTMODE is not set # end of USB Type-C Alternate Mode drivers CONFIG_USB_ROLE_SWITCH=y CONFIG_USB_ROLES_INTEL_XHCI=y CONFIG_MMC=y # CONFIG_PWRSEQ_EMMC is not set # CONFIG_PWRSEQ_SD8787 is not set # CONFIG_PWRSEQ_SIMPLE is not set # CONFIG_MMC_BLOCK is not set # CONFIG_SDIO_UART is not set # CONFIG_MMC_TEST is not set # CONFIG_MMC_CRYPTO is not set # # MMC/SD/SDIO Host Controller Drivers # # CONFIG_MMC_DEBUG is not set # CONFIG_MMC_SDHCI is not set # CONFIG_MMC_WBSD is not set # CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_SPI is not set # CONFIG_MMC_SDRICOH_CS is not set # CONFIG_MMC_CB710 is not set # CONFIG_MMC_VIA_SDMMC is not set CONFIG_MMC_VUB300=y CONFIG_MMC_USHC=y # CONFIG_MMC_USDHI6ROL0 is not set CONFIG_MMC_REALTEK_USB=y # CONFIG_MMC_CQHCI is not set # CONFIG_MMC_HSQ is not set # CONFIG_MMC_TOSHIBA_PCI is not set # CONFIG_MMC_MTK is not set # CONFIG_SCSI_UFSHCD is not set CONFIG_MEMSTICK=y # CONFIG_MEMSTICK_DEBUG is not set # # MemoryStick drivers # # CONFIG_MEMSTICK_UNSAFE_RESUME is not set # CONFIG_MSPRO_BLOCK is not set # CONFIG_MS_BLOCK is not set # # MemoryStick Host Controller Drivers # # CONFIG_MEMSTICK_TIFM_MS is not set # CONFIG_MEMSTICK_JMICRON_38X is not set # CONFIG_MEMSTICK_R592 is not set CONFIG_MEMSTICK_REALTEK_USB=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y # CONFIG_LEDS_CLASS_FLASH is not set CONFIG_LEDS_CLASS_MULTICOLOR=y # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # # LED drivers # # CONFIG_LEDS_AN30259A is not set # CONFIG_LEDS_APU is not set # CONFIG_LEDS_AW200XX is not set # CONFIG_LEDS_AW2013 is not set # CONFIG_LEDS_BCM6328 is not set # CONFIG_LEDS_BCM6358 is not set # CONFIG_LEDS_CHT_WCOVE is not set # CONFIG_LEDS_CR0014114 is not set # CONFIG_LEDS_EL15203000 is not set # CONFIG_LEDS_LM3530 is not set # CONFIG_LEDS_LM3532 is not set # CONFIG_LEDS_LM3642 is not set # CONFIG_LEDS_LM3692X is not set # CONFIG_LEDS_PCA9532 is not set # CONFIG_LEDS_GPIO is not set # CONFIG_LEDS_LP3944 is not set # CONFIG_LEDS_LP3952 is not set # CONFIG_LEDS_LP50XX is not set # CONFIG_LEDS_LP55XX_COMMON is not set # CONFIG_LEDS_LP8860 is not set # CONFIG_LEDS_LP8864 is not set # CONFIG_LEDS_PCA955X is not set # CONFIG_LEDS_PCA963X is not set # CONFIG_LEDS_PCA995X is not set # CONFIG_LEDS_DAC124S085 is not set # CONFIG_LEDS_REGULATOR is not set # CONFIG_LEDS_BD2606MVV is not set # CONFIG_LEDS_BD2802 is not set # CONFIG_LEDS_INTEL_SS4200 is not set # CONFIG_LEDS_LT3593 is not set # CONFIG_LEDS_TCA6507 is not set # CONFIG_LEDS_TLC591XX is not set # CONFIG_LEDS_LM355x is not set # CONFIG_LEDS_IS31FL319X is not set # CONFIG_LEDS_IS31FL32XX is not set # # LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) # # CONFIG_LEDS_BLINKM is not set # CONFIG_LEDS_SYSCON is not set # CONFIG_LEDS_MLXCPLD is not set # CONFIG_LEDS_MLXREG is not set # CONFIG_LEDS_USER is not set # CONFIG_LEDS_NIC78BX is not set # CONFIG_LEDS_SPI_BYTE is not set # CONFIG_LEDS_LM3697 is not set # CONFIG_LEDS_ST1202 is not set # CONFIG_LEDS_LGM is not set # # Flash and Torch LED drivers # # # RGB LED drivers # # CONFIG_LEDS_GROUP_MULTICOLOR is not set # CONFIG_LEDS_KTD202X is not set # CONFIG_LEDS_NCP5623 is not set # CONFIG_LEDS_MT6370_RGB is not set # # LED Triggers # CONFIG_LEDS_TRIGGERS=y # CONFIG_LEDS_TRIGGER_TIMER is not set # CONFIG_LEDS_TRIGGER_ONESHOT is not set # CONFIG_LEDS_TRIGGER_DISK is not set # CONFIG_LEDS_TRIGGER_MTD is not set # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set # CONFIG_LEDS_TRIGGER_ACTIVITY is not set # CONFIG_LEDS_TRIGGER_GPIO is not set # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set # # iptables trigger is under Netfilter config (LED target) # # CONFIG_LEDS_TRIGGER_TRANSIENT is not set # CONFIG_LEDS_TRIGGER_CAMERA is not set # CONFIG_LEDS_TRIGGER_PANIC is not set # CONFIG_LEDS_TRIGGER_NETDEV is not set # CONFIG_LEDS_TRIGGER_PATTERN is not set # CONFIG_LEDS_TRIGGER_TTY is not set # CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set # # Simatic LED drivers # # CONFIG_ACCESSIBILITY is not set CONFIG_INFINIBAND=y CONFIG_INFINIBAND_USER_MAD=y CONFIG_INFINIBAND_USER_ACCESS=y CONFIG_INFINIBAND_USER_MEM=y CONFIG_INFINIBAND_ON_DEMAND_PAGING=y CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y CONFIG_INFINIBAND_VIRT_DMA=y # CONFIG_INFINIBAND_EFA is not set # CONFIG_INFINIBAND_ERDMA is not set CONFIG_MLX4_INFINIBAND=y # CONFIG_INFINIBAND_MTHCA is not set # CONFIG_INFINIBAND_OCRDMA is not set # CONFIG_INFINIBAND_USNIC is not set # CONFIG_INFINIBAND_VMWARE_PVRDMA is not set # CONFIG_INFINIBAND_RDMAVT is not set CONFIG_RDMA_RXE=y CONFIG_RDMA_SIW=y CONFIG_INFINIBAND_IPOIB=y CONFIG_INFINIBAND_IPOIB_CM=y CONFIG_INFINIBAND_IPOIB_DEBUG=y # CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set CONFIG_INFINIBAND_SRP=y # CONFIG_INFINIBAND_SRPT is not set CONFIG_INFINIBAND_ISER=y CONFIG_INFINIBAND_RTRS=y CONFIG_INFINIBAND_RTRS_CLIENT=y # CONFIG_INFINIBAND_RTRS_SERVER is not set # CONFIG_INFINIBAND_OPA_VNIC is not set CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y CONFIG_EDAC=y # CONFIG_EDAC_DEBUG is not set # CONFIG_EDAC_DECODE_MCE is not set # CONFIG_EDAC_SCRUB is not set # CONFIG_EDAC_ECS is not set # CONFIG_EDAC_MEM_REPAIR is not set # CONFIG_EDAC_E752X is not set # CONFIG_EDAC_I82975X is not set # CONFIG_EDAC_I3000 is not set # CONFIG_EDAC_I3200 is not set # CONFIG_EDAC_IE31200 is not set # CONFIG_EDAC_X38 is not set # CONFIG_EDAC_I5400 is not set # CONFIG_EDAC_I7CORE is not set # CONFIG_EDAC_I5100 is not set # CONFIG_EDAC_I7300 is not set # CONFIG_EDAC_SBRIDGE is not set # CONFIG_EDAC_SKX is not set # CONFIG_EDAC_I10NM is not set # CONFIG_EDAC_IMH is not set # CONFIG_EDAC_PND2 is not set # CONFIG_EDAC_IGEN6 is not set CONFIG_RTC_LIB=y CONFIG_RTC_MC146818_LIB=y CONFIG_RTC_CLASS=y # CONFIG_RTC_HCTOSYS is not set CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" # CONFIG_RTC_DEBUG is not set # CONFIG_RTC_NVMEM is not set # # RTC interfaces # CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # CONFIG_RTC_DRV_TEST is not set # # I2C RTC drivers # # CONFIG_RTC_DRV_ABB5ZES3 is not set # CONFIG_RTC_DRV_ABEOZ9 is not set # CONFIG_RTC_DRV_ABX80X is not set # CONFIG_RTC_DRV_DS1307 is not set # CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1672 is not set # CONFIG_RTC_DRV_HYM8563 is not set # CONFIG_RTC_DRV_MAX6900 is not set # CONFIG_RTC_DRV_MAX31335 is not set # CONFIG_RTC_DRV_NCT3018Y is not set # CONFIG_RTC_DRV_RS5C372 is not set # CONFIG_RTC_DRV_ISL1208 is not set # CONFIG_RTC_DRV_ISL12022 is not set # CONFIG_RTC_DRV_ISL12026 is not set # CONFIG_RTC_DRV_X1205 is not set # CONFIG_RTC_DRV_PCF8523 is not set # CONFIG_RTC_DRV_PCF85363 is not set # CONFIG_RTC_DRV_PCF8563 is not set # CONFIG_RTC_DRV_PCF8583 is not set # CONFIG_RTC_DRV_M41T80 is not set # CONFIG_RTC_DRV_BQ32K is not set # CONFIG_RTC_DRV_TWL4030 is not set # CONFIG_RTC_DRV_S35390A is not set # CONFIG_RTC_DRV_FM3130 is not set # CONFIG_RTC_DRV_RX8010 is not set # CONFIG_RTC_DRV_RX8111 is not set # CONFIG_RTC_DRV_RX8581 is not set # CONFIG_RTC_DRV_RX8025 is not set # CONFIG_RTC_DRV_EM3027 is not set # CONFIG_RTC_DRV_RV3028 is not set # CONFIG_RTC_DRV_RV3032 is not set # CONFIG_RTC_DRV_RV8803 is not set # CONFIG_RTC_DRV_SD2405AL is not set # CONFIG_RTC_DRV_SD3078 is not set # # SPI RTC drivers # # CONFIG_RTC_DRV_M41T93 is not set # CONFIG_RTC_DRV_M41T94 is not set # CONFIG_RTC_DRV_DS1302 is not set # CONFIG_RTC_DRV_DS1305 is not set # CONFIG_RTC_DRV_DS1343 is not set # CONFIG_RTC_DRV_DS1347 is not set # CONFIG_RTC_DRV_DS1390 is not set # CONFIG_RTC_DRV_MAX6916 is not set # CONFIG_RTC_DRV_R9701 is not set # CONFIG_RTC_DRV_RX4581 is not set # CONFIG_RTC_DRV_RS5C348 is not set # CONFIG_RTC_DRV_MAX6902 is not set # CONFIG_RTC_DRV_PCF2123 is not set # CONFIG_RTC_DRV_MCP795 is not set CONFIG_RTC_I2C_AND_SPI=y # # SPI and I2C RTC drivers # # CONFIG_RTC_DRV_DS3232 is not set # CONFIG_RTC_DRV_PCF2127 is not set # CONFIG_RTC_DRV_PCF85063 is not set # CONFIG_RTC_DRV_RV3029C2 is not set # CONFIG_RTC_DRV_RX6110 is not set # # Platform RTC drivers # CONFIG_RTC_DRV_CMOS=y # CONFIG_RTC_DRV_DS1286 is not set # CONFIG_RTC_DRV_DS1511 is not set # CONFIG_RTC_DRV_DS1553 is not set # CONFIG_RTC_DRV_DS1685_FAMILY is not set # CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_DS2404 is not set # CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_M48T35 is not set # CONFIG_RTC_DRV_M48T59 is not set # CONFIG_RTC_DRV_MSM6242 is not set # CONFIG_RTC_DRV_RP5C01 is not set # CONFIG_RTC_DRV_ZYNQMP is not set # # on-CPU RTC drivers # # CONFIG_RTC_DRV_CADENCE is not set # CONFIG_RTC_DRV_FTRTC010 is not set # CONFIG_RTC_DRV_R7301 is not set # CONFIG_RTC_DRV_GOLDFISH is not set # # HID Sensor RTC drivers # CONFIG_RTC_DRV_HID_SENSOR_TIME=y CONFIG_DMADEVICES=y # CONFIG_DMADEVICES_DEBUG is not set # # DMA Devices # CONFIG_DMA_ENGINE=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DMA_ACPI=y CONFIG_DMA_OF=y # CONFIG_ALTERA_MSGDMA is not set # CONFIG_DW_AXI_DMAC is not set # CONFIG_FSL_EDMA is not set CONFIG_INTEL_IDMA64=y # CONFIG_INTEL_IDXD is not set # CONFIG_INTEL_IDXD_COMPAT is not set CONFIG_INTEL_IOATDMA=y # CONFIG_PLX_DMA is not set # CONFIG_XILINX_DMA is not set # CONFIG_XILINX_XDMA is not set # CONFIG_XILINX_ZYNQMP_DPDMA is not set # CONFIG_AMD_PTDMA is not set # CONFIG_AMD_QDMA is not set # CONFIG_QCOM_HIDMA_MGMT is not set # CONFIG_QCOM_HIDMA is not set CONFIG_DW_DMAC_CORE=y # CONFIG_DW_DMAC is not set # CONFIG_DW_DMAC_PCI is not set # CONFIG_DW_EDMA is not set CONFIG_HSU_DMA=y # CONFIG_SF_PDMA is not set # CONFIG_INTEL_LDMA is not set # # DMA Clients # CONFIG_ASYNC_TX_DMA=y # CONFIG_DMATEST is not set CONFIG_DMA_ENGINE_RAID=y # # DMABUF options # CONFIG_SYNC_FILE=y CONFIG_SW_SYNC=y CONFIG_UDMABUF=y CONFIG_DMABUF_MOVE_NOTIFY=y # CONFIG_DMABUF_DEBUG is not set # CONFIG_DMABUF_SELFTESTS is not set CONFIG_DMABUF_HEAPS=y # CONFIG_DMABUF_SYSFS_STATS is not set CONFIG_DMABUF_HEAPS_SYSTEM=y CONFIG_DMABUF_HEAPS_CMA=y # end of DMABUF options CONFIG_DCA=y # CONFIG_UIO is not set CONFIG_VFIO=y CONFIG_VFIO_DEVICE_CDEV=y # CONFIG_VFIO_GROUP is not set CONFIG_VFIO_VIRQFD=y # CONFIG_VFIO_DEBUGFS is not set # # VFIO support for PCI devices # CONFIG_VFIO_PCI_CORE=y CONFIG_VFIO_PCI_INTX=y CONFIG_VFIO_PCI=y # CONFIG_VFIO_PCI_VGA is not set # CONFIG_VFIO_PCI_IGD is not set # CONFIG_VIRTIO_VFIO_PCI is not set # end of VFIO support for PCI devices CONFIG_IRQ_BYPASS_MANAGER=y # CONFIG_VIRT_DRIVERS is not set CONFIG_VIRTIO_ANCHOR=y CONFIG_VIRTIO=y CONFIG_VIRTIO_PCI_LIB=y CONFIG_VIRTIO_PCI_LIB_LEGACY=y CONFIG_VIRTIO_MENU=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_ADMIN_LEGACY=y CONFIG_VIRTIO_PCI_LEGACY=y CONFIG_VIRTIO_VDPA=y CONFIG_VIRTIO_PMEM=y CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_MEM=y CONFIG_VIRTIO_INPUT=y CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y CONFIG_VIRTIO_DMA_SHARED_BUFFER=y # CONFIG_VIRTIO_DEBUG is not set # CONFIG_VIRTIO_RTC is not set CONFIG_VDPA=y CONFIG_VDPA_SIM=y CONFIG_VDPA_SIM_NET=y CONFIG_VDPA_SIM_BLOCK=y # CONFIG_VDPA_USER is not set # CONFIG_IFCVF is not set # CONFIG_MLX5_VDPA_STEERING_DEBUG is not set CONFIG_VP_VDPA=y # CONFIG_ALIBABA_ENI_VDPA is not set # CONFIG_SNET_VDPA is not set # CONFIG_OCTEONEP_VDPA is not set CONFIG_VHOST_IOTLB=y CONFIG_VHOST_RING=y CONFIG_VHOST_TASK=y CONFIG_VHOST=y CONFIG_VHOST_MENU=y CONFIG_VHOST_NET=y # CONFIG_VHOST_SCSI is not set CONFIG_VHOST_VSOCK=y CONFIG_VHOST_VDPA=y CONFIG_VHOST_CROSS_ENDIAN_LEGACY=y CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y # # Microsoft Hyper-V guest support # # CONFIG_HYPERV is not set # end of Microsoft Hyper-V guest support CONFIG_GREYBUS=y # CONFIG_GREYBUS_BEAGLEPLAY is not set CONFIG_GREYBUS_ES2=y CONFIG_COMEDI=y # CONFIG_COMEDI_DEBUG is not set CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048 CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480 CONFIG_COMEDI_MISC_DRIVERS=y CONFIG_COMEDI_BOND=y CONFIG_COMEDI_TEST=y CONFIG_COMEDI_PARPORT=y CONFIG_COMEDI_ISA_DRIVERS=y CONFIG_COMEDI_PCL711=y CONFIG_COMEDI_PCL724=y CONFIG_COMEDI_PCL726=y CONFIG_COMEDI_PCL730=y CONFIG_COMEDI_PCL812=y CONFIG_COMEDI_PCL816=y CONFIG_COMEDI_PCL818=y CONFIG_COMEDI_PCM3724=y CONFIG_COMEDI_AMPLC_DIO200_ISA=y CONFIG_COMEDI_AMPLC_PC236_ISA=y CONFIG_COMEDI_AMPLC_PC263_ISA=y CONFIG_COMEDI_RTI800=y CONFIG_COMEDI_RTI802=y CONFIG_COMEDI_DAC02=y CONFIG_COMEDI_DAS16M1=y CONFIG_COMEDI_DAS08_ISA=y # CONFIG_COMEDI_DAS16 is not set CONFIG_COMEDI_DAS800=y CONFIG_COMEDI_DAS1800=y CONFIG_COMEDI_DAS6402=y CONFIG_COMEDI_DT2801=y CONFIG_COMEDI_DT2811=y CONFIG_COMEDI_DT2814=y CONFIG_COMEDI_DT2815=y CONFIG_COMEDI_DT2817=y CONFIG_COMEDI_DT282X=y CONFIG_COMEDI_DMM32AT=y CONFIG_COMEDI_FL512=y CONFIG_COMEDI_AIO_AIO12_8=y CONFIG_COMEDI_AIO_IIRO_16=y # CONFIG_COMEDI_II_PCI20KC is not set CONFIG_COMEDI_C6XDIGIO=y CONFIG_COMEDI_MPC624=y CONFIG_COMEDI_ADQ12B=y CONFIG_COMEDI_NI_AT_A2150=y CONFIG_COMEDI_NI_AT_AO=y # CONFIG_COMEDI_NI_ATMIO is not set CONFIG_COMEDI_NI_ATMIO16D=y CONFIG_COMEDI_NI_LABPC_ISA=y CONFIG_COMEDI_PCMAD=y CONFIG_COMEDI_PCMDA12=y CONFIG_COMEDI_PCMMIO=y CONFIG_COMEDI_PCMUIO=y CONFIG_COMEDI_MULTIQ3=y CONFIG_COMEDI_S526=y CONFIG_COMEDI_PCI_DRIVERS=y CONFIG_COMEDI_8255_PCI=y # CONFIG_COMEDI_ADDI_APCI_1032 is not set # CONFIG_COMEDI_ADDI_APCI_1500 is not set # CONFIG_COMEDI_ADDI_APCI_1516 is not set # CONFIG_COMEDI_ADDI_APCI_1564 is not set # CONFIG_COMEDI_ADDI_APCI_16XX is not set # CONFIG_COMEDI_ADDI_APCI_2032 is not set # CONFIG_COMEDI_ADDI_APCI_2200 is not set # CONFIG_COMEDI_ADDI_APCI_3120 is not set # CONFIG_COMEDI_ADDI_APCI_3501 is not set # CONFIG_COMEDI_ADDI_APCI_3XXX is not set # CONFIG_COMEDI_ADL_PCI6208 is not set # CONFIG_COMEDI_ADL_PCI7250 is not set # CONFIG_COMEDI_ADL_PCI7X3X is not set # CONFIG_COMEDI_ADL_PCI8164 is not set # CONFIG_COMEDI_ADL_PCI9111 is not set CONFIG_COMEDI_ADL_PCI9118=y # CONFIG_COMEDI_ADV_PCI1710 is not set # CONFIG_COMEDI_ADV_PCI1720 is not set # CONFIG_COMEDI_ADV_PCI1723 is not set # CONFIG_COMEDI_ADV_PCI1724 is not set # CONFIG_COMEDI_ADV_PCI1760 is not set # CONFIG_COMEDI_ADV_PCI_DIO is not set # CONFIG_COMEDI_AMPLC_DIO200_PCI is not set # CONFIG_COMEDI_AMPLC_PC236_PCI is not set # CONFIG_COMEDI_AMPLC_PC263_PCI is not set # CONFIG_COMEDI_AMPLC_PCI224 is not set # CONFIG_COMEDI_AMPLC_PCI230 is not set # CONFIG_COMEDI_CONTEC_PCI_DIO is not set # CONFIG_COMEDI_DAS08_PCI is not set # CONFIG_COMEDI_DT3000 is not set # CONFIG_COMEDI_DYNA_PCI10XX is not set # CONFIG_COMEDI_GSC_HPDI is not set # CONFIG_COMEDI_MF6X4 is not set # CONFIG_COMEDI_ICP_MULTI is not set # CONFIG_COMEDI_DAQBOARD2000 is not set # CONFIG_COMEDI_JR3_PCI is not set # CONFIG_COMEDI_KE_COUNTER is not set # CONFIG_COMEDI_CB_PCIDAS64 is not set # CONFIG_COMEDI_CB_PCIDAS is not set # CONFIG_COMEDI_CB_PCIDDA is not set # CONFIG_COMEDI_CB_PCIMDAS is not set # CONFIG_COMEDI_CB_PCIMDDA is not set # CONFIG_COMEDI_ME4000 is not set # CONFIG_COMEDI_ME_DAQ is not set # CONFIG_COMEDI_NI_6527 is not set # CONFIG_COMEDI_NI_65XX is not set # CONFIG_COMEDI_NI_660X is not set # CONFIG_COMEDI_NI_670X is not set CONFIG_COMEDI_NI_LABPC_PCI=y # CONFIG_COMEDI_NI_PCIDIO is not set # CONFIG_COMEDI_NI_PCIMIO is not set # CONFIG_COMEDI_RTD520 is not set # CONFIG_COMEDI_S626 is not set CONFIG_COMEDI_PCMCIA_DRIVERS=y # CONFIG_COMEDI_CB_DAS16_CS is not set # CONFIG_COMEDI_DAS08_CS is not set CONFIG_COMEDI_NI_DAQ_700_CS=y # CONFIG_COMEDI_NI_DAQ_DIO24_CS is not set CONFIG_COMEDI_NI_LABPC_CS=y # CONFIG_COMEDI_NI_MIO_CS is not set # CONFIG_COMEDI_QUATECH_DAQP_CS is not set CONFIG_COMEDI_USB_DRIVERS=y CONFIG_COMEDI_DT9812=y CONFIG_COMEDI_NI_USB6501=y CONFIG_COMEDI_USBDUX=y CONFIG_COMEDI_USBDUXFAST=y CONFIG_COMEDI_USBDUXSIGMA=y CONFIG_COMEDI_VMK80XX=y CONFIG_COMEDI_8254=y CONFIG_COMEDI_8255=y CONFIG_COMEDI_8255_SA=y CONFIG_COMEDI_KCOMEDILIB=y CONFIG_COMEDI_AMPLC_DIO200=y CONFIG_COMEDI_AMPLC_PC236=y CONFIG_COMEDI_DAS08=y CONFIG_COMEDI_ISADMA=y CONFIG_COMEDI_NI_LABPC=y CONFIG_COMEDI_NI_LABPC_ISADMA=y # CONFIG_COMEDI_TESTS is not set # CONFIG_GPIB is not set CONFIG_STAGING=y # CONFIG_RTL8723BS is not set # # IIO staging drivers # # # Accelerometers # # CONFIG_ADIS16203 is not set # end of Accelerometers # # Analog to digital converters # # CONFIG_AD7816 is not set # end of Analog to digital converters # # Analog digital bi-direction converters # # CONFIG_ADT7316 is not set # end of Analog digital bi-direction converters # # Direct Digital Synthesis # # CONFIG_AD9832 is not set # CONFIG_AD9834 is not set # end of Direct Digital Synthesis # # Network Analyzer, Impedance Converters # # CONFIG_AD5933 is not set # end of Network Analyzer, Impedance Converters # end of IIO staging drivers # CONFIG_FB_SM750 is not set # CONFIG_STAGING_MEDIA is not set # CONFIG_FB_TFT is not set # CONFIG_MOST_COMPONENTS is not set # CONFIG_GREYBUS_AUDIO is not set # CONFIG_GREYBUS_BOOTROM is not set # CONFIG_GREYBUS_FIRMWARE is not set CONFIG_GREYBUS_HID=y # CONFIG_GREYBUS_LOG is not set # CONFIG_GREYBUS_LOOPBACK is not set # CONFIG_GREYBUS_POWER is not set # CONFIG_GREYBUS_RAW is not set # CONFIG_GREYBUS_VIBRATOR is not set CONFIG_GREYBUS_BRIDGED_PHY=y # CONFIG_GREYBUS_GPIO is not set # CONFIG_GREYBUS_I2C is not set # CONFIG_GREYBUS_SDIO is not set # CONFIG_GREYBUS_SPI is not set # CONFIG_GREYBUS_UART is not set CONFIG_GREYBUS_USB=y # CONFIG_XIL_AXIS_FIFO is not set # CONFIG_VME_BUS is not set # CONFIG_GOLDFISH is not set # CONFIG_CHROME_PLATFORMS is not set # CONFIG_MELLANOX_PLATFORM is not set CONFIG_SURFACE_PLATFORMS=y # CONFIG_SURFACE3_WMI is not set # CONFIG_SURFACE_3_POWER_OPREGION is not set # CONFIG_SURFACE_ACPI_NOTIFY is not set # CONFIG_SURFACE_AGGREGATOR_CDEV is not set # CONFIG_SURFACE_AGGREGATOR_HUB is not set CONFIG_SURFACE_AGGREGATOR_REGISTRY=y # CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH is not set # CONFIG_SURFACE_DTX is not set # CONFIG_SURFACE_GPE is not set # CONFIG_SURFACE_HOTPLUG is not set # CONFIG_SURFACE_PLATFORM_PROFILE is not set # CONFIG_SURFACE_PRO3_BUTTON is not set CONFIG_SURFACE_AGGREGATOR=y CONFIG_SURFACE_AGGREGATOR_BUS=y CONFIG_X86_PLATFORM_DEVICES=y CONFIG_WMI_BMOF=y # CONFIG_HUAWEI_WMI is not set # CONFIG_X86_PLATFORM_DRIVERS_UNIWILL is not set # CONFIG_MXM_WMI is not set # CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set # CONFIG_XIAOMI_WMI is not set # CONFIG_REDMI_WMI is not set # CONFIG_GIGABYTE_WMI is not set # CONFIG_ACERHDF is not set # CONFIG_ACER_WIRELESS is not set # CONFIG_ACER_WMI is not set # # AMD HSMP Driver # # CONFIG_AMD_HSMP_ACPI is not set # CONFIG_AMD_HSMP_PLAT is not set # end of AMD HSMP Driver # CONFIG_AMD_PMC is not set # CONFIG_AMD_HFI is not set # CONFIG_AMD_3D_VCACHE is not set # CONFIG_AMD_WBRF is not set # CONFIG_AMD_ISP_PLATFORM is not set # CONFIG_ADV_SWBUTTON is not set # CONFIG_APPLE_GMUX is not set # CONFIG_ASUS_LAPTOP is not set # CONFIG_ASUS_WIRELESS is not set # CONFIG_ASUS_ARMOURY is not set CONFIG_ASUS_WMI=y CONFIG_ASUS_WMI_DEPRECATED_ATTRS=y # CONFIG_ASUS_NB_WMI is not set CONFIG_ASUS_TF103C_DOCK=y # CONFIG_AYANEO_EC is not set CONFIG_EEEPC_LAPTOP=y # CONFIG_EEEPC_WMI is not set # CONFIG_X86_PLATFORM_DRIVERS_DELL is not set # CONFIG_AMILO_RFKILL is not set # CONFIG_FUJITSU_LAPTOP is not set # CONFIG_FUJITSU_TABLET is not set # CONFIG_GPD_POCKET_FAN is not set # CONFIG_X86_PLATFORM_DRIVERS_HP is not set # CONFIG_WIRELESS_HOTKEY is not set # CONFIG_IBM_RTL is not set # CONFIG_SENSORS_HDAPS is not set # CONFIG_INTEL_ATOMISP2_PM is not set # CONFIG_INTEL_IFS is not set # CONFIG_INTEL_SAR_INT1092 is not set # CONFIG_INTEL_SKL_INT3472 is not set # # Intel Speed Select Technology interface support # # CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set # end of Intel Speed Select Technology interface support # CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set # CONFIG_INTEL_WMI_THUNDERBOLT is not set # # Intel Uncore Frequency Control # # CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set # end of Intel Uncore Frequency Control # CONFIG_INTEL_HID_EVENT is not set # CONFIG_INTEL_VBTN is not set # CONFIG_INTEL_EHL_PSE_IO is not set # CONFIG_INTEL_INT0002_VGPIO is not set # CONFIG_INTEL_OAKTRAIL is not set # CONFIG_INTEL_BXTWC_PMIC_TMU is not set CONFIG_INTEL_CHTWC_INT33FE=y CONFIG_INTEL_ISHTP_ECLITE=y # CONFIG_INTEL_PUNIT_IPC is not set # CONFIG_INTEL_RST is not set # CONFIG_INTEL_SMARTCONNECT is not set # CONFIG_INTEL_TURBO_MAX_3 is not set # CONFIG_INTEL_VSEC is not set # CONFIG_IDEAPAD_LAPTOP is not set # CONFIG_LENOVO_WMI_HOTKEY_UTILITIES is not set # CONFIG_LENOVO_WMI_CAMERA is not set # CONFIG_THINKPAD_ACPI is not set # CONFIG_THINKPAD_LMI is not set # CONFIG_YOGABOOK is not set # CONFIG_YT2_1380 is not set # CONFIG_LENOVO_WMI_GAMEZONE is not set # CONFIG_LENOVO_WMI_TUNING is not set # CONFIG_ACPI_QUICKSTART is not set # CONFIG_MEEGOPAD_ANX7428 is not set # CONFIG_MSI_EC is not set # CONFIG_MSI_LAPTOP is not set # CONFIG_MSI_WMI is not set # CONFIG_MSI_WMI_PLATFORM is not set # CONFIG_PCENGINES_APU2 is not set # CONFIG_PORTWELL_EC is not set # CONFIG_BARCO_P50_GPIO is not set # CONFIG_SAMSUNG_GALAXYBOOK is not set # CONFIG_SAMSUNG_LAPTOP is not set # CONFIG_SAMSUNG_Q10 is not set # CONFIG_ACPI_TOSHIBA is not set # CONFIG_TOSHIBA_BT_RFKILL is not set # CONFIG_TOSHIBA_HAPS is not set # CONFIG_TOSHIBA_WMI is not set # CONFIG_ACPI_CMPC is not set # CONFIG_COMPAL_LAPTOP is not set # CONFIG_LG_LAPTOP is not set # CONFIG_PANASONIC_LAPTOP is not set # CONFIG_SONY_LAPTOP is not set # CONFIG_SYSTEM76_ACPI is not set # CONFIG_TOPSTAR_LAPTOP is not set # CONFIG_SERIAL_MULTI_INSTANTIATE is not set # CONFIG_INSPUR_PLATFORM_PROFILE is not set # CONFIG_DASHARO_ACPI is not set # CONFIG_INTEL_IPS is not set CONFIG_INTEL_SCU_IPC=y # CONFIG_INTEL_SCU_PCI is not set # CONFIG_INTEL_SCU_PLATFORM is not set # CONFIG_SIEMENS_SIMATIC_IPC is not set # CONFIG_SILICOM_PLATFORM is not set # CONFIG_WINMATE_FM07_KEYS is not set # CONFIG_OXP_EC is not set # CONFIG_TUXEDO_NB04_WMI_AB is not set CONFIG_P2SB=y CONFIG_ACPI_WMI=y # CONFIG_ACPI_WMI_LEGACY_DEVICE_NAMES is not set CONFIG_HAVE_CLK=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y # CONFIG_LMK04832 is not set # CONFIG_COMMON_CLK_MAX9485 is not set # CONFIG_COMMON_CLK_SI5341 is not set # CONFIG_COMMON_CLK_SI5351 is not set # CONFIG_COMMON_CLK_SI514 is not set # CONFIG_COMMON_CLK_SI544 is not set # CONFIG_COMMON_CLK_SI570 is not set # CONFIG_COMMON_CLK_CDCE706 is not set # CONFIG_COMMON_CLK_CDCE925 is not set # CONFIG_COMMON_CLK_CS2000_CP is not set # CONFIG_CLK_TWL is not set # CONFIG_COMMON_CLK_AXI_CLKGEN is not set # CONFIG_COMMON_CLK_RS9_PCIE is not set # CONFIG_COMMON_CLK_SI521XX is not set # CONFIG_COMMON_CLK_VC3 is not set # CONFIG_COMMON_CLK_VC5 is not set # CONFIG_COMMON_CLK_VC7 is not set # CONFIG_COMMON_CLK_FIXED_MMIO is not set # CONFIG_CLK_LGM_CGU is not set # CONFIG_XILINX_VCU is not set # CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set # CONFIG_HWSPINLOCK is not set # # Clock Source drivers # CONFIG_CLKEVT_I8253=y CONFIG_I8253_LOCK=y CONFIG_CLKBLD_I8253=y # end of Clock Source drivers CONFIG_MAILBOX=y # CONFIG_PLATFORM_MHU is not set CONFIG_PCC=y # CONFIG_ALTERA_MBOX is not set # CONFIG_MAILBOX_TEST is not set CONFIG_IOMMU_IOVA=y CONFIG_IOMMU_API=y CONFIG_IOMMUFD_DRIVER=y CONFIG_IOMMU_SUPPORT=y # # Generic IOMMU Pagetable Support # # end of Generic IOMMU Pagetable Support # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set CONFIG_IOMMU_DEFAULT_DMA_LAZY=y # CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set CONFIG_OF_IOMMU=y CONFIG_IOMMU_DMA=y CONFIG_IOMMU_SVA=y CONFIG_IOMMU_IOPF=y # CONFIG_AMD_IOMMU is not set CONFIG_DMAR_TABLE=y CONFIG_INTEL_IOMMU=y CONFIG_INTEL_IOMMU_SVM=y CONFIG_INTEL_IOMMU_DEFAULT_ON=y CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON=y CONFIG_INTEL_IOMMU_PERF_EVENTS=y CONFIG_IOMMUFD_DRIVER_CORE=y CONFIG_IOMMUFD=y CONFIG_IRQ_REMAP=y # CONFIG_VIRTIO_IOMMU is not set CONFIG_GENERIC_PT=y # CONFIG_DEBUG_GENERIC_PT is not set CONFIG_IOMMU_PT=y # CONFIG_IOMMU_PT_AMDV1 is not set CONFIG_IOMMU_PT_VTDSS=y CONFIG_IOMMU_PT_X86_64=y # # Remoteproc drivers # # CONFIG_REMOTEPROC is not set # end of Remoteproc drivers # # Rpmsg drivers # # CONFIG_RPMSG_QCOM_GLINK_RPM is not set # CONFIG_RPMSG_VIRTIO is not set # end of Rpmsg drivers CONFIG_SOUNDWIRE=y # # SoundWire Devices # # CONFIG_SOUNDWIRE_AMD is not set # CONFIG_SOUNDWIRE_INTEL is not set # CONFIG_SOUNDWIRE_QCOM is not set # # SOC (System On Chip) specific Drivers # # # Amlogic SoC drivers # # end of Amlogic SoC drivers # # Broadcom SoC drivers # # end of Broadcom SoC drivers # # NXP/Freescale QorIQ SoC drivers # # end of NXP/Freescale QorIQ SoC drivers # # fujitsu SoC drivers # # end of fujitsu SoC drivers # # i.MX SoC drivers # # end of i.MX SoC drivers # # Enable LiteX SoC Builder specific drivers # # CONFIG_LITEX_SOC_CONTROLLER is not set # end of Enable LiteX SoC Builder specific drivers # CONFIG_WPCM450_SOC is not set # # Qualcomm SoC drivers # CONFIG_QCOM_QMI_HELPERS=y # end of Qualcomm SoC drivers # CONFIG_SOC_TI is not set # # Xilinx SoC drivers # # end of Xilinx SoC drivers # end of SOC (System On Chip) specific Drivers # # PM Domains # # # Amlogic PM Domains # # end of Amlogic PM Domains # # Broadcom PM Domains # # end of Broadcom PM Domains # # i.MX PM Domains # # end of i.MX PM Domains # # Qualcomm PM Domains # # end of Qualcomm PM Domains # end of PM Domains # CONFIG_PM_DEVFREQ is not set CONFIG_EXTCON=y # # Extcon Device Drivers # # CONFIG_EXTCON_ADC_JACK is not set # CONFIG_EXTCON_FSA9480 is not set # CONFIG_EXTCON_GPIO is not set # CONFIG_EXTCON_INTEL_INT3496 is not set CONFIG_EXTCON_INTEL_CHT_WC=y # CONFIG_EXTCON_LC824206XA is not set # CONFIG_EXTCON_MAX3355 is not set # CONFIG_EXTCON_MAX14526 is not set CONFIG_EXTCON_PTN5150=y # CONFIG_EXTCON_RT8973A is not set # CONFIG_EXTCON_SM5502 is not set # CONFIG_EXTCON_USB_GPIO is not set CONFIG_EXTCON_USBC_TUSB320=y # CONFIG_MEMORY is not set CONFIG_IIO=y CONFIG_IIO_BUFFER=y # CONFIG_IIO_BUFFER_CB is not set # CONFIG_IIO_BUFFER_DMA is not set # CONFIG_IIO_BUFFER_DMAENGINE is not set # CONFIG_IIO_BUFFER_HW_CONSUMER is not set CONFIG_IIO_KFIFO_BUF=y CONFIG_IIO_TRIGGERED_BUFFER=y # CONFIG_IIO_CONFIGFS is not set CONFIG_IIO_TRIGGER=y CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_IIO_SW_DEVICE is not set # CONFIG_IIO_SW_TRIGGER is not set # CONFIG_IIO_TRIGGERED_EVENT is not set # # Accelerometers # # CONFIG_ADIS16201 is not set # CONFIG_ADIS16209 is not set # CONFIG_ADXL313_I2C is not set # CONFIG_ADXL313_SPI is not set # CONFIG_ADXL345_I2C is not set # CONFIG_ADXL345_SPI is not set # CONFIG_ADXL355_I2C is not set # CONFIG_ADXL355_SPI is not set # CONFIG_ADXL367_SPI is not set # CONFIG_ADXL367_I2C is not set # CONFIG_ADXL372_SPI is not set # CONFIG_ADXL372_I2C is not set # CONFIG_ADXL380_SPI is not set # CONFIG_ADXL380_I2C is not set # CONFIG_BMA180 is not set # CONFIG_BMA220 is not set # CONFIG_BMA400 is not set # CONFIG_BMC150_ACCEL is not set # CONFIG_BMI088_ACCEL is not set # CONFIG_DA280 is not set # CONFIG_DA311 is not set # CONFIG_DMARD06 is not set # CONFIG_DMARD09 is not set # CONFIG_DMARD10 is not set # CONFIG_FXLS8962AF_I2C is not set # CONFIG_FXLS8962AF_SPI is not set CONFIG_HID_SENSOR_ACCEL_3D=y # CONFIG_IIO_ST_ACCEL_3AXIS is not set # CONFIG_IIO_KX022A_SPI is not set # CONFIG_IIO_KX022A_I2C is not set # CONFIG_KXSD9 is not set # CONFIG_KXCJK1013 is not set # CONFIG_MC3230 is not set # CONFIG_MMA7455_I2C is not set # CONFIG_MMA7455_SPI is not set # CONFIG_MMA7660 is not set # CONFIG_MMA8452 is not set # CONFIG_MMA9551 is not set # CONFIG_MMA9553 is not set # CONFIG_MSA311 is not set # CONFIG_MXC4005 is not set # CONFIG_MXC6255 is not set # CONFIG_SCA3000 is not set # CONFIG_SCA3300 is not set # CONFIG_STK8312 is not set # CONFIG_STK8BA50 is not set # end of Accelerometers # # Analog to digital converters # # CONFIG_AD4000 is not set # CONFIG_AD4030 is not set # CONFIG_AD4080 is not set # CONFIG_AD4130 is not set # CONFIG_AD4170_4 is not set # CONFIG_AD4695 is not set # CONFIG_AD7091R5 is not set # CONFIG_AD7091R8 is not set # CONFIG_AD7124 is not set # CONFIG_AD7173 is not set # CONFIG_AD7191 is not set # CONFIG_AD7192 is not set # CONFIG_AD7266 is not set # CONFIG_AD7280 is not set # CONFIG_AD7291 is not set # CONFIG_AD7292 is not set # CONFIG_AD7298 is not set # CONFIG_AD7380 is not set # CONFIG_AD7476 is not set # CONFIG_AD7606_IFACE_PARALLEL is not set # CONFIG_AD7606_IFACE_SPI is not set # CONFIG_AD7766 is not set # CONFIG_AD7768_1 is not set # CONFIG_AD7779 is not set # CONFIG_AD7780 is not set # CONFIG_AD7791 is not set # CONFIG_AD7793 is not set # CONFIG_AD7887 is not set # CONFIG_AD7923 is not set # CONFIG_AD7944 is not set # CONFIG_AD7949 is not set # CONFIG_AD799X is not set # CONFIG_AD9467 is not set # CONFIG_ADE9000 is not set # CONFIG_CC10001_ADC is not set CONFIG_DLN2_ADC=y # CONFIG_ENVELOPE_DETECTOR is not set # CONFIG_GEHC_PMC_ADC is not set # CONFIG_HI8435 is not set # CONFIG_HX711 is not set # CONFIG_INA2XX_ADC is not set # CONFIG_LTC2309 is not set # CONFIG_LTC2471 is not set # CONFIG_LTC2485 is not set # CONFIG_LTC2496 is not set # CONFIG_LTC2497 is not set # CONFIG_MAX1027 is not set # CONFIG_MAX11100 is not set # CONFIG_MAX1118 is not set # CONFIG_MAX11205 is not set # CONFIG_MAX11410 is not set # CONFIG_MAX1241 is not set # CONFIG_MAX1363 is not set # CONFIG_MAX14001 is not set # CONFIG_MAX34408 is not set # CONFIG_MAX9611 is not set # CONFIG_MCP320X is not set # CONFIG_MCP3422 is not set # CONFIG_MCP3564 is not set # CONFIG_MCP3911 is not set # CONFIG_MEDIATEK_MT6360_ADC is not set # CONFIG_MEDIATEK_MT6370_ADC is not set # CONFIG_NAU7802 is not set # CONFIG_NCT7201 is not set # CONFIG_PAC1921 is not set # CONFIG_PAC1934 is not set # CONFIG_ROHM_BD79112 is not set # CONFIG_ROHM_BD79124 is not set # CONFIG_RICHTEK_RTQ6056 is not set # CONFIG_SD_ADC_MODULATOR is not set # CONFIG_TI_ADC081C is not set # CONFIG_TI_ADC0832 is not set # CONFIG_TI_ADC084S021 is not set # CONFIG_TI_ADC108S102 is not set # CONFIG_TI_ADC12138 is not set # CONFIG_TI_ADC128S052 is not set # CONFIG_TI_ADC161S626 is not set # CONFIG_TI_ADS1015 is not set # CONFIG_TI_ADS1100 is not set # CONFIG_TI_ADS1119 is not set # CONFIG_TI_ADS124S08 is not set # CONFIG_TI_ADS1298 is not set # CONFIG_TI_ADS131E08 is not set # CONFIG_TI_ADS7138 is not set # CONFIG_TI_ADS7924 is not set # CONFIG_TI_ADS7950 is not set # CONFIG_TI_ADS8344 is not set # CONFIG_TI_ADS8688 is not set # CONFIG_TI_LMP92064 is not set # CONFIG_TI_TLC4541 is not set # CONFIG_TI_TSC2046 is not set # CONFIG_TWL4030_MADC is not set # CONFIG_TWL6030_GPADC is not set # CONFIG_VF610_ADC is not set CONFIG_VIPERBOARD_ADC=y # CONFIG_XILINX_XADC is not set # end of Analog to digital converters # # Analog to digital and digital to analog converters # # CONFIG_AD74115 is not set # CONFIG_AD74413R is not set # end of Analog to digital and digital to analog converters # # Analog Front Ends # # CONFIG_IIO_RESCALE is not set # end of Analog Front Ends # # Amplifiers # # CONFIG_AD8366 is not set # CONFIG_ADA4250 is not set # CONFIG_HMC425 is not set # end of Amplifiers # # Capacitance to digital converters # # CONFIG_AD7150 is not set # CONFIG_AD7746 is not set # end of Capacitance to digital converters # # Chemical Sensors # # CONFIG_AOSONG_AGS02MA is not set # CONFIG_ATLAS_PH_SENSOR is not set # CONFIG_ATLAS_EZO_SENSOR is not set # CONFIG_BME680 is not set # CONFIG_CCS811 is not set # CONFIG_ENS160 is not set # CONFIG_IAQCORE is not set # CONFIG_MHZ19B is not set # CONFIG_PMS7003 is not set # CONFIG_SCD30_CORE is not set # CONFIG_SCD4X is not set # CONFIG_SEN0322 is not set # CONFIG_SENSIRION_SGP30 is not set # CONFIG_SENSIRION_SGP40 is not set # CONFIG_SPS30_I2C is not set # CONFIG_SPS30_SERIAL is not set # CONFIG_SENSEAIR_SUNRISE_CO2 is not set # CONFIG_VZ89X is not set # end of Chemical Sensors # # Hid Sensor IIO Common # CONFIG_HID_SENSOR_IIO_COMMON=y CONFIG_HID_SENSOR_IIO_TRIGGER=y # end of Hid Sensor IIO Common # # IIO SCMI Sensors # # end of IIO SCMI Sensors # # SSP Sensor Common # # CONFIG_IIO_SSP_SENSORHUB is not set # end of SSP Sensor Common # # Digital to analog converters # # CONFIG_AD3530R is not set # CONFIG_AD3552R_HS is not set # CONFIG_AD3552R is not set # CONFIG_AD5064 is not set # CONFIG_AD5360 is not set # CONFIG_AD5380 is not set # CONFIG_AD5421 is not set # CONFIG_AD5446_SPI is not set # CONFIG_AD5446_I2C is not set # CONFIG_AD5449 is not set # CONFIG_AD5592R is not set # CONFIG_AD5593R is not set # CONFIG_AD5504 is not set # CONFIG_AD5624R_SPI is not set # CONFIG_AD9739A is not set # CONFIG_LTC2688 is not set # CONFIG_AD5686_SPI is not set # CONFIG_AD5696_I2C is not set # CONFIG_AD5755 is not set # CONFIG_AD5758 is not set # CONFIG_AD5761 is not set # CONFIG_AD5764 is not set # CONFIG_AD5766 is not set # CONFIG_AD5770R is not set # CONFIG_AD5791 is not set # CONFIG_AD7293 is not set # CONFIG_AD7303 is not set # CONFIG_AD8460 is not set # CONFIG_AD8801 is not set # CONFIG_BD79703 is not set # CONFIG_CIO_DAC is not set # CONFIG_DPOT_DAC is not set # CONFIG_DS4424 is not set # CONFIG_LTC1660 is not set # CONFIG_LTC2632 is not set # CONFIG_LTC2664 is not set # CONFIG_M62332 is not set # CONFIG_MAX517 is not set # CONFIG_MAX5522 is not set # CONFIG_MAX5821 is not set # CONFIG_MCP4725 is not set # CONFIG_MCP4728 is not set # CONFIG_MCP4821 is not set # CONFIG_MCP4922 is not set # CONFIG_TI_DAC082S085 is not set # CONFIG_TI_DAC5571 is not set # CONFIG_TI_DAC7311 is not set # CONFIG_TI_DAC7612 is not set # CONFIG_VF610_DAC is not set # end of Digital to analog converters # # IIO dummy driver # # end of IIO dummy driver # # Filters # # CONFIG_ADMV8818 is not set # end of Filters # # Frequency Synthesizers DDS/PLL # # # Clock Generator/Distribution # # CONFIG_AD9523 is not set # end of Clock Generator/Distribution # # Phase-Locked Loop (PLL) frequency synthesizers # # CONFIG_ADF4350 is not set # CONFIG_ADF4371 is not set # CONFIG_ADF4377 is not set # CONFIG_ADMFM2000 is not set # CONFIG_ADMV1013 is not set # CONFIG_ADMV1014 is not set # CONFIG_ADMV4420 is not set # CONFIG_ADRF6780 is not set # end of Phase-Locked Loop (PLL) frequency synthesizers # end of Frequency Synthesizers DDS/PLL # # Digital gyroscope sensors # # CONFIG_ADIS16080 is not set # CONFIG_ADIS16130 is not set # CONFIG_ADIS16136 is not set # CONFIG_ADIS16260 is not set # CONFIG_ADXRS290 is not set # CONFIG_ADXRS450 is not set # CONFIG_BMG160 is not set # CONFIG_FXAS21002C is not set CONFIG_HID_SENSOR_GYRO_3D=y # CONFIG_MPU3050_I2C is not set # CONFIG_IIO_ST_GYRO_3AXIS is not set # CONFIG_ITG3200 is not set # end of Digital gyroscope sensors # # Health Sensors # # # Heart Rate Monitors # # CONFIG_AFE4403 is not set # CONFIG_AFE4404 is not set # CONFIG_MAX30100 is not set # CONFIG_MAX30102 is not set # end of Heart Rate Monitors # end of Health Sensors # # Humidity sensors # # CONFIG_AM2315 is not set # CONFIG_DHT11 is not set # CONFIG_ENS210 is not set # CONFIG_HDC100X is not set # CONFIG_HDC2010 is not set # CONFIG_HDC3020 is not set CONFIG_HID_SENSOR_HUMIDITY=y # CONFIG_HTS221 is not set # CONFIG_HTU21 is not set # CONFIG_SI7005 is not set # CONFIG_SI7020 is not set # end of Humidity sensors # # Inertial measurement units # # CONFIG_ADIS16400 is not set # CONFIG_ADIS16460 is not set # CONFIG_ADIS16475 is not set # CONFIG_ADIS16480 is not set # CONFIG_ADIS16550 is not set # CONFIG_BMI160_I2C is not set # CONFIG_BMI160_SPI is not set # CONFIG_BMI270_I2C is not set # CONFIG_BMI270_SPI is not set # CONFIG_BMI323_I2C is not set # CONFIG_BMI323_SPI is not set # CONFIG_BOSCH_BNO055_SERIAL is not set # CONFIG_BOSCH_BNO055_I2C is not set # CONFIG_FXOS8700_I2C is not set # CONFIG_FXOS8700_SPI is not set # CONFIG_KMX61 is not set # CONFIG_INV_ICM42600_I2C is not set # CONFIG_INV_ICM42600_SPI is not set # CONFIG_INV_ICM45600_I2C is not set # CONFIG_INV_ICM45600_SPI is not set # CONFIG_INV_MPU6050_I2C is not set # CONFIG_INV_MPU6050_SPI is not set # CONFIG_SMI240 is not set # CONFIG_SMI330_I2C is not set # CONFIG_SMI330_SPI is not set # CONFIG_IIO_ST_LSM6DSX is not set # CONFIG_IIO_ST_LSM9DS0 is not set # end of Inertial measurement units # # Light sensors # # CONFIG_ACPI_ALS is not set # CONFIG_ADJD_S311 is not set # CONFIG_ADUX1020 is not set # CONFIG_AL3000A is not set # CONFIG_AL3010 is not set # CONFIG_AL3320A is not set # CONFIG_APDS9160 is not set # CONFIG_APDS9300 is not set # CONFIG_APDS9306 is not set # CONFIG_APDS9960 is not set # CONFIG_AS73211 is not set # CONFIG_BH1745 is not set # CONFIG_BH1750 is not set # CONFIG_BH1780 is not set # CONFIG_CM32181 is not set # CONFIG_CM3232 is not set # CONFIG_CM3323 is not set # CONFIG_CM3605 is not set # CONFIG_CM36651 is not set # CONFIG_GP2AP002 is not set # CONFIG_GP2AP020A00F is not set # CONFIG_SENSORS_ISL29018 is not set # CONFIG_SENSORS_ISL29028 is not set # CONFIG_ISL29125 is not set # CONFIG_ISL76682 is not set CONFIG_HID_SENSOR_ALS=y CONFIG_HID_SENSOR_PROX=y # CONFIG_JSA1212 is not set # CONFIG_ROHM_BU27034 is not set # CONFIG_RPR0521 is not set # CONFIG_LTR390 is not set # CONFIG_LTR501 is not set # CONFIG_LTRF216A is not set # CONFIG_LV0104CS is not set # CONFIG_MAX44000 is not set # CONFIG_MAX44009 is not set # CONFIG_NOA1305 is not set # CONFIG_OPT3001 is not set # CONFIG_OPT4001 is not set # CONFIG_OPT4060 is not set # CONFIG_PA12203001 is not set # CONFIG_SI1133 is not set # CONFIG_SI1145 is not set # CONFIG_STK3310 is not set # CONFIG_ST_UVIS25 is not set # CONFIG_TCS3414 is not set # CONFIG_TCS3472 is not set # CONFIG_SENSORS_TSL2563 is not set # CONFIG_TSL2583 is not set # CONFIG_TSL2591 is not set # CONFIG_TSL2772 is not set # CONFIG_TSL4531 is not set # CONFIG_US5182D is not set # CONFIG_VCNL4000 is not set # CONFIG_VCNL4035 is not set # CONFIG_VEML3235 is not set # CONFIG_VEML6030 is not set # CONFIG_VEML6040 is not set # CONFIG_VEML6046X00 is not set # CONFIG_VEML6070 is not set # CONFIG_VEML6075 is not set # CONFIG_VL6180 is not set # CONFIG_ZOPT2201 is not set # end of Light sensors # # Magnetometer sensors # # CONFIG_AF8133J is not set # CONFIG_AK8974 is not set # CONFIG_AK8975 is not set # CONFIG_AK09911 is not set # CONFIG_ALS31300 is not set # CONFIG_BMC150_MAGN_I2C is not set # CONFIG_BMC150_MAGN_SPI is not set # CONFIG_MAG3110 is not set CONFIG_HID_SENSOR_MAGNETOMETER_3D=y # CONFIG_MMC35240 is not set # CONFIG_IIO_ST_MAGN_3AXIS is not set # CONFIG_INFINEON_TLV493D is not set # CONFIG_SENSORS_HMC5843_I2C is not set # CONFIG_SENSORS_HMC5843_SPI is not set # CONFIG_SENSORS_RM3100_I2C is not set # CONFIG_SENSORS_RM3100_SPI is not set # CONFIG_SI7210 is not set # CONFIG_TI_TMAG5273 is not set # CONFIG_YAMAHA_YAS530 is not set # end of Magnetometer sensors # # Multiplexers # # CONFIG_IIO_MUX is not set # end of Multiplexers # # Inclinometer sensors # CONFIG_HID_SENSOR_INCLINOMETER_3D=y CONFIG_HID_SENSOR_DEVICE_ROTATION=y # end of Inclinometer sensors # # Triggers - standalone # # CONFIG_IIO_INTERRUPT_TRIGGER is not set # CONFIG_IIO_SYSFS_TRIGGER is not set # end of Triggers - standalone # # Linear and angular position sensors # CONFIG_HID_SENSOR_CUSTOM_INTEL_HINGE=y # end of Linear and angular position sensors # # Digital potentiometers # # CONFIG_AD5110 is not set # CONFIG_AD5272 is not set # CONFIG_DS1803 is not set # CONFIG_MAX5432 is not set # CONFIG_MAX5481 is not set # CONFIG_MAX5487 is not set # CONFIG_MCP4018 is not set # CONFIG_MCP4131 is not set # CONFIG_MCP4531 is not set # CONFIG_MCP41010 is not set # CONFIG_TPL0102 is not set # CONFIG_X9250 is not set # end of Digital potentiometers # # Digital potentiostats # # CONFIG_LMP91000 is not set # end of Digital potentiostats # # Pressure sensors # # CONFIG_ABP060MG is not set # CONFIG_ROHM_BM1390 is not set # CONFIG_BMP280 is not set # CONFIG_DLHL60D is not set # CONFIG_DPS310 is not set CONFIG_HID_SENSOR_PRESS=y # CONFIG_HP03 is not set # CONFIG_HSC030PA is not set # CONFIG_ICP10100 is not set # CONFIG_MPL115_I2C is not set # CONFIG_MPL115_SPI is not set # CONFIG_MPL3115 is not set # CONFIG_MPRLS0025PA is not set # CONFIG_MS5611 is not set # CONFIG_MS5637 is not set # CONFIG_SDP500 is not set # CONFIG_IIO_ST_PRESS is not set # CONFIG_T5403 is not set # CONFIG_HP206C is not set # CONFIG_ZPA2326 is not set # CONFIG_ADP810 is not set # end of Pressure sensors # # Lightning sensors # # CONFIG_AS3935 is not set # end of Lightning sensors # # Proximity and distance sensors # # CONFIG_D3323AA is not set # CONFIG_HX9023S is not set # CONFIG_IRSD200 is not set # CONFIG_ISL29501 is not set # CONFIG_LIDAR_LITE_V2 is not set # CONFIG_MB1232 is not set # CONFIG_PING is not set # CONFIG_RFD77402 is not set # CONFIG_SRF04 is not set # CONFIG_SX9310 is not set # CONFIG_SX9324 is not set # CONFIG_SX9360 is not set # CONFIG_SX9500 is not set # CONFIG_SRF08 is not set # CONFIG_VCNL3020 is not set # CONFIG_VL53L0X_I2C is not set # CONFIG_AW96103 is not set # end of Proximity and distance sensors # # Resolver to digital converters # # CONFIG_AD2S90 is not set # CONFIG_AD2S1200 is not set # CONFIG_AD2S1210 is not set # end of Resolver to digital converters # # Temperature sensors # # CONFIG_LTC2983 is not set # CONFIG_MAXIM_THERMOCOUPLE is not set CONFIG_HID_SENSOR_TEMP=y # CONFIG_MLX90614 is not set # CONFIG_MLX90632 is not set # CONFIG_MLX90635 is not set # CONFIG_TMP006 is not set # CONFIG_TMP007 is not set # CONFIG_TMP117 is not set # CONFIG_TSYS01 is not set # CONFIG_TSYS02D is not set # CONFIG_MAX30208 is not set # CONFIG_MAX31856 is not set # CONFIG_MAX31865 is not set # CONFIG_MCP9600 is not set # end of Temperature sensors # CONFIG_NTB is not set # CONFIG_PWM is not set # # IRQ chip support # CONFIG_IRQCHIP=y CONFIG_IRQ_MSI_LIB=y # CONFIG_AL_FIC is not set # CONFIG_XILINX_INTC is not set # end of IRQ chip support # CONFIG_IPACK_BUS is not set CONFIG_RESET_CONTROLLER=y # CONFIG_RESET_GPIO is not set # CONFIG_RESET_INTEL_GW is not set # CONFIG_RESET_SIMPLE is not set # CONFIG_RESET_TI_SYSCON is not set # CONFIG_RESET_TI_TPS380X is not set # # PHY Subsystem # CONFIG_GENERIC_PHY=y CONFIG_USB_LGM_PHY=y # CONFIG_PHY_CAN_TRANSCEIVER is not set # CONFIG_PHY_NXP_PTN3222 is not set # # PHY drivers for Broadcom platforms # # CONFIG_BCM_KONA_USB2_PHY is not set # end of PHY drivers for Broadcom platforms # CONFIG_PHY_CADENCE_TORRENT is not set # CONFIG_PHY_CADENCE_DPHY is not set # CONFIG_PHY_CADENCE_DPHY_RX is not set # CONFIG_PHY_CADENCE_SIERRA is not set # CONFIG_PHY_CADENCE_SALVO is not set # CONFIG_PHY_PXA_28NM_HSIC is not set # CONFIG_PHY_PXA_28NM_USB2 is not set CONFIG_PHY_CPCAP_USB=y # CONFIG_PHY_MAPPHONE_MDM6600 is not set # CONFIG_PHY_OCELOT_SERDES is not set CONFIG_PHY_QCOM_USB_HS=y CONFIG_PHY_QCOM_USB_HSIC=y CONFIG_PHY_SAMSUNG_USB2=y CONFIG_PHY_TUSB1210=y # CONFIG_PHY_INTEL_LGM_COMBO is not set # CONFIG_PHY_INTEL_LGM_EMMC is not set # end of PHY Subsystem # CONFIG_POWERCAP is not set # CONFIG_MCB is not set # # Performance monitor support # # CONFIG_DWC_PCIE_PMU is not set # end of Performance monitor support CONFIG_RAS=y CONFIG_USB4=y # CONFIG_USB4_DEBUGFS_WRITE is not set # CONFIG_USB4_DMA_TEST is not set # # Android # CONFIG_ANDROID_BINDER_IPC=y CONFIG_ANDROID_BINDERFS=y CONFIG_ANDROID_BINDER_DEVICES="binder0,binder1" # end of Android CONFIG_LIBNVDIMM=y CONFIG_BLK_DEV_PMEM=y CONFIG_ND_CLAIM=y CONFIG_ND_BTT=y CONFIG_BTT=y CONFIG_ND_PFN=y CONFIG_NVDIMM_PFN=y CONFIG_NVDIMM_DAX=y CONFIG_OF_PMEM=y CONFIG_RAMDAX=y CONFIG_NVDIMM_KEYS=y # CONFIG_NVDIMM_SECURITY_TEST is not set CONFIG_DAX=y CONFIG_NVMEM=y CONFIG_NVMEM_SYSFS=y CONFIG_NVMEM_LAYOUTS=y # # Layout Types # # CONFIG_NVMEM_LAYOUT_SL28_VPD is not set # CONFIG_NVMEM_LAYOUT_ONIE_TLV is not set # CONFIG_NVMEM_LAYOUT_U_BOOT_ENV is not set # end of Layout Types # CONFIG_NVMEM_RMEM is not set # CONFIG_NVMEM_U_BOOT_ENV is not set # # HW tracing support # # CONFIG_STM is not set # CONFIG_INTEL_TH is not set # end of HW tracing support # CONFIG_FPGA is not set # CONFIG_FSI is not set CONFIG_TEE=y CONFIG_TEE_DMABUF_HEAPS=y CONFIG_OPTEE_STATIC_PROTMEM_POOL=y # CONFIG_SIOX is not set # CONFIG_SLIMBUS is not set # CONFIG_INTERCONNECT is not set CONFIG_COUNTER=y # CONFIG_INTEL_QEP is not set # CONFIG_INTERRUPT_CNT is not set CONFIG_MOST=y CONFIG_MOST_USB_HDM=y # CONFIG_MOST_CDEV is not set # CONFIG_MOST_SND is not set # CONFIG_PECI is not set # CONFIG_HTE is not set # end of Device Drivers # # File systems # CONFIG_DCACHE_WORD_ACCESS=y CONFIG_VALIDATE_FS_PARSER=y CONFIG_FS_IOMAP=y CONFIG_FS_STACK=y CONFIG_BUFFER_HEAD=y CONFIG_LEGACY_DIRECT_IO=y # CONFIG_EXT2_FS is not set CONFIG_EXT4_FS=y CONFIG_EXT4_USE_FOR_EXT2=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y # CONFIG_EXT4_DEBUG is not set CONFIG_JBD2=y # CONFIG_JBD2_DEBUG is not set CONFIG_FS_MBCACHE=y CONFIG_JFS_FS=y CONFIG_JFS_POSIX_ACL=y CONFIG_JFS_SECURITY=y CONFIG_JFS_DEBUG=y # CONFIG_JFS_STATISTICS is not set CONFIG_XFS_FS=y # CONFIG_XFS_SUPPORT_V4 is not set # CONFIG_XFS_SUPPORT_ASCII_CI is not set CONFIG_XFS_QUOTA=y CONFIG_XFS_POSIX_ACL=y CONFIG_XFS_RT=y # CONFIG_XFS_ONLINE_SCRUB is not set # CONFIG_XFS_WARN is not set # CONFIG_XFS_DEBUG is not set CONFIG_GFS2_FS=y CONFIG_GFS2_FS_LOCKING_DLM=y CONFIG_OCFS2_FS=y CONFIG_OCFS2_FS_O2CB=y CONFIG_OCFS2_FS_USERSPACE_CLUSTER=y CONFIG_OCFS2_FS_STATS=y # CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_OCFS2_DEBUG_FS=y CONFIG_BTRFS_FS=y CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set # CONFIG_BTRFS_DEBUG is not set CONFIG_BTRFS_ASSERT=y # CONFIG_BTRFS_EXPERIMENTAL is not set CONFIG_NILFS2_FS=y CONFIG_F2FS_FS=y CONFIG_F2FS_STAT_FS=y CONFIG_F2FS_FS_XATTR=y CONFIG_F2FS_FS_POSIX_ACL=y CONFIG_F2FS_FS_SECURITY=y CONFIG_F2FS_CHECK_FS=y CONFIG_F2FS_FAULT_INJECTION=y CONFIG_F2FS_FS_COMPRESSION=y CONFIG_F2FS_FS_LZO=y CONFIG_F2FS_FS_LZORLE=y CONFIG_F2FS_FS_LZ4=y CONFIG_F2FS_FS_LZ4HC=y CONFIG_F2FS_FS_ZSTD=y # CONFIG_F2FS_IOSTAT is not set # CONFIG_F2FS_UNFAIR_RWSEM is not set CONFIG_ZONEFS_FS=y CONFIG_FS_DAX=y CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y CONFIG_EXPORTFS_BLOCK_OPS=y CONFIG_FILE_LOCKING=y CONFIG_FS_ENCRYPTION=y CONFIG_FS_ENCRYPTION_ALGS=y # CONFIG_FS_ENCRYPTION_INLINE_CRYPT is not set CONFIG_FS_VERITY=y CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y CONFIG_FANOTIFY=y CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y CONFIG_QUOTA=y CONFIG_QUOTA_NETLINK_INTERFACE=y # CONFIG_QUOTA_DEBUG is not set CONFIG_QUOTA_TREE=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y CONFIG_QUOTACTL=y CONFIG_AUTOFS_FS=y CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_VIRTIO_FS=y CONFIG_FUSE_DAX=y # CONFIG_FUSE_PASSTHROUGH is not set # CONFIG_FUSE_IO_URING is not set CONFIG_OVERLAY_FS=y CONFIG_OVERLAY_FS_REDIRECT_DIR=y CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y CONFIG_OVERLAY_FS_INDEX=y # CONFIG_OVERLAY_FS_NFS_EXPORT is not set # CONFIG_OVERLAY_FS_XINO_AUTO is not set # CONFIG_OVERLAY_FS_METACOPY is not set CONFIG_OVERLAY_FS_DEBUG=y # # Caches # CONFIG_NETFS_SUPPORT=y # CONFIG_NETFS_STATS is not set # CONFIG_NETFS_DEBUG is not set CONFIG_FSCACHE=y # CONFIG_FSCACHE_STATS is not set CONFIG_CACHEFILES=y # CONFIG_CACHEFILES_DEBUG is not set # CONFIG_CACHEFILES_ERROR_INJECTION is not set # CONFIG_CACHEFILES_ONDEMAND is not set # end of Caches # # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y CONFIG_JOLIET=y CONFIG_ZISOFS=y CONFIG_UDF_FS=y # end of CD-ROM/DVD Filesystems # # DOS/FAT/EXFAT/NT Filesystems # CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_FAT_DEFAULT_UTF8 is not set CONFIG_EXFAT_FS=y CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8" CONFIG_NTFS3_FS=y # CONFIG_NTFS3_64BIT_CLUSTER is not set CONFIG_NTFS3_LZX_XPRESS=y CONFIG_NTFS3_FS_POSIX_ACL=y # CONFIG_NTFS_FS is not set # end of DOS/FAT/EXFAT/NT Filesystems # # Pseudo filesystems # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_VMCORE=y # CONFIG_PROC_VMCORE_DEVICE_DUMP is not set CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_CHILDREN=y CONFIG_PROC_PID_ARCH_STATUS=y CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y # CONFIG_TMPFS_INODE64 is not set CONFIG_TMPFS_QUOTA=y CONFIG_ARCH_SUPPORTS_HUGETLBFS=y CONFIG_HUGETLBFS=y # CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON is not set CONFIG_HUGETLB_PAGE=y CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y CONFIG_ARCH_HAS_GIGANTIC_PAGE=y CONFIG_CONFIGFS_FS=y # end of Pseudo filesystems CONFIG_MISC_FILESYSTEMS=y CONFIG_ORANGEFS_FS=y CONFIG_ADFS_FS=y # CONFIG_ADFS_FS_RW is not set CONFIG_AFFS_FS=y CONFIG_ECRYPT_FS=y CONFIG_ECRYPT_FS_MESSAGING=y CONFIG_HFS_FS=y CONFIG_HFSPLUS_FS=y CONFIG_BEFS_FS=y # CONFIG_BEFS_DEBUG is not set CONFIG_BFS_FS=y CONFIG_EFS_FS=y CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_FS_WBUF_VERIFY is not set CONFIG_JFFS2_SUMMARY=y CONFIG_JFFS2_FS_XATTR=y CONFIG_JFFS2_FS_POSIX_ACL=y CONFIG_JFFS2_FS_SECURITY=y CONFIG_JFFS2_COMPRESSION_OPTIONS=y CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_LZO=y CONFIG_JFFS2_RTIME=y CONFIG_JFFS2_RUBIN=y # CONFIG_JFFS2_CMODE_NONE is not set CONFIG_JFFS2_CMODE_PRIORITY=y # CONFIG_JFFS2_CMODE_SIZE is not set # CONFIG_JFFS2_CMODE_FAVOURLZO is not set CONFIG_UBIFS_FS=y CONFIG_UBIFS_FS_ADVANCED_COMPR=y CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UBIFS_FS_ZSTD=y CONFIG_UBIFS_ATIME_SUPPORT=y CONFIG_UBIFS_FS_XATTR=y CONFIG_UBIFS_FS_SECURITY=y # CONFIG_UBIFS_FS_AUTHENTICATION is not set CONFIG_CRAMFS=y CONFIG_CRAMFS_BLOCKDEV=y CONFIG_CRAMFS_MTD=y CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_FILE_CACHE is not set CONFIG_SQUASHFS_FILE_DIRECT=y CONFIG_SQUASHFS_DECOMP_MULTI=y # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set # CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI=y # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set # CONFIG_SQUASHFS_MOUNT_DECOMP_THREADS is not set CONFIG_SQUASHFS_XATTR=y # CONFIG_SQUASHFS_COMP_CACHE_FULL is not set CONFIG_SQUASHFS_ZLIB=y CONFIG_SQUASHFS_LZ4=y CONFIG_SQUASHFS_LZO=y CONFIG_SQUASHFS_XZ=y CONFIG_SQUASHFS_ZSTD=y CONFIG_SQUASHFS_4K_DEVBLK_SIZE=y # CONFIG_SQUASHFS_EMBEDDED is not set CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 CONFIG_VXFS_FS=y CONFIG_MINIX_FS=y CONFIG_OMFS_FS=y CONFIG_HPFS_FS=y CONFIG_QNX4FS_FS=y CONFIG_QNX6FS_FS=y # CONFIG_QNX6FS_DEBUG is not set CONFIG_ROMFS_FS=y # CONFIG_ROMFS_BACKED_BY_BLOCK is not set # CONFIG_ROMFS_BACKED_BY_MTD is not set CONFIG_ROMFS_BACKED_BY_BOTH=y CONFIG_ROMFS_ON_BLOCK=y CONFIG_ROMFS_ON_MTD=y CONFIG_PSTORE=y CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240 CONFIG_PSTORE_COMPRESS=y # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_RAM is not set # CONFIG_PSTORE_BLK is not set CONFIG_UFS_FS=y CONFIG_UFS_FS_WRITE=y # CONFIG_UFS_DEBUG is not set CONFIG_EROFS_FS=y # CONFIG_EROFS_FS_DEBUG is not set CONFIG_EROFS_FS_XATTR=y CONFIG_EROFS_FS_POSIX_ACL=y CONFIG_EROFS_FS_SECURITY=y # CONFIG_EROFS_FS_BACKED_BY_FILE is not set CONFIG_EROFS_FS_ZIP=y # CONFIG_EROFS_FS_ZIP_LZMA is not set # CONFIG_EROFS_FS_ZIP_DEFLATE is not set # CONFIG_EROFS_FS_ZIP_ZSTD is not set # CONFIG_EROFS_FS_ZIP_ACCEL is not set # CONFIG_EROFS_FS_ONDEMAND is not set # CONFIG_EROFS_FS_PCPU_KTHREAD is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y # CONFIG_NFS_V2 is not set CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y # CONFIG_NFS_SWAP is not set CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=y CONFIG_PNFS_FILE_LAYOUT=y CONFIG_PNFS_BLOCK=y CONFIG_PNFS_FLEXFILE_LAYOUT=y CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" # CONFIG_NFS_V4_1_MIGRATION is not set CONFIG_NFS_V4_SECURITY_LABEL=y CONFIG_ROOT_NFS=y CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y # CONFIG_NFS_DISABLE_UDP_SUPPORT is not set CONFIG_NFS_V4_2_READ_PLUS=y CONFIG_NFSD=y # CONFIG_NFSD_V2 is not set CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y CONFIG_NFSD_PNFS=y CONFIG_NFSD_BLOCKLAYOUT=y CONFIG_NFSD_SCSILAYOUT=y CONFIG_NFSD_FLEXFILELAYOUT=y CONFIG_NFSD_V4_2_INTER_SSC=y CONFIG_NFSD_V4_SECURITY_LABEL=y # CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set # CONFIG_NFSD_V4_DELEG_TIMESTAMPS is not set CONFIG_GRACE_PERIOD=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y # CONFIG_NFS_LOCALIO is not set CONFIG_NFS_V4_2_SSC_HELPER=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_SUNRPC_BACKCHANNEL=y CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA1 is not set # CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA is not set # CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2 is not set # CONFIG_SUNRPC_DEBUG is not set # CONFIG_SUNRPC_XPRT_RDMA is not set CONFIG_CEPH_FS=y CONFIG_CEPH_FSCACHE=y CONFIG_CEPH_FS_POSIX_ACL=y # CONFIG_CEPH_FS_SECURITY_LABEL is not set CONFIG_CIFS=y # CONFIG_CIFS_STATS2 is not set CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y CONFIG_CIFS_UPCALL=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y CONFIG_CIFS_DEBUG=y # CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_DEBUG_DUMP_KEYS is not set CONFIG_CIFS_DFS_UPCALL=y CONFIG_CIFS_SWN_UPCALL=y CONFIG_CIFS_SMB_DIRECT=y CONFIG_CIFS_FSCACHE=y # CONFIG_CIFS_ROOT is not set # CONFIG_CIFS_COMPRESSION is not set CONFIG_SMB_SERVER=y # CONFIG_SMB_SERVER_SMBDIRECT is not set # CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set # CONFIG_SMB_SERVER_KERBEROS5 is not set CONFIG_SMBFS=y # CONFIG_CODA_FS is not set CONFIG_AFS_FS=y # CONFIG_AFS_DEBUG is not set CONFIG_AFS_FSCACHE=y # CONFIG_AFS_DEBUG_CURSOR is not set CONFIG_9P_FS=y CONFIG_9P_FSCACHE=y CONFIG_9P_FS_POSIX_ACL=y CONFIG_9P_FS_SECURITY=y CONFIG_NLS=y CONFIG_NLS_DEFAULT="utf8" CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_737=y CONFIG_NLS_CODEPAGE_775=y CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_CODEPAGE_852=y CONFIG_NLS_CODEPAGE_855=y CONFIG_NLS_CODEPAGE_857=y CONFIG_NLS_CODEPAGE_860=y CONFIG_NLS_CODEPAGE_861=y CONFIG_NLS_CODEPAGE_862=y CONFIG_NLS_CODEPAGE_863=y CONFIG_NLS_CODEPAGE_864=y CONFIG_NLS_CODEPAGE_865=y CONFIG_NLS_CODEPAGE_866=y CONFIG_NLS_CODEPAGE_869=y CONFIG_NLS_CODEPAGE_936=y CONFIG_NLS_CODEPAGE_950=y CONFIG_NLS_CODEPAGE_932=y CONFIG_NLS_CODEPAGE_949=y CONFIG_NLS_CODEPAGE_874=y CONFIG_NLS_ISO8859_8=y CONFIG_NLS_CODEPAGE_1250=y CONFIG_NLS_CODEPAGE_1251=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_2=y CONFIG_NLS_ISO8859_3=y CONFIG_NLS_ISO8859_4=y CONFIG_NLS_ISO8859_5=y CONFIG_NLS_ISO8859_6=y CONFIG_NLS_ISO8859_7=y CONFIG_NLS_ISO8859_9=y CONFIG_NLS_ISO8859_13=y CONFIG_NLS_ISO8859_14=y CONFIG_NLS_ISO8859_15=y CONFIG_NLS_KOI8_R=y CONFIG_NLS_KOI8_U=y CONFIG_NLS_MAC_ROMAN=y CONFIG_NLS_MAC_CELTIC=y CONFIG_NLS_MAC_CENTEURO=y CONFIG_NLS_MAC_CROATIAN=y CONFIG_NLS_MAC_CYRILLIC=y CONFIG_NLS_MAC_GAELIC=y CONFIG_NLS_MAC_GREEK=y CONFIG_NLS_MAC_ICELAND=y CONFIG_NLS_MAC_INUIT=y CONFIG_NLS_MAC_ROMANIAN=y CONFIG_NLS_MAC_TURKISH=y CONFIG_NLS_UTF8=y CONFIG_NLS_UCS2_UTILS=y CONFIG_DLM=y # CONFIG_DLM_DEBUG is not set CONFIG_UNICODE=y CONFIG_IO_WQ=y # end of File systems # # Security options # CONFIG_KEYS=y CONFIG_KEYS_REQUEST_CACHE=y CONFIG_PERSISTENT_KEYRINGS=y CONFIG_BIG_KEYS=y CONFIG_TRUSTED_KEYS=y # CONFIG_TRUSTED_KEYS_TPM is not set # CONFIG_TRUSTED_KEYS_TEE is not set # # No trust source selected! # CONFIG_ENCRYPTED_KEYS=y # CONFIG_USER_DECRYPTED_DATA is not set CONFIG_KEY_DH_OPERATIONS=y CONFIG_KEY_NOTIFICATIONS=y # CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_PROC_MEM_ALWAYS_FORCE=y # CONFIG_PROC_MEM_FORCE_PTRACE is not set # CONFIG_PROC_MEM_NO_FORCE is not set CONFIG_SECURITY=y CONFIG_HAS_SECURITY_AUDIT=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_INFINIBAND=y CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_PATH=y # CONFIG_INTEL_TXT is not set # CONFIG_STATIC_USERMODEHELPER is not set # CONFIG_SECURITY_SELINUX is not set CONFIG_SECURITY_SMACK=y # CONFIG_SECURITY_SMACK_BRINGUP is not set CONFIG_SECURITY_SMACK_NETFILTER=y # CONFIG_SECURITY_SMACK_APPEND_SIGNALS is not set CONFIG_SECURITY_TOMOYO=y CONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=64 CONFIG_SECURITY_TOMOYO_MAX_AUDIT_LOG=32 CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER=y CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING=y # CONFIG_SECURITY_APPARMOR is not set # CONFIG_SECURITY_LOADPIN is not set CONFIG_SECURITY_YAMA=y CONFIG_SECURITY_SAFESETID=y CONFIG_SECURITY_LOCKDOWN_LSM=y CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y # CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set # CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set CONFIG_SECURITY_LANDLOCK=y # CONFIG_SECURITY_IPE is not set CONFIG_INTEGRITY=y CONFIG_INTEGRITY_SIGNATURE=y CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y CONFIG_INTEGRITY_TRUSTED_KEYRING=y CONFIG_INTEGRITY_AUDIT=y CONFIG_IMA=y CONFIG_IMA_MEASURE_PCR_IDX=10 CONFIG_IMA_LSM_RULES=y CONFIG_IMA_NG_TEMPLATE=y # CONFIG_IMA_SIG_TEMPLATE is not set CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng" # CONFIG_IMA_DEFAULT_HASH_SHA1 is not set CONFIG_IMA_DEFAULT_HASH_SHA256=y # CONFIG_IMA_DEFAULT_HASH_SHA512 is not set # CONFIG_IMA_DEFAULT_HASH_WP512 is not set CONFIG_IMA_DEFAULT_HASH="sha256" CONFIG_IMA_WRITE_POLICY=y CONFIG_IMA_READ_POLICY=y CONFIG_IMA_APPRAISE=y # CONFIG_IMA_ARCH_POLICY is not set # CONFIG_IMA_APPRAISE_BUILD_POLICY is not set # CONFIG_IMA_APPRAISE_BOOTPARAM is not set CONFIG_IMA_APPRAISE_MODSIG=y # CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY is not set # CONFIG_IMA_BLACKLIST_KEYRING is not set # CONFIG_IMA_LOAD_X509 is not set CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS=y CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS=y # CONFIG_IMA_DISABLE_HTABLE is not set CONFIG_EVM=y CONFIG_EVM_ATTR_FSUUID=y CONFIG_EVM_EXTRA_SMACK_XATTRS=y CONFIG_EVM_ADD_XATTRS=y # CONFIG_EVM_LOAD_X509 is not set CONFIG_DEFAULT_SECURITY_SMACK=y # CONFIG_DEFAULT_SECURITY_TOMOYO is not set # CONFIG_DEFAULT_SECURITY_DAC is not set CONFIG_LSM="landlock,lockdown,yama,safesetid,integrity,tomoyo,smack,bpf" # # Kernel hardening options # # # Memory initialization # CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y # CONFIG_INIT_STACK_NONE is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set CONFIG_INIT_STACK_ALL_ZERO=y CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y # CONFIG_ZERO_CALL_USED_REGS is not set # end of Memory initialization # # Bounds checking # CONFIG_FORTIFY_SOURCE=y CONFIG_HARDENED_USERCOPY=y # CONFIG_HARDENED_USERCOPY_DEFAULT_ON is not set # end of Bounds checking # # Hardening of kernel data structures # CONFIG_LIST_HARDENED=y CONFIG_BUG_ON_DATA_CORRUPTION=y # end of Hardening of kernel data structures CONFIG_CC_HAS_RANDSTRUCT=y CONFIG_RANDSTRUCT_NONE=y # CONFIG_RANDSTRUCT_FULL is not set # end of Kernel hardening options # end of Security options CONFIG_XOR_BLOCKS=y CONFIG_ASYNC_CORE=y CONFIG_ASYNC_MEMCPY=y CONFIG_ASYNC_XOR=y CONFIG_ASYNC_PQ=y CONFIG_ASYNC_RAID6_RECOV=y CONFIG_CRYPTO=y # # Crypto core or helper # CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_SIG=y CONFIG_CRYPTO_SIG2=y CONFIG_CRYPTO_SKCIPHER=y CONFIG_CRYPTO_SKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_USER=y # CONFIG_CRYPTO_SELFTESTS is not set # CONFIG_CRYPTO_NULL is not set CONFIG_CRYPTO_PCRYPT=y CONFIG_CRYPTO_CRYPTD=y CONFIG_CRYPTO_AUTHENC=y CONFIG_CRYPTO_KRB5ENC=y # CONFIG_CRYPTO_BENCHMARK is not set CONFIG_CRYPTO_ENGINE=y # end of Crypto core or helper # # Public-key cryptography # CONFIG_CRYPTO_RSA=y CONFIG_CRYPTO_DH=y # CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set CONFIG_CRYPTO_ECC=y CONFIG_CRYPTO_ECDH=y CONFIG_CRYPTO_ECDSA=y CONFIG_CRYPTO_ECRDSA=y # end of Public-key cryptography # # Block ciphers # CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES_TI=y CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_ARIA=y CONFIG_CRYPTO_BLOWFISH=y CONFIG_CRYPTO_BLOWFISH_COMMON=y CONFIG_CRYPTO_CAMELLIA=y CONFIG_CRYPTO_CAST_COMMON=y CONFIG_CRYPTO_CAST5=y CONFIG_CRYPTO_CAST6=y CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_FCRYPT=y CONFIG_CRYPTO_KHAZAD=y CONFIG_CRYPTO_SEED=y CONFIG_CRYPTO_SERPENT=y CONFIG_CRYPTO_SM4=y CONFIG_CRYPTO_SM4_GENERIC=y CONFIG_CRYPTO_TEA=y CONFIG_CRYPTO_TWOFISH=y CONFIG_CRYPTO_TWOFISH_COMMON=y # end of Block ciphers # # Length-preserving ciphers and modes # CONFIG_CRYPTO_ADIANTUM=y CONFIG_CRYPTO_ARC4=y CONFIG_CRYPTO_CHACHA20=y CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_CTS=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_HCTR2=y CONFIG_CRYPTO_LRW=y CONFIG_CRYPTO_PCBC=y CONFIG_CRYPTO_XCTR=y CONFIG_CRYPTO_XTS=y CONFIG_CRYPTO_NHPOLY1305=y # end of Length-preserving ciphers and modes # # AEAD (authenticated encryption with associated data) ciphers # CONFIG_CRYPTO_AEGIS128=y CONFIG_CRYPTO_CHACHA20POLY1305=y CONFIG_CRYPTO_CCM=y CONFIG_CRYPTO_GCM=y CONFIG_CRYPTO_GENIV=y CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_ECHAINIV=y CONFIG_CRYPTO_ESSIV=y # end of AEAD (authenticated encryption with associated data) ciphers # # Hashes, digests, and MACs # CONFIG_CRYPTO_BLAKE2B=y CONFIG_CRYPTO_CMAC=y CONFIG_CRYPTO_GHASH=y CONFIG_CRYPTO_HMAC=y # CONFIG_CRYPTO_MD4 is not set CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_RMD160=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA3=y # CONFIG_CRYPTO_SM3_GENERIC is not set CONFIG_CRYPTO_STREEBOG=y CONFIG_CRYPTO_WP512=y CONFIG_CRYPTO_XCBC=y CONFIG_CRYPTO_XXHASH=y # end of Hashes, digests, and MACs # # CRCs (cyclic redundancy checks) # CONFIG_CRYPTO_CRC32C=y # CONFIG_CRYPTO_CRC32 is not set # end of CRCs (cyclic redundancy checks) # # Compression # CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_842=y CONFIG_CRYPTO_LZ4=y CONFIG_CRYPTO_LZ4HC=y CONFIG_CRYPTO_ZSTD=y # end of Compression # # Random number generation # CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_HASH=y CONFIG_CRYPTO_DRBG_CTR=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64 CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32 CONFIG_CRYPTO_JITTERENTROPY_OSR=1 CONFIG_CRYPTO_KDF800108_CTR=y CONFIG_CRYPTO_DF80090A=y # end of Random number generation # # Userspace interface # CONFIG_CRYPTO_USER_API=y CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_USER_API_SKCIPHER=y CONFIG_CRYPTO_USER_API_RNG=y # CONFIG_CRYPTO_USER_API_RNG_CAVP is not set CONFIG_CRYPTO_USER_API_AEAD=y CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y # end of Userspace interface # # Accelerated Cryptographic Algorithms for CPU (x86) # CONFIG_CRYPTO_AES_NI_INTEL=y CONFIG_CRYPTO_BLOWFISH_X86_64=y CONFIG_CRYPTO_CAMELLIA_X86_64=y CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=y CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=y CONFIG_CRYPTO_CAST5_AVX_X86_64=y CONFIG_CRYPTO_CAST6_AVX_X86_64=y CONFIG_CRYPTO_DES3_EDE_X86_64=y CONFIG_CRYPTO_SERPENT_SSE2_X86_64=y CONFIG_CRYPTO_SERPENT_AVX_X86_64=y CONFIG_CRYPTO_SERPENT_AVX2_X86_64=y CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64=y CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64=y CONFIG_CRYPTO_TWOFISH_X86_64=y CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=y CONFIG_CRYPTO_TWOFISH_AVX_X86_64=y CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64=y # CONFIG_CRYPTO_ARIA_AESNI_AVX2_X86_64 is not set # CONFIG_CRYPTO_ARIA_GFNI_AVX512_X86_64 is not set CONFIG_CRYPTO_AEGIS128_AESNI_SSE2=y CONFIG_CRYPTO_NHPOLY1305_SSE2=y CONFIG_CRYPTO_NHPOLY1305_AVX2=y CONFIG_CRYPTO_SM3_AVX_X86_64=y CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=y # end of Accelerated Cryptographic Algorithms for CPU (x86) CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=y CONFIG_CRYPTO_DEV_PADLOCK_AES=y CONFIG_CRYPTO_DEV_PADLOCK_SHA=y # CONFIG_CRYPTO_DEV_ATMEL_ECC is not set # CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=y # CONFIG_CRYPTO_DEV_SP_CCP is not set # CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set CONFIG_CRYPTO_DEV_QAT=y CONFIG_CRYPTO_DEV_QAT_DH895xCC=y CONFIG_CRYPTO_DEV_QAT_C3XXX=y CONFIG_CRYPTO_DEV_QAT_C62X=y # CONFIG_CRYPTO_DEV_QAT_4XXX is not set # CONFIG_CRYPTO_DEV_QAT_420XX is not set # CONFIG_CRYPTO_DEV_QAT_6XXX is not set CONFIG_CRYPTO_DEV_QAT_DH895xCCVF=y CONFIG_CRYPTO_DEV_QAT_C3XXXVF=y CONFIG_CRYPTO_DEV_QAT_C62XVF=y # CONFIG_CRYPTO_DEV_QAT_ERROR_INJECTION is not set CONFIG_CRYPTO_DEV_VIRTIO=y # CONFIG_CRYPTO_DEV_SAFEXCEL is not set # CONFIG_CRYPTO_DEV_CCREE is not set # CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set CONFIG_ASYMMETRIC_KEY_TYPE=y CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y CONFIG_X509_CERTIFICATE_PARSER=y CONFIG_PKCS8_PRIVATE_KEY_PARSER=y CONFIG_PKCS7_MESSAGE_PARSER=y CONFIG_PKCS7_TEST_KEY=y CONFIG_SIGNED_PE_FILE_VERIFICATION=y # CONFIG_FIPS_SIGNATURE_SELFTEST is not set # # Certificates for signature checking # CONFIG_MODULE_SIG_KEY="certs/signing_key.pem" # CONFIG_MODULE_SIG_KEY_TYPE_RSA is not set CONFIG_MODULE_SIG_KEY_TYPE_ECDSA=y CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" # CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set CONFIG_SECONDARY_TRUSTED_KEYRING=y # CONFIG_SECONDARY_TRUSTED_KEYRING_SIGNED_BY_BUILTIN is not set # CONFIG_SYSTEM_BLACKLIST_KEYRING is not set # end of Certificates for signature checking CONFIG_CRYPTO_KRB5=y # CONFIG_CRYPTO_KRB5_SELFTESTS is not set CONFIG_BINARY_PRINTF=y # # Library routines # CONFIG_RAID6_PQ=y # CONFIG_RAID6_PQ_BENCHMARK is not set CONFIG_LINEAR_RANGES=y # CONFIG_PACKING is not set CONFIG_BITREVERSE=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_NET_UTILS=y # CONFIG_CORDIC is not set # CONFIG_PRIME_NUMBERS is not set CONFIG_RATIONAL=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_HAS_FAST_MULTIPLIER=y CONFIG_ARCH_USE_SYM_ANNOTATIONS=y CONFIG_CRC8=y CONFIG_CRC16=y CONFIG_CRC_CCITT=y CONFIG_CRC_ITU_T=y CONFIG_CRC_T10DIF=y CONFIG_CRC_T10DIF_ARCH=y CONFIG_CRC32=y CONFIG_CRC32_ARCH=y CONFIG_CRC64=y CONFIG_CRC64_ARCH=y CONFIG_CRC_OPTIMIZATIONS=y # # Crypto library routines # CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LIB_UTILS=y CONFIG_CRYPTO_LIB_AES=y CONFIG_CRYPTO_LIB_ARC4=y CONFIG_CRYPTO_LIB_GF128MUL=y CONFIG_CRYPTO_LIB_BLAKE2B=y CONFIG_CRYPTO_LIB_BLAKE2S_ARCH=y CONFIG_CRYPTO_LIB_CHACHA=y CONFIG_CRYPTO_LIB_CHACHA_ARCH=y CONFIG_CRYPTO_LIB_CURVE25519=y CONFIG_CRYPTO_LIB_CURVE25519_ARCH=y CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LIB_MD5=y CONFIG_CRYPTO_LIB_POLY1305=y CONFIG_CRYPTO_LIB_POLY1305_ARCH=y CONFIG_CRYPTO_LIB_POLY1305_GENERIC=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11 CONFIG_CRYPTO_LIB_POLYVAL=y CONFIG_CRYPTO_LIB_POLYVAL_ARCH=y CONFIG_CRYPTO_LIB_CHACHA20POLY1305=y CONFIG_CRYPTO_LIB_SHA1=y CONFIG_CRYPTO_LIB_SHA1_ARCH=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LIB_SHA256_ARCH=y CONFIG_CRYPTO_LIB_SHA512=y CONFIG_CRYPTO_LIB_SHA512_ARCH=y CONFIG_CRYPTO_LIB_SHA3=y CONFIG_CRYPTO_LIB_SM3=y # end of Crypto library routines CONFIG_XXHASH=y # CONFIG_RANDOM32_SELFTEST is not set CONFIG_842_COMPRESS=y CONFIG_842_DECOMPRESS=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_LZ4_COMPRESS=y CONFIG_LZ4HC_COMPRESS=y CONFIG_LZ4_DECOMPRESS=y CONFIG_ZSTD_COMMON=y CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_DECOMPRESS=y CONFIG_XZ_DEC=y CONFIG_XZ_DEC_X86=y CONFIG_XZ_DEC_POWERPC=y CONFIG_XZ_DEC_ARM=y CONFIG_XZ_DEC_ARMTHUMB=y CONFIG_XZ_DEC_ARM64=y CONFIG_XZ_DEC_SPARC=y CONFIG_XZ_DEC_RISCV=y # CONFIG_XZ_DEC_MICROLZMA is not set CONFIG_XZ_DEC_BCJ=y # CONFIG_XZ_DEC_TEST is not set CONFIG_DECOMPRESS_GZIP=y CONFIG_DECOMPRESS_BZIP2=y CONFIG_DECOMPRESS_LZMA=y CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_LZO=y CONFIG_DECOMPRESS_LZ4=y CONFIG_DECOMPRESS_ZSTD=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON_DEC8=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=y CONFIG_TEXTSEARCH_BM=y CONFIG_TEXTSEARCH_FSM=y CONFIG_INTERVAL_TREE=y CONFIG_INTERVAL_TREE_SPAN_ITER=y CONFIG_XARRAY_MULTI=y CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_CLOSURES=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y CONFIG_DMA_OPS_HELPERS=y CONFIG_NEED_SG_DMA_FLAGS=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_DMA_DECLARE_COHERENT=y CONFIG_SWIOTLB=y # CONFIG_SWIOTLB_DYNAMIC is not set CONFIG_DMA_NEED_SYNC=y # CONFIG_DMA_RESTRICTED_POOL is not set CONFIG_DMA_CMA=y # CONFIG_DMA_NUMA_CMA is not set # # Default contiguous memory area size: # CONFIG_CMA_SIZE_MBYTES=0 CONFIG_CMA_SIZE_PERCENTAGE=0 # CONFIG_CMA_SIZE_SEL_MBYTES is not set # CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set # CONFIG_CMA_SIZE_SEL_MIN is not set CONFIG_CMA_SIZE_SEL_MAX=y CONFIG_CMA_ALIGNMENT=8 # CONFIG_DMA_API_DEBUG is not set # CONFIG_DMA_MAP_BENCHMARK is not set CONFIG_SGL_ALLOC=y CONFIG_CHECK_SIGNATURE=y # CONFIG_CPUMASK_OFFSTACK is not set CONFIG_CPU_RMAP=y CONFIG_DQL=y CONFIG_GLOB=y # CONFIG_GLOB_SELFTEST is not set CONFIG_NLATTR=y CONFIG_CLZ_TAB=y CONFIG_IRQ_POLL=y CONFIG_MPILIB=y CONFIG_SIGNATURE=y CONFIG_DIMLIB=y CONFIG_LIBFDT=y CONFIG_OID_REGISTRY=y CONFIG_HAVE_GENERIC_VDSO=y CONFIG_GENERIC_GETTIMEOFDAY=y CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT=y CONFIG_VDSO_GETRANDOM=y CONFIG_FONT_SUPPORT=y # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y CONFIG_SG_POOL=y CONFIG_ARCH_HAS_PMEM_API=y CONFIG_MEMREGION=y CONFIG_ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION=y CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y CONFIG_ARCH_HAS_COPY_MC=y CONFIG_ARCH_STACKWALK=y CONFIG_STACKDEPOT=y CONFIG_STACKDEPOT_ALWAYS_INIT=y CONFIG_STACKDEPOT_MAX_FRAMES=64 CONFIG_REF_TRACKER=y CONFIG_SBITMAP=y # CONFIG_LWQ_TEST is not set # end of Library routines CONFIG_FIRMWARE_TABLE=y CONFIG_UNION_FIND=y # # Kernel hacking # # # printk and dmesg options # CONFIG_PRINTK_TIME=y CONFIG_PRINTK_CALLER=y # CONFIG_STACKTRACE_BUILD_ID is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set CONFIG_DYNAMIC_DEBUG=y CONFIG_DYNAMIC_DEBUG_CORE=y CONFIG_SYMBOLIC_ERRNAME=y CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_BUGVERBOSE_DETAILED is not set # end of printk and dmesg options CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_MISC=y # # Compile-time checks and compiler options # CONFIG_DEBUG_INFO=y CONFIG_AS_HAS_NON_CONST_ULEB128=y # CONFIG_DEBUG_INFO_NONE is not set # CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_DWARF5 is not set # CONFIG_DEBUG_INFO_REDUCED is not set CONFIG_DEBUG_INFO_COMPRESSED_NONE=y # CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set # CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set # CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_INFO_BTF is not set CONFIG_PAHOLE_HAS_SPLIT_BTF=y CONFIG_PAHOLE_HAS_BTF_TAG=y CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y # CONFIG_GDB_SCRIPTS is not set CONFIG_FRAME_WARN=2048 # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_HEADERS_INSTALL is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y # CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set CONFIG_OBJTOOL=y # CONFIG_OBJTOOL_WERROR is not set CONFIG_NOINSTR_VALIDATION=y # CONFIG_VMLINUX_MAP is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set # end of Compile-time checks and compiler options # # Generic Kernel Debugging Instruments # # CONFIG_MAGIC_SYSRQ is not set CONFIG_DEBUG_FS=y CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_FS_ALLOW_NONE is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set CONFIG_ARCH_HAS_UBSAN=y CONFIG_UBSAN=y # CONFIG_UBSAN_TRAP is not set CONFIG_CC_HAS_UBSAN_ARRAY_BOUNDS=y CONFIG_UBSAN_BOUNDS=y CONFIG_UBSAN_ARRAY_BOUNDS=y CONFIG_UBSAN_SHIFT=y # CONFIG_UBSAN_BOOL is not set # CONFIG_UBSAN_ENUM is not set # CONFIG_UBSAN_ALIGNMENT is not set # CONFIG_TEST_UBSAN is not set CONFIG_HAVE_ARCH_KCSAN=y CONFIG_HAVE_KCSAN_COMPILER=y # end of Generic Kernel Debugging Instruments # # Networking Debugging # CONFIG_NET_DEV_REFCNT_TRACKER=y CONFIG_NET_NS_REFCNT_TRACKER=y CONFIG_DEBUG_NET=y # CONFIG_DEBUG_NET_SMALL_RTNL is not set # end of Networking Debugging # # Memory Debugging # CONFIG_PAGE_EXTENSION=y # CONFIG_DEBUG_PAGEALLOC is not set CONFIG_SLUB_DEBUG=y # CONFIG_SLUB_DEBUG_ON is not set CONFIG_SLUB_RCU_DEBUG=y CONFIG_PAGE_OWNER=y CONFIG_PAGE_TABLE_CHECK=y CONFIG_PAGE_TABLE_CHECK_ENFORCED=y CONFIG_PAGE_POISONING=y # CONFIG_DEBUG_PAGE_REF is not set # CONFIG_DEBUG_RODATA_TEST is not set CONFIG_ARCH_HAS_DEBUG_WX=y CONFIG_DEBUG_WX=y CONFIG_ARCH_HAS_PTDUMP=y CONFIG_PTDUMP=y CONFIG_PTDUMP_DEBUGFS=y CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set # CONFIG_PER_VMA_LOCK_STATS is not set CONFIG_DEBUG_OBJECTS=y # CONFIG_DEBUG_OBJECTS_SELFTEST is not set CONFIG_DEBUG_OBJECTS_FREE=y CONFIG_DEBUG_OBJECTS_TIMERS=y CONFIG_DEBUG_OBJECTS_WORK=y CONFIG_DEBUG_OBJECTS_RCU_HEAD=y CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 # CONFIG_SHRINKER_DEBUG is not set CONFIG_DEBUG_STACK_USAGE=y CONFIG_SCHED_STACK_END_CHECK=y CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y CONFIG_DEBUG_VFS=y CONFIG_DEBUG_VM=y CONFIG_DEBUG_VM_MAPLE_TREE=y CONFIG_DEBUG_VM_RB=y CONFIG_DEBUG_VM_PGFLAGS=y CONFIG_DEBUG_VM_PGTABLE=y CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y CONFIG_DEBUG_VIRTUAL=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DEBUG_PER_CPU_MAPS=y CONFIG_DEBUG_KMAP_LOCAL=y CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y # CONFIG_MEM_ALLOC_PROFILING is not set CONFIG_HAVE_ARCH_KASAN=y CONFIG_HAVE_ARCH_KASAN_VMALLOC=y CONFIG_CC_HAS_KASAN_GENERIC=y CONFIG_CC_HAS_KASAN_SW_TAGS=y CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y CONFIG_KASAN=y CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y CONFIG_KASAN_GENERIC=y # CONFIG_KASAN_OUTLINE is not set CONFIG_KASAN_INLINE=y CONFIG_KASAN_STACK=y CONFIG_KASAN_VMALLOC=y # CONFIG_KASAN_EXTRA_INFO is not set CONFIG_HAVE_ARCH_KFENCE=y CONFIG_KFENCE=y CONFIG_KFENCE_SAMPLE_INTERVAL=100 CONFIG_KFENCE_NUM_OBJECTS=255 # CONFIG_KFENCE_DEFERRABLE is not set CONFIG_KFENCE_STATIC_KEYS=y CONFIG_KFENCE_STRESS_TEST_FAULTS=0 CONFIG_HAVE_ARCH_KMSAN=y CONFIG_HAVE_KMSAN_COMPILER=y # end of Memory Debugging # CONFIG_DEBUG_SHIRQ is not set # # Debug Oops, Lockups and Hangs # CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_TIMEOUT=86400 CONFIG_LOCKUP_DETECTOR=y CONFIG_SOFTLOCKUP_DETECTOR=y # CONFIG_SOFTLOCKUP_DETECTOR_INTR_STORM is not set CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y CONFIG_HARDLOCKUP_DETECTOR=y # CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY is not set CONFIG_HARDLOCKUP_DETECTOR_PERF=y # CONFIG_HARDLOCKUP_DETECTOR_BUDDY is not set # CONFIG_HARDLOCKUP_DETECTOR_ARCH is not set CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=140 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 CONFIG_WQ_WATCHDOG=y # CONFIG_WQ_CPU_INTENSIVE_REPORT is not set # CONFIG_TEST_LOCKUP is not set # end of Debug Oops, Lockups and Hangs # # Scheduler Debugging # CONFIG_SCHED_INFO=y CONFIG_SCHEDSTATS=y # end of Scheduler Debugging CONFIG_DEBUG_PREEMPT=y # # Lock Debugging (spinlocks, mutexes, etc...) # CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_PROVE_LOCKING=y CONFIG_PROVE_RAW_LOCK_NESTING=y # CONFIG_LOCK_STAT is not set CONFIG_DEBUG_RT_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_LOCKDEP=y CONFIG_LOCKDEP_BITS=20 CONFIG_LOCKDEP_CHAINS_BITS=20 CONFIG_LOCKDEP_STACK_TRACE_BITS=20 CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14 CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12 # CONFIG_DEBUG_LOCKDEP is not set CONFIG_DEBUG_ATOMIC_SLEEP=y # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set # CONFIG_WW_MUTEX_SELFTEST is not set # CONFIG_SCF_TORTURE_TEST is not set CONFIG_CSD_LOCK_WAIT_DEBUG=y # CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT is not set # end of Lock Debugging (spinlocks, mutexes, etc...) CONFIG_TRACE_IRQFLAGS=y CONFIG_TRACE_IRQFLAGS_NMI=y CONFIG_NMI_CHECK_CPU=y CONFIG_DEBUG_IRQFLAGS=y CONFIG_STACKTRACE=y # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_KOBJECT_RELEASE is not set # # Debug kernel data structures # CONFIG_DEBUG_LIST=y CONFIG_DEBUG_PLIST=y CONFIG_DEBUG_SG=y CONFIG_DEBUG_NOTIFIERS=y # CONFIG_DEBUG_CLOSURES is not set CONFIG_DEBUG_MAPLE_TREE=y # end of Debug kernel data structures # # RCU Debugging # CONFIG_PROVE_RCU=y # CONFIG_RCU_SCALE_TEST is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_REF_SCALE_TEST is not set CONFIG_RCU_CPU_STALL_TIMEOUT=100 CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0 # CONFIG_RCU_CPU_STALL_CPUTIME is not set # CONFIG_RCU_TRACE is not set CONFIG_RCU_EQS_DEBUG=y # end of RCU Debugging # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set # CONFIG_LATENCYTOP is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y CONFIG_HAVE_RETHOOK=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_HAVE_FTRACE_REGS_HAVING_PT_REGS=y CONFIG_HAVE_DYNAMIC_FTRACE_NO_PATCHABLE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_JMP=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_FENTRY=y CONFIG_HAVE_OBJTOOL_MCOUNT=y CONFIG_HAVE_OBJTOOL_NOP_MCOUNT=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y CONFIG_TRACE_CLOCK=y CONFIG_RING_BUFFER=y CONFIG_EVENT_TRACING=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_PREEMPTIRQ_TRACEPOINTS=y CONFIG_TRACING=y CONFIG_GENERIC_TRACER=y CONFIG_TRACING_SUPPORT=y CONFIG_FTRACE=y CONFIG_TRACEFS_AUTOMOUNT_DEPRECATED=y # CONFIG_BOOTTIME_TRACING is not set # CONFIG_FUNCTION_TRACER is not set # CONFIG_STACK_TRACER is not set # CONFIG_IRQSOFF_TRACER is not set # CONFIG_PREEMPT_TRACER is not set # CONFIG_SCHED_TRACER is not set # CONFIG_HWLAT_TRACER is not set # CONFIG_OSNOISE_TRACER is not set # CONFIG_TIMERLAT_TRACER is not set # CONFIG_MMIOTRACE is not set # CONFIG_FTRACE_SYSCALLS is not set # CONFIG_TRACER_SNAPSHOT is not set CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set CONFIG_BLK_DEV_IO_TRACE=y CONFIG_UPROBE_EVENTS=y CONFIG_EPROBE_EVENTS=y CONFIG_BPF_EVENTS=y CONFIG_DYNAMIC_EVENTS=y CONFIG_PROBE_EVENTS=y # CONFIG_SYNTH_EVENTS is not set # CONFIG_USER_EVENTS is not set # CONFIG_HIST_TRIGGERS is not set CONFIG_TRACE_EVENT_INJECT=y # CONFIG_TRACEPOINT_BENCHMARK is not set # CONFIG_RING_BUFFER_BENCHMARK is not set # CONFIG_TRACE_EVAL_MAP_FILE is not set # CONFIG_FTRACE_STARTUP_TEST is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS=y # CONFIG_PREEMPTIRQ_DELAY_TEST is not set # CONFIG_RV is not set CONFIG_PROVIDE_OHCI1394_DMA_INIT=y # CONFIG_SAMPLES is not set CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y # CONFIG_STRICT_DEVMEM is not set # # x86 Debugging # CONFIG_EARLY_PRINTK_USB=y CONFIG_X86_VERBOSE_BOOTUP=y CONFIG_EARLY_PRINTK=y CONFIG_EARLY_PRINTK_DBGP=y # CONFIG_EARLY_PRINTK_USB_XDBC is not set # CONFIG_DEBUG_TLBFLUSH is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y # CONFIG_X86_DECODER_SELFTEST is not set CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEBUG_BOOT_PARAMS=y # CONFIG_CPA_DEBUG is not set CONFIG_DEBUG_ENTRY=y # CONFIG_DEBUG_NMI_SELFTEST is not set CONFIG_X86_DEBUG_FPU=y # CONFIG_PUNIT_ATOM_DEBUG is not set CONFIG_UNWINDER_ORC=y # CONFIG_UNWINDER_FRAME_POINTER is not set # end of x86 Debugging # # Kernel Testing and Coverage # # CONFIG_KUNIT is not set # CONFIG_NOTIFIER_ERROR_INJECTION is not set CONFIG_FAULT_INJECTION=y CONFIG_FAILSLAB=y CONFIG_FAIL_PAGE_ALLOC=y CONFIG_FAULT_INJECTION_USERCOPY=y CONFIG_FAIL_MAKE_REQUEST=y CONFIG_FAIL_IO_TIMEOUT=y CONFIG_FAIL_FUTEX=y CONFIG_FAULT_INJECTION_DEBUG_FS=y # CONFIG_FAIL_MMC_REQUEST is not set # CONFIG_FAIL_SKB_REALLOC is not set CONFIG_FAULT_INJECTION_CONFIGFS=y # CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set CONFIG_ARCH_HAS_KCOV=y CONFIG_KCOV=y CONFIG_KCOV_ENABLE_COMPARISONS=y CONFIG_KCOV_INSTRUMENT_ALL=y CONFIG_KCOV_IRQ_AREA_SIZE=0x40000 # CONFIG_KCOV_SELFTEST is not set CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_TEST_DHRY is not set # CONFIG_LKDTM is not set # CONFIG_TEST_MIN_HEAP is not set # CONFIG_TEST_DIV64 is not set # CONFIG_TEST_MULDIV64 is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_TEST_REF_TRACKER is not set # CONFIG_RBTREE_TEST is not set # CONFIG_REED_SOLOMON_TEST is not set # CONFIG_INTERVAL_TREE_TEST is not set # CONFIG_PERCPU_TEST is not set # CONFIG_ATOMIC64_SELFTEST is not set # CONFIG_ASYNC_RAID6_TEST is not set # CONFIG_TEST_HEXDUMP is not set # CONFIG_TEST_KSTRTOX is not set # CONFIG_TEST_BITMAP is not set # CONFIG_TEST_UUID is not set # CONFIG_TEST_XARRAY is not set # CONFIG_TEST_MAPLE_TREE is not set # CONFIG_TEST_RHASHTABLE is not set # CONFIG_TEST_IDA is not set # CONFIG_TEST_LKM is not set # CONFIG_TEST_BITOPS is not set # CONFIG_TEST_VMALLOC is not set # CONFIG_TEST_BPF is not set # CONFIG_FIND_BIT_BENCHMARK is not set # CONFIG_TEST_FIRMWARE is not set # CONFIG_TEST_SYSCTL is not set # CONFIG_TEST_UDELAY is not set # CONFIG_TEST_STATIC_KEYS is not set # CONFIG_TEST_DYNAMIC_DEBUG is not set # CONFIG_TEST_KMOD is not set # CONFIG_TEST_KALLSYMS is not set # CONFIG_TEST_DEBUG_VIRTUAL is not set # CONFIG_TEST_MEMCAT_P is not set # CONFIG_TEST_MEMINIT is not set # CONFIG_TEST_FREE_PAGES is not set # CONFIG_TEST_CLOCKSOURCE_WATCHDOG is not set # CONFIG_TEST_OBJPOOL is not set CONFIG_ARCH_USE_MEMTEST=y # CONFIG_MEMTEST is not set # end of Kernel Testing and Coverage # # Rust hacking # # end of Rust hacking # end of Kernel hacking |
| KernelRepo | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git |
| ReproCID | 5482378455154688 |
| ReproOpts |
Show (105 bytes){"repeat":true,"procs":5,"slowdown":1,"sandbox":"","sandbox_arg":0,"close_fds":false,"callcomments":true}
|
| ReproSyzID | 5896910948270080 |
| SyzkallerCommit | d6526ea3e6ad9081c902859bbb80f9f840377cb4 |
| Stage | Source | Reported At | Ext ID | Comments |
|---|---|---|---|---|
| moderation | lore | 2026/05/19 11:39 | <ea8bba94-ca4f-4a7b-9181-a858d92b6ca9@mail.kernel.org> |
2 Comments
|
| AckedBy |
|
| Fixes |
map[Hash:328de1c519c5c0925151cae47944a1c1a0333bcd Title:HID: mcp2221: add GPIO functionality support] |
| KernelBranch |
master |
| KernelCommit |
5200f5f493f79f14bbdc349e402a40dfb32f23c8 |
| KernelRepo |
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git |
| PatchDescription |
HID: mcp2221: fix OOB read in mcp2221_raw_event() syzbot reported a slab-out-of-bounds read in mcp2221_raw_event(). This happens because the driver does not validate the size of the incoming HID report and blindly processes it based on the command byte data[0], without verifying if the report is actually a response to the command the driver just sent. If the device sends an MCP2221_GPIO_SET (0x50) input report before any GPIO operations are performed (or if a malicious device injects one), mcp->gp_idx is still 0. The expression mcp->gp_idx - 1 results in -1, causing the code to access data[-1], which reads out of the bounds of the URB transfer buffer. To fix this, ensure that the report size is at least 64 bytes (the expected report size for MCP2221). Also, verify that the incoming report matches the currently pending command by checking data[0] != mcp->txbuf[0]. Since mcp->txbuf[0] and mcp->gp_idx are always set together when sending GPIO commands, this check inherently guarantees that mcp->gp_idx is valid and correctly initialized for the specific command being processed, preventing the out-of-bounds access. |
| PatchDiff |
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index e4ddd8e92..7f4f2110b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -861,6 +861,12 @@ static int mcp2221_raw_event(struct hid_device *hdev,
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
|
| Recipients |
[map[Email:bentiss@kernel.org Name:Benjamin Tissoires To:true] map[Email:gupt21@gmail.com Name:Rishi Gupta To:true] map[Email:jikos@kernel.org Name:Jiri Kosina To:true] map[Email:linux-i2c@vger.kernel.org Name: To:true] map[Email:linux-input@vger.kernel.org Name: To:true] map[Email:linux-kernel@vger.kernel.org Name: To:false]] |
| ReportedBy |
|
| ReviewedBy |
|
| TestedBy |
|
================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88805c093fff by task ktimers/1/29 CPU: 1 UID: 0 PID: 29 Comm: ktimers/1 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: <TASK> dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 __hid_input_report drivers/hid/hid-core.c:2139 [inline] hid_input_report+0x420/0x580 drivers/hid/hid-core.c:2166 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x3b4/0x5e0 drivers/usb/core/hcd.c:1661 dummy_timer+0x8a0/0x46f0 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x542/0xd00 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x1a3/0x2e0 kernel/time/hrtimer.c:1858 handle_softirqs+0x226/0x6d0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] run_ktimerd+0xcf/0x190 kernel/softirq.c:1138 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 </TASK> Allocated by task 5930: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:339 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x23c/0x6f0 mm/slub.c:5315 __alloc_skb+0x255/0x430 net/core/skbuff.c:679 alloc_skb include/linux/skbuff.h:1383 [inline] nlmsg_new include/net/netlink.h:1055 [inline] rtmsg_fib+0xea/0x4c0 net/ipv4/fib_semantics.c:552 fib_table_insert+0xd7f/0x1b80 net/ipv4/fib_trie.c:1380 fib_magic+0x2c4/0x390 net/ipv4/fib_frontend.c:1134 fib_add_ifaddr+0x3fb/0x5f0 net/ipv4/fib_frontend.c:1178 fib_netdev_event+0x382/0x490 net/ipv4/fib_frontend.c:1516 notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] __dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1 netif_change_flags+0xe8/0x1a0 net/core/dev.c:9802 do_setlink+0xc55/0x41c0 net/core/rtnetlink.c:3158 rtnl_changelink net/core/rtnetlink.c:3776 [inline] __rtnl_newlink net/core/rtnetlink.c:3935 [inline] rtnl_newlink+0x161c/0x1c90 net/core/rtnetlink.c:4072 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6958 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x846/0xa10 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:742 __sys_sendto+0x3c7/0x520 net/socket.c:2206 __do_sys_sendto net/socket.c:2213 [inline] __se_sys_sendto net/socket.c:2209 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2209 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5930: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6668 [inline] kmem_cache_free+0x18f/0x8d0 mm/slub.c:6779 netlink_broadcast_filtered+0xec1/0x1000 net/netlink/af_netlink.c:1535 nlmsg_multicast_filtered include/net/netlink.h:1165 [inline] nlmsg_multicast include/net/netlink.h:1184 [inline] nlmsg_notify+0xf0/0x1a0 net/netlink/af_netlink.c:2593 fib_table_insert+0xd7f/0x1b80 net/ipv4/fib_trie.c:1380 fib_magic+0x2c4/0x390 net/ipv4/fib_frontend.c:1134 fib_add_ifaddr+0x3fb/0x5f0 net/ipv4/fib_frontend.c:1178 fib_netdev_event+0x382/0x490 net/ipv4/fib_frontend.c:1516 notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] __dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1 netif_change_flags+0xe8/0x1a0 net/core/dev.c:9802 do_setlink+0xc55/0x41c0 net/core/rtnetlink.c:3158 rtnl_changelink net/core/rtnetlink.c:3776 [inline] __rtnl_newlink net/core/rtnetlink.c:3935 [inline] rtnl_newlink+0x161c/0x1c90 net/core/rtnetlink.c:4072 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6958 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x846/0xa10 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:742 __sys_sendto+0x3c7/0x520 net/socket.c:2206 __do_sys_sendto net/socket.c:2213 [inline] __se_sys_sendto net/socket.c:2209 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2209 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88805c093dc0 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 335 bytes to the right of allocated 240-byte region [ffff88805c093dc0, ffff88805c093eb0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5c093 flags: 0x80000000000000(node=0|zone=1) page_type: f5(slab) raw: 0080000000000000 ffff88801ced18c0 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000c000c 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5930, tgid 5930 (syz-executor), ts 139897096504, free_ts 139893544374 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x28c0/0x2960 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xb10/0x1400 mm/slub.c:4656 __slab_alloc+0xc6/0x1f0 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] kmem_cache_alloc_noprof+0x101/0x6c0 mm/slub.c:5270 skb_clone+0x212/0x3a0 net/core/skbuff.c:2087 __netlink_deliver_tap_skb net/netlink/af_netlink.c:300 [inline] __netlink_deliver_tap+0x404/0x850 net/netlink/af_netlink.c:325 netlink_deliver_tap+0x19c/0x1b0 net/netlink/af_netlink.c:338 netlink_deliver_tap_kernel net/netlink/af_netlink.c:347 [inline] netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x811/0xa10 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:742 __sys_sendto+0x3c7/0x520 net/socket.c:2206 __do_sys_sendto net/socket.c:2213 [inline] __se_sys_sendto net/socket.c:2209 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2209 page last free pid 50 tgid 50 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xfe1/0x1170 mm/page_alloc.c:2943 vfree+0x2ad/0x470 mm/vmalloc.c:3466 hid_open_report+0xa51/0xee0 drivers/hid/hid-core.c:1365 hid_parse include/linux/hid.h:1165 [inline] mcp2221_probe+0x5f/0x880 drivers/hid/hid-mcp2221.c:1230 __hid_device_probe drivers/hid/hid-core.c:2775 [inline] hid_device_probe+0x416/0x7a0 drivers/hid/hid-core.c:2812 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0xad0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:801 driver_probe_device+0x4f/0x240 drivers/base/dd.c:831 __device_attach_driver+0x279/0x430 drivers/base/dd.c:959 bus_for_each_drv+0x254/0x2e0 drivers/base/bus.c:500 __device_attach+0x2bb/0x430 drivers/base/dd.c:1031 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1086 bus_probe_device+0x12d/0x220 drivers/base/bus.c:574 device_add+0x7b6/0xb80 drivers/base/core.c:3689 hid_add_device+0x272/0x3e0 drivers/hid/hid-core.c:2951 usbhid_probe+0xe1b/0x12d0 drivers/hid/usbhid/hid-core.c:1435 Memory state around the buggy address: ffff88805c093e80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88805c093f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805c093f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805c094000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805c094080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================
| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/05/19 10:04 | flow | patching |
1h34mResults:map[AckedBy:<nil> Fixes:map[Hash:328de1c519c5c0925151cae47944a1c1a0333bcd Title:HID: mcp2221: add GPIO functionality support] KernelBranch:master KernelCommit:5200f5f493f79f14bbdc349e402a40dfb32f23c8 KernelRepo:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git PatchDescription:HID: mcp2221: fix OOB read in mcp2221_raw_event()
syzbot reported a slab-out-of-bounds read in mcp2221_raw_event(). This
happens because the driver does not validate the size of the incoming
HID report and blindly processes it based on the command byte data[0],
without verifying if the report is actually a response to the command
the driver just sent.
If the device sends an MCP2221_GPIO_SET (0x50) input report before any
GPIO operations are performed (or if a malicious device injects one),
mcp->gp_idx is still 0. The expression mcp->gp_idx - 1 results in -1,
causing the code to access data[-1], which reads out of the bounds of
the URB transfer buffer.
To fix this, ensure that the report size is at least 64 bytes (the
expected report size for MCP2221). Also, verify that the incoming report
matches the currently pending command by checking data[0] !=
mcp->txbuf[0]. Since mcp->txbuf[0] and mcp->gp_idx are always set
together when sending GPIO commands, this check inherently guarantees
that mcp->gp_idx is valid and correctly initialized for the specific
command being processed, preventing the out-of-bounds access. PatchDiff:diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index e4ddd8e92..7f4f2110b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -861,6 +861,12 @@ static int mcp2221_raw_event(struct hid_device *hdev,
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
Recipients:[map[Email:bentiss@kernel.org Name:Benjamin Tissoires To:true] map[Email:gupt21@gmail.com Name:Rishi Gupta To:true] map[Email:jikos@kernel.org Name:Jiri Kosina To:true] map[Email:linux-i2c@vger.kernel.org Name: To:true] map[Email:linux-input@vger.kernel.org Name: To:true] map[Email:linux-kernel@vger.kernel.org Name: To:false]] ReportedBy:<nil> ReviewedBy:<nil> TestedBy:<nil>] |
| 1/1 | 2026/05/19 10:04 | action | base-commit-picker |
0mResults:map[KernelBranch:master KernelCommit:5200f5f493f79f14bbdc349e402a40dfb32f23c8 KernelRepo:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git] |
| 2/1 | 2026/05/19 10:04 | action | syz-repro-to-c-repro |
0mResults:map[SimplifiedCRepro:// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/usb/ch9.h>
static unsigned long long procid;
static void sleep_ms(uint64_t ms)
{
usleep(ms * 1000);
}
#define MAX_FDS 30
#define USB_MAX_IFACE_NUM 4
#define USB_MAX_EP_NUM 32
#define USB_MAX_FDS 6
struct usb_endpoint_index {
struct usb_endpoint_descriptor desc;
int handle;
};
struct usb_iface_index {
struct usb_interface_descriptor* iface;
uint8_t bInterfaceNumber;
uint8_t bAlternateSetting;
uint8_t bInterfaceClass;
struct usb_endpoint_index eps[USB_MAX_EP_NUM];
int eps_num;
};
struct usb_device_index {
struct usb_device_descriptor* dev;
struct usb_config_descriptor* config;
uint8_t bDeviceClass;
uint8_t bMaxPower;
int config_length;
struct usb_iface_index ifaces[USB_MAX_IFACE_NUM];
int ifaces_num;
int iface_cur;
};
struct usb_info {
int fd;
struct usb_device_index index;
};
static struct usb_info usb_devices[USB_MAX_FDS];
static struct usb_device_index* lookup_usb_index(int fd)
{
for (int i = 0; i < USB_MAX_FDS; i++) {
if (__atomic_load_n(&usb_devices[i].fd, __ATOMIC_ACQUIRE) == fd)
return &usb_devices[i].index;
}
return NULL;
}
static int usb_devices_num;
static bool parse_usb_descriptor(const char* buffer, size_t length, struct usb_device_index* index)
{
if (length < sizeof(*index->dev) + sizeof(*index->config))
return false;
memset(index, 0, sizeof(*index));
index->dev = (struct usb_device_descriptor*)buffer;
index->config = (struct usb_config_descriptor*)(buffer + sizeof(*index->dev));
index->bDeviceClass = index->dev->bDeviceClass;
index->bMaxPower = index->config->bMaxPower;
index->config_length = length - sizeof(*index->dev);
index->iface_cur = -1;
size_t offset = 0;
while (true) {
if (offset + 1 >= length)
break;
uint8_t desc_length = buffer[offset];
uint8_t desc_type = buffer[offset + 1];
if (desc_length <= 2)
break;
if (offset + desc_length > length)
break;
if (desc_type == USB_DT_INTERFACE && index->ifaces_num < USB_MAX_IFACE_NUM) {
struct usb_interface_descriptor* iface = (struct usb_interface_descriptor*)(buffer + offset);
index->ifaces[index->ifaces_num].iface = iface;
index->ifaces[index->ifaces_num].bInterfaceNumber = iface->bInterfaceNumber;
index->ifaces[index->ifaces_num].bAlternateSetting = iface->bAlternateSetting;
index->ifaces[index->ifaces_num].bInterfaceClass = iface->bInterfaceClass;
index->ifaces_num++;
}
if (desc_type == USB_DT_ENDPOINT && index->ifaces_num > 0) {
struct usb_iface_index* iface = &index->ifaces[index->ifaces_num - 1];
if (iface->eps_num < USB_MAX_EP_NUM) {
memcpy(&iface->eps[iface->eps_num].desc, buffer + offset, sizeof(iface->eps[iface->eps_num].desc));
iface->eps_num++;
}
}
offset += desc_length;
}
return true;
}
static struct usb_device_index* add_usb_index(int fd, const char* dev, size_t dev_len)
{
int i = __atomic_fetch_add(&usb_devices_num, 1, __ATOMIC_RELAXED);
if (i >= USB_MAX_FDS)
return NULL;
if (!parse_usb_descriptor(dev, dev_len, &usb_devices[i].index))
return NULL;
__atomic_store_n(&usb_devices[i].fd, fd, __ATOMIC_RELEASE);
return &usb_devices[i].index;
}
struct vusb_connect_string_descriptor {
uint32_t len;
char* str;
} __attribute__((packed));
struct vusb_connect_descriptors {
uint32_t qual_len;
char* qual;
uint32_t bos_len;
char* bos;
uint32_t strs_len;
struct vusb_connect_string_descriptor strs[0];
} __attribute__((packed));
static const char default_string[] = {
8, USB_DT_STRING,
's', 0, 'y', 0, 'z', 0
};
static const char default_lang_id[] = {
4, USB_DT_STRING,
0x09, 0x04
};
static bool lookup_connect_response_in(int fd, const struct vusb_connect_descriptors* descs,
const struct usb_ctrlrequest* ctrl,
struct usb_qualifier_descriptor* qual,
char** response_data, uint32_t* response_length)
{
struct usb_device_index* index = lookup_usb_index(fd);
uint8_t str_idx;
if (!index)
return false;
switch (ctrl->bRequestType & USB_TYPE_MASK) {
case USB_TYPE_STANDARD:
switch (ctrl->bRequest) {
case USB_REQ_GET_DESCRIPTOR:
switch (ctrl->wValue >> 8) {
case USB_DT_DEVICE:
*response_data = (char*)index->dev;
*response_length = sizeof(*index->dev);
return true;
case USB_DT_CONFIG:
*response_data = (char*)index->config;
*response_length = index->config_length;
return true;
case USB_DT_STRING:
str_idx = (uint8_t)ctrl->wValue;
if (descs && str_idx < descs->strs_len) {
*response_data = descs->strs[str_idx].str;
*response_length = descs->strs[str_idx].len;
return true;
}
if (str_idx == 0) {
*response_data = (char*)&default_lang_id[0];
*response_length = default_lang_id[0];
return true;
}
*response_data = (char*)&default_string[0];
*response_length = default_string[0];
return true;
case USB_DT_BOS:
*response_data = descs->bos;
*response_length = descs->bos_len;
return true;
case USB_DT_DEVICE_QUALIFIER:
if (!descs->qual) {
qual->bLength = sizeof(*qual);
qual->bDescriptorType = USB_DT_DEVICE_QUALIFIER;
qual->bcdUSB = index->dev->bcdUSB;
qual->bDeviceClass = index->dev->bDeviceClass;
qual->bDeviceSubClass = index->dev->bDeviceSubClass;
qual->bDeviceProtocol = index->dev->bDeviceProtocol;
qual->bMaxPacketSize0 = index->dev->bMaxPacketSize0;
qual->bNumConfigurations = index->dev->bNumConfigurations;
qual->bRESERVED = 0;
*response_data = (char*)qual;
*response_length = sizeof(*qual);
return true;
}
*response_data = descs->qual;
*response_length = descs->qual_len;
return true;
default:
break;
}
break;
default:
break;
}
break;
default:
break;
}
return false;
}
typedef bool (*lookup_connect_out_response_t)(int fd, const struct vusb_connect_descriptors* descs,
const struct usb_ctrlrequest* ctrl, bool* done);
static bool lookup_connect_response_out_generic(int fd, const struct vusb_connect_descriptors* descs,
const struct usb_ctrlrequest* ctrl, bool* done)
{
switch (ctrl->bRequestType & USB_TYPE_MASK) {
case USB_TYPE_STANDARD:
switch (ctrl->bRequest) {
case USB_REQ_SET_CONFIGURATION:
*done = true;
return true;
default:
break;
}
break;
}
return false;
}
struct vusb_descriptor {
uint8_t req_type;
uint8_t desc_type;
uint32_t len;
char data[0];
} __attribute__((packed));
struct vusb_descriptors {
uint32_t len;
struct vusb_descriptor* generic;
struct vusb_descriptor* descs[0];
} __attribute__((packed));
struct vusb_response {
uint8_t type;
uint8_t req;
uint32_t len;
char data[0];
} __attribute__((packed));
struct vusb_responses {
uint32_t len;
struct vusb_response* generic;
struct vusb_response* resps[0];
} __attribute__((packed));
static bool lookup_control_response(const struct vusb_descriptors* descs, const struct vusb_responses* resps,
struct usb_ctrlrequest* ctrl, char** response_data, uint32_t* response_length)
{
int descs_num = 0;
int resps_num = 0;
if (descs)
descs_num = (descs->len - offsetof(struct vusb_descriptors, descs)) / sizeof(descs->descs[0]);
if (resps)
resps_num = (resps->len - offsetof(struct vusb_responses, resps)) / sizeof(resps->resps[0]);
uint8_t req = ctrl->bRequest;
uint8_t req_type = ctrl->bRequestType & USB_TYPE_MASK;
uint8_t desc_type = ctrl->wValue >> 8;
if (req == USB_REQ_GET_DESCRIPTOR) {
int i;
for (i = 0; i < descs_num; i++) {
struct vusb_descriptor* desc = descs->descs[i];
if (!desc)
continue;
if (desc->req_type == req_type && desc->desc_type == desc_type) {
*response_length = desc->len;
if (*response_length != 0)
*response_data = &desc->data[0];
else
*response_data = NULL;
return true;
}
}
if (descs && descs->generic) {
*response_data = &descs->generic->data[0];
*response_length = descs->generic->len;
return true;
}
} else {
int i;
for (i = 0; i < resps_num; i++) {
struct vusb_response* resp = resps->resps[i];
if (!resp)
continue;
if (resp->type == req_type && resp->req == req) {
*response_length = resp->len;
if (*response_length != 0)
*response_data = &resp->data[0];
else
*response_data = NULL;
return true;
}
}
if (resps && resps->generic) {
*response_data = &resps->generic->data[0];
*response_length = resps->generic->len;
return true;
}
}
return false;
}
#define UDC_NAME_LENGTH_MAX 128
struct usb_raw_init {
__u8 driver_name[UDC_NAME_LENGTH_MAX];
__u8 device_name[UDC_NAME_LENGTH_MAX];
__u8 speed;
};
enum usb_raw_event_type {
USB_RAW_EVENT_INVALID = 0,
USB_RAW_EVENT_CONNECT = 1,
USB_RAW_EVENT_CONTROL = 2,
};
struct usb_raw_event {
__u32 type;
__u32 length;
__u8 data[0];
};
struct usb_raw_ep_io {
__u16 ep;
__u16 flags;
__u32 length;
__u8 data[0];
};
#define USB_RAW_EPS_NUM_MAX 30
#define USB_RAW_EP_NAME_MAX 16
#define USB_RAW_EP_ADDR_ANY 0xff
struct usb_raw_ep_caps {
__u32 type_control : 1;
__u32 type_iso : 1;
__u32 type_bulk : 1;
__u32 type_int : 1;
__u32 dir_in : 1;
__u32 dir_out : 1;
};
struct usb_raw_ep_limits {
__u16 maxpacket_limit;
__u16 max_streams;
__u32 reserved;
};
struct usb_raw_ep_info {
__u8 name[USB_RAW_EP_NAME_MAX];
__u32 addr;
struct usb_raw_ep_caps caps;
struct usb_raw_ep_limits limits;
};
struct usb_raw_eps_info {
struct usb_raw_ep_info eps[USB_RAW_EPS_NUM_MAX];
};
#define USB_RAW_IOCTL_INIT _IOW('U', 0, struct usb_raw_init)
#define USB_RAW_IOCTL_RUN _IO('U', 1)
#define USB_RAW_IOCTL_EVENT_FETCH _IOR('U', 2, struct usb_raw_event)
#define USB_RAW_IOCTL_EP0_WRITE _IOW('U', 3, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_EP0_READ _IOWR('U', 4, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_EP_ENABLE _IOW('U', 5, struct usb_endpoint_descriptor)
#define USB_RAW_IOCTL_EP_DISABLE _IOW('U', 6, __u32)
#define USB_RAW_IOCTL_EP_WRITE _IOW('U', 7, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_EP_READ _IOWR('U', 8, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_CONFIGURE _IO('U', 9)
#define USB_RAW_IOCTL_VBUS_DRAW _IOW('U', 10, __u32)
#define USB_RAW_IOCTL_EPS_INFO _IOR('U', 11, struct usb_raw_eps_info)
#define USB_RAW_IOCTL_EP0_STALL _IO('U', 12)
#define USB_RAW_IOCTL_EP_SET_HALT _IOW('U', 13, __u32)
#define USB_RAW_IOCTL_EP_CLEAR_HALT _IOW('U', 14, __u32)
#define USB_RAW_IOCTL_EP_SET_WEDGE _IOW('U', 15, __u32)
static int usb_raw_open()
{
return open("/dev/raw-gadget", O_RDWR);
}
static int usb_raw_init(int fd, uint32_t speed, const char* driver, const char* device)
{
struct usb_raw_init arg;
strncpy((char*)&arg.driver_name[0], driver, sizeof(arg.driver_name));
strncpy((char*)&arg.device_name[0], device, sizeof(arg.device_name));
arg.speed = speed;
return ioctl(fd, USB_RAW_IOCTL_INIT, &arg);
}
static int usb_raw_run(int fd)
{
return ioctl(fd, USB_RAW_IOCTL_RUN, 0);
}
static int usb_raw_ep_write(int fd, struct usb_raw_ep_io* io)
{
return ioctl(fd, USB_RAW_IOCTL_EP_WRITE, io);
}
static int usb_raw_configure(int fd)
{
return ioctl(fd, USB_RAW_IOCTL_CONFIGURE, 0);
}
static int usb_raw_vbus_draw(int fd, uint32_t power)
{
return ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, power);
}
static int usb_raw_ep0_write(int fd, struct usb_raw_ep_io* io)
{
return ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io);
}
static int usb_raw_ep0_read(int fd, struct usb_raw_ep_io* io)
{
return ioctl(fd, USB_RAW_IOCTL_EP0_READ, io);
}
static int usb_raw_event_fetch(int fd, struct usb_raw_event* event)
{
return ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event);
}
static int usb_raw_ep_enable(int fd, struct usb_endpoint_descriptor* desc)
{
return ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, desc);
}
static int usb_raw_ep_disable(int fd, int ep)
{
return ioctl(fd, USB_RAW_IOCTL_EP_DISABLE, ep);
}
static int usb_raw_ep0_stall(int fd)
{
return ioctl(fd, USB_RAW_IOCTL_EP0_STALL, 0);
}
static int lookup_interface(int fd, uint8_t bInterfaceNumber, uint8_t bAlternateSetting)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return -1;
for (int i = 0; i < index->ifaces_num; i++) {
if (index->ifaces[i].bInterfaceNumber == bInterfaceNumber &&
index->ifaces[i].bAlternateSetting == bAlternateSetting)
return i;
}
return -1;
}
static int lookup_endpoint(int fd, uint8_t bEndpointAddress)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return -1;
if (index->iface_cur < 0)
return -1;
for (int ep = 0; ep < index->ifaces[index->iface_cur].eps_num; ep++)
if (index->ifaces[index->iface_cur].eps[ep].desc.bEndpointAddress == bEndpointAddress)
return index->ifaces[index->iface_cur].eps[ep].handle;
return -1;
}
#define USB_MAX_PACKET_SIZE 4096
struct usb_raw_control_event {
struct usb_raw_event inner;
struct usb_ctrlrequest ctrl;
char data[USB_MAX_PACKET_SIZE];
};
struct usb_raw_ep_io_data {
struct usb_raw_ep_io inner;
char data[USB_MAX_PACKET_SIZE];
};
static void set_interface(int fd, int n)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return;
if (index->iface_cur >= 0 && index->iface_cur < index->ifaces_num) {
for (int ep = 0; ep < index->ifaces[index->iface_cur].eps_num; ep++) {
int rv = usb_raw_ep_disable(fd, index->ifaces[index->iface_cur].eps[ep].handle);
if (rv < 0) {
} else {
}
}
}
if (n >= 0 && n < index->ifaces_num) {
for (int ep = 0; ep < index->ifaces[n].eps_num; ep++) {
int rv = usb_raw_ep_enable(fd, &index->ifaces[n].eps[ep].desc);
if (rv < 0) {
} else {
index->ifaces[n].eps[ep].handle = rv;
}
}
index->iface_cur = n;
}
}
static int configure_device(int fd)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return -1;
int rv = usb_raw_vbus_draw(fd, index->bMaxPower);
if (rv < 0) {
return rv;
}
rv = usb_raw_configure(fd);
if (rv < 0) {
return rv;
}
set_interface(fd, 0);
return 0;
}
static volatile long syz_usb_connect_impl(uint64_t speed, uint64_t dev_len, const char* dev,
const struct vusb_connect_descriptors* descs,
lookup_connect_out_response_t lookup_connect_response_out)
{
if (!dev) {
return -1;
}
int fd = usb_raw_open();
if (fd < 0) {
return fd;
}
if (fd >= MAX_FDS) {
close(fd);
return -1;
}
struct usb_device_index* index = add_usb_index(fd, dev, dev_len);
if (!index) {
return -1;
}
char device[32];
sprintf(&device[0], "dummy_udc.%llu", procid);
int rv = usb_raw_init(fd, speed, "dummy_udc", &device[0]);
if (rv < 0) {
return rv;
}
rv = usb_raw_run(fd);
if (rv < 0) {
return rv;
}
bool done = false;
while (!done) {
struct usb_raw_control_event event;
event.inner.type = 0;
event.inner.length = sizeof(event.ctrl);
rv = usb_raw_event_fetch(fd, (struct usb_raw_event*)&event);
if (rv < 0) {
return rv;
}
if (event.inner.type != USB_RAW_EVENT_CONTROL)
continue;
char* response_data = NULL;
uint32_t response_length = 0;
struct usb_qualifier_descriptor qual;
if (event.ctrl.bRequestType & USB_DIR_IN) {
if (!lookup_connect_response_in(fd, descs, &event.ctrl, &qual, &response_data, &response_length)) {
usb_raw_ep0_stall(fd);
continue;
}
} else {
if (!lookup_connect_response_out(fd, descs, &event.ctrl, &done)) {
usb_raw_ep0_stall(fd);
continue;
}
response_data = NULL;
response_length = event.ctrl.wLength;
}
if ((event.ctrl.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD &&
event.ctrl.bRequest == USB_REQ_SET_CONFIGURATION) {
rv = configure_device(fd);
if (rv < 0) {
return rv;
}
}
struct usb_raw_ep_io_data response;
response.inner.ep = 0;
response.inner.flags = 0;
if (response_length > sizeof(response.data))
response_length = 0;
if (event.ctrl.wLength < response_length)
response_length = event.ctrl.wLength;
response.inner.length = response_length;
if (response_data)
memcpy(&response.data[0], response_data, response_length);
else
memset(&response.data[0], 0, response_length);
if (event.ctrl.bRequestType & USB_DIR_IN) {
rv = usb_raw_ep0_write(fd, (struct usb_raw_ep_io*)&response);
} else {
rv = usb_raw_ep0_read(fd, (struct usb_raw_ep_io*)&response);
}
if (rv < 0) {
return rv;
}
}
sleep_ms(200);
return fd;
}
static volatile long syz_usb_connect(volatile long a0, volatile long a1, volatile long a2, volatile long a3)
{
uint64_t speed = a0;
uint64_t dev_len = a1;
const char* dev = (const char*)a2;
const struct vusb_connect_descriptors* descs = (const struct vusb_connect_descriptors*)a3;
return syz_usb_connect_impl(speed, dev_len, dev, descs, &lookup_connect_response_out_generic);
}
static volatile long syz_usb_control_io(volatile long a0, volatile long a1, volatile long a2)
{
int fd = a0;
const struct vusb_descriptors* descs = (const struct vusb_descriptors*)a1;
const struct vusb_responses* resps = (const struct vusb_responses*)a2;
struct usb_raw_control_event event;
event.inner.type = 0;
event.inner.length = USB_MAX_PACKET_SIZE;
int rv = usb_raw_event_fetch(fd, (struct usb_raw_event*)&event);
if (rv < 0) {
return rv;
}
if (event.inner.type != USB_RAW_EVENT_CONTROL) {
return -1;
}
char* response_data = NULL;
uint32_t response_length = 0;
if ((event.ctrl.bRequestType & USB_DIR_IN) && event.ctrl.wLength) {
if (!lookup_control_response(descs, resps, &event.ctrl, &response_data, &response_length)) {
usb_raw_ep0_stall(fd);
return -1;
}
} else {
if ((event.ctrl.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD ||
event.ctrl.bRequest == USB_REQ_SET_INTERFACE) {
int iface_num = event.ctrl.wIndex;
int alt_set = event.ctrl.wValue;
int iface_index = lookup_interface(fd, iface_num, alt_set);
if (iface_index < 0) {
} else {
set_interface(fd, iface_index);
}
}
response_length = event.ctrl.wLength;
}
struct usb_raw_ep_io_data response;
response.inner.ep = 0;
response.inner.flags = 0;
if (response_length > sizeof(response.data))
response_length = 0;
if (event.ctrl.wLength < response_length)
response_length = event.ctrl.wLength;
if ((event.ctrl.bRequestType & USB_DIR_IN) && !event.ctrl.wLength) {
response_length = USB_MAX_PACKET_SIZE;
}
response.inner.length = response_length;
if (response_data)
memcpy(&response.data[0], response_data, response_length);
else
memset(&response.data[0], 0, response_length);
if ((event.ctrl.bRequestType & USB_DIR_IN) && event.ctrl.wLength) {
rv = usb_raw_ep0_write(fd, (struct usb_raw_ep_io*)&response);
} else {
rv = usb_raw_ep0_read(fd, (struct usb_raw_ep_io*)&response);
}
if (rv < 0) {
return rv;
}
sleep_ms(200);
return 0;
}
static volatile long syz_usb_ep_write(volatile long a0, volatile long a1, volatile long a2, volatile long a3)
{
int fd = a0;
uint8_t ep = a1;
uint32_t len = a2;
char* data = (char*)a3;
int ep_handle = lookup_endpoint(fd, ep);
if (ep_handle < 0) {
return -1;
}
struct usb_raw_ep_io_data io_data;
io_data.inner.ep = ep_handle;
io_data.inner.flags = 0;
if (len > sizeof(io_data.data))
len = sizeof(io_data.data);
io_data.inner.length = len;
memcpy(&io_data.data[0], data, len);
int rv = usb_raw_ep_write(fd, (struct usb_raw_ep_io*)&io_data);
if (rv < 0) {
return rv;
}
sleep_ms(200);
return 0;
}
static volatile long syz_usb_disconnect(volatile long a0)
{
int fd = a0;
int rv = close(fd);
sleep_ms(200);
return rv;
}
uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
const char* reason;
(void)reason;
intptr_t res = 0;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// syz_usb_connect$hid arguments: [
// speed: usb_device_speed = 0x0 (8 bytes)
// dev_len: len = 0x36 (8 bytes)
// dev: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {12 01 00 00 00 00 00 40 26 09 33 33 40 00 00 00 00 01 09 02 24 00 01 00 00 00 00 09 04 00 00 01 03 01 00 00 09 21 00 00 00 01 22 01 00 09 05 81 03 08} (length 0x32)
// }
// }
// }
// conn_descs: nil
// ]
// returns fd_usb_hid
memcpy((void*)0x200000000000, "... [truncated large byte array] ...", 50);
res = -1;
res = syz_usb_connect(/*speed=*/0, /*dev_len=*/0x36, /*dev=*/0x200000000000, /*conn_descs=*/0);
if (res != -1)
r[0] = res;
// syz_usb_disconnect arguments: [
// fd: fd_usb (resource)
// ]
syz_usb_disconnect(/*fd=*/r[0]);
// syz_usb_connect$hid arguments: [
// speed: usb_device_speed = 0x3 (8 bytes)
// dev_len: len = 0x36 (8 bytes)
// dev: ptr[in, usb_device_descriptor_hid] {
// usb_device_descriptor_hid {
// inner: usb_device_descriptor_verbose_t[flags[usb_versions, int16], 0, 0, 0, flags[usb_device_max_packet_sizes, int8], 0, 0, 64, array[usb_config_descriptor_hid, 1]] {
// bLength: const = 0x12 (1 bytes)
// bDescriptorType: const = 0x1 (1 bytes)
// bcdUSB: usb_versions = 0x0 (2 bytes)
// bDeviceClass: const = 0x0 (1 bytes)
// bDeviceSubClass: const = 0x0 (1 bytes)
// bDeviceProtocol: const = 0x0 (1 bytes)
// bMaxPacketSize0: usb_device_max_packet_sizes = 0x10 (1 bytes)
// idVendor: const = 0x4d8 (2 bytes)
// idProduct: const = 0xdd (2 bytes)
// bcdDevice: const = 0x0 (2 bytes)
// iManufacturer: const = 0x0 (1 bytes)
// iProduct: const = 0x0 (1 bytes)
// iSerialNumber: const = 0x0 (1 bytes)
// bNumConfigurations: len = 0x1 (1 bytes)
// configs: array[usb_config_descriptor_hid] {
// usb_config_descriptor_hid {
// inner: usb_config_descriptor_verbose_t[const[1, int8], len[interfaces, int8], int8, flags[usb_config_attributes, int8], int8, void, array[usb_interface_descriptor_hid, 1]] {
// bLength: const = 0x9 (1 bytes)
// bDescriptorType: const = 0x2 (1 bytes)
// wTotalLength: len = 0x24 (2 bytes)
// bNumInterfaces: len = 0x1 (1 bytes)
// bConfigurationValue: const = 0x0 (1 bytes)
// iConfiguration: int8 = 0x0 (1 bytes)
// bmAttributes: usb_config_attributes = 0x0 (1 bytes)
// bMaxPower: int8 = 0x0 (1 bytes)
// extra: buffer: {} (length 0x0)
// interfaces: array[usb_interface_descriptor_hid] {
// usb_interface_descriptor_hid {
// inner: usb_interface_descriptor_verbose_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], int8, usb_hid_descriptor_hid, usb_endpoint_descriptors_hid] {
// bLength: const = 0x9 (1 bytes)
// bDescriptorType: const = 0x4 (1 bytes)
// bInterfaceNumber: const = 0x0 (1 bytes)
// bAlternateSetting: int8 = 0x0 (1 bytes)
// bNumEndpoints: int8 = 0x0 (1 bytes)
// bInterfaceClass: const = 0x3 (1 bytes)
// bInterfaceSubClass: const = 0x1 (1 bytes)
// bInterfaceProtocol: usb_hid_protocols = 0x0 (1 bytes)
// iInterface: int8 = 0x0 (1 bytes)
// extra: usb_hid_descriptor_hid {
// bLength: len = 0x0 (1 bytes)
// bDescriptorType: const = 0x21 (1 bytes)
// bcdHID: int16 = 0x0 (2 bytes)
// bCountryCode: int8 = 0x0 (1 bytes)
// bNumDescriptors: const = 0x1 (1 bytes)
// report_desc: usb_hid_class_descriptor_report {
// bDescriptorType: const = 0x22 (1 bytes)
// wDescriptorLength: int16 = 0x0 (2 bytes)
// }
// }
// endpoints: usb_endpoint_descriptors_hid {
// in: usb_endpoint_descriptor_hid_in {
// inner: usb_endpoint_descriptor_verbose_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], flags[usb_endpoint_max_packet_sizes, int16], int8, int8, int8, void] {
// bLength: const = 0x9 (1 bytes)
// bDescriptorType: const = 0x5 (1 bytes)
// bEndpointAddress: const = 0x81 (1 bytes)
// bmAttributes: const = 0x3 (1 bytes)
// wMaxPacketSize: usb_endpoint_max_packet_sizes = 0x0 (2 bytes)
// bInterval: int8 = 0x0 (1 bytes)
// bRefresh: int8 = 0x0 (1 bytes)
// bSynchAddress: int8 = 0x0 (1 bytes)
// extra: buffer: {} (length 0x0)
// }
// }
// out: array[usb_endpoint_descriptor_hid_out] {
// }
// }
// }
// }
// }
// }
// }
// }
// }
// }
// }
// conn_descs: nil
// ]
// returns fd_usb_hid
*(uint8_t*)0x200000000000 = 0x12;
*(uint8_t*)0x200000000001 = 1;
*(uint16_t*)0x200000000002 = 0;
*(uint8_t*)0x200000000004 = 0;
*(uint8_t*)0x200000000005 = 0;
*(uint8_t*)0x200000000006 = 0;
*(uint8_t*)0x200000000007 = 0x10;
*(uint16_t*)0x200000000008 = 0x4d8;
*(uint16_t*)0x20000000000a = 0xdd;
*(uint16_t*)0x20000000000c = 0;
*(uint8_t*)0x20000000000e = 0;
*(uint8_t*)0x20000000000f = 0;
*(uint8_t*)0x200000000010 = 0;
*(uint8_t*)0x200000000011 = 1;
*(uint8_t*)0x200000000012 = 9;
*(uint8_t*)0x200000000013 = 2;
*(uint16_t*)0x200000000014 = 0x24;
*(uint8_t*)0x200000000016 = 1;
*(uint8_t*)0x200000000017 = 0;
*(uint8_t*)0x200000000018 = 0;
*(uint8_t*)0x200000000019 = 0;
*(uint8_t*)0x20000000001a = 0;
*(uint8_t*)0x20000000001b = 9;
*(uint8_t*)0x20000000001c = 4;
*(uint8_t*)0x20000000001d = 0;
*(uint8_t*)0x20000000001e = 0;
*(uint8_t*)0x20000000001f = 0;
*(uint8_t*)0x200000000020 = 3;
*(uint8_t*)0x200000000021 = 1;
*(uint8_t*)0x200000000022 = 0;
*(uint8_t*)0x200000000023 = 0;
*(uint8_t*)0x200000000024 = 0;
*(uint8_t*)0x200000000025 = 0x21;
*(uint16_t*)0x200000000026 = 0;
*(uint8_t*)0x200000000028 = 0;
*(uint8_t*)0x200000000029 = 1;
*(uint8_t*)0x20000000002a = 0x22;
*(uint16_t*)0x20000000002b = 0;
*(uint8_t*)0x20000000002d = 9;
*(uint8_t*)0x20000000002e = 5;
*(uint8_t*)0x20000000002f = 0x81;
*(uint8_t*)0x200000000030 = 3;
*(uint16_t*)0x200000000031 = 0;
*(uint8_t*)0x200000000033 = 0;
*(uint8_t*)0x200000000034 = 0;
*(uint8_t*)0x200000000035 = 0;
res = -1;
res = syz_usb_connect(/*speed=USB_SPEED_HIGH*/3, /*dev_len=*/0x36, /*dev=*/0x200000000000, /*conn_descs=*/0);
if (res != -1)
r[1] = res;
// syz_usb_control_io arguments: [
// fd: fd_usb (resource)
// descs: nil
// resps: nil
// ]
syz_usb_control_io(/*fd=*/r[1], /*descs=*/0, /*resps=*/0);
// syz_usb_control_io arguments: [
// fd: fd_usb (resource)
// descs: ptr[in, vusb_descriptors] {
// vusb_descriptors {
// len: len = 0x2c (4 bytes)
// generic: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {00 00 08 00 00 00 08 04 82} (length 0x9)
// }
// }
// }
// string: nil
// bos: nil
// hub_hs: nil
// hub_ss: nil
// }
// }
// resps: nil
// ]
*(uint32_t*)0x2000000003c0 = 0x2c;
*(uint64_t*)0x2000000003c4 = 0x200000000100;
memcpy((void*)0x200000000100, "\x00\x00\x08\x00\x00\x00\x08\x04\x82", 9);
*(uint64_t*)0x2000000003cc = 0;
*(uint64_t*)0x2000000003d4 = 0;
*(uint64_t*)0x2000000003dc = 0;
*(uint64_t*)0x2000000003e4 = 0;
syz_usb_control_io(/*fd=*/r[1], /*descs=*/0x2000000003c0, /*resps=*/0);
// syz_usb_ep_write arguments: [
// fd: fd_usb (resource)
// ep: int8 = 0x81 (1 bytes)
// len: len = 0x1 (8 bytes)
// data: ptr[in, buffer] {
// buffer: {50 62 7b} (length 0x3)
// }
// ]
memcpy((void*)0x200000000040, "Pb{", 3);
syz_usb_ep_write(/*fd=*/r[0], /*ep=*/0x81, /*len=*/1, /*data=*/0x200000000040);
return 0;
}
] |
| 3/1 | 2026/05/19 10:04 | action | kernel-checkouter |
0mResults:map[KernelSrc:/app/workdir/cache/src/d5a02ed91a4f019017141f71e695c75b27c3612e] |
| 4/1 | 2026/05/19 10:04 | action | kernel-builder |
0mResults:map[KernelObj:/app/workdir/cache/build/282afa7582a2ae394864486ef053bbce773fb4fb] |
| 5/1 | 2026/05/19 10:04 | action | crash-reproducer |
8mResults:map[OtherCrashReports:[==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff8881b72fffff by task ktimers/1/29
CPU: 1 UID: 0 PID: 29 Comm: ktimers/1 Not tainted syzkaller #1 PREEMPT_{RT,(full)}
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x42b/0x590 drivers/hid/hid-core.c:2161
hid_irq_in+0x495/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x405/0xb10 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x18f/0x260 kernel/time/hrtimer.c:2011
handle_softirqs+0x1de/0x6d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1151
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b72ff
flags: 0x500000000000000(node=1|zone=2)
raw: 0500000000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 6037, tgid 6037 (syz-executor), ts 125633981260, free_ts 463441946812
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2490
alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline]
alloc_pages_noprof+0xd2/0x2f0 mm/mempolicy.c:2581
pagetable_alloc_noprof include/linux/mm.h:3651 [inline]
__pte_alloc_one_noprof include/asm-generic/pgalloc.h:76 [inline]
pte_alloc_one+0x22/0x380 arch/x86/mm/pgtable.c:18
__pte_alloc+0x25/0x1a0 mm/memory.c:453
do_anonymous_page mm/memory.c:5338 [inline]
do_pte_missing+0x21a2/0x2750 mm/memory.c:4548
handle_pte_fault mm/memory.c:6411 [inline]
__handle_mm_fault mm/memory.c:6549 [inline]
handle_mm_fault+0xd09/0x13c0 mm/memory.c:6718
do_user_addr_fault+0xa73/0x1340 arch/x86/mm/fault.c:1334
handle_page_fault arch/x86/mm/fault.c:1474 [inline]
exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
page last free pid 20 tgid 20 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0xf48/0x1080 mm/page_alloc.c:2943
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:291
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core kernel/rcu/tree.c:2869 [inline]
rcu_cpu_kthread+0x99e/0x1470 kernel/rcu/tree.c:2957
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff8881b72ffe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881b72fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881b72fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881b7300000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881b7300080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
] ReproducedBugTitle:KASAN: slab-out-of-bounds Read in mcp2221_raw_event ReproducedCrashReport:==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888111fe7fff by task ktimers/0/16
CPU: 0 UID: 0 PID: 16 Comm: ktimers/0 Not tainted syzkaller #1 PREEMPT_{RT,(full)}
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x42b/0x590 drivers/hid/hid-core.c:2161
hid_irq_in+0x495/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x405/0xb10 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x18f/0x260 kernel/time/hrtimer.c:2011
handle_softirqs+0x1de/0x6d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1151
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
kmem_cache_alloc_node_noprof+0x22a/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
kernel_thread+0x13f/0x1b0 kernel/fork.c:2782
create_kthread kernel/kthread.c:459 [inline]
kthreadd+0x4ec/0x6e0 kernel/kthread.c:817
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888111fe5880
which belongs to the cache task_struct of size 7296
The buggy address is located 2815 bytes to the right of
allocated 7296-byte region [ffff888111fe5880, ffff888111fe7500)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111fe0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888116e25541
flags: 0x100000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2388, tgid 2388 (kworker/u9:11), ts 15402053339, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3467
new_slab mm/slub.c:3525 [inline]
refill_objects+0x33c/0x3d0 mm/slub.c:7271
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x373/0x720 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
kmem_cache_alloc_node_noprof+0x4f4/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
user_mode_thread+0x110/0x180 kernel/fork.c:2797
call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
worker_thread+0x8a2/0xda0 kernel/workqueue.c:3478
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
page_owner free stack trace missing
Memory state around the buggy address:
ffff888111fe7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888111fe8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
ReproducedFaultInjection:] |
| 6/1 | 2026/05/19 10:12 | action | codesearch-prepare |
19mResults:map[Index:codesearch-index] |
| 7/1 | 2026/05/19 10:32 | agent | debugger |
9mModel:gemini-3.1-pro-preview Instruction: You are an experienced Linux kernel developer tasked with debugging a kernel crash root cause. You need to provide a detailed explanation of the root cause for another developer to be able to write a fix for the bug based on your explanation. Include all relevant details into the response: function/struct/field/etc names, code snippets, line numbers, macro/enum values, etc. Prefer calling several tools at the same time to save round-trips. Prompt:
The crash is:
==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888111fe7fff by task ktimers/0/16
CPU: 0 UID: 0 PID: 16 Comm: ktimers/0 Not tainted syzkaller #1 PREEMPT_{RT,(full)}
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x42b/0x590 drivers/hid/hid-core.c:2161
hid_irq_in+0x495/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x405/0xb10 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x18f/0x260 kernel/time/hrtimer.c:2011
handle_softirqs+0x1de/0x6d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1151
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
kmem_cache_alloc_node_noprof+0x22a/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
kernel_thread+0x13f/0x1b0 kernel/fork.c:2782
create_kthread kernel/kthread.c:459 [inline]
kthreadd+0x4ec/0x6e0 kernel/kthread.c:817
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888111fe5880
which belongs to the cache task_struct of size 7296
The buggy address is located 2815 bytes to the right of
allocated 7296-byte region [ffff888111fe5880, ffff888111fe7500)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111fe0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888116e25541
flags: 0x100000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2388, tgid 2388 (kworker/u9:11), ts 15402053339, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3467
new_slab mm/slub.c:3525 [inline]
refill_objects+0x33c/0x3d0 mm/slub.c:7271
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x373/0x720 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
kmem_cache_alloc_node_noprof+0x4f4/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
user_mode_thread+0x110/0x180 kernel/fork.c:2797
call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
worker_thread+0x8a2/0xda0 kernel/workqueue.c:3478
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
page_owner free stack trace missing
Memory state around the buggy address:
ffff888111fe7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888111fe8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
The following C code is a draft of the vulnerable syscall sequence. Keep in mind that
it may lack the precise threading, sandboxing, and some arguments of a working reproducer:
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/usb/ch9.h>
static unsigned long long procid;
static void sleep_ms(uint64_t ms)
{
usleep(ms * 1000);
}
#define MAX_FDS 30
#define USB_MAX_IFACE_NUM 4
#define USB_MAX_EP_NUM 32
#define USB_MAX_FDS 6
struct usb_endpoint_index {
struct usb_endpoint_descriptor desc;
int handle;
};
struct usb_iface_index {
struct usb_interface_descriptor* iface;
uint8_t bInterfaceNumber;
uint8_t bAlternateSetting;
uint8_t bInterfaceClass;
struct usb_endpoint_index eps[USB_MAX_EP_NUM];
int eps_num;
};
struct usb_device_index {
struct usb_device_descriptor* dev;
struct usb_config_descriptor* config;
uint8_t bDeviceClass;
uint8_t bMaxPower;
int config_length;
struct usb_iface_index ifaces[USB_MAX_IFACE_NUM];
int ifaces_num;
int iface_cur;
};
struct usb_info {
int fd;
struct usb_device_index index;
};
static struct usb_info usb_devices[USB_MAX_FDS];
static struct usb_device_index* lookup_usb_index(int fd)
{
for (int i = 0; i < USB_MAX_FDS; i++) {
if (__atomic_load_n(&usb_devices[i].fd, __ATOMIC_ACQUIRE) == fd)
return &usb_devices[i].index;
}
return NULL;
}
static int usb_devices_num;
static bool parse_usb_descriptor(const char* buffer, size_t length, struct usb_device_index* index)
{
if (length < sizeof(*index->dev) + sizeof(*index->config))
return false;
memset(index, 0, sizeof(*index));
index->dev = (struct usb_device_descriptor*)buffer;
index->config = (struct usb_config_descriptor*)(buffer + sizeof(*index->dev));
index->bDeviceClass = index->dev->bDeviceClass;
index->bMaxPower = index->config->bMaxPower;
index->config_length = length - sizeof(*index->dev);
index->iface_cur = -1;
size_t offset = 0;
while (true) {
if (offset + 1 >= length)
break;
uint8_t desc_length = buffer[offset];
uint8_t desc_type = buffer[offset + 1];
if (desc_length <= 2)
break;
if (offset + desc_length > length)
break;
if (desc_type == USB_DT_INTERFACE && index->ifaces_num < USB_MAX_IFACE_NUM) {
struct usb_interface_descriptor* iface = (struct usb_interface_descriptor*)(buffer + offset);
index->ifaces[index->ifaces_num].iface = iface;
index->ifaces[index->ifaces_num].bInterfaceNumber = iface->bInterfaceNumber;
index->ifaces[index->ifaces_num].bAlternateSetting = iface->bAlternateSetting;
index->ifaces[index->ifaces_num].bInterfaceClass = iface->bInterfaceClass;
index->ifaces_num++;
}
if (desc_type == USB_DT_ENDPOINT && index->ifaces_num > 0) {
struct usb_iface_index* iface = &index->ifaces[index->ifaces_num - 1];
if (iface->eps_num < USB_MAX_EP_NUM) {
memcpy(&iface->eps[iface->eps_num].desc, buffer + offset, sizeof(iface->eps[iface->eps_num].desc));
iface->eps_num++;
}
}
offset += desc_length;
}
return true;
}
static struct usb_device_index* add_usb_index(int fd, const char* dev, size_t dev_len)
{
int i = __atomic_fetch_add(&usb_devices_num, 1, __ATOMIC_RELAXED);
if (i >= USB_MAX_FDS)
return NULL;
if (!parse_usb_descriptor(dev, dev_len, &usb_devices[i].index))
return NULL;
__atomic_store_n(&usb_devices[i].fd, fd, __ATOMIC_RELEASE);
return &usb_devices[i].index;
}
struct vusb_connect_string_descriptor {
uint32_t len;
char* str;
} __attribute__((packed));
struct vusb_connect_descriptors {
uint32_t qual_len;
char* qual;
uint32_t bos_len;
char* bos;
uint32_t strs_len;
struct vusb_connect_string_descriptor strs[0];
} __attribute__((packed));
static const char default_string[] = {
8, USB_DT_STRING,
's', 0, 'y', 0, 'z', 0
};
static const char default_lang_id[] = {
4, USB_DT_STRING,
0x09, 0x04
};
static bool lookup_connect_response_in(int fd, const struct vusb_connect_descriptors* descs,
const struct usb_ctrlrequest* ctrl,
struct usb_qualifier_descriptor* qual,
char** response_data, uint32_t* response_length)
{
struct usb_device_index* index = lookup_usb_index(fd);
uint8_t str_idx;
if (!index)
return false;
switch (ctrl->bRequestType & USB_TYPE_MASK) {
case USB_TYPE_STANDARD:
switch (ctrl->bRequest) {
case USB_REQ_GET_DESCRIPTOR:
switch (ctrl->wValue >> 8) {
case USB_DT_DEVICE:
*response_data = (char*)index->dev;
*response_length = sizeof(*index->dev);
return true;
case USB_DT_CONFIG:
*response_data = (char*)index->config;
*response_length = index->config_length;
return true;
case USB_DT_STRING:
str_idx = (uint8_t)ctrl->wValue;
if (descs && str_idx < descs->strs_len) {
*response_data = descs->strs[str_idx].str;
*response_length = descs->strs[str_idx].len;
return true;
}
if (str_idx == 0) {
*response_data = (char*)&default_lang_id[0];
*response_length = default_lang_id[0];
return true;
}
*response_data = (char*)&default_string[0];
*response_length = default_string[0];
return true;
case USB_DT_BOS:
*response_data = descs->bos;
*response_length = descs->bos_len;
return true;
case USB_DT_DEVICE_QUALIFIER:
if (!descs->qual) {
qual->bLength = sizeof(*qual);
qual->bDescriptorType = USB_DT_DEVICE_QUALIFIER;
qual->bcdUSB = index->dev->bcdUSB;
qual->bDeviceClass = index->dev->bDeviceClass;
qual->bDeviceSubClass = index->dev->bDeviceSubClass;
qual->bDeviceProtocol = index->dev->bDeviceProtocol;
qual->bMaxPacketSize0 = index->dev->bMaxPacketSize0;
qual->bNumConfigurations = index->dev->bNumConfigurations;
qual->bRESERVED = 0;
*response_data = (char*)qual;
*response_length = sizeof(*qual);
return true;
}
*response_data = descs->qual;
*response_length = descs->qual_len;
return true;
default:
break;
}
break;
default:
break;
}
break;
default:
break;
}
return false;
}
typedef bool (*lookup_connect_out_response_t)(int fd, const struct vusb_connect_descriptors* descs,
const struct usb_ctrlrequest* ctrl, bool* done);
static bool lookup_connect_response_out_generic(int fd, const struct vusb_connect_descriptors* descs,
const struct usb_ctrlrequest* ctrl, bool* done)
{
switch (ctrl->bRequestType & USB_TYPE_MASK) {
case USB_TYPE_STANDARD:
switch (ctrl->bRequest) {
case USB_REQ_SET_CONFIGURATION:
*done = true;
return true;
default:
break;
}
break;
}
return false;
}
struct vusb_descriptor {
uint8_t req_type;
uint8_t desc_type;
uint32_t len;
char data[0];
} __attribute__((packed));
struct vusb_descriptors {
uint32_t len;
struct vusb_descriptor* generic;
struct vusb_descriptor* descs[0];
} __attribute__((packed));
struct vusb_response {
uint8_t type;
uint8_t req;
uint32_t len;
char data[0];
} __attribute__((packed));
struct vusb_responses {
uint32_t len;
struct vusb_response* generic;
struct vusb_response* resps[0];
} __attribute__((packed));
static bool lookup_control_response(const struct vusb_descriptors* descs, const struct vusb_responses* resps,
struct usb_ctrlrequest* ctrl, char** response_data, uint32_t* response_length)
{
int descs_num = 0;
int resps_num = 0;
if (descs)
descs_num = (descs->len - offsetof(struct vusb_descriptors, descs)) / sizeof(descs->descs[0]);
if (resps)
resps_num = (resps->len - offsetof(struct vusb_responses, resps)) / sizeof(resps->resps[0]);
uint8_t req = ctrl->bRequest;
uint8_t req_type = ctrl->bRequestType & USB_TYPE_MASK;
uint8_t desc_type = ctrl->wValue >> 8;
if (req == USB_REQ_GET_DESCRIPTOR) {
int i;
for (i = 0; i < descs_num; i++) {
struct vusb_descriptor* desc = descs->descs[i];
if (!desc)
continue;
if (desc->req_type == req_type && desc->desc_type == desc_type) {
*response_length = desc->len;
if (*response_length != 0)
*response_data = &desc->data[0];
else
*response_data = NULL;
return true;
}
}
if (descs && descs->generic) {
*response_data = &descs->generic->data[0];
*response_length = descs->generic->len;
return true;
}
} else {
int i;
for (i = 0; i < resps_num; i++) {
struct vusb_response* resp = resps->resps[i];
if (!resp)
continue;
if (resp->type == req_type && resp->req == req) {
*response_length = resp->len;
if (*response_length != 0)
*response_data = &resp->data[0];
else
*response_data = NULL;
return true;
}
}
if (resps && resps->generic) {
*response_data = &resps->generic->data[0];
*response_length = resps->generic->len;
return true;
}
}
return false;
}
#define UDC_NAME_LENGTH_MAX 128
struct usb_raw_init {
__u8 driver_name[UDC_NAME_LENGTH_MAX];
__u8 device_name[UDC_NAME_LENGTH_MAX];
__u8 speed;
};
enum usb_raw_event_type {
USB_RAW_EVENT_INVALID = 0,
USB_RAW_EVENT_CONNECT = 1,
USB_RAW_EVENT_CONTROL = 2,
};
struct usb_raw_event {
__u32 type;
__u32 length;
__u8 data[0];
};
struct usb_raw_ep_io {
__u16 ep;
__u16 flags;
__u32 length;
__u8 data[0];
};
#define USB_RAW_EPS_NUM_MAX 30
#define USB_RAW_EP_NAME_MAX 16
#define USB_RAW_EP_ADDR_ANY 0xff
struct usb_raw_ep_caps {
__u32 type_control : 1;
__u32 type_iso : 1;
__u32 type_bulk : 1;
__u32 type_int : 1;
__u32 dir_in : 1;
__u32 dir_out : 1;
};
struct usb_raw_ep_limits {
__u16 maxpacket_limit;
__u16 max_streams;
__u32 reserved;
};
struct usb_raw_ep_info {
__u8 name[USB_RAW_EP_NAME_MAX];
__u32 addr;
struct usb_raw_ep_caps caps;
struct usb_raw_ep_limits limits;
};
struct usb_raw_eps_info {
struct usb_raw_ep_info eps[USB_RAW_EPS_NUM_MAX];
};
#define USB_RAW_IOCTL_INIT _IOW('U', 0, struct usb_raw_init)
#define USB_RAW_IOCTL_RUN _IO('U', 1)
#define USB_RAW_IOCTL_EVENT_FETCH _IOR('U', 2, struct usb_raw_event)
#define USB_RAW_IOCTL_EP0_WRITE _IOW('U', 3, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_EP0_READ _IOWR('U', 4, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_EP_ENABLE _IOW('U', 5, struct usb_endpoint_descriptor)
#define USB_RAW_IOCTL_EP_DISABLE _IOW('U', 6, __u32)
#define USB_RAW_IOCTL_EP_WRITE _IOW('U', 7, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_EP_READ _IOWR('U', 8, struct usb_raw_ep_io)
#define USB_RAW_IOCTL_CONFIGURE _IO('U', 9)
#define USB_RAW_IOCTL_VBUS_DRAW _IOW('U', 10, __u32)
#define USB_RAW_IOCTL_EPS_INFO _IOR('U', 11, struct usb_raw_eps_info)
#define USB_RAW_IOCTL_EP0_STALL _IO('U', 12)
#define USB_RAW_IOCTL_EP_SET_HALT _IOW('U', 13, __u32)
#define USB_RAW_IOCTL_EP_CLEAR_HALT _IOW('U', 14, __u32)
#define USB_RAW_IOCTL_EP_SET_WEDGE _IOW('U', 15, __u32)
static int usb_raw_open()
{
return open("/dev/raw-gadget", O_RDWR);
}
static int usb_raw_init(int fd, uint32_t speed, const char* driver, const char* device)
{
struct usb_raw_init arg;
strncpy((char*)&arg.driver_name[0], driver, sizeof(arg.driver_name));
strncpy((char*)&arg.device_name[0], device, sizeof(arg.device_name));
arg.speed = speed;
return ioctl(fd, USB_RAW_IOCTL_INIT, &arg);
}
static int usb_raw_run(int fd)
{
return ioctl(fd, USB_RAW_IOCTL_RUN, 0);
}
static int usb_raw_ep_write(int fd, struct usb_raw_ep_io* io)
{
return ioctl(fd, USB_RAW_IOCTL_EP_WRITE, io);
}
static int usb_raw_configure(int fd)
{
return ioctl(fd, USB_RAW_IOCTL_CONFIGURE, 0);
}
static int usb_raw_vbus_draw(int fd, uint32_t power)
{
return ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, power);
}
static int usb_raw_ep0_write(int fd, struct usb_raw_ep_io* io)
{
return ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io);
}
static int usb_raw_ep0_read(int fd, struct usb_raw_ep_io* io)
{
return ioctl(fd, USB_RAW_IOCTL_EP0_READ, io);
}
static int usb_raw_event_fetch(int fd, struct usb_raw_event* event)
{
return ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event);
}
static int usb_raw_ep_enable(int fd, struct usb_endpoint_descriptor* desc)
{
return ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, desc);
}
static int usb_raw_ep_disable(int fd, int ep)
{
return ioctl(fd, USB_RAW_IOCTL_EP_DISABLE, ep);
}
static int usb_raw_ep0_stall(int fd)
{
return ioctl(fd, USB_RAW_IOCTL_EP0_STALL, 0);
}
static int lookup_interface(int fd, uint8_t bInterfaceNumber, uint8_t bAlternateSetting)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return -1;
for (int i = 0; i < index->ifaces_num; i++) {
if (index->ifaces[i].bInterfaceNumber == bInterfaceNumber &&
index->ifaces[i].bAlternateSetting == bAlternateSetting)
return i;
}
return -1;
}
static int lookup_endpoint(int fd, uint8_t bEndpointAddress)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return -1;
if (index->iface_cur < 0)
return -1;
for (int ep = 0; ep < index->ifaces[index->iface_cur].eps_num; ep++)
if (index->ifaces[index->iface_cur].eps[ep].desc.bEndpointAddress == bEndpointAddress)
return index->ifaces[index->iface_cur].eps[ep].handle;
return -1;
}
#define USB_MAX_PACKET_SIZE 4096
struct usb_raw_control_event {
struct usb_raw_event inner;
struct usb_ctrlrequest ctrl;
char data[USB_MAX_PACKET_SIZE];
};
struct usb_raw_ep_io_data {
struct usb_raw_ep_io inner;
char data[USB_MAX_PACKET_SIZE];
};
static void set_interface(int fd, int n)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return;
if (index->iface_cur >= 0 && index->iface_cur < index->ifaces_num) {
for (int ep = 0; ep < index->ifaces[index->iface_cur].eps_num; ep++) {
int rv = usb_raw_ep_disable(fd, index->ifaces[index->iface_cur].eps[ep].handle);
if (rv < 0) {
} else {
}
}
}
if (n >= 0 && n < index->ifaces_num) {
for (int ep = 0; ep < index->ifaces[n].eps_num; ep++) {
int rv = usb_raw_ep_enable(fd, &index->ifaces[n].eps[ep].desc);
if (rv < 0) {
} else {
index->ifaces[n].eps[ep].handle = rv;
}
}
index->iface_cur = n;
}
}
static int configure_device(int fd)
{
struct usb_device_index* index = lookup_usb_index(fd);
if (!index)
return -1;
int rv = usb_raw_vbus_draw(fd, index->bMaxPower);
if (rv < 0) {
return rv;
}
rv = usb_raw_configure(fd);
if (rv < 0) {
return rv;
}
set_interface(fd, 0);
return 0;
}
static volatile long syz_usb_connect_impl(uint64_t speed, uint64_t dev_len, const char* dev,
const struct vusb_connect_descriptors* descs,
lookup_connect_out_response_t lookup_connect_response_out)
{
if (!dev) {
return -1;
}
int fd = usb_raw_open();
if (fd < 0) {
return fd;
}
if (fd >= MAX_FDS) {
close(fd);
return -1;
}
struct usb_device_index* index = add_usb_index(fd, dev, dev_len);
if (!index) {
return -1;
}
char device[32];
sprintf(&device[0], "dummy_udc.%llu", procid);
int rv = usb_raw_init(fd, speed, "dummy_udc", &device[0]);
if (rv < 0) {
return rv;
}
rv = usb_raw_run(fd);
if (rv < 0) {
return rv;
}
bool done = false;
while (!done) {
struct usb_raw_control_event event;
event.inner.type = 0;
event.inner.length = sizeof(event.ctrl);
rv = usb_raw_event_fetch(fd, (struct usb_raw_event*)&event);
if (rv < 0) {
return rv;
}
if (event.inner.type != USB_RAW_EVENT_CONTROL)
continue;
char* response_data = NULL;
uint32_t response_length = 0;
struct usb_qualifier_descriptor qual;
if (event.ctrl.bRequestType & USB_DIR_IN) {
if (!lookup_connect_response_in(fd, descs, &event.ctrl, &qual, &response_data, &response_length)) {
usb_raw_ep0_stall(fd);
continue;
}
} else {
if (!lookup_connect_response_out(fd, descs, &event.ctrl, &done)) {
usb_raw_ep0_stall(fd);
continue;
}
response_data = NULL;
response_length = event.ctrl.wLength;
}
if ((event.ctrl.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD &&
event.ctrl.bRequest == USB_REQ_SET_CONFIGURATION) {
rv = configure_device(fd);
if (rv < 0) {
return rv;
}
}
struct usb_raw_ep_io_data response;
response.inner.ep = 0;
response.inner.flags = 0;
if (response_length > sizeof(response.data))
response_length = 0;
if (event.ctrl.wLength < response_length)
response_length = event.ctrl.wLength;
response.inner.length = response_length;
if (response_data)
memcpy(&response.data[0], response_data, response_length);
else
memset(&response.data[0], 0, response_length);
if (event.ctrl.bRequestType & USB_DIR_IN) {
rv = usb_raw_ep0_write(fd, (struct usb_raw_ep_io*)&response);
} else {
rv = usb_raw_ep0_read(fd, (struct usb_raw_ep_io*)&response);
}
if (rv < 0) {
return rv;
}
}
sleep_ms(200);
return fd;
}
static volatile long syz_usb_connect(volatile long a0, volatile long a1, volatile long a2, volatile long a3)
{
uint64_t speed = a0;
uint64_t dev_len = a1;
const char* dev = (const char*)a2;
const struct vusb_connect_descriptors* descs = (const struct vusb_connect_descriptors*)a3;
return syz_usb_connect_impl(speed, dev_len, dev, descs, &lookup_connect_response_out_generic);
}
static volatile long syz_usb_control_io(volatile long a0, volatile long a1, volatile long a2)
{
int fd = a0;
const struct vusb_descriptors* descs = (const struct vusb_descriptors*)a1;
const struct vusb_responses* resps = (const struct vusb_responses*)a2;
struct usb_raw_control_event event;
event.inner.type = 0;
event.inner.length = USB_MAX_PACKET_SIZE;
int rv = usb_raw_event_fetch(fd, (struct usb_raw_event*)&event);
if (rv < 0) {
return rv;
}
if (event.inner.type != USB_RAW_EVENT_CONTROL) {
return -1;
}
char* response_data = NULL;
uint32_t response_length = 0;
if ((event.ctrl.bRequestType & USB_DIR_IN) && event.ctrl.wLength) {
if (!lookup_control_response(descs, resps, &event.ctrl, &response_data, &response_length)) {
usb_raw_ep0_stall(fd);
return -1;
}
} else {
if ((event.ctrl.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD ||
event.ctrl.bRequest == USB_REQ_SET_INTERFACE) {
int iface_num = event.ctrl.wIndex;
int alt_set = event.ctrl.wValue;
int iface_index = lookup_interface(fd, iface_num, alt_set);
if (iface_index < 0) {
} else {
set_interface(fd, iface_index);
}
}
response_length = event.ctrl.wLength;
}
struct usb_raw_ep_io_data response;
response.inner.ep = 0;
response.inner.flags = 0;
if (response_length > sizeof(response.data))
response_length = 0;
if (event.ctrl.wLength < response_length)
response_length = event.ctrl.wLength;
if ((event.ctrl.bRequestType & USB_DIR_IN) && !event.ctrl.wLength) {
response_length = USB_MAX_PACKET_SIZE;
}
response.inner.length = response_length;
if (response_data)
memcpy(&response.data[0], response_data, response_length);
else
memset(&response.data[0], 0, response_length);
if ((event.ctrl.bRequestType & USB_DIR_IN) && event.ctrl.wLength) {
rv = usb_raw_ep0_write(fd, (struct usb_raw_ep_io*)&response);
} else {
rv = usb_raw_ep0_read(fd, (struct usb_raw_ep_io*)&response);
}
if (rv < 0) {
return rv;
}
sleep_ms(200);
return 0;
}
static volatile long syz_usb_ep_write(volatile long a0, volatile long a1, volatile long a2, volatile long a3)
{
int fd = a0;
uint8_t ep = a1;
uint32_t len = a2;
char* data = (char*)a3;
int ep_handle = lookup_endpoint(fd, ep);
if (ep_handle < 0) {
return -1;
}
struct usb_raw_ep_io_data io_data;
io_data.inner.ep = ep_handle;
io_data.inner.flags = 0;
if (len > sizeof(io_data.data))
len = sizeof(io_data.data);
io_data.inner.length = len;
memcpy(&io_data.data[0], data, len);
int rv = usb_raw_ep_write(fd, (struct usb_raw_ep_io*)&io_data);
if (rv < 0) {
return rv;
}
sleep_ms(200);
return 0;
}
static volatile long syz_usb_disconnect(volatile long a0)
{
int fd = a0;
int rv = close(fd);
sleep_ms(200);
return rv;
}
uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
const char* reason;
(void)reason;
intptr_t res = 0;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// syz_usb_connect$hid arguments: [
// speed: usb_device_speed = 0x0 (8 bytes)
// dev_len: len = 0x36 (8 bytes)
// dev: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {12 01 00 00 00 00 00 40 26 09 33 33 40 00 00 00 00 01 09 02 24 00 01 00 00 00 00 09 04 00 00 01 03 01 00 00 09 21 00 00 00 01 22 01 00 09 05 81 03 08} (length 0x32)
// }
// }
// }
// conn_descs: nil
// ]
// returns fd_usb_hid
memcpy((void*)0x200000000000, "... [truncated large byte array] ...", 50);
res = -1;
res = syz_usb_connect(/*speed=*/0, /*dev_len=*/0x36, /*dev=*/0x200000000000, /*conn_descs=*/0);
if (res != -1)
r[0] = res;
// syz_usb_disconnect arguments: [
// fd: fd_usb (resource)
// ]
syz_usb_disconnect(/*fd=*/r[0]);
// syz_usb_connect$hid arguments: [
// speed: usb_device_speed = 0x3 (8 bytes)
// dev_len: len = 0x36 (8 bytes)
// dev: ptr[in, usb_device_descriptor_hid] {
// usb_device_descriptor_hid {
// inner: usb_device_descriptor_verbose_t[flags[usb_versions, int16], 0, 0, 0, flags[usb_device_max_packet_sizes, int8], 0, 0, 64, array[usb_config_descriptor_hid, 1]] {
// bLength: const = 0x12 (1 bytes)
// bDescriptorType: const = 0x1 (1 bytes)
// bcdUSB: usb_versions = 0x0 (2 bytes)
// bDeviceClass: const = 0x0 (1 bytes)
// bDeviceSubClass: const = 0x0 (1 bytes)
// bDeviceProtocol: const = 0x0 (1 bytes)
// bMaxPacketSize0: usb_device_max_packet_sizes = 0x10 (1 bytes)
// idVendor: const = 0x4d8 (2 bytes)
// idProduct: const = 0xdd (2 bytes)
// bcdDevice: const = 0x0 (2 bytes)
// iManufacturer: const = 0x0 (1 bytes)
// iProduct: const = 0x0 (1 bytes)
// iSerialNumber: const = 0x0 (1 bytes)
// bNumConfigurations: len = 0x1 (1 bytes)
// configs: array[usb_config_descriptor_hid] {
// usb_config_descriptor_hid {
// inner: usb_config_descriptor_verbose_t[const[1, int8], len[interfaces, int8], int8, flags[usb_config_attributes, int8], int8, void, array[usb_interface_descriptor_hid, 1]] {
// bLength: const = 0x9 (1 bytes)
// bDescriptorType: const = 0x2 (1 bytes)
// wTotalLength: len = 0x24 (2 bytes)
// bNumInterfaces: len = 0x1 (1 bytes)
// bConfigurationValue: const = 0x0 (1 bytes)
// iConfiguration: int8 = 0x0 (1 bytes)
// bmAttributes: usb_config_attributes = 0x0 (1 bytes)
// bMaxPower: int8 = 0x0 (1 bytes)
// extra: buffer: {} (length 0x0)
// interfaces: array[usb_interface_descriptor_hid] {
// usb_interface_descriptor_hid {
// inner: usb_interface_descriptor_verbose_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], int8, usb_hid_descriptor_hid, usb_endpoint_descriptors_hid] {
// bLength: const = 0x9 (1 bytes)
// bDescriptorType: const = 0x4 (1 bytes)
// bInterfaceNumber: const = 0x0 (1 bytes)
// bAlternateSetting: int8 = 0x0 (1 bytes)
// bNumEndpoints: int8 = 0x0 (1 bytes)
// bInterfaceClass: const = 0x3 (1 bytes)
// bInterfaceSubClass: const = 0x1 (1 bytes)
// bInterfaceProtocol: usb_hid_protocols = 0x0 (1 bytes)
// iInterface: int8 = 0x0 (1 bytes)
// extra: usb_hid_descriptor_hid {
// bLength: len = 0x0 (1 bytes)
// bDescriptorType: const = 0x21 (1 bytes)
// bcdHID: int16 = 0x0 (2 bytes)
// bCountryCode: int8 = 0x0 (1 bytes)
// bNumDescriptors: const = 0x1 (1 bytes)
// report_desc: usb_hid_class_descriptor_report {
// bDescriptorType: const = 0x22 (1 bytes)
// wDescriptorLength: int16 = 0x0 (2 bytes)
// }
// }
// endpoints: usb_endpoint_descriptors_hid {
// in: usb_endpoint_descriptor_hid_in {
// inner: usb_endpoint_descriptor_verbose_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], flags[usb_endpoint_max_packet_sizes, int16], int8, int8, int8, void] {
// bLength: const = 0x9 (1 bytes)
// bDescriptorType: const = 0x5 (1 bytes)
// bEndpointAddress: const = 0x81 (1 bytes)
// bmAttributes: const = 0x3 (1 bytes)
// wMaxPacketSize: usb_endpoint_max_packet_sizes = 0x0 (2 bytes)
// bInterval: int8 = 0x0 (1 bytes)
// bRefresh: int8 = 0x0 (1 bytes)
// bSynchAddress: int8 = 0x0 (1 bytes)
// extra: buffer: {} (length 0x0)
// }
// }
// out: array[usb_endpoint_descriptor_hid_out] {
// }
// }
// }
// }
// }
// }
// }
// }
// }
// }
// }
// conn_descs: nil
// ]
// returns fd_usb_hid
*(uint8_t*)0x200000000000 = 0x12;
*(uint8_t*)0x200000000001 = 1;
*(uint16_t*)0x200000000002 = 0;
*(uint8_t*)0x200000000004 = 0;
*(uint8_t*)0x200000000005 = 0;
*(uint8_t*)0x200000000006 = 0;
*(uint8_t*)0x200000000007 = 0x10;
*(uint16_t*)0x200000000008 = 0x4d8;
*(uint16_t*)0x20000000000a = 0xdd;
*(uint16_t*)0x20000000000c = 0;
*(uint8_t*)0x20000000000e = 0;
*(uint8_t*)0x20000000000f = 0;
*(uint8_t*)0x200000000010 = 0;
*(uint8_t*)0x200000000011 = 1;
*(uint8_t*)0x200000000012 = 9;
*(uint8_t*)0x200000000013 = 2;
*(uint16_t*)0x200000000014 = 0x24;
*(uint8_t*)0x200000000016 = 1;
*(uint8_t*)0x200000000017 = 0;
*(uint8_t*)0x200000000018 = 0;
*(uint8_t*)0x200000000019 = 0;
*(uint8_t*)0x20000000001a = 0;
*(uint8_t*)0x20000000001b = 9;
*(uint8_t*)0x20000000001c = 4;
*(uint8_t*)0x20000000001d = 0;
*(uint8_t*)0x20000000001e = 0;
*(uint8_t*)0x20000000001f = 0;
*(uint8_t*)0x200000000020 = 3;
*(uint8_t*)0x200000000021 = 1;
*(uint8_t*)0x200000000022 = 0;
*(uint8_t*)0x200000000023 = 0;
*(uint8_t*)0x200000000024 = 0;
*(uint8_t*)0x200000000025 = 0x21;
*(uint16_t*)0x200000000026 = 0;
*(uint8_t*)0x200000000028 = 0;
*(uint8_t*)0x200000000029 = 1;
*(uint8_t*)0x20000000002a = 0x22;
*(uint16_t*)0x20000000002b = 0;
*(uint8_t*)0x20000000002d = 9;
*(uint8_t*)0x20000000002e = 5;
*(uint8_t*)0x20000000002f = 0x81;
*(uint8_t*)0x200000000030 = 3;
*(uint16_t*)0x200000000031 = 0;
*(uint8_t*)0x200000000033 = 0;
*(uint8_t*)0x200000000034 = 0;
*(uint8_t*)0x200000000035 = 0;
res = -1;
res = syz_usb_connect(/*speed=USB_SPEED_HIGH*/3, /*dev_len=*/0x36, /*dev=*/0x200000000000, /*conn_descs=*/0);
if (res != -1)
r[1] = res;
// syz_usb_control_io arguments: [
// fd: fd_usb (resource)
// descs: nil
// resps: nil
// ]
syz_usb_control_io(/*fd=*/r[1], /*descs=*/0, /*resps=*/0);
// syz_usb_control_io arguments: [
// fd: fd_usb (resource)
// descs: ptr[in, vusb_descriptors] {
// vusb_descriptors {
// len: len = 0x2c (4 bytes)
// generic: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {00 00 08 00 00 00 08 04 82} (length 0x9)
// }
// }
// }
// string: nil
// bos: nil
// hub_hs: nil
// hub_ss: nil
// }
// }
// resps: nil
// ]
*(uint32_t*)0x2000000003c0 = 0x2c;
*(uint64_t*)0x2000000003c4 = 0x200000000100;
memcpy((void*)0x200000000100, "\x00\x00\x08\x00\x00\x00\x08\x04\x82", 9);
*(uint64_t*)0x2000000003cc = 0;
*(uint64_t*)0x2000000003d4 = 0;
*(uint64_t*)0x2000000003dc = 0;
*(uint64_t*)0x2000000003e4 = 0;
syz_usb_control_io(/*fd=*/r[1], /*descs=*/0x2000000003c0, /*resps=*/0);
// syz_usb_ep_write arguments: [
// fd: fd_usb (resource)
// ep: int8 = 0x81 (1 bytes)
// len: len = 0x1 (8 bytes)
// data: ptr[in, buffer] {
// buffer: {50 62 7b} (length 0x3)
// }
// ]
memcpy((void*)0x200000000040, "Pb{", 3);
syz_usb_ep_write(/*fd=*/r[0], /*ep=*/0x81, /*len=*/1, /*data=*/0x200000000040);
return 0;
}
Reply: An analysis of the crash report and the source code reveals that the root cause is an **out-of-bounds read due to a negative array index** in `mcp2221_raw_event()`, combined with a lack of bounds checking on the incoming HID report size.
### Detailed Explanation
1. **Uninitialized State**:
When the `mcp2221` device is probed, its state structure is allocated using `devm_kzalloc()`, which zero-initializes all fields. The `mcp->gp_idx` field (a `u8`) is initialized to `0`. It is only updated to a valid positive offset (e.g., 3, 7, 11, or 15) when the GPIO subsystem invokes the driver's GPIO operations like `mcp_gpio_set()`.
2. **The Vulnerability**:
If the device sends an `MCP2221_GPIO_SET` (0x50) input report *before* any GPIO operations are performed (or if a malicious device/reproducer injects one), `mcp2221_raw_event()` processes the report while `mcp->gp_idx` is still `0`.
Looking at `drivers/hid/hid-mcp2221.c` around line 964:
```c
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
```
Because `mcp->gp_idx` is `0`, the expression `mcp->gp_idx - 1` promotes the `u8` to an `int`, resulting in `-1`. This causes the code to access `data[-1]`.
3. **Memory Layout and the KASAN Report**:
The `data` pointer passed to `mcp2221_raw_event()` points to the URB transfer buffer, which is allocated by the USB core via `kmalloc()` (e.g., from the `kmalloc-64` cache).
In the crashing scenario, the SLUB allocator placed this 64-byte buffer at the very beginning of a new page, exactly at address `ffff888111fe8000`.
When the code evaluates `data[-1]`, it reads the address `ffff888111fe7fff`. This address is the last byte of the *previous* physical page. As shown in the KASAN report, the previous page (`pfn:0x111fe0`) was an order-3 slab page belonging to the `task_struct` cache. The last `task_struct` object in that page ended at `ffff888111fe7500`, and the remainder of the page was SLUB padding/redzone (filled with `fc`).
KASAN intercepted the read at `ffff888111fe7fff` and correctly reported it as a slab-out-of-bounds read located 2815 bytes to the right of the `task_struct` object.
```text
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^ (data[-1] at ffff888111fe7fff)
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <-- data (urb->transfer_buffer)
```
### How to Fix
To fix this bug, `mcp2221_raw_event()` needs two corrections:
1. **Validate `mcp->gp_idx`**: Ensure that `mcp->gp_idx` is valid (e.g., `mcp->gp_idx > 0`) before using it as an array index.
2. **Bounds Checking**: The function completely lacks bounds checking on the `size` parameter. It blindly accesses `data[0]`, `data[1]`, and various other offsets (like `data[50]` in the `MCP2221_I2C_PARAM_OR_STATUS` case). It should verify that `size` is large enough for the specific report being processed before accessing the `data` array. |
| 8/2 | 2026/05/19 10:32 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 18290 output: 24 thoughts: 220 Thoughts: **KASAN Slab-Out-of-Bounds Read in MCP2221 Driver** Okay, so I'm looking at a KASAN report, specifically a slab-out-of-bounds read within the `mcp2221_raw_event` function. It's happening in `drivers/hid/hid-mcp2221.c` at line 964. The crash itself involves reading a single byte from address `ffff888111fe7fff`. The stack trace tells the story. The problem originates in `mcp2221_raw_event`, which then calls `__hid_input_report`, and that leads to `hid_irq_in`. So, the data coming from the USB interrupt handler in `hid-core` is likely the trigger. I need to focus on what `mcp2221_raw_event` is doing with the incoming data. Line 964 is the critical area, obviously, so let's examine the code surrounding that line and figure out where the bounds check is failing, or where the offset calculation is wrong. We'll need to figure out what data is being passed in, what it's trying to access, and how the driver is interpreting it. This likely involves understanding the MCP2221's HID report descriptor and how it maps to the driver's internal data structures. |
| 9/2 | 2026/05/19 10:32 | tool | grepper |
0mArgs:map[Expression:mcp2221_raw_event] Results: map[Output:drivers/hid/hid-mcp2221.c=820=static int mcp_get_i2c_eng_state(struct mcp2221 *mcp,
--
drivers/hid/hid-mcp2221.c-857- */
drivers/hid/hid-mcp2221.c:858:static int mcp2221_raw_event(struct hid_device *hdev,
drivers/hid/hid-mcp2221.c-859- struct hid_report *report, u8 *data, int size)
--
drivers/hid/hid-mcp2221.c=1352=static struct hid_driver mcp2221_driver = {
--
drivers/hid/hid-mcp2221.c-1356- .remove = mcp2221_remove,
drivers/hid/hid-mcp2221.c:1357: .raw_event = mcp2221_raw_event,
drivers/hid/hid-mcp2221.c-1358-};
] |
| 10/2 | 2026/05/19 10:32 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 19131 output: 53 thoughts: 27 Thoughts: Here's a summary of my thought process: **Diving into the MCP2221 HID Driver** Okay, let's get down to brass tacks. I need to understand what's happening within the `drivers/hid/hid-mcp2221.c` driver, specifically around line 964. My initial hypothesis is that something interesting is happening related to device interaction or perhaps error handling. Given my experience, I'm expecting to find either a critical function call, a decision point based on device state, or a section of code tied to a specific interrupt or event. The line number acts as a very specific anchor that should allow me to pinpoint a particular function, conditional statement, or important variable assignment within that area of the code. I'm expecting to quickly deduce the purpose of that piece of code once I've got my eyes on it. |
| 11/2 | 2026/05/19 10:32 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp2221_raw_event] Results: map[SourceCode: 849: /*
850: * MCP2221 uses interrupt endpoint for input reports. This function
851: * is called by HID layer when it receives i/p report from mcp2221,
852: * which is actually a response to the previously sent command.
853: *
854: * MCP2221A firmware specific return codes are parsed and 0 or
855: * appropriate negative error code is returned. Delayed response
856: * results in timeout error and stray reponses results in -EIO.
857: */
858: static int mcp2221_raw_event(struct hid_device *hdev,
859: struct hid_report *report, u8 *data, int size)
860: {
861: u8 *buf;
862: struct mcp2221 *mcp = hid_get_drvdata(hdev);
863:
864: switch (data[0]) {
865:
866: case MCP2221_I2C_WR_DATA:
867: case MCP2221_I2C_WR_NO_STOP:
868: case MCP2221_I2C_RD_DATA:
869: case MCP2221_I2C_RD_RPT_START:
870: switch (data[1]) {
871: case MCP2221_SUCCESS:
872: mcp->status = 0;
873: break;
874: default:
875: mcp->status = mcp_get_i2c_eng_state(mcp, data, 2);
876: }
877: complete(&mcp->wait_in_report);
878: break;
879:
880: case MCP2221_I2C_PARAM_OR_STATUS:
881: switch (data[1]) {
882: case MCP2221_SUCCESS:
883: if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
884: (data[3] != MCP2221_I2C_SET_SPEED)) {
885: mcp->status = -EAGAIN;
886: break;
887: }
888: if (data[20] & MCP2221_I2C_MASK_ADDR_NACK) {
889: mcp->status = -ENXIO;
890: break;
891: }
892: mcp->status = mcp_get_i2c_eng_state(mcp, data, 8);
893: #if IS_REACHABLE(CONFIG_IIO)
894: memcpy(&mcp->adc_values, &data[50], sizeof(mcp->adc_values));
895: #endif
896: break;
897: default:
898: mcp->status = -EIO;
899: }
900: complete(&mcp->wait_in_report);
901: break;
902:
903: case MCP2221_I2C_GET_DATA:
904: switch (data[1]) {
905: case MCP2221_SUCCESS:
906: if (data[2] == MCP2221_I2C_ADDR_NACK) {
907: mcp->status = -ENXIO;
908: break;
909: }
910: if (!mcp_get_i2c_eng_state(mcp, data, 2)
911: && (data[3] == 0)) {
912: mcp->status = 0;
913: break;
914: }
915: if (data[3] == 127) {
916: mcp->status = -EIO;
917: break;
918: }
919: if (data[2] == MCP2221_I2C_READ_COMPL ||
920: data[2] == MCP2221_I2C_READ_PARTIAL) {
921: if (!mcp->rxbuf || mcp->rxbuf_idx < 0 || data[3] > 60) {
922: mcp->status = -EINVAL;
923: break;
924: }
925: if (mcp->rxbuf_idx + data[3] > mcp->rxbuf_size) {
926: mcp->status = -EINVAL;
927: break;
928: }
929: buf = mcp->rxbuf;
930: memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
931: mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
932: mcp->status = 0;
933: break;
934: }
935: mcp->status = -EIO;
936: break;
937: default:
938: mcp->status = -EIO;
939: }
940: complete(&mcp->wait_in_report);
941: break;
942:
943: case MCP2221_GPIO_GET:
944: switch (data[1]) {
945: case MCP2221_SUCCESS:
946: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
947: (data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
948: mcp->status = -ENOENT;
949: } else {
950: mcp->status = !!data[mcp->gp_idx];
951: mcp->gpio_dir = data[mcp->gp_idx + 1];
952: }
953: break;
954: default:
955: mcp->status = -EAGAIN;
956: }
957: complete(&mcp->wait_in_report);
958: break;
959:
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
965: mcp->status = -ENOENT;
966: } else {
967: mcp->status = 0;
968: }
969: break;
970: default:
971: mcp->status = -EAGAIN;
972: }
973: complete(&mcp->wait_in_report);
974: break;
975:
976: case MCP2221_SET_SRAM_SETTINGS:
977: switch (data[1]) {
978: case MCP2221_SUCCESS:
979: mcp->status = 0;
980: break;
981: default:
982: mcp->status = -EAGAIN;
983: }
984: complete(&mcp->wait_in_report);
985: break;
986:
987: case MCP2221_GET_SRAM_SETTINGS:
988: switch (data[1]) {
989: case MCP2221_SUCCESS:
990: memcpy(&mcp->mode, &data[22], 4);
991: #if IS_REACHABLE(CONFIG_IIO)
992: mcp->dac_value = data[6] & GENMASK(4, 0);
993: #endif
994: mcp->status = 0;
995: break;
996: default:
997: mcp->status = -EAGAIN;
998: }
999: complete(&mcp->wait_in_report);
1000: break;
1001:
1002: case MCP2221_READ_FLASH_DATA:
1003: switch (data[1]) {
1004: case MCP2221_SUCCESS:
1005: mcp->status = 0;
1006:
1007: /* Only handles CHIP SETTINGS subpage currently */
1008: if (mcp->txbuf[1] != 0) {
1009: mcp->status = -EIO;
1010: break;
1011: }
1012:
1013: #if IS_REACHABLE(CONFIG_IIO)
1014: {
1015: u8 tmp;
1016: /* DAC scale value */
1017: tmp = FIELD_GET(GENMASK(7, 6), data[6]);
1018: if ((data[6] & BIT(5)) && tmp)
1019: mcp->dac_scale = tmp + 4;
1020: else
1021: mcp->dac_scale = 5;
1022:
1023: /* ADC scale value */
1024: tmp = FIELD_GET(GENMASK(4, 3), data[7]);
1025: if ((data[7] & BIT(2)) && tmp)
1026: mcp->adc_scale = tmp - 1;
1027: else
1028: mcp->adc_scale = 0;
1029: }
1030: #endif
1031:
1032: break;
1033: default:
1034: mcp->status = -EAGAIN;
1035: }
1036: complete(&mcp->wait_in_report);
1037: break;
1038:
1039: default:
1040: mcp->status = -EIO;
1041: complete(&mcp->wait_in_report);
1042: }
1043:
1044: return 1;
1045: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 12/2 | 2026/05/19 10:32 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 22436 output: 44 thoughts: 557 Thoughts: **Analyzing a Potential Out-of-Bounds Read in MCP2221 GPIO Handling** Okay, so I'm looking at this crash report, and it immediately flags a slab-out-of-bounds read, specifically on line 964 within the MCP2221 GPIO handling code. The error reports a read of size 1 at address `ffff888111fe7fff`. That address is apparently 2815 bytes past the end of an allocated 7296-byte region, according to the kernel output, which is associated with a `task_struct`. Initially, I was thinking `data` was related to the `task_struct`, but this doesn't quite make sense. `data` is a `u8` pointer, and the error report indicates the object at `ffff888111fe5880` belongs to the cache `task_struct`, which is odd. The report says the buggy address `ffff888111fe7fff` is located *2815* bytes to the right of allocated memory region [ffff888111fe5880, ffff888111fe7500]. Now, the math isn't quite adding up. `ffff888111fe7fff` is *not* `ffff888111fe5880 + 2815`, it's actually `ffff888111fe5880 + 10111`. However, I can see that `ffff888111fe7500` *is* the end of the `task_struct`. Hmm, so the crash is happening *far* past the end of the reported `task_struct`. I think the crash is in the context of the HID report. I need to trace where the `data` pointer comes from. It's related to HID report data. Okay, let's trace `data` back... in `__hid_input_report`, I can see that `data` is *not* `report->field[0]->value`. It looks like `data` is the raw report data passed to `raw_event`. Okay, I need to check `__hid_input_report` in `drivers/hid/hid-core.c` and figure out how this `data` is passed in and what the expected bounds are to pinpoint this out-of-bounds access. |
| 13/2 | 2026/05/19 10:32 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:__hid_input_report] Results: map[SourceCode:2109: static int __hid_input_report(struct hid_device *hid, enum hid_report_type type,
2110: u8 *data, size_t bufsize, u32 size, int interrupt, u64 source,
2111: bool from_bpf, bool lock_already_taken)
2112: {
2113: struct hid_report_enum *report_enum;
2114: struct hid_driver *hdrv;
2115: struct hid_report *report;
2116: int ret = 0;
2117:
2118: if (!hid)
2119: return -ENODEV;
2120:
2121: ret = down_trylock(&hid->driver_input_lock);
2122: if (lock_already_taken && !ret) {
2123: up(&hid->driver_input_lock);
2124: return -EINVAL;
2125: } else if (!lock_already_taken && ret) {
2126: return -EBUSY;
2127: }
2128:
2129: if (!hid->driver) {
2130: ret = -ENODEV;
2131: goto unlock;
2132: }
2133: report_enum = hid->report_enum + type;
2134: hdrv = hid->driver;
2135:
2136: data = dispatch_hid_bpf_device_event(hid, type, data, &bufsize, &size, interrupt,
2137: source, from_bpf);
2138: if (IS_ERR(data)) {
2139: ret = PTR_ERR(data);
2140: goto unlock;
2141: }
2142:
2143: if (!size) {
2144: dbg_hid("empty report\n");
2145: ret = -1;
2146: goto unlock;
2147: }
2148:
2149: /* Avoid unnecessary overhead if debugfs is disabled */
2150: if (!list_empty(&hid->debug_list))
2151: hid_dump_report(hid, type, data, size);
2152:
2153: report = hid_get_report(report_enum, data);
2154:
2155: if (!report) {
2156: ret = -1;
2157: goto unlock;
2158: }
2159:
2160: if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
2161: ret = hdrv->raw_event(hid, report, data, size);
2162: if (ret < 0)
2163: goto unlock;
2164: }
2165:
2166: ret = hid_report_raw_event(hid, type, data, bufsize, size, interrupt);
2167:
2168: unlock:
2169: if (!lock_already_taken)
2170: up(&hid->driver_input_lock);
2171: return ret;
2172: }
SourceFile:drivers/hid/hid-core.c] |
| 14/2 | 2026/05/19 10:32 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 24502 output: 47 thoughts: 42 Thoughts: Here's my understanding of the situation, given that I'm looking at this from an expert's perspective: **Deciphering the HID Input Report Flow** Okay, so I'm looking at the core of the USB HID input handling, specifically within the kernel. Let's break down what's happening. The crucial `data` buffer, that's the payload being passed to the `__hid_input_report` function. It's the raw data, the actual input report from the HID device that needs to be interpreted and presented to the appropriate system components. The context, and from this, likely originates within `hid_irq_in` in `drivers/hid/usbhid/hid-core.c`. |
| 15/2 | 2026/05/19 10:32 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:hid_irq_in] Results: map[SourceCode: 273: static void hid_irq_in(struct urb *urb)
274: {
275: struct hid_device *hid = urb->context;
276: struct usbhid_device *usbhid = hid->driver_data;
277: int status;
278:
279: switch (urb->status) {
280: case 0: /* success */
281: usbhid->retry_delay = 0;
282: if (!test_bit(HID_OPENED, &usbhid->iofl))
283: break;
284: usbhid_mark_busy(usbhid);
285: if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) {
286: hid_safe_input_report(urb->context, HID_INPUT_REPORT,
287: urb->transfer_buffer, urb->transfer_buffer_length,
288: urb->actual_length, 1);
289: /*
290: * autosuspend refused while keys are pressed
291: * because most keyboards don't wake up when
292: * a key is released
293: */
294: if (hid_check_keys_pressed(hid))
295: set_bit(HID_KEYS_PRESSED, &usbhid->iofl);
296: else
297: clear_bit(HID_KEYS_PRESSED, &usbhid->iofl);
298: }
299: break;
300: case -EPIPE: /* stall */
301: usbhid_mark_busy(usbhid);
302: clear_bit(HID_IN_RUNNING, &usbhid->iofl);
303: set_bit(HID_CLEAR_HALT, &usbhid->iofl);
304: schedule_work(&usbhid->reset_work);
305: return;
306: case -ECONNRESET: /* unlink */
307: case -ENOENT:
308: case -ESHUTDOWN: /* unplug */
309: clear_bit(HID_IN_RUNNING, &usbhid->iofl);
310: return;
311: case -EILSEQ: /* protocol error or unplug */
312: case -EPROTO: /* protocol error or unplug */
313: case -ETIME: /* protocol error or unplug */
314: case -ETIMEDOUT: /* Should never happen, but... */
315: usbhid_mark_busy(usbhid);
316: clear_bit(HID_IN_RUNNING, &usbhid->iofl);
317: hid_io_error(hid);
318: return;
319: default: /* error */
320: hid_warn(urb->dev, "input irq status %d received\n",
321: urb->status);
322: }
323:
324: status = usb_submit_urb(urb, GFP_ATOMIC);
325: if (status) {
326: clear_bit(HID_IN_RUNNING, &usbhid->iofl);
327: if (status != -EPERM) {
328: hid_err(hid, "can't resubmit intr, %s-%s/input%d, status %d\n",
329: hid_to_usb_dev(hid)->bus->bus_name,
330: hid_to_usb_dev(hid)->devpath,
331: usbhid->ifnum, status);
332: hid_io_error(hid);
333: }
334: }
335: }
SourceFile:drivers/hid/usbhid/hid-core.c] |
| 16/2 | 2026/05/19 10:32 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 25824 output: 28 thoughts: 234 Thoughts: **Debugging a Suspected USB HID Crash** Okay, so I'm tracking down this crash that seems to be originating within the `mcp2221_raw_event` function. It looks like the issue is related to how the driver handles data from USB input reports. I see that `hid_safe_input_report` calls `__hid_input_report`, and the size passed to that function is `urb->actual_length`. That sounds normal enough. Now, the crash itself is happening within a `switch` statement that appears to be dealing with GPIO configuration via the MCP2221 controller. Specifically, line 963 and 964 are using `data[mcp->gp_idx]` and `data[mcp->gp_idx - 1]`. The `data` buffer? That's coming directly from `urb->transfer_buffer`. Aha! `mcp->gp_idx` is the critical piece of this puzzle. It's an index into the `data` buffer, and it looks like a value that isn't being checked could be the root cause. This is a classic buffer overflow scenario if `mcp->gp_idx` is out of bounds. My next step is clear. I need to find all the places where `mcp->gp_idx` is set to fully understand how it could be set to a bad value. The source code is calling out to other functions that determine the index. |
| 17/2 | 2026/05/19 10:32 | tool | codesearch-find-references |
0mArgs:map[Name:mcp2221::gp_idx] Results: map[References:[map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp2221_raw_event SourceFile:drivers/hid/hid-mcp2221.c SourceLine:946] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp2221_raw_event SourceFile:drivers/hid/hid-mcp2221.c SourceLine:947] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp2221_raw_event SourceFile:drivers/hid/hid-mcp2221.c SourceLine:950] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp2221_raw_event SourceFile:drivers/hid/hid-mcp2221.c SourceLine:951] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp2221_raw_event SourceFile:drivers/hid/hid-mcp2221.c SourceLine:963] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp2221_raw_event SourceFile:drivers/hid/hid-mcp2221.c SourceLine:964] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_dir_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:755] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_dir_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:757] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_dir_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:758] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_get SourceFile:drivers/hid/hid-mcp2221.c SourceLine:720] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_get_direction SourceFile:drivers/hid/hid-mcp2221.c SourceLine:803] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:737] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:739] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:740]] TruncatedOutput:false] |
| 18/2 | 2026/05/19 10:32 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 27249 output: 49 thoughts: 40 Thoughts: Okay, let's dive into this. Here's how I'd approach that driver investigation: **Investigating `mcp_gpio_set` and `mcp_gpio_dir_set` in `drivers/hid/hid-mcp2221.c`** Alright, time to get my hands dirty. I need to understand how the MCP2221 GPIOs are controlled within the Linux kernel, specifically within the `hid-mcp2221` driver. My immediate goal is to understand the functions `mcp_gpio_set` and `mcp_gpio_dir_set`. I'll be digging into the code at `drivers/hid/hid-mcp2221.c` to see how these functions work. I need to quickly grasp how the GPIO lines are configured (input/output) and then how their logical state is subsequently set. I'll be paying close attention to any underlying USB communication calls, packet structures, and error handling related to interacting with the MCP2221 device itself. The goal is a clear understanding of the control flow: From function call to bit level manipulation on the MCP2221. |
| 19/2 | 2026/05/19 10:32 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp_gpio_set] Results: map[SourceCode: 729: static int mcp_gpio_set(struct gpio_chip *gc, unsigned int offset, int value)
730: {
731: struct mcp2221 *mcp = gpiochip_get_data(gc);
732: int ret;
733:
734: memset(mcp->txbuf, 0, 18);
735: mcp->txbuf[0] = MCP2221_GPIO_SET;
736:
737: mcp->gp_idx = offsetof(struct mcp_set_gpio, gpio[offset].value);
738:
739: mcp->txbuf[mcp->gp_idx - 1] = 1;
740: mcp->txbuf[mcp->gp_idx] = !!value;
741:
742: mutex_lock(&mcp->lock);
743: ret = mcp_send_data_req_status(mcp, mcp->txbuf, 18);
744: mutex_unlock(&mcp->lock);
745:
746: return ret;
747: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 20/2 | 2026/05/19 10:32 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 27950 output: 49 thoughts: 45 Thoughts: Okay, let me think this through. **Analyzing the `mcp->gp_idx` Calculation** Hmm, hold on a second. I'm seeing that `mcp->gp_idx` is derived using `offsetof(struct mcp_set_gpio, gpio[offset].value)`. Right, so this suggests we're working with a structure, `struct mcp_set_gpio`, where we're calculating an offset. I need to refresh my memory on that structure. Let me picture it... I need to consider how `gpio[offset].value` is arranged within it. What's the relationship between the `offset`, the structure definition, and the final index? I need to analyze how that offset is being interpreted within the context of the GPIO array. Understanding that should give me insight into the underlying memory layout and, ultimately, what `gp_idx` represents in relation to the GPIO configuration data. Right, let me look at `struct mcp_set_gpio` itself... |
| 21/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp_set_gpio] Results: map[SourceCode: 95: /* MCP GPIO set command layout */
96: struct mcp_set_gpio {
97: u8 cmd;
98: u8 dummy;
99: struct {
100: u8 change_value;
101: u8 value;
102: u8 change_direction;
103: u8 direction;
104: } gpio[MCP_NGPIO];
105: } __packed;
SourceFile:drivers/hid/hid-mcp2221.c] |
| 22/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 28421 output: 53 thoughts: 463 Thoughts: **Analyzing Potential Out-of-Bounds Read in MCP2221 Driver** Okay, so I'm digging into this `mcp2221_raw_event` function. It seems like `MCP_NGPIO` is likely equal to 4, which is a common assumption. Now, thinking about the structure layout, `offsetof(struct mcp_set_gpio, gpio[offset].value)` calculates the offset. That should equate to `2 + offset * 4 + 1`. This means when the `offset` is 0, we're looking at an index of 3 in the `gp_idx` array. With an `offset` of 1, `gp_idx` becomes 7. Continuing, an offset of 2 implies an `gp_idx` of 11, and with an offset of 3 it's 15. Now, looking at the code snippet in `mcp2221_raw_event` with `MCP2221_GPIO_SET`, I see a potentially vulnerable area. The code is checking `data[mcp->gp_idx]` based on some success code. Wait, `data` is the input report. And the critical point is: how big is that input report? The report size is determined by the HID descriptor, which is crucial. Aha! In that syzkaller reproducer, the IN endpoint's `wMaxPacketSize` is reported as 0. This is a potential red flag. Zero packet size in an IN endpoint? That doesn't make sense! However, `size` passed to `mcp2221_raw_event` is `urb->actual_length`. That variable holds what actually arrived. If `urb->actual_length` is small (e.g., just 1 byte), accessing `data[mcp->gp_idx]` could trigger an out-of-bounds read. This is definitely something I need to check. I need to see if `mcp2221_raw_event` actually checks `size` before accessing the `data` array. A missing size check here could lead to a serious vulnerability. Let's see if there's any validation, or if it is just assuming that the `actual_length` will always be big enough. |
| 23/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp2221_raw_event] Results: map[SourceCode: 849: /*
850: * MCP2221 uses interrupt endpoint for input reports. This function
851: * is called by HID layer when it receives i/p report from mcp2221,
852: * which is actually a response to the previously sent command.
853: *
854: * MCP2221A firmware specific return codes are parsed and 0 or
855: * appropriate negative error code is returned. Delayed response
856: * results in timeout error and stray reponses results in -EIO.
857: */
858: static int mcp2221_raw_event(struct hid_device *hdev,
859: struct hid_report *report, u8 *data, int size)
860: {
861: u8 *buf;
862: struct mcp2221 *mcp = hid_get_drvdata(hdev);
863:
864: switch (data[0]) {
865:
866: case MCP2221_I2C_WR_DATA:
867: case MCP2221_I2C_WR_NO_STOP:
868: case MCP2221_I2C_RD_DATA:
869: case MCP2221_I2C_RD_RPT_START:
870: switch (data[1]) {
871: case MCP2221_SUCCESS:
872: mcp->status = 0;
873: break;
874: default:
875: mcp->status = mcp_get_i2c_eng_state(mcp, data, 2);
876: }
877: complete(&mcp->wait_in_report);
878: break;
879:
880: case MCP2221_I2C_PARAM_OR_STATUS:
881: switch (data[1]) {
882: case MCP2221_SUCCESS:
883: if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
884: (data[3] != MCP2221_I2C_SET_SPEED)) {
885: mcp->status = -EAGAIN;
886: break;
887: }
888: if (data[20] & MCP2221_I2C_MASK_ADDR_NACK) {
889: mcp->status = -ENXIO;
890: break;
891: }
892: mcp->status = mcp_get_i2c_eng_state(mcp, data, 8);
893: #if IS_REACHABLE(CONFIG_IIO)
894: memcpy(&mcp->adc_values, &data[50], sizeof(mcp->adc_values));
895: #endif
896: break;
897: default:
898: mcp->status = -EIO;
899: }
900: complete(&mcp->wait_in_report);
901: break;
902:
903: case MCP2221_I2C_GET_DATA:
904: switch (data[1]) {
905: case MCP2221_SUCCESS:
906: if (data[2] == MCP2221_I2C_ADDR_NACK) {
907: mcp->status = -ENXIO;
908: break;
909: }
910: if (!mcp_get_i2c_eng_state(mcp, data, 2)
911: && (data[3] == 0)) {
912: mcp->status = 0;
913: break;
914: }
915: if (data[3] == 127) {
916: mcp->status = -EIO;
917: break;
918: }
919: if (data[2] == MCP2221_I2C_READ_COMPL ||
920: data[2] == MCP2221_I2C_READ_PARTIAL) {
921: if (!mcp->rxbuf || mcp->rxbuf_idx < 0 || data[3] > 60) {
922: mcp->status = -EINVAL;
923: break;
924: }
925: if (mcp->rxbuf_idx + data[3] > mcp->rxbuf_size) {
926: mcp->status = -EINVAL;
927: break;
928: }
929: buf = mcp->rxbuf;
930: memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
931: mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
932: mcp->status = 0;
933: break;
934: }
935: mcp->status = -EIO;
936: break;
937: default:
938: mcp->status = -EIO;
939: }
940: complete(&mcp->wait_in_report);
941: break;
942:
943: case MCP2221_GPIO_GET:
944: switch (data[1]) {
945: case MCP2221_SUCCESS:
946: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
947: (data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
948: mcp->status = -ENOENT;
949: } else {
950: mcp->status = !!data[mcp->gp_idx];
951: mcp->gpio_dir = data[mcp->gp_idx + 1];
952: }
953: break;
954: default:
955: mcp->status = -EAGAIN;
956: }
957: complete(&mcp->wait_in_report);
958: break;
959:
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
965: mcp->status = -ENOENT;
966: } else {
967: mcp->status = 0;
968: }
969: break;
970: default:
971: mcp->status = -EAGAIN;
972: }
973: complete(&mcp->wait_in_report);
974: break;
975:
976: case MCP2221_SET_SRAM_SETTINGS:
977: switch (data[1]) {
978: case MCP2221_SUCCESS:
979: mcp->status = 0;
980: break;
981: default:
982: mcp->status = -EAGAIN;
983: }
984: complete(&mcp->wait_in_report);
985: break;
986:
987: case MCP2221_GET_SRAM_SETTINGS:
988: switch (data[1]) {
989: case MCP2221_SUCCESS:
990: memcpy(&mcp->mode, &data[22], 4);
991: #if IS_REACHABLE(CONFIG_IIO)
992: mcp->dac_value = data[6] & GENMASK(4, 0);
993: #endif
994: mcp->status = 0;
995: break;
996: default:
997: mcp->status = -EAGAIN;
998: }
999: complete(&mcp->wait_in_report);
1000: break;
1001:
1002: case MCP2221_READ_FLASH_DATA:
1003: switch (data[1]) {
1004: case MCP2221_SUCCESS:
1005: mcp->status = 0;
1006:
1007: /* Only handles CHIP SETTINGS subpage currently */
1008: if (mcp->txbuf[1] != 0) {
1009: mcp->status = -EIO;
1010: break;
1011: }
1012:
1013: #if IS_REACHABLE(CONFIG_IIO)
1014: {
1015: u8 tmp;
1016: /* DAC scale value */
1017: tmp = FIELD_GET(GENMASK(7, 6), data[6]);
1018: if ((data[6] & BIT(5)) && tmp)
1019: mcp->dac_scale = tmp + 4;
1020: else
1021: mcp->dac_scale = 5;
1022:
1023: /* ADC scale value */
1024: tmp = FIELD_GET(GENMASK(4, 3), data[7]);
1025: if ((data[7] & BIT(2)) && tmp)
1026: mcp->adc_scale = tmp - 1;
1027: else
1028: mcp->adc_scale = 0;
1029: }
1030: #endif
1031:
1032: break;
1033: default:
1034: mcp->status = -EAGAIN;
1035: }
1036: complete(&mcp->wait_in_report);
1037: break;
1038:
1039: default:
1040: mcp->status = -EIO;
1041: complete(&mcp->wait_in_report);
1042: }
1043:
1044: return 1;
1045: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 24/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 32469 output: 46 thoughts: 132 Thoughts: **Concerning Potential Buffer Overflows in MCP2221 Driver** Okay, so I'm looking at this `mcp2221_raw_event` function, and my initial concern is immediately jumping out at me. I'm seeing no boundary check for the `size` parameter. It just blithely accesses `data[0]`, `data[1]`, and even `data[mcp->gp_idx]`. Clearly, if the reported `size` is smaller than any of those accessed indices, we've got a classic out-of-bounds read vulnerability staring us in the face. This is precisely the kind of thing that leads to security holes. Right, so `data` is tied to `urb->transfer_buffer`. Okay. Now, where is `urb->transfer_buffer` allocated and sized? This means I need to go trace its origin. It looks like `hid_alloc_buffers` is the likely candidate. I'll need to check the allocation and sizing logic within that function, located in `drivers/hid/usbhid/hid-core.c`, to see if the allocation size is properly handled. I need to understand how the allocation size interacts with the `size` parameter in the `mcp2221_raw_event` function. This is a critical point that needs a thorough investigation to ensure no unexpected behaviors are possible. |
| 25/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:hid_alloc_buffers] Results: map[SourceCode: 854: static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid)
855: {
856: struct usbhid_device *usbhid = hid->driver_data;
857:
858: usbhid->inbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
859: &usbhid->inbuf_dma);
860: usbhid->outbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
861: &usbhid->outbuf_dma);
862: usbhid->cr = kmalloc_obj(*usbhid->cr);
863: usbhid->ctrlbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
864: &usbhid->ctrlbuf_dma);
865: if (!usbhid->inbuf || !usbhid->outbuf || !usbhid->cr ||
866: !usbhid->ctrlbuf)
867: return -1;
868:
869: return 0;
870: }
SourceFile:drivers/hid/usbhid/hid-core.c] |
| 26/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 33286 output: 45 thoughts: 16 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **My Internal USB HID Buffer Calculation** Alright, so the `usbhid->bufsize`, that's the buffer size for USB HID (Human Interface Device) transfers, and I remember that's calculated during the `usbhid_start` function. That's the setup stage, right? Before any actual data transfer can happen, I need to figure out how much memory to allocate for the buffer. It's not a static value; the size depends on some factors. I have to think, what parameters are involved in determining the initial `bufsize`? Is it driven by the HID descriptor, perhaps? Or is there some negotiation involved during device enumeration that affects it? I should re-examine the `usbhid_start` code path in more detail. I need to make sure I understand the logic that results in that calculation to see if there's an opportunity to optimize things based on known device characteristics or potential traffic patterns. Gotta review how the endpoint descriptors and HID reports impact the allocation. |
| 27/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:usbhid_start] Results: map[SourceCode:1081: static int usbhid_start(struct hid_device *hid)
1082: {
1083: struct usb_interface *intf = to_usb_interface(hid->dev.parent);
1084: struct usb_host_interface *interface = intf->cur_altsetting;
1085: struct usb_device *dev = interface_to_usbdev(intf);
1086: struct usbhid_device *usbhid = hid->driver_data;
1087: unsigned int n, insize = 0;
1088: int ret;
1089:
1090: mutex_lock(&usbhid->mutex);
1091:
1092: clear_bit(HID_DISCONNECTED, &usbhid->iofl);
1093:
1094: usbhid->bufsize = HID_MIN_BUFFER_SIZE;
1095: hid_find_max_report(hid, HID_INPUT_REPORT, &usbhid->bufsize);
1096: hid_find_max_report(hid, HID_OUTPUT_REPORT, &usbhid->bufsize);
1097: hid_find_max_report(hid, HID_FEATURE_REPORT, &usbhid->bufsize);
1098:
1099: if (usbhid->bufsize > HID_MAX_BUFFER_SIZE)
1100: usbhid->bufsize = HID_MAX_BUFFER_SIZE;
1101:
1102: hid_find_max_report(hid, HID_INPUT_REPORT, &insize);
1103:
1104: if (insize > HID_MAX_BUFFER_SIZE)
1105: insize = HID_MAX_BUFFER_SIZE;
1106:
1107: if (hid_alloc_buffers(dev, hid)) {
1108: ret = -ENOMEM;
1109: goto fail;
1110: }
1111:
1112: for (n = 0; n < interface->desc.bNumEndpoints; n++) {
1113: struct usb_endpoint_descriptor *endpoint;
1114: int pipe;
1115: int interval;
1116:
1117: endpoint = &interface->endpoint[n].desc;
1118: if (!usb_endpoint_xfer_int(endpoint))
1119: continue;
1120:
1121: interval = endpoint->bInterval;
1122:
1123: /* Some vendors give fullspeed interval on highspeed devices */
1124: if (hid->quirks & HID_QUIRK_FULLSPEED_INTERVAL &&
1125: dev->speed == USB_SPEED_HIGH) {
1126: interval = fls(endpoint->bInterval*8);
1127: pr_info("%s: Fixing fullspeed to highspeed interval: %d -> %d\n",
1128: hid->name, endpoint->bInterval, interval);
1129: }
1130:
1131: /* Change the polling interval of mice, joysticks
1132: * and keyboards.
1133: */
1134: switch (hid->collection->usage) {
1135: case HID_GD_MOUSE:
1136: if (hid_mousepoll_interval > 0)
1137: interval = hid_mousepoll_interval;
1138: break;
1139: case HID_GD_JOYSTICK:
1140: if (hid_jspoll_interval > 0)
1141: interval = hid_jspoll_interval;
1142: break;
1143: case HID_GD_KEYBOARD:
1144: if (hid_kbpoll_interval > 0)
1145: interval = hid_kbpoll_interval;
1146: break;
1147: }
1148:
1149: ret = -ENOMEM;
1150: if (usb_endpoint_dir_in(endpoint)) {
1151: if (usbhid->urbin)
1152: continue;
1153: if (!(usbhid->urbin = usb_alloc_urb(0, GFP_KERNEL)))
1154: goto fail;
1155: pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
1156: usb_fill_int_urb(usbhid->urbin, dev, pipe, usbhid->inbuf, insize,
1157: hid_irq_in, hid, interval);
1158: usbhid->urbin->transfer_dma = usbhid->inbuf_dma;
1159: usbhid->urbin->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
1160: } else {
1161: if (usbhid->urbout)
1162: continue;
1163: if (!(usbhid->urbout = usb_alloc_urb(0, GFP_KERNEL)))
1164: goto fail;
1165: pipe = usb_sndintpipe(dev, endpoint->bEndpointAddress);
1166: usb_fill_int_urb(usbhid->urbout, dev, pipe, usbhid->outbuf, 0,
1167: hid_irq_out, hid, interval);
1168: usbhid->urbout->transfer_dma = usbhid->outbuf_dma;
1169: usbhid->urbout->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
1170: }
1171: }
1172:
1173: usbhid->urbctrl = usb_alloc_urb(0, GFP_KERNEL);
1174: if (!usbhid->urbctrl) {
1175: ret = -ENOMEM;
1176: goto fail;
1177: }
1178:
1179: usb_fill_control_urb(usbhid->urbctrl, dev, 0, (void *) usbhid->cr,
1180: usbhid->ctrlbuf, 1, hid_ctrl, hid);
1181: usbhid->urbctrl->transfer_dma = usbhid->ctrlbuf_dma;
1182: usbhid->urbctrl->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
1183:
1184: set_bit(HID_STARTED, &usbhid->iofl);
1185:
1186: if (hid->quirks & HID_QUIRK_ALWAYS_POLL) {
1187: ret = usb_autopm_get_interface(usbhid->intf);
1188: if (ret)
1189: goto fail;
1190: set_bit(HID_IN_POLLING, &usbhid->iofl);
1191: usbhid->intf->needs_remote_wakeup = 1;
1192: ret = hid_start_in(hid);
1193: if (ret) {
1194: dev_err(&hid->dev,
1195: "failed to start in urb: %d\n", ret);
1196: }
1197: usb_autopm_put_interface(usbhid->intf);
1198: }
1199:
1200: /* Some keyboards don't work until their LEDs have been set.
1201: * Since BIOSes do set the LEDs, it must be safe for any device
1202: * that supports the keyboard boot protocol.
1203: * In addition, enable remote wakeup by default for all keyboard
1204: * devices supporting the boot protocol.
1205: */
1206: if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT &&
1207: interface->desc.bInterfaceProtocol ==
1208: USB_INTERFACE_PROTOCOL_KEYBOARD) {
1209: usbhid_set_leds(hid);
1210: device_set_wakeup_enable(&dev->dev, 1);
1211: }
1212:
1213: mutex_unlock(&usbhid->mutex);
1214: return 0;
1215:
1216: fail:
1217: usb_free_urb(usbhid->urbin);
1218: usb_free_urb(usbhid->urbout);
1219: usb_free_urb(usbhid->urbctrl);
1220: usbhid->urbin = NULL;
1221: usbhid->urbout = NULL;
1222: usbhid->urbctrl = NULL;
1223: hid_free_buffers(dev, hid);
1224: mutex_unlock(&usbhid->mutex);
1225: return ret;
1226: }
SourceFile:drivers/hid/usbhid/hid-core.c] |
| 28/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 35978 output: 44 thoughts: 604 Thoughts: **Analyzing the USB HID Buffer Overflow**
Okay, let's break this down. My initial thought process is following the flow of the USB HID buffer allocation and use, specifically related to the `mcp2221_raw_event` function. First, the size of the buffer, `usbhid->bufsize`, is determined by `hid_find_max_report`. Then, `insize` is also calculated via this function, using `HID_INPUT_REPORT`. Hmm, a bit redundant, isn't it?
The key here, as pointed out, is that an empty or very small report descriptor, which is what we have in the syzkaller reproducer, means `insize` could be zero or minuscule. The `usb_alloc_coherent` then uses this `usbhid->bufsize` to allocate memory, and if that's small, `usbhid->inbuf` will be small. The syzkaller reproducer gives us:
```c
// report_desc: usb_hid_class_descriptor_report {
// bDescriptorType: const = 0x22 (1 bytes)
// wDescriptorLength: int16 = 0x0 (2 bytes)
// }
```
The crucial thing here is that the report descriptor length is 0! `hid_find_max_report` is going to return 0, which means `usbhid->bufsize` will default to `HID_MIN_BUFFER_SIZE`, which is 64. So, we end up with a 64-byte `usbhid->inbuf`.
Now, the problem arises in `mcp2221_raw_event`, where `data[mcp->gp_idx]` is accessed. `mcp->gp_idx` is calculated using `offsetof(struct mcp_set_gpio, gpio[offset].value)`. For `offset = 3`, `gp_idx` is 15. That is less than 64. So there should not be a buffer overflow, right?
But, the crash report is saying something entirely different. It points to a crash within a `task_struct`.
Specifically, the crash report states:
"The buggy address belongs to the object at ffff888111fe5880 which belongs to the cache task_struct of size 7296"
"The buggy address is located 2815 bytes to the right of allocated 7296-byte region [ffff888111fe5880, ffff888111fe7500)"
The buggy address `ffff888111fe7fff`. Calculating the offset from the base address, we have `ffff888111fe7fff` - `ffff888111fe5880` = 10111. The crash is within a `task_struct`, which is allocated from the `task_struct` cache.
So the core problem: Why is `data` pointing to the `task_struct` instead of the allocated HID buffer? We need to go back and carefully re-examine `__hid_input_report`. There must be a memory corruption happening.
|
| 29/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:__hid_input_report] Results: map[SourceCode:2109: static int __hid_input_report(struct hid_device *hid, enum hid_report_type type,
2110: u8 *data, size_t bufsize, u32 size, int interrupt, u64 source,
2111: bool from_bpf, bool lock_already_taken)
2112: {
2113: struct hid_report_enum *report_enum;
2114: struct hid_driver *hdrv;
2115: struct hid_report *report;
2116: int ret = 0;
2117:
2118: if (!hid)
2119: return -ENODEV;
2120:
2121: ret = down_trylock(&hid->driver_input_lock);
2122: if (lock_already_taken && !ret) {
2123: up(&hid->driver_input_lock);
2124: return -EINVAL;
2125: } else if (!lock_already_taken && ret) {
2126: return -EBUSY;
2127: }
2128:
2129: if (!hid->driver) {
2130: ret = -ENODEV;
2131: goto unlock;
2132: }
2133: report_enum = hid->report_enum + type;
2134: hdrv = hid->driver;
2135:
2136: data = dispatch_hid_bpf_device_event(hid, type, data, &bufsize, &size, interrupt,
2137: source, from_bpf);
2138: if (IS_ERR(data)) {
2139: ret = PTR_ERR(data);
2140: goto unlock;
2141: }
2142:
2143: if (!size) {
2144: dbg_hid("empty report\n");
2145: ret = -1;
2146: goto unlock;
2147: }
2148:
2149: /* Avoid unnecessary overhead if debugfs is disabled */
2150: if (!list_empty(&hid->debug_list))
2151: hid_dump_report(hid, type, data, size);
2152:
2153: report = hid_get_report(report_enum, data);
2154:
2155: if (!report) {
2156: ret = -1;
2157: goto unlock;
2158: }
2159:
2160: if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
2161: ret = hdrv->raw_event(hid, report, data, size);
2162: if (ret < 0)
2163: goto unlock;
2164: }
2165:
2166: ret = hid_report_raw_event(hid, type, data, bufsize, size, interrupt);
2167:
2168: unlock:
2169: if (!lock_already_taken)
2170: up(&hid->driver_input_lock);
2171: return ret;
2172: }
SourceFile:drivers/hid/hid-core.c] |
| 30/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 38260 output: 48 thoughts: 37 Thoughts: Okay, let's see. My first thought is: **Hang on a second... `dispatch_hid_bpf_device_event` can *modify* the `data` itself?** This is unexpected. I need to be absolutely certain about this. Let's delve into the implementation of `dispatch_hid_bpf_device_event` right away and scrutinize it closely. I have to verify that assumption. I'll need to go through it with a fine-toothed comb to understand the possible side effects and any limitations. The implications are potentially significant, depending on how `data` is being used downstream. This demands immediate attention. |
| 31/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:dispatch_hid_bpf_device_event] Results: map[SourceCode: 218: static inline u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type,
219: u8 *data, size_t *buf_size, u32 *size,
220: int interrupt, u64 source, bool from_bpf)
221: {
222: return data;
223: }
SourceFile:include/linux/hid_bpf.h] |
| 32/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 38626 output: 54 thoughts: 48 Thoughts: Okay, here's my interpretation of that thought process, from an expert's perspective: **Diving into the HID BPF Details** Hmm, I'm just looking at `dispatch_hid_bpf_device_event`. It's clearly defined in `include/linux/hid_bpf.h`. The definition mentions that when BPF is disabled, the function returns `data`. That's straightforward enough. But here's the kicker, what's happening if BPF *is* enabled? The documentation seems a bit light there. I'm going to have to dig deeper into the implementation or follow the execution path in the kernel code to understand the flow when the BPF filter is actually active. I need to know precisely what `dispatch_hid_bpf_device_event` is doing, and whether that "data" is the same, or if it has been transformed. Is the function even still returning data? This could involve further investigation into how the BPF program interacts with the HID event processing. Gotta figure out the control flow here. |
| 33/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/bpf/hid_bpf_dispatch.c IncludeLines:true Name:dispatch_hid_bpf_device_event] Results: map[SourceCode: 218: static inline u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type,
219: u8 *data, size_t *buf_size, u32 *size,
220: int interrupt, u64 source, bool from_bpf)
221: {
222: return data;
223: }
SourceFile:include/linux/hid_bpf.h] |
| 34/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 39097 output: 54 thoughts: 36 Thoughts: Okay, let's see. My first thought is: **Examining HID BPF Dispatch** Hang on a moment. Before I dig too deep, I should probably check the source for `dispatch_hid_bpf_device_event`. It's likely in the `drivers/hid/bpf` area, and considering its name, the main dispatch logic will probably be in `hid_bpf_dispatch.c`. Yeah, that's where I need to start. I'll search for it there. That'll give me the core entry point and context. From there, I can understand how the BPF filter is actually applied to HID events. |
| 35/2 | 2026/05/19 10:33 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/bpf/hid_bpf_dispatch.c IncludeLines:true Name:dispatch_hid_bpf_device_event] Results: map[SourceCode: 218: static inline u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type,
219: u8 *data, size_t *buf_size, u32 *size,
220: int interrupt, u64 source, bool from_bpf)
221: {
222: return data;
223: }
SourceFile:include/linux/hid_bpf.h] |
| 36/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 39472 output: 24 thoughts: 8 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **Quick and Dirty: The Power of `grep`** Alright, so I'm facing this problem, and my first instinct? Let's just `grep` it. No need to overcomplicate things initially, right? We're often dealing with textual data, log files, or configuration files โ and `grep` is still one of the most efficient tools in the shed for a quick-and-dirty scan. I'm thinking of it as a sanity check, a rapid way to either confirm my suspicion or at least narrow down the scope. Before I start reaching for more sophisticated parsing tools or diving into writing a custom script, let's see what a basic search turns up. It's about finding that needle in the haystack โ or, at least, reducing the haystack to a manageable pile. Time is precious, and `grep` can be surprisingly effective for a first pass. |
| 37/2 | 2026/05/19 10:33 | tool | grepper |
0mArgs:map[Expression:dispatch_hid_bpf_device_event] Results: map[Output:drivers/hid/bpf/hid_bpf_dispatch.c=25=u8 *
drivers/hid/bpf/hid_bpf_dispatch.c:26:dispatch_hid_bpf_device_event(struct hid_device *hdev, enum hid_report_type type, u8 *data,
drivers/hid/bpf/hid_bpf_dispatch.c-27- size_t *buf_size, u32 *size, int interrupt, u64 source,
--
drivers/hid/bpf/hid_bpf_dispatch.c-80-}
drivers/hid/bpf/hid_bpf_dispatch.c:81:EXPORT_SYMBOL_GPL(dispatch_hid_bpf_device_event);
drivers/hid/bpf/hid_bpf_dispatch.c-82-
--
drivers/hid/hid-core.c=2109=static int __hid_input_report(struct hid_device *hid, enum hid_report_type type,
--
drivers/hid/hid-core.c-2135-
drivers/hid/hid-core.c:2136: data = dispatch_hid_bpf_device_event(hid, type, data, &bufsize, &size, interrupt,
drivers/hid/hid-core.c-2137- source, from_bpf);
--
include/linux/hid_bpf.h=187=struct hid_bpf {
--
include/linux/hid_bpf.h-201-#ifdef CONFIG_HID_BPF
include/linux/hid_bpf.h:202:u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type, u8 *data,
include/linux/hid_bpf.h-203- size_t *buf_size, u32 *size, int interrupt, u64 source,
--
include/linux/hid_bpf.h=216=const u8 *call_hid_bpf_rdesc_fixup(struct hid_device *hdev, const u8 *rdesc, unsigned int *size);
include/linux/hid_bpf.h-217-#else /* CONFIG_HID_BPF */
include/linux/hid_bpf.h:218:static inline u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type,
include/linux/hid_bpf.h-219- u8 *data, size_t *buf_size, u32 *size,
] |
| 38/2 | 2026/05/19 10:33 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 40358 output: 54 thoughts: 34 Thoughts: Here's my take on the thought process, as requested: **Diving into `dispatch_hid_bpf_device_event`** Okay, time to dig into this function, `dispatch_hid_bpf_device_event`, located in `drivers/hid/bpf/hid_bpf_dispatch.c`. I'm curious to see how the HID BPF infrastructure is actually handling events at the device level. This function is the core of event dispatch, so it's the right place to start. I expect it'll be where the BPF programs get their first opportunity to see data. From there, I'll assess how it handles those events within the context of the device driver and system, making sure it follows the kernel's design philosophy and, ideally, offers efficient processing. I'm keen to see if this handles the low-level aspects, like accessing the raw HID reports and managing any synchronization or locking involved in the process. I'm also interested in how it interacts with the broader event handling, such as `input_report_key`, `input_event`, etc. |
| 39/2 | 2026/05/19 10:34 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/bpf/hid_bpf_dispatch.c IncludeLines:true Name:dispatch_hid_bpf_device_event] Results: map[SourceCode: 218: static inline u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type,
219: u8 *data, size_t *buf_size, u32 *size,
220: int interrupt, u64 source, bool from_bpf)
221: {
222: return data;
223: }
SourceFile:include/linux/hid_bpf.h] |
| 40/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 40825 output: 30 thoughts: 25 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the HID BPF Dispatch** Okay, hold on a second. Before I get any further into this, I need to get a clear picture of exactly how the BPF filtering is applied within the HID subsystem. The high-level overview is fine, but I'm going to need to dig directly into `drivers/hid/bpf/hid_bpf_dispatch.c`. I need to understand the exact mechanics of the dispatch process: the data structures used, the function calls involved in evaluating the BPF program, how the events are actually filtered or modified, and crucially, how this interacts with the regular HID event handling path. I want to see how the kernel code handles the BPF program's returned value, how it uses it to make decisions, and if there are any subtle interactions with other kernel components that I should be aware of. I'm looking for potential bottlenecks, points of customization, and areas where optimizations or edge case handling might be crucial. I expect this will be the best way to develop an understanding of what could be improved. |
| 41/2 | 2026/05/19 10:34 | tool | read-file |
0mArgs:map[File:drivers/hid/bpf/hid_bpf_dispatch.c] Results: map[Contents:// SPDX-License-Identifier: GPL-2.0-only
/*
* HID-BPF support for Linux
*
* Copyright (c) 2022-2024 Benjamin Tissoires
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/bitops.h>
#include <linux/btf.h>
#include <linux/btf_ids.h>
#include <linux/filter.h>
#include <linux/hid.h>
#include <linux/hid_bpf.h>
#include <linux/init.h>
#include <linux/kfifo.h>
#include <linux/minmax.h>
#include <linux/module.h>
#include "hid_bpf_dispatch.h"
const struct hid_ops *hid_ops;
EXPORT_SYMBOL(hid_ops);
u8 *
dispatch_hid_bpf_device_event(struct hid_device *hdev, enum hid_report_type type, u8 *data,
size_t *buf_size, u32 *size, int interrupt, u64 source,
bool from_bpf)
{
struct hid_bpf_ctx_kern ctx_kern = {
.ctx = {
.hid = hdev,
.allocated_size = hdev->bpf.allocated_data,
.size = *size,
},
.data = hdev->bpf.device_data,
.from_bpf = from_bpf,
};
struct hid_bpf_ops *e;
int ret;
if (unlikely(hdev->bpf.destroyed))
return ERR_PTR(-ENODEV);
if (type >= HID_REPORT_TYPES)
return ERR_PTR(-EINVAL);
/* no program has been attached yet */
if (!hdev->bpf.device_data)
return data;
memset(ctx_kern.data, 0, hdev->bpf.allocated_data);
memcpy(ctx_kern.data, data, *size);
rcu_read_lock();
list_for_each_entry_rcu(e, &hdev->bpf.prog_list, list) {
if (e->hid_device_event) {
ret = e->hid_device_event(&ctx_kern.ctx, type, source);
if (ret < 0) {
rcu_read_unlock();
return ERR_PTR(ret);
}
if (ret)
ctx_kern.ctx.size = ret;
}
}
rcu_read_unlock();
ret = ctx_kern.ctx.size;
if (ret) {
if (ret > ctx_kern.ctx.allocated_size)
return ERR_PTR(-EINVAL);
*size = ret;
}
*buf_size = ctx_kern.ctx.allocated_size;
return ctx_kern.data;
}
EXPORT_SYMBOL_GPL(dispatch_hid_bpf_device_event);
int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
unsigned char reportnum, u8 *buf,
u32 size, enum hid_report_type rtype,
enum hid_class_request reqtype,
u64 source, bool from_bpf)
{
struct hid_bpf_ctx_kern ctx_kern = {
.ctx = {
.hid = hdev,
.allocated_size = size,
.size = size,
},
.data = buf,
.from_bpf = from_bpf,
};
struct hid_bpf_ops *e;
int ret, idx;
if (unlikely(hdev->bpf.destroyed))
return -ENODEV;
if (rtype >= HID_REPORT_TYPES)
return -EINVAL;
idx = srcu_read_lock(&hdev->bpf.srcu);
list_for_each_entry_srcu(e, &hdev->bpf.prog_list, list,
srcu_read_lock_held(&hdev->bpf.srcu)) {
if (!e->hid_hw_request)
continue;
ret = e->hid_hw_request(&ctx_kern.ctx, reportnum, rtype, reqtype, source);
if (ret)
goto out;
}
ret = 0;
out:
srcu_read_unlock(&hdev->bpf.srcu, idx);
return ret;
}
EXPORT_SYMBOL_GPL(dispatch_hid_bpf_raw_requests);
int dispatch_hid_bpf_output_report(struct hid_device *hdev,
__u8 *buf, u32 size, u64 source,
bool from_bpf)
{
struct hid_bpf_ctx_kern ctx_kern = {
.ctx = {
.hid = hdev,
.allocated_size = size,
.size = size,
},
.data = buf,
.from_bpf = from_bpf,
};
struct hid_bpf_ops *e;
int ret, idx;
if (unlikely(hdev->bpf.destroyed))
return -ENODEV;
idx = srcu_read_lock(&hdev->bpf.srcu);
list_for_each_entry_srcu(e, &hdev->bpf.prog_list, list,
srcu_read_lock_held(&hdev->bpf.srcu)) {
if (!e->hid_hw_output_report)
continue;
ret = e->hid_hw_output_report(&ctx_kern.ctx, source);
if (ret)
goto out;
}
ret = 0;
out:
srcu_read_unlock(&hdev->bpf.srcu, idx);
return ret;
}
EXPORT_SYMBOL_GPL(dispatch_hid_bpf_output_report);
const u8 *call_hid_bpf_rdesc_fixup(struct hid_device *hdev, const u8 *rdesc, unsigned int *size)
{
int ret;
struct hid_bpf_ctx_kern ctx_kern = {
.ctx = {
.hid = hdev,
.size = *size,
.allocated_size = HID_MAX_DESCRIPTOR_SIZE,
},
};
if (!hdev->bpf.rdesc_ops)
goto ignore_bpf;
ctx_kern.data = kzalloc(ctx_kern.ctx.allocated_size, GFP_KERNEL);
if (!ctx_kern.data)
goto ignore_bpf;
memcpy(ctx_kern.data, rdesc, min_t(unsigned int, *size, HID_MAX_DESCRIPTOR_SIZE));
ret = hdev->bpf.rdesc_ops->hid_rdesc_fixup(&ctx_kern.ctx);
if (ret < 0)
goto ignore_bpf;
if (ret) {
if (ret > ctx_kern.ctx.allocated_size)
goto ignore_bpf;
*size = ret;
}
return krealloc(ctx_kern.data, *size, GFP_KERNEL);
ignore_bpf:
kfree(ctx_kern.data);
return rdesc;
}
EXPORT_SYMBOL_GPL(call_hid_bpf_rdesc_fixup);
static int device_match_id(struct device *dev, const void *id)
{
struct hid_device *hdev = to_hid_device(dev);
return hdev->id == *(int *)id;
}
struct hid_device *hid_get_device(unsigned int hid_id)
{
struct device *dev;
if (!hid_ops)
return ERR_PTR(-EINVAL);
dev = bus_find_device(hid_ops->bus_type, NULL, &hid_id, device_match_id);
if (!dev)
return ERR_PTR(-EINVAL);
return to_hid_device(dev);
}
void hid_put_device(struct hid_device *hid)
{
put_device(&hid->dev);
}
static int __hid_bpf_allocate_data(struct hid_device *hdev, u8 **data, u32 *size)
{
u8 *alloc_data;
unsigned int i, j, max_report_len = 0;
size_t alloc_size = 0;
/* compute the maximum report length for this device */
for (i = 0; i < HID_REPORT_TYPES; i++) {
struct hid_report_enum *report_enum = hdev->report_enum + i;
for (j = 0; j < HID_MAX_IDS; j++) {
struct hid_report *report = report_enum->report_id_hash[j];
if (report)
max_report_len = max(max_report_len, hid_report_len(report));
}
}
/*
* Give us a little bit of extra space and some predictability in the
* buffer length we create. This way, we can tell users that they can
* work on chunks of 64 bytes of memory without having the bpf verifier
* scream at them.
*/
alloc_size = DIV_ROUND_UP(max_report_len, 64) * 64;
alloc_data = kzalloc(alloc_size, GFP_KERNEL);
if (!alloc_data)
return -ENOMEM;
*data = alloc_data;
*size = alloc_size;
return 0;
}
int hid_bpf_allocate_event_data(struct hid_device *hdev)
{
/* hdev->bpf.device_data is already allocated, abort */
if (hdev->bpf.device_data)
return 0;
return __hid_bpf_allocate_data(hdev, &hdev->bpf.device_data, &hdev->bpf.allocated_data);
}
int hid_bpf_reconnect(struct hid_device *hdev)
{
if (!test_and_set_bit(ffs(HID_STAT_REPROBED), &hdev->status)) {
/* trigger call to call_hid_bpf_rdesc_fixup() during the next probe */
hdev->bpf_rsize = 0;
return device_reprobe(&hdev->dev);
}
return 0;
}
/* Disables missing prototype warnings */
__bpf_kfunc_start_defs();
/**
* hid_bpf_get_data - Get the kernel memory pointer associated with the context @ctx
*
* @ctx: The HID-BPF context
* @offset: The offset within the memory
* @rdwr_buf_size: the const size of the buffer
*
* @returns %NULL on error, an %__u8 memory pointer on success
*/
__bpf_kfunc __u8 *
hid_bpf_get_data(struct hid_bpf_ctx *ctx, unsigned int offset, const size_t rdwr_buf_size)
{
struct hid_bpf_ctx_kern *ctx_kern;
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
if (rdwr_buf_size + offset > ctx->allocated_size)
return NULL;
return ctx_kern->data + offset;
}
/**
* hid_bpf_allocate_context - Allocate a context to the given HID device
*
* @hid_id: the system unique identifier of the HID device
*
* @returns A pointer to &struct hid_bpf_ctx on success, %NULL on error.
*/
__bpf_kfunc struct hid_bpf_ctx *
hid_bpf_allocate_context(unsigned int hid_id)
{
struct hid_device *hdev;
struct hid_bpf_ctx_kern *ctx_kern = NULL;
hdev = hid_get_device(hid_id);
if (IS_ERR(hdev))
return NULL;
ctx_kern = kzalloc_obj(*ctx_kern);
if (!ctx_kern) {
hid_put_device(hdev);
return NULL;
}
ctx_kern->ctx.hid = hdev;
return &ctx_kern->ctx;
}
/**
* hid_bpf_release_context - Release the previously allocated context @ctx
*
* @ctx: the HID-BPF context to release
*
*/
__bpf_kfunc void
hid_bpf_release_context(struct hid_bpf_ctx *ctx)
{
struct hid_bpf_ctx_kern *ctx_kern;
struct hid_device *hid;
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
hid = (struct hid_device *)ctx_kern->ctx.hid; /* ignore const */
kfree(ctx_kern);
/* get_device() is called by bus_find_device() */
hid_put_device(hid);
}
static int
__hid_bpf_hw_check_params(struct hid_bpf_ctx *ctx, __u8 *buf, size_t *buf__sz,
enum hid_report_type rtype)
{
struct hid_report_enum *report_enum;
struct hid_report *report;
u32 report_len;
/* check arguments */
if (!hid_ops)
return -EINVAL;
switch (rtype) {
case HID_INPUT_REPORT:
case HID_OUTPUT_REPORT:
case HID_FEATURE_REPORT:
break;
default:
return -EINVAL;
}
if (*buf__sz < 1)
return -EINVAL;
report_enum = ctx->hid->report_enum + rtype;
report = hid_ops->hid_get_report(report_enum, buf);
if (!report)
return -EINVAL;
report_len = hid_report_len(report);
if (*buf__sz > report_len)
*buf__sz = report_len;
return 0;
}
/**
* hid_bpf_hw_request - Communicate with a HID device
*
* @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
* @buf: a %PTR_TO_MEM buffer
* @buf__sz: the size of the data to transfer
* @rtype: the type of the report (%HID_INPUT_REPORT, %HID_FEATURE_REPORT, %HID_OUTPUT_REPORT)
* @reqtype: the type of the request (%HID_REQ_GET_REPORT, %HID_REQ_SET_REPORT, ...)
*
* @returns %0 on success, a negative error code otherwise.
*/
__bpf_kfunc int
hid_bpf_hw_request(struct hid_bpf_ctx *ctx, __u8 *buf, size_t buf__sz,
enum hid_report_type rtype, enum hid_class_request reqtype)
{
struct hid_bpf_ctx_kern *ctx_kern;
size_t size = buf__sz;
u8 *dma_data;
int ret;
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
if (ctx_kern->from_bpf)
return -EDEADLOCK;
/* check arguments */
ret = __hid_bpf_hw_check_params(ctx, buf, &size, rtype);
if (ret)
return ret;
switch (reqtype) {
case HID_REQ_GET_REPORT:
case HID_REQ_GET_IDLE:
case HID_REQ_GET_PROTOCOL:
case HID_REQ_SET_REPORT:
case HID_REQ_SET_IDLE:
case HID_REQ_SET_PROTOCOL:
break;
default:
return -EINVAL;
}
dma_data = kmemdup(buf, size, GFP_KERNEL);
if (!dma_data)
return -ENOMEM;
ret = hid_ops->hid_hw_raw_request(ctx->hid,
dma_data[0],
dma_data,
size,
rtype,
reqtype,
(u64)(long)ctx,
true); /* prevent infinite recursions */
if (ret > size)
ret = size;
if (ret > 0)
memcpy(buf, dma_data, ret);
kfree(dma_data);
return ret;
}
/**
* hid_bpf_hw_output_report - Send an output report to a HID device
*
* @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
* @buf: a %PTR_TO_MEM buffer
* @buf__sz: the size of the data to transfer
*
* Returns the number of bytes transferred on success, a negative error code otherwise.
*/
__bpf_kfunc int
hid_bpf_hw_output_report(struct hid_bpf_ctx *ctx, __u8 *buf, size_t buf__sz)
{
struct hid_bpf_ctx_kern *ctx_kern;
size_t size = buf__sz;
u8 *dma_data;
int ret;
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
if (ctx_kern->from_bpf)
return -EDEADLOCK;
/* check arguments */
ret = __hid_bpf_hw_check_params(ctx, buf, &size, HID_OUTPUT_REPORT);
if (ret)
return ret;
dma_data = kmemdup(buf, size, GFP_KERNEL);
if (!dma_data)
return -ENOMEM;
ret = hid_ops->hid_hw_output_report(ctx->hid, dma_data, size, (u64)(long)ctx, true);
kfree(dma_data);
return ret;
}
static int
__hid_bpf_input_report(struct hid_bpf_ctx *ctx, enum hid_report_type type, u8 *buf,
size_t size, bool lock_already_taken)
{
struct hid_bpf_ctx_kern *ctx_kern;
int ret;
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
if (ctx_kern->from_bpf)
return -EDEADLOCK;
/* check arguments */
ret = __hid_bpf_hw_check_params(ctx, buf, &size, type);
if (ret)
return ret;
return hid_ops->hid_input_report(ctx->hid, type, buf, size, size, 0, (u64)(long)ctx, true,
lock_already_taken);
}
/**
* hid_bpf_try_input_report - Inject a HID report in the kernel from a HID device
*
* @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
* @type: the type of the report (%HID_INPUT_REPORT, %HID_FEATURE_REPORT, %HID_OUTPUT_REPORT)
* @buf: a %PTR_TO_MEM buffer
* @buf__sz: the size of the data to transfer
*
* Returns %0 on success, a negative error code otherwise. This function will immediately
* fail if the device is not available, thus can be safely used in IRQ context.
*/
__bpf_kfunc int
hid_bpf_try_input_report(struct hid_bpf_ctx *ctx, enum hid_report_type type, u8 *buf,
const size_t buf__sz)
{
struct hid_bpf_ctx_kern *ctx_kern;
bool from_hid_event_hook;
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
from_hid_event_hook = ctx_kern->data && ctx_kern->data == ctx->hid->bpf.device_data;
return __hid_bpf_input_report(ctx, type, buf, buf__sz, from_hid_event_hook);
}
/**
* hid_bpf_input_report - Inject a HID report in the kernel from a HID device
*
* @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
* @type: the type of the report (%HID_INPUT_REPORT, %HID_FEATURE_REPORT, %HID_OUTPUT_REPORT)
* @buf: a %PTR_TO_MEM buffer
* @buf__sz: the size of the data to transfer
*
* Returns %0 on success, a negative error code otherwise. This function will wait for the
* device to be available before injecting the event, thus needs to be called in sleepable
* context.
*/
__bpf_kfunc int
hid_bpf_input_report(struct hid_bpf_ctx *ctx, enum hid_report_type type, u8 *buf,
const size_t buf__sz)
{
int ret;
ret = down_interruptible(&ctx->hid->driver_input_lock);
if (ret)
return ret;
/* check arguments */
ret = __hid_bpf_input_report(ctx, type, buf, buf__sz, true /* lock_already_taken */);
up(&ctx->hid->driver_input_lock);
return ret;
}
__bpf_kfunc_end_defs();
/*
* The following set contains all functions we agree BPF programs
* can use.
*/
BTF_KFUNCS_START(hid_bpf_kfunc_ids)
BTF_ID_FLAGS(func, hid_bpf_get_data, KF_RET_NULL)
BTF_ID_FLAGS(func, hid_bpf_allocate_context, KF_ACQUIRE | KF_RET_NULL | KF_SLEEPABLE)
BTF_ID_FLAGS(func, hid_bpf_release_context, KF_RELEASE | KF_SLEEPABLE)
BTF_ID_FLAGS(func, hid_bpf_hw_request, KF_SLEEPABLE)
BTF_ID_FLAGS(func, hid_bpf_hw_output_report, KF_SLEEPABLE)
BTF_ID_FLAGS(func, hid_bpf_input_report, KF_SLEEPABLE)
BTF_ID_FLAGS(func, hid_bpf_try_input_report)
BTF_KFUNCS_END(hid_bpf_kfunc_ids)
static const struct btf_kfunc_id_set hid_bpf_kfunc_set = {
.owner = THIS_MODULE,
.set = &hid_bpf_kfunc_ids,
};
/* for syscall HID-BPF */
BTF_KFUNCS_START(hid_bpf_syscall_kfunc_ids)
BTF_ID_FLAGS(func, hid_bpf_allocate_context, KF_ACQUIRE | KF_RET_NULL)
BTF_ID_FLAGS(func, hid_bpf_release_context, KF_RELEASE)
BTF_ID_FLAGS(func, hid_bpf_hw_request)
BTF_ID_FLAGS(func, hid_bpf_hw_output_report)
BTF_ID_FLAGS(func, hid_bpf_input_report)
BTF_KFUNCS_END(hid_bpf_syscall_kfunc_ids)
static const struct btf_kfunc_id_set hid_bpf_syscall_kfunc_set = {
.owner = THIS_MODULE,
.set = &hid_bpf_syscall_kfunc_ids,
};
int hid_bpf_connect_device(struct hid_device *hdev)
{
bool need_to_allocate = false;
struct hid_bpf_ops *e;
rcu_read_lock();
list_for_each_entry_rcu(e, &hdev->bpf.prog_list, list) {
if (e->hid_device_event) {
need_to_allocate = true;
break;
}
}
rcu_read_unlock();
/* only allocate BPF data if there are programs attached */
if (!need_to_allocate)
return 0;
return hid_bpf_allocate_event_data(hdev);
}
EXPORT_SYMBOL_GPL(hid_bpf_connect_device);
void hid_bpf_disconnect_device(struct hid_device *hdev)
{
kfree(hdev->bpf.device_data);
hdev->bpf.device_data = NULL;
hdev->bpf.allocated_data = 0;
}
EXPORT_SYMBOL_GPL(hid_bpf_disconnect_device);
void hid_bpf_destroy_device(struct hid_device *hdev)
{
if (!hdev)
return;
/* mark the device as destroyed in bpf so we don't reattach it */
hdev->bpf.destroyed = true;
__hid_bpf_ops_destroy_device(hdev);
synchronize_srcu(&hdev->bpf.srcu);
cleanup_srcu_struct(&hdev->bpf.srcu);
}
EXPORT_SYMBOL_GPL(hid_bpf_destroy_device);
int hid_bpf_device_init(struct hid_device *hdev)
{
INIT_LIST_HEAD(&hdev->bpf.prog_list);
mutex_init(&hdev->bpf.prog_list_lock);
return init_srcu_struct(&hdev->bpf.srcu);
}
EXPORT_SYMBOL_GPL(hid_bpf_device_init);
static int __init hid_bpf_init(void)
{
int err;
/* Note: if we exit with an error any time here, we would entirely break HID, which
* is probably not something we want. So we log an error and return success.
*
* This is not a big deal: nobody will be able to use the functionality.
*/
err = register_btf_kfunc_id_set(BPF_PROG_TYPE_STRUCT_OPS, &hid_bpf_kfunc_set);
if (err) {
pr_warn("error while setting HID BPF tracing kfuncs: %d", err);
return 0;
}
err = register_btf_kfunc_id_set(BPF_PROG_TYPE_SYSCALL, &hid_bpf_syscall_kfunc_set);
if (err) {
pr_warn("error while setting HID BPF syscall kfuncs: %d", err);
return 0;
}
return 0;
}
late_initcall(hid_bpf_init);
MODULE_AUTHOR("Benjamin Tissoires");
MODULE_LICENSE("GPL");
] |
| 42/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 47758 output: 46 thoughts: 441 Thoughts: **Investigating a Potential HID BPF Device Event Bug**
Okay, here's what's running through my head. I'm looking at `dispatch_hid_bpf_device_event`. My initial thought is that it allocates `hdev->bpf.device_data` and copies the input `data` there, making it the destination. But hang on, didn't `__hid_bpf_allocate_data` actually allocate `hdev->bpf.device_data`?
Let me see that allocation again:
```c
alloc_size = DIV_ROUND_UP(max_report_len, 64) * 64;
alloc_data = kzalloc(alloc_size, GFP_KERNEL);
```
Right, so the allocation size is based on the maximum report length. Ah, if `max_report_len` is zero, `alloc_size` is *also* zero! And, if `alloc_size` is zero, `kzalloc(0, GFP_KERNEL)` returns `ZERO_SIZE_PTR`, which, if I recall correctly, is essentially 0x10. I know this is a known quirk.
So, if that's the case, and `kzalloc(0)` returns this special value, here is how the code proceeds:
```c
if (!hdev->bpf.device_data)
return data;
memset(ctx_kern.data, 0, hdev->bpf.allocated_data);
memcpy(ctx_kern.data, data, *size);
```
So, if `hdev->bpf.device_data` isn't allocated, the function simply *returns* the original input `data`. In this particular case, `data` is the `urb->transfer_buffer`. Right, and `urb->transfer_buffer` is allocated by `usb_alloc_coherent`. `usb_alloc_coherent` then calls `dma_alloc_coherent`.
Now, the crash dump is suggesting that the buggy address "belongs to the object at ffff888111fe5880 which belongs to the cache task_struct of size 7296". So that `task_struct` is allocated by `kmem_cache_alloc_node`. But why in the world would `data` be pointing to a `task_struct`? Something's not lining up here. I need to go back and check `hid_alloc_buffers` again, and make sure that buffer is correctly associated with the correct device context. I'm missing a key piece of information!
|
| 43/2 | 2026/05/19 10:34 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:hid_alloc_buffers] Results: map[SourceCode: 854: static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid)
855: {
856: struct usbhid_device *usbhid = hid->driver_data;
857:
858: usbhid->inbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
859: &usbhid->inbuf_dma);
860: usbhid->outbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
861: &usbhid->outbuf_dma);
862: usbhid->cr = kmalloc_obj(*usbhid->cr);
863: usbhid->ctrlbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
864: &usbhid->ctrlbuf_dma);
865: if (!usbhid->inbuf || !usbhid->outbuf || !usbhid->cr ||
866: !usbhid->ctrlbuf)
867: return -1;
868:
869: return 0;
870: }
SourceFile:drivers/hid/usbhid/hid-core.c] |
| 44/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 49158 output: 50 thoughts: 68 Thoughts: **Investigating Potential Memory Allocation Issues in the Syzkaller Virtual USB Controller** Okay, hold on a minute. I'm thinking about how the `usb_alloc_coherent` function, which is critical for memory management within the `dummy_hcd` driver โ you know, the virtual USB controller that Syzkaller relies on for fuzzing โ might be allocating memory under the hood. It's likely using something like `kmalloc` or a similar kernel memory allocator, and this could be an area we need to understand better for potential fuzzing implications. Let me drill down on that function. To get a clearer picture of what's happening, I need to look closely at the memory allocation functions implemented within the `dummy_hcd.c` source file. Specifically, I'll need to check the implementations of either `dummy_alloc_buffer` (if it exists and is relevant), or, more generally, `dma_alloc_coherent` to see exactly how memory is being requested and managed. This is key to figuring out the memory characteristics. I need to understand these allocations thoroughly to ensure proper fuzzing coverage. |
| 45/2 | 2026/05/19 10:34 | tool | codesearch-definition-source |
0mError:requested entity does not exist Args: map[ContextFile:drivers/usb/gadget/udc/dummy_hcd.c IncludeLines:true Name:dummy_alloc_buffer] Results: map[SourceCode: SourceFile:] |
| 46/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 49533 output: 17 thoughts: 18 Thoughts: Here's a summary of my thought process: **Diving into the Coherent Allocation Logic** Okay, so I need to understand how coherent memory allocation is handled, specifically within this `dummy_hcd.c` file. My initial thought is to jump directly into the code and locate the implementation or use of the `alloc_coherent` function. I'm assuming that function is going to be the central point to understand how coherent memory is managed. It's likely going to involve some interaction with DMA, and I need to see exactly how they've set things up. Is it using a specific DMA API, or a custom approach? What kind of memory pools or mappings are being used? I'm expecting to see details around cache flushing and synchronization, all critical for coherent memory operation. |
| 47/2 | 2026/05/19 10:34 | tool | grepper |
0mArgs:map[Expression:alloc_coherent] Results: map[Output:
Full output is too long, showing 500 out of 12804 lines.
Use more precise expression if possible.
[Documentation/core-api/dma-api-howto.rst=424=you should do::
--
Documentation/core-api/dma-api-howto.rst-427-
Documentation/core-api/dma-api-howto.rst:428: cpu_addr = dma_alloc_coherent(dev, size, &dma_handle, gfp);
Documentation/core-api/dma-api-howto.rst-429-
--
Documentation/core-api/dma-api-howto.rst=445=dma_pool interface as well.
Documentation/core-api/dma-api-howto.rst-446-
Documentation/core-api/dma-api-howto.rst:447:dma_alloc_coherent() returns two values: the virtual address which you
Documentation/core-api/dma-api-howto.rst-448-can use to access it from the CPU and dma_handle which you pass to the
--
Documentation/core-api/dma-api-howto.rst=462=where dev, size are the same as in the above call and cpu_addr and
Documentation/core-api/dma-api-howto.rst:463:dma_handle are the values dma_alloc_coherent() returned to you.
Documentation/core-api/dma-api-howto.rst-464-This function may not be called in interrupt context.
--
Documentation/core-api/dma-api-howto.rst=466=If your driver needs lots of smaller memory regions, you can write
Documentation/core-api/dma-api-howto.rst:467:custom code to subdivide pages returned by dma_alloc_coherent(),
Documentation/core-api/dma-api-howto.rst-468-or you can use the dma_pool API to do that. A dma_pool is like
Documentation/core-api/dma-api-howto.rst:469:a kmem_cache, but it uses dma_alloc_coherent(), not __get_free_pages().
Documentation/core-api/dma-api-howto.rst-470-Also, it understands common hardware constraints for alignment,
--
Documentation/core-api/dma-api-howto.rst=484=must not cross 4KByte boundaries (but at that time it may be better to
Documentation/core-api/dma-api-howto.rst:485:use dma_alloc_coherent() directly instead).
Documentation/core-api/dma-api-howto.rst-486-
--
Documentation/core-api/dma-api-howto.rst=491=flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor
Documentation/core-api/dma-api-howto.rst:492:holding SMP locks), GFP_ATOMIC otherwise. Like dma_alloc_coherent(),
Documentation/core-api/dma-api-howto.rst-493-this returns two values, cpu_addr and dma_handle.
--
Documentation/core-api/dma-api-howto.rst=786=failure can be determined by:
Documentation/core-api/dma-api-howto.rst-787-
Documentation/core-api/dma-api-howto.rst:788:- checking if dma_alloc_coherent() returns NULL or dma_map_sg returns 0
Documentation/core-api/dma-api-howto.rst-789-
--
Documentation/core-api/dma-api.rst=27=Part Ia - Using large DMA-coherent buffers
--
Documentation/core-api/dma-api.rst-32- void *
Documentation/core-api/dma-api.rst:33: dma_alloc_coherent(struct device *dev, size_t size,
Documentation/core-api/dma-api.rst-34- dma_addr_t *dma_handle, gfp_t flag)
--
Documentation/core-api/dma-api.rst=66=Free a previously allocated region of coherent memory. dev, size and dma_handle
Documentation/core-api/dma-api.rst:67:must all be the same as those passed into dma_alloc_coherent(). cpu_addr must
Documentation/core-api/dma-api.rst:68:be the virtual address returned by dma_alloc_coherent().
Documentation/core-api/dma-api.rst-69-
--
Documentation/core-api/dma-api.rst=80=descriptors or I/O buffers. Rather than allocating in units of a page
Documentation/core-api/dma-api.rst:81:or more using dma_alloc_coherent(), you can use DMA pools. These work
Documentation/core-api/dma-api.rst-82-much like a struct kmem_cache, except that they use the DMA-coherent allocator,
--
Documentation/driver-api/driver-model/devres.rst=58=drivers using devres. For example, coherent DMA memory is acquired
Documentation/driver-api/driver-model/devres.rst:59:using dma_alloc_coherent(). The managed version is called
Documentation/driver-api/driver-model/devres.rst:60:dmam_alloc_coherent(). It is identical to dma_alloc_coherent() except
Documentation/driver-api/driver-model/devres.rst-61-for the DMA memory allocated using it is managed and will be
--
Documentation/driver-api/driver-model/devres.rst=63=the following::
--
Documentation/driver-api/driver-model/devres.rst-77-
Documentation/driver-api/driver-model/devres.rst:78: dmam_alloc_coherent(dev, size, dma_handle, gfp)
Documentation/driver-api/driver-model/devres.rst-79- {
--
Documentation/driver-api/driver-model/devres.rst-86- /* alloc DMA memory as usual */
Documentation/driver-api/driver-model/devres.rst:87: vaddr = dma_alloc_coherent(...);
Documentation/driver-api/driver-model/devres.rst-88- ...
--
Documentation/driver-api/driver-model/devres.rst-98-
Documentation/driver-api/driver-model/devres.rst:99:If a driver uses dmam_alloc_coherent(), the area is guaranteed to be
Documentation/driver-api/driver-model/devres.rst-100-freed whether initialization fails half-way or the device gets
--
Documentation/driver-api/driver-model/devres.rst=103=looks like the following::
--
Documentation/driver-api/driver-model/devres.rst-112-
Documentation/driver-api/driver-model/devres.rst:113: d->ring = dmam_alloc_coherent(...);
Documentation/driver-api/driver-model/devres.rst-114- if (!d->ring)
--
Documentation/driver-api/driver-model/devres.rst=257=DMA
Documentation/driver-api/driver-model/devres.rst-258- dmaenginem_async_device_register()
Documentation/driver-api/driver-model/devres.rst:259: dmam_alloc_coherent()
Documentation/driver-api/driver-model/devres.rst-260- dmam_alloc_attrs()
--
Documentation/driver-api/usb/dma.rst=37=and effects like cache-trashing can impose subtle penalties.
--
Documentation/driver-api/usb/dma.rst-48-
Documentation/driver-api/usb/dma.rst:49: void *usb_alloc_coherent (struct usb_device *dev, size_t size,
Documentation/driver-api/usb/dma.rst-50- int mem_flags, dma_addr_t *dma);
--
Documentation/driver-api/usb/writing_musb_glue_layer.rst=509=defines the width of the DMA mask that is going to be used, and
Documentation/driver-api/usb/writing_musb_glue_layer.rst-510-``coherent_dma_mask`` (line 26) has the same purpose but for the
Documentation/driver-api/usb/writing_musb_glue_layer.rst:511:``alloc_coherent`` DMA mappings: in both cases we are using a 32 bits mask.
Documentation/driver-api/usb/writing_musb_glue_layer.rst-512-Then the resource field (line 29) is simply a pointer to the resource
--
Documentation/memory-barriers.txt=2559=guarantees:
--
Documentation/memory-barriers.txt-2582- propagated to, the same thread. This ensures that writes by the CPU
Documentation/memory-barriers.txt:2583: to an outbound DMA buffer allocated by dma_alloc_coherent() will be
Documentation/memory-barriers.txt-2584- visible to a DMA engine when the CPU writes to its MMIO control
--
Documentation/memory-barriers.txt-2589- ensures that reads by the CPU from an incoming DMA buffer allocated
Documentation/memory-barriers.txt:2590: by dma_alloc_coherent() will not see stale data after reading from
Documentation/memory-barriers.txt-2591- the DMA engine's MMIO status register to establish that the DMA
--
Documentation/process/deprecated.rst=78=be used::
Documentation/process/deprecated.rst-79-
Documentation/process/deprecated.rst:80: bar = dma_alloc_coherent(dev, array_size(count, size), &dma, GFP_KERNEL);
Documentation/process/deprecated.rst-81-
--
Documentation/scsi/ChangeLog.arcmsr-22-** 1.20.00.06 3/12/2005 Erich Chen fix with arcmsr_pci_unmap_dma "unsigned long" cast,
Documentation/scsi/ChangeLog.arcmsr:23:** modify PCCB POOL allocated by "dma_alloc_coherent"
Documentation/scsi/ChangeLog.arcmsr-24-** (Kornel Wieliczek's comment)
--
Documentation/scsi/ChangeLog.megaraid_sas=437=waiting for depending on cmd completion from isr path.
--
Documentation/scsi/ChangeLog.megaraid_sas-447- 1. Memory Manager for IOCTL removed for 2.6 kernels.
Documentation/scsi/ChangeLog.megaraid_sas:448: pci_alloc_consistent replaced by dma_alloc_coherent. With this
Documentation/scsi/ChangeLog.megaraid_sas-449- change there is no need of memory manager in the driver code
--
Documentation/scsi/ChangeLog.megaraid_sas-460- It does, but the DMA API was expanded to cope with this exact case, so
Documentation/scsi/ChangeLog.megaraid_sas:461: use dma_alloc_coherent() directly in the megaraid code instead. The dev
Documentation/scsi/ChangeLog.megaraid_sas-462- is just &pci_dev->dev.
--
Documentation/translations/it_IT/process/deprecated.rst=87=le funzioni del tipo *saturate-on-overflow*::
Documentation/translations/it_IT/process/deprecated.rst-88-
Documentation/translations/it_IT/process/deprecated.rst:89: bar = dma_alloc_coherent(dev, array_size(count, size), &dma, GFP_KERNEL);
Documentation/translations/it_IT/process/deprecated.rst-90-
--
Documentation/translations/sp_SP/memory-barriers.txt=2650=grados de garantรญas de orden:
--
Documentation/translations/sp_SP/memory-barriers.txt-2674- que las escrituras de la CPU a un bรบfer DMA de salida asignadas por
Documentation/translations/sp_SP/memory-barriers.txt:2675: dma_alloc_coherent() serรกn visibles para un motor ("engine") DMA
Documentation/translations/sp_SP/memory-barriers.txt-2676- cuando la CPU escriba en sus registros de control MMIO, para activar
--
Documentation/translations/sp_SP/memory-barriers.txt-2682- la CPU desde un bรบfer DMA entrantes asignadas por
Documentation/translations/sp_SP/memory-barriers.txt:2683: dma_alloc_coherent(), no verรกn datos obsoletos despuรฉs de leer el
Documentation/translations/sp_SP/memory-barriers.txt-2684- registro de estado MMIO del motor DMA, para establecer que la
--
arch/alpha/kernel/pci_iommu.c=343=static void alpha_pci_unmap_phys(struct device *dev, dma_addr_t dma_addr,
--
arch/alpha/kernel/pci_iommu.c-404-
arch/alpha/kernel/pci_iommu.c:405:static void *alpha_pci_alloc_coherent(struct device *dev, size_t size,
arch/alpha/kernel/pci_iommu.c-406- dma_addr_t *dma_addrp, gfp_t gfp,
--
arch/alpha/kernel/pci_iommu.c=911=const struct dma_map_ops alpha_pci_ops = {
arch/alpha/kernel/pci_iommu.c:912: .alloc = alpha_pci_alloc_coherent,
arch/alpha/kernel/pci_iommu.c-913- .free = alpha_pci_free_coherent,
--
arch/hexagon/Kconfig=5=config HEXAGON
--
arch/hexagon/Kconfig-24- select HAVE_PERF_EVENTS
arch/hexagon/Kconfig:25: # GENERIC_ALLOCATOR is used by dma_alloc_coherent()
arch/hexagon/Kconfig-26- select GENERIC_ALLOCATOR
--
arch/mips/lantiq/xway/dma.c=122=ltq_dma_alloc(struct ltq_dma_channel *ch)
--
arch/mips/lantiq/xway/dma.c-126- ch->desc = 0;
arch/mips/lantiq/xway/dma.c:127: ch->desc_base = dma_alloc_coherent(ch->dev,
arch/mips/lantiq/xway/dma.c-128- LTQ_DESC_NUM * LTQ_DESC_SIZE,
--
arch/mips/lantiq/xway/vmmc.c=27=static int vmmc_probe(struct platform_device *pdev)
--
arch/mips/lantiq/xway/vmmc.c-35- cp1_base =
arch/mips/lantiq/xway/vmmc.c:36: (void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE,
arch/mips/lantiq/xway/vmmc.c-37- &dma, GFP_KERNEL));
--
arch/powerpc/include/asm/iommu.h=266=extern void ppc_iommu_unmap_sg(struct iommu_table *tbl,
--
arch/powerpc/include/asm/iommu.h-271-
arch/powerpc/include/asm/iommu.h:272:extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
arch/powerpc/include/asm/iommu.h-273- size_t size, dma_addr_t *dma_handle,
--
arch/powerpc/kernel/dma-iommu.c=76=bool arch_dma_free_direct(struct device *dev, dma_addr_t dma_handle)
--
arch/powerpc/kernel/dma-iommu.c-92- */
arch/powerpc/kernel/dma-iommu.c:93:static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
arch/powerpc/kernel/dma-iommu.c-94- dma_addr_t *dma_handle, gfp_t flag,
--
arch/powerpc/kernel/dma-iommu.c-96-{
arch/powerpc/kernel/dma-iommu.c:97: return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size,
arch/powerpc/kernel/dma-iommu.c-98- dma_handle, dev->coherent_dma_mask, flag,
--
arch/powerpc/kernel/dma-iommu.c=216=const struct dma_map_ops dma_iommu_ops = {
arch/powerpc/kernel/dma-iommu.c:217: .alloc = dma_iommu_alloc_coherent,
arch/powerpc/kernel/dma-iommu.c-218- .free = dma_iommu_free_coherent,
--
arch/powerpc/kernel/iommu.c=893=void iommu_unmap_phys(struct iommu_table *tbl, dma_addr_t dma_handle,
--
arch/powerpc/kernel/iommu.c-911- */
arch/powerpc/kernel/iommu.c:912:void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
arch/powerpc/kernel/iommu.c-913- size_t size, dma_addr_t *dma_handle,
--
arch/powerpc/platforms/pasemi/dma_lib.c=242=int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size)
--
arch/powerpc/platforms/pasemi/dma_lib.c-247-
arch/powerpc/platforms/pasemi/dma_lib.c:248: chan->ring_virt = dma_alloc_coherent(&dma_pdev->dev,
arch/powerpc/platforms/pasemi/dma_lib.c-249- ring_size * sizeof(u64),
--
arch/powerpc/platforms/pasemi/dma_lib.c=337=EXPORT_SYMBOL(pasemi_dma_stop_chan);
--
arch/powerpc/platforms/pasemi/dma_lib.c-344- * Allocate a buffer to be used by the DMA engine for read/write,
arch/powerpc/platforms/pasemi/dma_lib.c:345: * similar to dma_alloc_coherent().
arch/powerpc/platforms/pasemi/dma_lib.c-346- *
--
arch/powerpc/platforms/pasemi/dma_lib.c=349=void *pasemi_dma_alloc_buf(struct pasemi_dmachan *chan, int size,
--
arch/powerpc/platforms/pasemi/dma_lib.c-351-{
arch/powerpc/platforms/pasemi/dma_lib.c:352: return dma_alloc_coherent(&dma_pdev->dev, size, handle, GFP_KERNEL);
arch/powerpc/platforms/pasemi/dma_lib.c-353-}
--
arch/powerpc/platforms/ps3/system-bus.c=499=core_initcall(ps3_system_bus_init);
--
arch/powerpc/platforms/ps3/system-bus.c-504- */
arch/powerpc/platforms/ps3/system-bus.c:505:static void * ps3_alloc_coherent(struct device *_dev, size_t size,
arch/powerpc/platforms/ps3/system-bus.c-506- dma_addr_t *dma_handle, gfp_t flag,
--
arch/powerpc/platforms/ps3/system-bus.c=692=static const struct dma_map_ops ps3_sb_dma_ops = {
arch/powerpc/platforms/ps3/system-bus.c:693: .alloc = ps3_alloc_coherent,
arch/powerpc/platforms/ps3/system-bus.c-694- .free = ps3_free_coherent,
--
arch/powerpc/platforms/ps3/system-bus.c=706=static const struct dma_map_ops ps3_ioc0_dma_ops = {
arch/powerpc/platforms/ps3/system-bus.c:707: .alloc = ps3_alloc_coherent,
arch/powerpc/platforms/ps3/system-bus.c-708- .free = ps3_free_coherent,
--
arch/powerpc/platforms/pseries/ibmebus.c=61=static const struct of_device_id ibmebus_matches[] __initconst = {
--
arch/powerpc/platforms/pseries/ibmebus.c-66-
arch/powerpc/platforms/pseries/ibmebus.c:67:static void *ibmebus_alloc_coherent(struct device *dev,
arch/powerpc/platforms/pseries/ibmebus.c-68- size_t size,
--
arch/powerpc/platforms/pseries/ibmebus.c=143=static const struct dma_map_ops ibmebus_dma_ops = {
arch/powerpc/platforms/pseries/ibmebus.c:144: .alloc = ibmebus_alloc_coherent,
arch/powerpc/platforms/pseries/ibmebus.c-145- .free = ibmebus_free_coherent,
--
arch/powerpc/platforms/pseries/vio.c=386=static void vio_cmo_balance(struct work_struct *work)
--
arch/powerpc/platforms/pseries/vio.c-481-
arch/powerpc/platforms/pseries/vio.c:482:static void *vio_dma_iommu_alloc_coherent(struct device *dev, size_t size,
arch/powerpc/platforms/pseries/vio.c-483- dma_addr_t *dma_handle, gfp_t flag,
--
arch/powerpc/platforms/pseries/vio.c-493-
arch/powerpc/platforms/pseries/vio.c:494: ret = iommu_alloc_coherent(dev, get_iommu_table_base(dev), size,
arch/powerpc/platforms/pseries/vio.c-495- dma_handle, dev->coherent_dma_mask, flag,
--
arch/powerpc/platforms/pseries/vio.c=606=static const struct dma_map_ops vio_dma_mapping_ops = {
arch/powerpc/platforms/pseries/vio.c:607: .alloc = vio_dma_iommu_alloc_coherent,
arch/powerpc/platforms/pseries/vio.c-608- .free = vio_dma_iommu_free_coherent,
--
arch/powerpc/sysdev/fsl_rmu.c=543=int fsl_rio_port_write_init(struct fsl_rio_pw *pw)
--
arch/powerpc/sysdev/fsl_rmu.c-551- /* Initialize port write */
arch/powerpc/sysdev/fsl_rmu.c:552: pw->port_write_msg.virt = dma_alloc_coherent(pw->dev,
arch/powerpc/sysdev/fsl_rmu.c-553- RIO_PW_MSG_SIZE,
--
arch/powerpc/sysdev/fsl_rmu.c=720=fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
--
arch/powerpc/sysdev/fsl_rmu.c-737- rmu->msg_tx_ring.virt_buffer[i] =
arch/powerpc/sysdev/fsl_rmu.c:738: dma_alloc_coherent(priv->dev, RIO_MSG_BUFFER_SIZE,
arch/powerpc/sysdev/fsl_rmu.c-739- &rmu->msg_tx_ring.phys_buffer[i], GFP_KERNEL);
--
arch/powerpc/sysdev/fsl_rmu.c-754- /* Initialize outbound message descriptor ring */
arch/powerpc/sysdev/fsl_rmu.c:755: rmu->msg_tx_ring.virt = dma_alloc_coherent(priv->dev,
arch/powerpc/sysdev/fsl_rmu.c-756- rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE,
--
arch/powerpc/sysdev/fsl_rmu.c=852=fsl_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
--
arch/powerpc/sysdev/fsl_rmu.c-871- /* Initialize inbound message ring */
arch/powerpc/sysdev/fsl_rmu.c:872: rmu->msg_rx_ring.virt = dma_alloc_coherent(priv->dev,
arch/powerpc/sysdev/fsl_rmu.c-873- rmu->msg_rx_ring.size * RIO_MAX_MSG_SIZE,
--
arch/powerpc/sysdev/fsl_rmu.c=1027=int fsl_rio_doorbell_init(struct fsl_rio_dbell *dbell)
--
arch/powerpc/sysdev/fsl_rmu.c-1031- /* Initialize inbound doorbells */
arch/powerpc/sysdev/fsl_rmu.c:1032: dbell->dbell_ring.virt = dma_alloc_coherent(dbell->dev, 512 *
arch/powerpc/sysdev/fsl_rmu.c-1033- DOORBELL_MESSAGE_SIZE, &dbell->dbell_ring.phys, GFP_KERNEL);
--
arch/sh/mm/consistent.c=37=int __init platform_resource_setup_memory(struct platform_device *pdev,
--
arch/sh/mm/consistent.c-53-
arch/sh/mm/consistent.c:54: buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL);
arch/sh/mm/consistent.c-55- if (!buf) {
--
arch/sparc/kernel/iommu.c=188=static inline void iommu_free_ctx(struct iommu *iommu, int ctx)
--
arch/sparc/kernel/iommu.c-196-
arch/sparc/kernel/iommu.c:197:static void *dma_4u_alloc_coherent(struct device *dev, size_t size,
arch/sparc/kernel/iommu.c-198- dma_addr_t *dma_addrp, gfp_t gfp,
--
arch/sparc/kernel/iommu.c=763=static const struct dma_map_ops sun4u_dma_ops = {
arch/sparc/kernel/iommu.c:764: .alloc = dma_4u_alloc_coherent,
arch/sparc/kernel/iommu.c-765- .free = dma_4u_free_coherent,
--
arch/sparc/kernel/pci_sun4v.c=172=static inline long iommu_batch_end(u64 mask)
--
arch/sparc/kernel/pci_sun4v.c-180-
arch/sparc/kernel/pci_sun4v.c:181:static void *dma_4v_alloc_coherent(struct device *dev, size_t size,
arch/sparc/kernel/pci_sun4v.c-182- dma_addr_t *dma_addrp, gfp_t gfp,
--
arch/sparc/kernel/pci_sun4v.c=695=static const struct dma_map_ops sun4v_dma_ops = {
arch/sparc/kernel/pci_sun4v.c:696: .alloc = dma_4v_alloc_coherent,
arch/sparc/kernel/pci_sun4v.c-697- .free = dma_4v_free_coherent,
--
arch/x86/kernel/amd_gart_64.c=464=static void *
arch/x86/kernel/amd_gart_64.c:465:gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,
arch/x86/kernel/amd_gart_64.c-466- gfp_t flag, unsigned long attrs)
--
arch/x86/kernel/amd_gart_64.c=673=static const struct dma_map_ops gart_dma_ops = {
--
arch/x86/kernel/amd_gart_64.c-677- .unmap_phys = gart_unmap_phys,
arch/x86/kernel/amd_gart_64.c:678: .alloc = gart_alloc_coherent,
arch/x86/kernel/amd_gart_64.c-679- .free = gart_free_coherent,
--
drivers/accel/habanalabs/common/command_buffer.c=103=static struct hl_cb *hl_cb_alloc(struct hl_device *hdev, u32 cb_size,
--
drivers/accel/habanalabs/common/command_buffer.c-137- } else if (ctx_id == HL_KERNEL_ASID_ID) {
drivers/accel/habanalabs/common/command_buffer.c:138: p = hl_asic_dma_alloc_coherent(hdev, cb_size, &cb->bus_address, GFP_ATOMIC);
drivers/accel/habanalabs/common/command_buffer.c-139- if (!p)
drivers/accel/habanalabs/common/command_buffer.c:140: p = hl_asic_dma_alloc_coherent(hdev, cb_size, &cb->bus_address, GFP_KERNEL);
drivers/accel/habanalabs/common/command_buffer.c-141- } else {
drivers/accel/habanalabs/common/command_buffer.c:142: p = hl_asic_dma_alloc_coherent(hdev, cb_size, &cb->bus_address,
drivers/accel/habanalabs/common/command_buffer.c-143- GFP_USER | __GFP_ZERO);
--
drivers/accel/habanalabs/common/device.c=119=static void *hl_dma_alloc_common(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
--
drivers/accel/habanalabs/common/device.c-126- case DMA_ALLOC_COHERENT:
drivers/accel/habanalabs/common/device.c:127: ptr = hdev->asic_funcs->asic_dma_alloc_coherent(hdev, size, dma_handle, flag);
drivers/accel/habanalabs/common/device.c-128- break;
--
drivers/accel/habanalabs/common/device.c=141=static void hl_asic_dma_free_common(struct hl_device *hdev, size_t size, void *cpu_addr,
--
drivers/accel/habanalabs/common/device.c-159-
drivers/accel/habanalabs/common/device.c:160:void *hl_asic_dma_alloc_coherent_caller(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
drivers/accel/habanalabs/common/device.c-161- gfp_t flag, const char *caller)
--
drivers/accel/habanalabs/common/habanalabs.h=117=enum hl_mmu_page_table_location {
--
drivers/accel/habanalabs/common/habanalabs.h-149-/* DMA alloc/free wrappers */
drivers/accel/habanalabs/common/habanalabs.h:150:#define hl_asic_dma_alloc_coherent(hdev, size, dma_handle, flags) \
drivers/accel/habanalabs/common/habanalabs.h:151: hl_asic_dma_alloc_coherent_caller(hdev, size, dma_handle, flags, __func__)
drivers/accel/habanalabs/common/habanalabs.h-152-
--
drivers/accel/habanalabs/common/habanalabs.h=1510=struct engines_data {
--
drivers/accel/habanalabs/common/habanalabs.h-1538- * properties.
drivers/accel/habanalabs/common/habanalabs.h:1539: * @asic_dma_alloc_coherent: Allocate coherent DMA memory by calling
drivers/accel/habanalabs/common/habanalabs.h:1540: * dma_alloc_coherent(). This is ASIC function because
drivers/accel/habanalabs/common/habanalabs.h-1541- * its implementation is not trivial when the driver
--
drivers/accel/habanalabs/common/habanalabs.h=1645=struct hl_asic_funcs {
--
drivers/accel/habanalabs/common/habanalabs.h-1661- struct hl_bd *bd);
drivers/accel/habanalabs/common/habanalabs.h:1662: void* (*asic_dma_alloc_coherent)(struct hl_device *hdev, size_t size,
drivers/accel/habanalabs/common/habanalabs.h-1663- dma_addr_t *dma_handle, gfp_t flag);
--
drivers/accel/habanalabs/common/habanalabs.h=3756=void hl_cpu_accessible_dma_pool_free(struct hl_device *hdev, size_t size, void *vaddr);
drivers/accel/habanalabs/common/habanalabs.h:3757:void *hl_asic_dma_alloc_coherent_caller(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
drivers/accel/habanalabs/common/habanalabs.h-3758- gfp_t flag, const char *caller);
--
drivers/accel/habanalabs/common/hw_queue.c=824=static int ext_and_cpu_queue_init(struct hl_device *hdev, struct hl_hw_queue *q,
--
drivers/accel/habanalabs/common/hw_queue.c-832- else
drivers/accel/habanalabs/common/hw_queue.c:833: p = hl_asic_dma_alloc_coherent(hdev, HL_QUEUE_SIZE_IN_BYTES, &q->bus_address,
drivers/accel/habanalabs/common/hw_queue.c-834- GFP_KERNEL | __GFP_ZERO);
--
drivers/accel/habanalabs/common/hw_queue.c=895=static int hw_queue_init(struct hl_device *hdev, struct hl_hw_queue *q)
--
drivers/accel/habanalabs/common/hw_queue.c-898-
drivers/accel/habanalabs/common/hw_queue.c:899: p = hl_asic_dma_alloc_coherent(hdev, HL_QUEUE_SIZE_IN_BYTES, &q->bus_address,
drivers/accel/habanalabs/common/hw_queue.c-900- GFP_KERNEL | __GFP_ZERO);
--
drivers/accel/habanalabs/common/irq.c=596=int hl_cq_init(struct hl_device *hdev, struct hl_cq *q, u32 hw_queue_id)
--
drivers/accel/habanalabs/common/irq.c-599-
drivers/accel/habanalabs/common/irq.c:600: p = hl_asic_dma_alloc_coherent(hdev, HL_CQ_SIZE_IN_BYTES, &q->bus_address,
drivers/accel/habanalabs/common/irq.c-601- GFP_KERNEL | __GFP_ZERO);
--
drivers/accel/habanalabs/common/mmu/mmu.c=824=int hl_mmu_hr_init(struct hl_device *hdev, struct hl_mmu_hr_priv *hr_priv, u32 hop_table_size,
--
drivers/accel/habanalabs/common/mmu/mmu.c-834- /*
drivers/accel/habanalabs/common/mmu/mmu.c:835: * we set alloc size as PAGE_SIZE (sine dma_alloc_coherent allocation order/size is
drivers/accel/habanalabs/common/mmu/mmu.c-836- * PAGE_SHIFT/PAGE_SIZE) in order to be able to control the allocations alignment.
--
drivers/accel/habanalabs/common/mmu/mmu.c-853- for (i = 0 ; i < pgt_size ; i += pool_chunk_size) {
drivers/accel/habanalabs/common/mmu/mmu.c:854: virt_addr = (uintptr_t) hl_asic_dma_alloc_coherent(hdev, pool_chunk_size,
drivers/accel/habanalabs/common/mmu/mmu.c-855- &dma_addr,
--
drivers/accel/habanalabs/common/mmu/mmu.c=1064=struct pgt_info *hl_mmu_hr_alloc_hop(struct hl_ctx *ctx, struct hl_mmu_hr_priv *hr_priv,
--
drivers/accel/habanalabs/common/mmu/mmu.c-1086- /* No memory in pool - get some and try again */
drivers/accel/habanalabs/common/mmu/mmu.c:1087: virt_addr = hl_asic_dma_alloc_coherent(hdev, SZ_2M, &phys_addr,
drivers/accel/habanalabs/common/mmu/mmu.c-1088- GFP_KERNEL | __GFP_ZERO);
--
drivers/accel/habanalabs/gaudi/gaudi.c=1049=static int gaudi_init_tpc_mem(struct hl_device *hdev)
--
drivers/accel/habanalabs/gaudi/gaudi.c-1070- fw_size = fw->size;
drivers/accel/habanalabs/gaudi/gaudi.c:1071: cpu_addr = hl_asic_dma_alloc_coherent(hdev, fw_size, &dma_handle, GFP_KERNEL | __GFP_ZERO);
drivers/accel/habanalabs/gaudi/gaudi.c-1072- if (!cpu_addr) {
--
drivers/accel/habanalabs/gaudi/gaudi.c=1693=static int gaudi_alloc_cpu_accessible_dma_mem(struct hl_device *hdev)
--
drivers/accel/habanalabs/gaudi/gaudi.c-1708- for (i = 0 ; i < GAUDI_ALLOC_CPU_MEM_RETRY_CNT ; i++) {
drivers/accel/habanalabs/gaudi/gaudi.c:1709: virt_addr_arr[i] = hl_asic_dma_alloc_coherent(hdev, HL_CPU_ACCESSIBLE_MEM_SIZE,
drivers/accel/habanalabs/gaudi/gaudi.c-1710- &dma_addr_arr[i],
--
drivers/accel/habanalabs/gaudi/gaudi.c=1760=static int gaudi_alloc_internal_qmans_pq_mem(struct hl_device *hdev)
--
drivers/accel/habanalabs/gaudi/gaudi.c-1790-
drivers/accel/habanalabs/gaudi/gaudi.c:1791: q->pq_kernel_addr = hl_asic_dma_alloc_coherent(hdev, q->pq_size, &q->pq_dma_addr,
drivers/accel/habanalabs/gaudi/gaudi.c-1792- GFP_KERNEL | __GFP_ZERO);
--
drivers/accel/habanalabs/gaudi/gaudi.c=4162=static int gaudi_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
--
drivers/accel/habanalabs/gaudi/gaudi.c-4171- /*
drivers/accel/habanalabs/gaudi/gaudi.c:4172: * If dma_alloc_coherent() returns a vmalloc address, set VM_MIXEDMAP
drivers/accel/habanalabs/gaudi/gaudi.c-4173- * so vm_insert_page() can handle it safely. Without this, the kernel
--
drivers/accel/habanalabs/gaudi/gaudi.c=4539=static void gaudi_pqe_write(struct hl_device *hdev, __le64 *pqe,
--
drivers/accel/habanalabs/gaudi/gaudi.c-4548-
drivers/accel/habanalabs/gaudi/gaudi.c:4549:static void *gaudi_dma_alloc_coherent(struct hl_device *hdev, size_t size,
drivers/accel/habanalabs/gaudi/gaudi.c-4550- dma_addr_t *dma_handle, gfp_t flags)
drivers/accel/habanalabs/gaudi/gaudi.c-4551-{
drivers/accel/habanalabs/gaudi/gaudi.c:4552: void *kernel_addr = dma_alloc_coherent(&hdev->pdev->dev, size,
drivers/accel/habanalabs/gaudi/gaudi.c-4553- dma_handle, flags);
--
drivers/accel/habanalabs/gaudi/gaudi.c=5935=static int gaudi_debugfs_read_dma(struct hl_device *hdev, u64 addr, u32 size,
--
drivers/accel/habanalabs/gaudi/gaudi.c-5945-
drivers/accel/habanalabs/gaudi/gaudi.c:5946: kernel_addr = hl_asic_dma_alloc_coherent(hdev, SZ_2M, &dma_addr, GFP_KERNEL | __GFP_ZERO);
drivers/accel/habanalabs/gaudi/gaudi.c-5947-
--
drivers/accel/habanalabs/gaudi/gaudi.c=8304=static int gaudi_internal_cb_pool_init(struct hl_device *hdev,
--
drivers/accel/habanalabs/gaudi/gaudi.c-8312-
drivers/accel/habanalabs/gaudi/gaudi.c:8313: hdev->internal_cb_pool_virt_addr = hl_asic_dma_alloc_coherent(hdev,
drivers/accel/habanalabs/gaudi/gaudi.c-8314- HOST_SPACE_INTERNAL_CB_SZ,
--
drivers/accel/habanalabs/gaudi/gaudi.c=9130=static const struct hl_asic_funcs gaudi_funcs = {
--
drivers/accel/habanalabs/gaudi/gaudi.c-9144- .pqe_write = gaudi_pqe_write,
drivers/accel/habanalabs/gaudi/gaudi.c:9145: .asic_dma_alloc_coherent = gaudi_dma_alloc_coherent,
drivers/accel/habanalabs/gaudi/gaudi.c-9146- .asic_dma_free_coherent = gaudi_dma_free_coherent,
--
drivers/accel/habanalabs/gaudi2/gaudi2.c=3795=static int gaudi2_alloc_cpu_accessible_dma_mem(struct hl_device *hdev)
--
drivers/accel/habanalabs/gaudi2/gaudi2.c-3806- for (i = 0 ; i < GAUDI2_ALLOC_CPU_MEM_RETRY_CNT ; i++) {
drivers/accel/habanalabs/gaudi2/gaudi2.c:3807: virt_addr_arr[i] = hl_asic_dma_alloc_coherent(hdev, HL_CPU_ACCESSIBLE_MEM_SIZE,
drivers/accel/habanalabs/gaudi2/gaudi2.c-3808- &dma_addr_arr[i], GFP_KERNEL | __GFP_ZERO);
--
drivers/accel/habanalabs/gaudi2/gaudi2.c=6832=static int gaudi2_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
--
drivers/accel/habanalabs/gaudi2/gaudi2.c-6841- /*
drivers/accel/habanalabs/gaudi2/gaudi2.c:6842: * If dma_alloc_coherent() returns a vmalloc address, set VM_MIXEDMAP
drivers/accel/habanalabs/gaudi2/gaudi2.c-6843- * so vm_insert_page() can handle it safely. Without this, the kernel
--
drivers/accel/habanalabs/gaudi2/gaudi2.c=7069=static void gaudi2_pqe_write(struct hl_device *hdev, __le64 *pqe, struct hl_bd *bd)
--
drivers/accel/habanalabs/gaudi2/gaudi2.c-7077-
drivers/accel/habanalabs/gaudi2/gaudi2.c:7078:static void *gaudi2_dma_alloc_coherent(struct hl_device *hdev, size_t size,
drivers/accel/habanalabs/gaudi2/gaudi2.c-7079- dma_addr_t *dma_handle, gfp_t flags)
drivers/accel/habanalabs/gaudi2/gaudi2.c-7080-{
drivers/accel/habanalabs/gaudi2/gaudi2.c:7081: return dma_alloc_coherent(&hdev->pdev->dev, size, dma_handle, flags);
drivers/accel/habanalabs/gaudi2/gaudi2.c-7082-}
--
drivers/accel/habanalabs/gaudi2/gaudi2.c=11027=static int gaudi2_debugfs_read_dma(struct hl_device *hdev, u64 addr, u32 size, void *blob_addr)
--
drivers/accel/habanalabs/gaudi2/gaudi2.c-11043- /* Allocate buffers for read and for poll */
drivers/accel/habanalabs/gaudi2/gaudi2.c:11044: host_mem_virtual_addr = hl_asic_dma_alloc_coherent(hdev, SZ_2M, &host_mem_dma_addr,
drivers/accel/habanalabs/gaudi2/gaudi2.c-11045- GFP_KERNEL | __GFP_ZERO);
--
drivers/accel/habanalabs/gaudi2/gaudi2.c=11127=static int gaudi2_internal_cb_pool_init(struct hl_device *hdev, struct hl_ctx *ctx)
--
drivers/accel/habanalabs/gaudi2/gaudi2.c-11134-
drivers/accel/habanalabs/gaudi2/gaudi2.c:11135: hdev->internal_cb_pool_virt_addr = hl_asic_dma_alloc_coherent(hdev,
drivers/accel/habanalabs/gaudi2/gaudi2.c-11136- HOST_SPACE_INTERNAL_CB_SZ,
--
drivers/accel/habanalabs/gaudi2/gaudi2.c=11905=static const struct hl_asic_funcs gaudi2_funcs = {
--
drivers/accel/habanalabs/gaudi2/gaudi2.c-11919- .pqe_write = gaudi2_pqe_write,
drivers/accel/habanalabs/gaudi2/gaudi2.c:11920: .asic_dma_alloc_coherent = gaudi2_dma_alloc_coherent,
drivers/accel/habanalabs/gaudi2/gaudi2.c-11921- .asic_dma_free_coherent = gaudi2_dma_free_coherent,
--
drivers/accel/habanalabs/goya/goya.c=966=static int goya_sw_init(struct hl_device *hdev)
--
drivers/accel/habanalabs/goya/goya.c-993-
drivers/accel/habanalabs/goya/goya.c:994: hdev->cpu_accessible_dma_mem = hl_asic_dma_alloc_coherent(hdev, HL_CPU_ACCESSIBLE_MEM_SIZE,
drivers/accel/habanalabs/goya/goya.c-995- &hdev->cpu_accessible_dma_address,
--
drivers/accel/habanalabs/goya/goya.c=2972=void goya_pqe_write(struct hl_device *hdev, __le64 *pqe, struct hl_bd *bd)
--
drivers/accel/habanalabs/goya/goya.c-2977-
drivers/accel/habanalabs/goya/goya.c:2978:static void *goya_dma_alloc_coherent(struct hl_device *hdev, size_t size,
drivers/accel/habanalabs/goya/goya.c-2979- dma_addr_t *dma_handle, gfp_t flags)
drivers/accel/habanalabs/goya/goya.c-2980-{
drivers/accel/habanalabs/goya/goya.c:2981: void *kernel_addr = dma_alloc_coherent(&hdev->pdev->dev, size,
drivers/accel/habanalabs/goya/goya.c-2982- dma_handle, flags);
--
drivers/accel/habanalabs/goya/goya.c=5431=static const struct hl_asic_funcs goya_funcs = {
--
drivers/accel/habanalabs/goya/goya.c-5445- .pqe_write = goya_pqe_write,
drivers/accel/habanalabs/goya/goya.c:5446: .asic_dma_alloc_coherent = goya_dma_alloc_coherent,
drivers/accel/habanalabs/goya/goya.c-5447- .asic_dma_free_coherent = goya_dma_free_coherent,
--
drivers/accel/ivpu/ivpu_mmu.c=335=static int ivpu_mmu_cdtab_alloc(struct ivpu_device *vdev)
]
] |
| 48/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 63002 output: 43 thoughts: 63 Thoughts: Here's my take on the thought process: **USB Coherent Memory Allocation - A Quick Refresher** Okay, so I'm trying to refresh my memory on the nitty-gritty of USB memory management, specifically how we're dealing with coherent memory allocation. Right, *`usb_alloc_coherent`*... is that just a convenience wrapper, or does it actually *do* something significantly different under the hood? It seems like it's a wrapper, but is it just calling *`dma_alloc_coherent`* directly, or is there some intelligent fallback to *`kmalloc`* depending on the platform or requirements? Time to dig into the source code. Let's start with the obvious places โ I'll check *`drivers/usb/core/usb.c`* and, if it's not there, *`drivers/usb/core/buffer.c`*. Those are the logical starting points for anything related to the core USB stack and buffer management, respectively. I'm hoping I can refresh myself on the specific implementation details, especially if it's got some conditional behavior based on system architecture or DMA capabilities. Gotta refresh my memory before I start making assumptions. |
| 49/2 | 2026/05/19 10:34 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/core/buffer.c IncludeLines:true Name:usb_alloc_coherent] Results: map[SourceCode: 983: /**
984: * usb_alloc_coherent - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP
985: * @dev: device the buffer will be used with
986: * @size: requested buffer size
987: * @mem_flags: affect whether allocation may block
988: * @dma: used to return DMA address of buffer
989: *
990: * Return: Either null (indicating no buffer could be allocated), or the
991: * cpu-space pointer to a buffer that may be used to perform DMA to the
992: * specified device. Such cpu-space buffers are returned along with the DMA
993: * address (through the pointer provided).
994: *
995: * Note:
996: * These buffers are used with URB_NO_xxx_DMA_MAP set in urb->transfer_flags
997: * to avoid behaviors like using "DMA bounce buffers", or thrashing IOMMU
998: * hardware during URB completion/resubmit. The implementation varies between
999: * platforms, depending on details of how DMA will work to this device.
1000: * Using these buffers also eliminates cacheline sharing problems on
1001: * architectures where CPU caches are not DMA-coherent. On systems without
1002: * bus-snooping caches, these buffers are uncached.
1003: *
1004: * When the buffer is no longer used, free it with usb_free_coherent().
1005: */
1006: void *usb_alloc_coherent(struct usb_device *dev, size_t size, gfp_t mem_flags,
1007: dma_addr_t *dma)
1008: {
1009: if (!dev || !dev->bus)
1010: return NULL;
1011: return hcd_buffer_alloc(dev->bus, size, mem_flags, dma);
1012: }
SourceFile:drivers/usb/core/usb.c] |
| 50/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 63936 output: 44 thoughts: 12 Thoughts: Okay, here's my attempt at summarizing that thought process, keeping in mind I'm speaking to a fellow expert: **Debugging `hcd_buffer_alloc`** Right, let's dive in. I need to get into the details of this `hcd_buffer_alloc` function. Something isn't quite right, and the problem likely resides within its logic. My initial hunch is to scrutinize its internal workings. I need to understand exactly how it's allocating, managing, and returning these buffers. Is there a memory leak? Are we exhausting the available pool too quickly? Is a crucial mutex not being handled correctly? I'm going to carefully trace its execution path, paying close attention to any conditional branches or potential race conditions. I'll probably also want to cross-reference this function's implementation against the documentation and any associated header files to ensure I haven't missed a key detail. It's time to dig in and pinpoint the root cause. |
| 51/2 | 2026/05/19 10:34 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/core/buffer.c IncludeLines:true Name:hcd_buffer_alloc] Results: map[SourceCode: 115: void *hcd_buffer_alloc(
116: struct usb_bus *bus,
117: size_t size,
118: gfp_t mem_flags,
119: dma_addr_t *dma
120: )
121: {
122: struct usb_hcd *hcd = bus_to_hcd(bus);
123: int i;
124:
125: if (size == 0)
126: return NULL;
127:
128: if (hcd->localmem_pool)
129: return gen_pool_dma_alloc(hcd->localmem_pool, size, dma);
130:
131: /* some USB hosts just use PIO */
132: if (!hcd_uses_dma(hcd)) {
133: *dma = ~(dma_addr_t) 0;
134: return kmalloc(size, mem_flags);
135: }
136:
137: for (i = 0; i < HCD_BUFFER_POOLS; i++) {
138: if (size <= pool_max[i])
139: return dma_pool_alloc(hcd->pool[i], mem_flags, dma);
140: }
141: return dma_alloc_coherent(hcd->self.sysdev, size, dma, mem_flags);
142: }
SourceFile:drivers/usb/core/buffer.c] |
| 52/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 64663 output: 43 thoughts: 1564 Thoughts: **Analyzing the HID Driver Crash** Okay, so I'm digging into this kernel crash related to the HID driver, specifically, the `mcp2221` driver. The crash occurs when accessing `data[0]` within `mcp2221_raw_event`, and the address points to a `task_struct`, which is obviously wrong. Let's see what's going on here. The first clue is that the `dummy_hcd` doesn't use DMA, so the driver ends up calling `kmalloc(64, GFP_KERNEL)` to allocate a buffer for USB transactions, which should come from the `kmalloc-64` slab cache. But the crash log is talking about a `task_struct`. How does data end up pointing to a `task_struct`? Let's check `mcp2221_raw_event` again. Looking into the `mcp2221_raw_event` function, the `data` pointer is actually the `urb->transfer_buffer`, which is the direct output from the USB transfer. Then let's consider the BPF path: if BPF is enabled, `dispatch_hid_bpf_device_event` is called. It checks `hdev->bpf.device_data`, allocates an appropriate size of memory if necessary, and copies the `data` there. I have to think about what is the allocation size? I see that `__hid_bpf_allocate_data` is called, and `alloc_size` is calculated from `max_report_len`, which comes from the HID report descriptors. If the report descriptor length is 0, then the `alloc_size` would also be 0, and `kzalloc(0)` would return `ZERO_SIZE_PTR`. However, the crash address is not 0x10. It is a valid kernel address. So `alloc_size` must not be 0. So what's going on? The crucial piece is the syzkaller reproducer. The report descriptor length is explicitly set to 0. This means `hid_parse` might fail and `max_report_len` is zero. But, the crash is still happening, so `mcp2221_raw_event` is still called. This function is called only if `hid_match_report(hid, report)` is true, and this is only true if `report` is non-NULL. But if there are zero reports, `hid_get_report` would return NULL and there's no way the `raw_event` function gets called! Wait, wait... the reproducer uses `syz_usb_control_io`. This means the report descriptor is provided as a response to a control request, which explains why `hid_parse` might "succeed" if the response is valid. What is the response? The generic response is 9 bytes: `00 00 08 00 00 00 08 04 82`. This doesn't look like a valid descriptor at all. The first byte is `00`, which, according to HID specs, is an invalid item type. Let's decode it: `00 00 08 00 00 00 08 04 82`. So `0x04` is `Usage Page`. `0x08` is `Usage`. `0x82` is `Input`. Looks like the HID report descriptor is invalid, which caused problems in the parsing stage. Need to check what happens in `hid_parse_report`. |
| 53/2 | 2026/05/19 10:34 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:hid_parse_report] Results: map[SourceCode: 995: /**
996: * hid_parse_report - parse device report
997: *
998: * @hid: hid device
999: * @start: report start
1000: * @size: report size
1001: *
1002: * Allocate the device report as read by the bus driver. This function should
1003: * only be called from parse() in ll drivers.
1004: */
1005: int hid_parse_report(struct hid_device *hid, const __u8 *start, unsigned size)
1006: {
1007: hid->dev_rdesc = kmemdup(start, size, GFP_KERNEL);
1008: if (!hid->dev_rdesc)
1009: return -ENOMEM;
1010: hid->dev_rsize = size;
1011: return 0;
1012: }
SourceFile:drivers/hid/hid-core.c] |
| 54/2 | 2026/05/19 10:34 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 67345 output: 43 thoughts: 37 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Unpacking the HID Report Descriptor Process** Alright, let me just run through this again in my head. So, `hid_parse_report`... ah, right, it's the *descriptor* that's getting stored. It's not *actually* where the heavy lifting of interpretation happens, no, no. That initial parse just gets the data ready. Now, where does the real work begin? Ah, yes, that's it! It's when `hid_device_probe` kicks in and calls `hid_open_report`. That's the critical juncture. That's where we get down to brass tacks: probing the device, and getting ready to dive into the data! `hid_open_report` must be the point where the descriptor gets used to do the actual mapping, decoding, and all that good stuff to figure out exactly what the device is going to be sending. Got it. That's the correct flow. |
| 55/2 | 2026/05/19 10:35 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:hid_open_report] Results: map[SourceCode:1332: /**
1333: * hid_open_report - open a driver-specific device report
1334: *
1335: * @device: hid device
1336: *
1337: * Parse a report description into a hid_device structure. Reports are
1338: * enumerated, fields are attached to these reports.
1339: * 0 returned on success, otherwise nonzero error value.
1340: *
1341: * This function (or the equivalent hid_parse() macro) should only be
1342: * called from probe() in drivers, before starting the device.
1343: */
1344: int hid_open_report(struct hid_device *device)
1345: {
1346: unsigned int size;
1347: const u8 *start;
1348: int error;
1349:
1350: if (WARN_ON(device->status & HID_STAT_PARSED))
1351: return -EBUSY;
1352:
1353: start = device->bpf_rdesc;
1354: if (WARN_ON(!start))
1355: return -ENODEV;
1356: size = device->bpf_rsize;
1357:
1358: if (device->driver->report_fixup) {
1359: /*
1360: * device->driver->report_fixup() needs to work
1361: * on a copy of our report descriptor so it can
1362: * change it.
1363: */
1364: u8 *buf __free(kfree) = kmemdup(start, size, GFP_KERNEL);
1365:
1366: if (!buf)
1367: return -ENOMEM;
1368:
1369: start = device->driver->report_fixup(device, buf, &size);
1370:
1371: /*
1372: * The second kmemdup is required in case report_fixup() returns
1373: * a static read-only memory, but we have no idea if that memory
1374: * needs to be cleaned up or not at the end.
1375: */
1376: start = kmemdup(start, size, GFP_KERNEL);
1377: if (!start)
1378: return -ENOMEM;
1379: }
1380:
1381: device->rdesc = start;
1382: device->rsize = size;
1383:
1384: error = hid_parse_collections(device);
1385: if (error) {
1386: hid_close_report(device);
1387: return error;
1388: }
1389:
1390: return 0;
1391: }
SourceFile:drivers/hid/hid-core.c] |
| 56/2 | 2026/05/19 10:35 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 68487 output: 51 thoughts: 33 Thoughts: Here's my thought process, as if I were analyzing that code: **Diving into the Event Handling** Okay, so I see `mcp2221_raw_event` being called. That's the signal to dig in. I need to understand what's happening at this low level. First, let's refresh our understanding of where this event comes from and what triggered it. I'm going to jump straight to the source and scrutinize `mcp2221_probe`. That's where it all begins, it seems, in order to get the full picture. I need to figure out what events may occur and under what conditions. |
| 57/2 | 2026/05/19 10:35 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp2221_probe] Results: map[SourceCode:1237: static int mcp2221_probe(struct hid_device *hdev,
1238: const struct hid_device_id *id)
1239: {
1240: int ret;
1241: struct mcp2221 *mcp;
1242:
1243: mcp = devm_kzalloc(&hdev->dev, sizeof(*mcp), GFP_KERNEL);
1244: if (!mcp)
1245: return -ENOMEM;
1246:
1247: ret = hid_parse(hdev);
1248: if (ret) {
1249: hid_err(hdev, "can't parse reports\n");
1250: return ret;
1251: }
1252:
1253: /*
1254: * This driver uses the .raw_event callback and therefore does not need any
1255: * HID_CONNECT_xxx flags.
1256: */
1257: ret = hid_hw_start(hdev, 0);
1258: if (ret) {
1259: hid_err(hdev, "can't start hardware\n");
1260: return ret;
1261: }
1262:
1263: hid_info(hdev, "USB HID v%x.%02x Device [%s] on %s\n", hdev->version >> 8,
1264: hdev->version & 0xff, hdev->name, hdev->phys);
1265:
1266: ret = hid_hw_open(hdev);
1267: if (ret) {
1268: hid_err(hdev, "can't open device\n");
1269: hid_hw_stop(hdev);
1270: return ret;
1271: }
1272:
1273: mutex_init(&mcp->lock);
1274: init_completion(&mcp->wait_in_report);
1275: hid_set_drvdata(hdev, mcp);
1276: mcp->hdev = hdev;
1277:
1278: ret = devm_add_action_or_reset(&hdev->dev, mcp2221_hid_unregister, hdev);
1279: if (ret)
1280: return ret;
1281:
1282: hid_device_io_start(hdev);
1283:
1284: /* Set I2C bus clock diviser */
1285: if (i2c_clk_freq > 400)
1286: i2c_clk_freq = 400;
1287: if (i2c_clk_freq < 50)
1288: i2c_clk_freq = 50;
1289: mcp->cur_i2c_clk_div = (12000000 / (i2c_clk_freq * 1000)) - 3;
1290: ret = mcp_set_i2c_speed(mcp);
1291: if (ret) {
1292: hid_err(hdev, "can't set i2c speed: %d\n", ret);
1293: return ret;
1294: }
1295:
1296: mcp->adapter.owner = THIS_MODULE;
1297: mcp->adapter.class = I2C_CLASS_HWMON;
1298: mcp->adapter.algo = &mcp_i2c_algo;
1299: mcp->adapter.retries = 1;
1300: mcp->adapter.dev.parent = &hdev->dev;
1301: ACPI_COMPANION_SET(&mcp->adapter.dev, ACPI_COMPANION(hdev->dev.parent));
1302: snprintf(mcp->adapter.name, sizeof(mcp->adapter.name),
1303: "MCP2221 usb-i2c bridge");
1304:
1305: i2c_set_adapdata(&mcp->adapter, mcp);
1306: ret = devm_i2c_add_adapter(&hdev->dev, &mcp->adapter);
1307: if (ret) {
1308: hid_err(hdev, "can't add usb-i2c adapter: %d\n", ret);
1309: return ret;
1310: }
1311:
1312: #if IS_REACHABLE(CONFIG_GPIOLIB)
1313: /* Setup GPIO chip */
1314: mcp->gc = devm_kzalloc(&hdev->dev, sizeof(*mcp->gc), GFP_KERNEL);
1315: if (!mcp->gc)
1316: return -ENOMEM;
1317:
1318: mcp->gc->label = "mcp2221_gpio";
1319: mcp->gc->direction_input = mcp_gpio_direction_input;
1320: mcp->gc->direction_output = mcp_gpio_direction_output;
1321: mcp->gc->get_direction = mcp_gpio_get_direction;
1322: mcp->gc->set = mcp_gpio_set;
1323: mcp->gc->get = mcp_gpio_get;
1324: mcp->gc->ngpio = MCP_NGPIO;
1325: mcp->gc->base = -1;
1326: mcp->gc->can_sleep = 1;
1327: mcp->gc->parent = &hdev->dev;
1328:
1329: ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp);
1330: if (ret)
1331: return ret;
1332:
1333: mcp2221_check_gpio_pinfunc(mcp);
1334: #endif
1335:
1336: #if IS_REACHABLE(CONFIG_IIO)
1337: if (!gpio_mode_enforce) {
1338: INIT_DELAYED_WORK(&mcp->init_work, mcp_init_work);
1339: schedule_delayed_work(&mcp->init_work, msecs_to_jiffies(100));
1340: }
1341: #endif
1342:
1343: return 0;
1344: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 58/2 | 2026/05/19 10:35 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 70576 output: 49 thoughts: 1472 Thoughts: **Analyzing the MCP2221 Driver Vulnerability**
Okay, let's break this down step by step. I'm looking at the `mcp2221_probe` function, which sets things in motion. It calls `hid_parse`, then `hid_hw_start`, `hid_hw_open`, and finally `mcp_set_i2c_speed`. `mcp_set_i2c_speed` sends a command to the device, specifically setting the I2C speed. This triggers the data transfer through `mcp_send_data_req_status`, which uses `hid_hw_output_report` to send the command and waits for a response via `wait_for_completion_timeout`. The key thing is, if the device sends back an "IN" report, `mcp2221_raw_event` gets called to handle it.
Now, here's where it gets interesting. The syzkaller reproducer sends a single byte (0x50, `MCP2221_GPIO_SET`) on the IN endpoint 0x81. This is the crux of the issue. In `mcp2221_raw_event`, it processes the incoming data. Critically, the code checks `data[1]` within a switch statement based on the value of `data[0]` (which is 0x50 in this case). The size of the incoming data buffer is only 1 byte. The code accesses `data[1]`, which is an out-of-bounds access.
However, the buffer `data` is allocated with `kmalloc(64)`. So, even though the reproducer sends only one byte, the `urb->transfer_buffer` (which `data` points to) is 64 bytes long, meaning accessing `data[1]` is still within allocated memory, which should not cause any issue.
The crash report reveals it's a slab-out-of-bounds read and mentions the crash is on an object belonging to the `task_struct` cache. The address causing the crash is a long way from the beginning of the `task_struct` object. This is strange!
The critical point is that I'm realizing `mcp->gp_idx` is uninitialized. The variable is part of struct `mcp2221`, and it's set in the `mcp_gpio_set` and `mcp_gpio_get` functions. *But*, if `mcp2221_raw_event` is called *before* either of those functions has been called, `mcp->gp_idx` will have its default value. Since `mcp` is allocated by `devm_kzalloc`, `gp_idx` is initialized to 0.
So, in the vulnerable code:
```c
if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
(data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
```
`mcp->gp_idx` is 0. `data[mcp->gp_idx]` is `data[0]` is fine. But `data[mcp->gp_idx - 1]` becomes `data[-1]`! Even if the memory is mapped, this is almost certainly an out-of-bounds access. This explains why KASAN reported an issue related to `task_struct`, even though the buffer itself is allocated in `kmalloc-64` cache. The code is reading outside of the intended bounds of the `data` buffer, and the result of that read is used in the condition. The crash isn't happening in the `data` buffer, but it's *influenced* by the `data` content. The out of bounds read of `-1` in `data` somehow lead to memory corruption, possibly overwriting parts of the `task_struct` object. This confirms the vulnerability: an uninitialized variable leads to an out-of-bounds read. This is a very interesting find.
|
| 59/2 | 2026/05/19 10:35 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp2221] Results: map[SourceCode: 117: /*
118: * There is no way to distinguish responses. Therefore next command
119: * is sent only after response to previous has been received. Mutex
120: * lock is used for this purpose mainly.
121: */
122: struct mcp2221 {
123: struct hid_device *hdev;
124: struct i2c_adapter adapter;
125: struct mutex lock;
126: struct completion wait_in_report;
127: struct delayed_work init_work;
128: u8 *rxbuf;
129: u8 txbuf[64];
130: int rxbuf_idx;
131: int rxbuf_size;
132: int status;
133: u8 cur_i2c_clk_div;
134: struct gpio_chip *gc;
135: u8 gp_idx;
136: u8 gpio_dir;
137: u8 mode[4];
138: #if IS_REACHABLE(CONFIG_IIO)
139: struct iio_chan_spec iio_channels[3];
140: u16 adc_values[3];
141: u8 adc_scale;
142: u8 dac_value;
143: u16 dac_scale;
144: #endif
145: };
SourceFile:drivers/hid/hid-mcp2221.c] |
| 60/2 | 2026/05/19 10:35 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 73448 output: 48 thoughts: 401 Thoughts: **Analyzing a Potential Out-of-Bounds Memory Access** Okay, so I'm looking at this code and immediately see a `u8 gp_idx;` declaration. The gears start turning. If `mcp->gp_idx` is zero, subtracting one results in `255`, right? And if we're dealing with a `u8 *data`, then `data[255]` is being accessed! My initial alarm bells are going off. Now, let's step back. The `data` pointer is connected to `urb->transfer_buffer`, which, as I recall, is allocated with `kmalloc(64)`. That means accessing `data[255]` would put us 191 bytes past the end of the 64-byte allocation. Definitely a problem. Wait a second, if that allocation uses `kmalloc(64)`, it comes from the `kmalloc-64` cache. Why is KASAN reporting that the memory belongs to `task_struct`? Something is not quite right. Ah, I see... `data` might *not* actually be `urb->transfer_buffer`. I need to track down how `data` gets assigned. Let me examine `__hid_input_report`. ```c 2136: data = dispatch_hid_bpf_device_event(hid, type, data, &bufsize, &size, interrupt, 2137: source, from_bpf); ``` Okay, I see it. If BPF isn't enabled, then `data` is `urb->transfer_buffer`. But, what if BPF *is* enabled? What is that `dispatch_hid_bpf_device_event` function doing? Where does `data` come from? Is it possible that `data` could point to something other than `urb->transfer_buffer`? Could it be `report->field[0]->value`? No, the code is passing `data` to `__hid_input_report`. I'm getting ahead of myself, let's go back and examine `hid_irq_in` again. ```c 286: hid_safe_input_report(urb->context, HID_INPUT_REPORT, 287: urb->transfer_buffer, urb->transfer_buffer_length, 288: urb->actual_length, 1); ``` Ah, that's it! `hid_safe_input_report` looks like the place where the data is actually used. Is it a macro? A function? I need to check the definition to figure out what it does. |
| 61/2 | 2026/05/19 10:35 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:hid_safe_input_report] Results: map[SourceCode:2195: /**
2196: * hid_safe_input_report - report data from lower layer (usb, bt...)
2197: *
2198: * @hid: hid device
2199: * @type: HID report type (HID_*_REPORT)
2200: * @data: report contents
2201: * @bufsize: allocated size of the data buffer
2202: * @size: useful size of data parameter
2203: * @interrupt: distinguish between interrupt and control transfers
2204: *
2205: * This is data entry for lower layers.
2206: * Please use this function instead of the non safe version because we provide
2207: * here the size of the buffer, allowing hid-core to make smarter decisions
2208: * regarding the incoming buffer.
2209: */
2210: int hid_safe_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data,
2211: size_t bufsize, u32 size, int interrupt)
2212: {
2213: return __hid_input_report(hid, type, data, bufsize, size, interrupt, 0,
2214: false, /* from_bpf */
2215: false /* lock_already_taken */);
2216: }
SourceFile:drivers/hid/hid-core.c] |
| 62/2 | 2026/05/19 10:35 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 74881 output: 51 thoughts: 3078 Thoughts: **Analyzing a KASAN Slab-Out-of-Bounds Error in USB HID Handling** Okay, so I'm digging into this KASAN report, trying to understand why we're seeing a slab-out-of-bounds error. The report says the bad access is in an area that the kernel thinks belongs to a `task_struct`, but the code *should* be accessing `urb->transfer_buffer`. I'm going through the allocation flow here. Initially, it looked like `data` was just a pointer to `urb->transfer_buffer`, which is allocated with `kmalloc(64)`. That should be in the `kmalloc-64` cache. But the KASAN report specifically points to a location that's part of a `task_struct` object. That makes no sense. I then revisited the code where `usbhid->bufsize` is calculated. It seemed that if `usbhid->bufsize` gets a value of zero (even though it's initialized to `HID_MIN_BUFFER_SIZE`), the allocated buffer size could be zero, but that's impossible because it's initialized to at least 64. However, I notice that the problematic address is the last byte of a page that is part of an order-3 page for `task_struct` cache. This is strange! The KASAN report says the buggy address is the last byte of a page, but that page was allocated via `alloc_task_struct_node` and its type is `f5(slab)`. So the page belongs to the `task_struct` cache. How can I possibly write into the end of a `task_struct` object if the code is actually dealing with the USB buffer? The KASAN report is pretty clear about the allocation, but `data` should be a `urb->transfer_buffer` which is allocated through `usb_alloc_coherent`. This is a DMA-like allocation. But wait! `dummy_hcd` does NOT use DMA, which means it calls `kmalloc`! So the allocation method depends on this. It turns out that `dummy_hcd` uses PIO and calls `kmalloc` internally. So it's still possible that the `kmalloc(64)` call returns an address within an order-3 page of the `task_struct` slab. I need to investigate the report descriptor. The reproducer sets `wDescriptorLength` to 0. But then a descriptor is provided via control transfer. The contents seem invalid. The report descriptor is `00 00 08 00 00 00 08 04 82`. If this is the report descriptor, let's parse the descriptor. If `00` is repeated, then each one is an `Input`, since there are no report sizes and counts specified. The size is zero. The report descriptor looks like a sequence of `Input` and `Output` items, not valid at all. This means report size is zero! Then, `usbhid->bufsize` defaults to 64, and the memory allocated is also 64. But if it's 64, why is there an out-of-bounds access? Maybe the actual `data` passed to `hid_safe_input_report` and later to the functions like `mcp2221_raw_event` is NOT `urb->transfer_buffer`. But in `hid_irq_in`, `urb->transfer_buffer` is the pointer. I still can't see how `urb->transfer_buffer` can be the problem here. I check if `hcd_uses_dma` is used. Aha! `dummy_hcd` does *not* use DMA. I need to think more about this. Maybe there is a BPF related memory corruption, and the BPF code is returning the wrong pointer. Let me look at that code path. |
| 63/2 | 2026/05/19 10:36 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/gadget/udc/dummy_hcd.c IncludeLines:true Name:dummy_hcd_probe] Results: map[SourceCode:2683: static int dummy_hcd_probe(struct platform_device *pdev)
2684: {
2685: struct dummy *dum;
2686: struct usb_hcd *hs_hcd;
2687: struct usb_hcd *ss_hcd;
2688: int retval;
2689:
2690: dev_info(&pdev->dev, "%s, driver " DRIVER_VERSION "\n", driver_desc);
2691: dum = *((void **)dev_get_platdata(&pdev->dev));
2692:
2693: if (mod_data.is_super_speed)
2694: dummy_hcd.flags = HCD_USB3 | HCD_SHARED;
2695: else if (mod_data.is_high_speed)
2696: dummy_hcd.flags = HCD_USB2;
2697: else
2698: dummy_hcd.flags = HCD_USB11;
2699: hs_hcd = usb_create_hcd(&dummy_hcd, &pdev->dev, dev_name(&pdev->dev));
2700: if (!hs_hcd)
2701: return -ENOMEM;
2702: hs_hcd->has_tt = 1;
2703:
2704: retval = usb_add_hcd(hs_hcd, 0, 0);
2705: if (retval)
2706: goto put_usb2_hcd;
2707:
2708: if (mod_data.is_super_speed) {
2709: ss_hcd = usb_create_shared_hcd(&dummy_hcd, &pdev->dev,
2710: dev_name(&pdev->dev), hs_hcd);
2711: if (!ss_hcd) {
2712: retval = -ENOMEM;
2713: goto dealloc_usb2_hcd;
2714: }
2715:
2716: retval = usb_add_hcd(ss_hcd, 0, 0);
2717: if (retval)
2718: goto put_usb3_hcd;
2719: }
2720: return 0;
2721:
2722: put_usb3_hcd:
2723: usb_put_hcd(ss_hcd);
2724: dealloc_usb2_hcd:
2725: usb_remove_hcd(hs_hcd);
2726: put_usb2_hcd:
2727: usb_put_hcd(hs_hcd);
2728: dum->hs_hcd = dum->ss_hcd = NULL;
2729: return retval;
2730: }
SourceFile:drivers/usb/gadget/udc/dummy_hcd.c] |
| 64/2 | 2026/05/19 10:36 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 79684 output: 48 thoughts: 340 Thoughts: **Debugging a USB DMA Allocation Issue**
Okay, hold on a second. I just realized something critical: `dummy_hcd` *doesn't* actually set `hcd->self.uses_dma` to `1`. That means `hcd_uses_dma(hcd)` is evaluating to false, right? Which means, then, that `hcd_buffer_alloc` is using a standard `kmalloc(size, mem_flags)` allocation. If the size requested is, say, 64 bytes โ as seems likely in this scenario โ it's just a `kmalloc(64)`.
So, the next question is... why is KASAN reporting that the page belongs to `task_struct`? That makes no sense.
Okay, let's look at that reproducer more closely. I should've known better and focused on the reproducer earlier.
```c
// syz_usb_ep_write arguments: [
// fd: fd_usb (resource)
// ep: int8 = 0x81 (1 bytes)
// len: len = 0x1 (8 bytes)
// data: ptr[in, buffer] {
// buffer: {50 62 7b} (length 0x3)
// }
// ]
memcpy((void*)0x200000000040, "Pb{", 3);
syz_usb_ep_write(/*fd=*/r[0], /*ep=*/0x81, /*len=*/1, /*data=*/0x200000000040);
```
Aha! `syz_usb_ep_write` is writing to the endpoint! The whole time I was trying to figure out how this *dummy* hcd deals with data transfers from the gadget to the host. Now that I have it, I can use the reproducer to figure out the problem. And I now know `dummy_timer` is handling the transfer... Got it! I'm probably going down the wrong path, and now I need to figure out what's causing the mismatch. I need to focus on how the data is being handled within the `dummy_hcd` implementation, given it's not using DMA. This simplifies the issue a bit.
|
| 65/2 | 2026/05/19 10:36 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/gadget/udc/dummy_hcd.c IncludeLines:true Name:dummy_timer] Results: map[SourceCode:1793: /*
1794: * Drive both sides of the transfers; looks like irq handlers to both
1795: * drivers except that the callbacks are invoked from soft interrupt
1796: * context.
1797: */
1798: static enum hrtimer_restart dummy_timer(struct hrtimer *t)
1799: {
1800: struct dummy_hcd *dum_hcd = timer_container_of(dum_hcd, t,
1801: timer);
1802: struct dummy *dum = dum_hcd->dum;
1803: struct urbp *urbp, *tmp;
1804: unsigned long flags;
1805: int limit, total;
1806: int i;
1807:
1808: /* simplistic model for one frame's bandwidth */
1809: /* FIXME: account for transaction and packet overhead */
1810: switch (dum->gadget.speed) {
1811: case USB_SPEED_LOW:
1812: total = 8/*bytes*/ * 12/*packets*/;
1813: break;
1814: case USB_SPEED_FULL:
1815: total = 64/*bytes*/ * 19/*packets*/;
1816: break;
1817: case USB_SPEED_HIGH:
1818: total = 512/*bytes*/ * 13/*packets*/ * 8/*uframes*/;
1819: break;
1820: case USB_SPEED_SUPER:
1821: /* Bus speed is 500000 bytes/ms, so use a little less */
1822: total = 490000;
1823: break;
1824: default: /* Can't happen */
1825: dev_err(dummy_dev(dum_hcd), "bogus device speed\n");
1826: total = 0;
1827: break;
1828: }
1829:
1830: /* look at each urb queued by the host side driver */
1831: spin_lock_irqsave(&dum->lock, flags);
1832: dum_hcd->timer_pending = 0;
1833:
1834: if (!dum_hcd->udev) {
1835: dev_err(dummy_dev(dum_hcd),
1836: "timer fired with no URBs pending?\n");
1837: spin_unlock_irqrestore(&dum->lock, flags);
1838: return HRTIMER_NORESTART;
1839: }
1840: dum_hcd->next_frame_urbp = NULL;
1841:
1842: for (i = 0; i < DUMMY_ENDPOINTS; i++) {
1843: if (!ep_info[i].name)
1844: break;
1845: dum->ep[i].already_seen = 0;
1846: }
1847:
1848: restart:
1849: list_for_each_entry_safe(urbp, tmp, &dum_hcd->urbp_list, urbp_list) {
1850: struct urb *urb;
1851: struct dummy_request *req;
1852: u8 address;
1853: struct dummy_ep *ep = NULL;
1854: int status = -EINPROGRESS;
1855:
1856: /* stop when we reach URBs queued after the timer interrupt */
1857: if (urbp == dum_hcd->next_frame_urbp)
1858: break;
1859:
1860: urb = urbp->urb;
1861: if (urb->unlinked)
1862: goto return_urb;
1863: else if (dum_hcd->rh_state != DUMMY_RH_RUNNING)
1864: continue;
1865:
1866: /* Used up this frame's bandwidth? */
1867: if (total <= 0)
1868: continue;
1869:
1870: /* find the gadget's ep for this request (if configured) */
1871: address = usb_pipeendpoint (urb->pipe);
1872: if (usb_urb_dir_in(urb))
1873: address |= USB_DIR_IN;
1874: ep = find_endpoint(dum, address);
1875: if (!ep) {
1876: /* set_configuration() disagreement */
1877: dev_dbg(dummy_dev(dum_hcd),
1878: "no ep configured for urb %p\n",
1879: urb);
1880: status = -EPROTO;
1881: goto return_urb;
1882: }
1883:
1884: if (ep->already_seen)
1885: continue;
1886: ep->already_seen = 1;
1887: if (ep == &dum->ep[0] && urb->error_count) {
1888: ep->setup_stage = 1; /* a new urb */
1889: urb->error_count = 0;
1890: }
1891: if (ep->halted && !ep->setup_stage) {
1892: /* NOTE: must not be iso! */
1893: dev_dbg(dummy_dev(dum_hcd), "ep %s halted, urb %p\n",
1894: ep->ep.name, urb);
1895: status = -EPIPE;
1896: goto return_urb;
1897: }
1898: /* FIXME make sure both ends agree on maxpacket */
1899:
1900: /* handle control requests */
1901: if (ep == &dum->ep[0] && ep->setup_stage) {
1902: struct usb_ctrlrequest setup;
1903: int value;
1904:
1905: setup = *(struct usb_ctrlrequest *) urb->setup_packet;
1906: /* paranoia, in case of stale queued data */
1907: list_for_each_entry(req, &ep->queue, queue) {
1908: list_del_init(&req->queue);
1909: req->req.status = -EOVERFLOW;
1910: dev_dbg(udc_dev(dum), "stale req = %p\n",
1911: req);
1912:
1913: spin_unlock(&dum->lock);
1914: usb_gadget_giveback_request(&ep->ep, &req->req);
1915: spin_lock(&dum->lock);
1916: ep->already_seen = 0;
1917: goto restart;
1918: }
1919:
1920: /* gadget driver never sees set_address or operations
1921: * on standard feature flags. some hardware doesn't
1922: * even expose them.
1923: */
1924: ep->last_io = jiffies;
1925: ep->setup_stage = 0;
1926: ep->halted = 0;
1927:
1928: value = handle_control_request(dum_hcd, urb, &setup,
1929: &status);
1930:
1931: /* gadget driver handles all other requests. block
1932: * until setup() returns; no reentrancy issues etc.
1933: */
1934: if (value > 0) {
1935: ++dum->callback_usage;
1936: spin_unlock(&dum->lock);
1937: value = dum->driver->setup(&dum->gadget,
1938: &setup);
1939: spin_lock(&dum->lock);
1940: --dum->callback_usage;
1941:
1942: if (value >= 0) {
1943: /* no delays (max 64KB data stage) */
1944: limit = 64*1024;
1945: goto treat_control_like_bulk;
1946: }
1947: /* error, see below */
1948: }
1949:
1950: if (value < 0) {
1951: if (value != -EOPNOTSUPP)
1952: dev_dbg(udc_dev(dum),
1953: "setup --> %d\n",
1954: value);
1955: status = -EPIPE;
1956: urb->actual_length = 0;
1957: }
1958:
1959: goto return_urb;
1960: }
1961:
1962: /* non-control requests */
1963: limit = total;
1964: switch (usb_pipetype(urb->pipe)) {
1965: case PIPE_ISOCHRONOUS:
1966: /*
1967: * We don't support isochronous. But if we did,
1968: * here are some of the issues we'd have to face:
1969: *
1970: * Is it urb->interval since the last xfer?
1971: * Use urb->iso_frame_desc[i].
1972: * Complete whether or not ep has requests queued.
1973: * Report random errors, to debug drivers.
1974: */
1975: limit = max(limit, periodic_bytes(dum, ep));
1976: status = -EINVAL; /* fail all xfers */
1977: break;
1978:
1979: case PIPE_INTERRUPT:
1980: /* FIXME is it urb->interval since the last xfer?
1981: * this almost certainly polls too fast.
1982: */
1983: limit = max(limit, periodic_bytes(dum, ep));
1984: fallthrough;
1985:
1986: default:
1987: treat_control_like_bulk:
1988: ep->last_io = jiffies;
1989: total -= transfer(dum_hcd, urb, ep, limit, &status);
1990: break;
1991: }
1992:
1993: /* incomplete transfer? */
1994: if (status == -EINPROGRESS)
1995: continue;
1996:
1997: return_urb:
1998: list_del(&urbp->urbp_list);
1999: kfree(urbp);
2000: if (ep)
2001: ep->already_seen = ep->setup_stage = 0;
2002:
2003: usb_hcd_unlink_urb_from_ep(dummy_hcd_to_hcd(dum_hcd), urb);
2004: spin_unlock(&dum->lock);
2005: usb_hcd_giveback_urb(dummy_hcd_to_hcd(dum_hcd), urb, status);
2006: spin_lock(&dum->lock);
2007:
2008: goto restart;
2009: }
2010:
2011: if (list_empty(&dum_hcd->urbp_list)) {
2012: usb_put_dev(dum_hcd->udev);
2013: dum_hcd->udev = NULL;
2014: } else if (!dum_hcd->timer_pending &&
2015: dum_hcd->rh_state == DUMMY_RH_RUNNING) {
2016: /* want a 1 msec delay here */
2017: dum_hcd->timer_pending = 1;
2018: hrtimer_start(&dum_hcd->timer, ns_to_ktime(DUMMY_TIMER_INT_NSECS),
2019: HRTIMER_MODE_REL_SOFT);
2020: }
2021:
2022: spin_unlock_irqrestore(&dum->lock, flags);
2023:
2024: return HRTIMER_NORESTART;
2025: }
SourceFile:drivers/usb/gadget/udc/dummy_hcd.c] |
| 66/2 | 2026/05/19 10:36 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 84082 output: 43 thoughts: 1808 Thoughts: **Analyzing the HID Report Descriptor: A Deep Dive** Okay, so I'm tracing through this USB HID driver and I'm really digging into how the data transfer works in this `dummy_hcd` scenario, trying to understand why this reproducer causes a crash, or doesn't. My focus is on the `transfer` function within the `dummy_hcd.c` file and how it interacts with the HID report descriptor. The critical path: data is copied from `req->req.buf` to `urb->transfer_buffer`. I know the latter is allocated via `usb_alloc_coherent`. However, there's a potential wrinkle, if it *isn't*. I need to account for all possible allocations, and `usbhid_start` is the right place to look. Here, `usbhid->inbuf` is allocated. Let's see... `usbhid->inbuf` comes from `usb_alloc_coherent` and its size is determined by `usbhid->bufsize`. This is important, as the size is compared to `insize`, which in turn, comes from `hid_find_max_report`. If `insize` is zero, there's a problem, because it means the transfer length is zero. Zero length transfers from `dummy_hcd` would bypass the `mcp2221_raw_event` handler, which is not what's happening in this case. But the reproducer *does* write a byte... The problem must be that `urb->transfer_buffer_length` is > 0. So, let's go back and examine `transfer` in `dummy_hcd.c`. I can see how `host_len` and `dev_len` are calculated using `urb->transfer_buffer_length`, but this calculation is what should determine how much data is actually transferred. If `host_len` is zero, so is `len`, and therefore, `memcpy` copies nothing, and we get a zero `urb->actual_length`. That bypasses `mcp2221_raw_event` If `insize` is zero, the code goes down the branch where nothing gets transferred. The crash must occur when there is data. So, since it crashes, `size` must be greater than 0, implying we're not dealing with a zero-length transfer. I need to understand how `insize` becomes greater than zero. Right, `insize` is determined by `hid_find_max_report`. Time to look at the report descriptor again! I examine the report descriptor: `00 00 08 00 00 00 08 04 82`. This looks strange. The first two bytes, `00 00`, are the source of my confusion. I originally misread this, and that's critical to the understanding. `00 00` are both Size 0. Tag 8 (Input), Type 0, Size 2. Ah-ha! `0x82` at the end! It's an `Input` report with *two* bytes of data! The problem is that the buffer ends at `82`! If the buffer ends at `82` there are no data bytes! The `hid_parse_report` will likely fail! I need to review `hid_parser_main` to be certain! |
| 67/2 | 2026/05/19 10:36 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:hid_parser_main] Results: map[SourceCode: 641: static int hid_parser_main(struct hid_parser *parser, struct hid_item *item)
642: {
643: __u32 data;
644: int ret;
645:
646: hid_concatenate_last_usage_page(parser);
647:
648: data = item_udata(item);
649:
650: switch (item->tag) {
651: case HID_MAIN_ITEM_TAG_BEGIN_COLLECTION:
652: ret = open_collection(parser, data & 0xff);
653: break;
654: case HID_MAIN_ITEM_TAG_END_COLLECTION:
655: ret = close_collection(parser);
656: break;
657: case HID_MAIN_ITEM_TAG_INPUT:
658: ret = hid_add_field(parser, HID_INPUT_REPORT, data);
659: break;
660: case HID_MAIN_ITEM_TAG_OUTPUT:
661: ret = hid_add_field(parser, HID_OUTPUT_REPORT, data);
662: break;
663: case HID_MAIN_ITEM_TAG_FEATURE:
664: ret = hid_add_field(parser, HID_FEATURE_REPORT, data);
665: break;
666: default:
667: if (item->tag >= HID_MAIN_ITEM_TAG_RESERVED_MIN &&
668: item->tag <= HID_MAIN_ITEM_TAG_RESERVED_MAX)
669: hid_warn_ratelimited(parser->device, "reserved main item tag 0x%x\n", item->tag);
670: else
671: hid_warn_ratelimited(parser->device, "unknown main item tag 0x%x\n", item->tag);
672: ret = 0;
673: }
674:
675: memset(&parser->local, 0, sizeof(parser->local)); /* Reset the local parser environment */
676:
677: return ret;
678: }
SourceFile:drivers/hid/hid-core.c] |
| 68/2 | 2026/05/19 10:36 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 87311 output: 41 thoughts: 19 Thoughts: Here's my understanding of the situation, presented from my perspective as an expert: **Understanding the Item Parsing in `hid-core.c`** Okay, so I'm thinking about the low-level HID implementation, and specifically, I'm trying to recall where the item parsing actually happens. Ah, right! It's in `hid-core.c`, isn't it? The function `fetch_item` is the key. That's where the raw report descriptor data gets dissected into individual items. That's a critical piece for building the structure of the HID report. I need to make sure I remember that `fetch_item` call because that's the starting point for figuring out what each field is, what its usage is, and how it should be interpreted. It's the lynchpin for understanding the entire report structure, which is vital for any analysis of the device's capabilities. |
| 69/2 | 2026/05/19 10:36 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:fetch_item] Results: map[SourceCode: 781: static const u8 *fetch_item(const __u8 *start, const __u8 *end, struct hid_item *item)
782: {
783: u8 b;
784:
785: if ((end - start) <= 0)
786: return NULL;
787:
788: b = *start++;
789:
790: item->type = (b >> 2) & 3;
791: item->tag = (b >> 4) & 15;
792:
793: if (item->tag == HID_ITEM_TAG_LONG) {
794:
795: item->format = HID_ITEM_FORMAT_LONG;
796:
797: if ((end - start) < 2)
798: return NULL;
799:
800: item->size = *start++;
801: item->tag = *start++;
802:
803: if ((end - start) < item->size)
804: return NULL;
805:
806: item->data.longdata = start;
807: start += item->size;
808: return start;
809: }
810:
811: item->format = HID_ITEM_FORMAT_SHORT;
812: item->size = BIT(b & 3) >> 1; /* 0, 1, 2, 3 -> 0, 1, 2, 4 */
813:
814: if (end - start < item->size)
815: return NULL;
816:
817: switch (item->size) {
818: case 0:
819: break;
820:
821: case 1:
822: item->data.u8 = *start;
823: break;
824:
825: case 2:
826: item->data.u16 = get_unaligned_le16(start);
827: break;
828:
829: case 4:
830: item->data.u32 = get_unaligned_le32(start);
831: break;
832: }
833:
834: return start + item->size;
835: }
SourceFile:drivers/hid/hid-core.c] |
| 70/2 | 2026/05/19 10:36 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 88306 output: 43 thoughts: 77 Thoughts: Okay, let's break this down. **Analyzing a Potential Parsing Failure** Hmm, so if the difference between `end` and `start` is less than `item->size`, the function returns `NULL`. That seems straightforward. Looking at the example, this means the last item, which I'm seeing is `82` with a size of 2, will trigger this condition and `fetch_item` will return `NULL`. The question is, what happens *then*? Does `hid_parse_report` just bail out? Does it handle the `NULL` return gracefully, or does it lead to a premature stop in the parse? I need to check either `hid_parse_report` or potentially the function it calls, `hid_parse_collections`, to understand the control flow and error handling. I need to know how it reacts when it doesn't get a valid item. I suspect that this small size will cause issues. |
| 71/2 | 2026/05/19 10:36 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:hid_parse_collections] Results: map[SourceCode:1248: static int hid_parse_collections(struct hid_device *device)
1249: {
1250: struct hid_item item;
1251: const u8 *start = device->rdesc;
1252: const u8 *end = start + device->rsize;
1253: const u8 *next;
1254: int ret;
1255: static typeof(hid_parser_main) (* const dispatch_type[]) = {
1256: hid_parser_main,
1257: hid_parser_global,
1258: hid_parser_local,
1259: hid_parser_reserved
1260: };
1261:
1262: struct hid_parser *parser __free(kvfree) = vzalloc(sizeof(*parser));
1263: if (!parser)
1264: return -ENOMEM;
1265:
1266: parser->device = device;
1267:
1268: device->collection = kzalloc_objs(*device->collection,
1269: HID_DEFAULT_NUM_COLLECTIONS);
1270: if (!device->collection)
1271: return -ENOMEM;
1272:
1273: device->collection_size = HID_DEFAULT_NUM_COLLECTIONS;
1274: for (unsigned int i = 0; i < HID_DEFAULT_NUM_COLLECTIONS; i++)
1275: device->collection[i].parent_idx = -1;
1276:
1277: ret = -EINVAL;
1278: if (start == end) {
1279: hid_err(device, "rejecting 0-sized report descriptor\n");
1280: goto out;
1281: }
1282:
1283: while ((next = fetch_item(start, end, &item)) != NULL) {
1284: start = next;
1285:
1286: if (item.format != HID_ITEM_FORMAT_SHORT) {
1287: hid_err(device, "unexpected long global item\n");
1288: goto out;
1289: }
1290:
1291: if (dispatch_type[item.type](parser, &item)) {
1292: hid_err(device, "item %u %u %u %u parsing failed\n",
1293: item.format,
1294: (unsigned int)item.size,
1295: (unsigned int)item.type,
1296: (unsigned int)item.tag);
1297: goto out;
1298: }
1299: }
1300:
1301: if (start != end) {
1302: hid_err(device, "item fetching failed at offset %u/%u\n",
1303: device->rsize - (unsigned int)(end - start),
1304: device->rsize);
1305: goto out;
1306: }
1307:
1308: if (parser->collection_stack_ptr) {
1309: hid_err(device, "unbalanced collection at end of report description\n");
1310: goto out;
1311: }
1312:
1313: if (parser->local.delimiter_depth) {
1314: hid_err(device, "unbalanced delimiter at end of report description\n");
1315: goto out;
1316: }
1317:
1318: /*
1319: * fetch initial values in case the device's
1320: * default multiplier isn't the recommended 1
1321: */
1322: hid_setup_resolution_multiplier(device);
1323:
1324: device->status |= HID_STAT_PARSED;
1325: ret = 0;
1326:
1327: out:
1328: kfree(parser->collection_stack);
1329: return ret;
1330: }
SourceFile:drivers/hid/hid-core.c] |
| 72/2 | 2026/05/19 10:36 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 89797 output: 45 thoughts: 1414 Thoughts: **Analyzing the Report Descriptor Vulnerability** Okay, let's break this down. My initial concern was around `hid_parse_collections` failing, which would cascade up to `mcp2221_probe`. If the report descriptor is invalid, that's a problem, and the whole driver fails. The reproducer must ensure the report descriptor *is* valid because otherwise `mcp2221_raw_event` can't be called. Let's revisit the reproducer and see what's happening. The `syz_usb_connect` calls are interesting. The first call sets up a device, then the second callโฆ wait, it modifies the device descriptor! Specifically, it sets `wDescriptorLength` to 0. The second call to `syz_usb_connect` connects a device with a modified descriptor. Now, we have a disconnection of the *first* device with `syz_usb_disconnect` using the file descriptor returned by the *first* connection. Then we have an `syz_usb_ep_write` call using the *same* file descriptor! That's a red flag. But wait, since we know `syz_usb_disconnect` closes the file descriptor, this `syz_usb_ep_write` should fail with EBADF, right? But, ah ha! The reproducer's logic makes the first device disconnect; then the second connect must have the *same* file descriptor number as the first! So, `r[1]` will be the same as `r[0]`, because the `syz_usb_disconnect` closes the first device. This means the `syz_usb_ep_write` is writing to the *second* device! The key here is that the second device has `wDescriptorLength = 0`. If `wDescriptorLength` is zero, `hid_parse` will request zero bytes from the device! That's a problem. `hid_parse` gets the report descriptor through a control transfer. If `wDescriptorLength` is zero, it'll ask for no data. We need to check `usbhid_parse` now to verify what happens on a read for zero bytes. |
| 73/2 | 2026/05/19 10:36 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:usbhid_parse] Results: map[SourceCode: 982: static int usbhid_parse(struct hid_device *hid)
983: {
984: struct usb_interface *intf = to_usb_interface(hid->dev.parent);
985: struct usb_host_interface *interface = intf->cur_altsetting;
986: struct usb_device *dev = interface_to_usbdev (intf);
987: struct hid_descriptor *hdesc;
988: struct hid_class_descriptor *hcdesc;
989: __u8 fixed_opt_descriptors_size;
990: u32 quirks = 0;
991: unsigned int rsize = 0;
992: char *rdesc;
993: int ret;
994:
995: quirks = hid_lookup_quirk(hid);
996:
997: if (quirks & HID_QUIRK_IGNORE)
998: return -ENODEV;
999:
1000: /* Many keyboards and mice don't like to be polled for reports,
1001: * so we will always set the HID_QUIRK_NOGET flag for them. */
1002: if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT) {
1003: if (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_KEYBOARD ||
1004: interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE)
1005: quirks |= HID_QUIRK_NOGET;
1006: }
1007:
1008: if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
1009: (!interface->desc.bNumEndpoints ||
1010: usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
1011: dbg_hid("class descriptor not present\n");
1012: return -ENODEV;
1013: }
1014:
1015: if (!hdesc->bNumDescriptors ||
1016: hdesc->bLength != sizeof(*hdesc) +
1017: (hdesc->bNumDescriptors - 1) * sizeof(*hcdesc)) {
1018: dbg_hid("hid descriptor invalid, bLen=%hhu bNum=%hhu\n",
1019: hdesc->bLength, hdesc->bNumDescriptors);
1020:
1021: /*
1022: * Some devices may expose a wrong number of descriptors compared
1023: * to the provided length.
1024: * However, we ignore the optional hid class descriptors entirely
1025: * so we can safely recompute the proper field.
1026: */
1027: if (hdesc->bLength >= sizeof(*hdesc)) {
1028: fixed_opt_descriptors_size = hdesc->bLength - sizeof(*hdesc);
1029:
1030: hid_warn(intf, "fixing wrong optional hid class descriptors count\n");
1031: hdesc->bNumDescriptors = fixed_opt_descriptors_size / sizeof(*hcdesc) + 1;
1032: } else {
1033: return -EINVAL;
1034: }
1035: }
1036:
1037: hid->version = le16_to_cpu(hdesc->bcdHID);
1038: hid->country = hdesc->bCountryCode;
1039:
1040: if (hdesc->rpt_desc.bDescriptorType == HID_DT_REPORT)
1041: rsize = le16_to_cpu(hdesc->rpt_desc.wDescriptorLength);
1042:
1043: if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
1044: dbg_hid("weird size of report descriptor (%u)\n", rsize);
1045: return -EINVAL;
1046: }
1047:
1048: rdesc = kmalloc(rsize, GFP_KERNEL);
1049: if (!rdesc)
1050: return -ENOMEM;
1051:
1052: hid_set_idle(dev, interface->desc.bInterfaceNumber, 0, 0);
1053:
1054: ret = hid_get_class_descriptor(dev, interface->desc.bInterfaceNumber,
1055: HID_DT_REPORT, rdesc, rsize);
1056: if (ret < 0) {
1057: dbg_hid("reading report descriptor failed\n");
1058: kfree(rdesc);
1059: goto err;
1060: }
1061:
1062: ret = hid_parse_report(hid, rdesc, rsize);
1063: kfree(rdesc);
1064: if (ret) {
1065: dbg_hid("parsing report descriptor failed\n");
1066: goto err;
1067: }
1068:
1069: if (hdesc->bNumDescriptors > 1)
1070: hid_warn(intf,
1071: "%u unsupported optional hid class descriptors\n",
1072: (int)(hdesc->bNumDescriptors - 1));
1073:
1074: hid->quirks |= quirks;
1075:
1076: return 0;
1077: err:
1078: return ret;
1079: }
SourceFile:drivers/hid/usbhid/hid-core.c] |
| 74/2 | 2026/05/19 10:36 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 93308 output: 48 thoughts: 2890 Thoughts: **Analyzing the USB HID Crash: A Deep Dive** Okay, so the `if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE)` check looks like the key. If `wDescriptorLength` is zero, `usbhid_parse` returns `-EINVAL`. This failure propagates: `usbhid_parse` fails -> `hid_parse` fails -> `mcp2221_probe` fails. This means the second device, with its zero `wDescriptorLength`, shouldn't be probed successfully. Since we see `mcp2221_raw_event` being called, I initially assume the crash is *not* on the second device. Let's dissect the first device's descriptor, as that looks truncated. Examining the byte array, it seems the endpoint descriptor is missing bytes: `09 05 81 03 08` is only 5 bytes, whereas it usually is 7 bytes. Now, looking at the HID descriptor itself: `wDescriptorLength` is set to 1. This means `usbhid_parse` allocates and reads only one byte for the report descriptor. However, the first device's `syz_usb_connect` uses `conn_descs=0`, which means it doesn't handle `USB_DT_REPORT` (type 0x22). The `lookup_connect_response_in` function doesn't include a case for report descriptors. Consequently, the endpoint stalls! A stall in `lookup_connect_response_in` leads to `usb_raw_ep0_stall`. This should cause `hid_get_class_descriptor` to fail, which returns an error. This returns `-EPIPE`, which is then returned by `usbhid_parse`. Thus, `hid_parse` and `mcp2221_probe` will also return `-EPIPE`. The stall implies that `mcp2221_probe` MUST succeed for the crash to occur. But how? This scenario requires `mcp2221_probe` to succeed on the first device. The second device has its `wDescriptorLength` set to 0. With this value, `usbhid_parse` should return `-EINVAL`. Yet, `syz_usb_control_io` is called on the second device, fetching an event. Examining the provided descriptor buffer, `syz_usb_control_io` provides the report descriptor, which should work, and the device SHOULDN'T stall. Here, the crash must occur on the first device. However, `mcp2221_probe` does not return early. This means that `hid_parse` actually succeeds! So the critical function to examine is `hid_parse`. Then, it turns out that `hid_parse` is just a macro for `hid_open_report`. Now, `usbhid_parse` is invoked by `usbhid_probe`. This means that if `usbhid_parse` were to fail, the entire probing process would fail, and we wouldn't reach the problematic code. If `usbhid_parse` succeeds, `hid_add_device` is then called. In the case of the first device, `wDescriptorLength` is 1. This means the allocated size, `rsize`, is 1. `usbhid_parse` then allocates one byte and performs `GET_DESCRIPTOR`. However, since `lookup_connect_response_in` stalls, `hid_get_class_descriptor` fails with a stall and `usb_control_msg` will return `-EPIPE`. Therefore, the first device is the one that causes the crash, and it must occur within `hid_get_class_descriptor` when `USB_DT_REPORT` stalls. |
| 75/2 | 2026/05/19 10:37 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:hid_get_class_descriptor] Results: map[SourceCode: 665: static int hid_get_class_descriptor(struct usb_device *dev, int ifnum,
666: unsigned char type, void *buf, int size)
667: {
668: int result, retries = 4;
669:
670: memset(buf, 0, size);
671:
672: do {
673: result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
674: USB_REQ_GET_DESCRIPTOR, USB_RECIP_INTERFACE | USB_DIR_IN,
675: (type << 8), ifnum, buf, size, USB_CTRL_GET_TIMEOUT);
676: retries--;
677: } while (result < size && retries);
678: return result;
679: }
SourceFile:drivers/hid/usbhid/hid-core.c] |
| 76/2 | 2026/05/19 10:37 | llm | debugger |
1mModel:gemini-3.1-pro-preview Tokens: input: 97330 output: 45 thoughts: 7294 Thoughts: **Initial Analysis of a USB Driver Issue** Okay, here's the breakdown of my thinking as I dissect this USB driver bug. It's clear something isn't aligning with how the driver expects devices to behave, especially with HID descriptors. The primary suspect is likely a race or some error handling quirk around device setup and descriptor parsing. Initially, I'm noting the `-EPIPE` return and the retry logic. It's a key symptom, especially if coupled with a descriptor parsing failure. The fact that `usbhid_parse` fails is what kicks off this whole investigation. The first device's failure is interesting: if `usbhid_parse` fails the device doesn't get added, and yet there are events happening. Then I get into the heart of the problem: the descriptor length. I see a `wDescriptorLength` of zero for the second device. That *should* lead to `usbhid_parse` returning `-EINVAL` straight away, so it makes no sense. The code's clearly setting `wDescriptorLength` to zero. The repro uses `BPF` which is interesting, I check that it is just a USB device. The first device gets its descriptors modified after the connect call, which should mean that the first call is important, but the first call does not matter, as the first device is disconnect before it's probed. The key is in `syz_usb_connect_impl`: it stalls on `USB_DT_REPORT`! No, `SET_CONFIGURATION` is received, and the function returns the fd, then the other control requests are handled in a separate function. I am thinking that this is a race between the disconnection of the first device, and the probing of the second, and that it explains how the `SET_CONFIGURATION` is received, and that triggers device removal and the probe may be happening at the same time. The first device's endpoint write isn't to the first device, the file descriptors are likely reused. The key to getting to the `mcp2221` function is that the `usbhid_probe` runs in a separate thread. I realize now that the `fd`s can be reused, so `r[0]` and `r[1]` might be the same! This is *huge*. If `syz_usb_connect` closes the first device fd, the subsequent call to connect returns the SAME fd! The `syz_usb_ep_write` call is then *actually* talking to the second device, but that device's descriptor is messed up with `bLength` = 0. I am now sure that I understand how this works, or at least how the problem occurs. I now believe that there might be a race in the disconnection of the first device while the device is being probed in a separate thread. |
| 77/2 | 2026/05/19 10:38 | tool | codesearch-definition-source |
0mError:requested entity does not exist Args: map[ContextFile:drivers/usb/core/usb.c IncludeLines:true Name:usb_get_extra_descriptor] Results: map[SourceCode: SourceFile:] |
| 78/2 | 2026/05/19 10:38 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 105300 output: 21 thoughts: 14 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Analyzing the `usb_get_extra_descriptor` Call** Okay, so I'm thinking about `usb_get_extra_descriptor`. That function name rings a bell... it's likely a critical piece in handling those pesky extended USB descriptors, right? My initial guess is that it's designed to retrieve vendor-specific or class-specific descriptors that go beyond the standard ones defined in the USB specification. It's probably being used to dive deeper into the capabilities or features of a device beyond what's immediately apparent in the basic device, configuration, interface, and endpoint descriptors. I'm imagining this is probably invoked during device enumeration or configuration, possibly when parsing the configuration descriptor. I would expect it to be used when a standard descriptor indicates the presence of an extended descriptor, probably indicated by a specific field. I'd be looking for fields like `bDescriptorType` or `wTotalLength` of descriptors near the end of the standard information, as hints of where the relevant data can be found. I'm also thinking about potential use-cases. Maybe it's for handling complex audio devices, custom HID reports, or devices that implement unique power management features or perhaps custom protocols. I'd be interested in how the function is used, and which variables are provided to the function. This would lead me to where I should search. |
| 79/2 | 2026/05/19 10:38 | tool | grepper |
0mArgs:map[Expression:usb_get_extra_descriptor] Results: map[Output:drivers/hid/usbhid/hid-core.c=982=static int usbhid_parse(struct hid_device *hid)
--
drivers/hid/usbhid/hid-core.c-1007-
drivers/hid/usbhid/hid-core.c:1008: if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
drivers/hid/usbhid/hid-core.c-1009- (!interface->desc.bNumEndpoints ||
drivers/hid/usbhid/hid-core.c:1010: usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
drivers/hid/usbhid/hid-core.c-1011- dbg_hid("class descriptor not present\n");
--
drivers/usb/core/hub.c=2435=static int usb_enumerate_device_otg(struct usb_device *udev)
--
drivers/usb/core/hub.c-2452- /* descriptor may appear anywhere in config */
drivers/usb/core/hub.c:2453: err = __usb_get_extra_descriptor(udev->rawdescriptors[0],
drivers/usb/core/hub.c-2454- le16_to_cpu(udev->config[0].desc.wTotalLength),
--
drivers/usb/core/usb.c=946=EXPORT_SYMBOL_GPL(usb_get_current_frame_number);
--
drivers/usb/core/usb.c-949-/*
drivers/usb/core/usb.c:950: * __usb_get_extra_descriptor() finds a descriptor of specific type in the
drivers/usb/core/usb.c-951- * extra field of the interface and endpoint descriptor structs.
--
drivers/usb/core/usb.c-953-
drivers/usb/core/usb.c:954:int __usb_get_extra_descriptor(char *buffer, unsigned size,
drivers/usb/core/usb.c-955- unsigned char type, void **ptr, size_t minsize)
--
drivers/usb/core/usb.c-980-}
drivers/usb/core/usb.c:981:EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor);
drivers/usb/core/usb.c-982-
--
drivers/video/fbdev/udlfb.c=1549=static int dlfb_parse_vendor_descriptor(struct dlfb_data *dlfb,
--
drivers/video/fbdev/udlfb.c-1567- if (total_len < 0) {
drivers/video/fbdev/udlfb.c:1568: if (0 == usb_get_extra_descriptor(intf->cur_altsetting,
drivers/video/fbdev/udlfb.c-1569- 0x5f, &desc))
--
include/linux/usb.h=428=struct usb_host_bos {
--
include/linux/usb.h-437-
include/linux/usb.h:438:int __usb_get_extra_descriptor(char *buffer, unsigned size,
include/linux/usb.h-439- unsigned char type, void **ptr, size_t min);
include/linux/usb.h:440:#define usb_get_extra_descriptor(ifpoint, type, ptr) \
include/linux/usb.h:441: __usb_get_extra_descriptor((ifpoint)->extra, \
include/linux/usb.h-442- (ifpoint)->extralen, \
] |
| 80/2 | 2026/05/19 10:38 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 106555 output: 43 thoughts: 383 Thoughts: **Analyzing USB Descriptor Parsing** Okay, so I'm looking at how `usb_get_extra_descriptor` handles things. My initial thought is it searches for the descriptor within `(ifpoint)->extra`, which seems standard. But then I'm seeing this C code that's modifying an address, `0x200000000024`. That's a red flag. Let me quickly re-examine the offsets to make sure I'm oriented. I see: * `0x1b`: `09` (bLength for the interface) * `0x1c`: `04` (bDescriptorType - the interface descriptor) * `0x1d`: `00` (bInterfaceNumber) * `0x1e`: `00` (bAlternateSetting) * `0x1f`: `00` (bNumEndpoints) * `0x20`: `03` (bInterfaceClass) * `0x21`: `01` (bInterfaceSubClass) * `0x22`: `00` (bInterfaceProtocol) * `0x23`: `00` (iInterface) * `0x24`: `00` (bLength for HID) Now it hits me. If `bNumEndpoints` is actually zero, that means the interface descriptor *should* be only 9 bytes long. Logically, the HID descriptor would directly follow it as an extra. But the real problem is that I'm seeing a code snippet: ```c *(uint8_t*)0x20000000001f = 0; // bNumEndpoints = 0 ``` That's a direct *write* to memory, setting `bNumEndpoints` to zero. This is where it gets interesting, because if `bNumEndpoints` is zero, the USB core *won't* parse any endpoint descriptors. So this modifies the core logic. And, as I said, the HID descriptor is an EXTRA descriptor of the interface. Since the USB core is supposed to parse the entire configuration and its sub-descriptors, if `bLength` of the HID descriptor is 0, what happens then? My next step is to head over to the `usb_parse_configuration` function in `drivers/usb/core/config.c` to see how it handles this specific case. |
| 81/2 | 2026/05/19 10:38 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/core/config.c IncludeLines:true Name:usb_parse_configuration] Results: map[SourceCode: 659: static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
660: struct usb_host_config *config, unsigned char *buffer, int size)
661: {
662: struct device *ddev = &dev->dev;
663: unsigned char *buffer0 = buffer;
664: int cfgno;
665: int nintf, nintf_orig;
666: int i, j, n;
667: struct usb_interface_cache *intfc;
668: unsigned char *buffer2;
669: int size2;
670: struct usb_descriptor_header *header;
671: int retval;
672: u8 inums[USB_MAXINTERFACES], nalts[USB_MAXINTERFACES];
673: unsigned iad_num = 0;
674:
675: memcpy(&config->desc, buffer, USB_DT_CONFIG_SIZE);
676: nintf = nintf_orig = config->desc.bNumInterfaces;
677: config->desc.bNumInterfaces = 0; // Adjusted later
678:
679: if (config->desc.bDescriptorType != USB_DT_CONFIG ||
680: config->desc.bLength < USB_DT_CONFIG_SIZE ||
681: config->desc.bLength > size) {
682: dev_notice(ddev, "invalid descriptor for config index %d: "
683: "type = 0x%X, length = %d\n", cfgidx,
684: config->desc.bDescriptorType, config->desc.bLength);
685: return -EINVAL;
686: }
687: cfgno = config->desc.bConfigurationValue;
688:
689: buffer += config->desc.bLength;
690: size -= config->desc.bLength;
691:
692: if (nintf > USB_MAXINTERFACES) {
693: dev_notice(ddev, "config %d has too many interfaces: %d, "
694: "using maximum allowed: %d\n",
695: cfgno, nintf, USB_MAXINTERFACES);
696: nintf = USB_MAXINTERFACES;
697: }
698:
699: /* Go through the descriptors, checking their length and counting the
700: * number of altsettings for each interface */
701: n = 0;
702: for ((buffer2 = buffer, size2 = size);
703: size2 > 0;
704: (buffer2 += header->bLength, size2 -= header->bLength)) {
705:
706: if (size2 < sizeof(struct usb_descriptor_header)) {
707: dev_notice(ddev, "config %d descriptor has %d excess "
708: "byte%s, ignoring\n",
709: cfgno, size2, str_plural(size2));
710: break;
711: }
712:
713: header = (struct usb_descriptor_header *) buffer2;
714: if ((header->bLength > size2) || (header->bLength < 2)) {
715: dev_notice(ddev, "config %d has an invalid descriptor "
716: "of length %d, skipping remainder of the config\n",
717: cfgno, header->bLength);
718: break;
719: }
720:
721: if (header->bDescriptorType == USB_DT_INTERFACE) {
722: struct usb_interface_descriptor *d;
723: int inum;
724:
725: d = (struct usb_interface_descriptor *) header;
726: if (d->bLength < USB_DT_INTERFACE_SIZE) {
727: dev_notice(ddev, "config %d has an invalid "
728: "interface descriptor of length %d, "
729: "skipping\n", cfgno, d->bLength);
730: continue;
731: }
732:
733: inum = d->bInterfaceNumber;
734:
735: if ((dev->quirks & USB_QUIRK_HONOR_BNUMINTERFACES) &&
736: n >= nintf_orig) {
737: dev_notice(ddev, "config %d has more interface "
738: "descriptors, than it declares in "
739: "bNumInterfaces, ignoring interface "
740: "number: %d\n", cfgno, inum);
741: continue;
742: }
743:
744: if (inum >= nintf_orig)
745: dev_notice(ddev, "config %d has an invalid "
746: "interface number: %d but max is %d\n",
747: cfgno, inum, nintf_orig - 1);
748:
749: /* Have we already encountered this interface?
750: * Count its altsettings */
751: for (i = 0; i < n; ++i) {
752: if (inums[i] == inum)
753: break;
754: }
755: if (i < n) {
756: if (nalts[i] < 255)
757: ++nalts[i];
758: } else if (n < USB_MAXINTERFACES) {
759: inums[n] = inum;
760: nalts[n] = 1;
761: ++n;
762: }
763:
764: } else if (header->bDescriptorType ==
765: USB_DT_INTERFACE_ASSOCIATION) {
766: struct usb_interface_assoc_descriptor *d;
767:
768: d = (struct usb_interface_assoc_descriptor *)header;
769: if (d->bLength < USB_DT_INTERFACE_ASSOCIATION_SIZE) {
770: dev_notice(ddev,
771: "config %d has an invalid interface association descriptor of length %d, skipping\n",
772: cfgno, d->bLength);
773: continue;
774: }
775:
776: if (iad_num == USB_MAXIADS) {
777: dev_notice(ddev, "found more Interface "
778: "Association Descriptors "
779: "than allocated for in "
780: "configuration %d\n", cfgno);
781: } else {
782: config->intf_assoc[iad_num] = d;
783: iad_num++;
784: }
785:
786: } else if (header->bDescriptorType == USB_DT_DEVICE ||
787: header->bDescriptorType == USB_DT_CONFIG)
788: dev_notice(ddev, "config %d contains an unexpected "
789: "descriptor of type 0x%X, skipping\n",
790: cfgno, header->bDescriptorType);
791:
792: } /* for ((buffer2 = buffer, size2 = size); ...) */
793: size = buffer2 - buffer;
794: config->desc.wTotalLength = cpu_to_le16(buffer2 - buffer0);
795:
796: if (n != nintf)
797: dev_notice(ddev, "config %d has %d interface%s, different from "
798: "the descriptor's value: %d\n",
799: cfgno, n, str_plural(n), nintf_orig);
800: else if (n == 0)
801: dev_notice(ddev, "config %d has no interfaces?\n", cfgno);
802: config->desc.bNumInterfaces = nintf = n;
803:
804: /* Check for missing interface numbers */
805: for (i = 0; i < nintf; ++i) {
806: for (j = 0; j < nintf; ++j) {
807: if (inums[j] == i)
808: break;
809: }
810: if (j >= nintf)
811: dev_notice(ddev, "config %d has no interface number "
812: "%d\n", cfgno, i);
813: }
814:
815: /* Allocate the usb_interface_caches and altsetting arrays */
816: for (i = 0; i < nintf; ++i) {
817: j = nalts[i];
818: if (j > USB_MAXALTSETTING) {
819: dev_notice(ddev, "too many alternate settings for "
820: "config %d interface %d: %d, "
821: "using maximum allowed: %d\n",
822: cfgno, inums[i], j, USB_MAXALTSETTING);
823: nalts[i] = j = USB_MAXALTSETTING;
824: }
825:
826: intfc = kzalloc_flex(*intfc, altsetting, j);
827: config->intf_cache[i] = intfc;
828: if (!intfc)
829: return -ENOMEM;
830: kref_init(&intfc->ref);
831: }
832:
833: /* FIXME: parse the BOS descriptor */
834:
835: /* Skip over any Class Specific or Vendor Specific descriptors;
836: * find the first interface descriptor */
837: config->extra = buffer;
838: i = find_next_descriptor(buffer, size, USB_DT_INTERFACE,
839: USB_DT_INTERFACE, &n);
840: config->extralen = i;
841: if (n > 0)
842: dev_dbg(ddev, "skipped %d descriptor%s after %s\n",
843: n, str_plural(n), "configuration");
844: buffer += i;
845: size -= i;
846:
847: /* Parse all the interface/altsetting descriptors */
848: while (size > 0) {
849: retval = usb_parse_interface(ddev, cfgno, config,
850: buffer, size, inums, nalts);
851: if (retval < 0)
852: return retval;
853:
854: buffer += retval;
855: size -= retval;
856: }
857:
858: /* Check for missing altsettings */
859: for (i = 0; i < nintf; ++i) {
860: intfc = config->intf_cache[i];
861: for (j = 0; j < intfc->num_altsetting; ++j) {
862: for (n = 0; n < intfc->num_altsetting; ++n) {
863: if (intfc->altsetting[n].desc.
864: bAlternateSetting == j)
865: break;
866: }
867: if (n >= intfc->num_altsetting)
868: dev_notice(ddev, "config %d interface %d has no "
869: "altsetting %d\n", cfgno, inums[i], j);
870: }
871: }
872:
873: return 0;
874: }
SourceFile:drivers/usb/core/config.c] |
| 82/2 | 2026/05/19 10:38 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 110996 output: 43 thoughts: 47 Thoughts: **Analyzing the USB Interface Parsing** Okay, so `usb_parse_interface` is responsible for dissecting the interface descriptor and any accompanying extra descriptors. That makes sense; it's the core of how the system understands what the interface *does*. Now, I'm stuck on this edge case: What exactly happens when the `bLength` field within an HID descriptor is reported as zero? Does the parser gracefully handle this or could it lead to unforeseen behavior? Best to take a look at the code for `usb_parse_interface` to be certain. Gotta confirm what edge cases are accounted for. |
| 83/2 | 2026/05/19 10:38 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/core/config.c IncludeLines:true Name:usb_parse_interface] Results: map[SourceCode: 552: static int usb_parse_interface(struct device *ddev, int cfgno,
553: struct usb_host_config *config, unsigned char *buffer, int size,
554: u8 inums[], u8 nalts[])
555: {
556: unsigned char *buffer0 = buffer;
557: struct usb_interface_descriptor *d;
558: int inum, asnum;
559: struct usb_interface_cache *intfc;
560: struct usb_host_interface *alt;
561: int i, n;
562: int len, retval;
563: int num_ep, num_ep_orig;
564:
565: d = (struct usb_interface_descriptor *) buffer;
566: buffer += d->bLength;
567: size -= d->bLength;
568:
569: if (d->bLength < USB_DT_INTERFACE_SIZE)
570: goto skip_to_next_interface_descriptor;
571:
572: /* Which interface entry is this? */
573: intfc = NULL;
574: inum = d->bInterfaceNumber;
575: for (i = 0; i < config->desc.bNumInterfaces; ++i) {
576: if (inums[i] == inum) {
577: intfc = config->intf_cache[i];
578: break;
579: }
580: }
581: if (!intfc || intfc->num_altsetting >= nalts[i])
582: goto skip_to_next_interface_descriptor;
583:
584: /* Check for duplicate altsetting entries */
585: asnum = d->bAlternateSetting;
586: for ((i = 0, alt = &intfc->altsetting[0]);
587: i < intfc->num_altsetting;
588: (++i, ++alt)) {
589: if (alt->desc.bAlternateSetting == asnum) {
590: dev_notice(ddev, "Duplicate descriptor for config %d "
591: "interface %d altsetting %d, skipping\n",
592: cfgno, inum, asnum);
593: goto skip_to_next_interface_descriptor;
594: }
595: }
596:
597: ++intfc->num_altsetting;
598: memcpy(&alt->desc, d, USB_DT_INTERFACE_SIZE);
599:
600: /* Skip over any Class Specific or Vendor Specific descriptors;
601: * find the first endpoint or interface descriptor */
602: alt->extra = buffer;
603: i = find_next_descriptor(buffer, size, USB_DT_ENDPOINT,
604: USB_DT_INTERFACE, &n);
605: alt->extralen = i;
606: if (n > 0)
607: dev_dbg(ddev, "skipped %d descriptor%s after %s\n",
608: n, str_plural(n), "interface");
609: buffer += i;
610: size -= i;
611:
612: /* Allocate space for the right(?) number of endpoints */
613: num_ep = num_ep_orig = alt->desc.bNumEndpoints;
614: alt->desc.bNumEndpoints = 0; /* Use as a counter */
615: if (num_ep > USB_MAXENDPOINTS) {
616: dev_notice(ddev, "too many endpoints for config %d interface %d "
617: "altsetting %d: %d, using maximum allowed: %d\n",
618: cfgno, inum, asnum, num_ep, USB_MAXENDPOINTS);
619: num_ep = USB_MAXENDPOINTS;
620: }
621:
622: if (num_ep > 0) {
623: /* Can't allocate 0 bytes */
624: len = sizeof(struct usb_host_endpoint) * num_ep;
625: alt->endpoint = kzalloc(len, GFP_KERNEL);
626: if (!alt->endpoint)
627: return -ENOMEM;
628: }
629:
630: /* Parse all the endpoint descriptors */
631: n = 0;
632: while (size > 0) {
633: if (((struct usb_descriptor_header *) buffer)->bDescriptorType
634: == USB_DT_INTERFACE)
635: break;
636: retval = usb_parse_endpoint(ddev, cfgno, config, inum, asnum,
637: alt, num_ep, buffer, size);
638: if (retval < 0)
639: return retval;
640: ++n;
641:
642: buffer += retval;
643: size -= retval;
644: }
645:
646: if (n != num_ep_orig)
647: dev_notice(ddev, "config %d interface %d altsetting %d has %d "
648: "endpoint descriptor%s, different from the interface "
649: "descriptor's value: %d\n",
650: cfgno, inum, asnum, n, str_plural(n), num_ep_orig);
651: return buffer - buffer0;
652:
653: skip_to_next_interface_descriptor:
654: i = find_next_descriptor(buffer, size, USB_DT_INTERFACE,
655: USB_DT_INTERFACE, NULL);
656: return buffer - buffer0 + i;
657: }
SourceFile:drivers/usb/core/config.c] |
| 84/2 | 2026/05/19 10:38 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 112925 output: 43 thoughts: 42 Thoughts: Okay, let's see... **Analyzing Descriptor Navigation Logic** Right, so `find_next_descriptor` seems to have a specific behavior. It's skipping over different types of descriptors until it hits either an `USB_DT_ENDPOINT` or an `USB_DT_INTERFACE`. I need to understand why that's happening. I need to take a closer look at that function. What's the rationale behind this selective skipping? Is it related to how the enumeration process is structured? Or perhaps it's optimized for a specific hardware architecture? I'll need to dig into the code and trace the control flow to be certain. |
| 85/2 | 2026/05/19 10:38 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/core/config.c IncludeLines:true Name:find_next_descriptor] Results: map[SourceCode: 22: static int find_next_descriptor(unsigned char *buffer, int size,
23: int dt1, int dt2, int *num_skipped)
24: {
25: struct usb_descriptor_header *h;
26: int n = 0;
27: unsigned char *buffer0 = buffer;
28:
29: /* Find the next descriptor of type dt1 or dt2 */
30: while (size > 0) {
31: h = (struct usb_descriptor_header *) buffer;
32: if (h->bDescriptorType == dt1 || h->bDescriptorType == dt2)
33: break;
34: buffer += h->bLength;
35: size -= h->bLength;
36: ++n;
37: }
38:
39: /* Store the number of descriptors skipped and return the
40: * number of bytes skipped */
41: if (num_skipped)
42: *num_skipped = n;
43: return buffer - buffer0;
44: }
SourceFile:drivers/usb/core/config.c] |
| 86/2 | 2026/05/19 10:38 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 113479 output: 43 thoughts: 5789 Thoughts: **The HID Descriptor Bug and the KASAN Crash** Okay, here's what I've figured out, breaking it down step-by-step. The initial thought was that a zero `bLength` in the HID descriptor would lead to an infinite loop in `find_next_descriptor`. However, `usb_parse_configuration` has a check (`header->bLength < 2`) that would break out of the loop and cause the function to return. But, that break causes a truncation of the buffer. The first key observation is that the zero `bLength` causes `usb_parse_configuration` to truncate the buffer. This loop initially scans all descriptors. The critical point is that after this truncation, the HID descriptor is *skipped* in the following loop within `usb_parse_interface`. Specifically, `alt->extra` will then be NULL, and the subsequent `usb_get_extra_descriptor` will fail to find the HID descriptor. Therefore, `usbhid_parse` returns `-ENODEV`, which should prevent the device from being properly added. However, the crash isn't simply a hang; it's a KASAN slab-out-of-bounds error. The syzkaller reproducer modifies a specific byte in the descriptor buffer. The reproducer calls `syz_usb_connect` twice, with the modification only happening *after* the first call. This suggests that the second device is being connected with `bLength` = 0. Looking closely at the code where the buffer is being modified: ```c *(uint8_t*)0x200000000024 = 0; ``` This `0x200000000024` offset corresponds to the *start* of the HID descriptor. The buffer contains the following sequence: * Device descriptor (18 bytes) * Configuration descriptor (9 bytes) * Interface descriptor (9 bytes) * HID descriptor (9 bytes) * Endpoint descriptor (5 bytes) So, yes, it *does* zero out the `bLength` field of the HID descriptor on the *second* device. The first device, upon successful connect, then disconnects. However, it seems the disconnect doesn't instantly tear down the raw gadget. This is because the raw gadget uses a workqueue or some other mechanism to teardown the device. This means the first device may still exist in an inconsistent state when the second device attempts to connect. The first device attempts to send `GET_DESCRIPTOR`, but there is no user space process to respond to that request, leading to the device failing. The important factor is that the second device, when it connects, sees the modified descriptor where `bLength` is 0, causing the `usb_parse_configuration` to truncate, skipping HID and causing `usbhid_parse` to return `-ENODEV`. This means the second device shouldn't probe correctly. The reason the KASAN crash happens has to involve the fact the configuration is truncated, and later accesses are performed on invalid memory. So it's probably *not* a hang due to an infinite loop, but a race. Furthermore, another detail that makes it tricky to troubleshoot, is that `bNumEndpoints` is being set to 0. Despite this fact, however, `usb_parse_interface` *will* still process the endpoint descriptor, though it will complain if there are *too many* endpoints. The key to the whole bug is the zero-length HID descriptor. The modification of the buffer is happening *after* the first device's connection, meaning the crash happens on the *second* device. The `bLength` of 0 truncates the config and leads to `alt->extra` pointing to the wrong buffer, with `extralen` set to 0. Therefore, the HID descriptor is never found by `usbhid_parse`! Then, there's another point! The endpoint `wMaxPacketSize` is 0. With `wMaxPacketSize` 0, the first device *might* not have been able to probe and crash in `usbhid_start`. This may have been the source of the KASAN slab-out-of-bounds error. |
| 87/2 | 2026/05/19 10:39 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/usb/core/urb.c IncludeLines:true Name:usb_submit_urb] Results: map[SourceCode: 230: /**
231: * usb_submit_urb - issue an asynchronous transfer request for an endpoint
232: * @urb: pointer to the urb describing the request
233: * @mem_flags: the type of memory to allocate, see kmalloc() for a list
234: * of valid options for this.
235: *
236: * This submits a transfer request, and transfers control of the URB
237: * describing that request to the USB subsystem. Request completion will
238: * be indicated later, asynchronously, by calling the completion handler.
239: * The three types of completion are success, error, and unlink
240: * (a software-induced fault, also called "request cancellation").
241: *
242: * URBs may be submitted in interrupt context.
243: *
244: * The caller must have correctly initialized the URB before submitting
245: * it. Functions such as usb_fill_bulk_urb() and usb_fill_control_urb() are
246: * available to ensure that most fields are correctly initialized, for
247: * the particular kind of transfer, although they will not initialize
248: * any transfer flags.
249: *
250: * If the submission is successful, the complete() callback from the URB
251: * will be called exactly once, when the USB core and Host Controller Driver
252: * (HCD) are finished with the URB. When the completion function is called,
253: * control of the URB is returned to the device driver which issued the
254: * request. The completion handler may then immediately free or reuse that
255: * URB.
256: *
257: * With few exceptions, USB device drivers should never access URB fields
258: * provided by usbcore or the HCD until its complete() is called.
259: * The exceptions relate to periodic transfer scheduling. For both
260: * interrupt and isochronous urbs, as part of successful URB submission
261: * urb->interval is modified to reflect the actual transfer period used
262: * (normally some power of two units). And for isochronous urbs,
263: * urb->start_frame is modified to reflect when the URB's transfers were
264: * scheduled to start.
265: *
266: * Not all isochronous transfer scheduling policies will work, but most
267: * host controller drivers should easily handle ISO queues going from now
268: * until 10-200 msec into the future. Drivers should try to keep at
269: * least one or two msec of data in the queue; many controllers require
270: * that new transfers start at least 1 msec in the future when they are
271: * added. If the driver is unable to keep up and the queue empties out,
272: * the behavior for new submissions is governed by the URB_ISO_ASAP flag.
273: * If the flag is set, or if the queue is idle, then the URB is always
274: * assigned to the first available (and not yet expired) slot in the
275: * endpoint's schedule. If the flag is not set and the queue is active
276: * then the URB is always assigned to the next slot in the schedule
277: * following the end of the endpoint's previous URB, even if that slot is
278: * in the past. When a packet is assigned in this way to a slot that has
279: * already expired, the packet is not transmitted and the corresponding
280: * usb_iso_packet_descriptor's status field will return -EXDEV. If this
281: * would happen to all the packets in the URB, submission fails with a
282: * -EXDEV error code.
283: *
284: * For control endpoints, the synchronous usb_control_msg() call is
285: * often used (in non-interrupt context) instead of this call.
286: * That is often used through convenience wrappers, for the requests
287: * that are standardized in the USB 2.0 specification. For bulk
288: * endpoints, a synchronous usb_bulk_msg() call is available.
289: *
290: * Return:
291: * 0 on successful submissions. A negative error number otherwise.
292: *
293: * Request Queuing:
294: *
295: * URBs may be submitted to endpoints before previous ones complete, to
296: * minimize the impact of interrupt latencies and system overhead on data
297: * throughput. With that queuing policy, an endpoint's queue would never
298: * be empty. This is required for continuous isochronous data streams,
299: * and may also be required for some kinds of interrupt transfers. Such
300: * queuing also maximizes bandwidth utilization by letting USB controllers
301: * start work on later requests before driver software has finished the
302: * completion processing for earlier (successful) requests.
303: *
304: * As of Linux 2.6, all USB endpoint transfer queues support depths greater
305: * than one. This was previously a HCD-specific behavior, except for ISO
306: * transfers. Non-isochronous endpoint queues are inactive during cleanup
307: * after faults (transfer errors or cancellation).
308: *
309: * Reserved Bandwidth Transfers:
310: *
311: * Periodic transfers (interrupt or isochronous) are performed repeatedly,
312: * using the interval specified in the urb. Submitting the first urb to
313: * the endpoint reserves the bandwidth necessary to make those transfers.
314: * If the USB subsystem can't allocate sufficient bandwidth to perform
315: * the periodic request, submitting such a periodic request should fail.
316: *
317: * For devices under xHCI, the bandwidth is reserved at configuration time, or
318: * when the alt setting is selected. If there is not enough bus bandwidth, the
319: * configuration/alt setting request will fail. Therefore, submissions to
320: * periodic endpoints on devices under xHCI should never fail due to bandwidth
321: * constraints.
322: *
323: * Device drivers must explicitly request that repetition, by ensuring that
324: * some URB is always on the endpoint's queue (except possibly for short
325: * periods during completion callbacks). When there is no longer an urb
326: * queued, the endpoint's bandwidth reservation is canceled. This means
327: * drivers can use their completion handlers to ensure they keep bandwidth
328: * they need, by reinitializing and resubmitting the just-completed urb
329: * until the driver longer needs that periodic bandwidth.
330: *
331: * Memory Flags:
332: *
333: * The general rules for how to decide which mem_flags to use
334: * are the same as for kmalloc. There are four
335: * different possible values; GFP_KERNEL, GFP_NOFS, GFP_NOIO and
336: * GFP_ATOMIC.
337: *
338: * GFP_NOFS is not ever used, as it has not been implemented yet.
339: *
340: * GFP_ATOMIC is used when
341: * (a) you are inside a completion handler, an interrupt, bottom half,
342: * tasklet or timer, or
343: * (b) you are holding a spinlock or rwlock (does not apply to
344: * semaphores), or
345: * (c) current->state != TASK_RUNNING, this is the case only after
346: * you've changed it.
347: *
348: * GFP_NOIO is used in the block io path and error handling of storage
349: * devices.
350: *
351: * All other situations use GFP_KERNEL.
352: *
353: * Some more specific rules for mem_flags can be inferred, such as
354: * (1) start_xmit, timeout, and receive methods of network drivers must
355: * use GFP_ATOMIC (they are called with a spinlock held);
356: * (2) queuecommand methods of scsi drivers must use GFP_ATOMIC (also
357: * called with a spinlock held);
358: * (3) If you use a kernel thread with a network driver you must use
359: * GFP_NOIO, unless (b) or (c) apply;
360: * (4) after you have done a down() you can use GFP_KERNEL, unless (b) or (c)
361: * apply or your are in a storage driver's block io path;
362: * (5) USB probe and disconnect can use GFP_KERNEL unless (b) or (c) apply; and
363: * (6) changing firmware on a running storage or net device uses
364: * GFP_NOIO, unless b) or c) apply
365: *
366: */
367: int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
368: {
369: int xfertype, max;
370: struct usb_device *dev;
371: struct usb_host_endpoint *ep;
372: int is_out;
373: unsigned int allowed;
374: bool is_eusb2_isoch_double;
375:
376: if (!urb || !urb->complete)
377: return -EINVAL;
378: if (urb->hcpriv) {
379: WARN_ONCE(1, "URB %p submitted while active\n", urb);
380: return -EBUSY;
381: }
382:
383: dev = urb->dev;
384: if ((!dev) || (dev->state < USB_STATE_UNAUTHENTICATED))
385: return -ENODEV;
386:
387: /* For now, get the endpoint from the pipe. Eventually drivers
388: * will be required to set urb->ep directly and we will eliminate
389: * urb->pipe.
390: */
391: ep = usb_pipe_endpoint(dev, urb->pipe);
392: if (!ep)
393: return -ENOENT;
394:
395: urb->ep = ep;
396: urb->status = -EINPROGRESS;
397: urb->actual_length = 0;
398:
399: /* Lots of sanity checks, so HCDs can rely on clean data
400: * and don't need to duplicate tests
401: */
402: xfertype = usb_endpoint_type(&ep->desc);
403: if (xfertype == USB_ENDPOINT_XFER_CONTROL) {
404: struct usb_ctrlrequest *setup =
405: (struct usb_ctrlrequest *) urb->setup_packet;
406:
407: if (!setup)
408: return -ENOEXEC;
409: is_out = !(setup->bRequestType & USB_DIR_IN) ||
410: !setup->wLength;
411: dev_WARN_ONCE(&dev->dev, (usb_pipeout(urb->pipe) != is_out),
412: "BOGUS control dir, pipe %x doesn't match bRequestType %x\n",
413: urb->pipe, setup->bRequestType);
414: if (le16_to_cpu(setup->wLength) != urb->transfer_buffer_length) {
415: dev_dbg(&dev->dev, "BOGUS control len %d doesn't match transfer length %d\n",
416: le16_to_cpu(setup->wLength),
417: urb->transfer_buffer_length);
418: return -EBADR;
419: }
420: } else {
421: is_out = usb_endpoint_dir_out(&ep->desc);
422: }
423:
424: /* Clear the internal flags and cache the direction for later use */
425: urb->transfer_flags &= ~(URB_DIR_MASK | URB_DMA_MAP_SINGLE |
426: URB_DMA_MAP_PAGE | URB_DMA_MAP_SG | URB_MAP_LOCAL |
427: URB_SETUP_MAP_SINGLE | URB_SETUP_MAP_LOCAL |
428: URB_DMA_SG_COMBINED);
429: urb->transfer_flags |= (is_out ? URB_DIR_OUT : URB_DIR_IN);
430: kmsan_handle_urb(urb, is_out);
431:
432: if (xfertype != USB_ENDPOINT_XFER_CONTROL &&
433: dev->state < USB_STATE_CONFIGURED)
434: return -ENODEV;
435:
436: max = usb_endpoint_maxp(&ep->desc);
437: is_eusb2_isoch_double = usb_endpoint_is_hs_isoc_double(dev, ep);
438: if (!max && !is_eusb2_isoch_double) {
439: dev_dbg(&dev->dev,
440: "bogus endpoint ep%d%s in %s (bad maxpacket %d)\n",
441: usb_endpoint_num(&ep->desc), is_out ? "out" : "in",
442: __func__, max);
443: return -EMSGSIZE;
444: }
445:
446: /* periodic transfers limit size per frame/uframe,
447: * but drivers only control those sizes for ISO.
448: * while we're checking, initialize return status.
449: */
450: if (xfertype == USB_ENDPOINT_XFER_ISOC) {
451: int n, len;
452:
453: /* SuperSpeed isoc endpoints have up to 16 bursts of up to
454: * 3 packets each
455: */
456: if (dev->speed >= USB_SPEED_SUPER) {
457: int burst = 1 + ep->ss_ep_comp.bMaxBurst;
458: int mult = USB_SS_MULT(ep->ss_ep_comp.bmAttributes);
459: max *= burst;
460: max *= mult;
461: }
462:
463: if (dev->speed == USB_SPEED_SUPER_PLUS &&
464: USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) {
465: struct usb_ssp_isoc_ep_comp_descriptor *isoc_ep_comp;
466:
467: isoc_ep_comp = &ep->ssp_isoc_ep_comp;
468: max = le32_to_cpu(isoc_ep_comp->dwBytesPerInterval);
469: }
470:
471: /* High speed, 1-3 packets/uframe, max 6 for eUSB2 double bw */
472: if (dev->speed == USB_SPEED_HIGH) {
473: if (is_eusb2_isoch_double)
474: max = le32_to_cpu(ep->eusb2_isoc_ep_comp.dwBytesPerInterval);
475: else
476: max *= usb_endpoint_maxp_mult(&ep->desc);
477: }
478:
479: if (urb->number_of_packets <= 0)
480: return -EINVAL;
481: for (n = 0; n < urb->number_of_packets; n++) {
482: len = urb->iso_frame_desc[n].length;
483: if (len < 0 || len > max)
484: return -EMSGSIZE;
485: urb->iso_frame_desc[n].status = -EXDEV;
486: urb->iso_frame_desc[n].actual_length = 0;
487: }
488: } else if (urb->num_sgs && !urb->dev->bus->no_sg_constraint) {
489: struct scatterlist *sg;
490: int i;
491:
492: for_each_sg(urb->sg, sg, urb->num_sgs - 1, i)
493: if (sg->length % max)
494: return -EINVAL;
495: }
496:
497: /* the I/O buffer must be mapped/unmapped, except when length=0 */
498: if (urb->transfer_buffer_length > INT_MAX)
499: return -EMSGSIZE;
500:
501: /*
502: * stuff that drivers shouldn't do, but which shouldn't
503: * cause problems in HCDs if they get it wrong.
504: */
505:
506: /* Check that the pipe's type matches the endpoint's type */
507: if (usb_pipe_type_check(urb->dev, urb->pipe))
508: dev_warn_once(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
509: usb_pipetype(urb->pipe), pipetypes[xfertype]);
510:
511: /* Check against a simple/standard policy */
512: allowed = (URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT | URB_DIR_MASK |
513: URB_FREE_BUFFER);
514: switch (xfertype) {
515: case USB_ENDPOINT_XFER_BULK:
516: case USB_ENDPOINT_XFER_INT:
517: if (is_out)
518: allowed |= URB_ZERO_PACKET;
519: fallthrough;
520: default: /* all non-iso endpoints */
521: if (!is_out)
522: allowed |= URB_SHORT_NOT_OK;
523: break;
524: case USB_ENDPOINT_XFER_ISOC:
525: allowed |= URB_ISO_ASAP;
526: break;
527: }
528: allowed &= urb->transfer_flags;
529:
530: /* warn if submitter gave bogus flags */
531: if (allowed != urb->transfer_flags)
532: dev_WARN(&dev->dev, "BOGUS urb flags, %x --> %x\n",
533: urb->transfer_flags, allowed);
534:
535: /*
536: * Force periodic transfer intervals to be legal values that are
537: * a power of two (so HCDs don't need to).
538: *
539: * FIXME want bus->{intr,iso}_sched_horizon values here. Each HC
540: * supports different values... this uses EHCI/UHCI defaults (and
541: * EHCI can use smaller non-default values).
542: */
543: switch (xfertype) {
544: case USB_ENDPOINT_XFER_ISOC:
545: case USB_ENDPOINT_XFER_INT:
546: /* too small? */
547: if (urb->interval <= 0)
548: return -EINVAL;
549:
550: /* too big? */
551: switch (dev->speed) {
552: case USB_SPEED_SUPER_PLUS:
553: case USB_SPEED_SUPER: /* units are 125us */
554: /* Handle up to 2^(16-1) microframes */
555: if (urb->interval > (1 << 15))
556: return -EINVAL;
557: max = 1 << 15;
558: break;
559: case USB_SPEED_HIGH: /* units are microframes */
560: /* NOTE usb handles 2^15 */
561: if (urb->interval > (1024 * 8))
562: urb->interval = 1024 * 8;
563: max = 1024 * 8;
564: break;
565: case USB_SPEED_FULL: /* units are frames/msec */
566: case USB_SPEED_LOW:
567: if (xfertype == USB_ENDPOINT_XFER_INT) {
568: if (urb->interval > 255)
569: return -EINVAL;
570: /* NOTE ohci only handles up to 32 */
571: max = 128;
572: } else {
573: if (urb->interval > 1024)
574: urb->interval = 1024;
575: /* NOTE usb and ohci handle up to 2^15 */
576: max = 1024;
577: }
578: break;
579: default:
580: return -EINVAL;
581: }
582: /* Round down to a power of 2, no more than max */
583: urb->interval = min(max, 1 << ilog2(urb->interval));
584: }
585:
586: return usb_hcd_submit_urb(urb, mem_flags);
587: }
SourceFile:drivers/usb/core/urb.c] |
| 88/2 | 2026/05/19 10:39 | llm | debugger |
0mModel:gemini-3.1-pro-preview Tokens: input: 126458 output: 45 thoughts: 520 Thoughts: **Analyzing the USB HID Initialization Flow** Okay, let's break this down. My initial concern was about error handling during USB communication, specifically regarding the `usb_submit_urb` function. It seems this function has a check: `max = usb_endpoint_maxp(&ep->desc);` and if `max` is zero, it returns `-EMSGSIZE`. That means if `wMaxPacketSize` in the endpoint descriptor is zero, we'll get an error, right? The question then becomes, where does this `-EMSGSIZE` error propagate? My initial thought was it would cascade into a failure within `usbhid_start`. But no, wait, `usbhid_start` doesn't call `usb_submit_urb` directly. Instead, `usbhid_start` calls `hid_start_in(hid)` when the `HID_QUIRK_ALWAYS_POLL` quirk is set. *That's* the function which calls `usb_submit_urb` on the input urb: `usb_submit_urb(usbhid->urbin, GFP_KERNEL)`. Okay, so the `mcp2221` driver doesn't set `HID_QUIRK_ALWAYS_POLL`. Which means, `hid_start_in` is not called in `usbhid_start`. So when does `hid_start_in` *actually* get called? Aha! It's when the device is opened. `mcp2221_probe` calls `hid_hw_open(hdev)`. `hid_hw_open` then calls `usbhid_open`. `usbhid_open` calls `hid_start_in`! Therefore, if `hid_start_in` fails, which means `usb_submit_urb` returns -EMSGSIZE, the error will be caught by `usbhid_open`. I'll need to check the `usbhid_open` function next to understand how it handles any errors returned by `hid_start_in`. |
| 89/2 | 2026/05/19 10:39 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/usbhid/hid-core.c IncludeLines:true Name:usbhid_open] Results: map[SourceCode: 681: static int usbhid_open(struct hid_device *hid)
682: {
683: struct usbhid_device *usbhid = hid->driver_data;
684: int res;
685:
686: mutex_lock(&usbhid->mutex);
687:
688: set_bit(HID_OPENED, &usbhid->iofl);
689:
690: if (hid->quirks & HID_QUIRK_ALWAYS_POLL) {
691: res = 0;
692: goto Done;
693: }
694:
695: res = usb_autopm_get_interface(usbhid->intf);
696: /* the device must be awake to reliably request remote wakeup */
697: if (res < 0) {
698: clear_bit(HID_OPENED, &usbhid->iofl);
699: res = -EIO;
700: goto Done;
701: }
702:
703: usbhid->intf->needs_remote_wakeup = 1;
704:
705: set_bit(HID_RESUME_RUNNING, &usbhid->iofl);
706: set_bit(HID_IN_POLLING, &usbhid->iofl);
707:
708: res = hid_start_in(hid);
709: if (res) {
710: if (res != -ENOSPC) {
711: hid_io_error(hid);
712: res = 0;
713: } else {
714: /* no use opening if resources are insufficient */
715: res = -EBUSY;
716: clear_bit(HID_OPENED, &usbhid->iofl);
717: clear_bit(HID_IN_POLLING, &usbhid->iofl);
718: usbhid->intf->needs_remote_wakeup = 0;
719: }
720: }
721:
722: usb_autopm_put_interface(usbhid->intf);
723:
724: /*
725: * In case events are generated while nobody was listening,
726: * some are released when the device is re-opened.
727: * Wait 50 msec for the queue to empty before allowing events
728: * to go through hid.
729: */
730: if (res == 0)
731: msleep(50);
732:
733: clear_bit(HID_RESUME_RUNNING, &usbhid->iofl);
734:
735: Done:
736: mutex_unlock(&usbhid->mutex);
737: return res;
738: }
SourceFile:drivers/hid/usbhid/hid-core.c] |
| 90/2 | 2026/05/19 10:39 | llm | debugger |
2mModel:gemini-3.1-pro-preview Tokens: input: 128320 output: 1120 thoughts: 16309 Thoughts: **Crash Analysis and Explanation** Okay, here's what I've figured out. This crash is a nasty slab-out-of-bounds read, originating in the `mcp2221_raw_event` function within the MCP2221 HID driver. It all boils down to an integer underflow that leads to an out-of-bounds access. First, the key line is the one where the code checks for `MCP2221_GPIO_SET` command. Inside that case we find this line: `(data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)`. Now, the `mcp->gp_idx` member is critical here. It's a `u8` and, crucially, it's initialized to 0 when the mcp2221 struct is first allocated (using `devm_kzalloc`). This value of zero is only properly initialized with a value when `mcp_gpio_set` is called. Here's the problem: if the device sends a specific input report (an `MCP2221_GPIO_SET` report), *before* any GPIO operations have occurred, `mcp->gp_idx` remains at its initial 0 value. The bug happens at that line: because `mcp->gp_idx` is `u8` type, the expression `mcp->gp_idx - 1` gets promoted to `int` and becomes -1. Now, because `data` is a pointer to a `u8` buffer, this turns into accessing `data[-1]`. This is the crux of the problem! Here's where the memory layout comes into play, and where KASAN picks up on it. The `data` pointer is just an alias for the `urb->transfer_buffer`, which is allocated using `kmalloc(64, GFP_KERNEL)`. This `kmalloc` call gets a new location in `kmalloc-64` cache. Now, and this is the magic, `kmalloc` returns addresses at page boundary. This 64-byte object happened to be allocated at the beginning of a page, such as `ffff888111fe8000`. The key is that the previous physical page (e.g., `ffff888111fe7000`) was, in this case, a part of the `task_struct` cache! Now, when the code tries to access `data[-1]`, it reads the byte at `ffff888111fe7fff`โthe very *last* byte of the *previous* page. Here's how KASAN makes that connection: the address `ffff888111fe7fff` is recognized as being within a page belonging to the `task_struct` cache. KASAN calculates the difference, and because the last object in that page belongs to the `task_struct` cache, KASAN reports that this out-of-bounds read happens in context of that memory cache! So in summary, the out of bounds access is caused by two fundamental problems: 1. An integer underflow because of an uninitialized value in `mcp->gp_idx`. 2. No bounds checks in `mcp2221_raw_event` to ensure that size is appropriate for this data, and that `mcp->gp_idx` is actually a valid index. |
| 91/1 | 2026/05/19 10:42 | action | kernel-scratch-checkouter |
0mResults:map[KernelScratchSrc:/app/workdir/cache/tmp/tmp326899429] |
| 92/1 | 2026/05/19 10:42 | loop |
42m |
|
| 93/2 | 2026/05/19 10:42 | iteration | 0 |
42m |
| 94/3 | 2026/05/19 10:42 | agent | patch-generator |
3mModel:gemini-3.1-pro-preview Instruction: You are an experienced Linux kernel developer tasked with creating a fix for a kernel bug. You will be given a crash report, and an initial explanation of the root cause done by another kernel expert. Use the codeeditor tool to do code edits. Note: you will not see your changes when looking at the code using codesearch tools. Use the patch-diff tool to review the modifications you applied. Your final reply should contain explanation of what you did in the patch and why (details not present in the initial explanation of the bug). Your fix must not just prevent the given crash, but also be the best fix for the underlying root cause from the software engineering point of view. There can be several ways to fix the same bug. Consider alternatives, and pick the best one. For example, additional checks may be added at different locations/functions, it's usually better to place them earlier in the execution to avoid multiple checks at various locations later. Frequently the same coding mistake is done in several locations in the source code. Check if your fix should be extended/applied to similar cases around to fix other similar bugs. But don't go too wide, don't try to fix problems kernel-wide, fix similar issues in the same file only. If you are changing post-conditions of a function, consider all callers of the functions, and if they need to be updated to handle new post-conditions. For example, if you make a function that previously never returned a NULL, return NULL, consider if callers need to be updated to handle NULL return value. Prefer calling several tools at the same time to save round-trips. Prompt:
The crash that corresponds to the bug is:
==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888111fe7fff by task ktimers/0/16
CPU: 0 UID: 0 PID: 16 Comm: ktimers/0 Not tainted syzkaller #1 PREEMPT_{RT,(full)}
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x42b/0x590 drivers/hid/hid-core.c:2161
hid_irq_in+0x495/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x405/0xb10 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x18f/0x260 kernel/time/hrtimer.c:2011
handle_softirqs+0x1de/0x6d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1151
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
kmem_cache_alloc_node_noprof+0x22a/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
kernel_thread+0x13f/0x1b0 kernel/fork.c:2782
create_kthread kernel/kthread.c:459 [inline]
kthreadd+0x4ec/0x6e0 kernel/kthread.c:817
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888111fe5880
which belongs to the cache task_struct of size 7296
The buggy address is located 2815 bytes to the right of
allocated 7296-byte region [ffff888111fe5880, ffff888111fe7500)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111fe0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888116e25541
flags: 0x100000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2388, tgid 2388 (kworker/u9:11), ts 15402053339, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3467
new_slab mm/slub.c:3525 [inline]
refill_objects+0x33c/0x3d0 mm/slub.c:7271
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x373/0x720 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
kmem_cache_alloc_node_noprof+0x4f4/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
user_mode_thread+0x110/0x180 kernel/fork.c:2797
call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
worker_thread+0x8a2/0xda0 kernel/workqueue.c:3478
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
page_owner free stack trace missing
Memory state around the buggy address:
ffff888111fe7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888111fe8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
The explanation of the root cause of the bug is:
An analysis of the crash report and the source code reveals that the root cause is an **out-of-bounds read due to a negative array index** in `mcp2221_raw_event()`, combined with a lack of bounds checking on the incoming HID report size.
### Detailed Explanation
1. **Uninitialized State**:
When the `mcp2221` device is probed, its state structure is allocated using `devm_kzalloc()`, which zero-initializes all fields. The `mcp->gp_idx` field (a `u8`) is initialized to `0`. It is only updated to a valid positive offset (e.g., 3, 7, 11, or 15) when the GPIO subsystem invokes the driver's GPIO operations like `mcp_gpio_set()`.
2. **The Vulnerability**:
If the device sends an `MCP2221_GPIO_SET` (0x50) input report *before* any GPIO operations are performed (or if a malicious device/reproducer injects one), `mcp2221_raw_event()` processes the report while `mcp->gp_idx` is still `0`.
Looking at `drivers/hid/hid-mcp2221.c` around line 964:
```c
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
```
Because `mcp->gp_idx` is `0`, the expression `mcp->gp_idx - 1` promotes the `u8` to an `int`, resulting in `-1`. This causes the code to access `data[-1]`.
3. **Memory Layout and the KASAN Report**:
The `data` pointer passed to `mcp2221_raw_event()` points to the URB transfer buffer, which is allocated by the USB core via `kmalloc()` (e.g., from the `kmalloc-64` cache).
In the crashing scenario, the SLUB allocator placed this 64-byte buffer at the very beginning of a new page, exactly at address `ffff888111fe8000`.
When the code evaluates `data[-1]`, it reads the address `ffff888111fe7fff`. This address is the last byte of the *previous* physical page. As shown in the KASAN report, the previous page (`pfn:0x111fe0`) was an order-3 slab page belonging to the `task_struct` cache. The last `task_struct` object in that page ended at `ffff888111fe7500`, and the remainder of the page was SLUB padding/redzone (filled with `fc`).
KASAN intercepted the read at `ffff888111fe7fff` and correctly reported it as a slab-out-of-bounds read located 2815 bytes to the right of the `task_struct` object.
```text
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^ (data[-1] at ffff888111fe7fff)
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <-- data (urb->transfer_buffer)
```
### How to Fix
To fix this bug, `mcp2221_raw_event()` needs two corrections:
1. **Validate `mcp->gp_idx`**: Ensure that `mcp->gp_idx` is valid (e.g., `mcp->gp_idx > 0`) before using it as an array index.
2. **Bounds Checking**: The function completely lacks bounds checking on the `size` parameter. It blindly accesses `data[0]`, `data[1]`, and various other offsets (like `data[50]` in the `MCP2221_I2C_PARAM_OR_STATUS` case). It should verify that `size` is large enough for the specific report being processed before accessing the `data` array.
Reply: An analysis of the crash report and the driver's source code reveals that the root cause is an out-of-bounds read due to a negative array index in `mcp2221_raw_event()`, combined with a lack of bounds checking on the incoming HID report size.
### Detailed Explanation
1. **Uninitialized State & Stray Reports**:
When the `mcp2221` device is probed, its state structure is allocated using `devm_kzalloc()`, which zero-initializes all fields. The `mcp->gp_idx` field is initialized to `0`. It is only updated to a valid positive offset when the GPIO subsystem invokes the driver's GPIO operations (like `mcp_gpio_set()`).
The `mcp2221_raw_event()` function is called for any incoming HID input report. It blindly processes the report based on the command byte `data[0]`, without verifying if the report is actually a response to the command the driver just sent.
2. **The Vulnerability**:
If the device sends an `MCP2221_GPIO_SET` (0x50) input report *before* any GPIO operations are performed (or if a malicious device/reproducer injects one), `mcp2221_raw_event()` processes the report while `mcp->gp_idx` is still `0`.
Because `mcp->gp_idx` is `0`, the expression `mcp->gp_idx - 1` results in `-1`, causing the code to access `data[-1]`. This reads out of the bounds of the URB transfer buffer, triggering the KASAN slab-out-of-bounds report.
3. **Lack of Bounds Checking**:
The function completely lacks bounds checking on the `size` parameter. It blindly accesses various offsets (like `data[50]` in the `MCP2221_I2C_PARAM_OR_STATUS` case). The expected report size for MCP2221 is 64 bytes.
### The Fix
To fix this bug comprehensively, we need to ensure that `mcp2221_raw_event()` only processes valid responses to the currently pending command, and that the report size is correct.
1. **Size Validation**: We add a check to ensure `size >= 64` at the beginning of the function. If the size is smaller, we ignore the report.
2. **Command Validation**: The driver always stores the command byte it sends in `mcp->txbuf[0]`. The MCP2221 device always echoes this command byte in the first byte of its response (`data[0]`). By checking `if (data[0] != mcp->txbuf[0])`, we can safely ignore any stray, delayed, or malicious reports that do not match the currently pending command.
Since `mcp->txbuf[0]` and `mcp->gp_idx` are always set together when sending GPIO commands, this check inherently guarantees that `mcp->gp_idx` is valid and correctly initialized for the specific command being processed, preventing the `-1` index access.
I have applied the following patch to `drivers/hid/hid-mcp2221.c`:
```c
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -858,6 +858,12 @@ static int mcp2221_raw_event(struct hid_device *hdev,
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
``` |
| 95/4 | 2026/05/19 10:42 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 8031 output: 33 thoughts: 123 Thoughts: **Analyzing a KASAN Slab-Out-of-Bounds Read in the MCP2221 Driver** Okay, so I'm seeing a KASAN slab-out-of-bounds read error, specifically in the `mcp2221_raw_event` function within the `hid-mcp2221.c` driver at line 964. The root of the problem seems to be an issue with how the driver is handling a General Purpose (GP) pin index. It looks like `mcp->gp_idx` is being set to 0. Consequently, when the code tries to access `data[mcp->gp_idx - 1]`, it's effectively doing `data[-1]`, which is, of course, a memory access outside of the allocated bounds. This is a classic off-by-one or underflow error. Furthermore, it looks like there's also a lack of adequate bounds checking on the `size` variable. This suggests a potential weakness or another entry point for issues if `size` is not validated correctly. My next step is to dive right into the `drivers/hid/hid-mcp2221.c` source code and see exactly how `mcp->gp_idx` is being determined and how the `size` parameter is handled. I need to understand the control flow leading to this access to fully understand the vulnerability. I'll be looking for where `mcp->gp_idx` is initialized, potentially within other functions within the driver, and where `size` is coming from. Time to dig in and pinpoint the problematic logic. |
| 96/4 | 2026/05/19 10:42 | tool | codesearch-file-index |
0mArgs:map[SourceFile:drivers/hid/hid-mcp2221.c] Results: map[Entities:[map[Kind:function Name:__check_gpio_mode_enforce] map[Kind:function Name:mcp2221_check_gpio_pinfunc] map[Kind:function Name:mcp2221_driver_exit] map[Kind:function Name:mcp2221_driver_init] map[Kind:function Name:mcp2221_hid_unregister] map[Kind:function Name:mcp2221_probe] map[Kind:function Name:mcp2221_raw_event] map[Kind:function Name:mcp2221_read_raw] map[Kind:function Name:mcp2221_remove] map[Kind:function Name:mcp2221_write_raw] map[Kind:function Name:mcp_cancel_last_cmd] map[Kind:function Name:mcp_chk_last_cmd_status] map[Kind:function Name:mcp_chk_last_cmd_status_free_bus] map[Kind:function Name:mcp_get_i2c_eng_state] map[Kind:function Name:mcp_gpio_dir_set] map[Kind:function Name:mcp_gpio_direction_input] map[Kind:function Name:mcp_gpio_direction_output] map[Kind:function Name:mcp_gpio_get] map[Kind:function Name:mcp_gpio_get_direction] map[Kind:function Name:mcp_gpio_read_sram] map[Kind:function Name:mcp_gpio_set] map[Kind:function Name:mcp_i2c_func] map[Kind:function Name:mcp_i2c_smbus_read] map[Kind:function Name:mcp_i2c_write] map[Kind:function Name:mcp_i2c_xfer] map[Kind:function Name:mcp_iio_channels] map[Kind:function Name:mcp_init_work] map[Kind:function Name:mcp_send_data_req_status] map[Kind:function Name:mcp_send_report] map[Kind:function Name:mcp_set_i2c_speed] map[Kind:function Name:mcp_smbus_write] map[Kind:function Name:mcp_smbus_xfer] map[Kind:struct Name:mcp2221] map[Kind:struct Name:mcp2221_iio] map[Kind:struct Name:mcp_get_gpio] map[Kind:struct Name:mcp_set_gpio] map[Kind:global_variable Name:__UNIQUE_ID_addressable_mcp2221_driver_init_1028] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_1004] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_1005] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_1029] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_1030] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_1031] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_1032] map[Kind:global_variable Name:__exitcall_mcp2221_driver_exit] map[Kind:global_variable Name:__mod_device_table__kmod_hid_mcp2221__hid__mcp2221_devices] map[Kind:global_variable Name:__param_gpio_mode_enforce] map[Kind:global_variable Name:__param_str_gpio_mode_enforce] map[Kind:global_variable Name:i2c_clk_freq] map[Kind:global_variable Name:mcp2221_devices] map[Kind:global_variable Name:mcp2221_driver] map[Kind:global_variable Name:mcp2221_info] map[Kind:global_variable Name:mcp_i2c_algo]]] |
| 97/4 | 2026/05/19 10:42 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 9661 output: 53 thoughts: 34 Thoughts: Here's my analysis of the provided text, structured as a first-person expert summary: **Diving into the HID Driver for the MCP2221** Okay, so we're talking about the `mcp2221_raw_event` function within the `hid-mcp2221.c` file, specifically in the `drivers/hid` directory. This tells me we're looking at the core event handling for a Human Interface Device (HID) that utilizes the MCP2221 USB-to-I2C/UART converter chip. My assumption is that the raw event processing here is where the driver interacts directly with the incoming data from the MCP2221. It's likely involved in interpreting the raw USB reports, translating them into meaningful HID events that the system understands. I'll be interested to see how the driver handles data buffering, interrupt handling (if applicable), and any specific hardware quirks or timing considerations of the MCP2221 itself within this function. I'll need to carefully examine what sort of filtering, scaling, or translation happens here to ensure that valid, interpretable HID data gets passed upstream to the input subsystem. |
| 98/4 | 2026/05/19 10:42 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp2221_raw_event] Results: map[SourceCode: 849: /*
850: * MCP2221 uses interrupt endpoint for input reports. This function
851: * is called by HID layer when it receives i/p report from mcp2221,
852: * which is actually a response to the previously sent command.
853: *
854: * MCP2221A firmware specific return codes are parsed and 0 or
855: * appropriate negative error code is returned. Delayed response
856: * results in timeout error and stray reponses results in -EIO.
857: */
858: static int mcp2221_raw_event(struct hid_device *hdev,
859: struct hid_report *report, u8 *data, int size)
860: {
861: u8 *buf;
862: struct mcp2221 *mcp = hid_get_drvdata(hdev);
863:
864: switch (data[0]) {
865:
866: case MCP2221_I2C_WR_DATA:
867: case MCP2221_I2C_WR_NO_STOP:
868: case MCP2221_I2C_RD_DATA:
869: case MCP2221_I2C_RD_RPT_START:
870: switch (data[1]) {
871: case MCP2221_SUCCESS:
872: mcp->status = 0;
873: break;
874: default:
875: mcp->status = mcp_get_i2c_eng_state(mcp, data, 2);
876: }
877: complete(&mcp->wait_in_report);
878: break;
879:
880: case MCP2221_I2C_PARAM_OR_STATUS:
881: switch (data[1]) {
882: case MCP2221_SUCCESS:
883: if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
884: (data[3] != MCP2221_I2C_SET_SPEED)) {
885: mcp->status = -EAGAIN;
886: break;
887: }
888: if (data[20] & MCP2221_I2C_MASK_ADDR_NACK) {
889: mcp->status = -ENXIO;
890: break;
891: }
892: mcp->status = mcp_get_i2c_eng_state(mcp, data, 8);
893: #if IS_REACHABLE(CONFIG_IIO)
894: memcpy(&mcp->adc_values, &data[50], sizeof(mcp->adc_values));
895: #endif
896: break;
897: default:
898: mcp->status = -EIO;
899: }
900: complete(&mcp->wait_in_report);
901: break;
902:
903: case MCP2221_I2C_GET_DATA:
904: switch (data[1]) {
905: case MCP2221_SUCCESS:
906: if (data[2] == MCP2221_I2C_ADDR_NACK) {
907: mcp->status = -ENXIO;
908: break;
909: }
910: if (!mcp_get_i2c_eng_state(mcp, data, 2)
911: && (data[3] == 0)) {
912: mcp->status = 0;
913: break;
914: }
915: if (data[3] == 127) {
916: mcp->status = -EIO;
917: break;
918: }
919: if (data[2] == MCP2221_I2C_READ_COMPL ||
920: data[2] == MCP2221_I2C_READ_PARTIAL) {
921: if (!mcp->rxbuf || mcp->rxbuf_idx < 0 || data[3] > 60) {
922: mcp->status = -EINVAL;
923: break;
924: }
925: if (mcp->rxbuf_idx + data[3] > mcp->rxbuf_size) {
926: mcp->status = -EINVAL;
927: break;
928: }
929: buf = mcp->rxbuf;
930: memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
931: mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
932: mcp->status = 0;
933: break;
934: }
935: mcp->status = -EIO;
936: break;
937: default:
938: mcp->status = -EIO;
939: }
940: complete(&mcp->wait_in_report);
941: break;
942:
943: case MCP2221_GPIO_GET:
944: switch (data[1]) {
945: case MCP2221_SUCCESS:
946: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
947: (data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
948: mcp->status = -ENOENT;
949: } else {
950: mcp->status = !!data[mcp->gp_idx];
951: mcp->gpio_dir = data[mcp->gp_idx + 1];
952: }
953: break;
954: default:
955: mcp->status = -EAGAIN;
956: }
957: complete(&mcp->wait_in_report);
958: break;
959:
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
965: mcp->status = -ENOENT;
966: } else {
967: mcp->status = 0;
968: }
969: break;
970: default:
971: mcp->status = -EAGAIN;
972: }
973: complete(&mcp->wait_in_report);
974: break;
975:
976: case MCP2221_SET_SRAM_SETTINGS:
977: switch (data[1]) {
978: case MCP2221_SUCCESS:
979: mcp->status = 0;
980: break;
981: default:
982: mcp->status = -EAGAIN;
983: }
984: complete(&mcp->wait_in_report);
985: break;
986:
987: case MCP2221_GET_SRAM_SETTINGS:
988: switch (data[1]) {
989: case MCP2221_SUCCESS:
990: memcpy(&mcp->mode, &data[22], 4);
991: #if IS_REACHABLE(CONFIG_IIO)
992: mcp->dac_value = data[6] & GENMASK(4, 0);
993: #endif
994: mcp->status = 0;
995: break;
996: default:
997: mcp->status = -EAGAIN;
998: }
999: complete(&mcp->wait_in_report);
1000: break;
1001:
1002: case MCP2221_READ_FLASH_DATA:
1003: switch (data[1]) {
1004: case MCP2221_SUCCESS:
1005: mcp->status = 0;
1006:
1007: /* Only handles CHIP SETTINGS subpage currently */
1008: if (mcp->txbuf[1] != 0) {
1009: mcp->status = -EIO;
1010: break;
1011: }
1012:
1013: #if IS_REACHABLE(CONFIG_IIO)
1014: {
1015: u8 tmp;
1016: /* DAC scale value */
1017: tmp = FIELD_GET(GENMASK(7, 6), data[6]);
1018: if ((data[6] & BIT(5)) && tmp)
1019: mcp->dac_scale = tmp + 4;
1020: else
1021: mcp->dac_scale = 5;
1022:
1023: /* ADC scale value */
1024: tmp = FIELD_GET(GENMASK(4, 3), data[7]);
1025: if ((data[7] & BIT(2)) && tmp)
1026: mcp->adc_scale = tmp - 1;
1027: else
1028: mcp->adc_scale = 0;
1029: }
1030: #endif
1031:
1032: break;
1033: default:
1034: mcp->status = -EAGAIN;
1035: }
1036: complete(&mcp->wait_in_report);
1037: break;
1038:
1039: default:
1040: mcp->status = -EIO;
1041: complete(&mcp->wait_in_report);
1042: }
1043:
1044: return 1;
1045: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 99/4 | 2026/05/19 10:42 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 13037 output: 21 thoughts: 173 Thoughts: **Analyzing the MCP2221 Raw Event Handler** Okay, so I'm looking at this `mcp2221_raw_event` function, and the first thing that jumps out at me is that it doesn't seem to validate the `size` parameter at all. It just blindly accepts whatever data is thrown at it. Now, I know the report size for the MCP2221 is typically 64 bytes. That's the expected size. Since this is an HID raw event callback, I need to understand what happens with smaller reports. If `size` is less than 64, what should we do? Should we return a value that signifies whether it handled it, or not? My initial instinct is that if the size is too small, a return of 0 or 1 is likely appropriate - but I need to make sure I understand what those return values mean. A return of 0 generally signifies that the event wasn't handled, and returning a 1 would mean it was handled, right? In this case, if the size is wrong, we probably want to *not* handle it. To be sure, I should check how other HID drivers handle this scenario. Seeing how they deal with this should provide some clarity on the best approach here. |
| 100/4 | 2026/05/19 10:42 | tool | codesearch-find-references |
0mError:requested entity does not exist Args: map[Name:raw_event] Results: map[References:<nil> TruncatedOutput:false] |
| 101/4 | 2026/05/19 10:42 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 13523 output: 25 thoughts: 17 Thoughts: Here's my take on the thought process, as if I were the one thinking it: **Digging into the `hid_driver` Structure** Okay, let me just double-check that... wait a minute! Is that right? I think I've got it, yes! `raw_event`... it's actually a *field* within the `struct hid_driver`. That's a crucial piece of information. This changes the way I need to approach this analysis. It means... right, it means I need to look at how this struct is actually used within the broader HID driver framework. Knowing it's embedded within `hid_driver` will influence how I trace its origin, how it's initialized, and how it is ultimately handled. This is significant because... |
| 102/4 | 2026/05/19 10:42 | tool | codesearch-find-references |
0mArgs:map[Name:hid_driver::raw_event] Results: map[References:[map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__hid_input_report SourceFile:drivers/hid/hid-core.c SourceLine:2160] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__hid_input_report SourceFile:drivers/hid/hid-core.c SourceLine:2161] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:hid_connect SourceFile:drivers/hid/hid-core.c SourceLine:2324]] TruncatedOutput:false] |
| 103/4 | 2026/05/19 10:42 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 13907 output: 44 thoughts: 24 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into `hid-core.c`** Okay, time to investigate how HID input reports are handled at the core level. I need to refresh my memory on the data flow. My immediate focus is `__hid_input_report` within `drivers/hid/hid-core.c`. This function is fundamental to the entire HID subsystem's operation, acting as the nexus for interpreting the incoming data from a HID device and making it available to the rest of the kernel. I'm especially interested in how it deals with different report types, how it validates the data (or doesn't!), and how it ultimately translates these raw reports into usable input events. I want to see how it interacts with the report descriptors and whether there are potential weaknesses in the decoding/parsing stages that could lead to vulnerabilities. I'm also curious about its performance characteristics under heavy load from multiple HID devices. Time to dig in! |
| 104/4 | 2026/05/19 10:42 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-core.c IncludeLines:true Name:__hid_input_report] Results: map[SourceCode:2109: static int __hid_input_report(struct hid_device *hid, enum hid_report_type type,
2110: u8 *data, size_t bufsize, u32 size, int interrupt, u64 source,
2111: bool from_bpf, bool lock_already_taken)
2112: {
2113: struct hid_report_enum *report_enum;
2114: struct hid_driver *hdrv;
2115: struct hid_report *report;
2116: int ret = 0;
2117:
2118: if (!hid)
2119: return -ENODEV;
2120:
2121: ret = down_trylock(&hid->driver_input_lock);
2122: if (lock_already_taken && !ret) {
2123: up(&hid->driver_input_lock);
2124: return -EINVAL;
2125: } else if (!lock_already_taken && ret) {
2126: return -EBUSY;
2127: }
2128:
2129: if (!hid->driver) {
2130: ret = -ENODEV;
2131: goto unlock;
2132: }
2133: report_enum = hid->report_enum + type;
2134: hdrv = hid->driver;
2135:
2136: data = dispatch_hid_bpf_device_event(hid, type, data, &bufsize, &size, interrupt,
2137: source, from_bpf);
2138: if (IS_ERR(data)) {
2139: ret = PTR_ERR(data);
2140: goto unlock;
2141: }
2142:
2143: if (!size) {
2144: dbg_hid("empty report\n");
2145: ret = -1;
2146: goto unlock;
2147: }
2148:
2149: /* Avoid unnecessary overhead if debugfs is disabled */
2150: if (!list_empty(&hid->debug_list))
2151: hid_dump_report(hid, type, data, size);
2152:
2153: report = hid_get_report(report_enum, data);
2154:
2155: if (!report) {
2156: ret = -1;
2157: goto unlock;
2158: }
2159:
2160: if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
2161: ret = hdrv->raw_event(hid, report, data, size);
2162: if (ret < 0)
2163: goto unlock;
2164: }
2165:
2166: ret = hid_report_raw_event(hid, type, data, bufsize, size, interrupt);
2167:
2168: unlock:
2169: if (!lock_already_taken)
2170: up(&hid->driver_input_lock);
2171: return ret;
2172: }
SourceFile:drivers/hid/hid-core.c] |
| 105/4 | 2026/05/19 10:42 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 15111 output: 51 thoughts: 418 Thoughts: **Analyzing the HID Event Processing Flow** Okay, so I'm diving into this HID event processing logic. My immediate concern is how the return values from `hdrv->raw_event` are handled. It seems that if it returns a negative value, it's supposed to halt the processing and proceed to unlock something. A return of 0 means continue. A return of anything greater than 0 also continues, right? But then the code moves to `hid_report_raw_event`. Let's clarify. If `ret < 0` goes to unlock, but if `mcp2221_raw_event` returns 1, does that also continue? Now, the `mcp2221_raw_event` function itself is a bit confusing. The comment in the code says it handles input reports from the MCP2221, which are responses to previously sent commands. Okay, so far so good. It parses firmware-specific return codes and either returns 0 or a negative error code. But then, at the very end of the function, it returns 1. That's where I get lost. The comment implies that the function returns an error code, yet it returns 1. If it returns 1, the event is handled, and shouldn't be passed on to generic HID input processing, right? Okay, so if `mcp2221_raw_event` returns 1, then `ret` becomes 1, and the program flow does continue to `hid_report_raw_event`. So, if the return is positive, it means it continues, not that the events handled and we skip this. Also, what happens if the report size is too small? What's the expected behavior there? Should it return 0? We need to look at what size the function is expecting. The MCP2221 report size is supposed to be 64 bytes. I should check `mcp2221_probe` or a similar function to see how the report size is actually configured. |
| 106/4 | 2026/05/19 10:43 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp2221_probe] Results: map[SourceCode:1237: static int mcp2221_probe(struct hid_device *hdev,
1238: const struct hid_device_id *id)
1239: {
1240: int ret;
1241: struct mcp2221 *mcp;
1242:
1243: mcp = devm_kzalloc(&hdev->dev, sizeof(*mcp), GFP_KERNEL);
1244: if (!mcp)
1245: return -ENOMEM;
1246:
1247: ret = hid_parse(hdev);
1248: if (ret) {
1249: hid_err(hdev, "can't parse reports\n");
1250: return ret;
1251: }
1252:
1253: /*
1254: * This driver uses the .raw_event callback and therefore does not need any
1255: * HID_CONNECT_xxx flags.
1256: */
1257: ret = hid_hw_start(hdev, 0);
1258: if (ret) {
1259: hid_err(hdev, "can't start hardware\n");
1260: return ret;
1261: }
1262:
1263: hid_info(hdev, "USB HID v%x.%02x Device [%s] on %s\n", hdev->version >> 8,
1264: hdev->version & 0xff, hdev->name, hdev->phys);
1265:
1266: ret = hid_hw_open(hdev);
1267: if (ret) {
1268: hid_err(hdev, "can't open device\n");
1269: hid_hw_stop(hdev);
1270: return ret;
1271: }
1272:
1273: mutex_init(&mcp->lock);
1274: init_completion(&mcp->wait_in_report);
1275: hid_set_drvdata(hdev, mcp);
1276: mcp->hdev = hdev;
1277:
1278: ret = devm_add_action_or_reset(&hdev->dev, mcp2221_hid_unregister, hdev);
1279: if (ret)
1280: return ret;
1281:
1282: hid_device_io_start(hdev);
1283:
1284: /* Set I2C bus clock diviser */
1285: if (i2c_clk_freq > 400)
1286: i2c_clk_freq = 400;
1287: if (i2c_clk_freq < 50)
1288: i2c_clk_freq = 50;
1289: mcp->cur_i2c_clk_div = (12000000 / (i2c_clk_freq * 1000)) - 3;
1290: ret = mcp_set_i2c_speed(mcp);
1291: if (ret) {
1292: hid_err(hdev, "can't set i2c speed: %d\n", ret);
1293: return ret;
1294: }
1295:
1296: mcp->adapter.owner = THIS_MODULE;
1297: mcp->adapter.class = I2C_CLASS_HWMON;
1298: mcp->adapter.algo = &mcp_i2c_algo;
1299: mcp->adapter.retries = 1;
1300: mcp->adapter.dev.parent = &hdev->dev;
1301: ACPI_COMPANION_SET(&mcp->adapter.dev, ACPI_COMPANION(hdev->dev.parent));
1302: snprintf(mcp->adapter.name, sizeof(mcp->adapter.name),
1303: "MCP2221 usb-i2c bridge");
1304:
1305: i2c_set_adapdata(&mcp->adapter, mcp);
1306: ret = devm_i2c_add_adapter(&hdev->dev, &mcp->adapter);
1307: if (ret) {
1308: hid_err(hdev, "can't add usb-i2c adapter: %d\n", ret);
1309: return ret;
1310: }
1311:
1312: #if IS_REACHABLE(CONFIG_GPIOLIB)
1313: /* Setup GPIO chip */
1314: mcp->gc = devm_kzalloc(&hdev->dev, sizeof(*mcp->gc), GFP_KERNEL);
1315: if (!mcp->gc)
1316: return -ENOMEM;
1317:
1318: mcp->gc->label = "mcp2221_gpio";
1319: mcp->gc->direction_input = mcp_gpio_direction_input;
1320: mcp->gc->direction_output = mcp_gpio_direction_output;
1321: mcp->gc->get_direction = mcp_gpio_get_direction;
1322: mcp->gc->set = mcp_gpio_set;
1323: mcp->gc->get = mcp_gpio_get;
1324: mcp->gc->ngpio = MCP_NGPIO;
1325: mcp->gc->base = -1;
1326: mcp->gc->can_sleep = 1;
1327: mcp->gc->parent = &hdev->dev;
1328:
1329: ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp);
1330: if (ret)
1331: return ret;
1332:
1333: mcp2221_check_gpio_pinfunc(mcp);
1334: #endif
1335:
1336: #if IS_REACHABLE(CONFIG_IIO)
1337: if (!gpio_mode_enforce) {
1338: INIT_DELAYED_WORK(&mcp->init_work, mcp_init_work);
1339: schedule_delayed_work(&mcp->init_work, msecs_to_jiffies(100));
1340: }
1341: #endif
1342:
1343: return 0;
1344: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 107/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 17877 output: 53 thoughts: 36 Thoughts: Okay, here's my interpretation of those thoughts, tailored for an expert audience: **Analyzing MCP2221 Data Transfer Constraints** Alright, the critical constraint I need to keep in mind is the 64-byte fixed report size for the MCP2221. That limitation immediately dictates how I approach the data structures and transfer protocols. I can't afford to overshoot that size; padding, fragmentation, or complex framing techniques become necessary if I need to send more. Given this context, I need to revisit my understanding and assumptions about the `mcp2221_raw_event` structure. Are there any hidden inefficiencies or potential for exceeding that 64-byte boundary that I might have overlooked during the initial design? Itโs time for a thorough review; I need to ensure that the current implementation is optimally sized and doesn't introduce any unforeseen issues down the line. I must re-examine it with this hard limit firmly in my mind. |
| 108/4 | 2026/05/19 10:43 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp2221_raw_event] Results: map[SourceCode: 849: /*
850: * MCP2221 uses interrupt endpoint for input reports. This function
851: * is called by HID layer when it receives i/p report from mcp2221,
852: * which is actually a response to the previously sent command.
853: *
854: * MCP2221A firmware specific return codes are parsed and 0 or
855: * appropriate negative error code is returned. Delayed response
856: * results in timeout error and stray reponses results in -EIO.
857: */
858: static int mcp2221_raw_event(struct hid_device *hdev,
859: struct hid_report *report, u8 *data, int size)
860: {
861: u8 *buf;
862: struct mcp2221 *mcp = hid_get_drvdata(hdev);
863:
864: switch (data[0]) {
865:
866: case MCP2221_I2C_WR_DATA:
867: case MCP2221_I2C_WR_NO_STOP:
868: case MCP2221_I2C_RD_DATA:
869: case MCP2221_I2C_RD_RPT_START:
870: switch (data[1]) {
871: case MCP2221_SUCCESS:
872: mcp->status = 0;
873: break;
874: default:
875: mcp->status = mcp_get_i2c_eng_state(mcp, data, 2);
876: }
877: complete(&mcp->wait_in_report);
878: break;
879:
880: case MCP2221_I2C_PARAM_OR_STATUS:
881: switch (data[1]) {
882: case MCP2221_SUCCESS:
883: if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
884: (data[3] != MCP2221_I2C_SET_SPEED)) {
885: mcp->status = -EAGAIN;
886: break;
887: }
888: if (data[20] & MCP2221_I2C_MASK_ADDR_NACK) {
889: mcp->status = -ENXIO;
890: break;
891: }
892: mcp->status = mcp_get_i2c_eng_state(mcp, data, 8);
893: #if IS_REACHABLE(CONFIG_IIO)
894: memcpy(&mcp->adc_values, &data[50], sizeof(mcp->adc_values));
895: #endif
896: break;
897: default:
898: mcp->status = -EIO;
899: }
900: complete(&mcp->wait_in_report);
901: break;
902:
903: case MCP2221_I2C_GET_DATA:
904: switch (data[1]) {
905: case MCP2221_SUCCESS:
906: if (data[2] == MCP2221_I2C_ADDR_NACK) {
907: mcp->status = -ENXIO;
908: break;
909: }
910: if (!mcp_get_i2c_eng_state(mcp, data, 2)
911: && (data[3] == 0)) {
912: mcp->status = 0;
913: break;
914: }
915: if (data[3] == 127) {
916: mcp->status = -EIO;
917: break;
918: }
919: if (data[2] == MCP2221_I2C_READ_COMPL ||
920: data[2] == MCP2221_I2C_READ_PARTIAL) {
921: if (!mcp->rxbuf || mcp->rxbuf_idx < 0 || data[3] > 60) {
922: mcp->status = -EINVAL;
923: break;
924: }
925: if (mcp->rxbuf_idx + data[3] > mcp->rxbuf_size) {
926: mcp->status = -EINVAL;
927: break;
928: }
929: buf = mcp->rxbuf;
930: memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
931: mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
932: mcp->status = 0;
933: break;
934: }
935: mcp->status = -EIO;
936: break;
937: default:
938: mcp->status = -EIO;
939: }
940: complete(&mcp->wait_in_report);
941: break;
942:
943: case MCP2221_GPIO_GET:
944: switch (data[1]) {
945: case MCP2221_SUCCESS:
946: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
947: (data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
948: mcp->status = -ENOENT;
949: } else {
950: mcp->status = !!data[mcp->gp_idx];
951: mcp->gpio_dir = data[mcp->gp_idx + 1];
952: }
953: break;
954: default:
955: mcp->status = -EAGAIN;
956: }
957: complete(&mcp->wait_in_report);
958: break;
959:
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
965: mcp->status = -ENOENT;
966: } else {
967: mcp->status = 0;
968: }
969: break;
970: default:
971: mcp->status = -EAGAIN;
972: }
973: complete(&mcp->wait_in_report);
974: break;
975:
976: case MCP2221_SET_SRAM_SETTINGS:
977: switch (data[1]) {
978: case MCP2221_SUCCESS:
979: mcp->status = 0;
980: break;
981: default:
982: mcp->status = -EAGAIN;
983: }
984: complete(&mcp->wait_in_report);
985: break;
986:
987: case MCP2221_GET_SRAM_SETTINGS:
988: switch (data[1]) {
989: case MCP2221_SUCCESS:
990: memcpy(&mcp->mode, &data[22], 4);
991: #if IS_REACHABLE(CONFIG_IIO)
992: mcp->dac_value = data[6] & GENMASK(4, 0);
993: #endif
994: mcp->status = 0;
995: break;
996: default:
997: mcp->status = -EAGAIN;
998: }
999: complete(&mcp->wait_in_report);
1000: break;
1001:
1002: case MCP2221_READ_FLASH_DATA:
1003: switch (data[1]) {
1004: case MCP2221_SUCCESS:
1005: mcp->status = 0;
1006:
1007: /* Only handles CHIP SETTINGS subpage currently */
1008: if (mcp->txbuf[1] != 0) {
1009: mcp->status = -EIO;
1010: break;
1011: }
1012:
1013: #if IS_REACHABLE(CONFIG_IIO)
1014: {
1015: u8 tmp;
1016: /* DAC scale value */
1017: tmp = FIELD_GET(GENMASK(7, 6), data[6]);
1018: if ((data[6] & BIT(5)) && tmp)
1019: mcp->dac_scale = tmp + 4;
1020: else
1021: mcp->dac_scale = 5;
1022:
1023: /* ADC scale value */
1024: tmp = FIELD_GET(GENMASK(4, 3), data[7]);
1025: if ((data[7] & BIT(2)) && tmp)
1026: mcp->adc_scale = tmp - 1;
1027: else
1028: mcp->adc_scale = 0;
1029: }
1030: #endif
1031:
1032: break;
1033: default:
1034: mcp->status = -EAGAIN;
1035: }
1036: complete(&mcp->wait_in_report);
1037: break;
1038:
1039: default:
1040: mcp->status = -EIO;
1041: complete(&mcp->wait_in_report);
1042: }
1043:
1044: return 1;
1045: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 109/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 21209 output: 49 thoughts: 353 Thoughts: **Analyzing the MCP2221 Raw Event Handling** Okay, so I'm thinking about how the `mcp2221_raw_event` function should work, and specifically the size check at the beginning. The initial idea was to put the size check at the very top of the function. If the size is less than 64 bytes, it should return either 1 (handled) or 0 (not handled). If it returns 1, that means the raw event is completely dealt with by this function and doesn't need to be passed on to `hid_report_raw_event`. Returning 0 would mean it *does* need further processing. However, if the size is invalid, I think we want to ignore it completely. Returning 1 would make sense, because the goal is to indicate that the function *handled* the error. Wait a secondโฆ `mcp2221_raw_event` *always* returns 1. Right, that means that if `size < 64`, we should definitely return 1. Now, what's the largest index that gets accessed within this function? I have to consider the data buffer. Looking at the `MCP2221_I2C_PARAM_OR_STATUS` case, I see a `memcpy` to `mcp->adc_values` from `data[50]`. I believe the size of `mcp->adc_values` is 6 bytes (likely three unsigned 16-bit values). So, that means the maximum index accessed is up to `data[55]`. So a size of 64 or more will be safe. So, if we put the `if (size < 64)` check at the beginning, we can ensure that we are not going to read out of bounds. ```c if (size < 64) return 1; ``` Actually, is the report size *always* exactly 64 bytes? I should double-check `mcp_send_report` to be absolutely certain. |
| 110/4 | 2026/05/19 10:43 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp_send_report] Results: map[SourceCode: 157: /* Synchronously send output report to the device */
158: static int mcp_send_report(struct mcp2221 *mcp,
159: u8 *out_report, size_t len)
160: {
161: u8 *buf;
162: int ret;
163:
164: buf = kmemdup(out_report, len, GFP_KERNEL);
165: if (!buf)
166: return -ENOMEM;
167:
168: /* mcp2221 uses interrupt endpoint for out reports */
169: ret = hid_hw_output_report(mcp->hdev, buf, len);
170: kfree(buf);
171:
172: if (ret < 0)
173: return ret;
174: return 0;
175: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 111/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 22357 output: 53 thoughts: 38 Thoughts: Okay, here's my interpretation of those thoughts, tailored for an expert audience: **Analyzing the Data Flow** Alright, hang on a second. I need to recalibrate here. The `mcp2221_raw_event` seems to be related to *input* report handling. That's not what I was initially focused on. I need to make sure I'm following the correct data flow, so I'm going to shift my focus for a moment. Instead of assuming, I need to look closely at the `mcp_send_data_req_status`. I'll cross-reference the function usage and the values of the status to ensure I'm using the proper variables and making the right logical calls. I'm sure it is this function that drives the process. |
| 112/4 | 2026/05/19 10:43 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp_send_data_req_status] Results: map[SourceCode: 177: /*
178: * Send o/p report to the device and wait for i/p report to be
179: * received from the device. If the device does not respond,
180: * we timeout.
181: */
182: static int mcp_send_data_req_status(struct mcp2221 *mcp,
183: u8 *out_report, int len)
184: {
185: int ret;
186: unsigned long t;
187:
188: reinit_completion(&mcp->wait_in_report);
189:
190: ret = mcp_send_report(mcp, out_report, len);
191: if (ret)
192: return ret;
193:
194: t = wait_for_completion_timeout(&mcp->wait_in_report,
195: msecs_to_jiffies(4000));
196: if (!t)
197: return -ETIMEDOUT;
198:
199: return mcp->status;
200: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 113/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 22991 output: 21 thoughts: 1331 Thoughts: **Analyzing the MCP2221 HID Report Handling**
Okay, so I'm looking at this MCP2221 driver, and the report size is 64 bytes. Let's dig into `mcp2221_raw_event` and `mcp2221_probe` to see how the driver handles it. Ah, `mcp2221_raw_event` seems the key here. It has a section that checks for I2C read completions. Specifically, it does a check `data[3] > 60`. That means the data length is at most 60, and starts at `data[4]`, so this confirms a report size of 64 bytes (4 + 60 = 64).
Now, the core issue is what to do with short reports, reports smaller than 64 bytes. If `size < 64`, what do we do? Returning `1` doesn't signal completion, which could leave a command waiting indefinitely. Returning `1` would also leave `mcp->status` uninitialized. A short report could be a stray message or, potentially, a malicious one. If we complete the wait, we can complete the wrong command! But ignoring it will timeout the sender.
Initially, I thought about setting `mcp->status = -EIO` and `complete(&mcp->wait_in_report)`. If it's a response to a command, this seems correct: we signal an error. Now, the `mcp2221_raw_event` is:
```c
static int mcp2221_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
if (unlikely(size < 64))
return 1;
switch (data[0]) {
```
If we return `1`, no completion is signaled. If we do the following, the short reports will be handled:
```c
if (size < 64) {
mcp->status = -EIO;
complete(&mcp->wait_in_report);
return 1;
}
```
Okay, now hold on... what if `size` is zero? `data[0]` is an out-of-bounds access. However, `__hid_input_report` has a check: `if (!size) return -1;`. Thus, `size` is at least 1. But completing a wait could complete the wrong command! However, the `mcp2221_raw_event` handles unknown `data[0]` values with:
```c
default:
mcp->status = -EIO;
complete(&mcp->wait_in_report);
}
```
So, it already *completes* the wait regardless. It's consistent to handle short reports the same way. Now, let's address the bug report. It mentions validating `mcp->gp_idx`. That index is used in `MCP2221_GPIO_GET` and `MCP2221_GPIO_SET`.
```c
case MCP2221_GPIO_GET:
switch (data[1]) {
case MCP2221_SUCCESS:
if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
(data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
mcp->status = -ENOENT;
} else {
mcp->status = !!data[mcp->gp_idx];
mcp->gpio_dir = data[mcp->gp_idx + 1];
}
break;
default:
mcp->status = -EAGAIN;
}
complete(&mcp->wait_in_report);
break;
case MCP2221_GPIO_SET:
switch (data[1]) {
case MCP2221_SUCCESS:
if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
(data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
m
|
| 114/4 | 2026/05/19 10:43 | tool | codesearch-find-references |
0mError:requested entity does not exist Args: map[Name:gp_idx] Results: map[References:<nil> TruncatedOutput:false] |
| 115/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 25389 output: 17 thoughts: 27 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Diving into the MCP2221 HID Driver** Alright, time to get my hands dirty. I need to track down the usage of `gp_idx` within the MCP2221 HID driver. The logical first step is to zero in on the source file, which I know is `drivers/hid/hid-mcp2221.c`. Now, I'm expecting `gp_idx` to likely be a crucial element in how the driver interacts with the GPIO functionality of the chip. This is probably a central variable for tracking or manipulating the general-purpose input/output pins. I anticipate it could be used for configuring the pin direction, reading or writing values, or possibly handling interrupts associated with those pins. Searching for it now. |
| 116/4 | 2026/05/19 10:43 | tool | grepper |
0mArgs:map[Expression:gp_idx] Results: map[Output:drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c=10089=static u32 gfx_v10_0_get_cu_active_bitmap_per_sh(struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c-10090-{
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:10091: u32 wgp_idx, wgp_active_bitmap;
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c-10092- u32 cu_bitmap_per_wgp, cu_active_bitmap;
--
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c-10096-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:10097: for (wgp_idx = 0; wgp_idx < 16; wgp_idx++) {
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c-10098- /* if there is one WGP enabled, it means 2 CUs will be enabled */
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:10099: cu_bitmap_per_wgp = 3 << (2 * wgp_idx);
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:10100: if (wgp_active_bitmap & (1 << wgp_idx))
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c-10101- cu_active_bitmap |= cu_bitmap_per_wgp;
--
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c=7520=static u32 gfx_v11_0_get_cu_active_bitmap_per_sh(struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c-7521-{
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:7522: u32 wgp_idx, wgp_active_bitmap;
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c-7523- u32 cu_bitmap_per_wgp, cu_active_bitmap;
--
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c-7527-
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:7528: for (wgp_idx = 0; wgp_idx < 16; wgp_idx++) {
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c-7529- /* if there is one WGP enabled, it means 2 CUs will be enabled */
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:7530: cu_bitmap_per_wgp = 3 << (2 * wgp_idx);
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:7531: if (wgp_active_bitmap & (1 << wgp_idx))
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c-7532- cu_active_bitmap |= cu_bitmap_per_wgp;
--
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c=5726=static u32 gfx_v12_0_get_cu_active_bitmap_per_sh(struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c-5727-{
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:5728: u32 wgp_idx, wgp_active_bitmap;
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c-5729- u32 cu_bitmap_per_wgp, cu_active_bitmap;
--
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c-5733-
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:5734: for (wgp_idx = 0; wgp_idx < 16; wgp_idx++) {
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c-5735- /* if there is one WGP enabled, it means 2 CUs will be enabled */
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:5736: cu_bitmap_per_wgp = 3 << (2 * wgp_idx);
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:5737: if (wgp_active_bitmap & (1 << wgp_idx))
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c-5738- cu_active_bitmap |= cu_bitmap_per_wgp;
--
drivers/hid/hid-mcp2221.c=122=struct mcp2221 {
--
drivers/hid/hid-mcp2221.c-134- struct gpio_chip *gc;
drivers/hid/hid-mcp2221.c:135: u8 gp_idx;
drivers/hid/hid-mcp2221.c-136- u8 gpio_dir;
--
drivers/hid/hid-mcp2221.c=712=static int mcp_gpio_get(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-719-
drivers/hid/hid-mcp2221.c:720: mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
drivers/hid/hid-mcp2221.c-721-
--
drivers/hid/hid-mcp2221.c=729=static int mcp_gpio_set(struct gpio_chip *gc, unsigned int offset, int value)
--
drivers/hid/hid-mcp2221.c-736-
drivers/hid/hid-mcp2221.c:737: mcp->gp_idx = offsetof(struct mcp_set_gpio, gpio[offset].value);
drivers/hid/hid-mcp2221.c-738-
drivers/hid/hid-mcp2221.c:739: mcp->txbuf[mcp->gp_idx - 1] = 1;
drivers/hid/hid-mcp2221.c:740: mcp->txbuf[mcp->gp_idx] = !!value;
drivers/hid/hid-mcp2221.c-741-
--
drivers/hid/hid-mcp2221.c=749=static int mcp_gpio_dir_set(struct mcp2221 *mcp,
--
drivers/hid/hid-mcp2221.c-754-
drivers/hid/hid-mcp2221.c:755: mcp->gp_idx = offsetof(struct mcp_set_gpio, gpio[offset].direction);
drivers/hid/hid-mcp2221.c-756-
drivers/hid/hid-mcp2221.c:757: mcp->txbuf[mcp->gp_idx - 1] = 1;
drivers/hid/hid-mcp2221.c:758: mcp->txbuf[mcp->gp_idx] = val;
drivers/hid/hid-mcp2221.c-759-
--
drivers/hid/hid-mcp2221.c=795=static int mcp_gpio_get_direction(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-802-
drivers/hid/hid-mcp2221.c:803: mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
drivers/hid/hid-mcp2221.c-804-
--
drivers/hid/hid-mcp2221.c=858=static int mcp2221_raw_event(struct hid_device *hdev,
--
drivers/hid/hid-mcp2221.c-945- case MCP2221_SUCCESS:
drivers/hid/hid-mcp2221.c:946: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
drivers/hid/hid-mcp2221.c:947: (data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
drivers/hid/hid-mcp2221.c-948- mcp->status = -ENOENT;
drivers/hid/hid-mcp2221.c-949- } else {
drivers/hid/hid-mcp2221.c:950: mcp->status = !!data[mcp->gp_idx];
drivers/hid/hid-mcp2221.c:951: mcp->gpio_dir = data[mcp->gp_idx + 1];
drivers/hid/hid-mcp2221.c-952- }
--
drivers/hid/hid-mcp2221.c-962- case MCP2221_SUCCESS:
drivers/hid/hid-mcp2221.c:963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
drivers/hid/hid-mcp2221.c:964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
drivers/hid/hid-mcp2221.c-965- mcp->status = -ENOENT;
] |
| 117/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 28298 output: 49 thoughts: 71 Thoughts: Here's my summary, as I delve into this code: **Analyzing `mcp->gp_idx` Initialization** Alright, let's break this down. It looks like the `mcp->gp_idx` field is being populated, and I see it's using `offsetof` with either `struct mcp_get_gpio` or `struct mcp_set_gpio`. My immediate thought is, "Okay, that's pretty standard, but let's make sure we understand *exactly* what's going on." I need to understand what's happening with that `gpio[offset]` within those structs, particularly how the `offsetof` is applied to either the base of the `gpio` array or specifically to the `value` member within an element of that array. Knowing those struct definitions is going to be key to confirming the intent of the index calculation. I'm going to quickly pull up the definitions of `struct mcp_get_gpio` and `struct mcp_set_gpio` to see how those offsets are being calculated in relation to the start of the structure. Knowing the structure layout will make this completely clear. |
| 118/4 | 2026/05/19 10:43 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp_get_gpio] Results: map[SourceCode: 107: /* MCP GPIO get command layout */
108: struct mcp_get_gpio {
109: u8 cmd;
110: u8 dummy;
111: struct {
112: u8 value;
113: u8 direction;
114: } gpio[MCP_NGPIO];
115: } __packed;
SourceFile:drivers/hid/hid-mcp2221.c] |
| 119/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 28806 output: 49 thoughts: 10 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and presented in the first person: **Analyzing the `struct mcp_set_gpio` Structure** Alright, so we're looking at this `struct mcp_set_gpio`. My initial thought is to immediately dissect its purpose within the broader context. Is this a local structure, or does it interact with the kernel? Judging by the name, it's likely involved in setting General Purpose Input/Output pins, or GPIOs, related to an MCP device. That suggests a hardware interaction level, potentially within an embedded systems or driver context. My immediate questions are: What members are within this structure? What specific fields are used for configuring the MCP device? Are we talking about direction, value, pull-up/pull-down configuration, or something more advanced? The details of each member are critical to understanding how the driver communicates the desired GPIO settings to the MCP hardware. I need to see if it utilizes bitfields, or if a more generic integer type is used. Are there any restrictions, such as allowable ranges, or specific bitmask values? I'm also wondering if there are any associated functions that work with this struct. How is it passed to other code, and what operations can be performed on it? Are there any data validation routines to check for valid pin numbers, values, and configurations? I'm anticipating error handling. What is the scope of this structure? Does it have to be maintained with the driver as a global/static variable? Is it part of a larger chain of structures? Ultimately, the goal is to determine the efficiency and robustness of the system architecture related to this structure. Is it properly designed for the specific needs of the MCP? Is it safe from concurrent access issues? Are there any potential performance bottlenecks? And, of course, is it properly documented? This will inform how effective it is in operation, or if it can be modified. |
| 120/4 | 2026/05/19 10:43 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp_set_gpio] Results: map[SourceCode: 95: /* MCP GPIO set command layout */
96: struct mcp_set_gpio {
97: u8 cmd;
98: u8 dummy;
99: struct {
100: u8 change_value;
101: u8 value;
102: u8 change_direction;
103: u8 direction;
104: } gpio[MCP_NGPIO];
105: } __packed;
SourceFile:drivers/hid/hid-mcp2221.c] |
| 121/4 | 2026/05/19 10:43 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 29437 output: 20 thoughts: 804 Thoughts: **Analyzing Potential Vulnerabilities in the MCP2221 Driver** Okay, let's break this down. First, I'm noting the offsets within the structures: `offsetof(struct mcp_get_gpio, gpio[0])` is 2, `offsetof(struct mcp_set_gpio, gpio[0].value)` is 3, and `offsetof(struct mcp_set_gpio, gpio[0].direction)` is 5. This means `mcp->gp_idx` should *always* be at least 2, and a value of 0 means either the device hasn't been initialized, or it's been reset. I need to look into how `mcp->gp_idx` is validated in `mcp2221_raw_event`. The first thought is to check if `mcp->gp_idx` is valid within that function. But here's a potential exploit scenario. What happens if the device sends a `MCP2221_GPIO_SET` response when we were expecting a `MCP2221_GPIO_GET` response? If the command sent was `MCP2221_GPIO_GET`, then `mcp->gp_idx` could be 2, 4, 6, or 8. If the device sends a `MCP2221_GPIO_SET` response, it's going to access `data[mcp->gp_idx - 1]`. If `mcp->gp_idx` is 2, then `data[1]` is accessed. This is the status byte โ a potential bug, as the response parser is assuming `mcp->gp_idx` was set for the correct command. The `mcp2221_raw_event` function just uses the value of `mcp->gp_idx` based on the response type. It's assuming that if `data[0]` is `MCP2221_GPIO_SET`, that `mcp->gp_idx` corresponds with a `MCP2221_GPIO_SET` command (so 3, 7, 11, or 15 for value, or 5, 9, 13, 17 for direction). And, if `data[0]` is `MCP2221_GPIO_GET`, it expects `mcp->gp_idx` to be from a `MCP2221_GPIO_GET` command (2, 4, 6, 8). This is a clear disconnect. A malicious device *could* send a response to any command. If a malicious device sent a `MCP2221_GPIO_SET` when `mcp->gp_idx` is 2, it would then access `data[1]`. Although this isn't an out-of-bounds access (because the `data` buffer is 64 bytes), it's semantically incorrect because `data[1]` contains different information. The immediate vulnerability lies in `mcp->gp_idx` being 0, which would lead to an access to `data[-1]`, and is clearly an off-by-one error. To fix this, I can start with a size check: `if (size < 64) return 1;` at the beginning of the `mcp2221_raw_event` function to make sure it will not access out-of-bounds memory. To resolve the `mcp->gp_idx` issue, I can validate if `mcp->gp_idx` is valid for the response, based on the *corresponding* command. But how do I know which command was sent? Wait a minute, the command is stored in `mcp->txbuf[0]`! So I could check if `data[0] == mcp->txbuf[0]`. I should check that `mcp->txbuf` is valid and contains the command. |
| 122/4 | 2026/05/19 10:44 | tool | codesearch-find-references |
0mError:requested entity does not exist Args: map[Name:txbuf] Results: map[References:<nil> TruncatedOutput:false] |
| 123/4 | 2026/05/19 10:44 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 31136 output: 16 thoughts: 26 Thoughts: Okay, here's my take on those thoughts, framed as a first-person expert summary: **Digging into the hid-mcp2221 Driver** Alright, time to get to work. My initial thought is to zero in on the `drivers/hid/hid-mcp2221.c` file. I'm going to jump straight in and search for `txbuf`. That's a classic starting point, isn't it? When debugging or trying to understand a driver's communication flow, the transmit buffer (`txbuf`) is often where the action starts. It's the staging area for data being sent to the MCP2221 device, so naturally, I want to see how that's handled. This search should quickly reveal the crucial parts of the driver responsible for preparing, buffering, and ultimately transmitting data to the USB device. It will give me a foothold to examine the data flow through the driver. Let's see what we find! |
| 124/4 | 2026/05/19 10:44 | tool | grepper |
0mArgs:map[Expression:txbuf] Results: map[Output:
Full output is too long, showing 500 out of 5260 lines.
Use more precise expression if possible.
[Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml=75=examples:
--
Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml-101- memory-region = <&npu_firmware>, <&npu_pkt>, <&npu_txpkt>,
Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml:102: <&npu_txbufid>, <&npu_ba>;
Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml-103- memory-region-names = "firmware", "pkt", "tx-pkt", "tx-bufid", "ba";
--
arch/mips/include/asm/octeon/cvmx-sriox-defs.h=166=union cvmx_sriox_bist_status {
--
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-185- uint64_t ospf:1;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h:186: uint64_t txbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-187- uint64_t rxbuf:2;
--
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-193- uint64_t rxbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h:194: uint64_t txbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-195- uint64_t ospf:1;
--
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-229- uint64_t ospf:1;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h:230: uint64_t txbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-231- uint64_t rxbuf:2;
--
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-237- uint64_t rxbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h:238: uint64_t txbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-239- uint64_t ospf:1;
--
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-271- uint64_t ospf:1;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h:272: uint64_t txbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-273- uint64_t rxbuf:2;
--
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-279- uint64_t rxbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h:280: uint64_t txbuf:2;
arch/mips/include/asm/octeon/cvmx-sriox-defs.h-281- uint64_t ospf:1;
--
arch/powerpc/include/asm/vas.h=158=struct vas_tx_win_attr {
--
arch/powerpc/include/asm/vas.h-163- int pswid;
arch/powerpc/include/asm/vas.h:164: int rsvd_txbuf_count;
arch/powerpc/include/asm/vas.h-165- int tc_mode;
--
arch/powerpc/include/asm/vas.h-169- bool rej_no_credit;
arch/powerpc/include/asm/vas.h:170: bool rsvd_txbuf_enable;
arch/powerpc/include/asm/vas.h-171- bool tx_wcred_mode;
--
arch/powerpc/platforms/powernv/vas-window.c=686=static void init_winctx_for_rxwin(struct pnv_vas_window *rxwin,
--
arch/powerpc/platforms/powernv/vas-window.c-698- * ->notify_early NA for NX windows
arch/powerpc/platforms/powernv/vas-window.c:699: * ->rsvd_txbuf_count NA for Rx windows
arch/powerpc/platforms/powernv/vas-window.c-700- * ->lpid, ->pid, ->tid NA for Rx windows
--
arch/powerpc/platforms/powernv/vas-window.c=910=static void init_winctx_for_txwin(struct pnv_vas_window *txwin,
--
arch/powerpc/platforms/powernv/vas-window.c-918- * ->notify_os_intr_reg In powernv, send intrs to HV
arch/powerpc/platforms/powernv/vas-window.c:919: * ->rsvd_txbuf_count Not supported yet.
arch/powerpc/platforms/powernv/vas-window.c-920- * ->notify_disable False for NX windows
--
arch/powerpc/platforms/powernv/vas-window.c-936- winctx->rej_no_credit = txattr->rej_no_credit;
arch/powerpc/platforms/powernv/vas-window.c:937: winctx->rsvd_txbuf_enable = txattr->rsvd_txbuf_enable;
arch/powerpc/platforms/powernv/vas-window.c-938-
--
arch/powerpc/platforms/powernv/vas-window.c-942- winctx->tx_word_mode = txattr->tx_win_ord_mode;
arch/powerpc/platforms/powernv/vas-window.c:943: winctx->rsvd_txbuf_count = txattr->rsvd_txbuf_count;
arch/powerpc/platforms/powernv/vas-window.c-944-
--
arch/powerpc/platforms/powernv/vas-window.c=971=static bool tx_win_args_valid(enum vas_cop_type cop,
--
arch/powerpc/platforms/powernv/vas-window.c-983- if (attr->user_win) {
arch/powerpc/platforms/powernv/vas-window.c:984: if (attr->rsvd_txbuf_count)
arch/powerpc/platforms/powernv/vas-window.c-985- return false;
--
arch/powerpc/platforms/powernv/vas-window.c=1412=static struct vas_window *vas_user_win_open(int vas_id, u64 flags,
--
arch/powerpc/platforms/powernv/vas-window.c-1421- txattr.user_win = true;
arch/powerpc/platforms/powernv/vas-window.c:1422: txattr.rsvd_txbuf_count = false;
arch/powerpc/platforms/powernv/vas-window.c-1423- txattr.pswid = false;
--
arch/powerpc/platforms/powernv/vas.h=378=struct vas_winctx {
--
arch/powerpc/platforms/powernv/vas.h-381- int wcreds_max;
arch/powerpc/platforms/powernv/vas.h:382: int rsvd_txbuf_count;
arch/powerpc/platforms/powernv/vas.h-383-
--
arch/powerpc/platforms/powernv/vas.h-386- bool fault_win;
arch/powerpc/platforms/powernv/vas.h:387: bool rsvd_txbuf_enable;
arch/powerpc/platforms/powernv/vas.h-388- bool pin_win;
--
arch/powerpc/sysdev/cpm_common.c=47=static u32 __iomem *cpm_udbg_txdesc;
arch/powerpc/sysdev/cpm_common.c:48:static u8 __iomem *cpm_udbg_txbuf;
arch/powerpc/sysdev/cpm_common.c-49-
arch/powerpc/sysdev/cpm_common.c=50=static void udbg_putc_cpm(char c)
--
arch/powerpc/sysdev/cpm_common.c-57-
arch/powerpc/sysdev/cpm_common.c:58: out_8(cpm_udbg_txbuf, c);
arch/powerpc/sysdev/cpm_common.c-59- out_be32(&cpm_udbg_txdesc[0], 0xa0000001);
--
arch/powerpc/sysdev/cpm_common.c=62=void __init udbg_init_cpm(void)
--
arch/powerpc/sysdev/cpm_common.c-69- VIRT_IMMR_BASE);
arch/powerpc/sysdev/cpm_common.c:70: cpm_udbg_txbuf = (u8 __iomem __force *)
arch/powerpc/sysdev/cpm_common.c-71- (in_be32(&cpm_udbg_txdesc[1]) - PHYS_IMMR_BASE +
--
arch/powerpc/sysdev/cpm_common.c-75- CONFIG_PPC_EARLY_DEBUG_CPM_ADDR;
arch/powerpc/sysdev/cpm_common.c:76: cpm_udbg_txbuf = (u8 __iomem __force *)in_be32(&cpm_udbg_txdesc[1]);
arch/powerpc/sysdev/cpm_common.c-77-#endif
--
arch/um/drivers/vector_kern.c=901=static int writev_tx(struct vector_private *vp, struct sk_buff *skb)
--
arch/um/drivers/vector_kern.c-905-
arch/um/drivers/vector_kern.c:906: iov[0].iov_base = vp->header_txbuffer;
arch/um/drivers/vector_kern.c-907- iov_count = prep_msg(vp, skb, (struct iovec *) &iov);
--
arch/um/drivers/vector_kern.c=1106=static int vector_net_close(struct net_device *dev)
--
arch/um/drivers/vector_kern.c-1145- kfree(vp->header_rxbuffer);
arch/um/drivers/vector_kern.c:1146: kfree(vp->header_txbuffer);
arch/um/drivers/vector_kern.c-1147- if (vp->rx_queue != NULL)
--
arch/um/drivers/vector_kern.c=1194=static int vector_net_open(struct net_device *dev)
--
arch/um/drivers/vector_kern.c-1237- } else {
arch/um/drivers/vector_kern.c:1238: vp->header_txbuffer = kmalloc(vp->header_size, GFP_KERNEL);
arch/um/drivers/vector_kern.c:1239: if (vp->header_txbuffer == NULL)
arch/um/drivers/vector_kern.c-1240- goto out_close;
--
arch/um/drivers/vector_kern.h=74=struct vector_private {
--
arch/um/drivers/vector_kern.h-111- void *header_rxbuffer;
arch/um/drivers/vector_kern.h:112: void *header_txbuffer;
arch/um/drivers/vector_kern.h-113-
--
drivers/firmware/arm_ffa/driver.c=677=ffa_setup_and_transmit(u32 func_id, void *buffer, u32 max_fragsize,
--
drivers/firmware/arm_ffa/driver.c-722-
drivers/firmware/arm_ffa/driver.c:723: if (!args->use_txbuf) {
drivers/firmware/arm_ffa/driver.c-724- addr = virt_to_phys(buffer);
--
drivers/firmware/arm_ffa/driver.c=760=static int ffa_memory_ops(u32 func_id, struct ffa_mem_ops_args *args)
--
drivers/firmware/arm_ffa/driver.c-765-
drivers/firmware/arm_ffa/driver.c:766: if (!args->use_txbuf) {
drivers/firmware/arm_ffa/driver.c-767- buffer = alloc_pages_exact(rxtx_bufsz, GFP_KERNEL);
--
drivers/firmware/arm_ffa/driver.c-776-
drivers/firmware/arm_ffa/driver.c:777: if (args->use_txbuf)
drivers/firmware/arm_ffa/driver.c-778- mutex_unlock(&drv_info->tx_lock);
--
drivers/fpga/microchip-spi.c=229=static int mpf_spi_write_then_read(struct mpf_priv *priv,
drivers/fpga/microchip-spi.c:230: const void *txbuf, size_t txbuf_size,
drivers/fpga/microchip-spi.c-231- void *rxbuf, size_t rxbuf_size)
--
drivers/fpga/microchip-spi.c-235-
drivers/fpga/microchip-spi.c:236: ret = mpf_spi_write(priv, txbuf, txbuf_size);
drivers/fpga/microchip-spi.c-237- if (ret)
--
drivers/gpu/drm/i915/display/intel_dp_aux.c=460=static void
drivers/gpu/drm/i915/display/intel_dp_aux.c:461:intel_dp_aux_header(u8 txbuf[HEADER_SIZE],
drivers/gpu/drm/i915/display/intel_dp_aux.c-462- const struct drm_dp_aux_msg *msg)
drivers/gpu/drm/i915/display/intel_dp_aux.c-463-{
drivers/gpu/drm/i915/display/intel_dp_aux.c:464: txbuf[0] = (msg->request << 4) | ((msg->address >> 16) & 0xf);
drivers/gpu/drm/i915/display/intel_dp_aux.c:465: txbuf[1] = (msg->address >> 8) & 0xff;
drivers/gpu/drm/i915/display/intel_dp_aux.c:466: txbuf[2] = msg->address & 0xff;
drivers/gpu/drm/i915/display/intel_dp_aux.c:467: txbuf[3] = msg->size - 1;
drivers/gpu/drm/i915/display/intel_dp_aux.c-468-}
--
drivers/gpu/drm/i915/display/intel_dp_aux.c=485=intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
--
drivers/gpu/drm/i915/display/intel_dp_aux.c-488- struct intel_display *display = to_intel_display(intel_dp);
drivers/gpu/drm/i915/display/intel_dp_aux.c:489: u8 txbuf[20], rxbuf[20];
drivers/gpu/drm/i915/display/intel_dp_aux.c-490- size_t txsize, rxsize;
--
drivers/gpu/drm/i915/display/intel_dp_aux.c-493-
drivers/gpu/drm/i915/display/intel_dp_aux.c:494: intel_dp_aux_header(txbuf, msg);
drivers/gpu/drm/i915/display/intel_dp_aux.c-495-
--
drivers/gpu/drm/i915/display/intel_dp_aux.c-508- if (msg->buffer)
drivers/gpu/drm/i915/display/intel_dp_aux.c:509: memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);
drivers/gpu/drm/i915/display/intel_dp_aux.c-510-
drivers/gpu/drm/i915/display/intel_dp_aux.c:511: ret = intel_dp_aux_xfer(intel_dp, txbuf, txsize,
drivers/gpu/drm/i915/display/intel_dp_aux.c-512- rxbuf, rxsize, flags);
--
drivers/gpu/drm/i915/display/intel_dp_aux.c-533-
drivers/gpu/drm/i915/display/intel_dp_aux.c:534: ret = intel_dp_aux_xfer(intel_dp, txbuf, txsize,
drivers/gpu/drm/i915/display/intel_dp_aux.c-535- rxbuf, rxsize, flags);
--
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c=811=static void
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c:812:nv10_gr_load_dma_vtxbuf(struct nv10_gr_chan *chan, int chid, u32 inst)
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c-813-{
--
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c=883=nv10_gr_load_context(struct nv10_gr_chan *chan, int chid)
--
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c-900- inst = nvkm_rd32(device, NV10_PGRAPH_GLOBALSTATE1) & 0xffff;
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c:901: nv10_gr_load_dma_vtxbuf(chan, chid, inst);
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c-902-
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h=22=struct r535_gr {
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h-32- bool ro;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h:33: } ctxbuf[R515_GR_MAX_CTXBUFS];
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h:34: int ctxbuf_nr;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h-35-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h:36: struct nvkm_memory *ctxbuf_mem[R515_GR_MAX_CTXBUFS];
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h-37-
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h-46- struct nvkm_vma *vma[R515_GR_MAX_CTXBUFS];
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h:47: } ctxbuf;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h-48- bool enabled;
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h=52=struct NV2080_CTRL_INTERNAL_ENGINE_CONTEXT_BUFFER_INFO;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h:53:void r535_gr_get_ctxbuf_info(struct r535_gr *, int i,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.h-54- struct NV2080_CTRL_INTERNAL_ENGINE_CONTEXT_BUFFER_INFO *);
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c=40=r535_gr_chan_dtor(struct nvkm_object *object)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-44-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:45: for (int i = 0; i < gr->ctxbuf_nr; i++) {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-46- nvkm_vmm_put(grc->vmm, &grc->vma[i]);
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c=60=r535_gr_promote_ctx(struct r535_gr *gr, bool golden, struct nvkm_vmm *vmm,
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-76-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:77: for (int i = 0; i < gr->ctxbuf_nr; i++) {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-78- NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ENTRY *entry =
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-79- &ctrl->promoteEntry[ctrl->entryCount];
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:80: const bool alloc = golden || !gr->ctxbuf[i].global;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-81- int ret;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-82-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:83: entry->bufferId = gr->ctxbuf[i].bufferId;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:84: entry->bInitialize = gr->ctxbuf[i].init && alloc;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-85-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-86- if (alloc) {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:87: ret = nvkm_memory_new(device, gr->ctxbuf[i].init ?
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-88- NVKM_MEM_TARGET_INST : NVKM_MEM_TARGET_INST_SR_LOST,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:89: gr->ctxbuf[i].size, 1 << gr->ctxbuf[i].page,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:90: gr->ctxbuf[i].init, &pmem[i]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-91- if (WARN_ON(ret))
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-93-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:94: if (gr->ctxbuf[i].bufferId ==
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-95- NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ID_PRIV_ACCESS_MAP)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-97- } else {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:98: if (gr->ctxbuf[i].bufferId ==
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-99- NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ID_UNRESTRICTED_PRIV_ACCESS_MAP)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-101-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:102: pmem[i] = nvkm_memory_ref(gr->ctxbuf_mem[i]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-103- }
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-107- .priv = 1,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:108: .ro = gr->ctxbuf[i].ro,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-109- };
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-111- mutex_lock(&vmm->mutex.vmm);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:112: ret = nvkm_vmm_get_locked(vmm, false, true, false, 0, gr->ctxbuf[i].align,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-113- nvkm_memory_size(pmem[i]), &pvma[i]);
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-126- entry->gpuPhysAddr = nvkm_memory_addr(pmem[i]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:127: entry->size = gr->ctxbuf[i].size;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-128- entry->physAttr = 4;
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c=174=void
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:175:r535_gr_get_ctxbuf_info(struct r535_gr *gr, int i,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-176- struct NV2080_CTRL_INTERNAL_ENGINE_CONTEXT_BUFFER_INFO *info)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-227-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:228: if (WARN_ON(gr->ctxbuf_nr == ARRAY_SIZE(gr->ctxbuf)))
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-229- return;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-230-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:231: gr->ctxbuf[gr->ctxbuf_nr].bufferId = map[id].id1;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:232: gr->ctxbuf[gr->ctxbuf_nr].size = size;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:233: gr->ctxbuf[gr->ctxbuf_nr].page = page;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:234: gr->ctxbuf[gr->ctxbuf_nr].align = align;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:235: gr->ctxbuf[gr->ctxbuf_nr].global = map[id].global;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:236: gr->ctxbuf[gr->ctxbuf_nr].init = map[id].init;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:237: gr->ctxbuf[gr->ctxbuf_nr].ro = map[id].ro;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:238: gr->ctxbuf_nr++;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-239-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-240- if (map[id].id1 == NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ID_PRIV_ACCESS_MAP) {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:241: if (WARN_ON(gr->ctxbuf_nr == ARRAY_SIZE(gr->ctxbuf)))
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-242- return;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-243-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:244: gr->ctxbuf[gr->ctxbuf_nr] = gr->ctxbuf[gr->ctxbuf_nr - 1];
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:245: gr->ctxbuf[gr->ctxbuf_nr].bufferId =
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-246- NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ID_UNRESTRICTED_PRIV_ACCESS_MAP;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:247: gr->ctxbuf_nr++;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-248- }
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c=251=static int
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:252:r535_gr_get_ctxbufs_and_zcull_info(struct r535_gr *gr)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-253-{
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-264- for (int i = 0; i < ARRAY_SIZE(info->engineContextBuffersInfo[0].engine); i++)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:265: r535_gr_get_ctxbuf_info(gr, i, &info->engineContextBuffersInfo[0].engine[i]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-266-
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c=275=r535_gr_oneinit(struct nvkm_gr *base)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-317- */
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:318: ret = rm->api->gr->get_ctxbufs_and_zcull_info(gr);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-319- if (ret)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-322- /* Promote golden context to RM. */
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:323: ret = r535_gr_promote_ctx(gr, true, golden.vmm, gr->ctxbuf_mem, golden.vma, &golden.chan);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-324- if (ret)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-335- nvkm_gsp_rm_free(&golden.chan);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:336: for (int i = gr->ctxbuf_nr - 1; i >= 0; i--)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-337- nvkm_vmm_put(golden.vmm, &golden.vma[i]);
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c=345=r535_gr_dtor(struct nvkm_gr *base)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-348-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:349: while (gr->ctxbuf_nr)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:350: nvkm_memory_unref(&gr->ctxbuf_mem[--gr->ctxbuf_nr]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-351-
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c=357=r535_gr = {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c:358: .get_ctxbufs_and_zcull_info = r535_gr_get_ctxbufs_and_zcull_info,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c-359-};
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c=71=r570_gr_scrubber_fini(struct r535_gr *gr)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-82-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:83: for (int i = 0; i < gr->ctxbuf_nr; i++) {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:84: nvkm_vmm_put(gr->scrubber.vmm, &gr->scrubber.ctxbuf.vma[i]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:85: nvkm_memory_unref(&gr->scrubber.ctxbuf.mem[i]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-86- }
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c=93=r570_gr_scrubber_init(struct r535_gr *gr)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-141-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:142: ret = r535_gr_promote_ctx(gr, false, gr->scrubber.vmm, gr->scrubber.ctxbuf.mem,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:143: gr->scrubber.ctxbuf.vma, &gr->scrubber.chan);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-144- if (ret)
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c=166=static int
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:167:r570_gr_get_ctxbufs_and_zcull_info(struct r535_gr *gr)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-168-{
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-180- for (int i = 0; i < ARRAY_SIZE(info->engineContextBuffersInfo[0].engine); i++)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:181: r535_gr_get_ctxbuf_info(gr, i, &info->engineContextBuffersInfo[0].engine[i]);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-182-
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c=217=r570_gr = {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c:218: .get_ctxbufs_and_zcull_info = r570_gr_get_ctxbufs_and_zcull_info,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gr.c-219- .scrubber.init = r570_gr_scrubber_init,
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h=33=struct nvkm_rm_api {
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h-126- const struct nvkm_rm_api_gr {
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h:127: int (*get_ctxbufs_and_zcull_info)(struct r535_gr *);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h-128- struct {
--
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h=169=int r535_gr_promote_ctx(struct r535_gr *, bool golden, struct nvkm_vmm *,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h:170: struct nvkm_memory **pctxbuf_mem, struct nvkm_vma **pctxbuf_vma,
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h-171- struct nvkm_gsp_object *chan);
--
drivers/gpu/drm/panel/panel-sitronix-st7789v.c=145=static int st7789v_spi_write(struct st7789v *ctx, enum st7789v_prefix prefix,
--
drivers/gpu/drm/panel/panel-sitronix-st7789v.c-148- struct spi_transfer xfer = { };
drivers/gpu/drm/panel/panel-sitronix-st7789v.c:149: u16 txbuf = ((prefix & 1) << 8) | data;
drivers/gpu/drm/panel/panel-sitronix-st7789v.c-150-
drivers/gpu/drm/panel/panel-sitronix-st7789v.c:151: xfer.tx_buf = &txbuf;
drivers/gpu/drm/panel/panel-sitronix-st7789v.c:152: xfer.len = sizeof(txbuf);
drivers/gpu/drm/panel/panel-sitronix-st7789v.c-153-
--
drivers/gpu/drm/panel/panel-sitronix-st7789v.c=167=static int st7789v_read_data(struct st7789v *ctx, u8 cmd, u8 *buf,
--
drivers/gpu/drm/panel/panel-sitronix-st7789v.c-171- struct spi_message msg;
drivers/gpu/drm/panel/panel-sitronix-st7789v.c:172: u16 txbuf = ((ST7789V_COMMAND & 1) << 8) | cmd;
drivers/gpu/drm/panel/panel-sitronix-st7789v.c-173- u16 rxbuf[4] = {};
--
drivers/gpu/drm/panel/panel-sitronix-st7789v.c-187-
drivers/gpu/drm/panel/panel-sitronix-st7789v.c:188: xfer[0].tx_buf = &txbuf;
drivers/gpu/drm/panel/panel-sitronix-st7789v.c:189: xfer[0].len = sizeof(txbuf);
drivers/gpu/drm/panel/panel-sitronix-st7789v.c-190- spi_message_add_tail(&xfer[0], &msg);
--
drivers/gpu/drm/tiny/repaper.c=103=static int repaper_spi_transfer(struct spi_device *spi, u8 header,
--
drivers/gpu/drm/tiny/repaper.c-105-{
drivers/gpu/drm/tiny/repaper.c:106: void *txbuf = NULL, *rxbuf = NULL;
drivers/gpu/drm/tiny/repaper.c-107- struct spi_transfer tr[2] = {};
--
drivers/gpu/drm/tiny/repaper.c-120- if (tx && len <= 32) {
drivers/gpu/drm/tiny/repaper.c:121: txbuf = kmemdup(tx, len, GFP_KERNEL);
drivers/gpu/drm/tiny/repaper.c:122: if (!txbuf) {
drivers/gpu/drm/tiny/repaper.c-123- ret = -ENOMEM;
--
drivers/gpu/drm/tiny/repaper.c-135-
drivers/gpu/drm/tiny/repaper.c:136: tr[1].tx_buf = txbuf ? txbuf : tx;
drivers/gpu/drm/tiny/repaper.c-137- tr[1].rx_buf = rxbuf;
--
drivers/gpu/drm/tiny/repaper.c-146- kfree(headerbuf);
drivers/gpu/drm/tiny/repaper.c:147: kfree(txbuf);
drivers/gpu/drm/tiny/repaper.c-148- kfree(rxbuf);
--
drivers/hid/hid-mcp2221.c=122=struct mcp2221 {
--
drivers/hid/hid-mcp2221.c-128- u8 *rxbuf;
drivers/hid/hid-mcp2221.c:129: u8 txbuf[64];
drivers/hid/hid-mcp2221.c-130- int rxbuf_idx;
--
drivers/hid/hid-mcp2221.c=203=static int mcp_chk_last_cmd_status(struct mcp2221 *mcp)
drivers/hid/hid-mcp2221.c-204-{
drivers/hid/hid-mcp2221.c:205: memset(mcp->txbuf, 0, 8);
drivers/hid/hid-mcp2221.c:206: mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
drivers/hid/hid-mcp2221.c-207-
drivers/hid/hid-mcp2221.c:208: return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
drivers/hid/hid-mcp2221.c-209-}
--
drivers/hid/hid-mcp2221.c=212=static int mcp_cancel_last_cmd(struct mcp2221 *mcp)
drivers/hid/hid-mcp2221.c-213-{
drivers/hid/hid-mcp2221.c:214: memset(mcp->txbuf, 0, 8);
drivers/hid/hid-mcp2221.c:215: mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
drivers/hid/hid-mcp2221.c:216: mcp->txbuf[2] = MCP2221_I2C_CANCEL;
drivers/hid/hid-mcp2221.c-217-
drivers/hid/hid-mcp2221.c:218: return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
drivers/hid/hid-mcp2221.c-219-}
--
drivers/hid/hid-mcp2221.c=240=static int mcp_set_i2c_speed(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-243-
drivers/hid/hid-mcp2221.c:244: memset(mcp->txbuf, 0, 8);
drivers/hid/hid-mcp2221.c:245: mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
drivers/hid/hid-mcp2221.c:246: mcp->txbuf[3] = MCP2221_I2C_SET_SPEED;
drivers/hid/hid-mcp2221.c:247: mcp->txbuf[4] = mcp->cur_i2c_clk_div;
drivers/hid/hid-mcp2221.c-248-
drivers/hid/hid-mcp2221.c:249: ret = mcp_send_data_req_status(mcp, mcp->txbuf, 8);
drivers/hid/hid-mcp2221.c-250- if (ret) {
--
drivers/hid/hid-mcp2221.c=267=static int mcp_i2c_write(struct mcp2221 *mcp,
--
drivers/hid/hid-mcp2221.c-276- do {
drivers/hid/hid-mcp2221.c:277: mcp->txbuf[0] = type;
drivers/hid/hid-mcp2221.c:278: mcp->txbuf[1] = msg->len & 0xff;
drivers/hid/hid-mcp2221.c:279: mcp->txbuf[2] = msg->len >> 8;
drivers/hid/hid-mcp2221.c:280: mcp->txbuf[3] = (u8)(msg->addr << 1);
drivers/hid/hid-mcp2221.c-281-
drivers/hid/hid-mcp2221.c:282: memcpy(&mcp->txbuf[4], &msg->buf[idx], len);
drivers/hid/hid-mcp2221.c-283-
drivers/hid/hid-mcp2221.c:284: ret = mcp_send_data_req_status(mcp, mcp->txbuf, len + 4);
drivers/hid/hid-mcp2221.c-285- if (ret)
--
drivers/hid/hid-mcp2221.c=319=static int mcp_i2c_smbus_read(struct mcp2221 *mcp,
--
drivers/hid/hid-mcp2221.c-326-
drivers/hid/hid-mcp2221.c:327: mcp->txbuf[0] = type;
drivers/hid/hid-mcp2221.c-328- if (msg) {
drivers/hid/hid-mcp2221.c:329: mcp->txbuf[1] = msg->len & 0xff;
drivers/hid/hid-mcp2221.c:330: mcp->txbuf[2] = msg->len >> 8;
drivers/hid/hid-mcp2221.c:331: mcp->txbuf[3] = (u8)(msg->addr << 1);
drivers/hid/hid-mcp2221.c-332- total_len = msg->len;
--
drivers/hid/hid-mcp2221.c-335- } else {
drivers/hid/hid-mcp2221.c:336: mcp->txbuf[1] = smbus_len;
drivers/hid/hid-mcp2221.c:337: mcp->txbuf[2] = 0;
drivers/hid/hid-mcp2221.c:338: mcp->txbuf[3] = (u8)(smbus_addr << 1);
drivers/hid/hid-mcp2221.c-339- total_len = smbus_len;
--
drivers/hid/hid-mcp2221.c-343-
drivers/hid/hid-mcp2221.c:344: ret = mcp_send_data_req_status(mcp, mcp->txbuf, 4);
drivers/hid/hid-mcp2221.c-345- if (ret)
--
drivers/hid/hid-mcp2221.c-353-
drivers/hid/hid-mcp2221.c:354: memset(mcp->txbuf, 0, 4);
drivers/hid/hid-mcp2221.c:355: mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
drivers/hid/hid-mcp2221.c-356-
drivers/hid/hid-mcp2221.c:357: ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
drivers/hid/hid-mcp2221.c-358- if (ret) {
--
drivers/hid/hid-mcp2221.c=435=static int mcp_smbus_write(struct mcp2221 *mcp, u16 addr,
--
drivers/hid/hid-mcp2221.c-440-
drivers/hid/hid-mcp2221.c:441: mcp->txbuf[0] = type;
drivers/hid/hid-mcp2221.c:442: mcp->txbuf[1] = len + 1; /* 1 is due to command byte itself */
drivers/hid/hid-mcp2221.c:443: mcp->txbuf[2] = 0;
drivers/hid/hid-mcp2221.c:444: mcp->txbuf[3] = (u8)(addr << 1);
drivers/hid/hid-mcp2221.c:445: mcp->txbuf[4] = command;
drivers/hid/hid-mcp2221.c-446-
--
drivers/hid/hid-mcp2221.c-451- case 1:
drivers/hid/hid-mcp2221.c:452: mcp->txbuf[5] = buf[0];
drivers/hid/hid-mcp2221.c-453- data_len = 6;
--
drivers/hid/hid-mcp2221.c-455- case 2:
drivers/hid/hid-mcp2221.c:456: mcp->txbuf[5] = buf[0];
drivers/hid/hid-mcp2221.c:457: mcp->txbuf[6] = buf[1];
drivers/hid/hid-mcp2221.c-458- data_len = 7;
--
drivers/hid/hid-mcp2221.c-463-
drivers/hid/hid-mcp2221.c:464: memcpy(&mcp->txbuf[5], buf, len);
drivers/hid/hid-mcp2221.c-465- data_len = len + 5;
--
drivers/hid/hid-mcp2221.c-467-
drivers/hid/hid-mcp2221.c:468: ret = mcp_send_data_req_status(mcp, mcp->txbuf, data_len);
drivers/hid/hid-mcp2221.c-469- if (ret)
--
drivers/hid/hid-mcp2221.c=638=static int mcp_gpio_read_sram(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-641-
drivers/hid/hid-mcp2221.c:642: memset(mcp->txbuf, 0, 64);
drivers/hid/hid-mcp2221.c:643: mcp->txbuf[0] = MCP2221_GET_SRAM_SETTINGS;
]
] |
| 125/4 | 2026/05/19 10:44 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 46398 output: 19 thoughts: 2203 Thoughts: **Analyzing MCP2221 Communication and Stray Reports** Okay, so I'm thinking about how the MCP2221 driver handles communication and, specifically, how it deals with potential "stray" reports from the device. I'm focusing on the `mcp2221_raw_event` function, which processes responses from the device. I can see that `mcp->txbuf` stores the command that's sent, and it's 64 bytes in size. In both `mcp_gpio_get` and `mcp_gpio_set`, `mcp->txbuf[0]` clearly holds the sent command. My initial instinct is to simply check if `data[0]` (the response's first byte) matches `mcp->txbuf[0]` early in `mcp2221_raw_event`. If it doesn't match, it's a stray response, right? This could avoid unnecessary processing or premature completions. I am questioning if checking `data[0] != mcp->txbuf[0]` at the start of `mcp2221_raw_event` to filter out stray reports could break anything. I need to make sure this check is safe. I've examined the code for `mcp_i2c_smbus_read`, specifically how `MCP2221_I2C_RD_DATA` and `MCP2221_I2C_GET_DATA` are handled, and other similar functions for I2C and GPIO operations. The pattern seems consistent: The response generally mirrors the command byte, which is reassuring. However, I'm thinking about edge cases. What if the device sends an unsolicited report? My initial thought is the check would correctly identify and reject it. But, this leads to the next question: how does the driver handle these "stray" responses? I know the driver is using `mcp_send_data_req_status` to send a command and wait for a response, so if there's a delay, I might get a response for an old command when there's a new one. Then it hits me: If `mcp2221_raw_event` receives the wrong response and calls `complete(&mcp->wait_in_report)`, the function waiting for the current command will likely wake up prematurely, maybe with an error status or garbage data. If the driver incorrectly completes the waiting thread, the pending command's execution will be affected. The comment mentions that stray responses result in `-EIO`. But it should not trigger `complete(&mcp->wait_in_report)`. I need to ensure the stray report doesn't accidentally complete the wrong completion! It seems as though my idea, of simply checking `data[0] != mcp->txbuf[0]` to immediately return, might be correct, and that it may need to be coupled with a more robust handling of the wait completion mechanism. I'm thinking, in all cases, the response's first byte (`data[0]`) should indeed always match the command byte stored in `mcp->txbuf[0]`. Thus, testing the validity of `data[0]`, at the start of the function, seems to be a valid guard, preventing any stray reports from progressing further. If `data[0] != mcp->txbuf[0]`, I can return early without completing, and there might be no need to modify `mcp->status`. My next step is to see if the driver's mutexes guard `mcp->txbuf` appropriately to prevent any race conditions, which may cause `mcp->txbuf` to be modified concurrently with the response arrival. |
| 126/4 | 2026/05/19 10:44 | tool | codesearch-find-references |
0mArgs:map[Name:lock] Results: map[References:<nil> TruncatedOutput:false] |
| 127/4 | 2026/05/19 10:44 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 49432 output: 24 thoughts: 17 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and presented as if it were my own internal monologue: **Investigating a Concurrency Issue** Alright, I need to dig into this. I'm hitting a concurrency issue, clearly. Let's not get lost in the weeds. Given what I'm seeing, a good first step, a likely culprit, is going to be related to the locking mechanism. Before I go down a rabbit hole of debugging, let me start there. I'm going to search the codebase *directly* for usages of `mutex_lock(&mcp->lock)`. That function call, or something very similar, is almost certainly the root of the problem, so let's start there with a surgical strike. Let me get my bearings by finding *where* it's happening, before broadening the search. |
| 128/4 | 2026/05/19 10:44 | tool | grepper |
0mArgs:map[Expression:mutex_lock\(&mcp->lock\)] Results: map[Output:drivers/hid/hid-mcp2200.c=102=static int mcp_cmd_read_all(struct mcp2200 *mcp)
--
drivers/hid/hid-mcp2200.c-108-
drivers/hid/hid-mcp2200.c:109: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2200.c-110-
--
drivers/hid/hid-mcp2200.c=130=static int mcp_set_multiple(struct gpio_chip *gc, unsigned long *mask,
--
drivers/hid/hid-mcp2200.c-137-
drivers/hid/hid-mcp2200.c:138: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2200.c-139- cmd = (struct mcp_set_clear_outputs *) mcp->hid_report;
--
drivers/hid/hid-mcp2200.c=202=static int mcp_set_direction(struct gpio_chip *gc, unsigned int gpio_nr,
--
drivers/hid/hid-mcp2200.c-219-
drivers/hid/hid-mcp2200.c:220: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2200.c-221- conf = (struct mcp_configure *) mcp->hid_report;
--
drivers/hid/hid-mcp2221.c=381=static int mcp_i2c_xfer(struct i2c_adapter *adapter,
--
drivers/hid/hid-mcp2221.c-388-
drivers/hid/hid-mcp2221.c:389: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-390-
--
drivers/hid/hid-mcp2221.c=481=static int mcp_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
--
drivers/hid/hid-mcp2221.c-490-
drivers/hid/hid-mcp2221.c:491: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-492-
--
drivers/hid/hid-mcp2221.c=638=static int mcp_gpio_read_sram(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-644-
drivers/hid/hid-mcp2221.c:645: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-646- ret = mcp_send_data_req_status(mcp, mcp->txbuf, 64);
--
drivers/hid/hid-mcp2221.c=657=static int mcp2221_check_gpio_pinfunc(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-704-
drivers/hid/hid-mcp2221.c:705: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-706- ret = mcp_send_data_req_status(mcp, mcp->txbuf, 64);
--
drivers/hid/hid-mcp2221.c=712=static int mcp_gpio_get(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-721-
drivers/hid/hid-mcp2221.c:722: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-723- ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
--
drivers/hid/hid-mcp2221.c=729=static int mcp_gpio_set(struct gpio_chip *gc, unsigned int offset, int value)
--
drivers/hid/hid-mcp2221.c-741-
drivers/hid/hid-mcp2221.c:742: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-743- ret = mcp_send_data_req_status(mcp, mcp->txbuf, 18);
--
drivers/hid/hid-mcp2221.c=763=static int mcp_gpio_direction_input(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-768-
drivers/hid/hid-mcp2221.c:769: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-770- ret = mcp_gpio_dir_set(mcp, offset, MCP2221_DIR_IN);
--
drivers/hid/hid-mcp2221.c=776=static int mcp_gpio_direction_output(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-781-
drivers/hid/hid-mcp2221.c:782: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-783- ret = mcp_gpio_dir_set(mcp, offset, MCP2221_DIR_OUT);
--
drivers/hid/hid-mcp2221.c=795=static int mcp_gpio_get_direction(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-804-
drivers/hid/hid-mcp2221.c:805: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-806- ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
--
drivers/hid/hid-mcp2221.c=1068=static int mcp2221_read_raw(struct iio_dev *indio_dev,
--
drivers/hid/hid-mcp2221.c-1084-
drivers/hid/hid-mcp2221.c:1085: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-1086-
--
drivers/hid/hid-mcp2221.c=1108=static int mcp2221_write_raw(struct iio_dev *indio_dev,
--
drivers/hid/hid-mcp2221.c-1118-
drivers/hid/hid-mcp2221.c:1119: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-1120-
--
drivers/hid/hid-mcp2221.c=1176=static void mcp_init_work(struct work_struct *work)
--
drivers/hid/hid-mcp2221.c-1184- hid_hw_power(mcp->hdev, PM_HINT_FULLON);
drivers/hid/hid-mcp2221.c:1185: mutex_lock(&mcp->lock);
drivers/hid/hid-mcp2221.c-1186-
--
drivers/pinctrl/pinctrl-mcp23s08.c=199=static int mcp_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
--
drivers/pinctrl/pinctrl-mcp23s08.c-208- case PIN_CONFIG_BIAS_PULL_UP:
drivers/pinctrl/pinctrl-mcp23s08.c:209: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-210- ret = mcp_read(mcp, MCP_GPPU, &data);
--
drivers/pinctrl/pinctrl-mcp23s08.c=225=static int mcp_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
--
drivers/pinctrl/pinctrl-mcp23s08.c-239- case PIN_CONFIG_BIAS_PULL_UP:
drivers/pinctrl/pinctrl-mcp23s08.c:240: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-241- ret = mcp_set_bit(mcp, MCP_GPPU, pin, arg);
--
drivers/pinctrl/pinctrl-mcp23s08.c=261=static int mcp23s08_direction_input(struct gpio_chip *chip, unsigned offset)
--
drivers/pinctrl/pinctrl-mcp23s08.c-265-
drivers/pinctrl/pinctrl-mcp23s08.c:266: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-267- status = mcp_set_bit(mcp, MCP_IODIR, offset, true);
--
drivers/pinctrl/pinctrl-mcp23s08.c=273=static int mcp23s08_get(struct gpio_chip *chip, unsigned offset)
--
drivers/pinctrl/pinctrl-mcp23s08.c-277-
drivers/pinctrl/pinctrl-mcp23s08.c:278: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-279-
--
drivers/pinctrl/pinctrl-mcp23s08.c=293=static int mcp23s08_get_multiple(struct gpio_chip *chip,
--
drivers/pinctrl/pinctrl-mcp23s08.c-299-
drivers/pinctrl/pinctrl-mcp23s08.c:300: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-301-
--
drivers/pinctrl/pinctrl-mcp23s08.c=320=static int mcp23s08_set(struct gpio_chip *chip, unsigned int offset, int value)
--
drivers/pinctrl/pinctrl-mcp23s08.c-325-
drivers/pinctrl/pinctrl-mcp23s08.c:326: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-327- ret = __mcp23s08_set(mcp, mask, !!value);
--
drivers/pinctrl/pinctrl-mcp23s08.c=333=static int mcp23s08_set_multiple(struct gpio_chip *chip,
--
drivers/pinctrl/pinctrl-mcp23s08.c-338-
drivers/pinctrl/pinctrl-mcp23s08.c:339: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-340- ret = mcp_update_bits(mcp, MCP_OLAT, *mask, *bits);
--
drivers/pinctrl/pinctrl-mcp23s08.c=347=mcp23s08_direction_output(struct gpio_chip *chip, unsigned offset, int value)
--
drivers/pinctrl/pinctrl-mcp23s08.c-352-
drivers/pinctrl/pinctrl-mcp23s08.c:353: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-354- status = __mcp23s08_set(mcp, mask, value);
--
drivers/pinctrl/pinctrl-mcp23s08.c=363=static irqreturn_t mcp23s08_irq(int irq, void *data)
--
drivers/pinctrl/pinctrl-mcp23s08.c-372-
drivers/pinctrl/pinctrl-mcp23s08.c:373: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-374- if (mcp_read(mcp, MCP_INTF, &intf))
--
drivers/pinctrl/pinctrl-mcp23s08.c-463- if (need_unmask) {
drivers/pinctrl/pinctrl-mcp23s08.c:464: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-465- goto unlock;
--
drivers/pinctrl/pinctrl-mcp23s08.c=529=static void mcp23s08_irq_bus_lock(struct irq_data *data)
--
drivers/pinctrl/pinctrl-mcp23s08.c-533-
drivers/pinctrl/pinctrl-mcp23s08.c:534: mutex_lock(&mcp->lock);
drivers/pinctrl/pinctrl-mcp23s08.c-535- regcache_cache_only(mcp->regmap, true);
] |
| 129/4 | 2026/05/19 10:44 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 53327 output: 28 thoughts: 1354 Thoughts: **Analyzing and Refining the MCP2221 Driver's Interrupt Handling** Okay, so I'm diving into this MCP2221 driver, specifically the interrupt handling part. First, I'm confirming my understanding: `mcp->lock` is held whenever a command is sent and a response is expected. This is crucial for data integrity. For example, in `mcp_gpio_get`, the mutex protects `mcp->txbuf` while the command is sent and the driver waits for the reply. This means `mcp->txbuf` *should* be stable when `mcp2221_raw_event` is called from the HID interrupt context. Now, `mcp2221_raw_event` reads `mcp->txbuf[0]` to match it against `data[0]` from the incoming report. The question is, is this a reliable comparison? Yes, because `mcp_send_data_req_status` ensures that `mcp->txbuf[0]` contains the correct command byte while the driver is waiting for the response, thanks to the mutex and `mcp->wait_in_report`. So, `mcp2221_raw_event` can safely compare `mcp->txbuf[0]` with `data[0]`. If they don't match, it's a stray report โ that's the logic. But what about the initial state where `mcp->txbuf[0]` is 0? If an unsolicited report comes in (like `MCP2221_GPIO_SET`, which is 0x50), `data[0]` won't equal `mcp->txbuf[0]`, and the report will be correctly ignored. This is a very elegant solution to the problem of handling unsolicited reports. No problem, solved! Let's verify that `mcp2221_raw_event` is *only* supposed to process reports when a command is pending. The comment confirms this: it's for responses to previously sent commands. Stray responses should result in `-EIO` or be ignored. If we ignore them, the timeout will eventually trigger for a pending command, or nothing will happen if no command is active. Now, should we complete a command with `-EIO` if a stray response arrives while it is pending? If we did, the current pending command would fail immediately. But what if the stray response is a delayed response from a *previous* command that timed out? Completing the current command with `-EIO` would cause it to fail, *and* then the real response to the current command would be treated as a stray report! Ignoring the stray response is definitely the best approach so that the driver will properly wait for and handle the current command's response. Okay, the current code completes with `-EIO` if `data[0]` is unknown. But it also *processes* responses for known commands (e.g., `MCP2221_GPIO_SET`) even if *we* didn't send that particular command. That's wrong. I think I have a solution: ```c if (unlikely(size < 64)) return 1; if (data[0] != mcp->txbuf[0]) return 1; /* Ignore stray response */ ``` Is this safe? Well, I need to consider all the cases. What about I2C commands, like `MCP2221_I2C_WR_DATA` (0x90), `MCP2221_I2C_WR_NO_STOP` (0x94), `MCP2221_I2C_RD_DATA` (0x91), and `MCP2221_I2C_RD_RPT_START` (0x93)? In `mcp_i2c_write`, `mcp->txbuf[0]` will be set to one of those command types. And the response from the MCP2221 will echo the *same* command byte back in `data[0]`. The MCP2221 does echo the command! Okay, let's verify. In `mcp2221_raw_event`, we handle these I2C commands and make sure that, for example, if we sent `MCP2221_I2C_WR_DATA`, `mcp->txbuf[0]` will be `MCP2221_I2C_WR_DATA`, and the response will also have `data[0]` equal to it. The code holds up! Is there a chance `mcp->txbuf[0]` could change before the response? No, because |
| 130/4 | 2026/05/19 10:45 | tool | codesearch-find-references |
0mArgs:map[Name:mcp_send_data_req_status] Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp2221_check_gpio_pinfunc SourceFile:drivers/hid/hid-mcp2221.c SourceLine:706] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp2221_write_raw SourceFile:drivers/hid/hid-mcp2221.c SourceLine:1125] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_cancel_last_cmd SourceFile:drivers/hid/hid-mcp2221.c SourceLine:218] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_chk_last_cmd_status SourceFile:drivers/hid/hid-mcp2221.c SourceLine:208] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_dir_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:760] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_get SourceFile:drivers/hid/hid-mcp2221.c SourceLine:723] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_get_direction SourceFile:drivers/hid/hid-mcp2221.c SourceLine:806] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_read_sram SourceFile:drivers/hid/hid-mcp2221.c SourceLine:646] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_gpio_set SourceFile:drivers/hid/hid-mcp2221.c SourceLine:743] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_i2c_smbus_read SourceFile:drivers/hid/hid-mcp2221.c SourceLine:344] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_i2c_smbus_read SourceFile:drivers/hid/hid-mcp2221.c SourceLine:357] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_i2c_write SourceFile:drivers/hid/hid-mcp2221.c SourceLine:284] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_init_work SourceFile:drivers/hid/hid-mcp2221.c SourceLine:1188] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_init_work SourceFile:drivers/hid/hid-mcp2221.c SourceLine:1199] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_set_i2c_speed SourceFile:drivers/hid/hid-mcp2221.c SourceLine:249] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:mcp_smbus_write SourceFile:drivers/hid/hid-mcp2221.c SourceLine:468]] TruncatedOutput:false] |
| 131/4 | 2026/05/19 10:45 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 56710 output: 49 thoughts: 12 Thoughts: Okay, here's my attempt at summarizing that thought process, keeping in mind I'm speaking to a fellow expert: **Diving into `mcp_init_work`** Alright, time to dig in. Let's get right to it โ I need to take a look at the `mcp_init_work` function. That's where we'll start. It's the logical jumping-off point, and that's precisely where I'll begin. No need to waste time elsewhere when that's clearly the function to focus on. |
| 132/4 | 2026/05/19 10:45 | tool | codesearch-definition-source |
0mArgs:map[ContextFile:drivers/hid/hid-mcp2221.c IncludeLines:true Name:mcp_init_work] Results: map[SourceCode:1176: static void mcp_init_work(struct work_struct *work)
1177: {
1178: struct iio_dev *indio_dev;
1179: struct mcp2221 *mcp = container_of(work, struct mcp2221, init_work.work);
1180: struct mcp2221_iio *data;
1181: static int retries = 5;
1182: int ret, num_channels;
1183:
1184: hid_hw_power(mcp->hdev, PM_HINT_FULLON);
1185: mutex_lock(&mcp->lock);
1186:
1187: mcp->txbuf[0] = MCP2221_GET_SRAM_SETTINGS;
1188: ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
1189:
1190: if (ret == -EAGAIN)
1191: goto reschedule_task;
1192:
1193: num_channels = mcp_iio_channels(mcp);
1194: if (!num_channels)
1195: goto unlock;
1196:
1197: mcp->txbuf[0] = MCP2221_READ_FLASH_DATA;
1198: mcp->txbuf[1] = 0;
1199: ret = mcp_send_data_req_status(mcp, mcp->txbuf, 2);
1200:
1201: if (ret == -EAGAIN)
1202: goto reschedule_task;
1203:
1204: indio_dev = devm_iio_device_alloc(&mcp->hdev->dev, sizeof(*data));
1205: if (!indio_dev)
1206: goto unlock;
1207:
1208: data = iio_priv(indio_dev);
1209: data->mcp = mcp;
1210:
1211: indio_dev->name = "mcp2221";
1212: indio_dev->modes = INDIO_DIRECT_MODE;
1213: indio_dev->info = &mcp2221_info;
1214: indio_dev->channels = mcp->iio_channels;
1215: indio_dev->num_channels = num_channels;
1216:
1217: devm_iio_device_register(&mcp->hdev->dev, indio_dev);
1218:
1219: unlock:
1220: mutex_unlock(&mcp->lock);
1221: hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
1222:
1223: return;
1224:
1225: reschedule_task:
1226: mutex_unlock(&mcp->lock);
1227: hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
1228:
1229: if (!retries--)
1230: return;
1231:
1232: /* Device is not ready to read SRAM or FLASH data, try again */
1233: schedule_delayed_work(&mcp->init_work, msecs_to_jiffies(100));
1234: }
SourceFile:drivers/hid/hid-mcp2221.c] |
| 133/4 | 2026/05/19 10:45 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 57883 output: 23 thoughts: 1848 Thoughts: **Deep Dive into the MCP2221 Data Handling Logic** Okay, let's break this down systematically. My initial thought was that comparing `data[0]` with `mcp->txbuf[0]` in `mcp2221_raw_event` is safe because the command byte is always set in `mcp->txbuf[0]` before the data is sent. But I had a nagging question: What if `mcp2221_raw_event` is called *before* `mcp_send_data_req_status` actually populates `mcp->txbuf[0]`? Then, `mcp->txbuf` is zero-initialized. Zero wouldn't match, and the function would return. But, zero is not a valid command byte, which made me think this is OK. Then I wondered about `MCP2221_SUCCESS` (0). But that's used in `data[1]`, not `data[0]`. Okay, let's confirm the command bytes: `0x90`, `0x94`, `0x91`, `0x93`, `0x40`, `0x10`, `0x20`, `0x10`, `0x50`, `0x51`, `0x60`, `0x61`, `0xB0`. None of those are zero. So a zeroed `mcp->txbuf[0]` will *never* match a real command, which is safe. Next scenario: What if `mcp_send_data_req_status` sets `mcp->txbuf[0]`, sends the report, but then times out? The timed-out command is still in `mcp->txbuf[0]`. Then, an unsolicited report *with the same command byte* arrives. It would trigger the processing and call `complete`. But because the thread is no longer waiting, the completion state is just set to done, and the next `mcp_send_data_req_status` would call `reinit_completion`, clearing the stray completion. The logic is robust, so this is safe! Now, let's revisit that `mcp2221_raw_event` function again. I went over it again to check any corner cases. Is there a case where it would be called for an output or feature report? Nope. `raw_event` is only for input reports via the interrupt endpoint. Another thought: What if `data[0]` is `MCP2221_I2C_PARAM_OR_STATUS` (0x10)? In that case, `mcp2221_raw_event` checks `mcp->txbuf[3]`. But before that, we do `data[0] != mcp->txbuf[0]`. It passes the check because `mcp->txbuf[0]` would be set to 0x10 already. It's correct because the logic works as intended. To be extra careful, let me check other places that use `mcp->txbuf`. In `mcp_i2c_smbus_read`, the function sets `mcp->txbuf[0]`, then sends data, then sets `MCP2221_I2C_GET_DATA` to be sent. The approach is right. Now, `mcp->gp_idx`. If `data[0] == mcp->txbuf[0]`, then `mcp->gp_idx` *must* be valid because it's set by the same function that set `mcp->txbuf[0]`. In `mcp_gpio_set`, `mcp->gp_idx` is calculated with an offset, and thus valid. What about a timeout scenario? If `mcp_gpio_set` times out, `mcp->txbuf[0]` remains set, and a malicious device sends back a response with that same byte. `data[0]` would match, and it would access `data[mcp->gp_idx - 1]`. But since `mcp->gp_idx` is valid from the timed-out call, it's safe. What is `mcp->gp_idx` somehow 0? No way. `mcp->txbuf[0]` can only be set from `mcp_gpio_set` (or `dir`), and they will both set a valid `mcp->gp_idx`. |
| 134/4 | 2026/05/19 10:45 | tool | grepper |
0mArgs:map[Expression:mcp->txbuf\[0\] =] Results: map[Output:drivers/hid/hid-mcp2221.c=203=static int mcp_chk_last_cmd_status(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-205- memset(mcp->txbuf, 0, 8);
drivers/hid/hid-mcp2221.c:206: mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
drivers/hid/hid-mcp2221.c-207-
--
drivers/hid/hid-mcp2221.c=212=static int mcp_cancel_last_cmd(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-214- memset(mcp->txbuf, 0, 8);
drivers/hid/hid-mcp2221.c:215: mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
drivers/hid/hid-mcp2221.c-216- mcp->txbuf[2] = MCP2221_I2C_CANCEL;
--
drivers/hid/hid-mcp2221.c=240=static int mcp_set_i2c_speed(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-244- memset(mcp->txbuf, 0, 8);
drivers/hid/hid-mcp2221.c:245: mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
drivers/hid/hid-mcp2221.c-246- mcp->txbuf[3] = MCP2221_I2C_SET_SPEED;
--
drivers/hid/hid-mcp2221.c=267=static int mcp_i2c_write(struct mcp2221 *mcp,
--
drivers/hid/hid-mcp2221.c-276- do {
drivers/hid/hid-mcp2221.c:277: mcp->txbuf[0] = type;
drivers/hid/hid-mcp2221.c-278- mcp->txbuf[1] = msg->len & 0xff;
--
drivers/hid/hid-mcp2221.c=319=static int mcp_i2c_smbus_read(struct mcp2221 *mcp,
--
drivers/hid/hid-mcp2221.c-326-
drivers/hid/hid-mcp2221.c:327: mcp->txbuf[0] = type;
drivers/hid/hid-mcp2221.c-328- if (msg) {
--
drivers/hid/hid-mcp2221.c-354- memset(mcp->txbuf, 0, 4);
drivers/hid/hid-mcp2221.c:355: mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
drivers/hid/hid-mcp2221.c-356-
--
drivers/hid/hid-mcp2221.c=435=static int mcp_smbus_write(struct mcp2221 *mcp, u16 addr,
--
drivers/hid/hid-mcp2221.c-440-
drivers/hid/hid-mcp2221.c:441: mcp->txbuf[0] = type;
drivers/hid/hid-mcp2221.c-442- mcp->txbuf[1] = len + 1; /* 1 is due to command byte itself */
--
drivers/hid/hid-mcp2221.c=638=static int mcp_gpio_read_sram(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-642- memset(mcp->txbuf, 0, 64);
drivers/hid/hid-mcp2221.c:643: mcp->txbuf[0] = MCP2221_GET_SRAM_SETTINGS;
drivers/hid/hid-mcp2221.c-644-
--
drivers/hid/hid-mcp2221.c=657=static int mcp2221_check_gpio_pinfunc(struct mcp2221 *mcp)
--
drivers/hid/hid-mcp2221.c-685- memset(mcp->txbuf, 0, 64);
drivers/hid/hid-mcp2221.c:686: mcp->txbuf[0] = MCP2221_SET_SRAM_SETTINGS;
drivers/hid/hid-mcp2221.c-687-
--
drivers/hid/hid-mcp2221.c=712=static int mcp_gpio_get(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-717-
drivers/hid/hid-mcp2221.c:718: mcp->txbuf[0] = MCP2221_GPIO_GET;
drivers/hid/hid-mcp2221.c-719-
--
drivers/hid/hid-mcp2221.c=729=static int mcp_gpio_set(struct gpio_chip *gc, unsigned int offset, int value)
--
drivers/hid/hid-mcp2221.c-734- memset(mcp->txbuf, 0, 18);
drivers/hid/hid-mcp2221.c:735: mcp->txbuf[0] = MCP2221_GPIO_SET;
drivers/hid/hid-mcp2221.c-736-
--
drivers/hid/hid-mcp2221.c=749=static int mcp_gpio_dir_set(struct mcp2221 *mcp,
--
drivers/hid/hid-mcp2221.c-752- memset(mcp->txbuf, 0, 18);
drivers/hid/hid-mcp2221.c:753: mcp->txbuf[0] = MCP2221_GPIO_SET;
drivers/hid/hid-mcp2221.c-754-
--
drivers/hid/hid-mcp2221.c=795=static int mcp_gpio_get_direction(struct gpio_chip *gc,
--
drivers/hid/hid-mcp2221.c-800-
drivers/hid/hid-mcp2221.c:801: mcp->txbuf[0] = MCP2221_GPIO_GET;
drivers/hid/hid-mcp2221.c-802-
--
drivers/hid/hid-mcp2221.c=1108=static int mcp2221_write_raw(struct iio_dev *indio_dev,
--
drivers/hid/hid-mcp2221.c-1121- memset(mcp->txbuf, 0, 12);
drivers/hid/hid-mcp2221.c:1122: mcp->txbuf[0] = MCP2221_SET_SRAM_SETTINGS;
drivers/hid/hid-mcp2221.c-1123- mcp->txbuf[4] = BIT(7) | val;
--
drivers/hid/hid-mcp2221.c=1176=static void mcp_init_work(struct work_struct *work)
--
drivers/hid/hid-mcp2221.c-1186-
drivers/hid/hid-mcp2221.c:1187: mcp->txbuf[0] = MCP2221_GET_SRAM_SETTINGS;
drivers/hid/hid-mcp2221.c-1188- ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
--
drivers/hid/hid-mcp2221.c-1196-
drivers/hid/hid-mcp2221.c:1197: mcp->txbuf[0] = MCP2221_READ_FLASH_DATA;
drivers/hid/hid-mcp2221.c-1198- mcp->txbuf[1] = 0;
] |
| 135/4 | 2026/05/19 10:45 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 62990 output: 241 thoughts: 904 Thoughts: **Analyzing and Securing the MCP2221 Communication Protocol**
Okay, let's think this through. My understanding is that `mcp->txbuf[0]` is solely set by the functions responsible for transmitting commands, specifically setting it to the command byte itself. The functions `mcp_gpio_set` and `mcp_gpio_dir_set` are unique in that they set it to `MCP2221_GPIO_SET`, and they both populate `mcp->gp_idx`. Similarly, `mcp_gpio_get` and `mcp_gpio_get_direction` set it to `MCP2221_GPIO_GET`, also populating `mcp->gp_idx`. Therefore, the logic `if (data[0] == mcp->txbuf[0])` seems to correctly validate that `mcp->gp_idx` holds a meaningful value for the given command.
However, consider this edge case: `mcp_gpio_set` is invoked, setting `mcp->txbuf[0] = MCP2221_GPIO_SET` and `mcp->gp_idx = 3`. Then, a timeout occurs. Subsequently, `mcp_gpio_get` is called, setting `mcp->txbuf[0] = MCP2221_GPIO_GET` and `mcp->gp_idx = 2`. Now, a *delayed* response from the *initial* `MCP2221_GPIO_SET` command finally arrives. In this scenario, `data[0]` would be `MCP2221_GPIO_SET`, but `mcp->txbuf[0]` would be `MCP2221_GPIO_GET`. This means `data[0] != mcp->txbuf[0]`. Thus, the old response is correctly disregarded. Excellent, this is precisely what we want!
So, the proposed fix, which is:
```c
if (unlikely(size < 64))
return 1;
if (data[0] != mcp->txbuf[0])
return 1;
```
seems robust. It ensures we only process responses that match our current command, effectively rejecting stale or unsolicited data.
Now, a crucial question: are there other circumstances where `mcp2221_raw_event` might be called with `mcp->txbuf[0]` not corresponding to the expected response? What about the possibility of an error code in `data[0]`? No, that's not how the MCP2221 works. The device always echoes the command byte in `data[0]`, and the error code, if any, is located in `data[1]`. Examining `mcp2221_raw_event`:
```c
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
case MCP2221_I2C_WR_NO_STOP:
case MCP2221_I2C_RD_DATA:
case MCP2221_I2C_RD_RPT_START:
switch (data[1]) {
case MCP2221_SUCCESS:
...
```
Confirms this. `data[0]` consistently holds the command byte.
Next consideration: what happens if `mcp2221_raw_event` is called with `size < 64`? Simply returning 1 would cause it to be ignored. Is it even *possible* for a valid response to be shorter than 64 bytes? The MCP2221 HID report descriptor *specifies* a report size of 64 bytes. If the USB host receives a short packet, the `size` might indeed be less than 64. However, `mcp2221_raw_event` access up to `data[60]` (for the check `data[3] > 60` and the `memcpy`). Also, `data[50]` is accessed for ADC data. This means that a report smaller than 64 bytes would lead to out-of-bounds reads. Therefore, `size` MUST be at least 64 bytes. A shorter packet is, in all cases, an invalid report.
To be extra certain, consider the potential for malicious USB devices. It is indeed conceivable that a rogue device could send a short, malformed report to trigger issues.
Therefore, the condition `if (unlikely(size < 64)) return 1;` is not only correct but essential for preventing potential vulnerabilities related to short reports.
Let's implement this patch and safeguard the system.
|
| 136/4 | 2026/05/19 10:45 | tool | codeeditor |
0mArgs:map[CurrentCode:static int mcp2221_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
switch (data[0]) { NewCode:static int mcp2221_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
if (unlikely(size < 64))
return 1;
if (data[0] != mcp->txbuf[0])
return 1;
switch (data[0]) { SourceFile:drivers/hid/hid-mcp2221.c]Results: map[] |
| 137/4 | 2026/05/19 10:45 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 65166 output: 29 thoughts: 7 Thoughts: Okay, I'm ready to dive into that "diff" and give you my expert take. Here's my thought process: **Diving into the Code Change** Alright, a diff is in front of me, which means we're looking at a comparison between two versions of some code, config, or data. My first instinct is to zoom in on the most crucial areas of the changes โ those likely to have the biggest impact, or where I expect potential problems. I immediately start scanning for: * **Core Logic Alterations:** What fundamental algorithms or data structures have been modified? That's always my primary focus. * **Dependency Updates:** Any changes to external libraries or APIs? Those can introduce breaking changes or security vulnerabilities if not carefully vetted. * **Performance Implications:** Is the change likely to speed things up, slow things down, or introduce any new bottlenecks? I'm looking for anything that could impact throughput or latency. * **Security Concerns:** Did the change touch any areas related to authentication, authorization, or data handling? Any red flags there are going to get my immediate attention. * **Error Handling:** Are there any new error conditions, and how are they being handled? Proper error management is critical, and often an afterthought that can be improved. * **Edge Cases:** I'm mentally testing the changes against scenarios. Any potential edge cases I can see? The diff is likely to show what the developer tested, so I can use that to formulate my own tests. * **Stylistic Changes:** Does the code follow our style guide? Consistency is crucial for maintainability. Now, as I go through the diff, I'm already formulating test cases, potential follow-up questions, and likely refactor suggestions in my head. I'm going to look for any area that is not quite consistent with the standard or the project's standards. My review is going to address what the code does, and what it *should* do, as well as considering if the change is a complete solution. |
| 138/4 | 2026/05/19 10:45 | tool | patch-diff |
0mArgs:map[File:drivers/hid/hid-mcp2221.c] Results: map[Output:diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index e4ddd8e92..7f4f2110b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -849,199 +849,205 @@ static int mcp_get_i2c_eng_state(struct mcp2221 *mcp,
/*
* MCP2221 uses interrupt endpoint for input reports. This function
* is called by HID layer when it receives i/p report from mcp2221,
* which is actually a response to the previously sent command.
*
* MCP2221A firmware specific return codes are parsed and 0 or
* appropriate negative error code is returned. Delayed response
* results in timeout error and stray reponses results in -EIO.
*/
static int mcp2221_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
case MCP2221_I2C_WR_NO_STOP:
case MCP2221_I2C_RD_DATA:
case MCP2221_I2C_RD_RPT_START:
switch (data[1]) {
case MCP2221_SUCCESS:
mcp->status = 0;
break;
default:
mcp->status = mcp_get_i2c_eng_state(mcp, data, 2);
}
complete(&mcp->wait_in_report);
break;
case MCP2221_I2C_PARAM_OR_STATUS:
switch (data[1]) {
case MCP2221_SUCCESS:
if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
(data[3] != MCP2221_I2C_SET_SPEED)) {
mcp->status = -EAGAIN;
break;
}
if (data[20] & MCP2221_I2C_MASK_ADDR_NACK) {
mcp->status = -ENXIO;
break;
}
mcp->status = mcp_get_i2c_eng_state(mcp, data, 8);
#if IS_REACHABLE(CONFIG_IIO)
memcpy(&mcp->adc_values, &data[50], sizeof(mcp->adc_values));
#endif
break;
default:
mcp->status = -EIO;
}
complete(&mcp->wait_in_report);
break;
case MCP2221_I2C_GET_DATA:
switch (data[1]) {
case MCP2221_SUCCESS:
if (data[2] == MCP2221_I2C_ADDR_NACK) {
mcp->status = -ENXIO;
break;
}
if (!mcp_get_i2c_eng_state(mcp, data, 2)
&& (data[3] == 0)) {
mcp->status = 0;
break;
}
if (data[3] == 127) {
mcp->status = -EIO;
break;
}
if (data[2] == MCP2221_I2C_READ_COMPL ||
data[2] == MCP2221_I2C_READ_PARTIAL) {
if (!mcp->rxbuf || mcp->rxbuf_idx < 0 || data[3] > 60) {
mcp->status = -EINVAL;
break;
}
if (mcp->rxbuf_idx + data[3] > mcp->rxbuf_size) {
mcp->status = -EINVAL;
break;
}
buf = mcp->rxbuf;
memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
mcp->status = 0;
break;
}
mcp->status = -EIO;
break;
default:
mcp->status = -EIO;
}
complete(&mcp->wait_in_report);
break;
case MCP2221_GPIO_GET:
switch (data[1]) {
case MCP2221_SUCCESS:
if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
(data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
mcp->status = -ENOENT;
} else {
mcp->status = !!data[mcp->gp_idx];
mcp->gpio_dir = data[mcp->gp_idx + 1];
}
break;
default:
mcp->status = -EAGAIN;
}
complete(&mcp->wait_in_report);
break;
case MCP2221_GPIO_SET:
switch (data[1]) {
case MCP2221_SUCCESS:
if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
(data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
mcp->status = -ENOENT;
} else {
mcp->status = 0;
}
break;
default:
mcp->status = -EAGAIN;
}
complete(&mcp->wait_in_report);
break;
case MCP2221_SET_SRAM_SETTINGS:
switch (data[1]) {
case MCP2221_SUCCESS:
mcp->status = 0;
break;
default:
mcp->status = -EAGAIN;
}
complete(&mcp->wait_in_report);
break;
case MCP2221_GET_SRAM_SETTINGS:
switch (data[1]) {
case MCP2221_SUCCESS:
memcpy(&mcp->mode, &data[22], 4);
#if IS_REACHABLE(CONFIG_IIO)
mcp->dac_value = data[6] & GENMASK(4, 0);
#endif
mcp->status = 0;
break;
default:
mcp->status = -EAGAIN;
}
complete(&mcp->wait_in_report);
break;
case MCP2221_READ_FLASH_DATA:
switch (data[1]) {
case MCP2221_SUCCESS:
mcp->status = 0;
/* Only handles CHIP SETTINGS subpage currently */
if (mcp->txbuf[1] != 0) {
mcp->status = -EIO;
break;
}
#if IS_REACHABLE(CONFIG_IIO)
{
u8 tmp;
/* DAC scale value */
tmp = FIELD_GET(GENMASK(7, 6), data[6]);
if ((data[6] & BIT(5)) && tmp)
mcp->dac_scale = tmp + 4;
else
mcp->dac_scale = 5;
/* ADC scale value */
tmp = FIELD_GET(GENMASK(4, 3), data[7]);
if ((data[7] & BIT(2)) && tmp)
mcp->adc_scale = tmp - 1;
else
mcp->adc_scale = 0;
}
#endif
break;
default:
mcp->status = -EAGAIN;
}
complete(&mcp->wait_in_report);
break;
default:
mcp->status = -EIO;
complete(&mcp->wait_in_report);
}
return 1;
}
/* Device resource managed function for HID unregistration */
] |
| 139/4 | 2026/05/19 10:45 | llm | patch-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 68021 output: 903 thoughts: 702 Thoughts: **Analyzing the Fix for the MCP2221 Driver Vulnerability** Okay, this fix looks rock solid. The core issue, as I understand it, stems from `mcp2221_raw_event` being too trusting. It's processing incoming HID reports without validating if they're actually legitimate responses to a command we sent, and it's also not checking the report size. The crux of the vulnerability lies in that unchecked `mcp->gp_idx` access. If a rogue device, or even a corrupted report, somehow throws a `MCP2221_GPIO_SET` response at the driver *before* we've actually sent a GPIO command, `mcp->gp_idx` will be uninitialized โ likely zero. This immediately leads to an out-of-bounds read when we attempt to access `data[-1]`, and that's a serious problem, as it is a read from uninitialized memory. The proposed solution neatly addresses this. First, a simple size check: we're verifying that `size` is at least 64 bytes, which is the expected report size from the MCP2221. That's a basic sanity check, but important. Second, and more importantly, we introduce a crucial check: `data[0] == mcp->txbuf[0]`. This acts as a gatekeeper. Because `mcp->txbuf[0]` stores the command byte *only* when we send a command, and because `mcp->gp_idx` is *always* set at the same time for GPIO commands, this guarantees that the incoming report is actually a response to the command we just sent. This ensures that `mcp->gp_idx` is valid, it also ensures that it corresponds to the correct command type, and prevents any malicious report from corrupting or reading the data. I did a quick spot check to confirm the validity of `mcp->gp_idx`. I looked through all the uses of `mcp->gp_idx` and made sure that it was always initialized alongside `mcp->txbuf[0]`. No uninitialized access here. I also checked all occurrences of where `mcp->txbuf[0]` could be set to `MCP2221_GPIO_SET` or `MCP2221_GPIO_GET` and confirm that `mcp->gp_idx` is initialized in all cases. I'm confident this fix is complete and correct. It handles both the bounds check on `size` and the `mcp->gp_idx` issue effectively. Now I can move on to drafting the final response. |
| 140/3 | 2026/05/19 10:46 | action | test-patch |
39mResults:map[PatchDiff:diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index e4ddd8e92..7f4f2110b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -861,6 +861,12 @@ static int mcp2221_raw_event(struct hid_device *hdev,
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
TestError:] |
| 141/1 | 2026/05/19 11:25 | agent | fixes-finder |
13mModel:gemini-3.1-pro-preview Results: map[FixesHash:328de1c519c5c0925151cae47944a1c1a0333bcd] Instruction: You are an experienced Linux kernel developer tasked with identifying the commit that introduced the bug being fixed. Identifying the correct buggy commit is crucial for proper kernel maintenance (backporting to stable trees, etc.). Your investigation strategy: 1. Examine the patch that fixes the bug. Use git tools (like git-log or git-blame) to trace the history of the lines or functions modified by the patch. 2. Analyze the stack trace in the crash report. Identify the key files and functions involved in the crash and investigate their history to see when the problematic logic was introduced. 3. Compare the bug explanation with the commit history to find the point where the described logic error first appeared. A bug is typically introduced when a piece of code is first written, or when a refactoring changed its logic in a way that introduced the bug. Trace the history of relevant symbols or find when specific code patterns were introduced/removed. You must provide exactly one bug-introducing commit hash. If you are unable to confidently determine the bug-introducing commit after investigation, return an empty string rather than guessing. Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt:
The crash is:
==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888111fe7fff by task ktimers/0/16
CPU: 0 UID: 0 PID: 16 Comm: ktimers/0 Not tainted syzkaller #1 PREEMPT_{RT,(full)}
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x42b/0x590 drivers/hid/hid-core.c:2161
hid_irq_in+0x495/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x405/0xb10 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x18f/0x260 kernel/time/hrtimer.c:2011
handle_softirqs+0x1de/0x6d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1151
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
kmem_cache_alloc_node_noprof+0x22a/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
kernel_thread+0x13f/0x1b0 kernel/fork.c:2782
create_kthread kernel/kthread.c:459 [inline]
kthreadd+0x4ec/0x6e0 kernel/kthread.c:817
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888111fe5880
which belongs to the cache task_struct of size 7296
The buggy address is located 2815 bytes to the right of
allocated 7296-byte region [ffff888111fe5880, ffff888111fe7500)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111fe0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888116e25541
flags: 0x100000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2388, tgid 2388 (kworker/u9:11), ts 15402053339, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3467
new_slab mm/slub.c:3525 [inline]
refill_objects+0x33c/0x3d0 mm/slub.c:7271
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x373/0x720 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
kmem_cache_alloc_node_noprof+0x4f4/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
user_mode_thread+0x110/0x180 kernel/fork.c:2797
call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
worker_thread+0x8a2/0xda0 kernel/workqueue.c:3478
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
page_owner free stack trace missing
Memory state around the buggy address:
ffff888111fe7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888111fe8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
The explanation of the root cause is:
An analysis of the crash report and the source code reveals that the root cause is an **out-of-bounds read due to a negative array index** in `mcp2221_raw_event()`, combined with a lack of bounds checking on the incoming HID report size.
### Detailed Explanation
1. **Uninitialized State**:
When the `mcp2221` device is probed, its state structure is allocated using `devm_kzalloc()`, which zero-initializes all fields. The `mcp->gp_idx` field (a `u8`) is initialized to `0`. It is only updated to a valid positive offset (e.g., 3, 7, 11, or 15) when the GPIO subsystem invokes the driver's GPIO operations like `mcp_gpio_set()`.
2. **The Vulnerability**:
If the device sends an `MCP2221_GPIO_SET` (0x50) input report *before* any GPIO operations are performed (or if a malicious device/reproducer injects one), `mcp2221_raw_event()` processes the report while `mcp->gp_idx` is still `0`.
Looking at `drivers/hid/hid-mcp2221.c` around line 964:
```c
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
```
Because `mcp->gp_idx` is `0`, the expression `mcp->gp_idx - 1` promotes the `u8` to an `int`, resulting in `-1`. This causes the code to access `data[-1]`.
3. **Memory Layout and the KASAN Report**:
The `data` pointer passed to `mcp2221_raw_event()` points to the URB transfer buffer, which is allocated by the USB core via `kmalloc()` (e.g., from the `kmalloc-64` cache).
In the crashing scenario, the SLUB allocator placed this 64-byte buffer at the very beginning of a new page, exactly at address `ffff888111fe8000`.
When the code evaluates `data[-1]`, it reads the address `ffff888111fe7fff`. This address is the last byte of the *previous* physical page. As shown in the KASAN report, the previous page (`pfn:0x111fe0`) was an order-3 slab page belonging to the `task_struct` cache. The last `task_struct` object in that page ended at `ffff888111fe7500`, and the remainder of the page was SLUB padding/redzone (filled with `fc`).
KASAN intercepted the read at `ffff888111fe7fff` and correctly reported it as a slab-out-of-bounds read located 2815 bytes to the right of the `task_struct` object.
```text
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^ (data[-1] at ffff888111fe7fff)
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <-- data (urb->transfer_buffer)
```
### How to Fix
To fix this bug, `mcp2221_raw_event()` needs two corrections:
1. **Validate `mcp->gp_idx`**: Ensure that `mcp->gp_idx` is valid (e.g., `mcp->gp_idx > 0`) before using it as an array index.
2. **Bounds Checking**: The function completely lacks bounds checking on the `size` parameter. It blindly accesses `data[0]`, `data[1]`, and various other offsets (like `data[50]` in the `MCP2221_I2C_PARAM_OR_STATUS` case). It should verify that `size` is large enough for the specific report being processed before accessing the `data` array.
The patch that fixes the bug is:
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index e4ddd8e92..7f4f2110b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -861,6 +861,12 @@ static int mcp2221_raw_event(struct hid_device *hdev,
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
Search for the commit(s) that introduced this bug.
|
| 142/2 | 2026/05/19 11:25 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 7971 output: 68 thoughts: 210 Thoughts: **Pinpointing the Root Cause of the Out-of-Bounds Read** Okay, so we've got a patch that fixes an out-of-bounds read in `mcp2221_raw_event()` within the `hid-mcp2221.c` driver. My immediate goal is to locate the exact commit that introduced this bug. The patch itself is quite telling; it's added two checks: `if (unlikely(size < 64))` and `if (data[0] != mcp->txbuf[0])` at the start of `mcp2221_raw_event()`. We need to figure out *why* these checks are necessary. The accompanying explanation hits the nail on the head โ it's all about `mcp->gp_idx` being used as an index and how if this index is zero, `data[mcp->gp_idx - 1]` becomes `data[-1]`, resulting in our out-of-bounds read. It also notes the patch addresses the bounds checking on `size`. So, the core of the problem seems to be an unchecked index or a mismatch between the expected and actual size of the data. My strategy is clear: I need to dig into the history of `drivers/hid/hid-mcp2221.c` focusing on the evolution of the `mcp2221_raw_event()` function. I'll be looking for changes related to `mcp->gp_idx`, how `size` is handled, and any modifications that might have introduced a logic error leading to an invalid index. Armed with that information, I should be able to pinpoint the culprit commit and understand the genesis of this bug. |
| 143/2 | 2026/05/19 11:25 | tool | git-log |
0mArgs:map[CodeRegexp:mcp2221_raw_event Count:10 SourcePath:drivers/hid/hid-mcp2221.c SymbolName:mcp2221_raw_event] Results: map[Output:f097d246677b HID: mcp2221: fix OOB write in mcp2221_raw_event() b56cc41a3ae7 hid: fix I2C read buffer overflow in raw_event() for mcp2221 2682468671aa HID: mcp2221: Handle reads greater than 60 bytes daf405c8b9b9 HID: mcp2221: fix usage of tmp variable in mcp2221_raw_event() 960f9df7c620 HID: mcp2221: add ADC/DAC support via iio subsystem deb3b88bbb7a HID: mcp2221: switch i2c registration to devm functions 567b8e9fed8a HID: mcp2221: Fix GPIO output handling 328de1c519c5 HID: mcp2221: add GPIO functionality support 67a95c21463d HID: mcp2221: add usb to i2c-smbus host bridge ] |
| 144/2 | 2026/05/19 11:26 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 8908 output: 26 thoughts: 124 Thoughts: **Debugging the MCP2221 GPIO Issue** Okay, so this bug is definitely tied to either `MCP2221_GPIO_SET` or the `mcp->gp_idx` variable. My gut tells me it's probably related to how the GPIO functionality was initially implemented. The first thing I need to do is track down the code commit that introduced those elements into the `mcp2221_raw_event()` function. Let me see...ah, here's a likely candidate: commit `328de1c519c5`, "HID: mcp2221: add GPIO functionality support." That looks about right, given the description. Time to dig into the diff of that commit and see what changed around `mcp2221_raw_event()` and the GPIO setup. Hopefully, the issue reveals itself when I review the code. |
| 145/2 | 2026/05/19 11:26 | tool | git-show |
0mArgs:map[Commit:328de1c519c5] Results: map[Output:commit 328de1c519c5c0925151cae47944a1c1a0333bcd
Author: Rishi Gupta <gupt21@gmail.com>
Date: Tue Apr 14 22:18:14 2020 +0530
HID: mcp2221: add GPIO functionality support
MCP2221 has 4 pins that can be used as GPIO or configured
for alternate functionality such as clock generation and
IRQ detection. This patch adds support for GPIO functionality.
To set direction of a pin or to toggle its state after it
has been configured as GPIO, driver sends command to mcp2221
and parses response received from mcp2221. Based on this
response either 0 or appropriate error code is returned to
GPIO framework.
To get the direction or current state of a pin, driver
sends command and read response from the device. Based on
the response received from device direction or value
is sent to the GPIO framework.
Command from driver to mcp2221 device are output report.
Response received from mcp2221 is input report.
Datasheet (page 45-48) contains details about how to decode
the response received from device:
http://ww1.microchip.com/downloads/en/DeviceDoc/20005565B.pdf
Signed-off-by: Rishi Gupta <gupt21@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index d958475f8c81..e1b93ce32e01 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -15,6 +15,7 @@
#include <linux/hid.h>
#include <linux/hidraw.h>
#include <linux/i2c.h>
+#include <linux/gpio/driver.h>
#include "hid-ids.h"
/* Commands codes in a raw output report */
@@ -27,6 +28,8 @@ enum {
MCP2221_I2C_PARAM_OR_STATUS = 0x10,
MCP2221_I2C_SET_SPEED = 0x20,
MCP2221_I2C_CANCEL = 0x10,
+ MCP2221_GPIO_SET = 0x50,
+ MCP2221_GPIO_GET = 0x51,
};
/* Response codes in a raw input report */
@@ -42,6 +45,8 @@ enum {
MCP2221_I2C_WRADDRL_SEND = 0x21,
MCP2221_I2C_ADDR_NACK = 0x25,
MCP2221_I2C_READ_COMPL = 0x55,
+ MCP2221_ALT_F_NOT_GPIOV = 0xEE,
+ MCP2221_ALT_F_NOT_GPIOD = 0xEF,
};
/*
@@ -59,6 +64,9 @@ struct mcp2221 {
int rxbuf_idx;
int status;
u8 cur_i2c_clk_div;
+ struct gpio_chip *gc;
+ u8 gp_idx;
+ u8 gpio_dir;
};
/*
@@ -526,6 +534,110 @@ static const struct i2c_algorithm mcp_i2c_algo = {
.functionality = mcp_i2c_func,
};
+static int mcp_gpio_get(struct gpio_chip *gc,
+ unsigned int offset)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mcp->txbuf[0] = MCP2221_GPIO_GET;
+
+ mcp->gp_idx = (offset + 1) * 2;
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
+ mutex_unlock(&mcp->lock);
+
+ return ret;
+}
+
+static void mcp_gpio_set(struct gpio_chip *gc,
+ unsigned int offset, int value)
+{
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ memset(mcp->txbuf, 0, 18);
+ mcp->txbuf[0] = MCP2221_GPIO_SET;
+
+ mcp->gp_idx = ((offset + 1) * 4) - 1;
+
+ mcp->txbuf[mcp->gp_idx - 1] = 1;
+ mcp->txbuf[mcp->gp_idx] = !!value;
+
+ mutex_lock(&mcp->lock);
+ mcp_send_data_req_status(mcp, mcp->txbuf, 18);
+ mutex_unlock(&mcp->lock);
+}
+
+static int mcp_gpio_dir_set(struct mcp2221 *mcp,
+ unsigned int offset, u8 val)
+{
+ memset(mcp->txbuf, 0, 18);
+ mcp->txbuf[0] = MCP2221_GPIO_SET;
+
+ mcp->gp_idx = (offset + 1) * 5;
+
+ mcp->txbuf[mcp->gp_idx - 1] = 1;
+ mcp->txbuf[mcp->gp_idx] = val;
+
+ return mcp_send_data_req_status(mcp, mcp->txbuf, 18);
+}
+
+static int mcp_gpio_direction_input(struct gpio_chip *gc,
+ unsigned int offset)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_gpio_dir_set(mcp, offset, 0);
+ mutex_unlock(&mcp->lock);
+
+ return ret;
+}
+
+static int mcp_gpio_direction_output(struct gpio_chip *gc,
+ unsigned int offset, int value)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_gpio_dir_set(mcp, offset, 1);
+ mutex_unlock(&mcp->lock);
+
+ /* Can't configure as output, bailout early */
+ if (ret)
+ return ret;
+
+ mcp_gpio_set(gc, offset, value);
+
+ return 0;
+}
+
+static int mcp_gpio_get_direction(struct gpio_chip *gc,
+ unsigned int offset)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mcp->txbuf[0] = MCP2221_GPIO_GET;
+
+ mcp->gp_idx = (offset + 1) * 2;
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
+ mutex_unlock(&mcp->lock);
+
+ if (ret)
+ return ret;
+
+ if (mcp->gpio_dir)
+ return GPIO_LINE_DIRECTION_IN;
+
+ return GPIO_LINE_DIRECTION_OUT;
+}
+
/* Gives current state of i2c engine inside mcp2221 */
static int mcp_get_i2c_eng_state(struct mcp2221 *mcp,
u8 *data, u8 idx)
@@ -638,6 +750,39 @@ static int mcp2221_raw_event(struct hid_device *hdev,
complete(&mcp->wait_in_report);
break;
+ case MCP2221_GPIO_GET:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
+ (data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
+ mcp->status = -ENOENT;
+ } else {
+ mcp->status = !!data[mcp->gp_idx];
+ mcp->gpio_dir = !!data[mcp->gp_idx + 1];
+ }
+ break;
+ default:
+ mcp->status = -EAGAIN;
+ }
+ complete(&mcp->wait_in_report);
+ break;
+
+ case MCP2221_GPIO_SET:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
+ (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
+ mcp->status = -ENOENT;
+ } else {
+ mcp->status = 0;
+ }
+ break;
+ default:
+ mcp->status = -EAGAIN;
+ }
+ complete(&mcp->wait_in_report);
+ break;
+
default:
mcp->status = -EIO;
complete(&mcp->wait_in_report);
@@ -702,8 +847,32 @@ static int mcp2221_probe(struct hid_device *hdev,
}
i2c_set_adapdata(&mcp->adapter, mcp);
+ /* Setup GPIO chip */
+ mcp->gc = devm_kzalloc(&hdev->dev, sizeof(*mcp->gc), GFP_KERNEL);
+ if (!mcp->gc) {
+ ret = -ENOMEM;
+ goto err_gc;
+ }
+
+ mcp->gc->label = "mcp2221_gpio";
+ mcp->gc->direction_input = mcp_gpio_direction_input;
+ mcp->gc->direction_output = mcp_gpio_direction_output;
+ mcp->gc->get_direction = mcp_gpio_get_direction;
+ mcp->gc->set = mcp_gpio_set;
+ mcp->gc->get = mcp_gpio_get;
+ mcp->gc->ngpio = 4;
+ mcp->gc->base = -1;
+ mcp->gc->can_sleep = 1;
+ mcp->gc->parent = &hdev->dev;
+
+ ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp);
+ if (ret)
+ goto err_gc;
+
return 0;
+err_gc:
+ i2c_del_adapter(&mcp->adapter);
err_i2c:
hid_hw_close(mcp->hdev);
err_hstop:
] |
| 146/2 | 2026/05/19 11:26 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 12309 output: 28 thoughts: 801 Thoughts: **Analyzing the MCP2221 Driver Vulnerability** Okay, let's break this down. It looks like commit `328de1c519c5c0925151cae47944a1c1a0333bcd` is the culprit. This commit introduced `MCP2221_GPIO_SET` and `MCP2221_GPIO_GET` cases into `mcp2221_raw_event()`, along with `mcp->gp_idx`. I can see it immediately โ the code added the problematic `data[mcp->gp_idx - 1]` access within the `MCP2221_GPIO_SET` case. That's a classic out-of-bounds read waiting to happen when `mcp->gp_idx` is zero. I'm verifying there aren't any other contributing commits. So, it's an out-of-bounds read due to that negative index, and there's a lack of robust input validation in terms of HID report size. The fix, with its bounds checking for `size` and the check on `data[0] != mcp->txbuf[0]`, should prevent the crash. However, the fix applies to the whole `mcp2221_raw_event()` function, not just the `MCP2221_GPIO_SET` case, while the crash specifically happens within `MCP2221_GPIO_SET`. It's pretty clear that if the `data[0] != mcp->txbuf[0]` check had been in place initially, the problematic processing of `MCP2221_GPIO_SET` wouldn't have even been triggered. It's clear that the commit `328de1c519c5c0925151cae47944a1c1a0333bcd` introduced the `MCP2221_GPIO_SET` handler and this dangerous `mcp->gp_idx - 1` access. Before that, the `mcp2221_raw_event()` only handled I2C operations. Now, I'm just curious, was there *any* size validation before this commit? That's the missing piece. I'll need to check the code before that specific commit to see. |
| 147/2 | 2026/05/19 11:26 | tool | git-show |
0mArgs:map[Commit:328de1c519c5~1] Results: map[Output:commit c101e9bbce4ae2947b35a660f17d617fc3827595
Merge: 69c1fd97266b 4f8a21a6a933
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Wed Apr 1 15:18:42 2020 -0700
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina:
- Logitech HID++ protocol support improvement from Filipe Laรญns
- probe fix for Logitech-G* devices from Hans de Goede
- a few other small code cleanups and support for new device IDs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()'
HID: intel-ish-hid: hbm.h: Replace zero-length array with flexible-array member
HID: intel-ish-hid: ishtp-dev.h: Replace zero-length array with flexible-array member
HID: Add driver fixing Glorious PC Gaming Race mouse report descriptor
HID: lg-g15: Do not fail the probe when we fail to disable F# emulation
HID: appleir: Use devm_kzalloc() instead of kzalloc()
HID: appleir: Remove unnecessary goto label
HID: logitech-dj: add support for the static device in the Powerplay mat/receiver
HID: mcp2221: add usb to i2c-smbus host bridge
HID: logitech-dj: add debug msg when exporting a HID++ report descriptors
HID: quirks: Remove ITE 8595 entry from hid_have_special_driver
] |
| 148/2 | 2026/05/19 11:26 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 14141 output: 27 thoughts: 51 Thoughts: Here's my take on those thoughts: **Analyzing `mcp2221_raw_event()` in a New HID Driver** Alright, let's dive into this `mcp2221_raw_event()` function. The commit message indicates this is a new HID driver, which likely means we're dealing with a USB-to-I2C-SMBus host bridge, specifically the MCP2221. That's good, I need to understand this new implementation and how it's handling raw events. I want to see if this raw event handler is well-designed. I'll need to figure out how it takes USB data from the device and translates that into I2C/SMBus transactions. What are the key elements of the event handling in this function? Data parsing, error handling, command sequencing, and importantly, how this function interacts with the higher-level I2C/SMBus drivers. I'll be looking for potential bottlenecks, race conditions, or anything that seems inefficient. It's crucial for the driver to be reliable and not block other operations. Finally I have to see how this function is integrated with the other functions in the driver, it's really the heart of the bridge functionality and it's imperative that the driver is well-structured and performs correctly. |
| 149/2 | 2026/05/19 11:26 | tool | git-show |
0mArgs:map[Commit:67a95c21463d] Results: map[Output:commit 67a95c21463d066060b0f66d65a75d45bb386ffb
Author: Rishi Gupta <gupt21@gmail.com>
Date: Tue Jan 28 09:48:57 2020 +0530
HID: mcp2221: add usb to i2c-smbus host bridge
MCP2221 is a USB HID to I2C/SMbus host bridge device. This
commit implements i2c and smbus host adapter support. 7-bit
address and i2c multi-message transaction is also supported.
Signed-off-by: Rishi Gupta <gupt21@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
diff --git a/MAINTAINERS b/MAINTAINERS
index 8f27f40d22bb..352a67fe7598 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10236,6 +10236,13 @@ F: drivers/net/can/m_can/m_can.c
F: drivers/net/can/m_can/m_can.h
F: drivers/net/can/m_can/m_can_platform.c
+MCP2221A MICROCHIP USB-HID TO I2C BRIDGE DRIVER
+M: Rishi Gupta <gupt21@gmail.com>
+L: linux-i2c@vger.kernel.org
+L: linux-input@vger.kernel.org
+S: Maintained
+F: drivers/hid/hid-mcp2221.c
+
MCP4018 AND MCP4531 MICROCHIP DIGITAL POTENTIOMETER DRIVERS
M: Peter Rosin <peda@axentia.se>
L: linux-iio@vger.kernel.org
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 494a39e74939..5db6e6a709e0 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -1145,6 +1145,16 @@ config HID_ALPS
Say Y here if you have a Alps touchpads over i2c-hid or usbhid
and want support for its special functionalities.
+config HID_MCP2221
+ tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support"
+ depends on USB_HID && I2C
+ ---help---
+ Provides I2C and SMBUS host adapter functionality over USB-HID
+ through MCP2221 device.
+
+ To compile this driver as a module, choose M here: the module
+ will be called hid-mcp2221.ko.
+
endmenu
endif # HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index bfefa365b1ce..21052a78a344 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -70,6 +70,7 @@ obj-$(CONFIG_HID_LOGITECH_HIDPP) += hid-logitech-hidpp.o
obj-$(CONFIG_HID_MACALLY) += hid-macally.o
obj-$(CONFIG_HID_MAGICMOUSE) += hid-magicmouse.o
obj-$(CONFIG_HID_MALTRON) += hid-maltron.o
+obj-$(CONFIG_HID_MCP2221) += hid-mcp2221.o
obj-$(CONFIG_HID_MAYFLASH) += hid-mf.o
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 3a400ce603c4..53236ac34fcb 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -819,6 +819,7 @@
#define USB_DEVICE_ID_PICK16F1454 0x0042
#define USB_DEVICE_ID_PICK16F1454_V2 0xf2f7
#define USB_DEVICE_ID_LUXAFOR 0xf372
+#define USB_DEVICE_ID_MCP2221 0x00dd
#define USB_VENDOR_ID_MICROSOFT 0x045e
#define USB_DEVICE_ID_SIDEWINDER_GV 0x003b
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
new file mode 100644
index 000000000000..d958475f8c81
--- /dev/null
+++ b/drivers/hid/hid-mcp2221.c
@@ -0,0 +1,742 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * MCP2221A - Microchip USB to I2C Host Protocol Bridge
+ *
+ * Copyright (c) 2020, Rishi Gupta <gupt21@gmail.com>
+ *
+ * Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/20005565B.pdf
+ */
+
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/mutex.h>
+#include <linux/completion.h>
+#include <linux/delay.h>
+#include <linux/hid.h>
+#include <linux/hidraw.h>
+#include <linux/i2c.h>
+#include "hid-ids.h"
+
+/* Commands codes in a raw output report */
+enum {
+ MCP2221_I2C_WR_DATA = 0x90,
+ MCP2221_I2C_WR_NO_STOP = 0x94,
+ MCP2221_I2C_RD_DATA = 0x91,
+ MCP2221_I2C_RD_RPT_START = 0x93,
+ MCP2221_I2C_GET_DATA = 0x40,
+ MCP2221_I2C_PARAM_OR_STATUS = 0x10,
+ MCP2221_I2C_SET_SPEED = 0x20,
+ MCP2221_I2C_CANCEL = 0x10,
+};
+
+/* Response codes in a raw input report */
+enum {
+ MCP2221_SUCCESS = 0x00,
+ MCP2221_I2C_ENG_BUSY = 0x01,
+ MCP2221_I2C_START_TOUT = 0x12,
+ MCP2221_I2C_STOP_TOUT = 0x62,
+ MCP2221_I2C_WRADDRL_TOUT = 0x23,
+ MCP2221_I2C_WRDATA_TOUT = 0x44,
+ MCP2221_I2C_WRADDRL_NACK = 0x25,
+ MCP2221_I2C_MASK_ADDR_NACK = 0x40,
+ MCP2221_I2C_WRADDRL_SEND = 0x21,
+ MCP2221_I2C_ADDR_NACK = 0x25,
+ MCP2221_I2C_READ_COMPL = 0x55,
+};
+
+/*
+ * There is no way to distinguish responses. Therefore next command
+ * is sent only after response to previous has been received. Mutex
+ * lock is used for this purpose mainly.
+ */
+struct mcp2221 {
+ struct hid_device *hdev;
+ struct i2c_adapter adapter;
+ struct mutex lock;
+ struct completion wait_in_report;
+ u8 *rxbuf;
+ u8 txbuf[64];
+ int rxbuf_idx;
+ int status;
+ u8 cur_i2c_clk_div;
+};
+
+/*
+ * Default i2c bus clock frequency 400 kHz. Modify this if you
+ * want to set some other frequency (min 50 kHz - max 400 kHz).
+ */
+static uint i2c_clk_freq = 400;
+
+/* Synchronously send output report to the device */
+static int mcp_send_report(struct mcp2221 *mcp,
+ u8 *out_report, size_t len)
+{
+ u8 *buf;
+ int ret;
+
+ buf = kmemdup(out_report, len, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ /* mcp2221 uses interrupt endpoint for out reports */
+ ret = hid_hw_output_report(mcp->hdev, buf, len);
+ kfree(buf);
+
+ if (ret < 0)
+ return ret;
+ return 0;
+}
+
+/*
+ * Send o/p report to the device and wait for i/p report to be
+ * received from the device. If the device does not respond,
+ * we timeout.
+ */
+static int mcp_send_data_req_status(struct mcp2221 *mcp,
+ u8 *out_report, int len)
+{
+ int ret;
+ unsigned long t;
+
+ reinit_completion(&mcp->wait_in_report);
+
+ ret = mcp_send_report(mcp, out_report, len);
+ if (ret)
+ return ret;
+
+ t = wait_for_completion_timeout(&mcp->wait_in_report,
+ msecs_to_jiffies(4000));
+ if (!t)
+ return -ETIMEDOUT;
+
+ return mcp->status;
+}
+
+/* Check pass/fail for actual communication with i2c slave */
+static int mcp_chk_last_cmd_status(struct mcp2221 *mcp)
+{
+ memset(mcp->txbuf, 0, 8);
+ mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
+
+ return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
+}
+
+/* Cancels last command releasing i2c bus just in case occupied */
+static int mcp_cancel_last_cmd(struct mcp2221 *mcp)
+{
+ memset(mcp->txbuf, 0, 8);
+ mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
+ mcp->txbuf[2] = MCP2221_I2C_CANCEL;
+
+ return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
+}
+
+static int mcp_set_i2c_speed(struct mcp2221 *mcp)
+{
+ int ret;
+
+ memset(mcp->txbuf, 0, 8);
+ mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
+ mcp->txbuf[3] = MCP2221_I2C_SET_SPEED;
+ mcp->txbuf[4] = mcp->cur_i2c_clk_div;
+
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 8);
+ if (ret) {
+ /* Small delay is needed here */
+ usleep_range(980, 1000);
+ mcp_cancel_last_cmd(mcp);
+ }
+
+ return 0;
+}
+
+/*
+ * An output report can contain minimum 1 and maximum 60 user data
+ * bytes. If the number of data bytes is more then 60, we send it
+ * in chunks of 60 bytes. Last chunk may contain exactly 60 or less
+ * bytes. Total number of bytes is informed in very first report to
+ * mcp2221, from that point onwards it first collect all the data
+ * from host and then send to i2c slave device.
+ */
+static int mcp_i2c_write(struct mcp2221 *mcp,
+ struct i2c_msg *msg, int type, u8 last_status)
+{
+ int ret, len, idx, sent;
+
+ idx = 0;
+ sent = 0;
+ if (msg->len < 60)
+ len = msg->len;
+ else
+ len = 60;
+
+ do {
+ mcp->txbuf[0] = type;
+ mcp->txbuf[1] = msg->len & 0xff;
+ mcp->txbuf[2] = msg->len >> 8;
+ mcp->txbuf[3] = (u8)(msg->addr << 1);
+
+ memcpy(&mcp->txbuf[4], &msg->buf[idx], len);
+
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, len + 4);
+ if (ret)
+ return ret;
+
+ usleep_range(980, 1000);
+
+ if (last_status) {
+ ret = mcp_chk_last_cmd_status(mcp);
+ if (ret)
+ return ret;
+ }
+
+ sent = sent + len;
+ if (sent >= msg->len)
+ break;
+
+ idx = idx + len;
+ if ((msg->len - sent) < 60)
+ len = msg->len - sent;
+ else
+ len = 60;
+
+ /*
+ * Testing shows delay is needed between successive writes
+ * otherwise next write fails on first-try from i2c core.
+ * This value is obtained through automated stress testing.
+ */
+ usleep_range(980, 1000);
+ } while (len > 0);
+
+ return ret;
+}
+
+/*
+ * Device reads all data (0 - 65535 bytes) from i2c slave device and
+ * stores it in device itself. This data is read back from device to
+ * host in multiples of 60 bytes using input reports.
+ */
+static int mcp_i2c_smbus_read(struct mcp2221 *mcp,
+ struct i2c_msg *msg, int type, u16 smbus_addr,
+ u8 smbus_len, u8 *smbus_buf)
+{
+ int ret;
+ u16 total_len;
+
+ mcp->txbuf[0] = type;
+ if (msg) {
+ mcp->txbuf[1] = msg->len & 0xff;
+ mcp->txbuf[2] = msg->len >> 8;
+ mcp->txbuf[3] = (u8)(msg->addr << 1);
+ total_len = msg->len;
+ mcp->rxbuf = msg->buf;
+ } else {
+ mcp->txbuf[1] = smbus_len;
+ mcp->txbuf[2] = 0;
+ mcp->txbuf[3] = (u8)(smbus_addr << 1);
+ total_len = smbus_len;
+ mcp->rxbuf = smbus_buf;
+ }
+
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 4);
+ if (ret)
+ return ret;
+
+ mcp->rxbuf_idx = 0;
+
+ do {
+ memset(mcp->txbuf, 0, 4);
+ mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
+
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
+ if (ret)
+ return ret;
+
+ ret = mcp_chk_last_cmd_status(mcp);
+ if (ret)
+ return ret;
+
+ usleep_range(980, 1000);
+ } while (mcp->rxbuf_idx < total_len);
+
+ return ret;
+}
+
+static int mcp_i2c_xfer(struct i2c_adapter *adapter,
+ struct i2c_msg msgs[], int num)
+{
+ int ret;
+ struct mcp2221 *mcp = i2c_get_adapdata(adapter);
+
+ hid_hw_power(mcp->hdev, PM_HINT_FULLON);
+
+ mutex_lock(&mcp->lock);
+
+ /* Setting speed before every transaction is required for mcp2221 */
+ ret = mcp_set_i2c_speed(mcp);
+ if (ret)
+ goto exit;
+
+ if (num == 1) {
+ if (msgs->flags & I2C_M_RD) {
+ ret = mcp_i2c_smbus_read(mcp, msgs, MCP2221_I2C_RD_DATA,
+ 0, 0, NULL);
+ } else {
+ ret = mcp_i2c_write(mcp, msgs, MCP2221_I2C_WR_DATA, 1);
+ }
+ if (ret)
+ goto exit;
+ ret = num;
+ } else if (num == 2) {
+ /* Ex transaction; send reg address and read its contents */
+ if (msgs[0].addr == msgs[1].addr &&
+ !(msgs[0].flags & I2C_M_RD) &&
+ (msgs[1].flags & I2C_M_RD)) {
+
+ ret = mcp_i2c_write(mcp, &msgs[0],
+ MCP2221_I2C_WR_NO_STOP, 0);
+ if (ret)
+ goto exit;
+
+ ret = mcp_i2c_smbus_read(mcp, &msgs[1],
+ MCP2221_I2C_RD_RPT_START,
+ 0, 0, NULL);
+ if (ret)
+ goto exit;
+ ret = num;
+ } else {
+ dev_err(&adapter->dev,
+ "unsupported multi-msg i2c transaction\n");
+ ret = -EOPNOTSUPP;
+ }
+ } else {
+ dev_err(&adapter->dev,
+ "unsupported multi-msg i2c transaction\n");
+ ret = -EOPNOTSUPP;
+ }
+
+exit:
+ hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
+ mutex_unlock(&mcp->lock);
+ return ret;
+}
+
+static int mcp_smbus_write(struct mcp2221 *mcp, u16 addr,
+ u8 command, u8 *buf, u8 len, int type,
+ u8 last_status)
+{
+ int data_len, ret;
+
+ mcp->txbuf[0] = type;
+ mcp->txbuf[1] = len + 1; /* 1 is due to command byte itself */
+ mcp->txbuf[2] = 0;
+ mcp->txbuf[3] = (u8)(addr << 1);
+ mcp->txbuf[4] = command;
+
+ switch (len) {
+ case 0:
+ data_len = 5;
+ break;
+ case 1:
+ mcp->txbuf[5] = buf[0];
+ data_len = 6;
+ break;
+ case 2:
+ mcp->txbuf[5] = buf[0];
+ mcp->txbuf[6] = buf[1];
+ data_len = 7;
+ break;
+ default:
+ memcpy(&mcp->txbuf[5], buf, len);
+ data_len = len + 5;
+ }
+
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, data_len);
+ if (ret)
+ return ret;
+
+ if (last_status) {
+ usleep_range(980, 1000);
+
+ ret = mcp_chk_last_cmd_status(mcp);
+ if (ret)
+ return ret;
+ }
+
+ return ret;
+}
+
+static int mcp_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
+ unsigned short flags, char read_write,
+ u8 command, int size,
+ union i2c_smbus_data *data)
+{
+ int ret;
+ struct mcp2221 *mcp = i2c_get_adapdata(adapter);
+
+ hid_hw_power(mcp->hdev, PM_HINT_FULLON);
+
+ mutex_lock(&mcp->lock);
+
+ ret = mcp_set_i2c_speed(mcp);
+ if (ret)
+ goto exit;
+
+ switch (size) {
+
+ case I2C_SMBUS_QUICK:
+ if (read_write == I2C_SMBUS_READ)
+ ret = mcp_i2c_smbus_read(mcp, NULL, MCP2221_I2C_RD_DATA,
+ addr, 0, &data->byte);
+ else
+ ret = mcp_smbus_write(mcp, addr, command, NULL,
+ 0, MCP2221_I2C_WR_DATA, 1);
+ break;
+ case I2C_SMBUS_BYTE:
+ if (read_write == I2C_SMBUS_READ)
+ ret = mcp_i2c_smbus_read(mcp, NULL, MCP2221_I2C_RD_DATA,
+ addr, 1, &data->byte);
+ else
+ ret = mcp_smbus_write(mcp, addr, command, NULL,
+ 0, MCP2221_I2C_WR_DATA, 1);
+ break;
+ case I2C_SMBUS_BYTE_DATA:
+ if (read_write == I2C_SMBUS_READ) {
+ ret = mcp_smbus_write(mcp, addr, command, NULL,
+ 0, MCP2221_I2C_WR_NO_STOP, 0);
+ if (ret)
+ goto exit;
+
+ ret = mcp_i2c_smbus_read(mcp, NULL,
+ MCP2221_I2C_RD_RPT_START,
+ addr, 1, &data->byte);
+ } else {
+ ret = mcp_smbus_write(mcp, addr, command, &data->byte,
+ 1, MCP2221_I2C_WR_DATA, 1);
+ }
+ break;
+ case I2C_SMBUS_WORD_DATA:
+ if (read_write == I2C_SMBUS_READ) {
+ ret = mcp_smbus_write(mcp, addr, command, NULL,
+ 0, MCP2221_I2C_WR_NO_STOP, 0);
+ if (ret)
+ goto exit;
+
+ ret = mcp_i2c_smbus_read(mcp, NULL,
+ MCP2221_I2C_RD_RPT_START,
+ addr, 2, (u8 *)&data->word);
+ } else {
+ ret = mcp_smbus_write(mcp, addr, command,
+ (u8 *)&data->word, 2,
+ MCP2221_I2C_WR_DATA, 1);
+ }
+ break;
+ case I2C_SMBUS_BLOCK_DATA:
+ if (read_write == I2C_SMBUS_READ) {
+ ret = mcp_smbus_write(mcp, addr, command, NULL,
+ 0, MCP2221_I2C_WR_NO_STOP, 1);
+ if (ret)
+ goto exit;
+
+ mcp->rxbuf_idx = 0;
+ mcp->rxbuf = data->block;
+ mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
+ if (ret)
+ goto exit;
+ } else {
+ if (!data->block[0]) {
+ ret = -EINVAL;
+ goto exit;
+ }
+ ret = mcp_smbus_write(mcp, addr, command, data->block,
+ data->block[0] + 1,
+ MCP2221_I2C_WR_DATA, 1);
+ }
+ break;
+ case I2C_SMBUS_I2C_BLOCK_DATA:
+ if (read_write == I2C_SMBUS_READ) {
+ ret = mcp_smbus_write(mcp, addr, command, NULL,
+ 0, MCP2221_I2C_WR_NO_STOP, 1);
+ if (ret)
+ goto exit;
+
+ mcp->rxbuf_idx = 0;
+ mcp->rxbuf = data->block;
+ mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
+ if (ret)
+ goto exit;
+ } else {
+ if (!data->block[0]) {
+ ret = -EINVAL;
+ goto exit;
+ }
+ ret = mcp_smbus_write(mcp, addr, command,
+ &data->block[1], data->block[0],
+ MCP2221_I2C_WR_DATA, 1);
+ }
+ break;
+ case I2C_SMBUS_PROC_CALL:
+ ret = mcp_smbus_write(mcp, addr, command,
+ (u8 *)&data->word,
+ 2, MCP2221_I2C_WR_NO_STOP, 0);
+ if (ret)
+ goto exit;
+
+ ret = mcp_i2c_smbus_read(mcp, NULL,
+ MCP2221_I2C_RD_RPT_START,
+ addr, 2, (u8 *)&data->word);
+ break;
+ case I2C_SMBUS_BLOCK_PROC_CALL:
+ ret = mcp_smbus_write(mcp, addr, command, data->block,
+ data->block[0] + 1,
+ MCP2221_I2C_WR_NO_STOP, 0);
+ if (ret)
+ goto exit;
+
+ ret = mcp_i2c_smbus_read(mcp, NULL,
+ MCP2221_I2C_RD_RPT_START,
+ addr, I2C_SMBUS_BLOCK_MAX,
+ data->block);
+ break;
+ default:
+ dev_err(&mcp->adapter.dev,
+ "unsupported smbus transaction size:%d\n", size);
+ ret = -EOPNOTSUPP;
+ }
+
+exit:
+ hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
+ mutex_unlock(&mcp->lock);
+ return ret;
+}
+
+static u32 mcp_i2c_func(struct i2c_adapter *adapter)
+{
+ return I2C_FUNC_I2C |
+ I2C_FUNC_SMBUS_READ_BLOCK_DATA |
+ I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
+ (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_PEC);
+}
+
+static const struct i2c_algorithm mcp_i2c_algo = {
+ .master_xfer = mcp_i2c_xfer,
+ .smbus_xfer = mcp_smbus_xfer,
+ .functionality = mcp_i2c_func,
+};
+
+/* Gives current state of i2c engine inside mcp2221 */
+static int mcp_get_i2c_eng_state(struct mcp2221 *mcp,
+ u8 *data, u8 idx)
+{
+ int ret;
+
+ switch (data[idx]) {
+ case MCP2221_I2C_WRADDRL_NACK:
+ case MCP2221_I2C_WRADDRL_SEND:
+ ret = -ENXIO;
+ break;
+ case MCP2221_I2C_START_TOUT:
+ case MCP2221_I2C_STOP_TOUT:
+ case MCP2221_I2C_WRADDRL_TOUT:
+ case MCP2221_I2C_WRDATA_TOUT:
+ ret = -ETIMEDOUT;
+ break;
+ case MCP2221_I2C_ENG_BUSY:
+ ret = -EAGAIN;
+ break;
+ case MCP2221_SUCCESS:
+ ret = 0x00;
+ break;
+ default:
+ ret = -EIO;
+ }
+
+ return ret;
+}
+
+/*
+ * MCP2221 uses interrupt endpoint for input reports. This function
+ * is called by HID layer when it receives i/p report from mcp2221,
+ * which is actually a response to the previously sent command.
+ *
+ * MCP2221A firmware specific return codes are parsed and 0 or
+ * appropriate negative error code is returned. Delayed response
+ * results in timeout error and stray reponses results in -EIO.
+ */
+static int mcp2221_raw_event(struct hid_device *hdev,
+ struct hid_report *report, u8 *data, int size)
+{
+ u8 *buf;
+ struct mcp2221 *mcp = hid_get_drvdata(hdev);
+
+ switch (data[0]) {
+
+ case MCP2221_I2C_WR_DATA:
+ case MCP2221_I2C_WR_NO_STOP:
+ case MCP2221_I2C_RD_DATA:
+ case MCP2221_I2C_RD_RPT_START:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ mcp->status = 0;
+ break;
+ default:
+ mcp->status = mcp_get_i2c_eng_state(mcp, data, 2);
+ }
+ complete(&mcp->wait_in_report);
+ break;
+
+ case MCP2221_I2C_PARAM_OR_STATUS:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
+ (data[3] != MCP2221_I2C_SET_SPEED)) {
+ mcp->status = -EAGAIN;
+ break;
+ }
+ if (data[20] & MCP2221_I2C_MASK_ADDR_NACK) {
+ mcp->status = -ENXIO;
+ break;
+ }
+ mcp->status = mcp_get_i2c_eng_state(mcp, data, 8);
+ break;
+ default:
+ mcp->status = -EIO;
+ }
+ complete(&mcp->wait_in_report);
+ break;
+
+ case MCP2221_I2C_GET_DATA:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ if (data[2] == MCP2221_I2C_ADDR_NACK) {
+ mcp->status = -ENXIO;
+ break;
+ }
+ if (!mcp_get_i2c_eng_state(mcp, data, 2)
+ && (data[3] == 0)) {
+ mcp->status = 0;
+ break;
+ }
+ if (data[3] == 127) {
+ mcp->status = -EIO;
+ break;
+ }
+ if (data[2] == MCP2221_I2C_READ_COMPL) {
+ buf = mcp->rxbuf;
+ memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
+ mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
+ mcp->status = 0;
+ break;
+ }
+ mcp->status = -EIO;
+ break;
+ default:
+ mcp->status = -EIO;
+ }
+ complete(&mcp->wait_in_report);
+ break;
+
+ default:
+ mcp->status = -EIO;
+ complete(&mcp->wait_in_report);
+ }
+
+ return 1;
+}
+
+static int mcp2221_probe(struct hid_device *hdev,
+ const struct hid_device_id *id)
+{
+ int ret;
+ struct mcp2221 *mcp;
+
+ mcp = devm_kzalloc(&hdev->dev, sizeof(*mcp), GFP_KERNEL);
+ if (!mcp)
+ return -ENOMEM;
+
+ ret = hid_parse(hdev);
+ if (ret) {
+ hid_err(hdev, "can't parse reports\n");
+ return ret;
+ }
+
+ ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
+ if (ret) {
+ hid_err(hdev, "can't start hardware\n");
+ return ret;
+ }
+
+ ret = hid_hw_open(hdev);
+ if (ret) {
+ hid_err(hdev, "can't open device\n");
+ goto err_hstop;
+ }
+
+ mutex_init(&mcp->lock);
+ init_completion(&mcp->wait_in_report);
+ hid_set_drvdata(hdev, mcp);
+ mcp->hdev = hdev;
+
+ /* Set I2C bus clock diviser */
+ if (i2c_clk_freq > 400)
+ i2c_clk_freq = 400;
+ if (i2c_clk_freq < 50)
+ i2c_clk_freq = 50;
+ mcp->cur_i2c_clk_div = (12000000 / (i2c_clk_freq * 1000)) - 3;
+
+ mcp->adapter.owner = THIS_MODULE;
+ mcp->adapter.class = I2C_CLASS_HWMON;
+ mcp->adapter.algo = &mcp_i2c_algo;
+ mcp->adapter.retries = 1;
+ mcp->adapter.dev.parent = &hdev->dev;
+ snprintf(mcp->adapter.name, sizeof(mcp->adapter.name),
+ "MCP2221 usb-i2c bridge on hidraw%d",
+ ((struct hidraw *)hdev->hidraw)->minor);
+
+ ret = i2c_add_adapter(&mcp->adapter);
+ if (ret) {
+ hid_err(hdev, "can't add usb-i2c adapter: %d\n", ret);
+ goto err_i2c;
+ }
+ i2c_set_adapdata(&mcp->adapter, mcp);
+
+ return 0;
+
+err_i2c:
+ hid_hw_close(mcp->hdev);
+err_hstop:
+ hid_hw_stop(mcp->hdev);
+ return ret;
+}
+
+static void mcp2221_remove(struct hid_device *hdev)
+{
+ struct mcp2221 *mcp = hid_get_drvdata(hdev);
+
+ i2c_del_adapter(&mcp->adapter);
+ hid_hw_close(mcp->hdev);
+ hid_hw_stop(mcp->hdev);
+}
+
+static const struct hid_device_id mcp2221_devices[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_MCP2221) },
+ { }
+};
+MODULE_DEVICE_TABLE(hid, mcp2221_devices);
+
+static struct hid_driver mcp2221_driver = {
+ .name = "mcp2221",
+ .id_table = mcp2221_devices,
+ .probe = mcp2221_probe,
+ .remove = mcp2221_remove,
+ .raw_event = mcp2221_raw_event,
+};
+
+/* Register with HID core */
+module_hid_driver(mcp2221_driver);
+
+MODULE_AUTHOR("Rishi Gupta <gupt21@gmail.com>");
+MODULE_DESCRIPTION("MCP2221 Microchip HID USB to I2C master bridge");
+MODULE_LICENSE("GPL v2");
] |
| 150/2 | 2026/05/19 11:26 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 24550 output: 51 thoughts: 1145 Thoughts: **Analyzing the MCP2221 Driver Vulnerability** Okay, let's break this down methodically. The starting point is the crash report: a slab-out-of-bounds read within the `mcp2221_raw_event()` function. The core of the problem lies in an out-of-bounds access, specifically `data[-1]`, due to an integer underflow when `mcp->gp_idx` is zero. The explanation is clear: a `MCP2221_GPIO_SET` input report arrives *before* any GPIO operations are configured, leading to an incorrect state. I see that the lack of proper size checking in `mcp2221_raw_event()` was introduced in commit `67a95c21463d066060b0f66d65a75d45bb386ffb`, the initial driver commit. My attention is drawn to the fact that the code blatantly accesses various `data[]` indices without any validation. I note that this commit also doesn't validate against `data[0] != mcp->txbuf[0]`. But here's the crucial detail: The crash occurs because of the negative array index, meaning `data[-1]`. This specific error in logic, and the introduction of the GPIO functionality, including the offending line `data[mcp->gp_idx - 1]`, was introduced in commit `328de1c519c5c0925151cae47944a1c1a0333bcd`. This is the bug-introducing commit. The fix patch addresses this by adding a size check (ensuring `size >= 64`) and checking that the first byte of the data matches what's expected (`data[0] != mcp->txbuf[0]`). This effectively mitigates the negative array index issue and prevents the vulnerability from being triggered in this scenario. While the missing size check in `67a95c21463d066060b0f66d65a75d45bb386ffb` introduced a broader potential for out-of-bounds reads, the specific crash in question is directly caused by the logic introduced in `328de1c519c5c0925151cae47944a1c1a0333bcd`. If this commit hadn't existed, the reported crash wouldn't have materialized, even though the driver would remain vulnerable to other out-of-bounds scenarios due to the missing size check in the initial commit. Therefore, I'm confident that the root cause of the described crash is indeed found in `328de1c519c5c0925151cae47944a1c1a0333bcd`. Now, let's double-check other modifications to this part of the code, just to be thorough. |
| 151/2 | 2026/05/19 11:26 | tool | git-log |
10mError:git log timed out. Please specify a tighter search scope (e.g. by providing a PathPrefix). Args: map[CodeRegexp:MCP2221_GPIO_SET Count:10 SourcePath:drivers/hid/hid-mcp2221.c] Results: map[Output:] |
| 152/2 | 2026/05/19 11:36 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 26443 output: 51 thoughts: 9 Thoughts: Okay, here's the summary, formatted as requested: **Navigating the Router Configuration** Alright, let's see... looking at this configuration, it's immediately apparent that I need to ensure proper routing. I should definitely be setting a `PathPrefix`. Without it, I'm just asking for trouble and potentially exposing internal services unintentionally. It would be a silly oversight, given the complexity I am working with. I should have it as an imperative to make it functional. |
| 153/2 | 2026/05/19 11:37 | tool | git-log |
0mArgs:map[CodeRegexp:MCP2221_GPIO_SET Count:10 PathPrefix:drivers/hid/hid-mcp2221.c] Results: map[Output:328de1c519c5 HID: mcp2221: add GPIO functionality support ] |
| 154/2 | 2026/05/19 11:37 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 26642 output: 56 thoughts: 2713 Thoughts: **Analysis of the MCP2221 Driver Vulnerability and Fix** Okay, so I'm diving into this MCP2221 driver issue. My initial thought is that `328de1c519c5` is the specific commit where `MCP2221_GPIO_SET` was introduced, which is a key piece of information. The crucial check in the fix is `data[0] != mcp->txbuf[0]`. This addition seems to be about verifying that the report type received matches what was *expected*. This effectively blocks the trigger that caused the `data[-1]` out-of-bounds access. The second check, `size < 64`, handles the scenario where the incoming report is too short and prevents an out-of-bounds read. The primary bug seems to revolve around the `data[-1]` access โ the root cause of the crash, directly resulting from `328de1c519c5c0925151cae47944a1c1a0333bcd`. But the concern is, even before this specific commit, the driver might be vulnerable to other unsolicited reports. Now, which commit actually introduced the bug? Is it `328de1c519c5c0925151cae47944a1c1a0333bcd` that led to the crash, or `67a95c21463d066060b0f66d65a75d45bb386ffb` with its lack of size checks? Let's dissect the crash report: "KASAN: slab-out-of-bounds in mcp2221_raw_event...Read of size 1 at addr...`. This clearly points to the `data[-1]` access. The explanation makes it clear: it's an out-of-bounds *read* due to a negative array index because of `mcp->gp_idx` being 0, which happens if there's no bounds checking on report size. The fix itself: ```c + if (unlikely(size < 64)) + return 1; + + if (data[0] != mcp->txbuf[0]) + return 1; ``` This is a comprehensive fix addressing both the `size` issue, and the unsolicited report issue. The unsolicited reports is the factor that results in `mcp->gp_idx` being 0 when `MCP2221_GPIO_SET` is processed. If `data[0] != mcp->txbuf[0]` had been present earlier, the unsolicited `MCP2221_GPIO_SET` would have been discarded. Because `MCP2221_GPIO_SET` was only introduced in `328de1c519c5c0925151cae47944a1c1a0333bcd`, the bug is present there. Usually, it's the commit that adds the code that causes the crash that is considered the bug-introducing commit. However, if there was no check for `data[0] != mcp->txbuf[0]`, the driver was indeed vulnerable to unsolicited reports prior to `328de1c519c5c0925151cae47944a1c1a0333bcd`. So, I'll need to check if there are other out-of-bounds accesses before the introducing commit. Let's consider `67a95c21463d066060b0f66d65a75d45bb386ffb`. Here, `data[20]` is accessed. If `size` is less than 21, itโs an out-of-bounds read. This means the lack of size checking was already a latent bug. The `data[-1]` access due to `mcp->gp_idx - 1` when `mcp->gp_idx` is zero is a *logic* error introduced with `328de1c519c5c0925151cae47944a1c1a0333bcd`. So if I must pick one, the fix addresses both issues: `size < 64` and `data[0] != mcp->txbuf[0]`. The `data[0] != mcp->txbuf[0]` check prevents the `data[-1]` crash because |
| 155/2 | 2026/05/19 11:37 | tool | git-log |
0mArgs:map[CodeRegexp:if \\(unlikely\\(size < 64\\)\\) Count:1 PathPrefix:drivers/hid/hid-mcp2221.c] Results: map[Output:] |
| 156/2 | 2026/05/19 11:37 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 30449 output: 35 thoughts: 49 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Troubleshooting a Potential HID Driver Integration** Right, so the expected functionality isn't working as I'd anticipated. My immediate thought is, "Okay, the patch hasn't landed in the main branch yet, or perhaps my regex for the relevant commit message wasn't quite right." I need to verify. Let's start with a quick search, focusing on the commit messages related to the `hid-mcp2221.c` driver, perhaps using specific keywords or hashes if I have them handy. Failing that, I'll bypass the search and just quickly examine the most recent commits directly within the `drivers/hid/hid-mcp2221.c` file itself. That should give me a good handle on what's been happening in the area and whether my expectation aligns with the current state of the code base. |
| 157/2 | 2026/05/19 11:37 | tool | git-log |
0mArgs:map[Count:10 PathPrefix:drivers/hid/hid-mcp2221.c] Results: map[Output:f097d246677b HID: mcp2221: fix OOB write in mcp2221_raw_event() ac977b900907 HID: mcp2221: Fix spelling mistake "Enfore" -> "Enforce" 200e6c6e94fa HID: mcp2221: Add module parameter to enfoce GPIO mode ab05515757fc HID: mcp2221: use mcp_i2c_smbus_read for block reads e31b556c0ba2 HID: mcp2221: cancel last I2C command on read error b56cc41a3ae7 hid: fix I2C read buffer overflow in raw_event() for mcp2221 d9d87d90cc0b treewide: rename GPIO set callbacks back to their original names a5db1591d082 HID: mcp-2221: Replace manual comparison with min() macro 0d6b550dce55 HID: mcp2221: set gpio pin mode 31a78afda1ef HID: mcp2221: use new line value setter callbacks ] |
| 158/2 | 2026/05/19 11:37 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 31044 output: 27 thoughts: 32 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Debugging: Identifying the Fix Commit** Alright, time to get to the bottom of this. My initial thought is to quickly verify the status of the suspected fix. I need to know definitively if the resolution for this issue is contained within commit `f097d246677b`. That's the baseline, the critical first step. Is it already integrated into the mainline, or is it still sitting on a branch, perhaps awaiting review or further testing? Determining its merge status is paramount for understanding where the problem currently resides within the overall code base. Knowing this will immediately inform the next steps in my analysis. It's the most efficient starting point. |
| 159/2 | 2026/05/19 11:37 | tool | git-show |
0mArgs:map[Commit:f097d246677b] Results: map[Output:commit f097d246677b03db814c5862f368cea341b76a00
Author: Florian Pradines <florian.pradines@gmail.com>
Date: Sat May 9 09:45:17 2026 +0000
HID: mcp2221: fix OOB write in mcp2221_raw_event()
mcp2221_raw_event() copies device-supplied data into mcp->rxbuf at
offset rxbuf_idx without checking that the copy fits within the
destination buffer. A device responding with up to 60 bytes to a
small I2C/SMBus read can overflow the buffer.
Add a rxbuf_size field to struct mcp2221, set it alongside rxbuf in
mcp_i2c_smbus_read(), and check rxbuf_idx + data[3] <= rxbuf_size
before the memcpy.
Reported-by: Benoรฎt Sevens <bsevens@google.com>
Signed-off-by: Florian Pradines <florian.pradines@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index be80970ab48e..e4ddd8e9293b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -128,6 +128,7 @@ struct mcp2221 {
u8 *rxbuf;
u8 txbuf[64];
int rxbuf_idx;
+ int rxbuf_size;
int status;
u8 cur_i2c_clk_div;
struct gpio_chip *gc;
@@ -330,12 +331,14 @@ static int mcp_i2c_smbus_read(struct mcp2221 *mcp,
mcp->txbuf[3] = (u8)(msg->addr << 1);
total_len = msg->len;
mcp->rxbuf = msg->buf;
+ mcp->rxbuf_size = msg->len;
} else {
mcp->txbuf[1] = smbus_len;
mcp->txbuf[2] = 0;
mcp->txbuf[3] = (u8)(smbus_addr << 1);
total_len = smbus_len;
mcp->rxbuf = smbus_buf;
+ mcp->rxbuf_size = smbus_len;
}
ret = mcp_send_data_req_status(mcp, mcp->txbuf, 4);
@@ -919,6 +922,10 @@ static int mcp2221_raw_event(struct hid_device *hdev,
mcp->status = -EINVAL;
break;
}
+ if (mcp->rxbuf_idx + data[3] > mcp->rxbuf_size) {
+ mcp->status = -EINVAL;
+ break;
+ }
buf = mcp->rxbuf;
memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
] |
| 160/2 | 2026/05/19 11:37 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 32189 output: 51 thoughts: 813 Thoughts: **Analyzing the MCP2221 Driver Crash** Okay, so I've been given a potential fix patch for a crash in the `hid-mcp2221` driver. I need to assess this fix, understand the root cause, and ensure this patch is the correct solution. First, this patch is new; it's not present in the logs. The crash, as indicated by the KASAN report, is a slab-out-of-bounds read within `mcp2221_raw_event`. Specifically, it involves accessing memory at `data[-1]`. The provided explanation is pretty clear: it's due to the logic handling `MCP2221_GPIO_SET` reports before any GPIO operations have occurred. This is because `mcp->gp_idx` remains at zero in this scenario, and the expression `mcp->gp_idx - 1` gets promoted to an integer, resulting in an out-of-bounds access. The analysis is pinpointing the introduction of the vulnerability to commit `328de1c519c5c0925151cae47944a1c1a0333bcd`, which introduced the `MCP2221_GPIO_SET` handling and the `mcp->gp_idx` variable. If that commit hadn't landed, this specific crash would not exist. The fix patch includes a size check (`size < 64`). Now, I see this check *also* addresses an earlier out-of-bounds read at `data[20]`, which was introduced in a different commit, `67a95c21463d066060b0f66d65a75d45bb386ffb`. However, the current KASAN report specifies the access to `data[-1]` which directly implicates `mcp->gp_idx - 1` and, therefore, the more recent commit. The fact that the report isolates the `data[-1]` access confirms the primary culprit. To be certain, I'll need to double-check that no other commits have touched `mcp->gp_idx` or the `MCP2221_GPIO_SET` handling logic within the `mcp2221_raw_event` function. While the explanation suggests this is the specific trigger, it's always good practice to verify this. Then, I can properly validate this patch as the appropriate fix. |
| 161/2 | 2026/05/19 11:37 | tool | git-log |
0mArgs:map[CodeRegexp:MCP2221_GPIO_SET Count:10 PathPrefix:drivers/hid/hid-mcp2221.c] Results: map[Output:328de1c519c5 HID: mcp2221: add GPIO functionality support ] |
| 162/2 | 2026/05/19 11:37 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 33633 output: 48 thoughts: 80 Thoughts: Okay, let's break this down. **Analyzing the MCP2221_GPIO_SET Implementation** Right, so I'm focusing on that `MCP2221_GPIO_SET` change. I'm pretty sure that the commit `328de1c519c5c0925151cae47944a1c1a0333bcd` is the one that actually *introduced* it, as I suspected. But, and this is crucial for solid analysis, I need to make *absolutely* certain that's the only one touching it. I'm going to quickly check if the `mcp->gp_idx` variable has been modified anywhere else in the code base, because indirect interactions are always a possibility, and I want to be comprehensive in my investigation of this particular function. No stone left unturned to be certain. |
| 163/2 | 2026/05/19 11:37 | tool | git-log |
0mArgs:map[CodeRegexp:mcp->gp_idx Count:10 PathPrefix:drivers/hid/hid-mcp2221.c] Results: map[Output:ca6961d8a851 HID: mcp2221: fix get and get_direction for gpio 567b8e9fed8a HID: mcp2221: Fix GPIO output handling 328de1c519c5 HID: mcp2221: add GPIO functionality support ] |
| 164/2 | 2026/05/19 11:37 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 34046 output: 26 thoughts: 30 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Analyzing Commits** Okay, time to dive in. My immediate focus is on commits `ca6961d8a851` and `567b8e9fed8a`. Given the context, this likely means I'm in the middle of debugging, code review, or perhaps investigating a specific bug report. I need to understand what changes were introduced by these specific revisions, and how those changes might relate to any issues I'm currently tracking. I'll need to rapidly parse the diffs, focusing on areas of the codebase I know are prone to these kinds of problems, and look for anything that stands out as a potential point of failure, or a potential fix. My expectation is that these commit hashes relate to specific functions I am concerned with. Understanding these commits will be the key to the next steps. |
| 165/2 | 2026/05/19 11:38 | tool | git-show |
0mArgs:map[Commit:ca6961d8a851] Results: map[Output:commit ca6961d8a851f3720175f500be38fe9cee5a2c13
Author: Louis Morhet <lmorhet@kalrayinc.com>
Date: Tue Apr 4 14:15:25 2023 +0200
HID: mcp2221: fix get and get_direction for gpio
The mcp2221_raw_event retrieves the value and direction of gpio on the
same command, by setting the value on mcp->status and the direction on
mcp->gpio_dir; and the offset at which they are read is based on
mcp->gp_idx, set by the gpiochip callbacks.
However, the individual gpiochip calls set the index to look for
directly on the field they want to track. This create a "double offset"
in the final read in the response report.
Align the behaviour of mcp2221_raw_event and
mcp_gpio_get/mcp_gpio_get_direction by putting gp_idx on those calls to
the base offset of the gpio status struct.
Signed-off-by: Louis Morhet <lmorhet@kalrayinc.com>
Link: https://lore.kernel.org/r/dd0b23800a79d2a464e1e9ed429b018b69fd5df2.1680602387.git.lmorhet@kalrayinc.com
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index fa20ed4d395a..72883e0ce757 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -594,7 +594,7 @@ static int mcp_gpio_get(struct gpio_chip *gc,
mcp->txbuf[0] = MCP2221_GPIO_GET;
- mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].value);
+ mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
mutex_lock(&mcp->lock);
ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
@@ -675,7 +675,7 @@ static int mcp_gpio_get_direction(struct gpio_chip *gc,
mcp->txbuf[0] = MCP2221_GPIO_GET;
- mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].direction);
+ mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
mutex_lock(&mcp->lock);
ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
] |
| 166/2 | 2026/05/19 11:38 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 35117 output: 25 thoughts: 13 Thoughts: Okay, here's my attempt at summarizing the thought process, tailored for an expert audience, and written in the first person: **Analyzing the Data Stream: Initial Assessment** Alright, I'm looking at this data stream labeled `567b8e9fed8a`. Immediately, the hexadecimal format jumps out โ that's often a sign of encoded or serialized data. My initial thought is to identify the likely encoding or serialization method. Is it a hash? A UUID? Could it be base64, hex-encoded binary, or something more complex like ASN.1? Given the length, it's probably not a simple cryptographic hash like MD5, SHA-1, or even SHA-256 โ those are usually shorter, although truncated hashes are a possibility. I need to quickly run through my mental checklist: known encoding schemes, common data serialization libraries, and perhaps even check if there's any context from prior analysis that would give me a hint. The lack of immediately recognizable patterns suggests it's not plain text, so I need to bring out the heavy artillery. Time to grab some tools and start cracking the code. |
| 167/2 | 2026/05/19 11:38 | tool | git-show |
0mArgs:map[Commit:567b8e9fed8a] Results: map[Output:commit 567b8e9fed8add9e20885be38ecd73bb0e07406b
Author: Lars Povlsen <lars.povlsen@microchip.com>
Date: Wed Nov 4 23:02:23 2020 +0100
HID: mcp2221: Fix GPIO output handling
The mcp2221 driver GPIO output handling has has several issues.
* A wrong value is used for the GPIO direction.
* Wrong offsets are calculated for some GPIO set value/set direction
operations, when offset is larger than 0.
This has been fixed by introducing proper manifest constants for the
direction encoding, and using 'offsetof' when calculating GPIO
register offsets.
The updated driver has been tested with the Sparx5 pcb134/pcb135
board, which has the mcp2221 device with several (output) GPIO's.
Fixes: 328de1c519c5c092 ("HID: mcp2221: add GPIO functionality support")
Reviewed-by: Rishi Gupta <gupt21@gmail.com>
Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index 0d27ccb55dd9..4211b9839209 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -49,6 +49,36 @@ enum {
MCP2221_ALT_F_NOT_GPIOD = 0xEF,
};
+/* MCP GPIO direction encoding */
+enum {
+ MCP2221_DIR_OUT = 0x00,
+ MCP2221_DIR_IN = 0x01,
+};
+
+#define MCP_NGPIO 4
+
+/* MCP GPIO set command layout */
+struct mcp_set_gpio {
+ u8 cmd;
+ u8 dummy;
+ struct {
+ u8 change_value;
+ u8 value;
+ u8 change_direction;
+ u8 direction;
+ } gpio[MCP_NGPIO];
+} __packed;
+
+/* MCP GPIO get command layout */
+struct mcp_get_gpio {
+ u8 cmd;
+ u8 dummy;
+ struct {
+ u8 direction;
+ u8 value;
+ } gpio[MCP_NGPIO];
+} __packed;
+
/*
* There is no way to distinguish responses. Therefore next command
* is sent only after response to previous has been received. Mutex
@@ -542,7 +572,7 @@ static int mcp_gpio_get(struct gpio_chip *gc,
mcp->txbuf[0] = MCP2221_GPIO_GET;
- mcp->gp_idx = (offset + 1) * 2;
+ mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].value);
mutex_lock(&mcp->lock);
ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
@@ -559,7 +589,7 @@ static void mcp_gpio_set(struct gpio_chip *gc,
memset(mcp->txbuf, 0, 18);
mcp->txbuf[0] = MCP2221_GPIO_SET;
- mcp->gp_idx = ((offset + 1) * 4) - 1;
+ mcp->gp_idx = offsetof(struct mcp_set_gpio, gpio[offset].value);
mcp->txbuf[mcp->gp_idx - 1] = 1;
mcp->txbuf[mcp->gp_idx] = !!value;
@@ -575,7 +605,7 @@ static int mcp_gpio_dir_set(struct mcp2221 *mcp,
memset(mcp->txbuf, 0, 18);
mcp->txbuf[0] = MCP2221_GPIO_SET;
- mcp->gp_idx = (offset + 1) * 5;
+ mcp->gp_idx = offsetof(struct mcp_set_gpio, gpio[offset].direction);
mcp->txbuf[mcp->gp_idx - 1] = 1;
mcp->txbuf[mcp->gp_idx] = val;
@@ -590,7 +620,7 @@ static int mcp_gpio_direction_input(struct gpio_chip *gc,
struct mcp2221 *mcp = gpiochip_get_data(gc);
mutex_lock(&mcp->lock);
- ret = mcp_gpio_dir_set(mcp, offset, 0);
+ ret = mcp_gpio_dir_set(mcp, offset, MCP2221_DIR_IN);
mutex_unlock(&mcp->lock);
return ret;
@@ -603,7 +633,7 @@ static int mcp_gpio_direction_output(struct gpio_chip *gc,
struct mcp2221 *mcp = gpiochip_get_data(gc);
mutex_lock(&mcp->lock);
- ret = mcp_gpio_dir_set(mcp, offset, 1);
+ ret = mcp_gpio_dir_set(mcp, offset, MCP2221_DIR_OUT);
mutex_unlock(&mcp->lock);
/* Can't configure as output, bailout early */
@@ -623,7 +653,7 @@ static int mcp_gpio_get_direction(struct gpio_chip *gc,
mcp->txbuf[0] = MCP2221_GPIO_GET;
- mcp->gp_idx = (offset + 1) * 2;
+ mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].direction);
mutex_lock(&mcp->lock);
ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
@@ -632,7 +662,7 @@ static int mcp_gpio_get_direction(struct gpio_chip *gc,
if (ret)
return ret;
- if (mcp->gpio_dir)
+ if (mcp->gpio_dir == MCP2221_DIR_IN)
return GPIO_LINE_DIRECTION_IN;
return GPIO_LINE_DIRECTION_OUT;
@@ -758,7 +788,7 @@ static int mcp2221_raw_event(struct hid_device *hdev,
mcp->status = -ENOENT;
} else {
mcp->status = !!data[mcp->gp_idx];
- mcp->gpio_dir = !!data[mcp->gp_idx + 1];
+ mcp->gpio_dir = data[mcp->gp_idx + 1];
}
break;
default:
@@ -860,7 +890,7 @@ static int mcp2221_probe(struct hid_device *hdev,
mcp->gc->get_direction = mcp_gpio_get_direction;
mcp->gc->set = mcp_gpio_set;
mcp->gc->get = mcp_gpio_get;
- mcp->gc->ngpio = 4;
+ mcp->gc->ngpio = MCP_NGPIO;
mcp->gc->base = -1;
mcp->gc->can_sleep = 1;
mcp->gc->parent = &hdev->dev;
] |
| 168/2 | 2026/05/19 11:38 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 37475 output: 51 thoughts: 1558 Thoughts: **Analysis of the MCP2221 Driver Crash**
Okay, let's break this down systematically. I'm looking at a crash report in the MCP2221 HID driver, and it's pinpointing a slab-out-of-bounds read. The root cause appears to be accessing `data[-1]`. I remember seeing that `gp_idx` calculation change in `567b8e9fed8a`, but that wasn't the issue. It was changed to use `offsetof`, which looks correct: `mcp->gp_idx = offsetof(struct mcp_set_gpio, gpio[offset].value)`. Given the struct layout, the offset is at least 3, so that alone isn't the problem.
The key observation is that the crash occurs when `mcp->gp_idx` is zero. Specifically, the expression `data[mcp->gp_idx - 1]` leads to an access of `data[-1]`, and that is a classic out-of-bounds error. The report is clear about this, and the backtrace points directly to that line.
I'm thinking, where was `MCP2221_GPIO_SET` added? I recall it was in `328de1c519c5c0925151cae47944a1c1a0333bcd`. Let me double-check:
```c
+ case MCP2221_GPIO_SET:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
+ (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
```
Bingo. That's it. Before this commit, the driver didn't handle the `MCP2221_GPIO_SET` command. It would fall through to the `default` case, and the input report would not be processed in a way that could cause the out-of-bounds read.
Now, let's consider the fix patch. It introduced `if (unlikely(size < 64)) return 1;`. That's meant to catch out-of-bounds reads if the report is too small. But the crash is *specifically* `data[-1]`, not `data[20]` or something like that. The fix *didn't* address the -1 access.
Wait a second, let me re-examine the fix more closely.
```c
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
```
Okay, the `size < 64` *does* catch smaller reports, but the `data[0] != mcp->txbuf[0]` check is the important part here. That check verifies that the incoming report is a response to a command we sent, i.e., that `MCP2221_GPIO_SET` has *already* been handled, and therefore, that `mcp->gp_idx` has already been initialized. This effectively prevents the condition that leads to `data[-1]`.
So, the original bug was introduced in `328de1c519c5c0925151cae47944a1c1a0333bcd`. The fix *does* solve the problem, though the original reasoning regarding the out of bounds was somewhat confused. It prevented a *different* kind of out-of-bounds read, but more importantly, it prevented the -1 access. The fix works because it makes sure that if the report is of the correct kind, then `mcp->gp_idx` will have been initialized.
Therefore, my conclusion is that the bug-introducing commit is definitely `328de1c519c5c0925151cae47944a1c1a0333bcd`.
|
| 169/2 | 2026/05/19 11:38 | tool | git-show |
0mArgs:map[Commit:328de1c519c5c0925151cae47944a1c1a0333bcd] Results: map[Output:commit 328de1c519c5c0925151cae47944a1c1a0333bcd
Author: Rishi Gupta <gupt21@gmail.com>
Date: Tue Apr 14 22:18:14 2020 +0530
HID: mcp2221: add GPIO functionality support
MCP2221 has 4 pins that can be used as GPIO or configured
for alternate functionality such as clock generation and
IRQ detection. This patch adds support for GPIO functionality.
To set direction of a pin or to toggle its state after it
has been configured as GPIO, driver sends command to mcp2221
and parses response received from mcp2221. Based on this
response either 0 or appropriate error code is returned to
GPIO framework.
To get the direction or current state of a pin, driver
sends command and read response from the device. Based on
the response received from device direction or value
is sent to the GPIO framework.
Command from driver to mcp2221 device are output report.
Response received from mcp2221 is input report.
Datasheet (page 45-48) contains details about how to decode
the response received from device:
http://ww1.microchip.com/downloads/en/DeviceDoc/20005565B.pdf
Signed-off-by: Rishi Gupta <gupt21@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index d958475f8c81..e1b93ce32e01 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -15,6 +15,7 @@
#include <linux/hid.h>
#include <linux/hidraw.h>
#include <linux/i2c.h>
+#include <linux/gpio/driver.h>
#include "hid-ids.h"
/* Commands codes in a raw output report */
@@ -27,6 +28,8 @@ enum {
MCP2221_I2C_PARAM_OR_STATUS = 0x10,
MCP2221_I2C_SET_SPEED = 0x20,
MCP2221_I2C_CANCEL = 0x10,
+ MCP2221_GPIO_SET = 0x50,
+ MCP2221_GPIO_GET = 0x51,
};
/* Response codes in a raw input report */
@@ -42,6 +45,8 @@ enum {
MCP2221_I2C_WRADDRL_SEND = 0x21,
MCP2221_I2C_ADDR_NACK = 0x25,
MCP2221_I2C_READ_COMPL = 0x55,
+ MCP2221_ALT_F_NOT_GPIOV = 0xEE,
+ MCP2221_ALT_F_NOT_GPIOD = 0xEF,
};
/*
@@ -59,6 +64,9 @@ struct mcp2221 {
int rxbuf_idx;
int status;
u8 cur_i2c_clk_div;
+ struct gpio_chip *gc;
+ u8 gp_idx;
+ u8 gpio_dir;
};
/*
@@ -526,6 +534,110 @@ static const struct i2c_algorithm mcp_i2c_algo = {
.functionality = mcp_i2c_func,
};
+static int mcp_gpio_get(struct gpio_chip *gc,
+ unsigned int offset)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mcp->txbuf[0] = MCP2221_GPIO_GET;
+
+ mcp->gp_idx = (offset + 1) * 2;
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
+ mutex_unlock(&mcp->lock);
+
+ return ret;
+}
+
+static void mcp_gpio_set(struct gpio_chip *gc,
+ unsigned int offset, int value)
+{
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ memset(mcp->txbuf, 0, 18);
+ mcp->txbuf[0] = MCP2221_GPIO_SET;
+
+ mcp->gp_idx = ((offset + 1) * 4) - 1;
+
+ mcp->txbuf[mcp->gp_idx - 1] = 1;
+ mcp->txbuf[mcp->gp_idx] = !!value;
+
+ mutex_lock(&mcp->lock);
+ mcp_send_data_req_status(mcp, mcp->txbuf, 18);
+ mutex_unlock(&mcp->lock);
+}
+
+static int mcp_gpio_dir_set(struct mcp2221 *mcp,
+ unsigned int offset, u8 val)
+{
+ memset(mcp->txbuf, 0, 18);
+ mcp->txbuf[0] = MCP2221_GPIO_SET;
+
+ mcp->gp_idx = (offset + 1) * 5;
+
+ mcp->txbuf[mcp->gp_idx - 1] = 1;
+ mcp->txbuf[mcp->gp_idx] = val;
+
+ return mcp_send_data_req_status(mcp, mcp->txbuf, 18);
+}
+
+static int mcp_gpio_direction_input(struct gpio_chip *gc,
+ unsigned int offset)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_gpio_dir_set(mcp, offset, 0);
+ mutex_unlock(&mcp->lock);
+
+ return ret;
+}
+
+static int mcp_gpio_direction_output(struct gpio_chip *gc,
+ unsigned int offset, int value)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_gpio_dir_set(mcp, offset, 1);
+ mutex_unlock(&mcp->lock);
+
+ /* Can't configure as output, bailout early */
+ if (ret)
+ return ret;
+
+ mcp_gpio_set(gc, offset, value);
+
+ return 0;
+}
+
+static int mcp_gpio_get_direction(struct gpio_chip *gc,
+ unsigned int offset)
+{
+ int ret;
+ struct mcp2221 *mcp = gpiochip_get_data(gc);
+
+ mcp->txbuf[0] = MCP2221_GPIO_GET;
+
+ mcp->gp_idx = (offset + 1) * 2;
+
+ mutex_lock(&mcp->lock);
+ ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
+ mutex_unlock(&mcp->lock);
+
+ if (ret)
+ return ret;
+
+ if (mcp->gpio_dir)
+ return GPIO_LINE_DIRECTION_IN;
+
+ return GPIO_LINE_DIRECTION_OUT;
+}
+
/* Gives current state of i2c engine inside mcp2221 */
static int mcp_get_i2c_eng_state(struct mcp2221 *mcp,
u8 *data, u8 idx)
@@ -638,6 +750,39 @@ static int mcp2221_raw_event(struct hid_device *hdev,
complete(&mcp->wait_in_report);
break;
+ case MCP2221_GPIO_GET:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
+ (data[mcp->gp_idx + 1] == MCP2221_ALT_F_NOT_GPIOD)) {
+ mcp->status = -ENOENT;
+ } else {
+ mcp->status = !!data[mcp->gp_idx];
+ mcp->gpio_dir = !!data[mcp->gp_idx + 1];
+ }
+ break;
+ default:
+ mcp->status = -EAGAIN;
+ }
+ complete(&mcp->wait_in_report);
+ break;
+
+ case MCP2221_GPIO_SET:
+ switch (data[1]) {
+ case MCP2221_SUCCESS:
+ if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
+ (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
+ mcp->status = -ENOENT;
+ } else {
+ mcp->status = 0;
+ }
+ break;
+ default:
+ mcp->status = -EAGAIN;
+ }
+ complete(&mcp->wait_in_report);
+ break;
+
default:
mcp->status = -EIO;
complete(&mcp->wait_in_report);
@@ -702,8 +847,32 @@ static int mcp2221_probe(struct hid_device *hdev,
}
i2c_set_adapdata(&mcp->adapter, mcp);
+ /* Setup GPIO chip */
+ mcp->gc = devm_kzalloc(&hdev->dev, sizeof(*mcp->gc), GFP_KERNEL);
+ if (!mcp->gc) {
+ ret = -ENOMEM;
+ goto err_gc;
+ }
+
+ mcp->gc->label = "mcp2221_gpio";
+ mcp->gc->direction_input = mcp_gpio_direction_input;
+ mcp->gc->direction_output = mcp_gpio_direction_output;
+ mcp->gc->get_direction = mcp_gpio_get_direction;
+ mcp->gc->set = mcp_gpio_set;
+ mcp->gc->get = mcp_gpio_get;
+ mcp->gc->ngpio = 4;
+ mcp->gc->base = -1;
+ mcp->gc->can_sleep = 1;
+ mcp->gc->parent = &hdev->dev;
+
+ ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp);
+ if (ret)
+ goto err_gc;
+
return 0;
+err_gc:
+ i2c_del_adapter(&mcp->adapter);
err_i2c:
hid_hw_close(mcp->hdev);
err_hstop:
] |
| 170/2 | 2026/05/19 11:38 | llm | fixes-finder |
0mModel:gemini-3.1-pro-preview Tokens: input: 43069 output: 53 thoughts: 94 Thoughts: Okay, here's my understanding, thinking through this as if it were my own process: **Identifying the Culprit Commit** Alright, after reviewing the history, it's pretty clear. The commit with the identifier `328de1c519c5c0925151cae47944a1c1a0333bcd` is the one that introduced the bug we're tracking. No doubt about it, based on the diffs and my understanding of the codebase. Therefore, I will formally declare that specific commit as the root cause in the system. Setting the result to `328de1c519c5c0925151cae47944a1c1a0333bcd` is the next logical step. |
| 171/2 | 2026/05/19 11:38 | tool | set-results |
0mArgs:map[FixesHash:328de1c519c5c0925151cae47944a1c1a0333bcd] Results: map[FixesHash:328de1c519c5c0925151cae47944a1c1a0333bcd] |
| 172/1 | 2026/05/19 11:38 | action | format-fixes |
0mResults:map[Fixes:map[Hash:328de1c519c5c0925151cae47944a1c1a0333bcd Title:HID: mcp2221: add GPIO functionality support]] |
| 173/1 | 2026/05/19 11:38 | action | get-maintainers |
0mResults:map[Recipients:[map[Email:bentiss@kernel.org Name:Benjamin Tissoires To:true] map[Email:gupt21@gmail.com Name:Rishi Gupta To:true] map[Email:jikos@kernel.org Name:Jiri Kosina To:true] map[Email:linux-i2c@vger.kernel.org Name: To:true] map[Email:linux-input@vger.kernel.org Name: To:true] map[Email:linux-kernel@vger.kernel.org Name: To:false]]] |
| 174/1 | 2026/05/19 11:38 | action | get-recent-commits |
0mResults:map[RecentCommits:HID: mcp2221: fix OOB write in mcp2221_raw_event() HID: mcp2221: Fix spelling mistake "Enfore" -> "Enforce" HID: mcp2221: Add module parameter to enfoce GPIO mode HID: mcp2221: use mcp_i2c_smbus_read for block reads HID: mcp2221: cancel last I2C command on read error hid: fix I2C read buffer overflow in raw_event() for mcp2221 treewide: rename GPIO set callbacks back to their original names HID: mcp-2221: Replace manual comparison with min() macro HID: mcp2221: set gpio pin mode HID: mcp2221: use new line value setter callbacks HID: mcp2221: Remove unnecessary semicolon HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled HID: mcp2221: Handle reads greater than 60 bytes HID: mcp2221: Don't set bus speed on every transfer HID: mcp2221: Set ACPI companion HID: mcp2221: Allow IO to start during probe HID: mcp2221: Set driver data before I2C adapter add HID: mcp2221: fix get and get_direction for gpio HID: mcp2221: fix report layout for gpio get HID: mcp-2221: prevent UAF in delayed work ] |
| 175/1 | 2026/05/19 11:38 | agent | description-generator |
0mModel:gemini-3.1-pro-preview Instruction: You are an experienced Linux kernel developer tasked with writing a commit description for a kernel bug fixing commit. The description should start with a one-line summary, and then include description of the bug being fixed, and how it's fixed by the provided patch. Your final reply should contain only the text of the commit description. Phrase the one-line summary so that it is not longer than 72 characters. IMPORTANT: Do not wrap lines manually (e.g., at 80 characters); we will reformat the text automatically, so keep paragraphs as single lines without newlines. Prefer calling several tools at the same time to save round-trips. Prompt:
The crash that corresponds to the bug is:
==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888111fe7fff by task ktimers/0/16
CPU: 0 UID: 0 PID: 16 Comm: ktimers/0 Not tainted syzkaller #1 PREEMPT_{RT,(full)}
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x42b/0x590 drivers/hid/hid-core.c:2161
hid_irq_in+0x495/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x405/0xb10 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x18f/0x260 kernel/time/hrtimer.c:2011
handle_softirqs+0x1de/0x6d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1151
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
kmem_cache_alloc_node_noprof+0x22a/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
kernel_thread+0x13f/0x1b0 kernel/fork.c:2782
create_kthread kernel/kthread.c:459 [inline]
kthreadd+0x4ec/0x6e0 kernel/kthread.c:817
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888111fe5880
which belongs to the cache task_struct of size 7296
The buggy address is located 2815 bytes to the right of
allocated 7296-byte region [ffff888111fe5880, ffff888111fe7500)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111fe0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888116e25541
flags: 0x100000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000040 ffff8881012e0500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888116e25541
head: 0100000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2388, tgid 2388 (kworker/u9:11), ts 15402053339, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3467
new_slab mm/slub.c:3525 [inline]
refill_objects+0x33c/0x3d0 mm/slub.c:7271
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x373/0x720 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
kmem_cache_alloc_node_noprof+0x4f4/0x6e0 mm/slub.c:4950
alloc_task_struct_node kernel/fork.c:187 [inline]
dup_task_struct+0x52/0x840 kernel/fork.c:918
copy_process+0x89b/0x4450 kernel/fork.c:2090
kernel_clone+0x283/0x870 kernel/fork.c:2721
user_mode_thread+0x110/0x180 kernel/fork.c:2797
call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
worker_thread+0x8a2/0xda0 kernel/workqueue.c:3478
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
page_owner free stack trace missing
Memory state around the buggy address:
ffff888111fe7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888111fe8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
Other crashes triggered:
==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff8881b72fffff by task ktimers/1/29
CPU: 1 UID: 0 PID: 29 Comm: ktimers/1 Not tainted syzkaller #1 PREEMPT_{RT,(full)}
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x42b/0x590 drivers/hid/hid-core.c:2161
hid_irq_in+0x495/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x405/0xb10 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x18f/0x260 kernel/time/hrtimer.c:2011
handle_softirqs+0x1de/0x6d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1151
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b72ff
flags: 0x500000000000000(node=1|zone=2)
raw: 0500000000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 6037, tgid 6037 (syz-executor), ts 125633981260, free_ts 463441946812
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2490
alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline]
alloc_pages_noprof+0xd2/0x2f0 mm/mempolicy.c:2581
pagetable_alloc_noprof include/linux/mm.h:3651 [inline]
__pte_alloc_one_noprof include/asm-generic/pgalloc.h:76 [inline]
pte_alloc_one+0x22/0x380 arch/x86/mm/pgtable.c:18
__pte_alloc+0x25/0x1a0 mm/memory.c:453
do_anonymous_page mm/memory.c:5338 [inline]
do_pte_missing+0x21a2/0x2750 mm/memory.c:4548
handle_pte_fault mm/memory.c:6411 [inline]
__handle_mm_fault mm/memory.c:6549 [inline]
handle_mm_fault+0xd09/0x13c0 mm/memory.c:6718
do_user_addr_fault+0xa73/0x1340 arch/x86/mm/fault.c:1334
handle_page_fault arch/x86/mm/fault.c:1474 [inline]
exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
page last free pid 20 tgid 20 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0xf48/0x1080 mm/page_alloc.c:2943
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:291
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core kernel/rcu/tree.c:2869 [inline]
rcu_cpu_kthread+0x99e/0x1470 kernel/rcu/tree.c:2957
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff8881b72ffe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881b72fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881b72fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881b7300000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881b7300080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
The explanation of the root cause of the bug is:
An analysis of the crash report and the source code reveals that the root cause is an **out-of-bounds read due to a negative array index** in `mcp2221_raw_event()`, combined with a lack of bounds checking on the incoming HID report size.
### Detailed Explanation
1. **Uninitialized State**:
When the `mcp2221` device is probed, its state structure is allocated using `devm_kzalloc()`, which zero-initializes all fields. The `mcp->gp_idx` field (a `u8`) is initialized to `0`. It is only updated to a valid positive offset (e.g., 3, 7, 11, or 15) when the GPIO subsystem invokes the driver's GPIO operations like `mcp_gpio_set()`.
2. **The Vulnerability**:
If the device sends an `MCP2221_GPIO_SET` (0x50) input report *before* any GPIO operations are performed (or if a malicious device/reproducer injects one), `mcp2221_raw_event()` processes the report while `mcp->gp_idx` is still `0`.
Looking at `drivers/hid/hid-mcp2221.c` around line 964:
```c
960: case MCP2221_GPIO_SET:
961: switch (data[1]) {
962: case MCP2221_SUCCESS:
963: if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
964: (data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
```
Because `mcp->gp_idx` is `0`, the expression `mcp->gp_idx - 1` promotes the `u8` to an `int`, resulting in `-1`. This causes the code to access `data[-1]`.
3. **Memory Layout and the KASAN Report**:
The `data` pointer passed to `mcp2221_raw_event()` points to the URB transfer buffer, which is allocated by the USB core via `kmalloc()` (e.g., from the `kmalloc-64` cache).
In the crashing scenario, the SLUB allocator placed this 64-byte buffer at the very beginning of a new page, exactly at address `ffff888111fe8000`.
When the code evaluates `data[-1]`, it reads the address `ffff888111fe7fff`. This address is the last byte of the *previous* physical page. As shown in the KASAN report, the previous page (`pfn:0x111fe0`) was an order-3 slab page belonging to the `task_struct` cache. The last `task_struct` object in that page ended at `ffff888111fe7500`, and the remainder of the page was SLUB padding/redzone (filled with `fc`).
KASAN intercepted the read at `ffff888111fe7fff` and correctly reported it as a slab-out-of-bounds read located 2815 bytes to the right of the `task_struct` object.
```text
ffff888111fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^ (data[-1] at ffff888111fe7fff)
ffff888111fe8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <-- data (urb->transfer_buffer)
```
### How to Fix
To fix this bug, `mcp2221_raw_event()` needs two corrections:
1. **Validate `mcp->gp_idx`**: Ensure that `mcp->gp_idx` is valid (e.g., `mcp->gp_idx > 0`) before using it as an array index.
2. **Bounds Checking**: The function completely lacks bounds checking on the `size` parameter. It blindly accesses `data[0]`, `data[1]`, and various other offsets (like `data[50]` in the `MCP2221_I2C_PARAM_OR_STATUS` case). It should verify that `size` is large enough for the specific report being processed before accessing the `data` array.
The diff of the bug fix is:
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index e4ddd8e92..7f4f2110b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -861,6 +861,12 @@ static int mcp2221_raw_event(struct hid_device *hdev,
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
Additional description of the patch:
An analysis of the crash report and the driver's source code reveals that the root cause is an out-of-bounds read due to a negative array index in `mcp2221_raw_event()`, combined with a lack of bounds checking on the incoming HID report size.
### Detailed Explanation
1. **Uninitialized State & Stray Reports**:
When the `mcp2221` device is probed, its state structure is allocated using `devm_kzalloc()`, which zero-initializes all fields. The `mcp->gp_idx` field is initialized to `0`. It is only updated to a valid positive offset when the GPIO subsystem invokes the driver's GPIO operations (like `mcp_gpio_set()`).
The `mcp2221_raw_event()` function is called for any incoming HID input report. It blindly processes the report based on the command byte `data[0]`, without verifying if the report is actually a response to the command the driver just sent.
2. **The Vulnerability**:
If the device sends an `MCP2221_GPIO_SET` (0x50) input report *before* any GPIO operations are performed (or if a malicious device/reproducer injects one), `mcp2221_raw_event()` processes the report while `mcp->gp_idx` is still `0`.
Because `mcp->gp_idx` is `0`, the expression `mcp->gp_idx - 1` results in `-1`, causing the code to access `data[-1]`. This reads out of the bounds of the URB transfer buffer, triggering the KASAN slab-out-of-bounds report.
3. **Lack of Bounds Checking**:
The function completely lacks bounds checking on the `size` parameter. It blindly accesses various offsets (like `data[50]` in the `MCP2221_I2C_PARAM_OR_STATUS` case). The expected report size for MCP2221 is 64 bytes.
### The Fix
To fix this bug comprehensively, we need to ensure that `mcp2221_raw_event()` only processes valid responses to the currently pending command, and that the report size is correct.
1. **Size Validation**: We add a check to ensure `size >= 64` at the beginning of the function. If the size is smaller, we ignore the report.
2. **Command Validation**: The driver always stores the command byte it sends in `mcp->txbuf[0]`. The MCP2221 device always echoes this command byte in the first byte of its response (`data[0]`). By checking `if (data[0] != mcp->txbuf[0])`, we can safely ignore any stray, delayed, or malicious reports that do not match the currently pending command.
Since `mcp->txbuf[0]` and `mcp->gp_idx` are always set together when sending GPIO commands, this check inherently guarantees that `mcp->gp_idx` is valid and correctly initialized for the specific command being processed, preventing the `-1` index access.
I have applied the following patch to `drivers/hid/hid-mcp2221.c`:
```c
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -858,6 +858,12 @@ static int mcp2221_raw_event(struct hid_device *hdev,
u8 *buf;
struct mcp2221 *mcp = hid_get_drvdata(hdev);
+ if (unlikely(size < 64))
+ return 1;
+
+ if (data[0] != mcp->txbuf[0])
+ return 1;
+
switch (data[0]) {
case MCP2221_I2C_WR_DATA:
```
Here are summaries of recent commits that touched the same files.
Format the summary line consistently with these, look how prefixes
are specified, letter capitalization, style, etc.
HID: mcp2221: fix OOB write in mcp2221_raw_event()
HID: mcp2221: Fix spelling mistake "Enfore" -> "Enforce"
HID: mcp2221: Add module parameter to enfoce GPIO mode
HID: mcp2221: use mcp_i2c_smbus_read for block reads
HID: mcp2221: cancel last I2C command on read error
hid: fix I2C read buffer overflow in raw_event() for mcp2221
treewide: rename GPIO set callbacks back to their original names
HID: mcp-2221: Replace manual comparison with min() macro
HID: mcp2221: set gpio pin mode
HID: mcp2221: use new line value setter callbacks
HID: mcp2221: Remove unnecessary semicolon
HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled
HID: mcp2221: Handle reads greater than 60 bytes
HID: mcp2221: Don't set bus speed on every transfer
HID: mcp2221: Set ACPI companion
HID: mcp2221: Allow IO to start during probe
HID: mcp2221: Set driver data before I2C adapter add
HID: mcp2221: fix get and get_direction for gpio
HID: mcp2221: fix report layout for gpio get
HID: mcp-2221: prevent UAF in delayed work
Reply: HID: mcp2221: fix OOB read in mcp2221_raw_event() syzbot reported a slab-out-of-bounds read in mcp2221_raw_event(). This happens because the driver does not validate the size of the incoming HID report and blindly processes it based on the command byte data[0], without verifying if the report is actually a response to the command the driver just sent. If the device sends an MCP2221_GPIO_SET (0x50) input report before any GPIO operations are performed (or if a malicious device injects one), mcp->gp_idx is still 0. The expression mcp->gp_idx - 1 results in -1, causing the code to access data[-1], which reads out of the bounds of the URB transfer buffer. To fix this, ensure that the report size is at least 64 bytes (the expected report size for MCP2221). Also, verify that the incoming report matches the currently pending command by checking data[0] != mcp->txbuf[0]. Since mcp->txbuf[0] and mcp->gp_idx are always set together when sending GPIO commands, this check inherently guarantees that mcp->gp_idx is valid and correctly initialized for the specific command being processed, preventing the out-of-bounds access. |
| 176/2 | 2026/05/19 11:38 | llm | description-generator |
0mModel:gemini-3.1-pro-preview Tokens: input: 11303 output: 297 thoughts: 1187 Thoughts: **Analyzing and Fixing the MCP2221 Driver's Out-of-Bounds Read** Okay, so I'm looking at this bug report from syzbot, and it's a slab-out-of-bounds read in `mcp2221_raw_event()`. My initial thought is that the driver isn't properly validating the input report it receives from the MCP2221 device. It seems to be blindly processing the data based on the command byte, `data[0]`, without checking if it's a legitimate response to a command the driver actually sent. The root cause appears to be that `mcp->gp_idx` can be zero in certain scenarios, specifically if the device sends an `MCP2221_GPIO_SET` (0x50) input report *before* any GPIO operations have been performed, or potentially a malicious device injects one. This leads to the expression `mcp->gp_idx - 1` evaluating to -1. The consequence of this is an attempted access of `data[-1]`, which is obviously outside the bounds of the URB transfer buffer, hence the out-of-bounds read. The solution I'm proposing involves two checks to prevent this. First, I want to ensure that the report size is at least 64 bytes. This size is the expected report size for the MCP2221. Second, and crucially, I'm verifying that the incoming report matches the currently pending command by checking that `data[0] != mcp->txbuf[0]`. Since `mcp->txbuf[0]` and `mcp->gp_idx` are always set together when the driver *sends* GPIO commands, this comparison inherently guarantees that `mcp->gp_idx` is valid and properly initialized for the specific command being processed. This effectively prevents the out-of-bounds access. I'm aiming for a commit summary of "HID: mcp2221: fix OOB read in mcp2221_raw_event()", because it mirrors the wording of a previous commit which dealt with a write issue. It's concise and accurately reflects the nature of the fix. I think the description above is a good, concise explanation of the problem and the proposed solution. I will send it off to the mailing list. |
| 177/1 | 2026/05/19 11:38 | action | format-patch-description |
0mResults:map[PatchDescription:HID: mcp2221: fix OOB read in mcp2221_raw_event() syzbot reported a slab-out-of-bounds read in mcp2221_raw_event(). This happens because the driver does not validate the size of the incoming HID report and blindly processes it based on the command byte data[0], without verifying if the report is actually a response to the command the driver just sent. If the device sends an MCP2221_GPIO_SET (0x50) input report before any GPIO operations are performed (or if a malicious device injects one), mcp->gp_idx is still 0. The expression mcp->gp_idx - 1 results in -1, causing the code to access data[-1], which reads out of the bounds of the URB transfer buffer. To fix this, ensure that the report size is at least 64 bytes (the expected report size for MCP2221). Also, verify that the incoming report matches the currently pending command by checking data[0] != mcp->txbuf[0]. Since mcp->txbuf[0] and mcp->gp_idx are always set together when sending GPIO commands, this check inherently guarantees that mcp->gp_idx is valid and correctly initialized for the specific command being processed, preventing the out-of-bounds access.] |
| 178/1 | 2026/05/19 11:38 | action | empty-tags |
0mResults:map[AckedBy:<nil> ReportedBy:<nil> ReviewedBy:<nil> TestedBy:<nil>] |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|