ID Workflow Result Correct Bug Created Started Finished Revision
2bc9e8aa patching βœ… WARNING in msft_do_close (2) 2026/08/27 19:17 2026/08/27 19:17 2026/08/27 21:25 bd6de8ec
Agent: prod-syz-agent-1
External Bug ID: ---

Inputs:
BaseBranch master
BaseCommit RC
BaseRepository git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
BugTitle WARNING in msft_do_close
CrashLogID 6119784971763712
CrashReportID 5717005824425984
KernelCommit 818bebeb63dd6bf5f4e07e145f6cdbace520a34c
KernelConfig
Show (281286 bytes)
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 syzkaller Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 14.2.0-19) 14.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=140200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24400
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24400
CONFIG_LLD_VERSION=0
CONFIG_RUSTC_VERSION=109600
CONFIG_RUST_IS_AVAILABLE=y
CONFIG_RUSTC_LLVM_VERSION=220102
CONFIG_RUSTC_LLVM_MAJOR_VERSION=22
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_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 is not set
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=5"
CONFIG_CC_MS_EXTENSIONS="-fms-extensions"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
CONFIG_CC_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_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_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"
# 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_NAMED_AS=y
CONFIG_CC_HAS_NAMED_AS_FIXED_SANITIZERS=y
CONFIG_USE_X86_SEG_SUPPORT=y
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_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_X86_X32_ABI=y
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_LTO_NONE=y
CONFIG_ARCH_SUPPORTS_CFI=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_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_CALL=y
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y
CONFIG_ARCH_HAS_ELFCORE_COMPAT=y
CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y
CONFIG_DYNAMIC_SIGFRAME=y
CONFIG_HAVE_ARCH_NODE_DEV_GROUP=y
CONFIG_ARCH_HAS_HW_PTE_YOUNG=y
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y
CONFIG_ARCH_HAS_KERNEL_FPU_SUPPORT=y
CONFIG_HAVE_GENERIC_TIF_BITS=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling

CONFIG_HAVE_GCC_PLUGINS=y
CONFIG_FUNCTION_ALIGNMENT_4B=y
CONFIG_FUNCTION_ALIGNMENT_16B=y
CONFIG_FUNCTION_ALIGNMENT=16
CONFIG_CC_HAS_MIN_FUNCTION_ALIGNMENT=y
CONFIG_CC_HAS_SANE_FUNCTION_ALIGNMENT=y
CONFIG_ARCH_HAS_CPU_ATTACK_VECTORS=y
# end of General architecture-dependent options

CONFIG_RT_MUTEXES=y
CONFIG_MODULE_SIG_FORMAT=y
CONFIG_MODULES=y
# CONFIG_MODULE_DEBUG is not set
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set
CONFIG_MODVERSIONS=y
# CONFIG_GENKSYMS is not set
CONFIG_GENDWARFKSYMS=y
CONFIG_ASM_MODVERSIONS=y
# CONFIG_EXTENDED_MODVERSIONS is not set
# CONFIG_BASIC_MODVERSIONS is not set
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_FORCE is not set
# CONFIG_MODULE_SIG_ALL is not set
CONFIG_MODULE_SIG_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_SPARSEMEM_VMEMMAP_PREINIT=y
CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=y
CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=y
CONFIG_ARCH_WANT_HUGETLB_VMEMMAP_PREINIT=y
CONFIG_HAVE_GUP_FAST=y
CONFIG_NUMA_KEEP_MEMINFO=y
CONFIG_MEMORY_ISOLATION=y
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
CONFIG_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_ARCH_SUPPORTS_PER_VMA_LOCK=y
CONFIG_PER_VMA_LOCK=y
CONFIG_LOCK_MM_AND_FIND_VMA=y
CONFIG_IOMMU_MM_DATA=y
CONFIG_EXECMEM=y
CONFIG_NUMA_MEMBLKS=y
CONFIG_NUMA_EMU=y
CONFIG_ARCH_HAS_USER_SHADOW_STACK=y
CONFIG_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_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_GOOGLE_FIRMWARE=y
# CONFIG_GOOGLE_SMI is not set
# CONFIG_GOOGLE_CBMEM is not set
CONFIG_GOOGLE_COREBOOT_TABLE=y
CONFIG_GOOGLE_MEMCONSOLE=y
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
# CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT is not set
CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y
CONFIG_GOOGLE_VPD=y

#
# Qualcomm firmware drivers
#
# 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_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_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_RPMB is not set
# CONFIG_TI_FPC202 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
# CONFIG_ISL29003 is not set
# CONFIG_ISL29020 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_VMWARE_BALLOON is not set
# CONFIG_LATTICE_ECP3_CONFIG is not set
# CONFIG_SRAM is not set
# CONFIG_DW_XDATA_PCIE is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_XILINX_SDFEC is not set
CONFIG_MISC_RTSX=y
# CONFIG_HISI_HIKEY_USB is not set
# CONFIG_OPEN_DICE is not set
# CONFIG_NTSYNC is not set
# CONFIG_VCPU_STALL_DETECTOR is not set
# CONFIG_NSM is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_MAX6875 is not set
CONFIG_EEPROM_93CX6=y
# CONFIG_EEPROM_93XX46 is not set
# CONFIG_EEPROM_IDT_89HPESX is not set
# CONFIG_EEPROM_EE1004 is not set
# CONFIG_EEPROM_M24LR is not set
# end of EEPROM support

# CONFIG_CB710_CORE is not set
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_ALTERA_STAPL is not set
CONFIG_INTEL_MEI=y
CONFIG_INTEL_MEI_ME=y
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_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
# end of Misc devices

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
CONFIG_RAID_ATTRS=y
CONFIG_SCSI_COMMON=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_CHR_DEV_SG=y
CONFIG_BLK_DEV_BSG=y
# CONFIG_CHR_DEV_SCH is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_SCSI_SAS_ATTRS=y
CONFIG_SCSI_SAS_LIBSAS=y
CONFIG_SCSI_SAS_ATA=y
# CONFIG_SCSI_SAS_HOST_SMP is not set
CONFIG_SCSI_SRP_ATTRS=y
# end of SCSI Transports

CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_ISCSI_BOOT_SYSFS is not set
# CONFIG_SCSI_CXGB3_ISCSI is not set
# CONFIG_SCSI_CXGB4_ISCSI is not set
# CONFIG_SCSI_BNX2_ISCSI is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
CONFIG_SCSI_HPSA=y
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_ESAS2R is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT3SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_MPI3MR is not set
# CONFIG_SCSI_SMARTPQI is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_MYRB is not set
# CONFIG_SCSI_MYRS is not set
# CONFIG_VMWARE_PVSCSI is not set
# CONFIG_LIBFC is not set
# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_EFCT is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_WD719X is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not set
# CONFIG_SCSI_BFA_FC is not set
CONFIG_SCSI_VIRTIO=y
# CONFIG_SCSI_CHELSIO_FCOE is not set
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
# CONFIG_SCSI_DH is not set
# end of SCSI device support

CONFIG_ATA=y
CONFIG_SATA_HOST=y
CONFIG_PATA_TIMINGS=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_FORCE=y
CONFIG_ATA_ACPI=y
# CONFIG_SATA_ZPODD is not set
CONFIG_SATA_PMP=y

#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI=y
CONFIG_SATA_MOBILE_LPM_POLICY=3
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_AHCI_DWC is not set
# CONFIG_AHCI_CEVA is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y

#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not set
CONFIG_ATA_BMDMA=y

#
# SATA SFF controllers with BMDMA
#
CONFIG_ATA_PIIX=y
# CONFIG_SATA_DWC is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set

#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
CONFIG_PATA_AMD=y
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
CONFIG_PATA_OLDPIIX=y
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
CONFIG_PATA_SCH=y
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set

#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_PCMCIA is not set
# CONFIG_PATA_OF_PLATFORM is not set
# CONFIG_PATA_RZ1000 is not set

#
# Generic fallback / legacy drivers
#
# CONFIG_PATA_ACPI is not set
CONFIG_ATA_GENERIC=y
# CONFIG_PATA_LEGACY is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_BITMAP=y
# CONFIG_MD_LLBITMAP is not set
CONFIG_MD_AUTODETECT=y
CONFIG_MD_BITMAP_FILE=y
# CONFIG_MD_LINEAR is not set
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID456=y
# CONFIG_MD_CLUSTER is not set
CONFIG_BCACHE=y
# CONFIG_BCACHE_DEBUG is not set
# CONFIG_BCACHE_ASYNC_REGISTRATION is not set
CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
CONFIG_DM_BUFIO=y
# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set
CONFIG_DM_BIO_PRISON=y
CONFIG_DM_PERSISTENT_DATA=y
# CONFIG_DM_UNSTRIPED is not set
CONFIG_DM_CRYPT=y
# CONFIG_DM_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_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
# CONFIG_NET_DSA_YT921X is not set
# end of Distributed Switch Architecture drivers

CONFIG_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_AGERE is not set
# CONFIG_NET_VENDOR_ALACRITECH is not set
CONFIG_NET_VENDOR_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_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_AQUANTIA_PHY is not set
CONFIG_AX88796B_PHY=y
# CONFIG_BROADCOM_PHY is not set
# CONFIG_BCM54140_PHY is not set
# CONFIG_BCM7XXX_PHY is not set
# CONFIG_BCM84881_PHY is not set
# CONFIG_BCM87XX_PHY is not set
# CONFIG_CICADA_PHY is not set
# CONFIG_CORTINA_PHY is not set
# CONFIG_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_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_IPWIRELESS is not set
CONFIG_N_GSM=y
CONFIG_NOZOMI=y
CONFIG_NULL_TTY=y
CONFIG_HVC_DRIVER=y
CONFIG_SERIAL_DEV_BUS=y
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
CONFIG_TTY_PRINTK=y
CONFIG_TTY_PRINTK_LEVEL=6
# CONFIG_PRINTER is not set
# CONFIG_PPDEV is not set
CONFIG_VIRTIO_CONSOLE=y
# CONFIG_IPMI_HANDLER is not set
# CONFIG_SSIF_IPMI_BMC is not set
# CONFIG_IPMB_DEVICE_INTERFACE is not set
CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_HW_RANDOM_INTEL is not set
# CONFIG_HW_RANDOM_AMD is not set
# CONFIG_HW_RANDOM_BA431 is not set
# CONFIG_HW_RANDOM_VIA is not set
CONFIG_HW_RANDOM_VIRTIO=y
# CONFIG_HW_RANDOM_CCTRNG is not set
# CONFIG_HW_RANDOM_XIPHERA is not set
# CONFIG_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_GPIO is not set
# CONFIG_SPI_LM70_LLP is not set
# CONFIG_SPI_FSL_SPI is not set
CONFIG_SPI_LJCA=y
# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set
# CONFIG_SPI_MICROCHIP_CORE_SPI is not set
# CONFIG_SPI_LANTIQ_SSC is not set
# CONFIG_SPI_OC_TINY is not set
# CONFIG_SPI_PCI1XXXX is not set
# CONFIG_SPI_PXA2XX is not set
# CONFIG_SPI_SC18IS602 is not set
# CONFIG_SPI_SIFIVE is not set
# CONFIG_SPI_MXIC is not set
# CONFIG_SPI_VIRTIO is not set
# CONFIG_SPI_XCOMM is not set
# CONFIG_SPI_XILINX is not set

#
# SPI Multiplexer support
#
# CONFIG_SPI_MUX is not set

#
# SPI Protocol Masters
#
# CONFIG_SPI_SPIDEV is not set
# CONFIG_SPI_LOOPBACK_TEST is not set
# CONFIG_SPI_TLE62X0 is not set
# CONFIG_SPI_SLAVE is not set
CONFIG_SPI_DYNAMIC=y
# CONFIG_SPMI is not set
# CONFIG_HSI is not set
CONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set

#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_PARPORT is not set
# CONFIG_PPS_CLIENT_GPIO is not set
# CONFIG_PPS_GENERATOR is not set

#
# PTP clock support
#
CONFIG_PTP_1588_CLOCK=y
CONFIG_PTP_1588_CLOCK_OPTIONAL=y

#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
#
CONFIG_PTP_1588_CLOCK_KVM=y
CONFIG_PTP_1588_CLOCK_VMCLOCK=y
# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set
# CONFIG_PTP_1588_CLOCK_IDTCM is not set
# CONFIG_PTP_1588_CLOCK_FC3W is not set
# CONFIG_PTP_1588_CLOCK_MOCK is not set
# CONFIG_PTP_1588_CLOCK_VMW is not set
# CONFIG_PTP_1588_CLOCK_OCP is not set
# CONFIG_PTP_NETC_V4_TIMER is not set
# end of PTP clock support

#
# DPLL device support
#
# CONFIG_ZL3073X_I2C is not set
# CONFIG_ZL3073X_SPI is not set
# end of DPLL device support

# CONFIG_PINCTRL is not set
CONFIG_GPIOLIB_LEGACY=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_FASTPATH_LIMIT=512
CONFIG_OF_GPIO=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIOLIB_IRQCHIP=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not set
# CONFIG_GPIO_CDEV is not set

#
# Memory mapped GPIO drivers
#
# CONFIG_GPIO_74XX_MMIO is not set
# CONFIG_GPIO_ALTERA is not set
# CONFIG_GPIO_AMDPT is not set
# CONFIG_GPIO_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_BQ256XX is not set
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
# CONFIG_BATTERY_GOLDFISH is not set
# CONFIG_BATTERY_RT5033 is not set
# CONFIG_CHARGER_RT9455 is not set
# CONFIG_CHARGER_RT9467 is not set
# CONFIG_CHARGER_RT9471 is not set
# CONFIG_CHARGER_RT9756 is not set
# CONFIG_FUEL_GAUGE_STC3117 is not set
# CONFIG_CHARGER_UCS1002 is not set
# CONFIG_CHARGER_BD99954 is not set
# CONFIG_BATTERY_SURFACE is not set
# CONFIG_CHARGER_SURFACE is not set
# CONFIG_BATTERY_UG3105 is not set
# CONFIG_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_MR75203 is not set
# CONFIG_SENSORS_ADCXX is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM70 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LM95234 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_LM95245 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_NTC_THERMISTOR is not set
# CONFIG_SENSORS_NCT6683 is not set
# CONFIG_SENSORS_NCT6775 is not set
# CONFIG_SENSORS_NCT6775_I2C is not set
# CONFIG_SENSORS_NCT7363 is not set
# CONFIG_SENSORS_NCT7802 is not set
# CONFIG_SENSORS_NCT7904 is not set
# CONFIG_SENSORS_NPCM7XX is not set
CONFIG_SENSORS_NZXT_KRAKEN2=y
# CONFIG_SENSORS_NZXT_KRAKEN3 is not set
CONFIG_SENSORS_NZXT_SMART2=y
# CONFIG_SENSORS_OCC_P8_I2C is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_PT5161L is not set
# CONFIG_SENSORS_SBTSI is not set
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SHT3x is not set
# CONFIG_SENSORS_SHT4x is not set
# CONFIG_SENSORS_SHTC1 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_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_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_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_PANEL=y

#
# Display Panels
#
# CONFIG_DRM_PANEL_ABT_Y030XX067A 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_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_IL9322 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9341 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_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_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_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_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_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_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_THINKPAD_ACPI is not set
# CONFIG_THINKPAD_LMI is not set
# CONFIG_YOGABOOK is not set
# CONFIG_YT2_1380 is not set
# CONFIG_LENOVO_WMI_GAMEZONE is not set
# CONFIG_LENOVO_WMI_TUNING is not set
# CONFIG_ACPI_QUICKSTART is not set
# CONFIG_MEEGOPAD_ANX7428 is not set
# CONFIG_MSI_EC is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_MSI_WMI is not set
# CONFIG_MSI_WMI_PLATFORM is not set
# CONFIG_PCENGINES_APU2 is not set
# CONFIG_PORTWELL_EC is not set
# CONFIG_BARCO_P50_GPIO is not set
# CONFIG_SAMSUNG_GALAXYBOOK is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_TOSHIBA_HAPS is not set
# CONFIG_TOSHIBA_WMI is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_COMPAL_LAPTOP is not set
# CONFIG_LG_LAPTOP is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_SYSTEM76_ACPI is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
# CONFIG_INSPUR_PLATFORM_PROFILE is not set
# CONFIG_DASHARO_ACPI is not set
# CONFIG_INTEL_IPS is not set
CONFIG_INTEL_SCU_IPC=y
# CONFIG_INTEL_SCU_PCI is not set
# CONFIG_INTEL_SCU_PLATFORM is not set
# CONFIG_SIEMENS_SIMATIC_IPC is not set
# CONFIG_SILICOM_PLATFORM is not set
# CONFIG_WINMATE_FM07_KEYS is not set
# CONFIG_OXP_EC is not set
# CONFIG_TUXEDO_NB04_WMI_AB is not set
CONFIG_P2SB=y
CONFIG_ACPI_WMI=y
# CONFIG_ACPI_WMI_LEGACY_DEVICE_NAMES is not set
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y
# CONFIG_LMK04832 is not set
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_SI5341 is not set
# CONFIG_COMMON_CLK_SI5351 is not set
# CONFIG_COMMON_CLK_SI514 is not set
# CONFIG_COMMON_CLK_SI544 is not set
# CONFIG_COMMON_CLK_SI570 is not set
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CDCE925 is not set
# CONFIG_COMMON_CLK_CS2000_CP is not set
# CONFIG_CLK_TWL is not set
# CONFIG_COMMON_CLK_AXI_CLKGEN is not set
# CONFIG_COMMON_CLK_RS9_PCIE is not set
# CONFIG_COMMON_CLK_SI521XX is not set
# CONFIG_COMMON_CLK_VC3 is not set
# CONFIG_COMMON_CLK_VC5 is not set
# CONFIG_COMMON_CLK_VC7 is not set
# CONFIG_COMMON_CLK_FIXED_MMIO is not set
# CONFIG_CLK_LGM_CGU is not set
# CONFIG_XILINX_VCU is not set
# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
# CONFIG_HWSPINLOCK is not set

#
# Clock Source drivers
#
CONFIG_CLKEVT_I8253=y
CONFIG_I8253_LOCK=y
CONFIG_CLKBLD_I8253=y
# end of Clock Source drivers

CONFIG_MAILBOX=y
# CONFIG_PLATFORM_MHU is not set
CONFIG_PCC=y
# CONFIG_ALTERA_MBOX is not set
# CONFIG_MAILBOX_TEST is not set
CONFIG_IOMMU_IOVA=y
CONFIG_IOMMU_API=y
CONFIG_IOMMUFD_DRIVER=y
CONFIG_IOMMU_SUPPORT=y

#
# Generic IOMMU Pagetable Support
#
# end of Generic IOMMU Pagetable Support

# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_OF_IOMMU=y
CONFIG_IOMMU_DMA=y
CONFIG_IOMMU_SVA=y
CONFIG_IOMMU_IOPF=y
CONFIG_AMD_IOMMU=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_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_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_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

#
# Frequency Synthesizers DDS/PLL
#

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

#
# Phase-Locked Loop (PLL) frequency synthesizers
#
# CONFIG_ADF4350 is not set
# CONFIG_ADF4371 is not set
# CONFIG_ADF4377 is not set
# CONFIG_ADMFM2000 is not set
# CONFIG_ADMV1013 is not set
# CONFIG_ADMV1014 is not set
# CONFIG_ADMV4420 is not set
# CONFIG_ADRF6780 is not set
# end of Phase-Locked Loop (PLL) frequency synthesizers
# end of Frequency Synthesizers DDS/PLL

#
# Digital gyroscope sensors
#
# CONFIG_ADIS16080 is not set
# CONFIG_ADIS16130 is not set
# CONFIG_ADIS16136 is not set
# CONFIG_ADIS16260 is not set
# CONFIG_ADXRS290 is not set
# CONFIG_ADXRS450 is not set
# CONFIG_BMG160 is not set
# CONFIG_FXAS21002C is not set
CONFIG_HID_SENSOR_GYRO_3D=y
# CONFIG_MPU3050_I2C is not set
# CONFIG_IIO_ST_GYRO_3AXIS is not set
# CONFIG_ITG3200 is not set
# end of Digital gyroscope sensors

#
# Health Sensors
#

#
# Heart Rate Monitors
#
# CONFIG_AFE4403 is not set
# CONFIG_AFE4404 is not set
# CONFIG_MAX30100 is not set
# CONFIG_MAX30102 is not set
# end of Heart Rate Monitors
# end of Health Sensors

#
# Humidity sensors
#
# CONFIG_AM2315 is not set
# CONFIG_DHT11 is not set
# CONFIG_ENS210 is not set
# CONFIG_HDC100X is not set
# CONFIG_HDC2010 is not set
# CONFIG_HDC3020 is not set
CONFIG_HID_SENSOR_HUMIDITY=y
# CONFIG_HTS221 is not set
# CONFIG_HTU21 is not set
# CONFIG_SI7005 is not set
# CONFIG_SI7020 is not set
# end of Humidity sensors

#
# Inertial measurement units
#
# CONFIG_ADIS16400 is not set
# CONFIG_ADIS16460 is not set
# CONFIG_ADIS16475 is not set
# CONFIG_ADIS16480 is not set
# CONFIG_ADIS16550 is not set
# CONFIG_BMI160_I2C is not set
# CONFIG_BMI160_SPI is not set
# CONFIG_BMI270_I2C is not set
# CONFIG_BMI270_SPI is not set
# CONFIG_BMI323_I2C is not set
# CONFIG_BMI323_SPI is not set
# CONFIG_BOSCH_BNO055_SERIAL is not set
# CONFIG_BOSCH_BNO055_I2C is not set
# CONFIG_FXOS8700_I2C is not set
# CONFIG_FXOS8700_SPI is not set
# CONFIG_KMX61 is not set
# CONFIG_INV_ICM42600_I2C is not set
# CONFIG_INV_ICM42600_SPI is not set
# CONFIG_INV_ICM45600_I2C is not set
# CONFIG_INV_ICM45600_SPI is not set
# CONFIG_INV_MPU6050_I2C is not set
# CONFIG_INV_MPU6050_SPI is not set
# CONFIG_SMI240 is not set
# CONFIG_SMI330_I2C is not set
# CONFIG_SMI330_SPI is not set
# CONFIG_IIO_ST_LSM6DSX is not set
# CONFIG_IIO_ST_LSM9DS0 is not set
# end of Inertial measurement units

#
# Light sensors
#
# CONFIG_ACPI_ALS is not set
# CONFIG_ADJD_S311 is not set
# CONFIG_ADUX1020 is not set
# CONFIG_AL3000A is not set
# CONFIG_AL3010 is not set
# CONFIG_AL3320A is not set
# CONFIG_APDS9160 is not set
# CONFIG_APDS9300 is not set
# CONFIG_APDS9306 is not set
# CONFIG_APDS9960 is not set
# CONFIG_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_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=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder0,binder1"
# end of Android

CONFIG_LIBNVDIMM=y
CONFIG_BLK_DEV_PMEM=y
CONFIG_ND_CLAIM=y
CONFIG_ND_BTT=y
CONFIG_BTT=y
CONFIG_ND_PFN=y
CONFIG_NVDIMM_PFN=y
CONFIG_NVDIMM_DAX=y
CONFIG_OF_PMEM=y
# CONFIG_RAMDAX 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_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_LSM_MMAP_MIN_ADDR=65536
# CONFIG_STATIC_USERMODEHELPER is not set
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9
CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
CONFIG_SECURITY_SELINUX_AVC_HASH_BITS=9
# CONFIG_SECURITY_SELINUX_DEBUG 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 is not set
# CONFIG_SECURITY_LOADPIN is not set
CONFIG_SECURITY_YAMA=y
CONFIG_SECURITY_SAFESETID=y
CONFIG_SECURITY_LOCKDOWN_LSM=y
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y
# CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set
# CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set
CONFIG_SECURITY_LANDLOCK=y
# CONFIG_SECURITY_IPE is not set
CONFIG_INTEGRITY=y
CONFIG_INTEGRITY_SIGNATURE=y
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
CONFIG_INTEGRITY_TRUSTED_KEYRING=y
CONFIG_INTEGRITY_AUDIT=y
CONFIG_IMA=y
CONFIG_IMA_MEASURE_PCR_IDX=10
CONFIG_IMA_LSM_RULES=y
CONFIG_IMA_NG_TEMPLATE=y
# CONFIG_IMA_SIG_TEMPLATE is not set
CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng"
# CONFIG_IMA_DEFAULT_HASH_SHA1 is not set
CONFIG_IMA_DEFAULT_HASH_SHA256=y
# CONFIG_IMA_DEFAULT_HASH_SHA512 is not set
# CONFIG_IMA_DEFAULT_HASH_WP512 is not set
CONFIG_IMA_DEFAULT_HASH="sha256"
CONFIG_IMA_WRITE_POLICY=y
CONFIG_IMA_READ_POLICY=y
CONFIG_IMA_APPRAISE=y
# CONFIG_IMA_ARCH_POLICY is not set
# CONFIG_IMA_APPRAISE_BUILD_POLICY is not set
# CONFIG_IMA_APPRAISE_BOOTPARAM is not set
CONFIG_IMA_APPRAISE_MODSIG=y
# CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY is not set
# CONFIG_IMA_BLACKLIST_KEYRING is not set
# CONFIG_IMA_LOAD_X509 is not set
CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS=y
CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS=y
# CONFIG_IMA_DISABLE_HTABLE is not set
# CONFIG_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_SELINUX=y
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_LSM="landlock,lockdown,yama,safesetid,integrity,tomoyo,selinux,bpf"

#
# Kernel hardening options
#

#
# Memory initialization
#
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
# CONFIG_INIT_STACK_NONE is not set
# CONFIG_INIT_STACK_ALL_PATTERN is not set
CONFIG_INIT_STACK_ALL_ZERO=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
# CONFIG_ZERO_CALL_USED_REGS is not set
# end of Memory initialization

#
# Bounds checking
#
CONFIG_FORTIFY_SOURCE=y
CONFIG_HARDENED_USERCOPY=y
# CONFIG_HARDENED_USERCOPY_DEFAULT_ON is not set
# end of Bounds checking

#
# Hardening of kernel data structures
#
CONFIG_LIST_HARDENED=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
# end of Hardening of kernel data structures

CONFIG_RANDSTRUCT_NONE=y
# 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_RANDOM32_SELFTEST is not set
CONFIG_842_COMPRESS=y
CONFIG_842_DECOMPRESS=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_LZ4_COMPRESS=y
CONFIG_LZ4HC_COMPRESS=y
CONFIG_LZ4_DECOMPRESS=y
CONFIG_ZSTD_COMMON=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_ARM64=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_RISCV=y
# CONFIG_XZ_DEC_MICROLZMA is not set
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_DECOMPRESS_LZ4=y
CONFIG_DECOMPRESS_ZSTD=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_DEC8=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=y
CONFIG_TEXTSEARCH_BM=y
CONFIG_TEXTSEARCH_FSM=y
CONFIG_INTERVAL_TREE=y
CONFIG_INTERVAL_TREE_SPAN_ITER=y
CONFIG_XARRAY_MULTI=y
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_CLOSURES=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_IOPORT_MAP=y
CONFIG_HAS_DMA=y
CONFIG_DMA_OPS_HELPERS=y
CONFIG_NEED_SG_DMA_FLAGS=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_DMA_DECLARE_COHERENT=y
CONFIG_SWIOTLB=y
# CONFIG_SWIOTLB_DYNAMIC is not set
CONFIG_DMA_NEED_SYNC=y
# CONFIG_DMA_RESTRICTED_POOL is not set
CONFIG_DMA_CMA=y
# CONFIG_DMA_NUMA_CMA is not set

#
# Default contiguous memory area size:
#
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_CMA_SIZE_PERCENTAGE=0
# CONFIG_CMA_SIZE_SEL_MBYTES is not set
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
CONFIG_CMA_SIZE_SEL_MAX=y
CONFIG_CMA_ALIGNMENT=8
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_SGL_ALLOC=y
CONFIG_CHECK_SIGNATURE=y
# CONFIG_CPUMASK_OFFSTACK is not set
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y
CONFIG_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_LANG_EXCLUDE=y
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
# CONFIG_HEADERS_INSTALL is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set
CONFIG_OBJTOOL=y
# CONFIG_OBJTOOL_WERROR is not set
CONFIG_NOINSTR_VALIDATION=y
# CONFIG_VMLINUX_MAP is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# end of Compile-time checks and compiler options

#
# Generic Kernel Debugging Instruments
#
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_ARCH_HAS_UBSAN=y
CONFIG_UBSAN=y
# CONFIG_UBSAN_TRAP is not set
CONFIG_CC_HAS_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_BOUNDS=y
CONFIG_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_SHIFT=y
# CONFIG_UBSAN_DIV_ZERO is not set
# 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
# 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_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_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
#
# end of Rust hacking
# end of Kernel hacking

CONFIG_IO_URING_ZCRX=y
CONFIG_IO_URING_BPF=y
KernelRepo git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
ReproCID 5902751684362240
ReproOpts
Show (167 bytes)
{"threaded":true,"repeat":true,"procs":4,"slowdown":1,"sandbox":"","sandbox_arg":0,"close_fds":false,"ieee802154":true,"sysctl":true,"tmpdir":true,"callcomments":true}
ReproSyzID 4813908755349504
SyzkallerCommit a2b77b9e132f4e5cfa243f5ad8f79ccc61285326
TargetArch amd64
TargetOS linux

Current Stage: upstream
Next Stage:

Reporting Stages and Comments:
Stage Source Reported At Ext ID Comments
moderation lore 2026/08/27 21:26 <23adcd6c-80ac-4fad-9c84-fcb66d5cfd6a@mail.kernel.org>
1 Comments
  • syzbot@kernel.org (2026/08/27 21:29):
    In hci_register_dev(), the power_on work item is queued to
    hdev->req_workqueue before initializing hdev->adv_monitors_idr and
    registering the MSFT extension via msft_register(). For devices marked with
    quirks such as HCI_QUIRK_RAW_DEVICE, the HCI_UNCONFIGURED flag is set on
    the device. When the power_on work item runs concurrently on another CPU,
    hci_power_on() detects that the device is unconfigured and immediately
    invokes hci_dev_do_close(), which calls msft_do_close().
    
    Concurrently, msft_register() allocates the msft structure and exposes it
    to hdev->msft_data prior to calling mutex_init(&msft->filter_lock). If
    msft_do_close() executes while hdev->msft_data is already assigned but the
    mutex has not yet been initialized, mutex_lock(&msft->filter_lock) operates
    on an uninitialized mutex, triggering a DEBUG_LOCKS warning:
    
    DEBUG_LOCKS_WARN_ON(lock->magic != lock)
    WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common
    kernel/locking/mutex.c:625 [inline]
    WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550
    kernel/locking/mutex.c:821
    ...
    Call Trace:
     <TASK>
     msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
     hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
     hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
     hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
     process_one_work kernel/workqueue.c:3322 [inline]
     process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
     worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
     kthread+0x388/0x470 kernel/kthread.c:436
     ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
     </TASK>
    
    Fix this by moving the queue_work() call in hci_register_dev() to after
    idr_init(&hdev->adv_monitors_idr) and msft_register(hdev) so that device
    structures and extensions are fully initialized before asynchronous tasks
    can access them. Additionally, assign hdev->msft_data in msft_register()
    only after mutex_init(&msft->filter_lock) has completed.
    
    Fixes: 9e14606d8f38 ("Bluetooth: msft: Extended monitor tracking by address filter")
    Assisted-by: Gemini:gemini-3.7-flash Gemini:gemini-3.1-pro-preview syzbot
    Reported-by: syzbot+14ce1b05b7d5a989abbe@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=14ce1b05b7d5a989abbe
    Link: https://syzkaller.appspot.com/ai_job?id=2bc9e8aa-ca6d-43e2-be2c-fd5d9f649d7e
    To: <linux-bluetooth@vger.kernel.org>
    To: "Luiz Augusto von Dentz" <luiz.dentz@gmail.com>
    To: "Marcel Holtmann" <marcel@holtmann.org>
    To: "Hilda Wu" <hildawu@realtek.com>
    Cc: <linux-kernel@vger.kernel.org>
    
    ---
    diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
    index 5ba9fe826..771b73c99 100644
    --- a/net/bluetooth/hci_core.c
    +++ b/net/bluetooth/hci_core.c
    @@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
     	if (error)
     		BT_WARN("register suspend notifier failed error:%d\n", error);
     
    -	queue_work(hdev->req_workqueue, &hdev->power_on);
    -
     	idr_init(&hdev->adv_monitors_idr);
     	msft_register(hdev);
     
    +	queue_work(hdev->req_workqueue, &hdev->power_on);
    +
     	return id;
     
     err_wqueue:
    diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
    index d7badce87..255163033 100644
    --- a/net/bluetooth/msft.c
    +++ b/net/bluetooth/msft.c
    @@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
     
     	INIT_LIST_HEAD(&msft->handle_map);
     	INIT_LIST_HEAD(&msft->address_filters);
    -	hdev->msft_data = msft;
     	mutex_init(&msft->filter_lock);
    +	hdev->msft_data = msft;
     }
     
     void msft_release(struct hci_dev *hdev)
    
    
    base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f
    -- 
    This is an AI-generated patch subject to moderation.
    Reply with '#syz upstream' to Sign-off the patch as a human author
    and send it to the upstream kernel mailing lists.
    Reply with '#syz reject' to reject it ('#syz unreject' to undo).
    
    See https://goo.gle/syzbot-ai-patches for information about AI-generated patches.
    You can comment on the patch as usual, syzbot will try to address
    the comments and send a new version of the patch if necessary.
    syzbot engineers can be reached at syzkaller@googlegroups.com.
    
upstream lore 2026/08/28 08:55 <7f282e86-b9fa-4a3d-8dea-208975771b35@mail.kernel.org>
3 Comments
  • syzbot@kernel.org (2026/08/28 08:59):
    From: Aleksandr Nogikh <nogikh@google.com>
    
    In hci_register_dev(), the power_on work item is queued to
    hdev->req_workqueue before initializing hdev->adv_monitors_idr and
    registering the MSFT extension via msft_register(). For devices marked with
    quirks such as HCI_QUIRK_RAW_DEVICE, the HCI_UNCONFIGURED flag is set on
    the device. When the power_on work item runs concurrently on another CPU,
    hci_power_on() detects that the device is unconfigured and immediately
    invokes hci_dev_do_close(), which calls msft_do_close().
    
    Concurrently, msft_register() allocates the msft structure and exposes it
    to hdev->msft_data prior to calling mutex_init(&msft->filter_lock). If
    msft_do_close() executes while hdev->msft_data is already assigned but the
    mutex has not yet been initialized, mutex_lock(&msft->filter_lock) operates
    on an uninitialized mutex, triggering a DEBUG_LOCKS warning:
    
    DEBUG_LOCKS_WARN_ON(lock->magic != lock)
    WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common
    kernel/locking/mutex.c:625 [inline]
    WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550
    kernel/locking/mutex.c:821
    ...
    Call Trace:
     <TASK>
     msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
     hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
     hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
     hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
     process_one_work kernel/workqueue.c:3322 [inline]
     process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
     worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
     kthread+0x388/0x470 kernel/kthread.c:436
     ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
     </TASK>
    
    Fix this by moving the queue_work() call in hci_register_dev() to after
    idr_init(&hdev->adv_monitors_idr) and msft_register(hdev) so that device
    structures and extensions are fully initialized before asynchronous tasks
    can access them. Additionally, assign hdev->msft_data in msft_register()
    only after mutex_init(&msft->filter_lock) has completed.
    
    Fixes: 9e14606d8f38 ("Bluetooth: msft: Extended monitor tracking by address filter")
    Assisted-by: Gemini:gemini-3.7-flash Gemini:gemini-3.1-pro-preview syzbot
    Reported-by: syzbot+14ce1b05b7d5a989abbe@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=14ce1b05b7d5a989abbe
    Link: https://syzkaller.appspot.com/ai_job?id=2bc9e8aa-ca6d-43e2-be2c-fd5d9f649d7e
    Signed-off-by: Aleksandr Nogikh <nogikh@google.com>
    
    ---
    diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
    index 5ba9fe826..771b73c99 100644
    --- a/net/bluetooth/hci_core.c
    +++ b/net/bluetooth/hci_core.c
    @@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
     	if (error)
     		BT_WARN("register suspend notifier failed error:%d\n", error);
     
    -	queue_work(hdev->req_workqueue, &hdev->power_on);
    -
     	idr_init(&hdev->adv_monitors_idr);
     	msft_register(hdev);
     
    +	queue_work(hdev->req_workqueue, &hdev->power_on);
    +
     	return id;
     
     err_wqueue:
    diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
    index d7badce87..255163033 100644
    --- a/net/bluetooth/msft.c
    +++ b/net/bluetooth/msft.c
    @@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
     
     	INIT_LIST_HEAD(&msft->handle_map);
     	INIT_LIST_HEAD(&msft->address_filters);
    -	hdev->msft_data = msft;
     	mutex_init(&msft->filter_lock);
    +	hdev->msft_data = msft;
     }
     
     void msft_release(struct hci_dev *hdev)
    
    
    base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f
    -- 
    See https://goo.gle/syzbot-ai-patches for information about AI-generated patches.
    The person who has signed off on the patch is responsible for
    addressing comments.
    syzbot engineers can be reached at syzkaller@googlegroups.com.
    
  • bluez.test.bot@gmail.com (2026/08/28 12:29):
    This is automated email and please do not reply to this email!
    
    Dear submitter,
    
    Thank you for submitting the patches to the linux bluetooth mailing list.
    This is a CI test results with your patch series:
    PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1153084
    
    ---Test result---
    
    Test Summary:
    CheckPatch                    PASS      0.89 seconds
    VerifyFixes                   PASS      0.11 seconds
    VerifySignedoff               PASS      0.11 seconds
    GitLint                       PASS      0.29 seconds
    SubjectPrefix                 PASS      0.10 seconds
    BuildKernel                   PASS      27.41 seconds
    CheckAllWarning               PASS      34.74 seconds
    CheckSparse                   PASS      28.58 seconds
    BuildKernel32                 PASS      25.52 seconds
    CheckKernelLLVM               SKIP      0.00 seconds
    TestRunnerSetup               PASS      466.41 seconds
    TestRunner_l2cap-tester       PASS      64.57 seconds
    TestRunner_iso-tester         PASS      132.46 seconds
    TestRunner_bnep-tester        PASS      19.08 seconds
    TestRunner_mgmt-tester        FAIL      216.23 seconds
    TestRunner_rfcomm-tester      PASS      25.55 seconds
    TestRunner_sco-tester         PASS      31.73 seconds
    TestRunner_ioctl-tester       PASS      26.83 seconds
    TestRunner_mesh-tester        FAIL      26.22 seconds
    TestRunner_smp-tester         PASS      24.29 seconds
    TestRunner_userchan-tester    PASS      20.68 seconds
    TestRunner_6lowpan-tester     PASS      24.25 seconds
    IncrementalBuild              PASS      25.80 seconds
    
    Details
    ##############################
    Test: CheckKernelLLVM - SKIP
    Desc: Build kernel with LLVM + context analysis
    Output:
    Clang not found
    ##############################
    Test: TestRunner_mgmt-tester - FAIL
    Desc: Run mgmt-tester with test-runner
    Output:
    Total: 501, Passed: 496 (99.0%), Failed: 1, Not Run: 4
    
    Failed Test Cases
    Read Exp Feature - Success                           Failed       0.236 seconds
    ##############################
    Test: TestRunner_mesh-tester - FAIL
    Desc: Run mesh-tester with test-runner
    Output:
    Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
    
    Failed Test Cases
    Mesh - Send cancel - 1                               Timed out    1.872 seconds
    Mesh - Send cancel - 2                               Timed out    1.988 seconds
    
    
    https://github.com/bluez/bluetooth-next/pull/660
    
    ---
    Regards,
    Linux Bluetooth
    
    
  • patchwork-bot@kernel.org (2026/08/31 17:24):
    Hello:
    
    This patch was applied to bluetooth/bluetooth-next.git (master)
    by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
    
    On Fri, 28 Aug 2026 08:55:09 +0000 (UTC) you wrote:
    > From: Aleksandr Nogikh <nogikh@google.com>
    > 
    > In hci_register_dev(), the power_on work item is queued to
    > hdev->req_workqueue before initializing hdev->adv_monitors_idr and
    > registering the MSFT extension via msft_register(). For devices marked with
    > quirks such as HCI_QUIRK_RAW_DEVICE, the HCI_UNCONFIGURED flag is set on
    > the device. When the power_on work item runs concurrently on another CPU,
    > hci_power_on() detects that the device is unconfigured and immediately
    > invokes hci_dev_do_close(), which calls msft_do_close().
    > 
    > [...]
    
    Here is the summary with links:
      - Bluetooth: hci_core: Fix race condition during device registration
        https://git.kernel.org/bluetooth/bluetooth-next/c/78f08df9649c
    
    You are awesome, thank you!
    -- 
    Deet-doot-dot, I am a bot.
    https://korg.docs.kernel.org/patchwork/pwbot.html
    
    
    

Decision History:
Time User Decision Source Error
2026/08/28 08:54 nogikh@google.com βœ… lore

Outputs:
AckedBy
[]
Fixes
map[AuthorEmail:hildawu@realtek.com AuthorName:Hilda Wu Hash:9e14606d8f38ea52a38c27692a9c1513c987a5da Title:Bluetooth: msft: Extended monitor tracking by address filter]
KernelBranch
master
KernelCommit
8d3ae59288f1e7d58d76558a6ee96d533bc5019f
KernelRepo
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
PatchDescription
Bluetooth: hci_core: Fix race condition during device registration

In hci_register_dev(), the power_on work item is queued to
hdev->req_workqueue before initializing hdev->adv_monitors_idr and
registering the MSFT extension via msft_register(). For devices marked with
quirks such as HCI_QUIRK_RAW_DEVICE, the HCI_UNCONFIGURED flag is set on
the device. When the power_on work item runs concurrently on another CPU,
hci_power_on() detects that the device is unconfigured and immediately
invokes hci_dev_do_close(), which calls msft_do_close().

Concurrently, msft_register() allocates the msft structure and exposes it
to hdev->msft_data prior to calling mutex_init(&msft->filter_lock). If
msft_do_close() executes while hdev->msft_data is already assigned but the
mutex has not yet been initialized, mutex_lock(&msft->filter_lock) operates
on an uninitialized mutex, triggering a DEBUG_LOCKS warning:

DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common
kernel/locking/mutex.c:625 [inline]
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550
kernel/locking/mutex.c:821
...
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Fix this by moving the queue_work() call in hci_register_dev() to after
idr_init(&hdev->adv_monitors_idr) and msft_register(hdev) so that device
structures and extensions are fully initialized before asynchronous tasks
can access them. Additionally, assign hdev->msft_data in msft_register()
only after mutex_init(&msft->filter_lock) has completed.
PatchDiff
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)
Recipients
[map[Email:linux-bluetooth@vger.kernel.org Name: To:true] map[Email:linux-kernel@vger.kernel.org Name: To:false] map[Email:luiz.dentz@gmail.com Name:Luiz Augusto von Dentz To:true] map[Email:marcel@holtmann.org Name:Marcel Holtmann To:true] map[Email:hildawu@realtek.com Name:Hilda Wu To:true]]
ReportedBy
[]
ReviewedBy
[]
SuggestedBy
[]
TestedBy
[]

Crash report:
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u34:2/5890
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x944/0x1bc0 kernel/locking/mutex.c:821, CPU#1: kworker/u34:2/5890
Modules linked in:
CPU: 1 UID: 0 PID: 5890 Comm: kworker/u34:2 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: hci0 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x94b/0x1bc0 kernel/locking/mutex.c:821
Code: 0f b6 14 11 38 d0 7c 08 84 d2 0f 85 b4 10 00 00 44 8b 05 d8 d5 7a 05 45 85 c0 75 13 48 8d 3d ac da 7d 05 48 c7 c6 a0 d2 ef 8b <67> 48 0f b9 3a 90 e9 1b f8 ff ff 4d 8d a7 f0 0a 00 00 4c 89 e7 e8
RSP: 0018:ffffc90002937890 EFLAGS: 00010246
RAX: 0000000000000003 RBX: ffff88803c0a4440 RCX: 1ffffffff2287150
RDX: 0000000000000000 RSI: ffffffff8befd2a0 RDI: ffffffff91468f60
RBP: ffffc90002937a00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 00000000000075eb R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888056a15980
FS:  0000000000000000(0000) GS:ffff8880d5ca2000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8ddaddcff8 CR3: 000000002b956000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x32e/0x6a0 net/bluetooth/msft.c:698
 hci_dev_close_sync+0x1020/0x13c0 net/bluetooth/hci_sync.c:5596
 hci_dev_do_close+0x2e/0xb0 net/bluetooth/hci_core.c:502
 hci_power_on+0x1be/0x630 net/bluetooth/hci_core.c:940
 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3387
 process_scheduled_works kernel/workqueue.c:3470 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3551
 kthread+0x373/0x450 kernel/kthread.c:436
 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	0f b6 14 11          	movzbl (%rcx,%rdx,1),%edx
   4:	38 d0                	cmp    %dl,%al
   6:	7c 08                	jl     0x10
   8:	84 d2                	test   %dl,%dl
   a:	0f 85 b4 10 00 00    	jne    0x10c4
  10:	44 8b 05 d8 d5 7a 05 	mov    0x57ad5d8(%rip),%r8d        # 0x57ad5ef
  17:	45 85 c0             	test   %r8d,%r8d
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d ac da 7d 05 	lea    0x57ddaac(%rip),%rdi        # 0x57ddacf
  23:	48 c7 c6 a0 d2 ef 8b 	mov    $0xffffffff8befd2a0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 1b f8 ff ff       	jmp    0xfffff850
  35:	4d 8d a7 f0 0a 00 00 	lea    0xaf0(%r15),%r12
  3c:	4c 89 e7             	mov    %r12,%rdi
  3f:	e8                   	.byte 0xe8

Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/08/27 19:17 flow patching
2h07m Results:
map[AckedBy:[] Fixes:map[AuthorEmail:hildawu@realtek.com AuthorName:Hilda Wu Hash:9e14606d8f38ea52a38c27692a9c1513c987a5da Title:Bluetooth: msft: Extended monitor tracking by address filter] KernelBranch:master KernelCommit:8d3ae59288f1e7d58d76558a6ee96d533bc5019f KernelRepo:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git PatchDescription:Bluetooth: hci_core: Fix race condition during device registration

In hci_register_dev(), the power_on work item is queued to
hdev->req_workqueue before initializing hdev->adv_monitors_idr and
registering the MSFT extension via msft_register(). For devices marked with
quirks such as HCI_QUIRK_RAW_DEVICE, the HCI_UNCONFIGURED flag is set on
the device. When the power_on work item runs concurrently on another CPU,
hci_power_on() detects that the device is unconfigured and immediately
invokes hci_dev_do_close(), which calls msft_do_close().

Concurrently, msft_register() allocates the msft structure and exposes it
to hdev->msft_data prior to calling mutex_init(&msft->filter_lock). If
msft_do_close() executes while hdev->msft_data is already assigned but the
mutex has not yet been initialized, mutex_lock(&msft->filter_lock) operates
on an uninitialized mutex, triggering a DEBUG_LOCKS warning:

DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common
kernel/locking/mutex.c:625 [inline]
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550
kernel/locking/mutex.c:821
...
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Fix this by moving the queue_work() call in hci_register_dev() to after
idr_init(&hdev->adv_monitors_idr) and msft_register(hdev) so that device
structures and extensions are fully initialized before asynchronous tasks
can access them. Additionally, assign hdev->msft_data in msft_register()
only after mutex_init(&msft->filter_lock) has completed. PatchDiff:diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)
 Recipients:[map[Email:linux-bluetooth@vger.kernel.org Name: To:true] map[Email:linux-kernel@vger.kernel.org Name: To:false] map[Email:luiz.dentz@gmail.com Name:Luiz Augusto von Dentz To:true] map[Email:marcel@holtmann.org Name:Marcel Holtmann To:true] map[Email:hildawu@realtek.com Name:Hilda Wu To:true]] ReportedBy:[] ReviewedBy:[] SuggestedBy:[] TestedBy:[]]

1/1 2026/08/27 19:17 action base-commit-picker
0m Results:
map[KernelBranch:master KernelCommit:8d3ae59288f1e7d58d76558a6ee96d533bc5019f KernelRepo:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git]

2/1 2026/08/27 19:17 action syz-repro-to-c-repro
0m Results:
map[SimplifiedCRepro:// autogenerated by syzkaller (https://github.com/google/syzkaller)

#define _GNU_SOURCE 

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

#ifndef __NR_fsconfig
#define __NR_fsconfig 431
#endif

uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff};

int main(void)
{
		syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	const char* reason;
	(void)reason;
				intptr_t res = 0;
	if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
//  epoll_create arguments: [
//    size: int32 = 0x628 (4 bytes)
//  ]
//  returns fd_epoll
	res = syscall(__NR_epoll_create, /*size=*/0x628);
	if (res != -1)
		r[0] = res;
//  epoll_ctl$EPOLL_CTL_ADD arguments: [
//    epfd: fd_epoll (resource)
//    op: const = 0x1 (8 bytes)
//    fd: fd (resource)
//    ev: nil
//  ]
	syscall(__NR_epoll_ctl, /*epfd=*/r[0], /*op=*/1ul, /*fd=*/(intptr_t)-1, /*ev=*/0ul);
//  ioctl$F2FS_IOC_RESIZE_FS arguments: [
//    fd: fd (resource)
//    cmd: const = 0x4008f510 (4 bytes)
//    arg: ptr[in, int64] {
//      int64 = 0x8 (8 bytes)
//    }
//  ]
*(uint64_t*)0x200000000040 = 8;
	syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x4008f510, /*arg=*/0x200000000040ul);
//  socket arguments: [
//    domain: socket_domain = 0x10 (8 bytes)
//    type: socket_type = 0x3 (8 bytes)
//    proto: int32 = 0x0 (4 bytes)
//  ]
//  returns sock
	res = syscall(__NR_socket, /*domain=AF_NETLINK*/0x10ul, /*type=SOCK_RAW*/3ul, /*proto=*/0);
	if (res != -1)
		r[1] = res;
//  getsockname$packet arguments: [
//    fd: sock_packet (resource)
//    addr: nil
//    addrlen: ptr[inout, len] {
//      len = 0x0 (4 bytes)
//    }
//  ]
*(uint32_t*)0x200000000100 = 0;
	syscall(__NR_getsockname, /*fd=*/r[1], /*addr=*/0ul, /*addrlen=*/0x200000000100ul);
//  mkdirat arguments: [
//    fd: fd_dir (resource)
//    path: ptr[in, buffer] {
//      buffer: {2e 2f 64 65 76 00} (length 0x6)
//    }
//    mode: open_mode = 0x1ff (8 bytes)
//  ]
memcpy((void*)0x200000000080, "./dev\000", 6);
	syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x200000000080ul, /*mode=S_IXOTH|S_IWOTH|S_IROTH|S_IXGRP|S_IWGRP|S_IRGRP|S_IXUSR|S_IWUSR|0x100*/0x1fful);
//  mount arguments: [
//    src: nil
//    dst: ptr[in, buffer] {
//      buffer: {2e 2f 64 65 76 00} (length 0x6)
//    }
//    type: ptr[in, buffer] {
//      buffer: {64 65 76 74 6d 70 66 73 00} (length 0x9)
//    }
//    flags: mount_flags = 0x0 (8 bytes)
//    data: nil
//  ]
memcpy((void*)0x2000000000c0, "./dev\000", 6);
memcpy((void*)0x200000000100, "devtmpfs\000", 9);
	syscall(__NR_mount, /*src=*/0ul, /*dst=*/0x2000000000c0ul, /*type=*/0x200000000100ul, /*flags=*/0ul, /*data=*/0ul);
//  openat arguments: [
//    fd: fd_dir (resource)
//    file: ptr[in, buffer] {
//      buffer: {2e 2f 64 65 76 2f 76 68 63 69 00} (length 0xb)
//    }
//    flags: open_flags = 0x2 (4 bytes)
//    mode: open_mode = 0x0 (2 bytes)
//  ]
//  returns fd
memcpy((void*)0x200000000140, "./dev/vhci\000", 11);
	res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000140ul, /*flags=O_RDWR*/2, /*mode=*/0);
	if (res != -1)
		r[2] = res;
//  fsconfig$FSCONFIG_CMD_CREATE arguments: [
//    fd: fd_fscontext (resource)
//    cmd: const = 0x6 (8 bytes)
//    key: const = 0x0 (8 bytes)
//    value: const = 0x0 (8 bytes)
//    aux: const = 0x0 (8 bytes)
//  ]
	syscall(__NR_fsconfig, /*fd=*/(intptr_t)-1, /*cmd=*/6ul, /*key=*/0ul, /*value=*/0ul, /*aux=*/0ul);
//  read$FUSE arguments: [
//    fd: fd_fuse (resource)
//    buf: ptr[out, fuse_in[read_buffer]] {
//      fuse_in[read_buffer] {
//        len: len = 0x2020 (4 bytes)
//        opcode: int32 = 0x0 (4 bytes)
//        unique: fuse_unique (resource)
//        uid: uid (resource)
//        gid: gid (resource)
//        pid: pid (resource)
//        padding: int32 = 0x0 (4 bytes)
//        payload: buffer: (DirOut)
//      }
//    }
//    len: bytesize = 0x2020 (8 bytes)
//  ]
	syscall(__NR_read, /*fd=*/r[2], /*buf=*/0x2000000002c0ul, /*len=*/0x2020ul);
//  write arguments: [
//    fd: fd (resource)
//    buf: ptr[in, buffer] {
//      buffer: {ff 80} (length 0x2)
//    }
//    count: len = 0x2 (8 bytes)
//  ]
memcpy((void*)0x200000000280, "\xff\x80", 2);
	syscall(__NR_write, /*fd=*/r[2], /*buf=*/0x200000000280ul, /*count=*/2ul);
	return 0;
}
]

3/1 2026/08/27 19:17 action kernel-checkouter
0m Results:
map[KernelSrc:/app/workdir/cache/src/b5692495be56e63dd0879dd861d23f69899ae44d]

4/1 2026/08/27 19:17 action kernel-builder
0m Results:
map[KernelObj:/app/workdir/cache/build/1c4c6cd51b8dc54cb91defbe8b0a37466fffae8d]

5/1 2026/08/27 19:17 action crash-reproducer
10m Results:
map[OtherCrashReports:<nil> ReproducedBugTitle:WARNING in msft_do_close ReproducedCrashReport:------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u11:2/5607
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#1: kworker/u11:2/5607
Modules linked in:
CPU: 1 UID: 0 PID: 5607 Comm: kworker/u11:2 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: hci3 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 29 61 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d c5 f7 aa 04 00 75 13 48 8d 3d a8 43 ae 04 48 c7 c6 c0 c5 cd 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc90004547720 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888115658000
RDX: 0000000000000000 RSI: ffffffff8bcdc5c0 RDI: ffffffff90647540
RBP: ffffc900045478b0 R08: ffffffff90612953 R09: 1ffffffff20c252a
R10: dffffc0000000000 R11: fffffbfff20c252b R12: ffff88818c5d3a40
R13: 0000000000000000 R14: 1ffff920008a8ef8 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8882e86de000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd706dfc30 CR3: 0000000118cf8000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	29 61 90             	sub    %esp,-0x70(%rcx)
   3:	48 c1 e8 03          	shr    $0x3,%rax
   7:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax
   b:	84 c0                	test   %al,%al
   d:	0f 85 47 02 00 00    	jne    0x25a
  13:	83 3d c5 f7 aa 04 00 	cmpl   $0x0,0x4aaf7c5(%rip)        # 0x4aaf7df
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d a8 43 ae 04 	lea    0x4ae43a8(%rip),%rdi        # 0x4ae43cb
  23:	48 c7 c6 c0 c5 cd 8b 	mov    $0xffffffff8bcdc5c0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 75 ee ff ff       	jmp    0xffffeeaa
  35:	90                   	nop
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	e9 48 f2 ff ff       	jmp    0xfffff286
  3e:	90                   	nop
  3f:	0f                   	.byte 0xf
 ReproducedFaultInjection:]

6/1 2026/08/27 19:28 action codesearch-prepare
0m Results:
map[Index:codesearch-index]

7/1 2026/08/27 19:28 agent debugger
13m Model:
deep-reasoning

Instruction:
You are an experienced Linux kernel developer tasked with debugging a kernel crash root cause.
You need to provide a detailed explanation of the root cause for another developer to be
able to write a fix for the bug based on your explanation. Include all relevant details
into the response: function/struct/field/etc names, code snippets, line numbers,
macro/enum values, etc.



Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.

Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash is:

------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u11:2/5607
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#1: kworker/u11:2/5607
Modules linked in:
CPU: 1 UID: 0 PID: 5607 Comm: kworker/u11:2 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: hci3 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 29 61 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d c5 f7 aa 04 00 75 13 48 8d 3d a8 43 ae 04 48 c7 c6 c0 c5 cd 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc90004547720 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888115658000
RDX: 0000000000000000 RSI: ffffffff8bcdc5c0 RDI: ffffffff90647540
RBP: ffffc900045478b0 R08: ffffffff90612953 R09: 1ffffffff20c252a
R10: dffffc0000000000 R11: fffffbfff20c252b R12: ffff88818c5d3a40
R13: 0000000000000000 R14: 1ffff920008a8ef8 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8882e86de000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd706dfc30 CR3: 0000000118cf8000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	29 61 90             	sub    %esp,-0x70(%rcx)
   3:	48 c1 e8 03          	shr    $0x3,%rax
   7:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax
   b:	84 c0                	test   %al,%al
   d:	0f 85 47 02 00 00    	jne    0x25a
  13:	83 3d c5 f7 aa 04 00 	cmpl   $0x0,0x4aaf7c5(%rip)        # 0x4aaf7df
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d a8 43 ae 04 	lea    0x4ae43a8(%rip),%rdi        # 0x4ae43cb
  23:	48 c7 c6 c0 c5 cd 8b 	mov    $0xffffffff8bcdc5c0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 75 ee ff ff       	jmp    0xffffeeaa
  35:	90                   	nop
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	e9 48 f2 ff ff       	jmp    0xfffff286
  3e:	90                   	nop
  3f:	0f                   	.byte 0xf


The following C code is a draft of the vulnerable syscall sequence. Keep in mind that
it may lack the precise threading, sandboxing, and some arguments of a working reproducer:

// autogenerated by syzkaller (https://github.com/google/syzkaller)

#define _GNU_SOURCE 

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

#ifndef __NR_fsconfig
#define __NR_fsconfig 431
#endif

uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff};

int main(void)
{
		syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	const char* reason;
	(void)reason;
				intptr_t res = 0;
	if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
//  epoll_create arguments: [
//    size: int32 = 0x628 (4 bytes)
//  ]
//  returns fd_epoll
	res = syscall(__NR_epoll_create, /*size=*/0x628);
	if (res != -1)
		r[0] = res;
//  epoll_ctl$EPOLL_CTL_ADD arguments: [
//    epfd: fd_epoll (resource)
//    op: const = 0x1 (8 bytes)
//    fd: fd (resource)
//    ev: nil
//  ]
	syscall(__NR_epoll_ctl, /*epfd=*/r[0], /*op=*/1ul, /*fd=*/(intptr_t)-1, /*ev=*/0ul);
//  ioctl$F2FS_IOC_RESIZE_FS arguments: [
//    fd: fd (resource)
//    cmd: const = 0x4008f510 (4 bytes)
//    arg: ptr[in, int64] {
//      int64 = 0x8 (8 bytes)
//    }
//  ]
*(uint64_t*)0x200000000040 = 8;
	syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x4008f510, /*arg=*/0x200000000040ul);
//  socket arguments: [
//    domain: socket_domain = 0x10 (8 bytes)
//    type: socket_type = 0x3 (8 bytes)
//    proto: int32 = 0x0 (4 bytes)
//  ]
//  returns sock
	res = syscall(__NR_socket, /*domain=AF_NETLINK*/0x10ul, /*type=SOCK_RAW*/3ul, /*proto=*/0);
	if (res != -1)
		r[1] = res;
//  getsockname$packet arguments: [
//    fd: sock_packet (resource)
//    addr: nil
//    addrlen: ptr[inout, len] {
//      len = 0x0 (4 bytes)
//    }
//  ]
*(uint32_t*)0x200000000100 = 0;
	syscall(__NR_getsockname, /*fd=*/r[1], /*addr=*/0ul, /*addrlen=*/0x200000000100ul);
//  mkdirat arguments: [
//    fd: fd_dir (resource)
//    path: ptr[in, buffer] {
//      buffer: {2e 2f 64 65 76 00} (length 0x6)
//    }
//    mode: open_mode = 0x1ff (8 bytes)
//  ]
memcpy((void*)0x200000000080, "./dev\000", 6);
	syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x200000000080ul, /*mode=S_IXOTH|S_IWOTH|S_IROTH|S_IXGRP|S_IWGRP|S_IRGRP|S_IXUSR|S_IWUSR|0x100*/0x1fful);
//  mount arguments: [
//    src: nil
//    dst: ptr[in, buffer] {
//      buffer: {2e 2f 64 65 76 00} (length 0x6)
//    }
//    type: ptr[in, buffer] {
//      buffer: {64 65 76 74 6d 70 66 73 00} (length 0x9)
//    }
//    flags: mount_flags = 0x0 (8 bytes)
//    data: nil
//  ]
memcpy((void*)0x2000000000c0, "./dev\000", 6);
memcpy((void*)0x200000000100, "devtmpfs\000", 9);
	syscall(__NR_mount, /*src=*/0ul, /*dst=*/0x2000000000c0ul, /*type=*/0x200000000100ul, /*flags=*/0ul, /*data=*/0ul);
//  openat arguments: [
//    fd: fd_dir (resource)
//    file: ptr[in, buffer] {
//      buffer: {2e 2f 64 65 76 2f 76 68 63 69 00} (length 0xb)
//    }
//    flags: open_flags = 0x2 (4 bytes)
//    mode: open_mode = 0x0 (2 bytes)
//  ]
//  returns fd
memcpy((void*)0x200000000140, "./dev/vhci\000", 11);
	res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000140ul, /*flags=O_RDWR*/2, /*mode=*/0);
	if (res != -1)
		r[2] = res;
//  fsconfig$FSCONFIG_CMD_CREATE arguments: [
//    fd: fd_fscontext (resource)
//    cmd: const = 0x6 (8 bytes)
//    key: const = 0x0 (8 bytes)
//    value: const = 0x0 (8 bytes)
//    aux: const = 0x0 (8 bytes)
//  ]
	syscall(__NR_fsconfig, /*fd=*/(intptr_t)-1, /*cmd=*/6ul, /*key=*/0ul, /*value=*/0ul, /*aux=*/0ul);
//  read$FUSE arguments: [
//    fd: fd_fuse (resource)
//    buf: ptr[out, fuse_in[read_buffer]] {
//      fuse_in[read_buffer] {
//        len: len = 0x2020 (4 bytes)
//        opcode: int32 = 0x0 (4 bytes)
//        unique: fuse_unique (resource)
//        uid: uid (resource)
//        gid: gid (resource)
//        pid: pid (resource)
//        padding: int32 = 0x0 (4 bytes)
//        payload: buffer: (DirOut)
//      }
//    }
//    len: bytesize = 0x2020 (8 bytes)
//  ]
	syscall(__NR_read, /*fd=*/r[2], /*buf=*/0x2000000002c0ul, /*len=*/0x2020ul);
//  write arguments: [
//    fd: fd (resource)
//    buf: ptr[in, buffer] {
//      buffer: {ff 80} (length 0x2)
//    }
//    count: len = 0x2 (8 bytes)
//  ]
memcpy((void*)0x200000000280, "\xff\x80", 2);
	syscall(__NR_write, /*fd=*/r[2], /*buf=*/0x200000000280ul, /*count=*/2ul);
	return 0;
}





Reply:
This crash is caused by a race condition during the registration of a new Bluetooth HCI device, specifically between the initialization of the Microsoft (MSFT) extension data and the execution of the device's `power_on` workqueue.

### Root Cause Analysis

1. **Triggering the Bug**: The syzkaller reproducer creates a Virtual HCI device (`/dev/vhci`) and writes a vendor packet with opcode `0x80` (`\xff\x80`). In `__vhci_create_device()`, this specific opcode sets the `HCI_QUIRK_RAW_DEVICE` quirk on the new HCI device and then calls `hci_register_dev(hdev)`.
2. **Device Registration**: Inside `hci_register_dev()` (`net/bluetooth/hci_core.c`), because the `HCI_QUIRK_RAW_DEVICE` quirk is set, the device is marked with the `HCI_UNCONFIGURED` flag.
3. **The Race Condition**: Towards the end of `hci_register_dev()`, the code queues the `power_on` work **before** fully initializing the device's MSFT extension and IDR:
   ```c
   	queue_work(hdev->req_workqueue, &hdev->power_on); // <--- Work is queued here

   	idr_init(&hdev->adv_monitors_idr);
   	msft_register(hdev);                              // <--- MSFT initialized here
   ```
4. **Concurrent Execution**: As soon as `queue_work()` is called, the `power_on` work can start executing concurrently on another CPU, invoking `hci_power_on()`. 
5. **Closing the Unconfigured Device**: Inside `hci_power_on()`, it checks if the device is unconfigured. Since `HCI_UNCONFIGURED` is set, it immediately bails out and calls `hci_dev_do_close(hdev)`, which in turn calls `hci_dev_close_sync(hdev)` and finally `msft_do_close(hdev)`.
6. **Uninitialized Mutex Access**: Concurrently, the original thread is executing `msft_register(hdev)` (`net/bluetooth/msft.c`):
   ```c
   	msft = kzalloc_obj(*msft);
   	// ...
   	INIT_LIST_HEAD(&msft->handle_map);
   	INIT_LIST_HEAD(&msft->address_filters);
   	hdev->msft_data = msft;               // <--- Pointer is exposed
   	mutex_init(&msft->filter_lock);       // <--- Mutex initialized AFTER exposure
   ```
   If `msft_do_close()` reads `hdev->msft_data` after it has been assigned but *before* `mutex_init()` is called, it will see a non-NULL pointer and attempt to lock the uninitialized (zeroed) mutex:
   ```c
   	mutex_lock(&msft->filter_lock);
   ```
   Locking an uninitialized mutex triggers the `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` warning seen in the crash log.

### Proposed Fix

To fix this issue, two changes should be made to ensure proper initialization ordering:

**1. Fix the initialization order in `hci_register_dev`:**
The device must be fully initialized before any work that might use it is scheduled. Move `idr_init()` and `msft_register()` to be called *before* `queue_work()`.

```c
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2631,10 +2631,10 @@ int hci_register_dev(struct hci_dev *hdev)
 		if (error)
 			BT_WARN("register suspend notifier failed error:%d\n", error);
 
-		queue_work(hdev->req_workqueue, &hdev->power_on);
-
 		idr_init(&hdev->adv_monitors_idr);
 		msft_register(hdev);
 
+		queue_work(hdev->req_workqueue, &hdev->power_on);
+
 		return id;
```

**2. Fix the pointer exposure in `msft_register`:**
As a defensive measure, `hdev->msft_data` should only be assigned *after* the structure is fully initialized. This prevents any concurrent readers from observing a partially initialized state.

```c
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,6 +764,6 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
```

8/2 2026/08/27 19:28 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7862
							output: 36
							thoughts: 319
						

Thoughts:
**Kernel Crash Analysis**

Okay, so we've got a kernel crash, specifically a `DEBUG_LOCKS_WARN_ON` triggered by a mutex issue. The error message points to `kernel/locking/mutex.c:625` – classic mutex corruption. Looks like we're hitting it during a `__mutex_lock_common` call. The CPU context is `kworker/u11:2/5607`, which immediately tells me this is happening in a kernel worker thread, likely asynchronous.

The call trace is the key. It looks like the problem is stemming from a close operation, specifically within the Microsoft Bluetooth stack: `msft_do_close` which is calling `hci_dev_close_sync`, which in turn seems to be calling `hci_dev_do_close`. Eventually we get into `hci_power_on`. So, something in this close sequence is corrupting the mutex. My initial thought is a double-free or use-after-free scenario, perhaps with the mutex being incorrectly handled in `msft_do_close`. I need to dig into the code, and my first point of call is `msft_do_close` in `net/bluetooth/msft.c:693`.



9/2 2026/08/27 19:28 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:670 LineCount:50]

Results:
map[Contents: 670:		struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
 671:		struct msft_monitor_addr_filter_data *address_filter, *n;
 672:		struct adv_monitor *monitor;
 673:	
 674:		if (!msft)
 675:			return;
 676:	
 677:		bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 678:	
 679:		/* The controller will silently remove all monitors on power off.
 680:		 * Therefore, remove handle_data mapping and reset monitor state.
 681:		 */
 682:		list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 683:			monitor = idr_find(&hdev->adv_monitors_idr,
 684:					   handle_data->mgmt_handle);
 685:	
 686:			if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED)
 687:				monitor->state = ADV_MONITOR_STATE_REGISTERED;
 688:	
 689:			list_del(&handle_data->list);
 690:			kfree(handle_data);
 691:		}
 692:	
 693:		mutex_lock(&msft->filter_lock);
 694:		list_for_each_entry_safe(address_filter, n, &msft->address_filters,
 695:					 list) {
 696:			list_del(&address_filter->list);
 697:			kfree(address_filter);
 698:		}
 699:		mutex_unlock(&msft->filter_lock);
 700:	
 701:		hci_dev_lock(hdev);
 702:	
 703:		/* Clear any devices that are being monitored and notify device lost */
 704:		hdev->advmon_pend_notify = false;
 705:		msft_monitor_device_del(hdev, 0, NULL, 0, true);
 706:	
 707:		hci_dev_unlock(hdev);
 708:	}
 709:	
 710:	static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
 711:	{
 712:		struct msft_monitor_addr_filter_data *address_filter = data;
 713:		struct msft_cp_le_cancel_monitor_advertisement cp;
 714:		struct msft_data *msft = hdev->msft_data;
 715:		struct sk_buff *skb;
 716:		int err = 0;
 717:	
 718:		if (!msft) {
 719:			bt_dev_err(hdev, "MSFT: msft data is freed");
]

10/2 2026/08/27 19:28 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9299
							output: 53
							thoughts: 79
						

Thoughts:
**Debugging a Kernel Lock Issue**

Okay, so I've got a crash, and it's pinpointed to `mutex_lock(&msft->filter_lock)` within `msft_do_close`. Not good. The warning, `DEBUG_LOCKS_WARN_ON(lock->magic != lock)`, is screaming "mutex problem!" This usually means the mutex hasn't been initialized, it's been freed, or somehow got corrupted. Time to dig in and trace the lifecycle of this `msft` structure. I need to figure out exactly where `msft` is allocated, and critically, *how* `filter_lock` is being initialized. This is almost certainly the root of the issue. Let's see if the initialization is missing or if there's a use-after-free scenario at play. Time to get the gdb set up.



11/2 2026/08/27 19:28 tool codesearch-find-references
0m Args:
map[ContextFile:net/bluetooth/msft.c IncludeSnippetLines:0 Name:msft_data SourceTreePrefix:net/bluetooth/]

Results:
map[References:[map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_add_address_filter SourceFile:net/bluetooth/msft.c SourceLine:932] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_add_address_filter_sync SourceFile:net/bluetooth/msft.c SourceLine:838] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_add_monitor_pattern SourceFile:net/bluetooth/msft.c SourceLine:1154] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_cancel_address_filter_sync SourceFile:net/bluetooth/msft.c SourceLine:714] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_do_close SourceFile:net/bluetooth/msft.c SourceLine:669] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_do_open SourceFile:net/bluetooth/msft.c SourceLine:633] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_find_address_data SourceFile:net/bluetooth/msft.c SourceLine:215] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_find_handle_data SourceFile:net/bluetooth/msft.c SourceLine:197] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_get_features SourceFile:net/bluetooth/msft.c SourceLine:1118] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_le_cancel_monitor_advertisement_cb SourceFile:net/bluetooth/msft.c SourceLine:373] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_le_monitor_advertisement_cb SourceFile:net/bluetooth/msft.c SourceLine:264] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_le_set_advertisement_filter_enable_cb SourceFile:net/bluetooth/msft.c SourceLine:1128] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_monitor_device_evt SourceFile:net/bluetooth/msft.c SourceLine:977] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_register SourceFile:net/bluetooth/msft.c SourceLine:755] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_release SourceFile:net/bluetooth/msft.c SourceLine:773] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_remove_addr_filters_sync SourceFile:net/bluetooth/msft.c SourceLine:307] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_remove_monitor SourceFile:net/bluetooth/msft.c SourceLine:1168] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_resume_sync SourceFile:net/bluetooth/msft.c SourceLine:610] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_set_filter_enable SourceFile:net/bluetooth/msft.c SourceLine:1182] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_suspend_sync SourceFile:net/bluetooth/msft.c SourceLine:451] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:msft_vendor_evt SourceFile:net/bluetooth/msft.c SourceLine:1070] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:read_supported_features SourceFile:net/bluetooth/msft.c SourceLine:142] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:reregister_monitor SourceFile:net/bluetooth/msft.c SourceLine:585]] TruncatedOutput:false]

12/2 2026/08/27 19:28 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10855
							output: 36
							thoughts: 29
						

Thoughts:
Here's my take on those functions, based on a quick glance:

**Diving into `net/bluetooth/msft.c`**

Okay, so I'm focusing on `msft_register` and `msft_release` within the Microsoft-specific Bluetooth driver code. Given my expertise, I'm already anticipating these are probably going to be pretty straightforward registration and release functions for the Microsoft-specific features within the stack. They're likely handling the initialization and cleanup of any resources tied to Microsoft's extensions or profiles that this driver supports.

`msft_register` is the one I need to pay closest attention to first. I expect it's going to involve setting up any necessary data structures, possibly registering with the Bluetooth core in some way, and maybe handling some initial handshake or capability exchange with the Microsoft-specific device. I wonder what kind of device info is being passed? Is it registering a whole stack, or just specific profiles? It’ll tell me a lot about how cleanly the Microsoft support is integrated into the mainline Bluetooth stack.

Then, with `msft_release`, I'm figuring this is the cleanup crew. Releasing any acquired resources, unregistering with the Bluetooth core, and generally ensuring a clean shutdown when the Microsoft functionality is no longer needed. I'll need to see if it’s handling any potential race conditions during release, and how robust the error handling is. A well-written release function is just as important as the registration, to avoid any memory leaks or resource deadlocks. My initial goal is to understand the fundamental lifecycle these functions define for Microsoft-specific Bluetooth support, and then I'll drill down to figure out any nuances.



13/2 2026/08/27 19:28 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:750 LineCount:50]

Results:
map[Contents: 750:		return err;
 751:	}
 752:	
 753:	void msft_register(struct hci_dev *hdev)
 754:	{
 755:		struct msft_data *msft = NULL;
 756:	
 757:		bt_dev_dbg(hdev, "Register MSFT extension");
 758:	
 759:		msft = kzalloc_obj(*msft);
 760:		if (!msft) {
 761:			bt_dev_err(hdev, "Failed to register MSFT extension");
 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
 770:	
 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
 779:	
 780:		hdev->msft_data = NULL;
 781:	
 782:		kfree(msft->evt_prefix);
 783:		mutex_destroy(&msft->filter_lock);
 784:		kfree(msft);
 785:	}
 786:	
 787:	/* This function requires the caller holds hdev->lock */
 788:	static void msft_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr,
 789:				      __u8 addr_type, __u16 mgmt_handle)
 790:	{
 791:		struct monitored_device *dev;
 792:	
 793:		dev = kmalloc_obj(*dev);
 794:		if (!dev) {
 795:			bt_dev_err(hdev, "MSFT vendor event %u: no memory",
 796:				   MSFT_EV_LE_MONITOR_DEVICE);
 797:			return;
 798:		}
 799:	
]

14/2 2026/08/27 19:28 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11973
							output: 108
							thoughts: 205
						

Thoughts:
**Analyzing the `msft` Resource Management**

Okay, so I'm looking at this `msft` structure and its lifecycle. `msft_register` is responsible for allocating and initializing `msft`, along with the `filter_lock` associated with it, which is standard practice. `msft_release` then handles the cleanup: freeing the `msft` memory and destroying the `filter_lock`. The potential issue that's immediately jumping out at me is the classic use-after-free scenario. If `msft_do_close` is called *after* `msft_release`, it's going to try and access a memory location that's no longer valid – a guaranteed crash. Even more concerning, a concurrent call to `msft_do_close` with `msft_release` could create a race condition, where the access becomes dependent on timing and could become inconsistent.

Wait a second, there's a sanity check! `msft_do_close` includes `if (!msft) return;`. Okay, that's promising; it's explicitly checking for a null pointer before attempting to do anything. If `msft_release` sets `hdev->msft_data = NULL;`, then `msft_do_close` will see `NULL` if called after the `msft_release` call. But, there is still the concurrent access case, where `msft_do_close` could see a valid, non-NULL pointer, but `msft_release` could free it out from under it. That's still a race, and could lead to corruption or even a crash if the timing is wrong.

Now I need to understand the calling contexts. Time to dig into where `msft_release` and `msft_do_close` are called from. I need to be sure the checks are sufficient and if any of the assumptions made about the null check are valid given the use of the `msft` object throughout.



15/2 2026/08/27 19:29 tool codesearch-find-references
0m Args:
map[ContextFile:net/bluetooth/msft.c IncludeSnippetLines:0 Name:msft_release SourceTreePrefix:net/bluetooth/]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hci_release_dev SourceFile:net/bluetooth/hci_core.c SourceLine:2731]] TruncatedOutput:false]

16/2 2026/08/27 19:29 tool codesearch-find-references
0m Args:
map[ContextFile:net/bluetooth/msft.c IncludeSnippetLines:0 Name:msft_do_close SourceTreePrefix:net/bluetooth/]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hci_dev_close_sync SourceFile:net/bluetooth/hci_sync.c SourceLine:5522]] TruncatedOutput:false]

17/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12855
							output: 76
							thoughts: 60
						

Thoughts:
Here's my analysis of those function calls:

**Tracing Resource Release in the HCI Device Lifecycle**

Okay, so I'm looking at the resource cleanup sequence for these HCI devices. I see that `msft_do_close` is initiated by a call from `hci_dev_close_sync`. That's the device's synchronous closing function, so it makes sense that the Microsoft-specific closing routine (`msft_do_close`) would be triggered from there. It's likely handling cleanup tasks specific to the Microsoft implementation or associated drivers. Now, I should double check to see if there is any overlap in resource release between that and the HCI core itself.

Then, there's `msft_release` – that's called from `hci_release_dev`. `hci_release_dev`, I assume, is the standard HCI device release function. That makes perfect sense. The Microsoft-specific release function would be called as part of the more general cleanup process when the device is fully released. It sounds like `hci_release_dev` is the final step, and `msft_release` is specifically handling Microsoft-related cleanup before the HCI device is destroyed. I need to dive deeper into `hci_dev_close_sync` and `hci_release_dev` to understand the exact sequence, what resources they are freeing, and make sure there are no leaks. Let me get into those and see if anything jumps out.



18/2 2026/08/27 19:29 tool read-file
0m Args:
map[File:net/bluetooth/hci_sync.c FirstLine:5500 LineCount:50]

Results:
map[Contents:5500:	
5501:		hci_dev_lock(hdev);
5502:	
5503:		hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
5504:	
5505:		auto_off = hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF);
5506:	
5507:		if (!auto_off && !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
5508:		    hci_dev_test_flag(hdev, HCI_MGMT))
5509:			__mgmt_power_off(hdev);
5510:	
5511:		hci_inquiry_cache_flush(hdev);
5512:		hci_pend_le_actions_clear(hdev);
5513:		hci_conn_hash_flush(hdev);
5514:		/* Prevent data races on hdev->smp_data or hdev->smp_bredr_data */
5515:		smp_unregister(hdev);
5516:		hci_dev_unlock(hdev);
5517:	
5518:		hci_sock_dev_event(hdev, HCI_DEV_DOWN);
5519:	
5520:		if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
5521:			aosp_do_close(hdev);
5522:			msft_do_close(hdev);
5523:		}
5524:	
5525:		if (hdev->flush)
5526:			hdev->flush(hdev);
5527:	
5528:		/* Reset device */
5529:		skb_queue_purge(&hdev->cmd_q);
5530:		atomic_set(&hdev->cmd_cnt, 1);
5531:		hdev->acl_cnt = 0;
5532:		hdev->sco_cnt = 0;
5533:		hdev->le_cnt = 0;
5534:		hdev->iso_cnt = 0;
5535:		if (hci_test_quirk(hdev, HCI_QUIRK_RESET_ON_CLOSE) &&
5536:		    !auto_off && !hci_dev_test_flag(hdev, HCI_UNCONFIGURED)) {
5537:			set_bit(HCI_INIT, &hdev->flags);
5538:			hci_reset_sync(hdev);
5539:			clear_bit(HCI_INIT, &hdev->flags);
5540:		}
5541:	
5542:		/* flush cmd  work */
5543:		flush_work(&hdev->cmd_work);
5544:	
5545:		/* Drop queues */
5546:		skb_queue_purge(&hdev->rx_q);
5547:		skb_queue_purge(&hdev->cmd_q);
5548:		skb_queue_purge(&hdev->raw_q);
5549:	
]

19/2 2026/08/27 19:29 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2700 LineCount:50]

Results:
map[Contents:2700:		/* Actual cleanup is deferred until hci_release_dev(). */
2701:		hci_dev_put(hdev);
2702:	}
2703:	EXPORT_SYMBOL(hci_unregister_dev);
2704:	
2705:	/* Release HCI device */
2706:	void hci_release_dev(struct hci_dev *hdev)
2707:	{
2708:		debugfs_remove_recursive(hdev->debugfs);
2709:		kfree_const(hdev->hw_info);
2710:		kfree_const(hdev->fw_info);
2711:	
2712:		destroy_workqueue(hdev->workqueue);
2713:		destroy_workqueue(hdev->req_workqueue);
2714:	
2715:		hci_dev_lock(hdev);
2716:		hci_bdaddr_list_clear(&hdev->reject_list);
2717:		hci_bdaddr_list_clear(&hdev->accept_list);
2718:		hci_uuids_clear(hdev);
2719:		hci_link_keys_clear(hdev);
2720:		hci_smp_ltks_clear(hdev);
2721:		hci_smp_irks_clear(hdev);
2722:		hci_remote_oob_data_clear(hdev);
2723:		hci_adv_instances_clear(hdev);
2724:		hci_adv_monitors_clear(hdev);
2725:		hci_bdaddr_list_clear(&hdev->le_accept_list);
2726:		hci_bdaddr_list_clear(&hdev->le_resolv_list);
2727:		hci_conn_params_clear_all(hdev);
2728:		hci_discovery_filter_clear(hdev);
2729:		hci_blocked_keys_clear(hdev);
2730:		hci_codec_list_clear(&hdev->local_codecs);
2731:		msft_release(hdev);
2732:		hci_dev_unlock(hdev);
2733:	
2734:		ida_destroy(&hdev->unset_handle_ida);
2735:		ida_free(&hci_index_ida, hdev->id);
2736:		kfree_skb(hdev->sent_cmd);
2737:		kfree_skb(hdev->req_skb);
2738:		kfree_skb(hdev->recv_event);
2739:		kfree(hdev);
2740:	}
2741:	EXPORT_SYMBOL(hci_release_dev);
2742:	
2743:	int hci_register_suspend_notifier(struct hci_dev *hdev)
2744:	{
2745:		int ret = 0;
2746:	
2747:		if (!hdev->suspend_notifier.notifier_call &&
2748:		    !hci_test_quirk(hdev, HCI_QUIRK_NO_SUSPEND_NOTIFIER)) {
2749:			hdev->suspend_notifier.notifier_call = hci_suspend_notifier;
]

20/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15012
							output: 37
							thoughts: 224
						

Thoughts:
**Analyzing the Bluetooth HCI Device Release Path**

Okay, so I'm trying to figure out the exact sequence for releasing this Bluetooth HCI device. I see that `msft_release` is called within `hci_release_dev`. And `hci_release_dev`, I know, gets triggered when the device's reference count hits zero. But there's this weirdness: `hci_dev_close_sync` is also called from `hci_power_on`. That seems like a potential conflict, so I need to understand that better.

Let me go back and look at the call trace again to make sure I'm not missing anything:

```
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
```

Okay, confirmed. So, I need to check out what's happening within `hci_power_on` specifically. Let's dig into that `net/bluetooth/hci_core.c:937` and see what it's actually doing with `hci_dev_close_sync`. I'm guessing there's a specific condition or scenario where that's called during the power-on sequence that I need to understand.



21/2 2026/08/27 19:29 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:910 LineCount:50]

Results:
map[Contents: 910:	
 911:		if (test_bit(HCI_UP, &hdev->flags) &&
 912:		    hci_dev_test_flag(hdev, HCI_MGMT) &&
 913:		    hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF)) {
 914:			cancel_delayed_work(&hdev->power_off);
 915:			err = hci_powered_update_sync(hdev);
 916:			mgmt_power_on(hdev, err);
 917:			return;
 918:		}
 919:	
 920:		err = hci_dev_do_open(hdev);
 921:		if (err < 0) {
 922:			hci_dev_lock(hdev);
 923:			mgmt_set_powered_failed(hdev, err);
 924:			hci_dev_unlock(hdev);
 925:			return;
 926:		}
 927:	
 928:		/* During the HCI setup phase, a few error conditions are
 929:		 * ignored and they need to be checked now. If they are still
 930:		 * valid, it is important to turn the device back off.
 931:		 */
 932:		if (hci_dev_test_flag(hdev, HCI_RFKILLED) ||
 933:		    hci_dev_test_flag(hdev, HCI_UNCONFIGURED) ||
 934:		    (!bacmp(&hdev->bdaddr, BDADDR_ANY) &&
 935:		     !bacmp(&hdev->static_addr, BDADDR_ANY))) {
 936:			hci_dev_clear_flag(hdev, HCI_AUTO_OFF);
 937:			hci_dev_do_close(hdev);
 938:		} else if (hci_dev_test_flag(hdev, HCI_AUTO_OFF)) {
 939:			queue_delayed_work(hdev->req_workqueue, &hdev->power_off,
 940:					   HCI_AUTO_OFF_TIMEOUT);
 941:		}
 942:	
 943:		if (hci_dev_test_and_clear_flag(hdev, HCI_SETUP)) {
 944:			/* For unconfigured devices, set the HCI_RAW flag
 945:			 * so that userspace can easily identify them.
 946:			 */
 947:			if (hci_dev_test_flag(hdev, HCI_UNCONFIGURED))
 948:				set_bit(HCI_RAW, &hdev->flags);
 949:	
 950:			/* For fully configured devices, this will send
 951:			 * the Index Added event. For unconfigured devices,
 952:			 * it will send Unconfigued Index Added event.
 953:			 *
 954:			 * Devices with HCI_QUIRK_RAW_DEVICE are ignored
 955:			 * and no event will be send.
 956:			 */
 957:			mgmt_index_added(hdev);
 958:		} else if (hci_dev_test_and_clear_flag(hdev, HCI_CONFIG)) {
 959:			/* When the controller is now configured, then it
]

22/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16521
							output: 53
							thoughts: 67
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as my own mental process:

**Diving into Bluetooth Device Power-On**

Right, so I'm looking at this `hci_power_on` function. Immediately, I see it's handling a device that's either not set up correctly or doesn't even have a valid address. In either of those cases, it jumps to `hci_dev_do_close(hdev)`. Okay, that makes sense - we need to clean things up if there's an issue during initialization.

Hold on a second... `hci_dev_do_close` then goes ahead and calls `hci_dev_close_sync`. I'm going to want to understand what's in that sequence. That seems pretty standard.

Now, my real question is - where does `msft_register` come into play in this entire flow? I need to understand how the Microsoft-specific registration is tied to the device power-on and close operations. I'm going to look at the surrounding calls to ensure I don't miss anything. I'll need to trace the call paths to be sure.



23/2 2026/08/27 19:29 tool codesearch-find-references
0m Args:
map[ContextFile:net/bluetooth/msft.c IncludeSnippetLines:0 Name:msft_register SourceTreePrefix:net/bluetooth/]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hci_register_dev SourceFile:net/bluetooth/hci_core.c SourceLine:2635]] TruncatedOutput:false]

24/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16960
							output: 38
							thoughts: 46
						

Thoughts:
Okay, let's break this down.

**Diving into the Bluetooth HCI Device Registration**

Right, so `msft_register` is invoked within `hci_register_dev`. Interesting.  I need to understand what's happening in `hci_register_dev` since that's where the Microsoft-specific registration is occurring.  Time to pull up the source code, specifically `net/bluetooth/hci_core.c:2635`. I'm expecting to see the standard device registration flow, but with `msft_register` added in for Microsoft's proprietary handling, whatever that may be. I'm hoping it's well-integrated and doesn't introduce any obvious red flags in the base device initialization. Let's see what the function does and where that `msft_register` is called.



25/2 2026/08/27 19:29 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2610 LineCount:50]

Results:
map[Contents:2610:		list_add(&hdev->list, &hci_dev_list);
2611:		write_unlock(&hci_dev_list_lock);
2612:	
2613:		/* Devices that are marked for raw-only usage are unconfigured
2614:		 * and should not be included in normal operation.
2615:		 */
2616:		if (hci_test_quirk(hdev, HCI_QUIRK_RAW_DEVICE))
2617:			hci_dev_set_flag(hdev, HCI_UNCONFIGURED);
2618:	
2619:		/* Mark Remote Wakeup connection flag as supported if driver has wakeup
2620:		 * callback.
2621:		 */
2622:		if (hdev->wakeup)
2623:			hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
2624:	
2625:		hci_sock_dev_event(hdev, HCI_DEV_REG);
2626:		hci_dev_hold(hdev);
2627:	
2628:		error = hci_register_suspend_notifier(hdev);
2629:		if (error)
2630:			BT_WARN("register suspend notifier failed error:%d\n", error);
2631:	
2632:		queue_work(hdev->req_workqueue, &hdev->power_on);
2633:	
2634:		idr_init(&hdev->adv_monitors_idr);
2635:		msft_register(hdev);
2636:	
2637:		return id;
2638:	
2639:	err_wqueue:
2640:		debugfs_remove_recursive(hdev->debugfs);
2641:		destroy_workqueue(hdev->workqueue);
2642:		destroy_workqueue(hdev->req_workqueue);
2643:	err:
2644:		ida_free(&hci_index_ida, hdev->id);
2645:	
2646:		return error;
2647:	}
2648:	EXPORT_SYMBOL(hci_register_dev);
2649:	
2650:	/* Unregister HCI device */
2651:	void hci_unregister_dev(struct hci_dev *hdev)
2652:	{
2653:		BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
2654:	
2655:		mutex_lock(&hdev->unregister_lock);
2656:		hci_dev_set_flag(hdev, HCI_UNREGISTER);
2657:		mutex_unlock(&hdev->unregister_lock);
2658:	
2659:		write_lock(&hci_dev_list_lock);
]

26/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17997
							output: 36
							thoughts: 404
						

Thoughts:
**My Concerns Regarding Concurrency in MSFT Extension Registration**

Okay, hold on a second! I just realized something critical about the execution order here. The `queue_work(hdev->req_workqueue, &hdev->power_on);` call happens *before* `msft_register(hdev);`. If that `power_on` work gets dispatched immediately, it'll trigger `hci_power_on`, which, in turn, calls `hci_dev_do_close` and then `msft_do_close`. Now, in `msft_do_close`, it checks `if (!msft)`, where `msft` is assigned `hdev->msft_data`.

Initially, that's safe because if `msft_register` hasn't run yet, `hdev->msft_data` is `NULL`, so `msft_do_close` just exits gracefully. But here's the kicker: what if `msft_register` and `msft_do_close` run concurrently?

Let me review the code for `msft_register` really quickly. Okay, I see it's allocating `msft` with `kzalloc_obj`, and then there are initializations for the lists: `INIT_LIST_HEAD(&msft->handle_map);` and `INIT_LIST_HEAD(&msft->address_filters);`. And then the crucial part: `hdev->msft_data = msft;` followed by `mutex_init(&msft->filter_lock);`.

The issue is this: if `hdev->msft_data = msft;` executes *before* `mutex_init(&msft->filter_lock);`, then `msft_do_close` might read `hdev->msft_data`, see that it's *not* NULL anymore, and try to lock the mutex *before* it's been initialized, by calling `mutex_lock(&msft->filter_lock)`.

I need to make sure that order of execution is consistent. I need to make sure `hdev->msft_data = msft;` is performed only *after* the MSFT structure is fully initialized, including the mutex.

Hang on... isn't `mutex_init` a macro? I should check what that expands to. Let me refresh my memory of that...



27/2 2026/08/27 19:29 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:750 LineCount:25]

Results:
map[Contents: 750:		return err;
 751:	}
 752:	
 753:	void msft_register(struct hci_dev *hdev)
 754:	{
 755:		struct msft_data *msft = NULL;
 756:	
 757:		bt_dev_dbg(hdev, "Register MSFT extension");
 758:	
 759:		msft = kzalloc_obj(*msft);
 760:		if (!msft) {
 761:			bt_dev_err(hdev, "Failed to register MSFT extension");
 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
 770:	
 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
]

28/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19303
							output: 26
							thoughts: 440
						

Thoughts:
**The "Aha!" Moment and Debugging Deep Dive**

Yes! I think I've got it. That code snippet...

```c
hdev->msft_data = msft;
mutex_init(&msft->filter_lock);
```

...that sequence is problematic. If `hdev->msft_data` gets assigned *before* `mutex_init` is called, another thread could read that pointer and try to grab the lock *before* it's initialized. But wait...`kzalloc_obj` zero's the memory. Okay, so `msft->filter_lock` is just zeroes initially. If I call `mutex_lock` on that, `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` should trigger because `magic` is `0`, not the address of the lock. Brilliant! That perfectly explains the crash I've been seeing.

Alright, let's confirm if `msft_do_close` could be called from a `power_on` work.

Looking at `hci_register_dev`, I see:

```c
queue_work(hdev->req_workqueue, &hdev->power_on);

idr_init(&hdev->adv_monitors_idr);
msft_register(hdev);
```

The `power_on` work is queued on `hdev->req_workqueue`. The associated function is `hci_power_on`. So, is it possible for that to lead to the bad code path? `hci_power_on` might call `hci_dev_do_close(hdev)` if `hci_dev_test_flag(hdev, HCI_UNCONFIGURED)` is true. Let's dig deeper, is `HCI_UNCONFIGURED` set? In `hci_register_dev` there is this code:

```c
if (hci_test_quirk(hdev, HCI_QUIRK_RAW_DEVICE))
		hci_dev_set_flag(hdev, HCI_UNCONFIGURED);
```
Or maybe somewhere else. But wait a moment, this syzkaller program uses `vhci` (Virtual HCI)! Time to focus on the `vhci` driver.



29/2 2026/08/27 19:29 tool grepper
0m Args:
map[Expression:vhci PathPrefix:drivers/bluetooth/]

Results:
map[Output:drivers/bluetooth/Kconfig=340=config BT_HCIVHCI
--
drivers/bluetooth/Kconfig-347-	  Say Y here to compile support for virtual HCI devices into the
drivers/bluetooth/Kconfig:348:	  kernel or say M to compile it as module (hci_vhci).
drivers/bluetooth/Kconfig-349-
--
drivers/bluetooth/Makefile-5-
drivers/bluetooth/Makefile:6:obj-$(CONFIG_BT_HCIVHCI)	+= hci_vhci.o
drivers/bluetooth/Makefile-7-obj-$(CONFIG_BT_HCIUART)	+= hci_uart.o
--
drivers/bluetooth/hci_vhci.c=32=static bool amp;
drivers/bluetooth/hci_vhci.c-33-
drivers/bluetooth/hci_vhci.c:34:struct vhci_data {
drivers/bluetooth/hci_vhci.c-35-	struct hci_dev *hdev;
--
drivers/bluetooth/hci_vhci.c-50-
drivers/bluetooth/hci_vhci.c:51:static int vhci_open_dev(struct hci_dev *hdev)
drivers/bluetooth/hci_vhci.c-52-{
--
drivers/bluetooth/hci_vhci.c-55-
drivers/bluetooth/hci_vhci.c:56:static int vhci_close_dev(struct hci_dev *hdev)
drivers/bluetooth/hci_vhci.c-57-{
drivers/bluetooth/hci_vhci.c:58:	struct vhci_data *data = hci_get_drvdata(hdev);
drivers/bluetooth/hci_vhci.c-59-
--
drivers/bluetooth/hci_vhci.c-64-
drivers/bluetooth/hci_vhci.c:65:static int vhci_flush(struct hci_dev *hdev)
drivers/bluetooth/hci_vhci.c-66-{
drivers/bluetooth/hci_vhci.c:67:	struct vhci_data *data = hci_get_drvdata(hdev);
drivers/bluetooth/hci_vhci.c-68-
--
drivers/bluetooth/hci_vhci.c-73-
drivers/bluetooth/hci_vhci.c:74:static int vhci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
drivers/bluetooth/hci_vhci.c-75-{
drivers/bluetooth/hci_vhci.c:76:	struct vhci_data *data = hci_get_drvdata(hdev);
drivers/bluetooth/hci_vhci.c-77-
--
drivers/bluetooth/hci_vhci.c-86-
drivers/bluetooth/hci_vhci.c:87:static int vhci_get_data_path_id(struct hci_dev *hdev, u8 *data_path_id)
drivers/bluetooth/hci_vhci.c-88-{
--
drivers/bluetooth/hci_vhci.c-92-
drivers/bluetooth/hci_vhci.c:93:static int vhci_get_codec_config_data(struct hci_dev *hdev, __u8 type,
drivers/bluetooth/hci_vhci.c-94-				      struct bt_codec *codec, __u8 *vnd_len,
--
drivers/bluetooth/hci_vhci.c-104-
drivers/bluetooth/hci_vhci.c:105:static bool vhci_wakeup(struct hci_dev *hdev)
drivers/bluetooth/hci_vhci.c-106-{
drivers/bluetooth/hci_vhci.c:107:	struct vhci_data *data = hci_get_drvdata(hdev);
drivers/bluetooth/hci_vhci.c-108-
--
drivers/bluetooth/hci_vhci.c=112=static ssize_t force_suspend_read(struct file *file, char __user *user_buf,
--
drivers/bluetooth/hci_vhci.c-114-{
drivers/bluetooth/hci_vhci.c:115:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-116-	char buf[3];
--
drivers/bluetooth/hci_vhci.c-123-
drivers/bluetooth/hci_vhci.c:124:static void vhci_suspend_work(struct work_struct *work)
drivers/bluetooth/hci_vhci.c-125-{
drivers/bluetooth/hci_vhci.c:126:	struct vhci_data *data = container_of(work, struct vhci_data,
drivers/bluetooth/hci_vhci.c-127-					      suspend_work);
--
drivers/bluetooth/hci_vhci.c=135=static ssize_t force_suspend_write(struct file *file,
--
drivers/bluetooth/hci_vhci.c-138-{
drivers/bluetooth/hci_vhci.c:139:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-140-	bool enable;
--
drivers/bluetooth/hci_vhci.c=164=static ssize_t force_wakeup_read(struct file *file, char __user *user_buf,
--
drivers/bluetooth/hci_vhci.c-166-{
drivers/bluetooth/hci_vhci.c:167:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-168-	char buf[3];
--
drivers/bluetooth/hci_vhci.c=176=static ssize_t force_wakeup_write(struct file *file,
--
drivers/bluetooth/hci_vhci.c-179-{
drivers/bluetooth/hci_vhci.c:180:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-181-	bool enable;
--
drivers/bluetooth/hci_vhci.c=203=static int msft_opcode_set(void *data, u64 val)
drivers/bluetooth/hci_vhci.c-204-{
drivers/bluetooth/hci_vhci.c:205:	struct vhci_data *vhci = data;
drivers/bluetooth/hci_vhci.c-206-
--
drivers/bluetooth/hci_vhci.c-209-
drivers/bluetooth/hci_vhci.c:210:	if (vhci->msft_opcode)
drivers/bluetooth/hci_vhci.c-211-		return -EALREADY;
drivers/bluetooth/hci_vhci.c-212-
drivers/bluetooth/hci_vhci.c:213:	vhci->msft_opcode = val;
drivers/bluetooth/hci_vhci.c-214-
--
drivers/bluetooth/hci_vhci.c=218=static int msft_opcode_get(void *data, u64 *val)
drivers/bluetooth/hci_vhci.c-219-{
drivers/bluetooth/hci_vhci.c:220:	struct vhci_data *vhci = data;
drivers/bluetooth/hci_vhci.c-221-
drivers/bluetooth/hci_vhci.c:222:	*val = vhci->msft_opcode;
drivers/bluetooth/hci_vhci.c-223-
--
drivers/bluetooth/hci_vhci.c=230=static ssize_t aosp_capable_read(struct file *file, char __user *user_buf,
--
drivers/bluetooth/hci_vhci.c-232-{
drivers/bluetooth/hci_vhci.c:233:	struct vhci_data *vhci = file->private_data;
drivers/bluetooth/hci_vhci.c-234-	char buf[3];
drivers/bluetooth/hci_vhci.c-235-
drivers/bluetooth/hci_vhci.c:236:	buf[0] = vhci->aosp_capable ? 'Y' : 'N';
drivers/bluetooth/hci_vhci.c-237-	buf[1] = '\n';
--
drivers/bluetooth/hci_vhci.c=242=static ssize_t aosp_capable_write(struct file *file,
--
drivers/bluetooth/hci_vhci.c-245-{
drivers/bluetooth/hci_vhci.c:246:	struct vhci_data *vhci = file->private_data;
drivers/bluetooth/hci_vhci.c-247-	bool enable;
--
drivers/bluetooth/hci_vhci.c-256-
drivers/bluetooth/hci_vhci.c:257:	if (vhci->aosp_capable)
drivers/bluetooth/hci_vhci.c-258-		return -EALREADY;
drivers/bluetooth/hci_vhci.c-259-
drivers/bluetooth/hci_vhci.c:260:	vhci->aosp_capable = enable;
drivers/bluetooth/hci_vhci.c-261-
--
drivers/bluetooth/hci_vhci.c=265=static const struct file_operations aosp_capable_fops = {
--
drivers/bluetooth/hci_vhci.c-271-
drivers/bluetooth/hci_vhci.c:272:static int vhci_setup(struct hci_dev *hdev)
drivers/bluetooth/hci_vhci.c-273-{
drivers/bluetooth/hci_vhci.c:274:	struct vhci_data *vhci = hci_get_drvdata(hdev);
drivers/bluetooth/hci_vhci.c-275-
drivers/bluetooth/hci_vhci.c:276:	if (vhci->msft_opcode)
drivers/bluetooth/hci_vhci.c:277:		hci_set_msft_opcode(hdev, vhci->msft_opcode);
drivers/bluetooth/hci_vhci.c-278-
drivers/bluetooth/hci_vhci.c:279:	if (vhci->aosp_capable)
drivers/bluetooth/hci_vhci.c-280-		hci_set_aosp_capable(hdev);
--
drivers/bluetooth/hci_vhci.c-284-
drivers/bluetooth/hci_vhci.c:285:static void vhci_coredump(struct hci_dev *hdev)
drivers/bluetooth/hci_vhci.c-286-{
--
drivers/bluetooth/hci_vhci.c-289-
drivers/bluetooth/hci_vhci.c:290:static void vhci_coredump_hdr(struct hci_dev *hdev, struct sk_buff *skb)
drivers/bluetooth/hci_vhci.c-291-{
--
drivers/bluetooth/hci_vhci.c-293-
drivers/bluetooth/hci_vhci.c:294:	buf = "Controller Name: vhci_ctrl\n";
drivers/bluetooth/hci_vhci.c-295-	skb_put_data(skb, buf, strlen(buf));
drivers/bluetooth/hci_vhci.c-296-
drivers/bluetooth/hci_vhci.c:297:	buf = "Firmware Version: vhci_fw\n";
drivers/bluetooth/hci_vhci.c-298-	skb_put_data(skb, buf, strlen(buf));
drivers/bluetooth/hci_vhci.c-299-
drivers/bluetooth/hci_vhci.c:300:	buf = "Driver: vhci_drv\n";
drivers/bluetooth/hci_vhci.c-301-	skb_put_data(skb, buf, strlen(buf));
drivers/bluetooth/hci_vhci.c-302-
drivers/bluetooth/hci_vhci.c:303:	buf = "Vendor: vhci\n";
drivers/bluetooth/hci_vhci.c-304-	skb_put_data(skb, buf, strlen(buf));
--
drivers/bluetooth/hci_vhci.c=323=static ssize_t force_devcd_write(struct file *file, const char __user *user_buf,
--
drivers/bluetooth/hci_vhci.c-325-{
drivers/bluetooth/hci_vhci.c:326:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-327-	struct hci_dev *hdev = data->hdev;
--
drivers/bluetooth/hci_vhci.c-355-
drivers/bluetooth/hci_vhci.c:356:	hci_devcd_register(hdev, vhci_coredump, vhci_coredump_hdr, NULL);
drivers/bluetooth/hci_vhci.c-357-
--
drivers/bluetooth/hci_vhci.c=388=static const struct file_operations force_devcoredump_fops = {
--
drivers/bluetooth/hci_vhci.c-392-
drivers/bluetooth/hci_vhci.c:393:static void vhci_debugfs_init(struct vhci_data *data)
drivers/bluetooth/hci_vhci.c-394-{
--
drivers/bluetooth/hci_vhci.c-414-
drivers/bluetooth/hci_vhci.c:415:static int __vhci_create_device(struct vhci_data *data, __u8 opcode)
drivers/bluetooth/hci_vhci.c-416-{
--
drivers/bluetooth/hci_vhci.c-441-
drivers/bluetooth/hci_vhci.c:442:	hdev->open  = vhci_open_dev;
drivers/bluetooth/hci_vhci.c:443:	hdev->close = vhci_close_dev;
drivers/bluetooth/hci_vhci.c:444:	hdev->flush = vhci_flush;
drivers/bluetooth/hci_vhci.c:445:	hdev->send  = vhci_send_frame;
drivers/bluetooth/hci_vhci.c:446:	hdev->get_data_path_id = vhci_get_data_path_id;
drivers/bluetooth/hci_vhci.c:447:	hdev->get_codec_config_data = vhci_get_codec_config_data;
drivers/bluetooth/hci_vhci.c:448:	hdev->wakeup = vhci_wakeup;
drivers/bluetooth/hci_vhci.c:449:	hdev->setup = vhci_setup;
drivers/bluetooth/hci_vhci.c-450-	hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP);
--
drivers/bluetooth/hci_vhci.c-469-	if (!IS_ERR_OR_NULL(hdev->debugfs))
drivers/bluetooth/hci_vhci.c:470:		vhci_debugfs_init(data);
drivers/bluetooth/hci_vhci.c-471-
--
drivers/bluetooth/hci_vhci.c-483-
drivers/bluetooth/hci_vhci.c:484:static int vhci_create_device(struct vhci_data *data, __u8 opcode)
drivers/bluetooth/hci_vhci.c-485-{
--
drivers/bluetooth/hci_vhci.c-488-	mutex_lock(&data->open_mutex);
drivers/bluetooth/hci_vhci.c:489:	err = __vhci_create_device(data, opcode);
drivers/bluetooth/hci_vhci.c-490-	mutex_unlock(&data->open_mutex);
--
drivers/bluetooth/hci_vhci.c-494-
drivers/bluetooth/hci_vhci.c:495:static inline ssize_t vhci_get_user(struct vhci_data *data,
drivers/bluetooth/hci_vhci.c-496-				    struct iov_iter *from)
--
drivers/bluetooth/hci_vhci.c-545-
drivers/bluetooth/hci_vhci.c:546:		ret = vhci_create_device(data, opcode);
drivers/bluetooth/hci_vhci.c-547-		break;
--
drivers/bluetooth/hci_vhci.c-556-
drivers/bluetooth/hci_vhci.c:557:static inline ssize_t vhci_put_user(struct vhci_data *data,
drivers/bluetooth/hci_vhci.c-558-				    struct sk_buff *skb,
--
drivers/bluetooth/hci_vhci.c-588-
drivers/bluetooth/hci_vhci.c:589:static ssize_t vhci_read(struct file *file,
drivers/bluetooth/hci_vhci.c-590-			 char __user *buf, size_t count, loff_t *pos)
drivers/bluetooth/hci_vhci.c-591-{
drivers/bluetooth/hci_vhci.c:592:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-593-	struct sk_buff *skb;
--
drivers/bluetooth/hci_vhci.c-598-		if (skb) {
drivers/bluetooth/hci_vhci.c:599:			ret = vhci_put_user(data, skb, buf, count);
drivers/bluetooth/hci_vhci.c-600-			if (ret < 0)
--
drivers/bluetooth/hci_vhci.c-620-
drivers/bluetooth/hci_vhci.c:621:static ssize_t vhci_write(struct kiocb *iocb, struct iov_iter *from)
drivers/bluetooth/hci_vhci.c-622-{
drivers/bluetooth/hci_vhci.c-623-	struct file *file = iocb->ki_filp;
drivers/bluetooth/hci_vhci.c:624:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-625-
drivers/bluetooth/hci_vhci.c:626:	return vhci_get_user(data, from);
drivers/bluetooth/hci_vhci.c-627-}
drivers/bluetooth/hci_vhci.c-628-
drivers/bluetooth/hci_vhci.c:629:static __poll_t vhci_poll(struct file *file, poll_table *wait)
drivers/bluetooth/hci_vhci.c-630-{
drivers/bluetooth/hci_vhci.c:631:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-632-
--
drivers/bluetooth/hci_vhci.c-640-
drivers/bluetooth/hci_vhci.c:641:static void vhci_open_timeout(struct work_struct *work)
drivers/bluetooth/hci_vhci.c-642-{
drivers/bluetooth/hci_vhci.c:643:	struct vhci_data *data = container_of(work, struct vhci_data,
drivers/bluetooth/hci_vhci.c-644-					      open_timeout.work);
drivers/bluetooth/hci_vhci.c-645-
drivers/bluetooth/hci_vhci.c:646:	vhci_create_device(data, 0x00);
drivers/bluetooth/hci_vhci.c-647-}
drivers/bluetooth/hci_vhci.c-648-
drivers/bluetooth/hci_vhci.c:649:static int vhci_open(struct inode *inode, struct file *file)
drivers/bluetooth/hci_vhci.c-650-{
drivers/bluetooth/hci_vhci.c:651:	struct vhci_data *data;
drivers/bluetooth/hci_vhci.c-652-
--
drivers/bluetooth/hci_vhci.c-660-	mutex_init(&data->open_mutex);
drivers/bluetooth/hci_vhci.c:661:	INIT_DELAYED_WORK(&data->open_timeout, vhci_open_timeout);
drivers/bluetooth/hci_vhci.c:662:	INIT_WORK(&data->suspend_work, vhci_suspend_work);
drivers/bluetooth/hci_vhci.c-663-
--
drivers/bluetooth/hci_vhci.c-671-
drivers/bluetooth/hci_vhci.c:672:static void vhci_debugfs_remove(struct hci_dev *hdev)
drivers/bluetooth/hci_vhci.c-673-{
--
drivers/bluetooth/hci_vhci.c-686-
drivers/bluetooth/hci_vhci.c:687:static int vhci_release(struct inode *inode, struct file *file)
drivers/bluetooth/hci_vhci.c-688-{
drivers/bluetooth/hci_vhci.c:689:	struct vhci_data *data = file->private_data;
drivers/bluetooth/hci_vhci.c-690-	struct hci_dev *hdev;
--
drivers/bluetooth/hci_vhci.c-698-		if (!IS_ERR_OR_NULL(hdev->debugfs))
drivers/bluetooth/hci_vhci.c:699:			vhci_debugfs_remove(hdev);
drivers/bluetooth/hci_vhci.c-700-		hci_unregister_dev(hdev);
--
drivers/bluetooth/hci_vhci.c-710-
drivers/bluetooth/hci_vhci.c:711:static const struct file_operations vhci_fops = {
drivers/bluetooth/hci_vhci.c-712-	.owner		= THIS_MODULE,
drivers/bluetooth/hci_vhci.c:713:	.read		= vhci_read,
drivers/bluetooth/hci_vhci.c:714:	.write_iter	= vhci_write,
drivers/bluetooth/hci_vhci.c:715:	.poll		= vhci_poll,
drivers/bluetooth/hci_vhci.c:716:	.open		= vhci_open,
drivers/bluetooth/hci_vhci.c:717:	.release	= vhci_release,
drivers/bluetooth/hci_vhci.c-718-};
drivers/bluetooth/hci_vhci.c-719-
drivers/bluetooth/hci_vhci.c:720:static struct miscdevice vhci_miscdev = {
drivers/bluetooth/hci_vhci.c:721:	.name	= "vhci",
drivers/bluetooth/hci_vhci.c:722:	.fops	= &vhci_fops,
drivers/bluetooth/hci_vhci.c-723-	.minor	= VHCI_MINOR,
drivers/bluetooth/hci_vhci.c-724-};
drivers/bluetooth/hci_vhci.c:725:module_misc_device(vhci_miscdev);
drivers/bluetooth/hci_vhci.c-726-
--
drivers/bluetooth/hci_vhci.c=733=MODULE_LICENSE("GPL");
drivers/bluetooth/hci_vhci.c:734:MODULE_ALIAS("devname:vhci");
drivers/bluetooth/hci_vhci.c-735-MODULE_ALIAS_MISCDEV(VHCI_MINOR);
]

30/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26165
							output: 38
							thoughts: 697
						

Thoughts:
**Analyzing a Syzkaller-Generated Test Case**

Okay, so I'm looking at this syzkaller-generated program, and my initial thought is: interesting. It looks like it's trying to interact with the virtual HCI device, `/dev/vhci`. Let's break this down. The program first copies the device path into memory, then opens the device using `openat`. The interesting part is that the file descriptor `0xffffff9c` which is effectively -100, is used which usually represent a file system internal file descriptor that is assigned for system internal use. Then, it attempts to configure the filesystem using `fsconfig`. After that, it does a `read` from the opened file descriptor and stores the result as a new file descriptor. Now, here's where it gets intriguing: there's a `write` call to `/dev/vhci`.

This `write` operation is the key. The write operation to vhci will call the `vhci_write` function. This is where the magic (or the bug, potentially) lies. The program then prepares a write operation. I can tell from previous experience that in the context of `vhci`, the `write` call is going to trigger something in the kernel. `vhci_write` calls `vhci_get_user`, which suggests that the input from user space is being processed. I want to see what opcode `0xff` is used for. This specific value will dictate the behavior, and how the device will be programmed.

My next step is to head over to the source code for the vhci driver, specifically, `drivers/bluetooth/hci_vhci.c`. I will be looking into the `__vhci_create_device` function, to see how the device is created. I need to understand what this opcode means and how the device interacts with it in the write operation, so I have to understand the whole process of vhci initialization. This could be where the vulnerability lies if it tries to dereference a user controlled value without any boundaries.



31/2 2026/08/27 19:29 tool read-file
0m Args:
map[File:drivers/bluetooth/hci_vhci.c FirstLine:410 LineCount:50]

Results:
map[Contents: 410:	
 411:		debugfs_create_file("force_devcoredump", 0644, hdev->debugfs, data,
 412:				    &force_devcoredump_fops);
 413:	}
 414:	
 415:	static int __vhci_create_device(struct vhci_data *data, __u8 opcode)
 416:	{
 417:		struct hci_dev *hdev;
 418:		struct sk_buff *skb;
 419:	
 420:		if (data->hdev)
 421:			return -EBADFD;
 422:	
 423:		/* bits 2-5 are reserved (must be zero) */
 424:		if (opcode & 0x3c)
 425:			return -EINVAL;
 426:	
 427:		skb = bt_skb_alloc(4, GFP_KERNEL);
 428:		if (!skb)
 429:			return -ENOMEM;
 430:	
 431:		hdev = hci_alloc_dev();
 432:		if (!hdev) {
 433:			kfree_skb(skb);
 434:			return -ENOMEM;
 435:		}
 436:	
 437:		data->hdev = hdev;
 438:	
 439:		hdev->bus = HCI_VIRTUAL;
 440:		hci_set_drvdata(hdev, data);
 441:	
 442:		hdev->open  = vhci_open_dev;
 443:		hdev->close = vhci_close_dev;
 444:		hdev->flush = vhci_flush;
 445:		hdev->send  = vhci_send_frame;
 446:		hdev->get_data_path_id = vhci_get_data_path_id;
 447:		hdev->get_codec_config_data = vhci_get_codec_config_data;
 448:		hdev->wakeup = vhci_wakeup;
 449:		hdev->setup = vhci_setup;
 450:		hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP);
 451:		hci_set_quirk(hdev, HCI_QUIRK_SYNC_FLOWCTL_SUPPORTED);
 452:	
 453:		/* bit 6 is for external configuration */
 454:		if (opcode & 0x40)
 455:			hci_set_quirk(hdev, HCI_QUIRK_EXTERNAL_CONFIG);
 456:	
 457:		/* bit 7 is for raw device */
 458:		if (opcode & 0x80)
 459:			hci_set_quirk(hdev, HCI_QUIRK_RAW_DEVICE);
]

32/2 2026/08/27 19:29 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28145
							output: 38
							thoughts: 101
						

Thoughts:
**Analyzing the Syzkaller Output**

Okay, so the syzkaller program is writing `\xff\x80`. Right, let's break this down. First thought: `\xff` is almost certainly the opcode. Now, I need to check the logic around that. Let's see... `0xff & 0x3c`... that evaluates to `0x3c`, which is not zero, so it returns `-EINVAL`. Makes sense. Hang on, just to be absolutely clear, let me reiterate: `\xff` represents 255. And the syzkaller program *again* writes `\xff\x80`. Time to double-check my assumptions. I think it's time to dig into `vhci_get_user` and understand why this sequence is triggering this particular error path.



33/2 2026/08/27 19:30 tool read-file
0m Args:
map[File:drivers/bluetooth/hci_vhci.c FirstLine:490 LineCount:50]

Results:
map[Contents: 490:		mutex_unlock(&data->open_mutex);
 491:	
 492:		return err;
 493:	}
 494:	
 495:	static inline ssize_t vhci_get_user(struct vhci_data *data,
 496:					    struct iov_iter *from)
 497:	{
 498:		size_t len = iov_iter_count(from);
 499:		struct sk_buff *skb;
 500:		__u8 pkt_type, opcode;
 501:		int ret;
 502:	
 503:		if (len < 2 || len > HCI_MAX_FRAME_SIZE)
 504:			return -EINVAL;
 505:	
 506:		skb = bt_skb_alloc(len, GFP_KERNEL);
 507:		if (!skb)
 508:			return -ENOMEM;
 509:	
 510:		if (!copy_from_iter_full(skb_put(skb, len), len, from)) {
 511:			kfree_skb(skb);
 512:			return -EFAULT;
 513:		}
 514:	
 515:		pkt_type = *((__u8 *) skb->data);
 516:		skb_pull(skb, 1);
 517:	
 518:		switch (pkt_type) {
 519:		case HCI_EVENT_PKT:
 520:		case HCI_ACLDATA_PKT:
 521:		case HCI_SCODATA_PKT:
 522:		case HCI_ISODATA_PKT:
 523:			if (!data->hdev) {
 524:				kfree_skb(skb);
 525:				return -ENODEV;
 526:			}
 527:	
 528:			hci_skb_pkt_type(skb) = pkt_type;
 529:	
 530:			ret = hci_recv_frame(data->hdev, skb);
 531:			break;
 532:	
 533:		case HCI_VENDOR_PKT:
 534:			cancel_delayed_work_sync(&data->open_timeout);
 535:	
 536:			opcode = *((__u8 *) skb->data);
 537:			skb_pull(skb, 1);
 538:	
 539:			if (skb->len > 0) {
]

34/2 2026/08/27 19:30 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29177
							output: 38
							thoughts: 762
						

Thoughts:
**My Analysis of a Potential Data Race in Bluetooth Driver Initialization**

Okay, let's break this down. I'm looking at this incoming packet, `pkt_type` is `\xff` – that's HCI Vendor Packet. The `opcode` is `\x80`. Cool, now let's see, `0x80 & 0x3c` is zero, so that checks out. The `opcode & 0x80` is true, so that means we're setting `HCI_QUIRK_RAW_DEVICE`. Then `hci_register_dev(hdev)` is called. Inside `hci_register_dev`, there's a check for `HCI_QUIRK_RAW_DEVICE`, and if it's set, then `HCI_UNCONFIGURED` is set too.

Alright, so far, so good. Then `queue_work(hdev->req_workqueue, &hdev->power_on);` gets called. And after that, `msft_register(hdev)` gets called. This is where things get interesting.

If the `power_on` work runs quickly (maybe on another CPU), it calls `hci_power_on`. Because `HCI_UNCONFIGURED` is set, `hci_power_on` will call `hci_dev_do_close(hdev)`. And that calls `hci_dev_close_sync(hdev)` which in turn calls `msft_do_close(hdev)`.

Inside `msft_do_close`, we see this critical section: there's a quick check and then: `mutex_lock(&msft->filter_lock);`

Now, let's look at `msft_register(hdev)`.  Here, `msft` gets allocated with `kzalloc_obj`, then the list heads get initialized, then, crucially, `hdev->msft_data = msft;` is assigned. *And then* a mutex is initialized `mutex_init(&msft->filter_lock);`.

The problem is clear to me. If `hdev->msft_data = msft;` gets executed *before* `mutex_init(&msft->filter_lock)`, and `msft_do_close` runs concurrently and reads `hdev->msft_data`, it might find a valid pointer to the `msft` structure, and it will try to lock the `filter_lock` *before* the mutex is initialized. That uninitialized mutex means it's full of zeros. So, `mutex_lock` on this uninitialized value will trigger that familiar warning: `DEBUG_LOCKS_WARN_ON(lock->magic != lock)`. That's a classic data race, a definite initialization order bug.

My immediate instinct is the fix is to move the initialization of the mutex BEFORE assigning `hdev->msft_data = msft;`, right? But wait a minute. Is that enough? We have a new problem, even if we initialize the mutex *before* assigning the data pointer, other things might still be running concurrently like `INIT_LIST_HEAD` or other member initializations. Thinking about it, the real fix is to make sure `msft_register` is executed BEFORE `queue_work(hdev->req_workqueue, &hdev->power_on);`. Let me check that `hci_register_dev` again... yes, that's definitely the root cause. This order needs to be fixed.



35/2 2026/08/27 19:30 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2620 LineCount:30]

Results:
map[Contents:2620:		 * callback.
2621:		 */
2622:		if (hdev->wakeup)
2623:			hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
2624:	
2625:		hci_sock_dev_event(hdev, HCI_DEV_REG);
2626:		hci_dev_hold(hdev);
2627:	
2628:		error = hci_register_suspend_notifier(hdev);
2629:		if (error)
2630:			BT_WARN("register suspend notifier failed error:%d\n", error);
2631:	
2632:		queue_work(hdev->req_workqueue, &hdev->power_on);
2633:	
2634:		idr_init(&hdev->adv_monitors_idr);
2635:		msft_register(hdev);
2636:	
2637:		return id;
2638:	
2639:	err_wqueue:
2640:		debugfs_remove_recursive(hdev->debugfs);
2641:		destroy_workqueue(hdev->workqueue);
2642:		destroy_workqueue(hdev->req_workqueue);
2643:	err:
2644:		ida_free(&hci_index_ida, hdev->id);
2645:	
2646:		return error;
2647:	}
2648:	EXPORT_SYMBOL(hci_register_dev);
2649:	
]

36/2 2026/08/27 19:30 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 31172
							output: 36
							thoughts: 263
						

Thoughts:
**My Analysis of the Initialization Sequence**

Okay, so I'm looking at this initialization code and thinking through the execution flow. I see that `queue_work(hdev->req_workqueue, &hdev->power_on);` is called *before* both `idr_init(&hdev->adv_monitors_idr);` and `msft_register(hdev);`. The potential issue here is that if `power_on` starts running *before* those are finished, it could call functions that rely on uninitialized parts.

Specifically, `power_on` could call `hci_dev_do_close`, and that in turn, could call `hci_adv_monitors_clear(hdev)` or `msft_do_close(hdev)`.  Hmm, I know `hci_dev_close_sync` *doesn't* call `hci_adv_monitors_clear`, but it *does* call `msft_do_close(hdev)`.

The crucial thing is, if I move the `msft_register` call *before* `queue_work`, then `msft` will be fully initialized before any work is queued to run, ensuring it's ready for any potential calls.

Let's check for dependencies, though. `msft_register` seems to be just allocating memory, and initializing some lists and mutexes. Similarly, `idr_init` is just initializing that IDR. Based on this, it *appears* completely safe and correct to move those calls before `queue_work`. I need to be 100% sure before I make the change, though. So let me verify everything `msft_register` does and confirm there are no more dependencies!



37/2 2026/08/27 19:30 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:753 LineCount:20]

Results:
map[Contents: 753:	void msft_register(struct hci_dev *hdev)
 754:	{
 755:		struct msft_data *msft = NULL;
 756:	
 757:		bt_dev_dbg(hdev, "Register MSFT extension");
 758:	
 759:		msft = kzalloc_obj(*msft);
 760:		if (!msft) {
 761:			bt_dev_err(hdev, "Failed to register MSFT extension");
 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
 770:	
 771:	void msft_release(struct hci_dev *hdev)
 772:	{
]

38/2 2026/08/27 19:30 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32144
							output: 39
							thoughts: 78
						

Thoughts:
**My Initial Assessment**

Okay, so `msft_register` is purely an allocation and initialization function, got it. Similarly, `idr_init(&hdev->adv_monitors_idr)` is just initializing, nothing more. I find myself wondering about the placement of these calls. Why are they positioned after `queue_work`? It strikes me as potentially an oversight, a subtle error that might be worth investigating. My next step is clear: I'll dive into the `git blame` history of `hci_register_dev`. That should shed some light on the order of additions and potentially reveal the reasoning, or lack thereof, behind the current sequence. This could uncover a latent bug or just reinforce that it's a non-issue.



39/2 2026/08/27 19:30 tool git-blame
0m Args:
map[End:2638 File:net/bluetooth/hci_core.c Start:2628]

Results:
map[Output:9111786492f13 2628) 	error = hci_register_suspend_notifier(hdev);
9111786492f13 2629) 	if (error)
0d75da38e060d 2630) 		BT_WARN("register suspend notifier failed error:%d\n", error);
9952d90ea2885 2631) 
1920257316615 2632) 	queue_work(hdev->req_workqueue, &hdev->power_on);
fbe96d6ff9f4e 2633) 
e5e1e7fd470cc 2634) 	idr_init(&hdev->adv_monitors_idr);
5031ffcc79b81 2635) 	msft_register(hdev);
e5e1e7fd470cc 2636) 
^1da177e4c3f4 2637) 	return id;
f48fd9c8cd746 2638) 
]

40/2 2026/08/27 19:30 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32741
							output: 26
							thoughts: 79
						

Thoughts:
Okay, let me break this down.

**Analyzing Recent Driver Initialization Changes**

Alright, so I see these two commits in the driver code, and my initial thought is to understand the implications of the changes. The first commit, `5031ffcc79b81`, added `msft_register(hdev);`. Given my understanding of the Microsoft driver framework, this is likely registering the hardware device (`hdev`) with the system. It's the standard initialization and registration process. Nothing unexpected there, but I need to understand what else relies on this now.

Then, there's `e5e1e7fd470cc`, which introduces `idr_init(&hdev->adv_monitors_idr);`. The `idr_init` function calls suggest an IDR (Integer ID Register) structure. This is immediately interesting. This means that now my device, `hdev`, is using an IDR. This suggests that the driver is now managing a set of dynamically allocated integer IDs. This tells me that the driver now requires a means to track and manage some form of "advanced monitors", and the IDR is a resource management solution. This is definitely worth a closer look.

I'll start with that first commit, `5031ffcc79b81`, because that seems like the fundamental change I should start with. Let me examine the context surrounding that `msft_register` call. I need to figure out what context this function runs in and what other modules might now depend on this registration. I also need to understand any side effects of the `idr_init` change in the subsequent commit.



41/2 2026/08/27 19:30 tool git-show
0m Args:
map[Commit:5031ffcc79b81]

Results:
map[Output:commit 5031ffcc79b81776ac8f7f8b1a585aed8818e3d1
Author: Miao-chen Chou <mcchou@chromium.org>
Date:   Thu Sep 9 14:10:23 2021 -0700

    Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle
    
    This splits the msft_do_{open/close} to msft_do_{open/close} and
    msft_{register/unregister}. With this change it is possible to retain
    the MSFT extension info irrespective of controller power on/off state.
    This helps bluetoothd to report correct 'supported features' of the
    controller to the D-Bus clients event if the controller is off. It also
    re-reads the MSFT info upon every msft_do_open().
    
    The following test steps were performed.
    1. Boot the test device and verify the MSFT support debug log in syslog.
    2. Power off the controller and read the 'supported features', power on
       and read again.
    3. Restart the bluetoothd and verify the 'supported features' value.
    
    Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
    Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
    Reviewed-by: Archie Pusaka <apusaka@chromium.org>
    Reviewed-by: Alain Michaud <alainm@chromium.org>
    Signed-off-by: Manish Mandlik <mmandlik@google.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5236faa397fa..beda5dac1658 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3990,6 +3990,7 @@ int hci_register_dev(struct hci_dev *hdev)
 	queue_work(hdev->req_workqueue, &hdev->power_on);
 
 	idr_init(&hdev->adv_monitors_idr);
+	msft_register(hdev);
 
 	return id;
 
@@ -4022,6 +4023,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
 		cancel_work_sync(&hdev->suspend_prepare);
 	}
 
+	msft_unregister(hdev);
+
 	hci_dev_do_close(hdev);
 
 	if (!test_bit(HCI_INIT, &hdev->flags) &&
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index b4bfae41e8a5..21b1787e7893 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -184,28 +184,36 @@ static void reregister_monitor_on_restart(struct hci_dev *hdev, int handle)
 
 void msft_do_open(struct hci_dev *hdev)
 {
-	struct msft_data *msft;
+	struct msft_data *msft = hdev->msft_data;
 
 	if (hdev->msft_opcode == HCI_OP_NOP)
 		return;
 
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT extension not registered");
+		return;
+	}
+
 	bt_dev_dbg(hdev, "Initialize MSFT extension");
 
-	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
-	if (!msft)
-		return;
+	/* Reset existing MSFT data before re-reading */
+	kfree(msft->evt_prefix);
+	msft->evt_prefix = NULL;
+	msft->evt_prefix_len = 0;
+	msft->features = 0;
 
 	if (!read_supported_features(hdev, msft)) {
+		hdev->msft_data = NULL;
 		kfree(msft);
 		return;
 	}
 
-	INIT_LIST_HEAD(&msft->handle_map);
-	hdev->msft_data = msft;
-
 	if (msft_monitor_supported(hdev)) {
 		msft->reregistering = true;
 		msft_set_filter_enable(hdev, true);
+		/* Monitors get removed on power off, so we need to explicitly
+		 * tell the controller to re-monitor.
+		 */
 		reregister_monitor_on_restart(hdev, 0);
 	}
 }
@@ -221,8 +229,9 @@ void msft_do_close(struct hci_dev *hdev)
 
 	bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 
-	hdev->msft_data = NULL;
-
+	/* The controller will silently remove all monitors on power off.
+	 * Therefore, remove handle_data mapping and reset monitor state.
+	 */
 	list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 		monitor = idr_find(&hdev->adv_monitors_idr,
 				   handle_data->mgmt_handle);
@@ -233,6 +242,34 @@ void msft_do_close(struct hci_dev *hdev)
 		list_del(&handle_data->list);
 		kfree(handle_data);
 	}
+}
+
+void msft_register(struct hci_dev *hdev)
+{
+	struct msft_data *msft = NULL;
+
+	bt_dev_dbg(hdev, "Register MSFT extension");
+
+	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
+	if (!msft) {
+		bt_dev_err(hdev, "Failed to register MSFT extension");
+		return;
+	}
+
+	INIT_LIST_HEAD(&msft->handle_map);
+	hdev->msft_data = msft;
+}
+
+void msft_unregister(struct hci_dev *hdev)
+{
+	struct msft_data *msft = hdev->msft_data;
+
+	if (!msft)
+		return;
+
+	bt_dev_dbg(hdev, "Unregister MSFT extension");
+
+	hdev->msft_data = NULL;
 
 	kfree(msft->evt_prefix);
 	kfree(msft);
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 6e56d94b88d8..8018948c5975 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -13,6 +13,8 @@
 #if IS_ENABLED(CONFIG_BT_MSFTEXT)
 
 bool msft_monitor_supported(struct hci_dev *hdev);
+void msft_register(struct hci_dev *hdev);
+void msft_unregister(struct hci_dev *hdev);
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb);
@@ -31,6 +33,8 @@ static inline bool msft_monitor_supported(struct hci_dev *hdev)
 	return false;
 }
 
+static inline void msft_register(struct hci_dev *hdev) {}
+static inline void msft_unregister(struct hci_dev *hdev) {}
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb) {}
]

42/2 2026/08/27 19:30 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35294
							output: 33
							thoughts: 56
						

Thoughts:
Here's my thought process, distilled:

**Tracing Down a Kernel Synchronization Bug**

Okay, so I see a potential synchronization issue. The `msft_register` function, a critical part of the Microsoft kernel driver, was introduced in commit `5031ffcc79b81`. And I also see a `mutex_init(&msft->filter_lock)` call in there later. My immediate thought is, when was the mutex itself initialized in relation to that registration? Knowing the chronology of these additions is going to be key to debugging. I need to find out precisely when that `mutex_init` was introduced. Let's dig into the commit history.



43/2 2026/08/27 19:30 tool git-log
10m Error:
log-in to see details

Args:
map[CodeRegexp:mutex_init\(&msft->filter_lock\) Count:5]

Results:
map[Output:]

44/2 2026/08/27 19:40 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35561
							output: 47
							thoughts: 15
						

Thoughts:
Okay, here's my attempt at summarizing the thought process, as if it were my own, targeted to an expert audience and starting with a bolded header:

**Diving into `net/bluetooth/msft.c`**

Alright, I'm zoning in on `net/bluetooth/msft.c`. That's where I need to start. This clearly indicates some interaction with Microsoft's Bluetooth stack, or at least a vendor-specific implementation or extension. I need to understand what specific functionality is implemented within this file. Is it related to a specific hardware, perhaps certain Microsoft Surface devices? Are there any obvious proprietary protocols or extensions being handled here, maybe something related to enhanced audio codecs, fast pairing, or even device-specific power management? The naming suggests that the intention of this file is to handle Microsoft-specific aspects of Bluetooth communication. My focus now is on what those aspects are, and how they integrate (or potentially deviate) from standard Bluetooth protocols. Let's dig in and figure out the architecture.



45/2 2026/08/27 19:40 tool git-log
0m Args:
map[CodeRegexp:mutex_init\(&msft->filter_lock\) Count:5 PathPrefix:net/bluetooth/msft.c]

Results:
map[Output:9e14606d8f38 Bluetooth: msft: Extended monitor tracking by address filter
]

46/2 2026/08/27 19:40 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35874
							output: 27
							thoughts: 18
						

Thoughts:
Okay, let's dive into this. Here's my take on that request, written from the first-person perspective, assuming I'm an expert:

**Investigating Revision `9e14606d8f38`**

Alright, time to get a grip on `9e14606d8f38`. This looks like a specific revision identifier, likely a commit hash in a version control system. My first thought is, what's the context? Where is this coming from? Is this from a recent integration, a reported bug fix, or something else entirely? Without that information, I'm already forming some assumptions based on my experience. I'm automatically thinking about what tools I'll need – a diff viewer, a code browser integrated with the repository, maybe even a debugger if I suspect some subtle behavior change. I'll need to understand the change set. What files were modified? What were the specific line-by-line alterations? Are there tests associated with this revision? I'm going to want to run those tests immediately, if so. A quick scan of the commit message is essential, but it can only offer the broad strokes. The real story is always in the code itself. I'm going to start by pulling up the changes visually, looking for any immediate red flags: unexpected dependencies, overly complex logic, or any potentially destabilizing modifications to core components. Given the nature of my expertise, I'm expecting this to be a quick process. But let's see what the code has to say.



47/2 2026/08/27 19:41 tool git-show
0m Args:
map[Commit:9e14606d8f38]

Results:
map[Output:commit 9e14606d8f38ea52a38c27692a9c1513c987a5da
Author: Hilda Wu <hildawu@realtek.com>
Date:   Wed Jun 21 18:00:31 2023 +0800

    Bluetooth: msft: Extended monitor tracking by address filter
    
    Since limited tracking device per condition, this feature is to support
    tracking multiple devices concurrently.
    When a pattern monitor detects the device, this feature issues an address
    monitor for tracking that device. Let pattern monitor can keep monitor
    new devices.
    This feature adds an address filter when receiving a LE monitor device
    event which monitor handle is for a pattern, and the controller started
    monitoring the device. And this feature also has cancelled the monitor
    advertisement from address filters when receiving a LE monitor device
    event when the controller stopped monitoring the device specified by an
    address and monitor handle.
    
    Below is an example to know the feature adds the address filter.
    
    //Add MSFT pattern monitor
    < HCI Command: Vendor (0x3f|0x00f0) plen 14          #142 [hci0] 55.552420
            03 b8 a4 03 ff 01 01 06 09 05 5f 52 45 46        .........._REF
    > HCI Event: Command Complete (0x0e) plen 6          #143 [hci0] 55.653960
          Vendor (0x3f|0x00f0) ncmd 2
            Status: Success (0x00)
            03 00
    
    //Got event from the pattern monitor
    > HCI Event: Vendor (0xff) plen 18                   #148 [hci0] 58.384953
            23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8  #yT3w..h....).'.
            00 01                                            ..
    
    //Add MSFT address monitor (Sample address: B8:27:EB:29:C1:FB)
    < HCI Command: Vendor (0x3f|0x00f0) plen 13          #149 [hci0] 58.385067
            03 b8 a4 03 ff 04 00 fb c1 29 eb 27 b8           .........).'.
    
    //Report to userspace about found device (ADV Monitor Device Found)
    @ MGMT Event: Unknown (0x002f) plen 38           {0x0003} [hci0] 58.680042
            01 00 fb c1 29 eb 27 b8 01 ce 00 00 00 00 16 00  ....).'.........
            0a 09 4b 45 59 42 44 5f 52 45 46 02 01 06 03 19  ..KEYBD_REF.....
            c1 03 03 03 12 18                                ......
    
    //Got event from address monitor
    > HCI Event: Vendor (0xff) plen 18                   #152 [hci0] 58.672956
            23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8  #yT3w..h....).'.
            01 01
    
    Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
    Signed-off-by: Hilda Wu <hildawu@realtek.com>
    Reviewed-by: Simon Horman <simon.horman@corigine.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 04399b3c39a0..ddae6524106d 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -1269,6 +1269,10 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
 		if (btrtl_dev->project_id == CHIP_ID_8852C)
 			btrealtek_set_flag(hdev, REALTEK_ALT6_CONTINUOUS_TX_CHIP);
 
+		if (btrtl_dev->project_id == CHIP_ID_8852A ||
+		    btrtl_dev->project_id == CHIP_ID_8852C)
+			set_bit(HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER, &hdev->quirks);
+
 		hci_set_aosp_capable(hdev);
 		break;
 	default:
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ab2f8f1817cf..5723405b833e 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -309,6 +309,16 @@ enum {
 	 * to support it.
 	 */
 	HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT,
+
+	/* When this quirk is set, MSFT extension monitor tracking by
+	 * address filter is supported. Since tracking quantity of each
+	 * pattern is limited, this feature supports tracking multiple
+	 * devices concurrently if controller supports multiple
+	 * address filters.
+	 *
+	 * This quirk must be set before hci_register_dev is called.
+	 */
+	HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER,
 };
 
 /* HCI device flags */
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index bf5cee48916c..b80a2162a5c3 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -91,6 +91,33 @@ struct msft_ev_le_monitor_device {
 struct msft_monitor_advertisement_handle_data {
 	__u8  msft_handle;
 	__u16 mgmt_handle;
+	__s8 rssi_high;
+	__s8 rssi_low;
+	__u8 rssi_low_interval;
+	__u8 rssi_sampling_period;
+	__u8 cond_type;
+	struct list_head list;
+};
+
+enum monitor_addr_filter_state {
+	AF_STATE_IDLE,
+	AF_STATE_ADDING,
+	AF_STATE_ADDED,
+	AF_STATE_REMOVING,
+};
+
+#define MSFT_MONITOR_ADVERTISEMENT_TYPE_ADDR	0x04
+struct msft_monitor_addr_filter_data {
+	__u8     msft_handle;
+	__u8     pattern_handle; /* address filters pertain to */
+	__u16    mgmt_handle;
+	int      state;
+	__s8     rssi_high;
+	__s8     rssi_low;
+	__u8     rssi_low_interval;
+	__u8     rssi_sampling_period;
+	__u8     addr_type;
+	bdaddr_t bdaddr;
 	struct list_head list;
 };
 
@@ -99,9 +126,12 @@ struct msft_data {
 	__u8  evt_prefix_len;
 	__u8  *evt_prefix;
 	struct list_head handle_map;
+	struct list_head address_filters;
 	__u8 resuming;
 	__u8 suspending;
 	__u8 filter_enabled;
+	/* To synchronize add/remove address filter and monitor device event.*/
+	struct mutex filter_lock;
 };
 
 bool msft_monitor_supported(struct hci_dev *hdev)
@@ -180,6 +210,24 @@ static struct msft_monitor_advertisement_handle_data *msft_find_handle_data
 	return NULL;
 }
 
+/* This function requires the caller holds msft->filter_lock */
+static struct msft_monitor_addr_filter_data *msft_find_address_data
+			(struct hci_dev *hdev, u8 addr_type, bdaddr_t *addr,
+			 u8 pattern_handle)
+{
+	struct msft_monitor_addr_filter_data *entry;
+	struct msft_data *msft = hdev->msft_data;
+
+	list_for_each_entry(entry, &msft->address_filters, list) {
+		if (entry->pattern_handle == pattern_handle &&
+		    addr_type == entry->addr_type &&
+		    !bacmp(addr, &entry->bdaddr))
+			return entry;
+	}
+
+	return NULL;
+}
+
 /* This function requires the caller holds hdev->lock */
 static int msft_monitor_device_del(struct hci_dev *hdev, __u16 mgmt_handle,
 				   bdaddr_t *bdaddr, __u8 addr_type,
@@ -240,6 +288,7 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode,
 
 	handle_data->mgmt_handle = monitor->handle;
 	handle_data->msft_handle = rp->handle;
+	handle_data->cond_type   = MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN;
 	INIT_LIST_HEAD(&handle_data->list);
 	list_add(&handle_data->list, &msft->handle_map);
 
@@ -254,6 +303,70 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode,
 	return status;
 }
 
+/* This function requires the caller holds hci_req_sync_lock */
+static void msft_remove_addr_filters_sync(struct hci_dev *hdev, u8 handle)
+{
+	struct msft_monitor_addr_filter_data *address_filter, *n;
+	struct msft_cp_le_cancel_monitor_advertisement cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct list_head head;
+	struct sk_buff *skb;
+
+	INIT_LIST_HEAD(&head);
+
+	/* Cancel all corresponding address monitors */
+	mutex_lock(&msft->filter_lock);
+
+	list_for_each_entry_safe(address_filter, n, &msft->address_filters,
+				 list) {
+		if (address_filter->pattern_handle != handle)
+			continue;
+
+		list_del(&address_filter->list);
+
+		/* Keep the address filter and let
+		 * msft_add_address_filter_sync() remove and free the address
+		 * filter.
+		 */
+		if (address_filter->state == AF_STATE_ADDING) {
+			address_filter->state = AF_STATE_REMOVING;
+			continue;
+		}
+
+		/* Keep the address filter and let
+		 * msft_cancel_address_filter_sync() remove and free the address
+		 * filter
+		 */
+		if (address_filter->state == AF_STATE_REMOVING)
+			continue;
+
+		list_add_tail(&address_filter->list, &head);
+	}
+
+	mutex_unlock(&msft->filter_lock);
+
+	list_for_each_entry_safe(address_filter, n, &head, list) {
+		list_del(&address_filter->list);
+
+		cp.sub_opcode = MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT;
+		cp.handle = address_filter->msft_handle;
+
+		skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
+				     HCI_CMD_TIMEOUT);
+		if (IS_ERR_OR_NULL(skb)) {
+			kfree(address_filter);
+			continue;
+		}
+
+		kfree_skb(skb);
+
+		bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
+			   &address_filter->bdaddr);
+
+		kfree(address_filter);
+	}
+}
+
 static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 						   u16 opcode,
 						   struct adv_monitor *monitor,
@@ -263,6 +376,7 @@ static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 	struct msft_monitor_advertisement_handle_data *handle_data;
 	struct msft_data *msft = hdev->msft_data;
 	int status = 0;
+	u8 msft_handle;
 
 	rp = (struct msft_rp_le_cancel_monitor_advertisement *)skb->data;
 	if (skb->len < sizeof(*rp)) {
@@ -293,11 +407,17 @@ static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 						NULL, 0, false);
 		}
 
+		msft_handle = handle_data->msft_handle;
+
 		list_del(&handle_data->list);
 		kfree(handle_data);
-	}
 
-	hci_dev_unlock(hdev);
+		hci_dev_unlock(hdev);
+
+		msft_remove_addr_filters_sync(hdev, msft_handle);
+	} else {
+		hci_dev_unlock(hdev);
+	}
 
 done:
 	return status;
@@ -394,12 +514,14 @@ static int msft_add_monitor_sync(struct hci_dev *hdev,
 {
 	struct msft_cp_le_monitor_advertisement *cp;
 	struct msft_le_monitor_advertisement_pattern_data *pattern_data;
+	struct msft_monitor_advertisement_handle_data *handle_data;
 	struct msft_le_monitor_advertisement_pattern *pattern;
 	struct adv_pattern *entry;
 	size_t total_size = sizeof(*cp) + sizeof(*pattern_data);
 	ptrdiff_t offset = 0;
 	u8 pattern_count = 0;
 	struct sk_buff *skb;
+	int err;
 
 	if (!msft_monitor_pattern_valid(monitor))
 		return -EINVAL;
@@ -436,16 +558,31 @@ static int msft_add_monitor_sync(struct hci_dev *hdev,
 
 	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, total_size, cp,
 			     HCI_CMD_TIMEOUT);
-	kfree(cp);
 
 	if (IS_ERR_OR_NULL(skb)) {
-		if (!skb)
-			return -EIO;
-		return PTR_ERR(skb);
+		err = PTR_ERR(skb);
+		goto out_free;
 	}
 
-	return msft_le_monitor_advertisement_cb(hdev, hdev->msft_opcode,
-						monitor, skb);
+	err = msft_le_monitor_advertisement_cb(hdev, hdev->msft_opcode,
+					       monitor, skb);
+	if (err)
+		goto out_free;
+
+	handle_data = msft_find_handle_data(hdev, monitor->handle, true);
+	if (!handle_data) {
+		err = -ENODATA;
+		goto out_free;
+	}
+
+	handle_data->rssi_high	= cp->rssi_high;
+	handle_data->rssi_low	= cp->rssi_low;
+	handle_data->rssi_low_interval	  = cp->rssi_low_interval;
+	handle_data->rssi_sampling_period = cp->rssi_sampling_period;
+
+out_free:
+	kfree(cp);
+	return err;
 }
 
 /* This function requires the caller holds hci_req_sync_lock */
@@ -538,6 +675,7 @@ void msft_do_close(struct hci_dev *hdev)
 {
 	struct msft_data *msft = hdev->msft_data;
 	struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
+	struct msft_monitor_addr_filter_data *address_filter, *n;
 	struct adv_monitor *monitor;
 
 	if (!msft)
@@ -559,6 +697,14 @@ void msft_do_close(struct hci_dev *hdev)
 		kfree(handle_data);
 	}
 
+	mutex_lock(&msft->filter_lock);
+	list_for_each_entry_safe(address_filter, n, &msft->address_filters,
+				 list) {
+		list_del(&address_filter->list);
+		kfree(address_filter);
+	}
+	mutex_unlock(&msft->filter_lock);
+
 	hci_dev_lock(hdev);
 
 	/* Clear any devices that are being monitored and notify device lost */
@@ -568,6 +714,49 @@ void msft_do_close(struct hci_dev *hdev)
 	hci_dev_unlock(hdev);
 }
 
+static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = data;
+	struct msft_cp_le_cancel_monitor_advertisement cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct sk_buff *skb;
+	int err = 0;
+
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT: msft data is freed");
+		return -EINVAL;
+	}
+
+	/* The address filter has been removed by hci dev close */
+	if (!test_bit(HCI_UP, &hdev->flags))
+		return 0;
+
+	mutex_lock(&msft->filter_lock);
+	list_del(&address_filter->list);
+	mutex_unlock(&msft->filter_lock);
+
+	cp.sub_opcode = MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT;
+	cp.handle = address_filter->msft_handle;
+
+	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
+			     HCI_CMD_TIMEOUT);
+	if (IS_ERR_OR_NULL(skb)) {
+		bt_dev_err(hdev, "MSFT: Failed to cancel address (%pMR) filter",
+			   &address_filter->bdaddr);
+		err = EIO;
+		goto done;
+	}
+	kfree_skb(skb);
+
+	bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
+		   &address_filter->bdaddr);
+
+done:
+	kfree(address_filter);
+
+	return err;
+}
+
 void msft_register(struct hci_dev *hdev)
 {
 	struct msft_data *msft = NULL;
@@ -581,7 +770,9 @@ void msft_register(struct hci_dev *hdev)
 	}
 
 	INIT_LIST_HEAD(&msft->handle_map);
+	INIT_LIST_HEAD(&msft->address_filters);
 	hdev->msft_data = msft;
+	mutex_init(&msft->filter_lock);
 }
 
 void msft_unregister(struct hci_dev *hdev)
@@ -596,6 +787,7 @@ void msft_unregister(struct hci_dev *hdev)
 	hdev->msft_data = NULL;
 
 	kfree(msft->evt_prefix);
+	mutex_destroy(&msft->filter_lock);
 	kfree(msft);
 }
 
@@ -645,11 +837,149 @@ static void *msft_skb_pull(struct hci_dev *hdev, struct sk_buff *skb,
 	return data;
 }
 
+static int msft_add_address_filter_sync(struct hci_dev *hdev, void *data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = data;
+	struct msft_rp_le_monitor_advertisement *rp;
+	struct msft_cp_le_monitor_advertisement *cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct sk_buff *skb = NULL;
+	bool remove = false;
+	size_t size;
+
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT: msft data is freed");
+		return -EINVAL;
+	}
+
+	/* The address filter has been removed by hci dev close */
+	if (!test_bit(HCI_UP, &hdev->flags))
+		return -ENODEV;
+
+	/* We are safe to use the address filter from now on.
+	 * msft_monitor_device_evt() wouldn't delete this filter because it's
+	 * not been added by now.
+	 * And all other functions that requiring hci_req_sync_lock wouldn't
+	 * touch this filter before this func completes because it's protected
+	 * by hci_req_sync_lock.
+	 */
+
+	if (address_filter->state == AF_STATE_REMOVING) {
+		mutex_lock(&msft->filter_lock);
+		list_del(&address_filter->list);
+		mutex_unlock(&msft->filter_lock);
+		kfree(address_filter);
+		return 0;
+	}
+
+	size = sizeof(*cp) +
+	       sizeof(address_filter->addr_type) +
+	       sizeof(address_filter->bdaddr);
+	cp = kzalloc(size, GFP_KERNEL);
+	if (!cp) {
+		bt_dev_err(hdev, "MSFT: Alloc cmd param err");
+		remove = true;
+		goto done;
+	}
+	cp->sub_opcode           = MSFT_OP_LE_MONITOR_ADVERTISEMENT;
+	cp->rssi_high		 = address_filter->rssi_high;
+	cp->rssi_low		 = address_filter->rssi_low;
+	cp->rssi_low_interval    = address_filter->rssi_low_interval;
+	cp->rssi_sampling_period = address_filter->rssi_sampling_period;
+	cp->cond_type            = MSFT_MONITOR_ADVERTISEMENT_TYPE_ADDR;
+	cp->data[0]              = address_filter->addr_type;
+	memcpy(&cp->data[1], &address_filter->bdaddr,
+	       sizeof(address_filter->bdaddr));
+
+	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, size, cp,
+			     HCI_CMD_TIMEOUT);
+	if (IS_ERR_OR_NULL(skb)) {
+		bt_dev_err(hdev, "Failed to enable address %pMR filter",
+			   &address_filter->bdaddr);
+		skb = NULL;
+		remove = true;
+		goto done;
+	}
+
+	rp = skb_pull_data(skb, sizeof(*rp));
+	if (!rp || rp->sub_opcode != MSFT_OP_LE_MONITOR_ADVERTISEMENT ||
+	    rp->status)
+		remove = true;
+
+done:
+	mutex_lock(&msft->filter_lock);
+
+	if (remove) {
+		bt_dev_warn(hdev, "MSFT: Remove address (%pMR) filter",
+			    &address_filter->bdaddr);
+		list_del(&address_filter->list);
+		kfree(address_filter);
+	} else {
+		address_filter->state = AF_STATE_ADDED;
+		address_filter->msft_handle = rp->handle;
+		bt_dev_dbg(hdev, "MSFT: Address %pMR filter enabled",
+			   &address_filter->bdaddr);
+	}
+	mutex_unlock(&msft->filter_lock);
+
+	kfree_skb(skb);
+
+	return 0;
+}
+
+/* This function requires the caller holds msft->filter_lock */
+static struct msft_monitor_addr_filter_data *msft_add_address_filter
+		(struct hci_dev *hdev, u8 addr_type, bdaddr_t *bdaddr,
+		 struct msft_monitor_advertisement_handle_data *handle_data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = NULL;
+	struct msft_data *msft = hdev->msft_data;
+	int err;
+
+	address_filter = kzalloc(sizeof(*address_filter), GFP_KERNEL);
+	if (!address_filter)
+		return NULL;
+
+	address_filter->state             = AF_STATE_ADDING;
+	address_filter->msft_handle       = 0xff;
+	address_filter->pattern_handle    = handle_data->msft_handle;
+	address_filter->mgmt_handle       = handle_data->mgmt_handle;
+	address_filter->rssi_high         = handle_data->rssi_high;
+	address_filter->rssi_low          = handle_data->rssi_low;
+	address_filter->rssi_low_interval = handle_data->rssi_low_interval;
+	address_filter->rssi_sampling_period = handle_data->rssi_sampling_period;
+	address_filter->addr_type            = addr_type;
+	bacpy(&address_filter->bdaddr, bdaddr);
+
+	/* With the above AF_STATE_ADDING, duplicated address filter can be
+	 * avoided when receiving monitor device event (found/lost) frequently
+	 * for the same device.
+	 */
+	list_add_tail(&address_filter->list, &msft->address_filters);
+
+	err = hci_cmd_sync_queue(hdev, msft_add_address_filter_sync,
+				 address_filter, NULL);
+	if (err < 0) {
+		bt_dev_err(hdev, "MSFT: Add address %pMR filter err", bdaddr);
+		list_del(&address_filter->list);
+		kfree(address_filter);
+		return NULL;
+	}
+
+	bt_dev_dbg(hdev, "MSFT: Add device %pMR address filter",
+		   &address_filter->bdaddr);
+
+	return address_filter;
+}
+
 /* This function requires the caller holds hdev->lock */
 static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 {
+	struct msft_monitor_addr_filter_data *n, *address_filter = NULL;
 	struct msft_ev_le_monitor_device *ev;
 	struct msft_monitor_advertisement_handle_data *handle_data;
+	struct msft_data *msft = hdev->msft_data;
+	u16 mgmt_handle = 0xffff;
 	u8 addr_type;
 
 	ev = msft_skb_pull(hdev, skb, MSFT_EV_LE_MONITOR_DEVICE, sizeof(*ev));
@@ -662,9 +992,53 @@ static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		   ev->monitor_state, &ev->bdaddr);
 
 	handle_data = msft_find_handle_data(hdev, ev->monitor_handle, false);
-	if (!handle_data)
+
+	if (!test_bit(HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER, &hdev->quirks)) {
+		if (!handle_data)
+			return;
+		mgmt_handle = handle_data->mgmt_handle;
+		goto report_state;
+	}
+
+	if (handle_data) {
+		/* Don't report any device found/lost event from pattern
+		 * monitors. Pattern monitor always has its address filters for
+		 * tracking devices.
+		 */
+
+		address_filter = msft_find_address_data(hdev, ev->addr_type,
+							&ev->bdaddr,
+							handle_data->msft_handle);
+		if (address_filter)
+			return;
+
+		if (ev->monitor_state && handle_data->cond_type ==
+				MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN)
+			msft_add_address_filter(hdev, ev->addr_type,
+						&ev->bdaddr, handle_data);
+
 		return;
+	}
 
+	/* This device event is not from pattern monitor.
+	 * Report it if there is a corresponding address_filter for it.
+	 */
+	list_for_each_entry(n, &msft->address_filters, list) {
+		if (n->state == AF_STATE_ADDED &&
+		    n->msft_handle == ev->monitor_handle) {
+			mgmt_handle = n->mgmt_handle;
+			address_filter = n;
+			break;
+		}
+	}
+
+	if (!address_filter) {
+		bt_dev_warn(hdev, "MSFT: Unexpected device event %pMR, %u, %u",
+			    &ev->bdaddr, ev->monitor_handle, ev->monitor_state);
+		return;
+	}
+
+report_state:
 	switch (ev->addr_type) {
 	case ADDR_LE_DEV_PUBLIC:
 		addr_type = BDADDR_LE_PUBLIC;
@@ -681,12 +1055,18 @@ static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		return;
 	}
 
-	if (ev->monitor_state)
-		msft_device_found(hdev, &ev->bdaddr, addr_type,
-				  handle_data->mgmt_handle);
-	else
-		msft_device_lost(hdev, &ev->bdaddr, addr_type,
-				 handle_data->mgmt_handle);
+	if (ev->monitor_state) {
+		msft_device_found(hdev, &ev->bdaddr, addr_type, mgmt_handle);
+	} else {
+		if (address_filter && address_filter->state == AF_STATE_ADDED) {
+			address_filter->state = AF_STATE_REMOVING;
+			hci_cmd_sync_queue(hdev,
+					   msft_cancel_address_filter_sync,
+					   address_filter,
+					   NULL);
+		}
+		msft_device_lost(hdev, &ev->bdaddr, addr_type, mgmt_handle);
+	}
 }
 
 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
@@ -724,7 +1104,9 @@ void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
 
 	switch (*evt) {
 	case MSFT_EV_LE_MONITOR_DEVICE:
+		mutex_lock(&msft->filter_lock);
 		msft_monitor_device_evt(hdev, skb);
+		mutex_unlock(&msft->filter_lock);
 		break;
 
 	default:
]

48/2 2026/08/27 19:41 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 44655
							output: 38
							thoughts: 584
						

Thoughts:
**Analyzing a Potential Race Condition in HCI Device Registration**

Okay, so looking at this patch `9e14606d8f38`, the addition of `mutex_init(&msft->filter_lock)` within `msft_register` and its inclusion in `struct msft_data` immediately catches my attention. I need to understand the implications of this.

Diving into the code, specifically the `msft_register` function, I see the initialization of the list heads: `INIT_LIST_HEAD(&msft->handle_map);` and `INIT_LIST_HEAD(&msft->address_filters);`. Then comes the assignment: `hdev->msft_data = msft;` *before* the mutex initialization with `mutex_init(&msft->filter_lock);`. Bingo! This is where the race condition likely resides.

The vulnerability stems from concurrent execution. If `msft_register` runs concurrently with `msft_do_close` (which, as I recall, can occur if `queue_work` is scheduled before `msft_register` is fully complete in `hci_register_dev`), `msft_do_close` could potentially read `hdev->msft_data`, find it non-NULL, and attempt to lock `msft->filter_lock` *before* it's been initialized. That's a classic mutex misuse, leading to unpredictable and potentially catastrophic behavior.

The fix is straightforward, really. There are two critical changes required. First, within `msft_register`, `mutex_init` *must* be called before assigning `hdev->msft_data = msft;`. Second, within `hci_register_dev`, `msft_register(hdev);` *must* be called before scheduling the work with `queue_work(hdev->req_workqueue, &hdev->power_on);`. This ensures the mutex is initialized before any potentially concurrent operations can attempt to use it.

Hold on, I need to expand the scope of my analysis. If `msft_register` is called *before* the `queue_work` call, the race with `msft_do_close` triggered by `power_on` should be eliminated. But are there other points of contention?

`hci_register_dev` is triggered when a *new* HCI device is registered. At this point, I need to consider the device's visibility. While `hci_sock_dev_event(hdev, HCI_DEV_REG)` is invoked before the work queue is scheduled, I need to consider whether userspace can access the device before the `power_on` work completes. If a user can open the device it'll invoke `hci_dev_open`, which in turn leads to `hci_dev_do_open` and finally `msft_do_open`.

Yes, this is definitely possible. Therefore, the order of operations I've identified is the *only* proper solution. Prioritizing `msft_register` and initializing the mutex *before* making the `msft` data available to the driver is the only way to avoid the race. This is why I should re-examine the `hci_register_dev` function with a more critical eye.



49/2 2026/08/27 19:41 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2610 LineCount:40]

Results:
map[Contents:2610:		list_add(&hdev->list, &hci_dev_list);
2611:		write_unlock(&hci_dev_list_lock);
2612:	
2613:		/* Devices that are marked for raw-only usage are unconfigured
2614:		 * and should not be included in normal operation.
2615:		 */
2616:		if (hci_test_quirk(hdev, HCI_QUIRK_RAW_DEVICE))
2617:			hci_dev_set_flag(hdev, HCI_UNCONFIGURED);
2618:	
2619:		/* Mark Remote Wakeup connection flag as supported if driver has wakeup
2620:		 * callback.
2621:		 */
2622:		if (hdev->wakeup)
2623:			hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
2624:	
2625:		hci_sock_dev_event(hdev, HCI_DEV_REG);
2626:		hci_dev_hold(hdev);
2627:	
2628:		error = hci_register_suspend_notifier(hdev);
2629:		if (error)
2630:			BT_WARN("register suspend notifier failed error:%d\n", error);
2631:	
2632:		queue_work(hdev->req_workqueue, &hdev->power_on);
2633:	
2634:		idr_init(&hdev->adv_monitors_idr);
2635:		msft_register(hdev);
2636:	
2637:		return id;
2638:	
2639:	err_wqueue:
2640:		debugfs_remove_recursive(hdev->debugfs);
2641:		destroy_workqueue(hdev->workqueue);
2642:		destroy_workqueue(hdev->req_workqueue);
2643:	err:
2644:		ida_free(&hci_index_ida, hdev->id);
2645:	
2646:		return error;
2647:	}
2648:	EXPORT_SYMBOL(hci_register_dev);
2649:	
]

50/2 2026/08/27 19:41 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 46588
							output: 1168
							thoughts: 5401
						

Thoughts:
**Analysis of Race Condition in Bluetooth HCI Device Registration**

Okay, so here's the deal: I've been digging into this Bluetooth HCI device registration process, and I think I've found a critical race condition that's causing this crash reported by syzkaller. The root cause comes down to the order of operations when a new virtual HCI device is registered, specifically with the `HCI_QUIRK_RAW_DEVICE` quirk set.

Here's the breakdown, from my perspective:

1.  **Device Creation and Quirk Setting**:  We start with a `vhci` device being created and a vendor packet with opcode `0x80` being written to it. This triggers a series of kernel calls.
2.  **`hci_register_dev` Invocation**: Ultimately, this leads to `hci_register_dev` being called to register the new HCI device. Because of the vendor-specific quirk, the flag `HCI_UNCONFIGURED` gets set.
3.  **The Work Queue Problem**: Inside `hci_register_dev`, there's a critical scheduling issue.  The function queues the `power_on` work, `queue_work(hdev->req_workqueue, &hdev->power_on);` *before* the Microsoft (MSFT) extension registration (`msft_register(hdev)`) and `idr_init(&hdev->adv_monitors_idr)`.  This is where things go south.
4.  **Concurrent Execution**:  The queued `power_on` work can start executing immediately on a different CPU or be preempted. Because the device is set with `HCI_UNCONFIGURED` flag, the `hci_power_on` function calls `hci_dev_do_close` almost immediately, which calls `msft_do_close`.
5.  **Uninitialized MSFT Data**: Meanwhile,  `msft_register` is *also* running concurrently. It's supposed to initialize the MSFT data associated with this HCI device, which includes allocating an `msft_data` struct, initializing some lists, and then initializing a mutex:
    ```c
    	msft = kzalloc_obj(*msft);
    	if (!msft) {
    		bt_dev_err(hdev, "Failed to register MSFT extension");
    		return;
    	}

    	INIT_LIST_HEAD(&msft->handle_map);
    	INIT_LIST_HEAD(&msft->address_filters);
    	hdev->msft_data = msft;
    	mutex_init(&msft->filter_lock);
    ```
    The key problem is that it is *assigning* the `msft_data` to `hdev` (`hdev->msft_data = msft;`) *before* the mutex is initialized! This assignment makes the data available for concurrent access before it is ready.
6.  **The Crash**: If `msft_do_close` (from the `power_on` work) executes between assigning the `msft_data` and initializing the mutex, it will read an initialized struct. It will then attempt to lock the uninitialized mutex `msft->filter_lock`. The kernel's debugging checks then correctly trigger an error because the mutex hasn't been properly initialized, leading to the crash. `mutex_lock(&msft->filter_lock)` on an uninitialized mutex is a recipe for disaster.

This race is pretty nasty because it depends on precise timing between work queue execution and the registration process.

**Proposed Fixes:**

To fix this, there are two primary changes that should be implemented:

1.  **Reordering in `hci_register_dev`**: The critical fix is to ensure the MSFT extension is fully initialized *before* the `power_on` work is queued. Therefore, move the MSFT registration and IDR initialization *before* the `queue_work` call:

    ```c
    	idr_init(&hdev->adv_monitors_idr);
    	msft_register(hdev);
    	queue_work(hdev->req_workqueue, &hdev->power_on);
    ```
    This guarantees that by the time the `power_on` work is scheduled and potentially executes, the necessary data structures for the MSFT extension are properly initialized. This is the more important change.

2.  **Defensive Ordering in `msft_register`**: Even if the primary fix is done, it's good practice to make the `msft_register` function more robust. Reorder the initialization within `msft_register` to prevent a partially initialized structure from


51/1 2026/08/27 19:42 agent history-explorer
2m Model:
deep-reasoning

Instruction:
You are an experienced Linux kernel developer researching prior art for fixing a kernel bug.
You are given a bug explanation. This explanation details the root cause of the bug resulting
from debugging, but does not provide the final fix strategy. Your goal is to explore how
similar bugs were fixed in the past in the same subsystem or files.

CRITICAL: Do NOT attempt to debug the issue further or write a patch for it yourself.
Your ONLY objective is to research and provide the necessary historical context.

Use the git-log tool with the Since parameter set to "3 years" to focus on recent history.
Search for commits that address issues with similar root causes (e.g. similar missing locks,
incorrect refcounting, or similar error path bugs) in the affected files.

Your final reply must summarize your findings: what idioms, locking rules, or common patterns
should be followed when writing a fix for this bug based on how previous similar bugs were addressed.
If you find no relevant past fixes, clearly state that.

Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.

Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash is:

------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u11:2/5607
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#1: kworker/u11:2/5607
Modules linked in:
CPU: 1 UID: 0 PID: 5607 Comm: kworker/u11:2 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: hci3 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 29 61 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d c5 f7 aa 04 00 75 13 48 8d 3d a8 43 ae 04 48 c7 c6 c0 c5 cd 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc90004547720 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888115658000
RDX: 0000000000000000 RSI: ffffffff8bcdc5c0 RDI: ffffffff90647540
RBP: ffffc900045478b0 R08: ffffffff90612953 R09: 1ffffffff20c252a
R10: dffffc0000000000 R11: fffffbfff20c252b R12: ffff88818c5d3a40
R13: 0000000000000000 R14: 1ffff920008a8ef8 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8882e86de000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd706dfc30 CR3: 0000000118cf8000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	29 61 90             	sub    %esp,-0x70(%rcx)
   3:	48 c1 e8 03          	shr    $0x3,%rax
   7:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax
   b:	84 c0                	test   %al,%al
   d:	0f 85 47 02 00 00    	jne    0x25a
  13:	83 3d c5 f7 aa 04 00 	cmpl   $0x0,0x4aaf7c5(%rip)        # 0x4aaf7df
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d a8 43 ae 04 	lea    0x4ae43a8(%rip),%rdi        # 0x4ae43cb
  23:	48 c7 c6 c0 c5 cd 8b 	mov    $0xffffffff8bcdc5c0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 75 ee ff ff       	jmp    0xffffeeaa
  35:	90                   	nop
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	e9 48 f2 ff ff       	jmp    0xfffff286
  3e:	90                   	nop
  3f:	0f                   	.byte 0xf


The explanation of the root cause of the bug is:

This crash is caused by a race condition during the registration of a new Bluetooth HCI device, specifically between the initialization of the Microsoft (MSFT) extension data and the execution of the device's `power_on` workqueue.

### Root Cause Analysis

1. **Triggering the Bug**: The syzkaller reproducer creates a Virtual HCI device (`/dev/vhci`) and writes a vendor packet with opcode `0x80` (`\xff\x80`). In `__vhci_create_device()`, this specific opcode sets the `HCI_QUIRK_RAW_DEVICE` quirk on the new HCI device and then calls `hci_register_dev(hdev)`.
2. **Device Registration**: Inside `hci_register_dev()` (`net/bluetooth/hci_core.c`), because the `HCI_QUIRK_RAW_DEVICE` quirk is set, the device is marked with the `HCI_UNCONFIGURED` flag.
3. **The Race Condition**: Towards the end of `hci_register_dev()`, the code queues the `power_on` work **before** fully initializing the device's MSFT extension and IDR:
   ```c
   	queue_work(hdev->req_workqueue, &hdev->power_on); // <--- Work is queued here

   	idr_init(&hdev->adv_monitors_idr);
   	msft_register(hdev);                              // <--- MSFT initialized here
   ```
4. **Concurrent Execution**: As soon as `queue_work()` is called, the `power_on` work can start executing concurrently on another CPU, invoking `hci_power_on()`. 
5. **Closing the Unconfigured Device**: Inside `hci_power_on()`, it checks if the device is unconfigured. Since `HCI_UNCONFIGURED` is set, it immediately bails out and calls `hci_dev_do_close(hdev)`, which in turn calls `hci_dev_close_sync(hdev)` and finally `msft_do_close(hdev)`.
6. **Uninitialized Mutex Access**: Concurrently, the original thread is executing `msft_register(hdev)` (`net/bluetooth/msft.c`):
   ```c
   	msft = kzalloc_obj(*msft);
   	// ...
   	INIT_LIST_HEAD(&msft->handle_map);
   	INIT_LIST_HEAD(&msft->address_filters);
   	hdev->msft_data = msft;               // <--- Pointer is exposed
   	mutex_init(&msft->filter_lock);       // <--- Mutex initialized AFTER exposure
   ```
   If `msft_do_close()` reads `hdev->msft_data` after it has been assigned but *before* `mutex_init()` is called, it will see a non-NULL pointer and attempt to lock the uninitialized (zeroed) mutex:
   ```c
   	mutex_lock(&msft->filter_lock);
   ```
   Locking an uninitialized mutex triggers the `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` warning seen in the crash log.

### Proposed Fix

To fix this issue, two changes should be made to ensure proper initialization ordering:

**1. Fix the initialization order in `hci_register_dev`:**
The device must be fully initialized before any work that might use it is scheduled. Move `idr_init()` and `msft_register()` to be called *before* `queue_work()`.

```c
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2631,10 +2631,10 @@ int hci_register_dev(struct hci_dev *hdev)
 		if (error)
 			BT_WARN("register suspend notifier failed error:%d\n", error);
 
-		queue_work(hdev->req_workqueue, &hdev->power_on);
-
 		idr_init(&hdev->adv_monitors_idr);
 		msft_register(hdev);
 
+		queue_work(hdev->req_workqueue, &hdev->power_on);
+
 		return id;
```

**2. Fix the pointer exposure in `msft_register`:**
As a defensive measure, `hdev->msft_data` should only be assigned *after* the structure is fully initialized. This prevents any concurrent readers from observing a partially initialized state.

```c
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,6 +764,6 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
```

Reply:
Based on the analysis of the root cause and historical fixes in the Bluetooth subsystem, this bug is a classic example of initialization order and premature exposure race conditions. 

When writing a fix for this bug (and similar issues in the future), the following idioms, locking rules, and common patterns should be followed:

### 1. Fully Initialize Before Exposure (The Publishing Rule)
**Pattern:** A newly allocated structure must be completely initialized (including all locks, lists, and default values) *before* its pointer is assigned to a globally or concurrently accessible variable.
**Context:** In `msft_register()`, assigning `hdev->msft_data = msft;` "publishes" the structure to other threads. Because `mutex_init(&msft->filter_lock);` was called *after* this assignment, a concurrent thread (like the `power_on` workqueue) could read the non-NULL pointer and attempt to lock an uninitialized mutex.
**Prior Art:** This is a fundamental kernel concurrency rule. For example, in commit `6fef032af009` (*"Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()"*), the subsystem was reworked to ensure that a new L2CAP channel is fully initialized and its lifetime is properly secured by the core *before* it is exposed to the accept queue where other tasks can access it. Similarly, commit `10f9f426ac6e` (*"Bluetooth: msft: fix slab-use-after-free in msft_do_close()"*) demonstrates that teardown functions like `msft_do_close()` rely on a simple `if (!hdev->msft_data)` check; if the pointer is not NULL, the teardown path assumes the structure and its locks are fully valid.

### 2. Complete Device Setup Before Scheduling Asynchronous Work
**Pattern:** All device state, extensions, and data structures must be fully initialized *before* scheduling any workqueues, timers, or exposing the device to userspace.
**Context:** In `hci_register_dev()`, `queue_work(..., &hdev->power_on)` was called before `idr_init()` and `msft_register()`. As soon as `queue_work()` is invoked, the work function can execute immediately on another CPU. If the work function relies on state that hasn't been initialized yet, it will race with the initialization code.
**Prior Art:** The Bluetooth subsystem frequently deals with asynchronous execution contexts. Previous fixes have addressed similar races by ensuring operations are strictly ordered or properly synchronized. For instance, commit `2449007d3f73` (*"Bluetooth: Avoid potential use-after-free in hci_error_reset"*) ensures that reference counts are held *before* asynchronous error handling work can race with device teardown. The correct idiom here is to move the `queue_work()` call to the very end of the initialization sequence.

### Summary for the Fix
The proposed fix perfectly aligns with kernel best practices:
1. **In `msft_register()`:** Move `hdev->msft_data = msft;` to the very end of the function, strictly after `mutex_init()`.
2. **In `hci_register_dev()`:** Move `queue_work(..., &hdev->power_on);` to execute after `msft_register()` and `idr_init()`. 

By adhering to the rule of **"Initialize completely, then publish/schedule"**, you prevent concurrent teardown paths or workqueues from observing a partially initialized state.

52/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 6776
							output: 45
							thoughts: 372
						

Thoughts:
**My Investigation into Bluetooth Subsystem Initialization Races**

Okay, so I've got a tricky Bluetooth bug to tackle. Seems like there's a race condition brewing in the Bluetooth subsystem, specifically in `net/bluetooth/hci_core.c` and `net/bluetooth/msft.c`. The core issue is a workqueue (`hdev->power_on`) getting queued before the device is fully set up. We're talking about initialization order and potential use of uninitialized data, or perhaps premature access to a resource. Specifically, `msft_register` and `idr_init(&hdev->adv_monitors_idr)` haven't finished, and also `hdev->msft_data` is exposed before `mutex_init(&msft->filter_lock)` is called. That sounds like a textbook race condition, ripe for causing crashes or data corruption.

My task now is to see how similar issues have been handled in the past within this codebase. The goal is to identify common patterns, idioms, or locking strategies employed to mitigate these kinds of bugs. Essentially, I need to understand what best practices are for initializing and managing resources in this subsystem, and more importantly, how to prevent similar issues from arising in future commits.

I'm thinking a targeted `git-log` search is the way to go. I'll focus on the `net/bluetooth/` directory for any commits touching `hci_core.c` and `msft.c`. I'll specify a "since 3 years" time frame to get a reasonable scope, and the critical part will be the search criteria. I need to look for commits dealing with race conditions, initialization order problems, workqueue usage, mutex-related issues, and potentially use-after-free bugs or uninitialized variable concerns.

Initially, I'll start with `PathPrefix="net/bluetooth/"` and then experiment with `MessageRegexps` like "race", "init", "work", "order", "mutex". But I think I need to broaden my search and try "race", "use-after-free", "uninitialized", "order", "queue_work" for the `MessageRegexps` terms, and this search needs to target `net/bluetooth/hci_core.c` and `net/bluetooth/msft.c`. This search should give me a solid foundation for understanding the history of these types of issues in this area, and how the developers dealt with them. Based on those commits, I should be able to derive a set of principles for crafting a robust fix for this current problem.



53/2 2026/08/27 19:42 tool git-log
0m Args:
map[Count:20 MessageRegexps:[race] PathPrefix:net/bluetooth/hci_core.c Since:3 years]

Results:
map[Output:b6807cfc195e Bluetooth: hci_sync: annotate data-races around hdev->req_status
1d6123102e9f Bluetooth: hci_core: Fix use-after-free in vhci_flush()
6fe26f694c82 Bluetooth: MGMT: Protect mgmt_pending list with its own lock
e6ed54e86aae Bluetooth: MGMT: Fix UAF on mgmt_remove_adv_monitor_complete
4d94f0555827 Bluetooth: hci_core: Fix sleeping function called from invalid context
333b4fd11e89 Bluetooth: L2CAP: Fix uaf in l2cap_connect
947ec0d002dc Bluetooth: fix use-after-free in accessing skb after sending it
2449007d3f73 Bluetooth: Avoid potential use-after-free in hci_error_reset
b938790e7054 Bluetooth: hci_codec: Fix leaking content of local_codecs
c7eaf80bfb0c Bluetooth: Fix hci_link_tx_to RCU lock usage
]

54/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8029
							output: 45
							thoughts: 42
						

Thoughts:
Okay, let's see. My first instinct, given the context, is to narrow down the search in the Bluetooth HCI core and MSFT drivers. To figure out the issue, I'm thinking of searching for key terms within the relevant files. I'll focus my investigation on those that suggest initialization, ordering of events, or queuing of work. Let's start with `net/bluetooth/hci_core.c` and `net/bluetooth/msft.c`. Specifically, I'll use grep-like searches for terms like "init", "order", and "queue_work". This should quickly point me towards the section of code responsible. I'm hoping that by targeting these functions, I can find the root of the problem.



55/2 2026/08/27 19:42 tool git-log
0m Args:
map[Count:20 MessageRegexps:[init] PathPrefix:net/bluetooth/hci_core.c Since:3 years]

Results:
map[Output:bf4afc53b77a Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
e2d471b7806b Bluetooth: ISO: Fix not using SID from adv report
b05ce8896091 Bluetooth: hci: Remove deadcode
59437cbb5781 Bluetooth: hci_core: Fix not checking skb length on hci_scodata_packet
3fe288a8214e Bluetooth: hci_core: Fix not checking skb length on hci_acldata_packet
8f7dfe171c57 Bluetooth: hci_core: Prefer struct_size over open coded arithmetic
2e2515c1ba38 Bluetooth: hci_event: Set DISCOVERY_FINDING on SCAN_ENABLED
7c2cc5b1db50 Bluetooth: Add proper definitions for scan interval and window
2449007d3f73 Bluetooth: Avoid potential use-after-free in hci_error_reset
]

56/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8519
							output: 47
							thoughts: 26
						

Thoughts:
Okay, here's my attempt at summarizing those thoughts from an expert's perspective, using the first person and starting with a bolded header:

**Diving into Bluetooth HCI Core - Let's Find That Work Queue**

Right, so I need to understand how work is scheduled in the Bluetooth HCI core, specifically related to commands and events. My immediate thought is to start with the core implementation itself. That means I'm going to jump into `net/bluetooth/hci_core.c`. My instinct is to look for the heart of the matter - the scheduling mechanism, or where work is _queued_.

I'm thinking I'll start with a targeted search. I'll use "queue_work" as my first keyword; that's the most explicit way to find where work is being submitted to a workqueue. I also want to make the search as broad as possible, just in case a function calls into something else, or uses a specific type of work struct. The plan is to see if I can narrow it down quickly.

If that doesn't yield immediate fruit, I'll broaden my scope. "work" is a pretty generic term, but it will certainly capture anything related to managing work items and the overall flow of how work is passed off to the hardware. That's likely where I'll find the relevant logic. Essentially, I'm expecting to find either a dedicated workqueue used specifically for Bluetooth HCI tasks, or maybe some more generic system workqueue usage. Let's get searching.



57/2 2026/08/27 19:42 tool git-log
0m Args:
map[Count:20 MessageRegexps:[queue_work] PathPrefix:net/bluetooth/hci_core.c Since:3 years]

Results:
map[Output:2449007d3f73 Bluetooth: Avoid potential use-after-free in hci_error_reset
]

58/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8952
							output: 45
							thoughts: 20
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Diving into hci_core.c: The Hunt for "Order"**

Alright, let's get down to brass tacks. I'm thinking about "order" within the context of `net/bluetooth/hci_core.c`. This suggests a need to understand the sequence of events, likely related to command handling, event processing, or potentially even data flow management within the Bluetooth HCI core. My initial instinct is to use "order" as a keyword to find all the different contexts in this file. I have to look out for common code, such as `struct hci_dev` and its member variables, as they're critical for device-specific attributes, or configurations that might be used when checking for different criteria. I have to think about synchronization primitives, like mutexes or spinlocks, that could be involved, as these would be vital to controlling "order" in a multithreaded environment. From there, I'll need to critically evaluate how "order" is *enforced* within that specific context. Is it handled explicitly through sequencing in the code, or implicitly through the kernel's scheduling or hardware interrupts? It's a broad term; it could even relate to sorting data structures, priorities, or a strict command response workflow. I'm expecting to delve deep to figure this one out!



59/2 2026/08/27 19:42 tool git-log
0m Args:
map[Count:20 MessageRegexps:[order] PathPrefix:net/bluetooth/hci_core.c Since:3 years]

Results:
map[Output:b6807cfc195e Bluetooth: hci_sync: annotate data-races around hdev->req_status
79a2d4678ba9 Bluetooth: hci_core: lookup hci_conn on RX path on protocol side
6851a0c228fc Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
8f7dfe171c57 Bluetooth: hci_core: Prefer struct_size over open coded arithmetic
]

60/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9438
							output: 46
							thoughts: 21
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into Bluetooth HCI Core Code**

Alright, time to dig in. I need to understand what's happening with Microsoft-related HCI interactions within the Bluetooth stack. My immediate plan is to search the `net/bluetooth/hci_core.c` file for instances of "msft." This is a pretty standard starting point when I'm tracking down vendor-specific behaviors or looking for potential workarounds. I'm expecting this search to turn up either some dedicated MSFT-specific commands, event handling tied to a Microsoft-defined profile or HCI extensions, or perhaps even just error messages that reference "msft." It's highly probable that this is related to compatibility considerations with their specific adapters or implementations. I'm hoping this search narrows down the relevant sections of code so I can then analyze the context around the "msft" references and determine the impact on the overall HCI flow. I’m prepared to broaden the search if the initial "msft" keyword is too narrow and doesn't reveal any obvious hooks, but starting here is the most logical first step.



61/2 2026/08/27 19:42 tool git-log
0m Args:
map[Count:20 MessageRegexps:[msft] PathPrefix:net/bluetooth/hci_core.c Since:3 years]

Results:
map[Output:e6ed54e86aae Bluetooth: MGMT: Fix UAF on mgmt_remove_adv_monitor_complete
10f9f426ac6e Bluetooth: msft: fix slab-use-after-free in msft_do_close()
]

62/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9823
							output: 26
							thoughts: 30
						

Thoughts:
Here's my attempt at summarizing the thought process, as if I were having them:

**Initial Assessment: Code Review Required**

Okay, time to dive in. My immediate thought is, "Let's get down to business and examine these commits: `10f9f426ac6e` and `e6ed54e86aae`." This is where the work begins. I need to understand what's changed, what's been implemented, and if there are any potential issues lurking within these revisions. I'm going to start by quickly pulling them up, comparing them, and assessing for any red flags. My goal is a rapid, but thorough, initial assessment to determine if these commits merit a more in-depth code review.



63/2 2026/08/27 19:42 tool git-show
0m Args:
map[Commit:10f9f426ac6e]

Results:
map[Output:commit 10f9f426ac6e752c8d87bf4346930ba347aaabac
Author: Sungwoo Kim <iam@sung-woo.kim>
Date:   Tue Apr 30 12:20:51 2024 -0400

    Bluetooth: msft: fix slab-use-after-free in msft_do_close()
    
    Tying the msft->data lifetime to hdev by freeing it in
    hci_release_dev() to fix the following case:
    
    [use]
    msft_do_close()
      msft = hdev->msft_data;
      if (!msft)                      ...(1) <- passed.
        return;
      mutex_lock(&msft->filter_lock); ...(4) <- used after freed.
    
    [free]
    msft_unregister()
      msft = hdev->msft_data;
      hdev->msft_data = NULL;         ...(2)
      kfree(msft);                    ...(3) <- msft is freed.
    
    ==================================================================
    BUG: KASAN: slab-use-after-free in __mutex_lock_common
    kernel/locking/mutex.c:587 [inline]
    BUG: KASAN: slab-use-after-free in __mutex_lock+0x8f/0xc30
    kernel/locking/mutex.c:752
    Read of size 8 at addr ffff888106cbbca8 by task kworker/u5:2/309
    
    Fixes: bf6a4e30ffbd ("Bluetooth: disable advertisement filters during suspend")
    Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a7028d38c1f5..bc5086423ab8 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2768,8 +2768,6 @@ void hci_unregister_dev(struct hci_dev *hdev)
 
 	hci_unregister_suspend_notifier(hdev);
 
-	msft_unregister(hdev);
-
 	hci_dev_do_close(hdev);
 
 	if (!test_bit(HCI_INIT, &hdev->flags) &&
@@ -2823,6 +2821,7 @@ void hci_release_dev(struct hci_dev *hdev)
 	hci_discovery_filter_clear(hdev);
 	hci_blocked_keys_clear(hdev);
 	hci_codec_list_clear(&hdev->local_codecs);
+	msft_release(hdev);
 	hci_dev_unlock(hdev);
 
 	ida_destroy(&hdev->unset_handle_ida);
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index 9612c5d1b13f..d039683d3bdd 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -769,7 +769,7 @@ void msft_register(struct hci_dev *hdev)
 	mutex_init(&msft->filter_lock);
 }
 
-void msft_unregister(struct hci_dev *hdev)
+void msft_release(struct hci_dev *hdev)
 {
 	struct msft_data *msft = hdev->msft_data;
 
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 2a63205b377b..fe538e9c91c0 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -14,7 +14,7 @@
 
 bool msft_monitor_supported(struct hci_dev *hdev);
 void msft_register(struct hci_dev *hdev);
-void msft_unregister(struct hci_dev *hdev);
+void msft_release(struct hci_dev *hdev);
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb);
@@ -35,7 +35,7 @@ static inline bool msft_monitor_supported(struct hci_dev *hdev)
 }
 
 static inline void msft_register(struct hci_dev *hdev) {}
-static inline void msft_unregister(struct hci_dev *hdev) {}
+static inline void msft_release(struct hci_dev *hdev) {}
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, void *data,
]

64/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11381
							output: 42
							thoughts: 277
						

Thoughts:
**Analyzing Potential Initialization Order Bugs**

Okay, so the user's pointing out a race condition in the Bluetooth HCI core, specifically related to power-on handling and device registration. It looks like `hdev->power_on` work is getting queued before crucial initialization steps – `msft_register(hdev)` and `idr_init(&hdev->adv_monitors_idr)` are completed. Furthermore, it seems like `hdev->msft_data` is being exposed too early within `msft_register` before the mutex `msft->filter_lock` is initialized.

The proposed fix makes sense – move the `queue_work` call *after* the registration and IDR initialization and move the `hdev->msft_data` assignment *after* the mutex initialization. A valid fix, no doubt.

The user is asking me to dig deeper and look for similar initialization order bugs, specifically within the same subsystem (Bluetooth) or even the same files. My task is to find previous commits that addressed similar problems. Think missing locks, incorrect reference counting scenarios, error paths with initialization order bugs. Things that have the same root cause.

My initial approach is to focus on `net/bluetooth/hci_core.c` and search for instances of `queue_work`. This should reveal other potential initialization sequence issues that have already been identified and fixed. This will give a good starting point for investigation, and hopefully reveal some useful insights!



65/2 2026/08/27 19:42 tool git-log
0m Args:
map[Count:20 MessageRegexps:[queue_work] PathPrefix:net/bluetooth/ Since:3 years]

Results:
map[Output:518aa9505fa1 Bluetooth: 6lowpan: hold L2CAP conn across debugfs control
2641a9e0a1dd Bluetooth: L2CAP: cancel pending_rx_work before taking conn->lock
9e622804d57e Bluetooth: hci_event: Fix UAF in hci_acl_create_conn_sync
2449007d3f73 Bluetooth: Avoid potential use-after-free in hci_error_reset
]

66/2 2026/08/27 19:42 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12137
							output: 45
							thoughts: 22
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Revisiting `hci_core.c` for "Order"**

Okay, time to circle back to `net/bluetooth/hci_core.c`. I'm going to search for the term "order" within that file again. My gut tells me there might be something related to command sequencing, ACL/SCO packet ordering, or perhaps even queue management that I missed during the initial sweep. I'm specifically looking for any subtle nuances related to the sequence of events and how they are handled, particularly concerning HCI commands or data flow. It's a key area for potential race conditions or unexpected behavior in a Bluetooth stack, so I want to ensure my understanding of the relevant logic is rock solid. I'm mentally preparing to sift through function calls, data structures, and comments to spot any clues I might have initially overlooked. I'm anticipating that "order" might be used in a less-than-obvious context, perhaps as part of a variable name or in a string literal within a larger conditional. Time to dive in.



67/2 2026/08/27 19:43 tool git-log
0m Args:
map[Count:20 MessageRegexps:[order] PathPrefix:net/bluetooth/hci_core.c Since:3 years]

Results:
map[Output:b6807cfc195e Bluetooth: hci_sync: annotate data-races around hdev->req_status
79a2d4678ba9 Bluetooth: hci_core: lookup hci_conn on RX path on protocol side
6851a0c228fc Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
8f7dfe171c57 Bluetooth: hci_core: Prefer struct_size over open coded arithmetic
]

68/2 2026/08/27 19:43 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12566
							output: 45
							thoughts: 20
						

Thoughts:
Okay, here's my attempt at summarizing my thought process, assuming I'm a networking/Bluetooth kernel expert:

**Investigating Potential Race Conditions in net/bluetooth/hci_core.c**

Alright, time to dive into `net/bluetooth/hci_core.c`. My gut feeling, when someone mentions "race" in this context, immediately triggers a search for potential concurrency issues. This is Bluetooth, so multi-threaded access to shared data is almost guaranteed. I need to figure out where those interactions might occur. My first step is a simple string search. "race" is a pretty broad term, so I'm not expecting a direct hit on a problematic function name, but it should point me to relevant areas within the file that are worth a deeper look. Then, I can start thinking about specific scenarios and potential flaws in the locking mechanisms, or lack thereof. I’ll be looking for shared data structures, interrupt handlers, and any place where multiple threads or contexts might be accessing the same resources simultaneously. Let's see what that search turns up. This initial scan is just to gain context and find the most relevant areas to focus on.



69/2 2026/08/27 19:43 tool git-log
0m Args:
map[Count:20 MessageRegexps:[race] PathPrefix:net/bluetooth/hci_core.c Since:3 years]

Results:
map[Output:b6807cfc195e Bluetooth: hci_sync: annotate data-races around hdev->req_status
1d6123102e9f Bluetooth: hci_core: Fix use-after-free in vhci_flush()
6fe26f694c82 Bluetooth: MGMT: Protect mgmt_pending list with its own lock
e6ed54e86aae Bluetooth: MGMT: Fix UAF on mgmt_remove_adv_monitor_complete
4d94f0555827 Bluetooth: hci_core: Fix sleeping function called from invalid context
333b4fd11e89 Bluetooth: L2CAP: Fix uaf in l2cap_connect
947ec0d002dc Bluetooth: fix use-after-free in accessing skb after sending it
2449007d3f73 Bluetooth: Avoid potential use-after-free in hci_error_reset
b938790e7054 Bluetooth: hci_codec: Fix leaking content of local_codecs
c7eaf80bfb0c Bluetooth: Fix hci_link_tx_to RCU lock usage
]

70/2 2026/08/27 19:43 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13161
							output: 27
							thoughts: 33
						

Thoughts:
Okay, here's my interpretation of those thoughts, framed as a first-person summary, keeping in mind my expertise:

**Checking Specific Hashes**

Right, let's get down to brass tacks. Time to take a look at those two specific hashes: `1d6123102e9f` and `2449007d3f73`. There's likely a specific reason we're zoning in on these two – maybe they've been flagged in an investigation, or perhaps they're part of a larger analysis pipeline I'm working through. My initial thought is to cross-reference them with any existing datasets, threat intelligence feeds, or internal repositories I have access to. The context will tell the real story. Are these file hashes? Network artifacts? System identifiers? I need more information to jump to a conclusion. This could be anything from a routine check to something very urgent, and I need to treat it accordingly. Let's see what we find.



71/2 2026/08/27 19:43 tool git-show
0m Args:
map[Commit:1d6123102e9f]

Results:
map[Output:commit 1d6123102e9fbedc8d25bf4731da6d513173e49e
Author: Kuniyuki Iwashima <kuniyu@google.com>
Date:   Tue Jun 17 09:58:13 2025 -0700

    Bluetooth: hci_core: Fix use-after-free in vhci_flush()
    
    syzbot reported use-after-free in vhci_flush() without repro. [0]
    
    From the splat, a thread close()d a vhci file descriptor while
    its device was being used by iotcl() on another thread.
    
    Once the last fd refcnt is released, vhci_release() calls
    hci_unregister_dev(), hci_free_dev(), and kfree() for struct
    vhci_data, which is set to hci_dev->dev->driver_data.
    
    The problem is that there is no synchronisation after unlinking
    hdev from hci_dev_list in hci_unregister_dev().  There might be
    another thread still accessing the hdev which was fetched before
    the unlink operation.
    
    We can use SRCU for such synchronisation.
    
    Let's run hci_dev_reset() under SRCU and wait for its completion
    in hci_unregister_dev().
    
    Another option would be to restore hci_dev->destruct(), which was
    removed in commit 587ae086f6e4 ("Bluetooth: Remove unused
    hci-destruct cb").  However, this would not be a good solution, as
    we should not run hci_unregister_dev() while there are in-flight
    ioctl() requests, which could lead to another data-race KCSAN splat.
    
    Note that other drivers seem to have the same problem, for exmaple,
    virtbt_remove().
    
    [0]:
    BUG: KASAN: slab-use-after-free in skb_queue_empty_lockless include/linux/skbuff.h:1891 [inline]
    BUG: KASAN: slab-use-after-free in skb_queue_purge_reason+0x99/0x360 net/core/skbuff.c:3937
    Read of size 8 at addr ffff88807cb8d858 by task syz.1.219/6718
    
    CPU: 1 UID: 0 PID: 6718 Comm: syz.1.219 Not tainted 6.16.0-rc1-syzkaller-00196-g08207f42d3ff #0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
    Call Trace:
     <TASK>
     dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
     print_address_description mm/kasan/report.c:408 [inline]
     print_report+0xd2/0x2b0 mm/kasan/report.c:521
     kasan_report+0x118/0x150 mm/kasan/report.c:634
     skb_queue_empty_lockless include/linux/skbuff.h:1891 [inline]
     skb_queue_purge_reason+0x99/0x360 net/core/skbuff.c:3937
     skb_queue_purge include/linux/skbuff.h:3368 [inline]
     vhci_flush+0x44/0x50 drivers/bluetooth/hci_vhci.c:69
     hci_dev_do_reset net/bluetooth/hci_core.c:552 [inline]
     hci_dev_reset+0x420/0x5c0 net/bluetooth/hci_core.c:592
     sock_do_ioctl+0xd9/0x300 net/socket.c:1190
     sock_ioctl+0x576/0x790 net/socket.c:1311
     vfs_ioctl fs/ioctl.c:51 [inline]
     __do_sys_ioctl fs/ioctl.c:907 [inline]
     __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7fcf5b98e929
    Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007fcf5c7b9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    RAX: ffffffffffffffda RBX: 00007fcf5bbb6160 RCX: 00007fcf5b98e929
    RDX: 0000000000000000 RSI: 00000000400448cb RDI: 0000000000000009
    RBP: 00007fcf5ba10b39 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    R13: 0000000000000000 R14: 00007fcf5bbb6160 R15: 00007ffd6353d528
     </TASK>
    
    Allocated by task 6535:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
     poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
     __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
     kasan_kmalloc include/linux/kasan.h:260 [inline]
     __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4359
     kmalloc_noprof include/linux/slab.h:905 [inline]
     kzalloc_noprof include/linux/slab.h:1039 [inline]
     vhci_open+0x57/0x360 drivers/bluetooth/hci_vhci.c:635
     misc_open+0x2bc/0x330 drivers/char/misc.c:161
     chrdev_open+0x4c9/0x5e0 fs/char_dev.c:414
     do_dentry_open+0xdf0/0x1970 fs/open.c:964
     vfs_open+0x3b/0x340 fs/open.c:1094
     do_open fs/namei.c:3887 [inline]
     path_openat+0x2ee5/0x3830 fs/namei.c:4046
     do_filp_open+0x1fa/0x410 fs/namei.c:4073
     do_sys_openat2+0x121/0x1c0 fs/open.c:1437
     do_sys_open fs/open.c:1452 [inline]
     __do_sys_openat fs/open.c:1468 [inline]
     __se_sys_openat fs/open.c:1463 [inline]
     __x64_sys_openat+0x138/0x170 fs/open.c:1463
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Freed by task 6535:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
     kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
     poison_slab_object mm/kasan/common.c:247 [inline]
     __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
     kasan_slab_free include/linux/kasan.h:233 [inline]
     slab_free_hook mm/slub.c:2381 [inline]
     slab_free mm/slub.c:4643 [inline]
     kfree+0x18e/0x440 mm/slub.c:4842
     vhci_release+0xbc/0xd0 drivers/bluetooth/hci_vhci.c:671
     __fput+0x44c/0xa70 fs/file_table.c:465
     task_work_run+0x1d1/0x260 kernel/task_work.c:227
     exit_task_work include/linux/task_work.h:40 [inline]
     do_exit+0x6ad/0x22e0 kernel/exit.c:955
     do_group_exit+0x21c/0x2d0 kernel/exit.c:1104
     __do_sys_exit_group kernel/exit.c:1115 [inline]
     __se_sys_exit_group kernel/exit.c:1113 [inline]
     __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1113
     x64_sys_call+0x21ba/0x21c0 arch/x86/include/generated/asm/syscalls_64.h:232
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    The buggy address belongs to the object at ffff88807cb8d800
     which belongs to the cache kmalloc-1k of size 1024
    The buggy address is located 88 bytes inside of
     freed 1024-byte region [ffff88807cb8d800, ffff88807cb8dc00)
    
    Fixes: bf18c7118cf8 ("Bluetooth: vhci: Free driver_data on file release")
    Reported-by: syzbot+2faa4825e556199361f9@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=f62d64848fc4c7c30cd6
    Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
    Acked-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index a760f05fa3fb..9fc8f544e20e 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -29,6 +29,7 @@
 #include <linux/idr.h>
 #include <linux/leds.h>
 #include <linux/rculist.h>
+#include <linux/srcu.h>
 
 #include <net/bluetooth/hci.h>
 #include <net/bluetooth/hci_drv.h>
@@ -347,6 +348,7 @@ struct adv_monitor {
 
 struct hci_dev {
 	struct list_head list;
+	struct srcu_struct srcu;
 	struct mutex	lock;
 
 	struct ida	unset_handle_ida;
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 07a8b4281a39..14d7221b8ac0 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -64,7 +64,7 @@ static DEFINE_IDA(hci_index_ida);
 
 /* Get HCI device by index.
  * Device is held on return. */
-struct hci_dev *hci_dev_get(int index)
+static struct hci_dev *__hci_dev_get(int index, int *srcu_index)
 {
 	struct hci_dev *hdev = NULL, *d;
 
@@ -77,6 +77,8 @@ struct hci_dev *hci_dev_get(int index)
 	list_for_each_entry(d, &hci_dev_list, list) {
 		if (d->id == index) {
 			hdev = hci_dev_hold(d);
+			if (srcu_index)
+				*srcu_index = srcu_read_lock(&d->srcu);
 			break;
 		}
 	}
@@ -84,6 +86,22 @@ struct hci_dev *hci_dev_get(int index)
 	return hdev;
 }
 
+struct hci_dev *hci_dev_get(int index)
+{
+	return __hci_dev_get(index, NULL);
+}
+
+static struct hci_dev *hci_dev_get_srcu(int index, int *srcu_index)
+{
+	return __hci_dev_get(index, srcu_index);
+}
+
+static void hci_dev_put_srcu(struct hci_dev *hdev, int srcu_index)
+{
+	srcu_read_unlock(&hdev->srcu, srcu_index);
+	hci_dev_put(hdev);
+}
+
 /* ---- Inquiry support ---- */
 
 bool hci_discovery_active(struct hci_dev *hdev)
@@ -568,9 +586,9 @@ static int hci_dev_do_reset(struct hci_dev *hdev)
 int hci_dev_reset(__u16 dev)
 {
 	struct hci_dev *hdev;
-	int err;
+	int err, srcu_index;
 
-	hdev = hci_dev_get(dev);
+	hdev = hci_dev_get_srcu(dev, &srcu_index);
 	if (!hdev)
 		return -ENODEV;
 
@@ -592,7 +610,7 @@ int hci_dev_reset(__u16 dev)
 	err = hci_dev_do_reset(hdev);
 
 done:
-	hci_dev_put(hdev);
+	hci_dev_put_srcu(hdev, srcu_index);
 	return err;
 }
 
@@ -2433,6 +2451,11 @@ struct hci_dev *hci_alloc_dev_priv(int sizeof_priv)
 	if (!hdev)
 		return NULL;
 
+	if (init_srcu_struct(&hdev->srcu)) {
+		kfree(hdev);
+		return NULL;
+	}
+
 	hdev->pkt_type  = (HCI_DM1 | HCI_DH1 | HCI_HV1);
 	hdev->esco_type = (ESCO_HV1);
 	hdev->link_mode = (HCI_LM_ACCEPT);
@@ -2678,6 +2701,9 @@ void hci_unregister_dev(struct hci_dev *hdev)
 	list_del(&hdev->list);
 	write_unlock(&hci_dev_list_lock);
 
+	synchronize_srcu(&hdev->srcu);
+	cleanup_srcu_struct(&hdev->srcu);
+
 	disable_work_sync(&hdev->rx_work);
 	disable_work_sync(&hdev->cmd_work);
 	disable_work_sync(&hdev->tx_work);
]

72/2 2026/08/27 19:43 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18019
							output: 27
							thoughts: 18
						

Thoughts:
Okay, let's dive into this. Here's my thought process on this:

**Initial Assessment of `2449007d3f73`**

Alright, the first thing I do is recognize the string `2449007d3f73`. It *looks* like a hexadecimal string, and given the context I'm usually dealing with, it's very likely a hash or identifier of some kind. Immediately, I'm thinking: is this a Git commit hash, a file checksum, a database key, or something else entirely? The length suggests it's likely a SHA-1 or MD5 hash, but I need more context to be sure. My initial gut tells me that given the nature of the hex, its likely a commit hash. I need to figure out what it represents. Is it related to a specific project, a piece of code, or a dataset? I need to start figuring out *where* this ID belongs.



73/2 2026/08/27 19:43 tool git-show
0m Args:
map[Commit:2449007d3f73]

Results:
map[Output:commit 2449007d3f73b2842c9734f45f0aadb522daf592
Author: Ying Hsu <yinghsu@chromium.org>
Date:   Thu Jan 4 11:56:32 2024 +0000

    Bluetooth: Avoid potential use-after-free in hci_error_reset
    
    While handling the HCI_EV_HARDWARE_ERROR event, if the underlying
    BT controller is not responding, the GPIO reset mechanism would
    free the hci_dev and lead to a use-after-free in hci_error_reset.
    
    Here's the call trace observed on a ChromeOS device with Intel AX201:
       queue_work_on+0x3e/0x6c
       __hci_cmd_sync_sk+0x2ee/0x4c0 [bluetooth <HASH:3b4a6>]
       ? init_wait_entry+0x31/0x31
       __hci_cmd_sync+0x16/0x20 [bluetooth <HASH:3b4a 6>]
       hci_error_reset+0x4f/0xa4 [bluetooth <HASH:3b4a 6>]
       process_one_work+0x1d8/0x33f
       worker_thread+0x21b/0x373
       kthread+0x13a/0x152
       ? pr_cont_work+0x54/0x54
       ? kthread_blkcg+0x31/0x31
        ret_from_fork+0x1f/0x30
    
    This patch holds the reference count on the hci_dev while processing
    a HCI_EV_HARDWARE_ERROR event to avoid potential crash.
    
    Fixes: c7741d16a57c ("Bluetooth: Perform a power cycle when receiving hardware error event")
    Signed-off-by: Ying Hsu <yinghsu@chromium.org>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 65601aa52e0d..2821a42cefdc 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1049,6 +1049,7 @@ static void hci_error_reset(struct work_struct *work)
 {
 	struct hci_dev *hdev = container_of(work, struct hci_dev, error_reset);
 
+	hci_dev_hold(hdev);
 	BT_DBG("%s", hdev->name);
 
 	if (hdev->hw_error)
@@ -1056,10 +1057,10 @@ static void hci_error_reset(struct work_struct *work)
 	else
 		bt_dev_err(hdev, "hardware error 0x%2.2x", hdev->hw_error_code);
 
-	if (hci_dev_do_close(hdev))
-		return;
+	if (!hci_dev_do_close(hdev))
+		hci_dev_do_open(hdev);
 
-	hci_dev_do_open(hdev);
+	hci_dev_put(hdev);
 }
 
 void hci_uuids_clear(struct hci_dev *hdev)
]

74/2 2026/08/27 19:43 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19161
							output: 46
							thoughts: 63
						

Thoughts:
**My Search for Prior Art**

Okay, so the user wants me to dig up some historical solutions for this initialization order bug. Specifically, they're pointing me toward similar problems fixed within the same subsystem, or even in the same files, if possible. The core issue, as I understand it, is `queue_work` being called prematurely, before the relevant device has been fully initialized.

My initial thought is to zero in on the `net/bluetooth/` directory. That seems like the logical place to start. I'll need to use some well-defined search terms to find relevant cases, so I'll probably query for "queue_work" and "init". That combination should help me locate instances where similar initialization problems were tackled, hopefully revealing some precedent. Hopefully, searching for those keywords in that directory will give me a good starting point.



75/2 2026/08/27 19:43 tool git-log
0m Args:
map[Count:20 MessageRegexps:[queue_work init] PathPrefix:net/bluetooth/ Since:3 years]

Results:
map[Output:2449007d3f73 Bluetooth: Avoid potential use-after-free in hci_error_reset
]

76/2 2026/08/27 19:43 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19489
							output: 40
							thoughts: 15
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Investigating the "Order" Within Bluetooth Networking**

Okay, so I need to understand something related to "order" within the Bluetooth networking stack. My first instinct, given my experience, is to zero in on `net/bluetooth/`. That seems like the logical starting point for investigating any ordering-related concerns within the Bluetooth protocol implementation, be it in the kernel or relevant userspace components. It's the central repository for the core Bluetooth networking code. From here, I'll be able to determine the specific area of Bluetooth that's impacted (L2CAP? HCI? Profiles?). I'll want to quickly parse through the available files and directories under that path to identify relevant files to explore and see where "order" is discussed. This could relate to packet sequencing, connection setup, command execution, or perhaps even queueing mechanisms. Let's dig in.



77/2 2026/08/27 19:43 tool git-log
0m Args:
map[Count:20 MessageRegexps:[order] PathPrefix:net/bluetooth/ Since:3 years]

Results:
map[Output:0f8a5dcc6664 Bluetooth: sco: Fix a race condition in sco_sock_timeout()
384a4b2fef9f Bluetooth: MGMT: Fix adv monitor add failure cleanup
518aa9505fa1 Bluetooth: 6lowpan: hold L2CAP conn across debugfs control
352a59dc1f4a Bluetooth: 6lowpan: avoid untracked enable work
687617555ced Bluetooth: L2CAP: validate option length before reading conf opt value
2641a9e0a1dd Bluetooth: L2CAP: cancel pending_rx_work before taking conn->lock
9707a015fe8f Bluetooth: 6lowpan: fix cyclic locking warning on netdev unregister
f50331f2a144 Bluetooth: ISO: Fix a use-after-free of the hci_conn pointer
43c441edacf9 Bluetooth: RFCOMM: hold listener socket in rfcomm_connect_ind()
8c8e620467a7 Bluetooth: L2CAP: use chan timer to close channels in cleanup_listen()
c5d415596cb6 Bluetooth: HIDP: serialise l2cap_unregister_user via hidp_session_sem
f958c7805b18 Bluetooth: ISO: Fix data-race on iso_pi(sk) in socket and HCI event paths
91b5a598b528 Bluetooth: l2cap: defer conn param update to avoid conn->lock/hdev->lock inversion
72b8deccff17 Bluetooth: bnep: fix incorrect length parsing in bnep_rx_frame() extension handling
b819db93d73f Bluetooth: SCO: fix sleeping under spinlock in sco_conn_ready
035c25007c9e Bluetooth: hci_sync: Fix UAF in le_read_features_complete
b6807cfc195e Bluetooth: hci_sync: annotate data-races around hdev->req_status
a8d1d73c81d1 Bluetooth: L2CAP: Fix not checking output MTU is acceptable on L2CAP_ECRED_CONN_REQ
6c3ea155e5ee Bluetooth: L2CAP: Fix not tracking outstanding TX ident
79a2d4678ba9 Bluetooth: hci_core: lookup hci_conn on RX path on protocol side
]

78/2 2026/08/27 19:43 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 20331
							output: 27
							thoughts: 18
						

Thoughts:
Okay, let's dive into this. Here's my thought process on encountering that code, presented as a first-person summary, keeping in mind my expertise:

**Initial Assessment: Decoding the Code**

Alright, `035c25007c9e`... First, my gut reaction is that this *looks* like a potential cryptographic hash or identifier. The hexadecimal format is a dead giveaway. The length is important; it's a 12-byte hex string (48 bits). That's not overly common, so it's a bit of a clue. My initial thoughts are: could this be a truncated hash, an identifier, or perhaps a portion of a larger data structure? It's not immediately screaming "SHA-256" or "MD5" due to its size, but those are the first algorithms I'd start mentally checking against. Time to confirm my gut feeling.



79/2 2026/08/27 19:43 tool git-show
0m Args:
map[Commit:035c25007c9e]

Results:
map[Output:commit 035c25007c9e698bef3826070ee34bb6d778020c
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Wed Mar 25 11:11:46 2026 -0400

    Bluetooth: hci_sync: Fix UAF in le_read_features_complete
    
    This fixes the following backtrace caused by hci_conn being freed
    before le_read_features_complete but after
    hci_le_read_remote_features_sync so hci_conn_del -> hci_cmd_sync_dequeue
    is not able to prevent it:
    
    ==================================================================
    BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
    BUG: KASAN: slab-use-after-free in atomic_dec_and_test include/linux/atomic/atomic-instrumented.h:1383 [inline]
    BUG: KASAN: slab-use-after-free in hci_conn_drop include/net/bluetooth/hci_core.h:1688 [inline]
    BUG: KASAN: slab-use-after-free in le_read_features_complete+0x5b/0x340 net/bluetooth/hci_sync.c:7344
    Write of size 4 at addr ffff8880796b0010 by task kworker/u9:0/52
    
    CPU: 0 UID: 0 PID: 52 Comm: kworker/u9:0 Not tainted syzkaller #0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
    Workqueue: hci0 hci_cmd_sync_work
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:94 [inline]
     dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
     print_address_description mm/kasan/report.c:378 [inline]
     print_report+0xcd/0x630 mm/kasan/report.c:482
     kasan_report+0xe0/0x110 mm/kasan/report.c:595
     check_region_inline mm/kasan/generic.c:194 [inline]
     kasan_check_range+0x100/0x1b0 mm/kasan/generic.c:200
     instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
     atomic_dec_and_test include/linux/atomic/atomic-instrumented.h:1383 [inline]
     hci_conn_drop include/net/bluetooth/hci_core.h:1688 [inline]
     le_read_features_complete+0x5b/0x340 net/bluetooth/hci_sync.c:7344
     hci_cmd_sync_work+0x1ff/0x430 net/bluetooth/hci_sync.c:334
     process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
     process_scheduled_works kernel/workqueue.c:3340 [inline]
     worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
     kthread+0x3c5/0x780 kernel/kthread.c:463
     ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
     </TASK>
    
    Allocated by task 5932:
     kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
     kasan_save_track+0x14/0x30 mm/kasan/common.c:77
     poison_kmalloc_redzone mm/kasan/common.c:400 [inline]
     __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417
     kmalloc_noprof include/linux/slab.h:957 [inline]
     kzalloc_noprof include/linux/slab.h:1094 [inline]
     __hci_conn_add+0xf8/0x1c70 net/bluetooth/hci_conn.c:963
     hci_conn_add_unset+0x76/0x100 net/bluetooth/hci_conn.c:1084
     le_conn_complete_evt+0x639/0x1f20 net/bluetooth/hci_event.c:5714
     hci_le_enh_conn_complete_evt+0x23d/0x380 net/bluetooth/hci_event.c:5861
     hci_le_meta_evt+0x357/0x5e0 net/bluetooth/hci_event.c:7408
     hci_event_func net/bluetooth/hci_event.c:7716 [inline]
     hci_event_packet+0x685/0x11c0 net/bluetooth/hci_event.c:7773
     hci_rx_work+0x2c9/0xeb0 net/bluetooth/hci_core.c:4076
     process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
     process_scheduled_works kernel/workqueue.c:3340 [inline]
     worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
     kthread+0x3c5/0x780 kernel/kthread.c:463
     ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
    
    Freed by task 5932:
     kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
     kasan_save_track+0x14/0x30 mm/kasan/common.c:77
     __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587
     kasan_save_free_info mm/kasan/kasan.h:406 [inline]
     poison_slab_object mm/kasan/common.c:252 [inline]
     __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284
     kasan_slab_free include/linux/kasan.h:234 [inline]
     slab_free_hook mm/slub.c:2540 [inline]
     slab_free mm/slub.c:6663 [inline]
     kfree+0x2f8/0x6e0 mm/slub.c:6871
     device_release+0xa4/0x240 drivers/base/core.c:2565
     kobject_cleanup lib/kobject.c:689 [inline]
     kobject_release lib/kobject.c:720 [inline]
     kref_put include/linux/kref.h:65 [inline]
     kobject_put+0x1e7/0x590 lib/kobject.c:737
     put_device drivers/base/core.c:3797 [inline]
     device_unregister+0x2f/0xc0 drivers/base/core.c:3920
     hci_conn_del_sysfs+0xb4/0x180 net/bluetooth/hci_sysfs.c:79
     hci_conn_cleanup net/bluetooth/hci_conn.c:173 [inline]
     hci_conn_del+0x657/0x1180 net/bluetooth/hci_conn.c:1234
     hci_disconn_complete_evt+0x410/0xa00 net/bluetooth/hci_event.c:3451
     hci_event_func net/bluetooth/hci_event.c:7719 [inline]
     hci_event_packet+0xa10/0x11c0 net/bluetooth/hci_event.c:7773
     hci_rx_work+0x2c9/0xeb0 net/bluetooth/hci_core.c:4076
     process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
     process_scheduled_works kernel/workqueue.c:3340 [inline]
     worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
     kthread+0x3c5/0x780 kernel/kthread.c:463
     ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
    
    The buggy address belongs to the object at ffff8880796b0000
     which belongs to the cache kmalloc-8k of size 8192
    The buggy address is located 16 bytes inside of
     freed 8192-byte region [ffff8880796b0000, ffff8880796b2000)
    
    The buggy address belongs to the physical page:
    page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x796b0
    head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
    anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
    page_type: f5(slab)
    raw: 00fff00000000040 ffff88813ff27280 0000000000000000 0000000000000001
    raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000
    head: 00fff00000000040 ffff88813ff27280 0000000000000000 0000000000000001
    head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000
    head: 00fff00000000003 ffffea0001e5ac01 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5657, tgid 5657 (dhcpcd-run-hook), ts 79819636908, free_ts 79814310558
     set_page_owner include/linux/page_owner.h:32 [inline]
     post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1845
     prep_new_page mm/page_alloc.c:1853 [inline]
     get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3879
     __alloc_frozen_pages_noprof+0x25f/0x2440 mm/page_alloc.c:5183
     alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
     alloc_slab_page mm/slub.c:3075 [inline]
     allocate_slab mm/slub.c:3248 [inline]
     new_slab+0x2c3/0x430 mm/slub.c:3302
     ___slab_alloc+0xe18/0x1c90 mm/slub.c:4651
     __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4774
     __slab_alloc_node mm/slub.c:4850 [inline]
     slab_alloc_node mm/slub.c:5246 [inline]
     __kmalloc_cache_noprof+0x477/0x800 mm/slub.c:5766
     kmalloc_noprof include/linux/slab.h:957 [inline]
     kzalloc_noprof include/linux/slab.h:1094 [inline]
     tomoyo_print_bprm security/tomoyo/audit.c:26 [inline]
     tomoyo_init_log+0xc8a/0x2140 security/tomoyo/audit.c:264
     tomoyo_supervisor+0x302/0x13b0 security/tomoyo/common.c:2198
     tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline]
     tomoyo_env_perm+0x191/0x200 security/tomoyo/environ.c:63
     tomoyo_environ security/tomoyo/domain.c:672 [inline]
     tomoyo_find_next_domain+0xec1/0x20b0 security/tomoyo/domain.c:888
     tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline]
     tomoyo_bprm_check_security+0x12d/0x1d0 security/tomoyo/tomoyo.c:92
     security_bprm_check+0x1b9/0x1e0 security/security.c:794
     search_binary_handler fs/exec.c:1659 [inline]
     exec_binprm fs/exec.c:1701 [inline]
     bprm_execve fs/exec.c:1753 [inline]
     bprm_execve+0x81e/0x1620 fs/exec.c:1729
     do_execveat_common.isra.0+0x4a5/0x610 fs/exec.c:1859
    page last free pid 5657 tgid 5657 stack trace:
     reset_page_owner include/linux/page_owner.h:25 [inline]
     free_pages_prepare mm/page_alloc.c:1394 [inline]
     __free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2901
     discard_slab mm/slub.c:3346 [inline]
     __put_partials+0x130/0x170 mm/slub.c:3886
     qlink_free mm/kasan/quarantine.c:163 [inline]
     qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179
     kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
     __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:352
     kasan_slab_alloc include/linux/kasan.h:252 [inline]
     slab_post_alloc_hook mm/slub.c:4948 [inline]
     slab_alloc_node mm/slub.c:5258 [inline]
     __kmalloc_cache_noprof+0x274/0x800 mm/slub.c:5766
     kmalloc_noprof include/linux/slab.h:957 [inline]
     tomoyo_print_header security/tomoyo/audit.c:156 [inline]
     tomoyo_init_log+0x197/0x2140 security/tomoyo/audit.c:255
     tomoyo_supervisor+0x302/0x13b0 security/tomoyo/common.c:2198
     tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline]
     tomoyo_env_perm+0x191/0x200 security/tomoyo/environ.c:63
     tomoyo_environ security/tomoyo/domain.c:672 [inline]
     tomoyo_find_next_domain+0xec1/0x20b0 security/tomoyo/domain.c:888
     tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline]
     tomoyo_bprm_check_security+0x12d/0x1d0 security/tomoyo/tomoyo.c:92
     security_bprm_check+0x1b9/0x1e0 security/security.c:794
     search_binary_handler fs/exec.c:1659 [inline]
     exec_binprm fs/exec.c:1701 [inline]
     bprm_execve fs/exec.c:1753 [inline]
     bprm_execve+0x81e/0x1620 fs/exec.c:1729
     do_execveat_common.isra.0+0x4a5/0x610 fs/exec.c:1859
     do_execve fs/exec.c:1933 [inline]
     __do_sys_execve fs/exec.c:2009 [inline]
     __se_sys_execve fs/exec.c:2004 [inline]
     __x64_sys_execve+0x8e/0xb0 fs/exec.c:2004
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
    
    Memory state around the buggy address:
     ffff8880796aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
     ffff8880796aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    >ffff8880796b0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                             ^
     ffff8880796b0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
     ffff8880796b0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ==================================================================
    
    Fixes: a106e50be74b ("Bluetooth: HCI: Add support for LL Extended Feature Set")
    Reported-by: syzbot+87badbb9094e008e0685@syzkaller.appspotmail.com
    Tested-by: syzbot+87badbb9094e008e0685@syzkaller.appspotmail.com
    Closes: https://syzbot.org/bug?extid=87badbb9094e008e0685
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Pauli Virtanen <pav@iki.fi>

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 8cbbba50e77e..ffb0ceda6f7b 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -7390,10 +7390,8 @@ static void le_read_features_complete(struct hci_dev *hdev, void *data, int err)
 
 	bt_dev_dbg(hdev, "err %d", err);
 
-	if (err == -ECANCELED)
-		return;
-
 	hci_conn_drop(conn);
+	hci_conn_put(conn);
 }
 
 static int hci_le_read_all_remote_features_sync(struct hci_dev *hdev,
@@ -7463,10 +7461,12 @@ int hci_le_read_remote_features(struct hci_conn *conn)
 	if (conn->out || (hdev->le_features[0] & HCI_LE_PERIPHERAL_FEATURES)) {
 		err = hci_cmd_sync_queue_once(hdev,
 					      hci_le_read_remote_features_sync,
-					      hci_conn_hold(conn),
+					      hci_conn_hold(hci_conn_get(conn)),
 					      le_read_features_complete);
-		if (err)
+		if (err) {
 			hci_conn_drop(conn);
+			hci_conn_put(conn);
+		}
 	} else {
 		err = -EOPNOTSUPP;
 	}
]

80/2 2026/08/27 19:43 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26329
							output: 44
							thoughts: 280
						

Thoughts:
**My Analysis of Initialization Order Issues in Bluetooth Drivers**

Okay, so the user wants me to dig into past fixes to find the best way to address this initialization order bug. It looks like `queue_work()` is happening before `msft_register()` and `idr_init()` in `hci_register_dev()`, and also that `hdev->msft_data` is assigned before `mutex_init()` in `msft_register()`. Classic. I get it, these are definitely initialization order problems that could lead to race conditions or use-after-free scenarios if we're not careful.

The user is asking me to search for similar fixes. That means looking for commits that involve initialization order problems or pointer exposures in the `net/bluetooth/` or `kernel/` directories. My initial reaction is to run searches with keywords like "init," "order," "race," and maybe even terms like "dereference" and "null." I need to find patterns here, the common idioms used when resolving these types of issues.

Rather than diving directly into a search, since the fix is already proposed in the prompt, my focus shifts to understanding the rationale behind the solution in terms of best practices and prior patterns in the kernel. So, the goal is not to find a fix, but to understand how *similar* fixes were made in the past.

Essentially, I want to extract the principles from existing solutions in order to write a cleaner, more robust and future proof patch.



81/2 2026/08/27 19:44 tool git-log
0m Args:
map[Count:20 MessageRegexps:[expose init] PathPrefix:net/bluetooth/ Since:3 years]

Results:
map[Output:6fef032af009 Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()
]

82/2 2026/08/27 19:44 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27014
							output: 25
							thoughts: 16
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience and written in the first person:

**Analyzing the Hash `6fef032af009`**

Okay, let's take a look at `6fef032af009`. My initial reaction is to consider its format. Is it an MD5 hash, SHA-1, SHA-256, or something else entirely? The length gives some clues, but I'll need to confirm the algorithm definitively. I'm immediately thinking about tools I might want to leverage here - my go-to hash identifier or a quick online check. Then, assuming I can identify the type, I need to understand its context. Where did this come from? What system or dataset is this related to? Is it a file checksum, a password hash, a database key, or something else? Understanding the source will dramatically inform how I approach any analysis. Is there related provenance or metadata associated with it? Are there any obvious potential vulnerabilities that might be immediately apparent based on the hash algorithm type? Depending on that context, I'd likely move on to checking against known hashes in my databases and any associated reputation resources for the entity or object this represents. If it's a known malicious hash, I would likely have a few remediation steps in mind immediately. But even if it's not immediately identified, the next step is typically to start considering the implications of this hash's existence and how to get further context.



83/2 2026/08/27 19:44 tool git-show
0m Args:
map[Commit:6fef032af009]

Results:
map[Output:commit 6fef032af0092ed5ccb767239a9ac1bc38c08a40
Author: Siwei Zhang <oss@fourdim.xyz>
Date:   Mon Jun 29 09:49:58 2026 -0400

    Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()
    
    l2cap_sock_new_connection_cb() returned l2cap_pi(sk)->chan after
    release_sock(parent). Once the parent lock is dropped the newly
    enqueued child socket sk is reachable via the accept queue, so another
    task can accept and free it before the callback dereferences sk,
    resulting in a use-after-free.
    
    Rework the ->new_connection() op so the core, rather than the callback,
    owns the child channel's lifetime. The op now receives a pre-allocated
    new_chan and returns an errno instead of allocating and returning a
    channel. l2cap_new_connection() allocates the child channel and links
    it into the conn list via __l2cap_chan_add() before invoking the
    callback, so the conn-list reference keeps the channel alive once
    release_sock(parent) exposes the socket to other tasks.
    
    Channel configuration that was duplicated in l2cap_sock_init() and the
    various new_connection callbacks is consolidated into
    l2cap_chan_set_defaults(), which now inherits from the parent channel
    when one is supplied.
    
    Fixes: 8ffb929098a5 ("Bluetooth: Remove parent socket usage from l2cap_core.c")
    Cc: stable@kernel.org
    Assisted-by: Claude:claude-opus-4-8
    Signed-off-by: Siwei Zhang <oss@fourdim.xyz>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 1640cc9bf83a..ef6ce1c20a4f 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -617,7 +617,8 @@ struct l2cap_chan {
 struct l2cap_ops {
 	char			*name;
 
-	struct l2cap_chan	*(*new_connection) (struct l2cap_chan *chan);
+	int			(*new_connection)(struct l2cap_chan *chan,
+						  struct l2cap_chan *new_chan);
 	int			(*recv) (struct l2cap_chan * chan,
 					 struct sk_buff *skb);
 	void			(*teardown) (struct l2cap_chan *chan, int err);
@@ -882,9 +883,10 @@ static inline __u16 __next_seq(struct l2cap_chan *chan, __u16 seq)
 	return (seq + 1) % (chan->tx_win_max + 1);
 }
 
-static inline struct l2cap_chan *l2cap_chan_no_new_connection(struct l2cap_chan *chan)
+static inline int l2cap_chan_no_new_connection(struct l2cap_chan *chan,
+					       struct l2cap_chan *new_chan)
 {
-	return NULL;
+	return -EOPNOTSUPP;
 }
 
 static inline int l2cap_chan_no_recv(struct l2cap_chan *chan, struct sk_buff *skb)
@@ -961,7 +963,7 @@ int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len,
 void l2cap_chan_busy(struct l2cap_chan *chan, int busy);
 void l2cap_chan_rx_avail(struct l2cap_chan *chan, ssize_t rx_avail);
 int l2cap_chan_check_security(struct l2cap_chan *chan, bool initiator);
-void l2cap_chan_set_defaults(struct l2cap_chan *chan);
+void l2cap_chan_set_defaults(struct l2cap_chan *chan, struct l2cap_chan *pchan);
 int l2cap_ertm_init(struct l2cap_chan *chan);
 void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan);
 void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan);
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index e7be18a3af33..d504a363a30f 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -632,7 +632,7 @@ static struct l2cap_chan *chan_create(void)
 	if (!chan)
 		return NULL;
 
-	l2cap_chan_set_defaults(chan);
+	l2cap_chan_set_defaults(chan, NULL);
 
 	chan->chan_type = L2CAP_CHAN_CONN_ORIENTED;
 	chan->mode = L2CAP_MODE_LE_FLOWCTL;
@@ -745,21 +745,6 @@ static inline void chan_ready_cb(struct l2cap_chan *chan)
 	ifup(dev->netdev);
 }
 
-static inline struct l2cap_chan *chan_new_conn_cb(struct l2cap_chan *pchan)
-{
-	struct l2cap_chan *chan;
-
-	chan = chan_create();
-	if (!chan)
-		return NULL;
-
-	chan->ops = pchan->ops;
-
-	BT_DBG("chan %p pchan %p", chan, pchan);
-
-	return chan;
-}
-
 static void unregister_dev(struct lowpan_btle_dev *dev)
 {
 	struct hci_dev *hdev = READ_ONCE(dev->hdev);
@@ -889,7 +874,6 @@ static long chan_get_sndtimeo_cb(struct l2cap_chan *chan)
 
 static const struct l2cap_ops bt_6lowpan_chan_ops = {
 	.name			= "L2CAP 6LoWPAN channel",
-	.new_connection		= chan_new_conn_cb,
 	.recv			= chan_recv_cb,
 	.close			= chan_close_cb,
 	.state_change		= chan_state_change_cb,
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 4ee3b9e30c65..519cd9552d86 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -522,7 +522,10 @@ void l2cap_chan_put(struct l2cap_chan *c)
 }
 EXPORT_SYMBOL_GPL(l2cap_chan_put);
 
-void l2cap_chan_set_defaults(struct l2cap_chan *chan)
+/* Initialise @chan with default values, inheriting from the parent channel
+ * @pchan when it is given.
+ */
+void l2cap_chan_set_defaults(struct l2cap_chan *chan, struct l2cap_chan *pchan)
 {
 	chan->fcs  = L2CAP_FCS_CRC16;
 	chan->max_tx = L2CAP_DEFAULT_MAX_TX;
@@ -536,6 +539,31 @@ void l2cap_chan_set_defaults(struct l2cap_chan *chan)
 	chan->retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
 	chan->monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
 
+	if (pchan) {
+		BT_DBG("chan %p pchan %p", chan, pchan);
+
+		chan->chan_type = pchan->chan_type;
+		chan->imtu = pchan->imtu;
+		chan->omtu = pchan->omtu;
+		chan->mode = pchan->mode;
+		chan->fcs = pchan->fcs;
+		chan->max_tx = pchan->max_tx;
+		chan->tx_win = pchan->tx_win;
+		chan->tx_win_max = pchan->tx_win_max;
+		chan->sec_level = pchan->sec_level;
+		chan->conf_state = pchan->conf_state;
+		chan->flags = pchan->flags;
+		chan->tx_credits = pchan->tx_credits;
+		chan->rx_credits = pchan->rx_credits;
+
+		if (chan->chan_type == L2CAP_CHAN_FIXED) {
+			chan->scid = pchan->scid;
+			chan->dcid = pchan->scid;
+		}
+
+		return;
+	}
+
 	chan->conf_state = 0;
 	set_bit(CONF_NOT_COMPLETE, &chan->conf_state);
 
@@ -4024,6 +4052,38 @@ static inline int l2cap_command_rej(struct l2cap_conn *conn,
 	return 0;
 }
 
+/* Allocate and initialise a channel for an incoming connection.
+ *
+ * The channel inherits its configuration from @pchan and is linked into @conn
+ * before ->new_connection() runs, so the conn list reference keeps it alive if
+ * the callback exposes it (e.g. via the socket accept queue) before this
+ * returns. The l2cap_chan_create() reference is taken over by the subsystem on
+ * success and dropped here on failure.
+ */
+static struct l2cap_chan *l2cap_new_connection(struct l2cap_conn *conn,
+					       struct l2cap_chan *pchan)
+{
+	struct l2cap_chan *chan;
+
+	chan = l2cap_chan_create();
+	if (!chan)
+		return NULL;
+
+	l2cap_chan_set_defaults(chan, pchan);
+	chan->ops = pchan->ops;
+
+	__l2cap_chan_add(conn, chan);
+
+	if (pchan->ops->new_connection &&
+	    pchan->ops->new_connection(pchan, chan) < 0) {
+		l2cap_chan_del(chan, 0);
+		l2cap_chan_put(chan);
+		return NULL;
+	}
+
+	return chan;
+}
+
 static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
 			  u8 *data, u8 rsp_code)
 {
@@ -4070,7 +4130,7 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
 		goto response;
 	}
 
-	chan = pchan->ops->new_connection(pchan);
+	chan = l2cap_new_connection(conn, pchan);
 	if (!chan)
 		goto response;
 
@@ -4088,8 +4148,6 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
 	chan->psm  = psm;
 	chan->dcid = scid;
 
-	__l2cap_chan_add(conn, chan);
-
 	dcid = chan->scid;
 
 	__set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
@@ -4972,7 +5030,7 @@ static int l2cap_le_connect_req(struct l2cap_conn *conn,
 		goto response_unlock;
 	}
 
-	chan = pchan->ops->new_connection(pchan);
+	chan = l2cap_new_connection(conn, pchan);
 	if (!chan) {
 		result = L2CAP_CR_LE_NO_MEM;
 		goto response_unlock;
@@ -4987,8 +5045,6 @@ static int l2cap_le_connect_req(struct l2cap_conn *conn,
 	chan->omtu = mtu;
 	chan->remote_mps = mps;
 
-	__l2cap_chan_add(conn, chan);
-
 	l2cap_le_flowctl_init(chan, __le16_to_cpu(req->credits));
 
 	dcid = chan->scid;
@@ -5196,7 +5252,7 @@ static inline int l2cap_ecred_conn_req(struct l2cap_conn *conn,
 			continue;
 		}
 
-		chan = pchan->ops->new_connection(pchan);
+		chan = l2cap_new_connection(conn, pchan);
 		if (!chan) {
 			result = L2CAP_CR_LE_NO_MEM;
 			continue;
@@ -5211,8 +5267,6 @@ static inline int l2cap_ecred_conn_req(struct l2cap_conn *conn,
 		chan->omtu = mtu;
 		chan->remote_mps = mps;
 
-		__l2cap_chan_add(conn, chan);
-
 		l2cap_ecred_init(chan, __le16_to_cpu(req->credits));
 
 		/* Init response */
@@ -7492,14 +7546,12 @@ static void l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
 			goto next;
 
 		l2cap_chan_lock(pchan);
-		chan = pchan->ops->new_connection(pchan);
+		chan = l2cap_new_connection(conn, pchan);
 		if (chan) {
 			bacpy(&chan->src, &hcon->src);
 			bacpy(&chan->dst, &hcon->dst);
 			chan->src_type = bdaddr_src_type(hcon);
 			chan->dst_type = dst_type;
-
-			__l2cap_chan_add(conn, chan);
 		}
 
 		l2cap_chan_unlock(pchan);
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index de56ca691afa..4058ff50cc27 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -43,7 +43,8 @@ static struct bt_sock_list l2cap_sk_list = {
 static const struct proto_ops l2cap_sock_ops;
 static void l2cap_sock_init(struct sock *sk, struct sock *parent);
 static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
-				     int proto, gfp_t prio, int kern);
+				     int proto, gfp_t prio, int kern,
+				     struct l2cap_chan *chan);
 static void l2cap_sock_cleanup_listen(struct sock *parent);
 
 bool l2cap_is_socket(struct socket *sock)
@@ -1284,6 +1285,23 @@ static int l2cap_sock_recvmsg(struct socket *sock, struct msghdr *msg,
 	return err;
 }
 
+/* Release the sock's ref on chan and clear the pointer so that the ref is
+ * dropped exactly once even if both l2cap_sock_kill() and
+ * l2cap_sock_destruct() run. Setting chan->data to NULL first stops any other
+ * task from dereferencing the now-dead sock pointer.
+ */
+static void l2cap_sock_put_chan(struct sock *sk)
+{
+	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
+
+	if (!chan)
+		return;
+
+	chan->data = NULL;
+	l2cap_pi(sk)->chan = NULL;
+	l2cap_chan_put(chan);
+}
+
 /* Kill socket (only if zapped and orphan)
  * Must be called on unlocked socket, with l2cap channel lock.
  */
@@ -1294,13 +1312,9 @@ static void l2cap_sock_kill(struct sock *sk)
 
 	BT_DBG("sk %p state %s", sk, state_to_string(sk->sk_state));
 
-	/* Sock is dead, so set chan data to NULL, avoid other task use invalid
-	 * sock pointer.
-	 */
-	l2cap_pi(sk)->chan->data = NULL;
-	/* Kill poor orphan */
+	l2cap_sock_put_chan(sk);
 
-	l2cap_chan_put(l2cap_pi(sk)->chan);
+	/* Kill poor orphan */
 	sock_set_flag(sk, SOCK_DEAD);
 	sock_put(sk);
 }
@@ -1543,12 +1557,13 @@ static void l2cap_sock_cleanup_listen(struct sock *parent)
 	}
 }
 
-static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
+static int l2cap_sock_new_connection_cb(struct l2cap_chan *chan,
+					struct l2cap_chan *new_chan)
 {
 	struct sock *sk, *parent = chan->data;
 
 	if (!parent)
-		return NULL;
+		return -EINVAL;
 
 	lock_sock(parent);
 
@@ -1556,25 +1571,28 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
 	if (sk_acceptq_is_full(parent)) {
 		BT_DBG("backlog full %d", parent->sk_ack_backlog);
 		release_sock(parent);
-		return NULL;
+		return -ENOBUFS;
 	}
 
 	sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP,
-			      GFP_ATOMIC, 0);
+			      GFP_ATOMIC, 0, new_chan);
 	if (!sk) {
 		release_sock(parent);
-		return NULL;
-        }
+		return -ENOMEM;
+	}
 
 	bt_sock_reclassify_lock(sk, BTPROTO_L2CAP);
 
 	l2cap_sock_init(sk, parent);
 
+	/* The conn list reference taken by l2cap_new_connection() keeps new_chan
+	 * alive once release_sock() lets another task free this socket.
+	 */
 	bt_accept_enqueue(parent, sk, false);
 
 	release_sock(parent);
 
-	return l2cap_pi(sk)->chan;
+	return 0;
 }
 
 static int l2cap_sock_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
@@ -1871,10 +1889,7 @@ static void l2cap_sock_destruct(struct sock *sk)
 
 	BT_DBG("sk %p", sk);
 
-	if (l2cap_pi(sk)->chan) {
-		l2cap_pi(sk)->chan->data = NULL;
-		l2cap_chan_put(l2cap_pi(sk)->chan);
-	}
+	l2cap_sock_put_chan(sk);
 
 	list_for_each_entry_safe(rx_busy, next, &l2cap_pi(sk)->rx_busy, list) {
 		kfree_skb(rx_busy->skb);
@@ -1907,30 +1922,12 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
 	BT_DBG("sk %p", sk);
 
 	if (parent) {
-		struct l2cap_chan *pchan = l2cap_pi(parent)->chan;
-
 		sk->sk_type = parent->sk_type;
 		bt_sk(sk)->flags = bt_sk(parent)->flags;
 
-		chan->chan_type = pchan->chan_type;
-		chan->imtu = pchan->imtu;
-		chan->omtu = pchan->omtu;
-		chan->conf_state = pchan->conf_state;
-		chan->mode = pchan->mode;
-		chan->fcs  = pchan->fcs;
-		chan->max_tx = pchan->max_tx;
-		chan->tx_win = pchan->tx_win;
-		chan->tx_win_max = pchan->tx_win_max;
-		chan->sec_level = pchan->sec_level;
-		chan->flags = pchan->flags;
-		chan->tx_credits = pchan->tx_credits;
-		chan->rx_credits = pchan->rx_credits;
-
-		if (chan->chan_type == L2CAP_CHAN_FIXED) {
-			chan->scid = pchan->scid;
-			chan->dcid = pchan->scid;
-		}
-
+		/* Channel configuration is inherited from the parent by
+		 * l2cap_new_connection().
+		 */
 		security_sk_clone(parent, sk);
 	} else {
 		switch (sk->sk_type) {
@@ -1956,7 +1953,7 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
 			chan->mode = L2CAP_MODE_BASIC;
 		}
 
-		l2cap_chan_set_defaults(chan);
+		l2cap_chan_set_defaults(chan, NULL);
 	}
 
 	/* Default config options */
@@ -1975,10 +1972,10 @@ static struct proto l2cap_proto = {
 };
 
 static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
-				     int proto, gfp_t prio, int kern)
+				     int proto, gfp_t prio, int kern,
+				     struct l2cap_chan *chan)
 {
 	struct sock *sk;
-	struct l2cap_chan *chan;
 
 	sk = bt_sock_alloc(net, sock, &l2cap_proto, proto, prio, kern);
 	if (!sk)
@@ -1989,16 +1986,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
 
 	INIT_LIST_HEAD(&l2cap_pi(sk)->rx_busy);
 
-	chan = l2cap_chan_create();
-	if (!chan) {
-		sk_free(sk);
-		if (sock)
-			sock->sk = NULL;
-		return NULL;
-	}
-
-	l2cap_chan_hold(chan);
-
+	/* The sock takes ownership of the caller's reference on chan. */
 	l2cap_pi(sk)->chan = chan;
 
 	return sk;
@@ -2008,6 +1996,7 @@ static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol,
 			     int kern)
 {
 	struct sock *sk;
+	struct l2cap_chan *chan;
 
 	BT_DBG("sock %p", sock);
 
@@ -2022,10 +2011,16 @@ static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol,
 
 	sock->ops = &l2cap_sock_ops;
 
-	sk = l2cap_sock_alloc(net, sock, protocol, GFP_ATOMIC, kern);
-	if (!sk)
+	chan = l2cap_chan_create();
+	if (!chan)
 		return -ENOMEM;
 
+	sk = l2cap_sock_alloc(net, sock, protocol, GFP_ATOMIC, kern, chan);
+	if (!sk) {
+		l2cap_chan_put(chan);
+		return -ENOMEM;
+	}
+
 	l2cap_sock_init(sk, NULL);
 	bt_sock_link(&l2cap_sk_list, sk);
 	return 0;
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 031d3022cb1e..c4470958b0d5 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -3201,34 +3201,19 @@ static const struct l2cap_ops smp_chan_ops = {
 	.get_sndtimeo		= l2cap_chan_no_get_sndtimeo,
 };
 
-static inline struct l2cap_chan *smp_new_conn_cb(struct l2cap_chan *pchan)
+static inline int smp_new_conn_cb(struct l2cap_chan *chan,
+				  struct l2cap_chan *new_chan)
 {
-	struct l2cap_chan *chan;
-
-	BT_DBG("pchan %p", pchan);
-
-	chan = l2cap_chan_create();
-	if (!chan)
-		return NULL;
-
-	chan->chan_type	= pchan->chan_type;
-	chan->ops	= &smp_chan_ops;
-	chan->scid	= pchan->scid;
-	chan->dcid	= chan->scid;
-	chan->imtu	= pchan->imtu;
-	chan->omtu	= pchan->omtu;
-	chan->mode	= pchan->mode;
+	new_chan->ops = &smp_chan_ops;
 
 	/* Other L2CAP channels may request SMP routines in order to
 	 * change the security level. This means that the SMP channel
 	 * lock must be considered in its own category to avoid lockdep
 	 * warnings.
 	 */
-	atomic_set(&chan->nesting, L2CAP_NESTING_SMP);
-
-	BT_DBG("created chan %p", chan);
+	atomic_set(&new_chan->nesting, L2CAP_NESTING_SMP);
 
-	return chan;
+	return 0;
 }
 
 static const struct l2cap_ops smp_root_chan_ops = {
@@ -3288,7 +3273,7 @@ static struct l2cap_chan *smp_add_cid(struct hci_dev *hdev, u16 cid)
 
 	l2cap_add_scid(chan, cid);
 
-	l2cap_chan_set_defaults(chan);
+	l2cap_chan_set_defaults(chan, NULL);
 
 	if (cid == L2CAP_CID_SMP) {
 		u8 bdaddr_type;
]

84/2 2026/08/27 19:44 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 34433
							output: 44
							thoughts: 503
						

Thoughts:
**My Analysis of Bluetooth Kernel Bug Fixes**

Alright, let's break this down. The user's asking me to think through the best approach for this bug fix, considering how similar issues have been tackled in the past. From the commits I see, the primary concern seems to revolve around concurrent access and resource lifetimes within the Bluetooth stack, specifically around `use-after-free` conditions and race conditions. I see a few key themes emerging:

1.  **SRCU and Reference Counting:** The `vhci_flush()` fix (1d6123102e9f) leverages SRCU (like a read-copy-update mechanism for synchronization) during unregistration. Then, the `hci_error_reset` fix (2449007d3f73) uses `hci_dev_hold()` / `hci_dev_put()` for reference counting to manage the lifetime of the `hci_dev` struct. These suggest synchronization primitives are crucial to protect against the premature freeing of data structures.
2.  **Initialization Order and Lifetime Management:** The `l2cap_sock_new_connection_cb()` fix (6fef032af009) is interesting. It reworks the initialization order to ensure the core owns the channel's lifetime and that the channel is fully initialized before becoming accessible to other tasks. This directly addresses the potential for a race condition when the `accept` queue is involved. The `msft_do_close()` fix (10f9f426ac6e) also ties the lifetime of `msft->data` to the `hdev` lifetime, meaning the resources are freed together to avoid a use-after-free issue.

Given the nature of the bug, which is about queueing work before initialization or exposing a pointer before the structure is fully set up, I see two core patterns I need to keep in mind.

1.  **Initialization Before Exposure:** The *first* rule is to make *absolutely* sure a data structure, especially one that might be shared across threads or accessed concurrently, is *fully* initialized before it's exposed. That means ensuring that all its constituent parts - locks, lists, any associated state, etc. - are set up before, for example, a pointer to it is made available globally or assigned to a field that's accessible by another thread.
2.  **Setup Before Scheduling:** Secondly, *all* the setup for a device or subsystem (initialization of idr structures, registration functions, etc.) needs to be done *before* scheduling any workqueues or registering it with the rest of the system. Workqueues are notorious for potential immediate execution on another CPU, meaning any initialization steps that rely on that might not be complete by the time the workqueue function runs, creating a race. This includes registration with the core subsystem.

Now, to be *thorough*, I should really search the `net/bluetooth/` directory again for any other commits containing keywords like "expose", "order", or "queue\_work". Let me run that quick query and see if anything else jumps out. It's always a good idea to confirm I'm not missing any other relevant prior art.



85/2 2026/08/27 19:44 tool git-log
0m Args:
map[Count:20 MessageRegexps:[order init] PathPrefix:net/bluetooth/ Since:3 years]

Results:
map[Output:035c25007c9e Bluetooth: hci_sync: Fix UAF in le_read_features_complete
a8d1d73c81d1 Bluetooth: L2CAP: Fix not checking output MTU is acceptable on L2CAP_ECRED_CONN_REQ
03ddb4ac2514 Bluetooth: hci_sync: Fix using random address for BIG/PA advertisements
5f397409f8ee Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc
07a9342b94a9 Bluetooth: ISO: Send BIG Create Sync via hci_sync
7d2c7ddba623 tty: rfcomm: prefer struct_size over open coded arithmetic
8f7dfe171c57 Bluetooth: hci_core: Prefer struct_size over open coded arithmetic
806a5198c059 Bluetooth: L2CAP: Fix rejecting L2CAP_CONN_PARAM_UPDATE_REQ
c4585edf708e Bluetooth: hci_conn, hci_sync: Use __counted_by() to avoid -Wfamnae warnings
1c08108f3014 Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings
]

86/2 2026/08/27 19:44 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35972
							output: 784
							thoughts: 802
						

Thoughts:
**My Analysis of the UAF Bug in `035c25007c9e`**

Okay, let's break this down. That commit, `035c25007c9e`, which addressed that Use-After-Free, was pretty straightforward in its fix: holding a reference to prevent the dangling pointer. But looking beyond the fix itself, let's really internalize the root cause and the *why* behind the fix, especially in the context of the Bluetooth subsystem and kernel concurrency in general.

The problem, as I see it, boils down to a classic race condition stemming from improper initialization order. Specifically: `queue_work` was called *before* `msft_register` and `idr_init`, and critically, `hdev->msft_data` was assigned prematurely, *before* the mutex was initialized. This is a textbook example.

So, digging deeper, I see three critical principles emerging, and these are key to understanding the larger picture:

1.  **"Fully Initialize Before Exposure" (Publishing Rule):** The core failure is from not having a `msft_data` fully initialized before making it available (via assignment to `hdev->msft_data`). When we allocate a new data structure (like `msft_data`), all its fields, lists, and synchronization primitives (mutexes, lists) *must* be fully initialized *before* that pointer is assigned to the `hdev->msft_data` structure. This assignment effectively "publishes" the structure to other parts of the system. If we publish prematurely, concurrent threads – like the `power_on` workqueue in this case – can access completely uninitialized memory or uninitialized locks, and boom... we crash. The commit `6fef032af009` with the L2CAP sock fix? Same principle. It ensures proper initialization and lifetime management before exposure.

2.  **"Complete Setup Before Scheduling Work/Registration":** Workqueues, timers, and device registrations are the bread and butter for asynchronous execution in the kernel. When we use any of those mechanisms, we make the device visible to potentially concurrent contexts. That means *all* the device state, including extensions like MSFT and IDRs, *must* be fully set up *before* calling `queue_work()`, or any of those functions. When `queue_work()` is called, that work can run on another CPU almost immediately, and if it tries to access state that's still being initialized after the `queue_work()` call, we have a race. That's what happened here. This is a fundamental kernel concurrency rule. In the Bluetooth subsystem, and really, across the kernel, this is why we see initialization reordering and synchronization techniques like SRCU (seen in `1d6123102e9f` "Bluetooth: hci_core: Fix use-after-free in vhci_flush()") or holding references before asynchronous tasks (`2449007d3f73` "Bluetooth: Avoid potential use-after-free in hci_error_reset").

3.  **"Defensive Programming in Error Paths/Teardown":** The crash occurred during the teardown path, triggered by `hci_power_on`. So we need teardown paths that are *robust* even when state is only *partially* initialized. But the *real* fix is actually ensuring the state is *never* partially initialized when it's visible. That commit `10f9f426ac6e` ("Bluetooth: msft: fix slab-use-after-free in msft_do_close()") is a good example of this, where `msft_do_close()` relies on checking if `msft = hdev->msft_data` is NULL. If the pointer *isn't* NULL, it assumes the structure is fully valid and all its locks are initialized. This, again, highlights the need for Rule #1, where we only assign the pointer when the structure is fully valid.

The key to preventing this issue, and the pattern to be aware of going forward, centers around this initialization ordering and the need to guarantee that no partially initialized structure is made visible to other parts of the kernel. This publishing rule is, and should be treated as, critical to correctness.



87/1 2026/08/27 19:44 action kernel-scratch-checkouter
0m Results:
map[KernelScratchSrc:/app/workdir/cache/tmp/tmp3619804582]

88/1 2026/08/27 19:45 loop
1h36m
89/2 2026/08/27 19:45 iteration 0
1h36m
90/3 2026/08/27 19:45 agent patch-generator
57m Model:
core

Instruction:
You are an experienced Linux kernel developer tasked with creating a fix for a kernel bug.
You will be given a crash report, an initial explanation of the root cause done by another
kernel expert, and a summary of how similar bugs were fixed in the past.

Use the codeeditor tool to do code edits.
Note: you will not see your changes when looking at the code using codesearch tools.
Use the patch-diff tool to review the modifications you applied.

Your final reply should contain explanation of what you did in the patch and why
(details not present in the initial explanation of the bug).

Your fix must not just prevent the given crash, but also be the best fix for the underlying
root cause from the software engineering point of view. There can be several ways to fix the
same bug. Consider alternatives, and pick the best one. For example, additional checks may be
added at different locations/functions, it's usually better to place them earlier in the
execution to avoid multiple checks at various locations later.

Frequently the same coding mistake is done in several locations in the source code.
Check if your fix should be extended/applied to similar cases around to fix other similar bugs.
But don't go too wide, don't try to fix problems kernel-wide, fix similar issues
in the same file only.


If you are changing post-conditions of a function, consider all callers of the functions,
and if they need to be updated to handle new post-conditions. For example, if you make
a function that previously never returned a NULL, return NULL, consider if callers
need to be updated to handle NULL return value.


If you will end up removing the WARN_ON macro because the condition can legitimately happen,
add a pr_err/dev_err/... (whatever is the macro for printing runtime errors used in the file)
call that logs that the unlikely condition has happened. The pr_err/dev_err/... message
must not include "WARNING" nor "BUG" strings.


Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash that corresponds to the bug is:

------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u11:2/5607
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#1: kworker/u11:2/5607
Modules linked in:
CPU: 1 UID: 0 PID: 5607 Comm: kworker/u11:2 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: hci3 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 29 61 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d c5 f7 aa 04 00 75 13 48 8d 3d a8 43 ae 04 48 c7 c6 c0 c5 cd 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc90004547720 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888115658000
RDX: 0000000000000000 RSI: ffffffff8bcdc5c0 RDI: ffffffff90647540
RBP: ffffc900045478b0 R08: ffffffff90612953 R09: 1ffffffff20c252a
R10: dffffc0000000000 R11: fffffbfff20c252b R12: ffff88818c5d3a40
R13: 0000000000000000 R14: 1ffff920008a8ef8 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8882e86de000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd706dfc30 CR3: 0000000118cf8000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	29 61 90             	sub    %esp,-0x70(%rcx)
   3:	48 c1 e8 03          	shr    $0x3,%rax
   7:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax
   b:	84 c0                	test   %al,%al
   d:	0f 85 47 02 00 00    	jne    0x25a
  13:	83 3d c5 f7 aa 04 00 	cmpl   $0x0,0x4aaf7c5(%rip)        # 0x4aaf7df
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d a8 43 ae 04 	lea    0x4ae43a8(%rip),%rdi        # 0x4ae43cb
  23:	48 c7 c6 c0 c5 cd 8b 	mov    $0xffffffff8bcdc5c0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 75 ee ff ff       	jmp    0xffffeeaa
  35:	90                   	nop
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	e9 48 f2 ff ff       	jmp    0xfffff286
  3e:	90                   	nop
  3f:	0f                   	.byte 0xf


The explanation of the root cause of the bug is:

This crash is caused by a race condition during the registration of a new Bluetooth HCI device, specifically between the initialization of the Microsoft (MSFT) extension data and the execution of the device's `power_on` workqueue.

### Root Cause Analysis

1. **Triggering the Bug**: The syzkaller reproducer creates a Virtual HCI device (`/dev/vhci`) and writes a vendor packet with opcode `0x80` (`\xff\x80`). In `__vhci_create_device()`, this specific opcode sets the `HCI_QUIRK_RAW_DEVICE` quirk on the new HCI device and then calls `hci_register_dev(hdev)`.
2. **Device Registration**: Inside `hci_register_dev()` (`net/bluetooth/hci_core.c`), because the `HCI_QUIRK_RAW_DEVICE` quirk is set, the device is marked with the `HCI_UNCONFIGURED` flag.
3. **The Race Condition**: Towards the end of `hci_register_dev()`, the code queues the `power_on` work **before** fully initializing the device's MSFT extension and IDR:
   ```c
   	queue_work(hdev->req_workqueue, &hdev->power_on); // <--- Work is queued here

   	idr_init(&hdev->adv_monitors_idr);
   	msft_register(hdev);                              // <--- MSFT initialized here
   ```
4. **Concurrent Execution**: As soon as `queue_work()` is called, the `power_on` work can start executing concurrently on another CPU, invoking `hci_power_on()`. 
5. **Closing the Unconfigured Device**: Inside `hci_power_on()`, it checks if the device is unconfigured. Since `HCI_UNCONFIGURED` is set, it immediately bails out and calls `hci_dev_do_close(hdev)`, which in turn calls `hci_dev_close_sync(hdev)` and finally `msft_do_close(hdev)`.
6. **Uninitialized Mutex Access**: Concurrently, the original thread is executing `msft_register(hdev)` (`net/bluetooth/msft.c`):
   ```c
   	msft = kzalloc_obj(*msft);
   	// ...
   	INIT_LIST_HEAD(&msft->handle_map);
   	INIT_LIST_HEAD(&msft->address_filters);
   	hdev->msft_data = msft;               // <--- Pointer is exposed
   	mutex_init(&msft->filter_lock);       // <--- Mutex initialized AFTER exposure
   ```
   If `msft_do_close()` reads `hdev->msft_data` after it has been assigned but *before* `mutex_init()` is called, it will see a non-NULL pointer and attempt to lock the uninitialized (zeroed) mutex:
   ```c
   	mutex_lock(&msft->filter_lock);
   ```
   Locking an uninitialized mutex triggers the `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` warning seen in the crash log.

### Proposed Fix

To fix this issue, two changes should be made to ensure proper initialization ordering:

**1. Fix the initialization order in `hci_register_dev`:**
The device must be fully initialized before any work that might use it is scheduled. Move `idr_init()` and `msft_register()` to be called *before* `queue_work()`.

```c
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2631,10 +2631,10 @@ int hci_register_dev(struct hci_dev *hdev)
 		if (error)
 			BT_WARN("register suspend notifier failed error:%d\n", error);
 
-		queue_work(hdev->req_workqueue, &hdev->power_on);
-
 		idr_init(&hdev->adv_monitors_idr);
 		msft_register(hdev);
 
+		queue_work(hdev->req_workqueue, &hdev->power_on);
+
 		return id;
```

**2. Fix the pointer exposure in `msft_register`:**
As a defensive measure, `hdev->msft_data` should only be assigned *after* the structure is fully initialized. This prevents any concurrent readers from observing a partially initialized state.

```c
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,6 +764,6 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
```


Historical context on how similar bugs were fixed in the past:

Based on the analysis of the root cause and historical fixes in the Bluetooth subsystem, this bug is a classic example of initialization order and premature exposure race conditions. 

When writing a fix for this bug (and similar issues in the future), the following idioms, locking rules, and common patterns should be followed:

### 1. Fully Initialize Before Exposure (The Publishing Rule)
**Pattern:** A newly allocated structure must be completely initialized (including all locks, lists, and default values) *before* its pointer is assigned to a globally or concurrently accessible variable.
**Context:** In `msft_register()`, assigning `hdev->msft_data = msft;` "publishes" the structure to other threads. Because `mutex_init(&msft->filter_lock);` was called *after* this assignment, a concurrent thread (like the `power_on` workqueue) could read the non-NULL pointer and attempt to lock an uninitialized mutex.
**Prior Art:** This is a fundamental kernel concurrency rule. For example, in commit `6fef032af009` (*"Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()"*), the subsystem was reworked to ensure that a new L2CAP channel is fully initialized and its lifetime is properly secured by the core *before* it is exposed to the accept queue where other tasks can access it. Similarly, commit `10f9f426ac6e` (*"Bluetooth: msft: fix slab-use-after-free in msft_do_close()"*) demonstrates that teardown functions like `msft_do_close()` rely on a simple `if (!hdev->msft_data)` check; if the pointer is not NULL, the teardown path assumes the structure and its locks are fully valid.

### 2. Complete Device Setup Before Scheduling Asynchronous Work
**Pattern:** All device state, extensions, and data structures must be fully initialized *before* scheduling any workqueues, timers, or exposing the device to userspace.
**Context:** In `hci_register_dev()`, `queue_work(..., &hdev->power_on)` was called before `idr_init()` and `msft_register()`. As soon as `queue_work()` is invoked, the work function can execute immediately on another CPU. If the work function relies on state that hasn't been initialized yet, it will race with the initialization code.
**Prior Art:** The Bluetooth subsystem frequently deals with asynchronous execution contexts. Previous fixes have addressed similar races by ensuring operations are strictly ordered or properly synchronized. For instance, commit `2449007d3f73` (*"Bluetooth: Avoid potential use-after-free in hci_error_reset"*) ensures that reference counts are held *before* asynchronous error handling work can race with device teardown. The correct idiom here is to move the `queue_work()` call to the very end of the initialization sequence.

### Summary for the Fix
The proposed fix perfectly aligns with kernel best practices:
1. **In `msft_register()`:** Move `hdev->msft_data = msft;` to the very end of the function, strictly after `mutex_init()`.
2. **In `hci_register_dev()`:** Move `queue_work(..., &hdev->power_on);` to execute after `msft_register()` and `idr_init()`. 

By adhering to the rule of **"Initialize completely, then publish/schedule"**, you prevent concurrent teardown paths or workqueues from observing a partially initialized state.




Reply:
### Summary of Changes

1. **Reorder Device Registration and Workqueue Scheduling (`net/bluetooth/hci_core.c`):**
   In `hci_register_dev()`, scheduling `&hdev->power_on` on the request workqueue was previously done *before* initializing the advertisement monitor IDR (`idr_init(&hdev->adv_monitors_idr)`) and Microsoft extension state (`msft_register(hdev)`). For devices marked with quirks like `HCI_QUIRK_RAW_DEVICE` (flagged as `HCI_UNCONFIGURED`), the asynchronously scheduled `hci_power_on` worker immediately triggers `hci_dev_do_close()` and `msft_do_close()`. By moving `queue_work(hdev->req_workqueue, &hdev->power_on)` to after `idr_init()` and `msft_register()`, the device data structures and extensions are guaranteed to be fully initialized before any asynchronous work or cleanup routines can access them.

2. **Publish MSFT Extension State After Complete Initialization (`net/bluetooth/msft.c`):**
   In `msft_register()`, `hdev->msft_data = msft;` was previously assigned before initializing the `filter_lock` mutex (`mutex_init(&msft->filter_lock)`). This exposed a partially initialized `struct msft_data` instance to concurrent teardown and callback paths (such as `msft_do_close()`), resulting in a lock attempt on an uninitialized mutex (`DEBUG_LOCKS_WARN_ON(lock->magic != lock)`). We moved the assignment `hdev->msft_data = msft;` to the very end of `msft_register()` after all list heads and mutexes have been initialized.

91/4 2026/08/27 19:45 llm patch-generator
2m Model:
gemini-3.7-flash

Tokens:
							input: 8099
							output: 74
							thoughts: 60
						

Thoughts:
**Initial Investigation of the Bluetooth Issue**

Okay, let's dive into this. The bug report points to specific files and lines, so that's where I need to start. I'm going to leverage my usual approach. I'll use either `read-file` or `codesearch-definition-source` to quickly get a look at `net/bluetooth/hci_core.c` and `net/bluetooth/msft.c`. This will give me a first pass at the relevant code and help me understand the context around the reported issue. No point in blindly digging without a proper look first.



92/4 2026/08/27 19:47 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2600 LineCount:50]

Results:
map[Contents:2600:	
2601:		hci_dev_set_flag(hdev, HCI_SETUP);
2602:		hci_dev_set_flag(hdev, HCI_AUTO_OFF);
2603:	
2604:		/* Assume BR/EDR support until proven otherwise (such as
2605:		 * through reading supported features during init.
2606:		 */
2607:		hci_dev_set_flag(hdev, HCI_BREDR_ENABLED);
2608:	
2609:		write_lock(&hci_dev_list_lock);
2610:		list_add(&hdev->list, &hci_dev_list);
2611:		write_unlock(&hci_dev_list_lock);
2612:	
2613:		/* Devices that are marked for raw-only usage are unconfigured
2614:		 * and should not be included in normal operation.
2615:		 */
2616:		if (hci_test_quirk(hdev, HCI_QUIRK_RAW_DEVICE))
2617:			hci_dev_set_flag(hdev, HCI_UNCONFIGURED);
2618:	
2619:		/* Mark Remote Wakeup connection flag as supported if driver has wakeup
2620:		 * callback.
2621:		 */
2622:		if (hdev->wakeup)
2623:			hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
2624:	
2625:		hci_sock_dev_event(hdev, HCI_DEV_REG);
2626:		hci_dev_hold(hdev);
2627:	
2628:		error = hci_register_suspend_notifier(hdev);
2629:		if (error)
2630:			BT_WARN("register suspend notifier failed error:%d\n", error);
2631:	
2632:		queue_work(hdev->req_workqueue, &hdev->power_on);
2633:	
2634:		idr_init(&hdev->adv_monitors_idr);
2635:		msft_register(hdev);
2636:	
2637:		return id;
2638:	
2639:	err_wqueue:
2640:		debugfs_remove_recursive(hdev->debugfs);
2641:		destroy_workqueue(hdev->workqueue);
2642:		destroy_workqueue(hdev->req_workqueue);
2643:	err:
2644:		ida_free(&hci_index_ida, hdev->id);
2645:	
2646:		return error;
2647:	}
2648:	EXPORT_SYMBOL(hci_register_dev);
2649:	
]

93/4 2026/08/27 19:47 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:750 LineCount:30]

Results:
map[Contents: 750:		return err;
 751:	}
 752:	
 753:	void msft_register(struct hci_dev *hdev)
 754:	{
 755:		struct msft_data *msft = NULL;
 756:	
 757:		bt_dev_dbg(hdev, "Register MSFT extension");
 758:	
 759:		msft = kzalloc_obj(*msft);
 760:		if (!msft) {
 761:			bt_dev_err(hdev, "Failed to register MSFT extension");
 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
 770:	
 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
 779:	
]

94/4 2026/08/27 19:47 llm patch-generator
23m Model:
gemini-3.7-flash

Tokens:
							input: 9531
							output: 39
							thoughts: 60
						

Thoughts:
**Deep Dive into `hci_register_dev`**

Okay, let's take a comprehensive look at this. Before we dive into any specific area, I need to zoom out. I'm going to scrutinize the entire `hci_register_dev` function and the code surrounding it. My expert intuition tells me that if there's a problem in one spot, it's likely there could be related issues or at least similar patterns elsewhere. I need to ensure we're not missing something related.

Right, let's get down to brass tacks. I'll focus on lines 2500 through 2650 of the code. This should give me a solid chunk to work with. I need to thoroughly understand what's happening within this particular block of code. I'm looking for anything that might raise a red flag and potentially lead to the problem we suspect.



95/4 2026/08/27 20:11 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2500 LineCount:100]

Results:
map[Contents:2500:		INIT_LIST_HEAD(&hdev->pend_le_conns);
2501:		INIT_LIST_HEAD(&hdev->pend_le_reports);
2502:		INIT_LIST_HEAD(&hdev->conn_hash.list);
2503:		INIT_LIST_HEAD(&hdev->adv_instances);
2504:		INIT_LIST_HEAD(&hdev->blocked_keys);
2505:		INIT_LIST_HEAD(&hdev->monitored_devices);
2506:	
2507:		INIT_LIST_HEAD(&hdev->local_codecs);
2508:		INIT_WORK(&hdev->rx_work, hci_rx_work);
2509:		INIT_WORK(&hdev->cmd_work, hci_cmd_work);
2510:		INIT_WORK(&hdev->tx_work, hci_tx_work);
2511:		INIT_WORK(&hdev->power_on, hci_power_on);
2512:		INIT_WORK(&hdev->error_reset, hci_error_reset);
2513:	
2514:		hci_cmd_sync_init(hdev);
2515:	
2516:		INIT_DELAYED_WORK(&hdev->power_off, hci_power_off);
2517:	
2518:		skb_queue_head_init(&hdev->rx_q);
2519:		skb_queue_head_init(&hdev->cmd_q);
2520:		skb_queue_head_init(&hdev->raw_q);
2521:	
2522:		init_waitqueue_head(&hdev->req_wait_q);
2523:	
2524:		INIT_DELAYED_WORK(&hdev->cmd_timer, hci_cmd_timeout);
2525:		INIT_DELAYED_WORK(&hdev->ncmd_timer, hci_ncmd_timeout);
2526:	
2527:		hci_devcd_setup(hdev);
2528:	
2529:		hci_init_sysfs(hdev);
2530:		discovery_init(hdev);
2531:	
2532:		return hdev;
2533:	}
2534:	EXPORT_SYMBOL(hci_alloc_dev_priv);
2535:	
2536:	/* Free HCI device */
2537:	void hci_free_dev(struct hci_dev *hdev)
2538:	{
2539:		/* will free via device release */
2540:		put_device(&hdev->dev);
2541:	}
2542:	EXPORT_SYMBOL(hci_free_dev);
2543:	
2544:	/* Register HCI device */
2545:	int hci_register_dev(struct hci_dev *hdev)
2546:	{
2547:		int id, error;
2548:	
2549:		if (!hdev->open || !hdev->close || !hdev->send)
2550:			return -EINVAL;
2551:	
2552:		id = ida_alloc_max(&hci_index_ida, HCI_MAX_ID - 1, GFP_KERNEL);
2553:		if (id < 0)
2554:			return id;
2555:	
2556:		error = dev_set_name(&hdev->dev, "hci%u", id);
2557:		if (error)
2558:			return error;
2559:	
2560:		hdev->name = dev_name(&hdev->dev);
2561:		hdev->id = id;
2562:	
2563:		BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
2564:	
2565:		hdev->workqueue = alloc_ordered_workqueue("%s", WQ_HIGHPRI, hdev->name);
2566:		if (!hdev->workqueue) {
2567:			error = -ENOMEM;
2568:			goto err;
2569:		}
2570:	
2571:		hdev->req_workqueue = alloc_ordered_workqueue("%s", WQ_HIGHPRI,
2572:							      hdev->name);
2573:		if (!hdev->req_workqueue) {
2574:			destroy_workqueue(hdev->workqueue);
2575:			error = -ENOMEM;
2576:			goto err;
2577:		}
2578:	
2579:		if (!IS_ERR_OR_NULL(bt_debugfs))
2580:			hdev->debugfs = debugfs_create_dir(hdev->name, bt_debugfs);
2581:	
2582:		error = device_add(&hdev->dev);
2583:		if (error < 0)
2584:			goto err_wqueue;
2585:	
2586:		hci_leds_init(hdev);
2587:	
2588:		hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev,
2589:					    RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops,
2590:					    hdev);
2591:		if (hdev->rfkill) {
2592:			if (rfkill_register(hdev->rfkill) < 0) {
2593:				rfkill_destroy(hdev->rfkill);
2594:				hdev->rfkill = NULL;
2595:			}
2596:		}
2597:	
2598:		if (hdev->rfkill && rfkill_blocked(hdev->rfkill))
2599:			hci_dev_set_flag(hdev, HCI_RFKILLED);
]

96/4 2026/08/27 20:11 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 11419
							output: 40
							thoughts: 64
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own mental process, given my expertise:

**Diving Deep into Extension Lifecycle**

Right, so I need to get a really solid grasp on how these extensions, particularly `adv_monitors_idr`, `msft`, and `aosp`, are brought online and then properly decommissioned. I know these can be tricky, especially in a complex system like this one. Initialization and teardown are critical for avoiding resource leaks and unexpected behavior down the line. I need to understand the sequencing and dependencies involved.

My immediate plan is to zero in on the `net/bluetooth/` directory. That seems like the logical place to start digging into the core Bluetooth functionality where these extensions would likely be integrated. I'm going to leverage my grep skills – I'll search for `msft_`, `aosp_`, and `adv_monitor` specifically within that directory. This should give me a manageable set of files to review, allowing me to pinpoint the relevant initialization and cleanup routines. This targeted approach will provide me with a clean picture of how these extensions are managed in the Bluetooth stack.



97/4 2026/08/27 20:11 tool grepper
0m Args:
map[Expression:msft_register|aosp_register|adv_monitors_idr PathPrefix:net/bluetooth]

Results:
map[Output:net/bluetooth/hci_core.c=1841=void hci_adv_monitors_clear(struct hci_dev *hdev)
--
net/bluetooth/hci_core.c-1845-
net/bluetooth/hci_core.c:1846:	idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle)
net/bluetooth/hci_core.c-1847-		hci_free_adv_monitor(hdev, monitor);
net/bluetooth/hci_core.c-1848-
net/bluetooth/hci_core.c:1849:	idr_destroy(&hdev->adv_monitors_idr);
net/bluetooth/hci_core.c-1850-}
--
net/bluetooth/hci_core.c=1855=void hci_free_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor)
--
net/bluetooth/hci_core.c-1868-	if (monitor->handle)
net/bluetooth/hci_core.c:1869:		idr_remove(&hdev->adv_monitors_idr, monitor->handle);
net/bluetooth/hci_core.c-1870-
--
net/bluetooth/hci_core.c=1881=int hci_add_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor)
--
net/bluetooth/hci_core.c-1892-	max = HCI_MIN_ADV_MONITOR_HANDLE + HCI_MAX_ADV_MONITOR_NUM_HANDLES;
net/bluetooth/hci_core.c:1893:	handle = idr_alloc(&hdev->adv_monitors_idr, monitor, min, max,
net/bluetooth/hci_core.c-1894-			   GFP_KERNEL);
--
net/bluetooth/hci_core.c=1963=int hci_remove_single_adv_monitor(struct hci_dev *hdev, u16 handle)
net/bluetooth/hci_core.c-1964-{
net/bluetooth/hci_core.c:1965:	struct adv_monitor *monitor = idr_find(&hdev->adv_monitors_idr, handle);
net/bluetooth/hci_core.c-1966-
--
net/bluetooth/hci_core.c=1974=int hci_remove_all_adv_monitor(struct hci_dev *hdev)
--
net/bluetooth/hci_core.c-1980-	while (1) {
net/bluetooth/hci_core.c:1981:		monitor = idr_get_next(&hdev->adv_monitors_idr, &idr_next_id);
net/bluetooth/hci_core.c-1982-		if (!monitor)
--
net/bluetooth/hci_core.c=1996=bool hci_is_adv_monitoring(struct hci_dev *hdev)
net/bluetooth/hci_core.c-1997-{
net/bluetooth/hci_core.c:1998:	return !idr_is_empty(&hdev->adv_monitors_idr);
net/bluetooth/hci_core.c-1999-}
--
net/bluetooth/hci_core.c=2545=int hci_register_dev(struct hci_dev *hdev)
--
net/bluetooth/hci_core.c-2633-
net/bluetooth/hci_core.c:2634:	idr_init(&hdev->adv_monitors_idr);
net/bluetooth/hci_core.c:2635:	msft_register(hdev);
net/bluetooth/hci_core.c-2636-
--
net/bluetooth/hci_event.c=6174=static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
--
net/bluetooth/hci_event.c-6300-					       bdaddr, bdaddr_type) &&
net/bluetooth/hci_event.c:6301:		    idr_is_empty(&hdev->adv_monitors_idr))
net/bluetooth/hci_event.c-6302-			return;
--
net/bluetooth/hci_sync.c=2840=static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
--
net/bluetooth/hci_sync.c-2994-	 */
net/bluetooth/hci_sync.c:2995:	if (!idr_is_empty(&hdev->adv_monitors_idr) && !hdev->suspended &&
net/bluetooth/hci_sync.c-2996-	    hci_get_adv_monitor_offload_ext(hdev) == HCI_ADV_MONITOR_EXT_NONE &&
--
net/bluetooth/mgmt.c=5362=static int read_adv_mon_features(struct sock *sk, struct hci_dev *hdev,
--
net/bluetooth/mgmt.c-5380-
net/bluetooth/mgmt.c:5381:	idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle)
net/bluetooth/mgmt.c-5382-		handles[num_handles++] = monitor->handle;
--
net/bluetooth/msft.c=449=int msft_suspend_sync(struct hci_dev *hdev)
--
net/bluetooth/msft.c-460-	while (1) {
net/bluetooth/msft.c:461:		monitor = idr_get_next(&hdev->adv_monitors_idr, &handle);
net/bluetooth/msft.c-462-		if (!monitor)
--
net/bluetooth/msft.c=582=static void reregister_monitor(struct hci_dev *hdev)
--
net/bluetooth/msft.c-593-	while (1) {
net/bluetooth/msft.c:594:		monitor = idr_get_next(&hdev->adv_monitors_idr, &handle);
net/bluetooth/msft.c-595-		if (!monitor)
--
net/bluetooth/msft.c=667=void msft_do_close(struct hci_dev *hdev)
--
net/bluetooth/msft.c-682-	list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
net/bluetooth/msft.c:683:		monitor = idr_find(&hdev->adv_monitors_idr,
net/bluetooth/msft.c-684-				   handle_data->mgmt_handle);
--
net/bluetooth/msft.c=710=static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
--
net/bluetooth/msft.c-752-
net/bluetooth/msft.c:753:void msft_register(struct hci_dev *hdev)
net/bluetooth/msft.c-754-{
--
net/bluetooth/msft.h=15=bool msft_monitor_supported(struct hci_dev *hdev);
net/bluetooth/msft.h:16:void msft_register(struct hci_dev *hdev);
net/bluetooth/msft.h-17-void msft_release(struct hci_dev *hdev);
--
net/bluetooth/msft.h=32=static inline bool msft_monitor_supported(struct hci_dev *hdev)
--
net/bluetooth/msft.h-36-
net/bluetooth/msft.h:37:static inline void msft_register(struct hci_dev *hdev) {}
net/bluetooth/msft.h-38-static inline void msft_release(struct hci_dev *hdev) {}
]

98/4 2026/08/27 20:11 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 13753
							output: 26
							thoughts: 22
						

Thoughts:
Here's my take on those thoughts:

**Considering AOSP Extensions**

Okay, so we're looking at this particular feature, and it's got me thinking. We can't just limit our investigation; to be thorough, we need to cross-reference with the Android Open Source Project. Let's dig into the `aosp` extensions. I want to see if they're implementing something analogous, some solution that might be a precedent or a related approach. A comparison could provide valuable context, and, as an expert, I know the value of examining all angles. So, let's dive into the `aosp` code and see what we can find. It's time to broaden the search.



99/4 2026/08/27 20:12 tool grepper
0m Args:
map[Expression:aosp_ PathPrefix:net/bluetooth]

Results:
map[Output:net/bluetooth/aosp.c-16- */
net/bluetooth/aosp.c:17:struct aosp_rp_le_get_vendor_capa {
net/bluetooth/aosp.c-18-	/* v0.95: 15 octets */
--
net/bluetooth/aosp.c-42-
net/bluetooth/aosp.c:43:void aosp_do_open(struct hci_dev *hdev)
net/bluetooth/aosp.c-44-{
net/bluetooth/aosp.c-45-	struct sk_buff *skb;
net/bluetooth/aosp.c:46:	struct aosp_rp_le_get_vendor_capa *rp;
net/bluetooth/aosp.c-47-	u16 version_supported;
net/bluetooth/aosp.c-48-
net/bluetooth/aosp.c:49:	if (!hdev->aosp_capable)
net/bluetooth/aosp.c-50-		return;
--
net/bluetooth/aosp.c-69-
net/bluetooth/aosp.c:70:	rp = (struct aosp_rp_le_get_vendor_capa *)skb->data;
net/bluetooth/aosp.c-71-
--
net/bluetooth/aosp.c-97-	if (rp->bluetooth_quality_report_support) {
net/bluetooth/aosp.c:98:		hdev->aosp_quality_report = true;
net/bluetooth/aosp.c-99-		bt_dev_info(hdev, "AOSP quality report is supported");
--
net/bluetooth/aosp.c-110-
net/bluetooth/aosp.c:111:void aosp_do_close(struct hci_dev *hdev)
net/bluetooth/aosp.c-112-{
net/bluetooth/aosp.c:113:	if (!hdev->aosp_capable)
net/bluetooth/aosp.c-114-		return;
--
net/bluetooth/aosp.c-140-
net/bluetooth/aosp.c:141:struct aosp_bqr_cp {
net/bluetooth/aosp.c-142-	__u8	report_action;
--
net/bluetooth/aosp.c=147=static int enable_quality_report(struct hci_dev *hdev)
--
net/bluetooth/aosp.c-149-	struct sk_buff *skb;
net/bluetooth/aosp.c:150:	struct aosp_bqr_cp cp;
net/bluetooth/aosp.c-151-
--
net/bluetooth/aosp.c=171=static int disable_quality_report(struct hci_dev *hdev)
--
net/bluetooth/aosp.c-173-	struct sk_buff *skb;
net/bluetooth/aosp.c:174:	struct aosp_bqr_cp cp = { 0 };
net/bluetooth/aosp.c-175-
--
net/bluetooth/aosp.c-192-
net/bluetooth/aosp.c:193:bool aosp_has_quality_report(struct hci_dev *hdev)
net/bluetooth/aosp.c-194-{
net/bluetooth/aosp.c:195:	return hdev->aosp_quality_report;
net/bluetooth/aosp.c-196-}
net/bluetooth/aosp.c-197-
net/bluetooth/aosp.c:198:int aosp_set_quality_report(struct hci_dev *hdev, bool enable)
net/bluetooth/aosp.c-199-{
net/bluetooth/aosp.c:200:	if (!aosp_has_quality_report(hdev))
net/bluetooth/aosp.c-201-		return -EOPNOTSUPP;
--
net/bluetooth/aosp.h-7-
net/bluetooth/aosp.h:8:void aosp_do_open(struct hci_dev *hdev);
net/bluetooth/aosp.h:9:void aosp_do_close(struct hci_dev *hdev);
net/bluetooth/aosp.h-10-
net/bluetooth/aosp.h:11:bool aosp_has_quality_report(struct hci_dev *hdev);
net/bluetooth/aosp.h:12:int aosp_set_quality_report(struct hci_dev *hdev, bool enable);
net/bluetooth/aosp.h-13-
--
net/bluetooth/aosp.h-15-
net/bluetooth/aosp.h:16:static inline void aosp_do_open(struct hci_dev *hdev) {}
net/bluetooth/aosp.h:17:static inline void aosp_do_close(struct hci_dev *hdev) {}
net/bluetooth/aosp.h-18-
net/bluetooth/aosp.h:19:static inline bool aosp_has_quality_report(struct hci_dev *hdev)
net/bluetooth/aosp.h-20-{
--
net/bluetooth/aosp.h-23-
net/bluetooth/aosp.h:24:static inline int aosp_set_quality_report(struct hci_dev *hdev, bool enable)
net/bluetooth/aosp.h-25-{
--
net/bluetooth/hci_sync.c=5230=static int hci_dev_init_sync(struct hci_dev *hdev)
--
net/bluetooth/hci_sync.c-5273-		msft_do_open(hdev);
net/bluetooth/hci_sync.c:5274:		aosp_do_open(hdev);
net/bluetooth/hci_sync.c-5275-	}
--
net/bluetooth/hci_sync.c=5432=int hci_dev_close_sync(struct hci_dev *hdev)
--
net/bluetooth/hci_sync.c-5520-	if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
net/bluetooth/hci_sync.c:5521:		aosp_do_close(hdev);
net/bluetooth/hci_sync.c-5522-		msft_do_close(hdev);
--
net/bluetooth/mgmt.c=4613=static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev,
--
net/bluetooth/mgmt.c-4648-
net/bluetooth/mgmt.c:4649:	if (hdev && (aosp_has_quality_report(hdev) ||
net/bluetooth/mgmt.c-4650-		     hdev->set_quality_report)) {
--
net/bluetooth/mgmt.c=4850=static int set_quality_report_func(struct sock *sk, struct hci_dev *hdev,
--
net/bluetooth/mgmt.c-4880-
net/bluetooth/mgmt.c:4881:	if (!aosp_has_quality_report(hdev) && !hdev->set_quality_report) {
net/bluetooth/mgmt.c-4882-		err = mgmt_cmd_status(sk, hdev->id,
--
net/bluetooth/mgmt.c-4891-		else
net/bluetooth/mgmt.c:4892:			err = aosp_set_quality_report(hdev, val);
net/bluetooth/mgmt.c-4893-
]

100/4 2026/08/27 20:12 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 15851
							output: 37
							thoughts: 63
						

Thoughts:
Here's my analysis of what you're asking me to think about, framed as a first-person summary:

**Diving into the Microsoft Bluetooth Code**

Okay, so we're looking at `net/bluetooth/msft.c` again. My focus is on the crucial functions: `msft_do_close`, `msft_register`, and `msft_release`. These are the key pieces for managing the Microsoft-specific Bluetooth functionality within the kernel. I need to understand their interactions and dependencies fully.

Specifically, I'm zeroing in on lines 660 through 790. This range likely encapsulates the core logic where these functions are defined or heavily utilized. I'll be meticulously examining the code within that block to grasp the specific implementation details, any potential race conditions, resource management, or error handling nuances related to these Microsoft-specific Bluetooth operations. My goal is to develop a robust mental model of how these functions fit into the larger Bluetooth driver architecture, and to flag any potential areas for improvement or concern.



101/4 2026/08/27 20:12 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:660 LineCount:120]

Results:
map[Contents: 660:			/* Monitors get removed on power off, so we need to explicitly
 661:			 * tell the controller to re-monitor.
 662:			 */
 663:			reregister_monitor(hdev);
 664:		}
 665:	}
 666:	
 667:	void msft_do_close(struct hci_dev *hdev)
 668:	{
 669:		struct msft_data *msft = hdev->msft_data;
 670:		struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
 671:		struct msft_monitor_addr_filter_data *address_filter, *n;
 672:		struct adv_monitor *monitor;
 673:	
 674:		if (!msft)
 675:			return;
 676:	
 677:		bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 678:	
 679:		/* The controller will silently remove all monitors on power off.
 680:		 * Therefore, remove handle_data mapping and reset monitor state.
 681:		 */
 682:		list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 683:			monitor = idr_find(&hdev->adv_monitors_idr,
 684:					   handle_data->mgmt_handle);
 685:	
 686:			if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED)
 687:				monitor->state = ADV_MONITOR_STATE_REGISTERED;
 688:	
 689:			list_del(&handle_data->list);
 690:			kfree(handle_data);
 691:		}
 692:	
 693:		mutex_lock(&msft->filter_lock);
 694:		list_for_each_entry_safe(address_filter, n, &msft->address_filters,
 695:					 list) {
 696:			list_del(&address_filter->list);
 697:			kfree(address_filter);
 698:		}
 699:		mutex_unlock(&msft->filter_lock);
 700:	
 701:		hci_dev_lock(hdev);
 702:	
 703:		/* Clear any devices that are being monitored and notify device lost */
 704:		hdev->advmon_pend_notify = false;
 705:		msft_monitor_device_del(hdev, 0, NULL, 0, true);
 706:	
 707:		hci_dev_unlock(hdev);
 708:	}
 709:	
 710:	static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
 711:	{
 712:		struct msft_monitor_addr_filter_data *address_filter = data;
 713:		struct msft_cp_le_cancel_monitor_advertisement cp;
 714:		struct msft_data *msft = hdev->msft_data;
 715:		struct sk_buff *skb;
 716:		int err = 0;
 717:	
 718:		if (!msft) {
 719:			bt_dev_err(hdev, "MSFT: msft data is freed");
 720:			return -EINVAL;
 721:		}
 722:	
 723:		/* The address filter has been removed by hci dev close */
 724:		if (!test_bit(HCI_UP, &hdev->flags))
 725:			return 0;
 726:	
 727:		mutex_lock(&msft->filter_lock);
 728:		list_del(&address_filter->list);
 729:		mutex_unlock(&msft->filter_lock);
 730:	
 731:		cp.sub_opcode = MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT;
 732:		cp.handle = address_filter->msft_handle;
 733:	
 734:		skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
 735:				     HCI_CMD_TIMEOUT);
 736:		if (IS_ERR(skb)) {
 737:			bt_dev_err(hdev, "MSFT: Failed to cancel address (%pMR) filter",
 738:				   &address_filter->bdaddr);
 739:			err = PTR_ERR(skb);
 740:			goto done;
 741:		}
 742:		kfree_skb(skb);
 743:	
 744:		bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
 745:			   &address_filter->bdaddr);
 746:	
 747:	done:
 748:		kfree(address_filter);
 749:	
 750:		return err;
 751:	}
 752:	
 753:	void msft_register(struct hci_dev *hdev)
 754:	{
 755:		struct msft_data *msft = NULL;
 756:	
 757:		bt_dev_dbg(hdev, "Register MSFT extension");
 758:	
 759:		msft = kzalloc_obj(*msft);
]

102/4 2026/08/27 20:12 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 17702
							output: 36
							thoughts: 25
						

Thoughts:
Here's a summary of my thought process, as requested:

**Diving into `msft.c`**

Okay, time to dig in. Based on what I'm looking at, the next logical step is to examine lines 760 to 800 in `net/bluetooth/msft.c`. That section likely pertains to the specific behavior I'm trying to understand, or at least, that's where I need to start my investigation. Given the file and function I'm currently assessing, this range probably contains the relevant logic or data structures I need to analyze. Let's see what gems are hidden in those lines! I'm expecting to find either a clear implementation of the interaction I'm interested in, or at least, some clues that will help me work out the problem.



103/4 2026/08/27 20:12 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:760 LineCount:40]

Results:
map[Contents: 760:		if (!msft) {
 761:			bt_dev_err(hdev, "Failed to register MSFT extension");
 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
 770:	
 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
 779:	
 780:		hdev->msft_data = NULL;
 781:	
 782:		kfree(msft->evt_prefix);
 783:		mutex_destroy(&msft->filter_lock);
 784:		kfree(msft);
 785:	}
 786:	
 787:	/* This function requires the caller holds hdev->lock */
 788:	static void msft_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr,
 789:				      __u8 addr_type, __u16 mgmt_handle)
 790:	{
 791:		struct monitored_device *dev;
 792:	
 793:		dev = kmalloc_obj(*dev);
 794:		if (!dev) {
 795:			bt_dev_err(hdev, "MSFT vendor event %u: no memory",
 796:				   MSFT_EV_LE_MONITOR_DEVICE);
 797:			return;
 798:		}
 799:	
]

104/4 2026/08/27 20:12 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 18509
							output: 27
							thoughts: 45
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own mental process, given my expertise:

**Investigating Device Registration and Unregistration Flows**

Right, so I need to dig into the device registration and unregistration process, specifically focusing on what happens when things go sideways, or when a device is deliberately unregistered. My immediate concern is resource management; I need to ensure that any resources associated with the device are cleanly released in these failure scenarios.

Let's start by zeroing in on the cleanup operations. I suspect `msft_release` is involved, and I'll need to check how it's called within these failure paths, or in tear-down routines. Where does it fit into the picture? I'll also want to look for any instances of `idr_destroy`. That's a classic function to clean up resource IDs, so I'll bet it’s involved here. This should give me a good overview of the resource deallocation strategy during both successful and unsuccessful registration/unregistration.



105/4 2026/08/27 20:13 tool grepper
0m Args:
map[Expression:msft_release PathPrefix:net/bluetooth]

Results:
map[Output:net/bluetooth/hci_core.c=2706=void hci_release_dev(struct hci_dev *hdev)
--
net/bluetooth/hci_core.c-2730-	hci_codec_list_clear(&hdev->local_codecs);
net/bluetooth/hci_core.c:2731:	msft_release(hdev);
net/bluetooth/hci_core.c-2732-	hci_dev_unlock(hdev);
--
net/bluetooth/msft.c=753=void msft_register(struct hci_dev *hdev)
--
net/bluetooth/msft.c-770-
net/bluetooth/msft.c:771:void msft_release(struct hci_dev *hdev)
net/bluetooth/msft.c-772-{
--
net/bluetooth/msft.h=16=void msft_register(struct hci_dev *hdev);
net/bluetooth/msft.h:17:void msft_release(struct hci_dev *hdev);
net/bluetooth/msft.h-18-void msft_do_open(struct hci_dev *hdev);
--
net/bluetooth/msft.h=37=static inline void msft_register(struct hci_dev *hdev) {}
net/bluetooth/msft.h:38:static inline void msft_release(struct hci_dev *hdev) {}
net/bluetooth/msft.h-39-static inline void msft_do_open(struct hci_dev *hdev) {}
]

106/4 2026/08/27 20:13 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 19192
							output: 39
							thoughts: 31
						

Thoughts:
Okay, let's dive into this. Here's my thought process on what I'm about to do:

**Checking `hci_release_dev` and `hci_unregister_dev`**

Alright, I need to get a clear picture of how Bluetooth HCI device management is being handled, particularly during release and unregistration. My gut tells me these functions in `net/bluetooth/hci_core.c`, namely `hci_release_dev` and `hci_unregister_dev`, will be key to understanding the full lifecycle. I want to see exactly how these devices are cleaned up and resources deallocated when a device is no longer needed or is being removed. I expect to find critical interactions with other core Bluetooth data structures and potentially resource management mechanisms. I’ll need to trace the implications of these calls, considering how state transitions and error handling are implemented within them. This should help me better understand the overall system robustness and any potential areas for improvement or vulnerabilities, especially in regards to potential race conditions or resource leaks. Let's see what we can find.



107/4 2026/08/27 20:14 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2650 LineCount:100]

Results:
map[Contents:2650:	/* Unregister HCI device */
2651:	void hci_unregister_dev(struct hci_dev *hdev)
2652:	{
2653:		BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
2654:	
2655:		mutex_lock(&hdev->unregister_lock);
2656:		hci_dev_set_flag(hdev, HCI_UNREGISTER);
2657:		mutex_unlock(&hdev->unregister_lock);
2658:	
2659:		write_lock(&hci_dev_list_lock);
2660:		list_del(&hdev->list);
2661:		write_unlock(&hci_dev_list_lock);
2662:	
2663:		synchronize_srcu(&hdev->srcu);
2664:		cleanup_srcu_struct(&hdev->srcu);
2665:	
2666:		disable_work_sync(&hdev->rx_work);
2667:		disable_work_sync(&hdev->cmd_work);
2668:		disable_work_sync(&hdev->tx_work);
2669:		disable_work_sync(&hdev->power_on);
2670:		disable_work_sync(&hdev->error_reset);
2671:		disable_delayed_work_sync(&hdev->cmd_timer);
2672:		disable_delayed_work_sync(&hdev->ncmd_timer);
2673:	
2674:		hci_cmd_sync_clear(hdev);
2675:	
2676:		hci_unregister_suspend_notifier(hdev);
2677:	
2678:		hci_dev_do_close(hdev);
2679:	
2680:		if (!test_bit(HCI_INIT, &hdev->flags) &&
2681:		    !hci_dev_test_flag(hdev, HCI_SETUP) &&
2682:		    !hci_dev_test_flag(hdev, HCI_CONFIG)) {
2683:			hci_dev_lock(hdev);
2684:			mgmt_index_removed(hdev);
2685:			hci_dev_unlock(hdev);
2686:		}
2687:	
2688:		/* mgmt_index_removed should take care of emptying the
2689:		 * pending list */
2690:		BUG_ON(!list_empty(&hdev->mgmt_pending));
2691:	
2692:		hci_sock_dev_event(hdev, HCI_DEV_UNREG);
2693:	
2694:		if (hdev->rfkill) {
2695:			rfkill_unregister(hdev->rfkill);
2696:			rfkill_destroy(hdev->rfkill);
2697:		}
2698:	
2699:		device_del(&hdev->dev);
2700:		/* Actual cleanup is deferred until hci_release_dev(). */
2701:		hci_dev_put(hdev);
2702:	}
2703:	EXPORT_SYMBOL(hci_unregister_dev);
2704:	
2705:	/* Release HCI device */
2706:	void hci_release_dev(struct hci_dev *hdev)
2707:	{
2708:		debugfs_remove_recursive(hdev->debugfs);
2709:		kfree_const(hdev->hw_info);
2710:		kfree_const(hdev->fw_info);
2711:	
2712:		destroy_workqueue(hdev->workqueue);
2713:		destroy_workqueue(hdev->req_workqueue);
2714:	
2715:		hci_dev_lock(hdev);
2716:		hci_bdaddr_list_clear(&hdev->reject_list);
2717:		hci_bdaddr_list_clear(&hdev->accept_list);
2718:		hci_uuids_clear(hdev);
2719:		hci_link_keys_clear(hdev);
2720:		hci_smp_ltks_clear(hdev);
2721:		hci_smp_irks_clear(hdev);
2722:		hci_remote_oob_data_clear(hdev);
2723:		hci_adv_instances_clear(hdev);
2724:		hci_adv_monitors_clear(hdev);
2725:		hci_bdaddr_list_clear(&hdev->le_accept_list);
2726:		hci_bdaddr_list_clear(&hdev->le_resolv_list);
2727:		hci_conn_params_clear_all(hdev);
2728:		hci_discovery_filter_clear(hdev);
2729:		hci_blocked_keys_clear(hdev);
2730:		hci_codec_list_clear(&hdev->local_codecs);
2731:		msft_release(hdev);
2732:		hci_dev_unlock(hdev);
2733:	
2734:		ida_destroy(&hdev->unset_handle_ida);
2735:		ida_free(&hci_index_ida, hdev->id);
2736:		kfree_skb(hdev->sent_cmd);
2737:		kfree_skb(hdev->req_skb);
2738:		kfree_skb(hdev->recv_event);
2739:		kfree(hdev);
2740:	}
2741:	EXPORT_SYMBOL(hci_release_dev);
2742:	
2743:	int hci_register_suspend_notifier(struct hci_dev *hdev)
2744:	{
2745:		int ret = 0;
2746:	
2747:		if (!hdev->suspend_notifier.notifier_call &&
2748:		    !hci_test_quirk(hdev, HCI_QUIRK_NO_SUSPEND_NOTIFIER)) {
2749:			hdev->suspend_notifier.notifier_call = hci_suspend_notifier;
]

108/4 2026/08/27 20:14 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 21158
							output: 29
							thoughts: 309
						

Thoughts:
**Investigating Potential Double Initialization**

Okay, so I'm digging into this `hdev->adv_monitors_idr` and I need to make sure this isn't initialized twice. My first thought is to check if `idr_init(&hdev->adv_monitors_idr)` is exclusively called within either `hci_register_dev` or `hci_alloc_dev_priv`. That's the most likely place for this sort of problem to crop up.

Hold on a second, though, I need to understand the lifecycle of `hdev->adv_monitors_idr`. Where is it *actually* initialized and destroyed? A quick search brings me to `hci_adv_monitors_clear(hdev)` which is called from `hci_release_dev`. Looks like it's destroyed there with a `idr_destroy(&hdev->adv_monitors_idr)`. Okay, so at least we know *when* it's torn down.

Right, back to the initialization. I have to make sure `idr_init(&hdev->adv_monitors_idr)` is being called in `hci_register_dev`. This is important, as the initialization is paired with the tear-down.

Hang on... now I'm thinking, why wasn't this initialization done in `hci_alloc_dev_priv`? It seems like this would be a more logical place. I will have to look into this more. I'm going to leverage git blame or history on `adv_monitors_idr`, and also check the code related to `msft_register` and `queue_work(hdev->req_workqueue, &hdev->power_on)` to see if there's any implicit initialization or resource management happening there that I might be missing.



109/4 2026/08/27 20:15 tool git-log
7m Args:
map[CodeRegexp:adv_monitors_idr Count:10]

Results:
map[Output:936daee9cf08 Bluetooth: Remove hci_request.{c,h}
7cf5c2978f23 Bluetooth: hci_sync: Refactor remove Adv Monitor
b747a83690c8 Bluetooth: hci_sync: Refactor add Adv Monitor
182ee45da083 Bluetooth: hci_sync: Rework hci_suspend_notifier
e8907f76544f Bluetooth: hci_sync: Make use of hci_cmd_sync_queue set 3
ce81843be24e Bluetooth: Fix Advertisement Monitor Suspend/Resume
4a37682c6b59 Bluetooth: advmon offload MSFT handle controller reset
66bd095ab5d4 Bluetooth: advmon offload MSFT remove monitor
a2a4dedf88ab Bluetooth: advmon offload MSFT add monitor
c4f1f408168c Bluetooth: Interleave with allowlist scan
]

110/4 2026/08/27 20:22 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 22134
							output: 25
							thoughts: 42
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Investigating the Implementation History of `idr_init`**

Alright, so I need to dig into the origins or modifications surrounding the `idr_init` function. Specifically, I'm thinking about tracing a couple of commits, `7cf5c2978f23` and `182ee45da083`. I'm guessing one of these will show the initial introduction of this function, or maybe a significant refactor that changed its behavior. I might need to trace them both to see how the code evolved. From there, I'll need to review the commit messages and changesets to grasp the rationale and any context that led to those particular code revisions. The goal is to rapidly understand the historical context surrounding this function, so I can see what influences the current behavior or implementation.



111/4 2026/08/27 20:23 tool git-log
10m Error:
log-in to see details

Args:
map[CodeRegexp:msft_register Count:5]

Results:
map[Output:]

112/4 2026/08/27 20:33 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 22427
							output: 34
							thoughts: 11
						

Thoughts:
Here's my summary, as though I'm thinking through this process:

**Defining the Path Prefix**

Okay, so we're looking at configuring something, and the key here is to define a `PathPrefix`. The concept is pretty clear: we're establishing a hierarchical route or location for something. The "net/bluetooth" part is critical. This is where the magic happens. By setting `PathPrefix="net/bluetooth"`, I'm creating a specific, well-defined segment for this particular component or configuration. It’s like saying, "Hey, anything related to *network* and *bluetooth* stuff will be found under this directory/URL/whatever structure this system uses." This makes things organized, predictable, and manageable. The implications are far-reaching. It provides a clear way to address and manage a certain set of resources.



113/4 2026/08/27 20:33 tool git-log
0m Args:
map[CodeRegexp:msft_register Count:5 PathPrefix:net/bluetooth]

Results:
map[Output:5031ffcc79b8 Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle
]

114/4 2026/08/27 20:33 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 22691
							output: 25
							thoughts: 17
						

Thoughts:
Okay, here's my interpretation of what's going through my mind when I encounter the commit hash `5031ffcc79b8`:

**Initial Assessment: Diving into the Commit**

Alright, `5031ffcc79b8`. Let's get right into it, I need to understand what this commit did. I'm going to quickly get a sense of the context. First, I want to see if it's a hotfix, a feature addition, or a refactor. A quick `git log -p 5031ffcc79b8` or a look at the commit message and diff is a good starting point to categorize it. Depending on the size of the change I'll know if I need to dig deeper.

If it's large, I might start by identifying the affected modules, and related dependencies. I'll mentally map out the impacted areas of the code base. Are we touching core functionality, or something more isolated? I'll be looking for potential side effects. What edge cases might this introduce, or unintentionally address?

My focus then shifts to the reasoning behind the change. I need to understand *why* this commit was made. Was it a bug fix? An optimization? Or maybe it adds functionality that could impact design? The commit message should be a solid foundation for this analysis, but I can't blindly trust it. I might need to trace the change back to related issues or pull requests to fully understand the rationale.

Finally, I need to evaluate the code quality. Is the code well-written, easy to understand, and maintainable? Are the changes consistent with existing coding conventions? Are there unit tests? Does it appear that the code has been tested in a real environment? I'll be particularly vigilant for potential performance bottlenecks or security vulnerabilities. If I find any red flags, I will want to verify that the fix is sufficient. I might even be prompted to add my own analysis to improve the code.



115/4 2026/08/27 20:34 tool git-show
0m Args:
map[Commit:5031ffcc79b8]

Results:
map[Output:commit 5031ffcc79b81776ac8f7f8b1a585aed8818e3d1
Author: Miao-chen Chou <mcchou@chromium.org>
Date:   Thu Sep 9 14:10:23 2021 -0700

    Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle
    
    This splits the msft_do_{open/close} to msft_do_{open/close} and
    msft_{register/unregister}. With this change it is possible to retain
    the MSFT extension info irrespective of controller power on/off state.
    This helps bluetoothd to report correct 'supported features' of the
    controller to the D-Bus clients event if the controller is off. It also
    re-reads the MSFT info upon every msft_do_open().
    
    The following test steps were performed.
    1. Boot the test device and verify the MSFT support debug log in syslog.
    2. Power off the controller and read the 'supported features', power on
       and read again.
    3. Restart the bluetoothd and verify the 'supported features' value.
    
    Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
    Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
    Reviewed-by: Archie Pusaka <apusaka@chromium.org>
    Reviewed-by: Alain Michaud <alainm@chromium.org>
    Signed-off-by: Manish Mandlik <mmandlik@google.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5236faa397fa..beda5dac1658 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3990,6 +3990,7 @@ int hci_register_dev(struct hci_dev *hdev)
 	queue_work(hdev->req_workqueue, &hdev->power_on);
 
 	idr_init(&hdev->adv_monitors_idr);
+	msft_register(hdev);
 
 	return id;
 
@@ -4022,6 +4023,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
 		cancel_work_sync(&hdev->suspend_prepare);
 	}
 
+	msft_unregister(hdev);
+
 	hci_dev_do_close(hdev);
 
 	if (!test_bit(HCI_INIT, &hdev->flags) &&
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index b4bfae41e8a5..21b1787e7893 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -184,28 +184,36 @@ static void reregister_monitor_on_restart(struct hci_dev *hdev, int handle)
 
 void msft_do_open(struct hci_dev *hdev)
 {
-	struct msft_data *msft;
+	struct msft_data *msft = hdev->msft_data;
 
 	if (hdev->msft_opcode == HCI_OP_NOP)
 		return;
 
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT extension not registered");
+		return;
+	}
+
 	bt_dev_dbg(hdev, "Initialize MSFT extension");
 
-	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
-	if (!msft)
-		return;
+	/* Reset existing MSFT data before re-reading */
+	kfree(msft->evt_prefix);
+	msft->evt_prefix = NULL;
+	msft->evt_prefix_len = 0;
+	msft->features = 0;
 
 	if (!read_supported_features(hdev, msft)) {
+		hdev->msft_data = NULL;
 		kfree(msft);
 		return;
 	}
 
-	INIT_LIST_HEAD(&msft->handle_map);
-	hdev->msft_data = msft;
-
 	if (msft_monitor_supported(hdev)) {
 		msft->reregistering = true;
 		msft_set_filter_enable(hdev, true);
+		/* Monitors get removed on power off, so we need to explicitly
+		 * tell the controller to re-monitor.
+		 */
 		reregister_monitor_on_restart(hdev, 0);
 	}
 }
@@ -221,8 +229,9 @@ void msft_do_close(struct hci_dev *hdev)
 
 	bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 
-	hdev->msft_data = NULL;
-
+	/* The controller will silently remove all monitors on power off.
+	 * Therefore, remove handle_data mapping and reset monitor state.
+	 */
 	list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 		monitor = idr_find(&hdev->adv_monitors_idr,
 				   handle_data->mgmt_handle);
@@ -233,6 +242,34 @@ void msft_do_close(struct hci_dev *hdev)
 		list_del(&handle_data->list);
 		kfree(handle_data);
 	}
+}
+
+void msft_register(struct hci_dev *hdev)
+{
+	struct msft_data *msft = NULL;
+
+	bt_dev_dbg(hdev, "Register MSFT extension");
+
+	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
+	if (!msft) {
+		bt_dev_err(hdev, "Failed to register MSFT extension");
+		return;
+	}
+
+	INIT_LIST_HEAD(&msft->handle_map);
+	hdev->msft_data = msft;
+}
+
+void msft_unregister(struct hci_dev *hdev)
+{
+	struct msft_data *msft = hdev->msft_data;
+
+	if (!msft)
+		return;
+
+	bt_dev_dbg(hdev, "Unregister MSFT extension");
+
+	hdev->msft_data = NULL;
 
 	kfree(msft->evt_prefix);
 	kfree(msft);
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 6e56d94b88d8..8018948c5975 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -13,6 +13,8 @@
 #if IS_ENABLED(CONFIG_BT_MSFTEXT)
 
 bool msft_monitor_supported(struct hci_dev *hdev);
+void msft_register(struct hci_dev *hdev);
+void msft_unregister(struct hci_dev *hdev);
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb);
@@ -31,6 +33,8 @@ static inline bool msft_monitor_supported(struct hci_dev *hdev)
 	return false;
 }
 
+static inline void msft_register(struct hci_dev *hdev) {}
+static inline void msft_unregister(struct hci_dev *hdev) {}
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb) {}
]

116/4 2026/08/27 20:34 llm patch-generator
1m Model:
gemini-3.7-flash

Tokens:
							input: 25247
							output: 33
							thoughts: 112
						

Thoughts:
**Analyzing Recent Code Changes**

Okay, let's dissect this commit, `5031ffcc79b8`. Seems like the primary focus was setting up some core initialization and registration. I see `queue_work` is being called for `hdev->power_on`, which is standard practice for asynchronous operations within the kernel. And there's the `idr_init` call for `hdev->adv_monitors_idr`, a common pattern for managing identifiers. But this `msft_register(hdev)` call is the most interesting addition. I need to understand what this is registering; my gut is telling me it's Microsoft-specific.

Now, I want to drill down further. I need to understand how the `filter_lock` was added to `msft_data`. Knowing the context around its introduction is critical. This could be a performance optimization, a synchronization primitive, or possibly related to some security context. Let's dig into the history and find the commit that introduced it. I need to understand the design rationale behind its inclusion.



117/4 2026/08/27 20:35 tool git-log
0m Args:
map[CodeRegexp:filter_lock Count:5 PathPrefix:net/bluetooth]

Results:
map[Output:9e14606d8f38 Bluetooth: msft: Extended monitor tracking by address filter
]

118/4 2026/08/27 20:35 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 25657
							output: 27
							thoughts: 19
						

Thoughts:
Okay, let's dive into commit `9e14606d8f38`.

**Analyzing Commit 9e14606d8f38**

Alright, I'm examining commit `9e14606d8f38`. My initial focus is on the diff. What changed? What files were touched? Were there significant code additions, removals, or modifications? I'm immediately looking for any potential architectural shifts or bug fixes implied by the commit message and the delta. Is this a feature implementation, a refactor, a bug fix, or something else entirely? The commit message should give some clues, but I'm not taking anything at face value. I'll read the code with a critical eye, looking for patterns, potential side effects, and adherence to established coding standards. Depending on the size of the change, I might need to consider the context of the related modules and functionality, and perform some brief tests to determine the impacts of this commit. I'm assessing the impact on existing systems, looking for any possible regressions or performance issues that might have emerged. I'll note anything that jumps out as particularly clever, or particularly risky. Finally, I'll consider how this commit fits within the overall project goals and roadmap.



119/4 2026/08/27 20:35 tool git-show
0m Args:
map[Commit:9e14606d8f38]

Results:
map[Output:commit 9e14606d8f38ea52a38c27692a9c1513c987a5da
Author: Hilda Wu <hildawu@realtek.com>
Date:   Wed Jun 21 18:00:31 2023 +0800

    Bluetooth: msft: Extended monitor tracking by address filter
    
    Since limited tracking device per condition, this feature is to support
    tracking multiple devices concurrently.
    When a pattern monitor detects the device, this feature issues an address
    monitor for tracking that device. Let pattern monitor can keep monitor
    new devices.
    This feature adds an address filter when receiving a LE monitor device
    event which monitor handle is for a pattern, and the controller started
    monitoring the device. And this feature also has cancelled the monitor
    advertisement from address filters when receiving a LE monitor device
    event when the controller stopped monitoring the device specified by an
    address and monitor handle.
    
    Below is an example to know the feature adds the address filter.
    
    //Add MSFT pattern monitor
    < HCI Command: Vendor (0x3f|0x00f0) plen 14          #142 [hci0] 55.552420
            03 b8 a4 03 ff 01 01 06 09 05 5f 52 45 46        .........._REF
    > HCI Event: Command Complete (0x0e) plen 6          #143 [hci0] 55.653960
          Vendor (0x3f|0x00f0) ncmd 2
            Status: Success (0x00)
            03 00
    
    //Got event from the pattern monitor
    > HCI Event: Vendor (0xff) plen 18                   #148 [hci0] 58.384953
            23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8  #yT3w..h....).'.
            00 01                                            ..
    
    //Add MSFT address monitor (Sample address: B8:27:EB:29:C1:FB)
    < HCI Command: Vendor (0x3f|0x00f0) plen 13          #149 [hci0] 58.385067
            03 b8 a4 03 ff 04 00 fb c1 29 eb 27 b8           .........).'.
    
    //Report to userspace about found device (ADV Monitor Device Found)
    @ MGMT Event: Unknown (0x002f) plen 38           {0x0003} [hci0] 58.680042
            01 00 fb c1 29 eb 27 b8 01 ce 00 00 00 00 16 00  ....).'.........
            0a 09 4b 45 59 42 44 5f 52 45 46 02 01 06 03 19  ..KEYBD_REF.....
            c1 03 03 03 12 18                                ......
    
    //Got event from address monitor
    > HCI Event: Vendor (0xff) plen 18                   #152 [hci0] 58.672956
            23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8  #yT3w..h....).'.
            01 01
    
    Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
    Signed-off-by: Hilda Wu <hildawu@realtek.com>
    Reviewed-by: Simon Horman <simon.horman@corigine.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 04399b3c39a0..ddae6524106d 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -1269,6 +1269,10 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
 		if (btrtl_dev->project_id == CHIP_ID_8852C)
 			btrealtek_set_flag(hdev, REALTEK_ALT6_CONTINUOUS_TX_CHIP);
 
+		if (btrtl_dev->project_id == CHIP_ID_8852A ||
+		    btrtl_dev->project_id == CHIP_ID_8852C)
+			set_bit(HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER, &hdev->quirks);
+
 		hci_set_aosp_capable(hdev);
 		break;
 	default:
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ab2f8f1817cf..5723405b833e 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -309,6 +309,16 @@ enum {
 	 * to support it.
 	 */
 	HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT,
+
+	/* When this quirk is set, MSFT extension monitor tracking by
+	 * address filter is supported. Since tracking quantity of each
+	 * pattern is limited, this feature supports tracking multiple
+	 * devices concurrently if controller supports multiple
+	 * address filters.
+	 *
+	 * This quirk must be set before hci_register_dev is called.
+	 */
+	HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER,
 };
 
 /* HCI device flags */
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index bf5cee48916c..b80a2162a5c3 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -91,6 +91,33 @@ struct msft_ev_le_monitor_device {
 struct msft_monitor_advertisement_handle_data {
 	__u8  msft_handle;
 	__u16 mgmt_handle;
+	__s8 rssi_high;
+	__s8 rssi_low;
+	__u8 rssi_low_interval;
+	__u8 rssi_sampling_period;
+	__u8 cond_type;
+	struct list_head list;
+};
+
+enum monitor_addr_filter_state {
+	AF_STATE_IDLE,
+	AF_STATE_ADDING,
+	AF_STATE_ADDED,
+	AF_STATE_REMOVING,
+};
+
+#define MSFT_MONITOR_ADVERTISEMENT_TYPE_ADDR	0x04
+struct msft_monitor_addr_filter_data {
+	__u8     msft_handle;
+	__u8     pattern_handle; /* address filters pertain to */
+	__u16    mgmt_handle;
+	int      state;
+	__s8     rssi_high;
+	__s8     rssi_low;
+	__u8     rssi_low_interval;
+	__u8     rssi_sampling_period;
+	__u8     addr_type;
+	bdaddr_t bdaddr;
 	struct list_head list;
 };
 
@@ -99,9 +126,12 @@ struct msft_data {
 	__u8  evt_prefix_len;
 	__u8  *evt_prefix;
 	struct list_head handle_map;
+	struct list_head address_filters;
 	__u8 resuming;
 	__u8 suspending;
 	__u8 filter_enabled;
+	/* To synchronize add/remove address filter and monitor device event.*/
+	struct mutex filter_lock;
 };
 
 bool msft_monitor_supported(struct hci_dev *hdev)
@@ -180,6 +210,24 @@ static struct msft_monitor_advertisement_handle_data *msft_find_handle_data
 	return NULL;
 }
 
+/* This function requires the caller holds msft->filter_lock */
+static struct msft_monitor_addr_filter_data *msft_find_address_data
+			(struct hci_dev *hdev, u8 addr_type, bdaddr_t *addr,
+			 u8 pattern_handle)
+{
+	struct msft_monitor_addr_filter_data *entry;
+	struct msft_data *msft = hdev->msft_data;
+
+	list_for_each_entry(entry, &msft->address_filters, list) {
+		if (entry->pattern_handle == pattern_handle &&
+		    addr_type == entry->addr_type &&
+		    !bacmp(addr, &entry->bdaddr))
+			return entry;
+	}
+
+	return NULL;
+}
+
 /* This function requires the caller holds hdev->lock */
 static int msft_monitor_device_del(struct hci_dev *hdev, __u16 mgmt_handle,
 				   bdaddr_t *bdaddr, __u8 addr_type,
@@ -240,6 +288,7 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode,
 
 	handle_data->mgmt_handle = monitor->handle;
 	handle_data->msft_handle = rp->handle;
+	handle_data->cond_type   = MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN;
 	INIT_LIST_HEAD(&handle_data->list);
 	list_add(&handle_data->list, &msft->handle_map);
 
@@ -254,6 +303,70 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode,
 	return status;
 }
 
+/* This function requires the caller holds hci_req_sync_lock */
+static void msft_remove_addr_filters_sync(struct hci_dev *hdev, u8 handle)
+{
+	struct msft_monitor_addr_filter_data *address_filter, *n;
+	struct msft_cp_le_cancel_monitor_advertisement cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct list_head head;
+	struct sk_buff *skb;
+
+	INIT_LIST_HEAD(&head);
+
+	/* Cancel all corresponding address monitors */
+	mutex_lock(&msft->filter_lock);
+
+	list_for_each_entry_safe(address_filter, n, &msft->address_filters,
+				 list) {
+		if (address_filter->pattern_handle != handle)
+			continue;
+
+		list_del(&address_filter->list);
+
+		/* Keep the address filter and let
+		 * msft_add_address_filter_sync() remove and free the address
+		 * filter.
+		 */
+		if (address_filter->state == AF_STATE_ADDING) {
+			address_filter->state = AF_STATE_REMOVING;
+			continue;
+		}
+
+		/* Keep the address filter and let
+		 * msft_cancel_address_filter_sync() remove and free the address
+		 * filter
+		 */
+		if (address_filter->state == AF_STATE_REMOVING)
+			continue;
+
+		list_add_tail(&address_filter->list, &head);
+	}
+
+	mutex_unlock(&msft->filter_lock);
+
+	list_for_each_entry_safe(address_filter, n, &head, list) {
+		list_del(&address_filter->list);
+
+		cp.sub_opcode = MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT;
+		cp.handle = address_filter->msft_handle;
+
+		skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
+				     HCI_CMD_TIMEOUT);
+		if (IS_ERR_OR_NULL(skb)) {
+			kfree(address_filter);
+			continue;
+		}
+
+		kfree_skb(skb);
+
+		bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
+			   &address_filter->bdaddr);
+
+		kfree(address_filter);
+	}
+}
+
 static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 						   u16 opcode,
 						   struct adv_monitor *monitor,
@@ -263,6 +376,7 @@ static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 	struct msft_monitor_advertisement_handle_data *handle_data;
 	struct msft_data *msft = hdev->msft_data;
 	int status = 0;
+	u8 msft_handle;
 
 	rp = (struct msft_rp_le_cancel_monitor_advertisement *)skb->data;
 	if (skb->len < sizeof(*rp)) {
@@ -293,11 +407,17 @@ static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 						NULL, 0, false);
 		}
 
+		msft_handle = handle_data->msft_handle;
+
 		list_del(&handle_data->list);
 		kfree(handle_data);
-	}
 
-	hci_dev_unlock(hdev);
+		hci_dev_unlock(hdev);
+
+		msft_remove_addr_filters_sync(hdev, msft_handle);
+	} else {
+		hci_dev_unlock(hdev);
+	}
 
 done:
 	return status;
@@ -394,12 +514,14 @@ static int msft_add_monitor_sync(struct hci_dev *hdev,
 {
 	struct msft_cp_le_monitor_advertisement *cp;
 	struct msft_le_monitor_advertisement_pattern_data *pattern_data;
+	struct msft_monitor_advertisement_handle_data *handle_data;
 	struct msft_le_monitor_advertisement_pattern *pattern;
 	struct adv_pattern *entry;
 	size_t total_size = sizeof(*cp) + sizeof(*pattern_data);
 	ptrdiff_t offset = 0;
 	u8 pattern_count = 0;
 	struct sk_buff *skb;
+	int err;
 
 	if (!msft_monitor_pattern_valid(monitor))
 		return -EINVAL;
@@ -436,16 +558,31 @@ static int msft_add_monitor_sync(struct hci_dev *hdev,
 
 	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, total_size, cp,
 			     HCI_CMD_TIMEOUT);
-	kfree(cp);
 
 	if (IS_ERR_OR_NULL(skb)) {
-		if (!skb)
-			return -EIO;
-		return PTR_ERR(skb);
+		err = PTR_ERR(skb);
+		goto out_free;
 	}
 
-	return msft_le_monitor_advertisement_cb(hdev, hdev->msft_opcode,
-						monitor, skb);
+	err = msft_le_monitor_advertisement_cb(hdev, hdev->msft_opcode,
+					       monitor, skb);
+	if (err)
+		goto out_free;
+
+	handle_data = msft_find_handle_data(hdev, monitor->handle, true);
+	if (!handle_data) {
+		err = -ENODATA;
+		goto out_free;
+	}
+
+	handle_data->rssi_high	= cp->rssi_high;
+	handle_data->rssi_low	= cp->rssi_low;
+	handle_data->rssi_low_interval	  = cp->rssi_low_interval;
+	handle_data->rssi_sampling_period = cp->rssi_sampling_period;
+
+out_free:
+	kfree(cp);
+	return err;
 }
 
 /* This function requires the caller holds hci_req_sync_lock */
@@ -538,6 +675,7 @@ void msft_do_close(struct hci_dev *hdev)
 {
 	struct msft_data *msft = hdev->msft_data;
 	struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
+	struct msft_monitor_addr_filter_data *address_filter, *n;
 	struct adv_monitor *monitor;
 
 	if (!msft)
@@ -559,6 +697,14 @@ void msft_do_close(struct hci_dev *hdev)
 		kfree(handle_data);
 	}
 
+	mutex_lock(&msft->filter_lock);
+	list_for_each_entry_safe(address_filter, n, &msft->address_filters,
+				 list) {
+		list_del(&address_filter->list);
+		kfree(address_filter);
+	}
+	mutex_unlock(&msft->filter_lock);
+
 	hci_dev_lock(hdev);
 
 	/* Clear any devices that are being monitored and notify device lost */
@@ -568,6 +714,49 @@ void msft_do_close(struct hci_dev *hdev)
 	hci_dev_unlock(hdev);
 }
 
+static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = data;
+	struct msft_cp_le_cancel_monitor_advertisement cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct sk_buff *skb;
+	int err = 0;
+
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT: msft data is freed");
+		return -EINVAL;
+	}
+
+	/* The address filter has been removed by hci dev close */
+	if (!test_bit(HCI_UP, &hdev->flags))
+		return 0;
+
+	mutex_lock(&msft->filter_lock);
+	list_del(&address_filter->list);
+	mutex_unlock(&msft->filter_lock);
+
+	cp.sub_opcode = MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT;
+	cp.handle = address_filter->msft_handle;
+
+	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
+			     HCI_CMD_TIMEOUT);
+	if (IS_ERR_OR_NULL(skb)) {
+		bt_dev_err(hdev, "MSFT: Failed to cancel address (%pMR) filter",
+			   &address_filter->bdaddr);
+		err = EIO;
+		goto done;
+	}
+	kfree_skb(skb);
+
+	bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
+		   &address_filter->bdaddr);
+
+done:
+	kfree(address_filter);
+
+	return err;
+}
+
 void msft_register(struct hci_dev *hdev)
 {
 	struct msft_data *msft = NULL;
@@ -581,7 +770,9 @@ void msft_register(struct hci_dev *hdev)
 	}
 
 	INIT_LIST_HEAD(&msft->handle_map);
+	INIT_LIST_HEAD(&msft->address_filters);
 	hdev->msft_data = msft;
+	mutex_init(&msft->filter_lock);
 }
 
 void msft_unregister(struct hci_dev *hdev)
@@ -596,6 +787,7 @@ void msft_unregister(struct hci_dev *hdev)
 	hdev->msft_data = NULL;
 
 	kfree(msft->evt_prefix);
+	mutex_destroy(&msft->filter_lock);
 	kfree(msft);
 }
 
@@ -645,11 +837,149 @@ static void *msft_skb_pull(struct hci_dev *hdev, struct sk_buff *skb,
 	return data;
 }
 
+static int msft_add_address_filter_sync(struct hci_dev *hdev, void *data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = data;
+	struct msft_rp_le_monitor_advertisement *rp;
+	struct msft_cp_le_monitor_advertisement *cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct sk_buff *skb = NULL;
+	bool remove = false;
+	size_t size;
+
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT: msft data is freed");
+		return -EINVAL;
+	}
+
+	/* The address filter has been removed by hci dev close */
+	if (!test_bit(HCI_UP, &hdev->flags))
+		return -ENODEV;
+
+	/* We are safe to use the address filter from now on.
+	 * msft_monitor_device_evt() wouldn't delete this filter because it's
+	 * not been added by now.
+	 * And all other functions that requiring hci_req_sync_lock wouldn't
+	 * touch this filter before this func completes because it's protected
+	 * by hci_req_sync_lock.
+	 */
+
+	if (address_filter->state == AF_STATE_REMOVING) {
+		mutex_lock(&msft->filter_lock);
+		list_del(&address_filter->list);
+		mutex_unlock(&msft->filter_lock);
+		kfree(address_filter);
+		return 0;
+	}
+
+	size = sizeof(*cp) +
+	       sizeof(address_filter->addr_type) +
+	       sizeof(address_filter->bdaddr);
+	cp = kzalloc(size, GFP_KERNEL);
+	if (!cp) {
+		bt_dev_err(hdev, "MSFT: Alloc cmd param err");
+		remove = true;
+		goto done;
+	}
+	cp->sub_opcode           = MSFT_OP_LE_MONITOR_ADVERTISEMENT;
+	cp->rssi_high		 = address_filter->rssi_high;
+	cp->rssi_low		 = address_filter->rssi_low;
+	cp->rssi_low_interval    = address_filter->rssi_low_interval;
+	cp->rssi_sampling_period = address_filter->rssi_sampling_period;
+	cp->cond_type            = MSFT_MONITOR_ADVERTISEMENT_TYPE_ADDR;
+	cp->data[0]              = address_filter->addr_type;
+	memcpy(&cp->data[1], &address_filter->bdaddr,
+	       sizeof(address_filter->bdaddr));
+
+	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, size, cp,
+			     HCI_CMD_TIMEOUT);
+	if (IS_ERR_OR_NULL(skb)) {
+		bt_dev_err(hdev, "Failed to enable address %pMR filter",
+			   &address_filter->bdaddr);
+		skb = NULL;
+		remove = true;
+		goto done;
+	}
+
+	rp = skb_pull_data(skb, sizeof(*rp));
+	if (!rp || rp->sub_opcode != MSFT_OP_LE_MONITOR_ADVERTISEMENT ||
+	    rp->status)
+		remove = true;
+
+done:
+	mutex_lock(&msft->filter_lock);
+
+	if (remove) {
+		bt_dev_warn(hdev, "MSFT: Remove address (%pMR) filter",
+			    &address_filter->bdaddr);
+		list_del(&address_filter->list);
+		kfree(address_filter);
+	} else {
+		address_filter->state = AF_STATE_ADDED;
+		address_filter->msft_handle = rp->handle;
+		bt_dev_dbg(hdev, "MSFT: Address %pMR filter enabled",
+			   &address_filter->bdaddr);
+	}
+	mutex_unlock(&msft->filter_lock);
+
+	kfree_skb(skb);
+
+	return 0;
+}
+
+/* This function requires the caller holds msft->filter_lock */
+static struct msft_monitor_addr_filter_data *msft_add_address_filter
+		(struct hci_dev *hdev, u8 addr_type, bdaddr_t *bdaddr,
+		 struct msft_monitor_advertisement_handle_data *handle_data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = NULL;
+	struct msft_data *msft = hdev->msft_data;
+	int err;
+
+	address_filter = kzalloc(sizeof(*address_filter), GFP_KERNEL);
+	if (!address_filter)
+		return NULL;
+
+	address_filter->state             = AF_STATE_ADDING;
+	address_filter->msft_handle       = 0xff;
+	address_filter->pattern_handle    = handle_data->msft_handle;
+	address_filter->mgmt_handle       = handle_data->mgmt_handle;
+	address_filter->rssi_high         = handle_data->rssi_high;
+	address_filter->rssi_low          = handle_data->rssi_low;
+	address_filter->rssi_low_interval = handle_data->rssi_low_interval;
+	address_filter->rssi_sampling_period = handle_data->rssi_sampling_period;
+	address_filter->addr_type            = addr_type;
+	bacpy(&address_filter->bdaddr, bdaddr);
+
+	/* With the above AF_STATE_ADDING, duplicated address filter can be
+	 * avoided when receiving monitor device event (found/lost) frequently
+	 * for the same device.
+	 */
+	list_add_tail(&address_filter->list, &msft->address_filters);
+
+	err = hci_cmd_sync_queue(hdev, msft_add_address_filter_sync,
+				 address_filter, NULL);
+	if (err < 0) {
+		bt_dev_err(hdev, "MSFT: Add address %pMR filter err", bdaddr);
+		list_del(&address_filter->list);
+		kfree(address_filter);
+		return NULL;
+	}
+
+	bt_dev_dbg(hdev, "MSFT: Add device %pMR address filter",
+		   &address_filter->bdaddr);
+
+	return address_filter;
+}
+
 /* This function requires the caller holds hdev->lock */
 static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 {
+	struct msft_monitor_addr_filter_data *n, *address_filter = NULL;
 	struct msft_ev_le_monitor_device *ev;
 	struct msft_monitor_advertisement_handle_data *handle_data;
+	struct msft_data *msft = hdev->msft_data;
+	u16 mgmt_handle = 0xffff;
 	u8 addr_type;
 
 	ev = msft_skb_pull(hdev, skb, MSFT_EV_LE_MONITOR_DEVICE, sizeof(*ev));
@@ -662,9 +992,53 @@ static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		   ev->monitor_state, &ev->bdaddr);
 
 	handle_data = msft_find_handle_data(hdev, ev->monitor_handle, false);
-	if (!handle_data)
+
+	if (!test_bit(HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER, &hdev->quirks)) {
+		if (!handle_data)
+			return;
+		mgmt_handle = handle_data->mgmt_handle;
+		goto report_state;
+	}
+
+	if (handle_data) {
+		/* Don't report any device found/lost event from pattern
+		 * monitors. Pattern monitor always has its address filters for
+		 * tracking devices.
+		 */
+
+		address_filter = msft_find_address_data(hdev, ev->addr_type,
+							&ev->bdaddr,
+							handle_data->msft_handle);
+		if (address_filter)
+			return;
+
+		if (ev->monitor_state && handle_data->cond_type ==
+				MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN)
+			msft_add_address_filter(hdev, ev->addr_type,
+						&ev->bdaddr, handle_data);
+
 		return;
+	}
 
+	/* This device event is not from pattern monitor.
+	 * Report it if there is a corresponding address_filter for it.
+	 */
+	list_for_each_entry(n, &msft->address_filters, list) {
+		if (n->state == AF_STATE_ADDED &&
+		    n->msft_handle == ev->monitor_handle) {
+			mgmt_handle = n->mgmt_handle;
+			address_filter = n;
+			break;
+		}
+	}
+
+	if (!address_filter) {
+		bt_dev_warn(hdev, "MSFT: Unexpected device event %pMR, %u, %u",
+			    &ev->bdaddr, ev->monitor_handle, ev->monitor_state);
+		return;
+	}
+
+report_state:
 	switch (ev->addr_type) {
 	case ADDR_LE_DEV_PUBLIC:
 		addr_type = BDADDR_LE_PUBLIC;
@@ -681,12 +1055,18 @@ static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		return;
 	}
 
-	if (ev->monitor_state)
-		msft_device_found(hdev, &ev->bdaddr, addr_type,
-				  handle_data->mgmt_handle);
-	else
-		msft_device_lost(hdev, &ev->bdaddr, addr_type,
-				 handle_data->mgmt_handle);
+	if (ev->monitor_state) {
+		msft_device_found(hdev, &ev->bdaddr, addr_type, mgmt_handle);
+	} else {
+		if (address_filter && address_filter->state == AF_STATE_ADDED) {
+			address_filter->state = AF_STATE_REMOVING;
+			hci_cmd_sync_queue(hdev,
+					   msft_cancel_address_filter_sync,
+					   address_filter,
+					   NULL);
+		}
+		msft_device_lost(hdev, &ev->bdaddr, addr_type, mgmt_handle);
+	}
 }
 
 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
@@ -724,7 +1104,9 @@ void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
 
 	switch (*evt) {
 	case MSFT_EV_LE_MONITOR_DEVICE:
+		mutex_lock(&msft->filter_lock);
 		msft_monitor_device_evt(hdev, skb);
+		mutex_unlock(&msft->filter_lock);
 		break;
 
 	default:
]

120/4 2026/08/27 20:35 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 34380
							output: 35
							thoughts: 927
						

Thoughts:
**Analyzing Bluetooth Device Registration and Initialization**

Okay, let's break this down. I'm looking at the initialization sequence of a Bluetooth device (`hci_dev`) during registration (`hci_register_dev`) and I've spotted a potential race condition. Specifically, the order of operations in `hci_register_dev` is suspect. It starts with a series of calls: `hci_sock_dev_event`, `hci_dev_hold`, `hci_register_suspend_notifier`, `queue_work`, `idr_init`, and `msft_register`.

The problem I see is this: the `power_on` workqueue is queued *before* the `adv_monitors_idr` and `msft` data are initialized.  `hci_power_on` could be triggered before those are initialized, and if it's running when the device is still in an unconfigured state, it calls `hci_dev_do_close`. `hci_dev_do_close` then goes down the call stack to eventually invoke `msft_do_close(hdev)`.

Within `msft_do_close`, several key data structures are accessed: `hdev->msft_data`, `hdev->adv_monitors_idr`, `msft->handle_map`, `msft->address_filters`, and `msft->filter_lock`. If `msft_do_close` runs *before* these are properly initialized, there's a serious problem!

Specifically, `msft_register` first allocates `msft` and sets `hdev->msft_data = msft`. *Then* it initializes the `handle_map` and `address_filters`. *Finally*, it calls `mutex_init(&msft->filter_lock);`. If `msft_do_close` runs before `mutex_init`, there's a call to `mutex_lock` on an uninitialized mutex, which is a big no-no. We're looking at a crash.

To address this, the fix is straightforward: reorder the calls in `hci_register_dev` to ensure initialization *before* queuing `power_on`. So, the correct order should be `idr_init`, `msft_register`, and *then* `queue_work`. And make sure `mutex_init` occurs *before* `hdev->msft_data = msft;`!

Now, I need to be absolutely certain this is the only potential issue. I will go through both `net/bluetooth/msft.c` and `net/bluetooth/hci_core.c`, methodically, to make sure there are no other places where there's a similar exposure of uninitialized data or improper queuing. I'll meticulously read the code of `msft.c`. I need to ensure that I haven't missed something else that might trigger this, or a related, issue.



121/4 2026/08/27 20:36 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	// SPDX-License-Identifier: GPL-2.0-only
   2:	/*
   3:	 * Copyright (C) 2020 Google Corporation
   4:	 */
   5:	
   6:	#include <net/bluetooth/bluetooth.h>
   7:	#include <net/bluetooth/hci_core.h>
   8:	#include <net/bluetooth/mgmt.h>
   9:	
  10:	#include "mgmt_util.h"
  11:	#include "msft.h"
  12:	
  13:	#define MSFT_RSSI_THRESHOLD_VALUE_MIN		-127
  14:	#define MSFT_RSSI_THRESHOLD_VALUE_MAX		20
  15:	#define MSFT_RSSI_LOW_TIMEOUT_MAX		0x3C
  16:	
  17:	#define MSFT_OP_READ_SUPPORTED_FEATURES		0x00
  18:	struct msft_cp_read_supported_features {
  19:		__u8   sub_opcode;
  20:	} __packed;
  21:	
  22:	struct msft_rp_read_supported_features {
  23:		__u8   status;
  24:		__u8   sub_opcode;
  25:		__le64 features;
  26:		__u8   evt_prefix_len;
  27:		__u8   evt_prefix[];
  28:	} __packed;
  29:	
  30:	#define MSFT_OP_LE_MONITOR_ADVERTISEMENT	0x03
  31:	#define MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN	0x01
  32:	struct msft_le_monitor_advertisement_pattern {
  33:		__u8 length;
  34:		__u8 data_type;
  35:		__u8 start_byte;
  36:		__u8 pattern[];
  37:	};
  38:	
  39:	struct msft_le_monitor_advertisement_pattern_data {
  40:		__u8 count;
  41:		__u8 data[];
  42:	};
  43:	
  44:	struct msft_cp_le_monitor_advertisement {
  45:		__u8 sub_opcode;
  46:		__s8 rssi_high;
  47:		__s8 rssi_low;
  48:		__u8 rssi_low_interval;
  49:		__u8 rssi_sampling_period;
  50:		__u8 cond_type;
  51:		__u8 data[];
  52:	} __packed;
  53:	
  54:	struct msft_rp_le_monitor_advertisement {
  55:		__u8 status;
  56:		__u8 sub_opcode;
  57:		__u8 handle;
  58:	} __packed;
  59:	
  60:	#define MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT	0x04
  61:	struct msft_cp_le_cancel_monitor_advertisement {
  62:		__u8 sub_opcode;
  63:		__u8 handle;
  64:	} __packed;
  65:	
  66:	struct msft_rp_le_cancel_monitor_advertisement {
  67:		__u8 status;
  68:		__u8 sub_opcode;
  69:	} __packed;
  70:	
  71:	#define MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE	0x05
  72:	struct msft_cp_le_set_advertisement_filter_enable {
  73:		__u8 sub_opcode;
  74:		__u8 enable;
  75:	} __packed;
  76:	
  77:	struct msft_rp_le_set_advertisement_filter_enable {
  78:		__u8 status;
  79:		__u8 sub_opcode;
  80:	} __packed;
  81:	
  82:	#define MSFT_EV_LE_MONITOR_DEVICE	0x02
  83:	struct msft_ev_le_monitor_device {
  84:		__u8     addr_type;
  85:		bdaddr_t bdaddr;
  86:		__u8     monitor_handle;
  87:		__u8     monitor_state;
  88:	} __packed;
  89:	
  90:	struct msft_monitor_advertisement_handle_data {
  91:		__u8  msft_handle;
  92:		__u16 mgmt_handle;
  93:		__s8 rssi_high;
  94:		__s8 rssi_low;
  95:		__u8 rssi_low_interval;
  96:		__u8 rssi_sampling_period;
  97:		__u8 cond_type;
  98:		struct list_head list;
  99:	};
 100:	
]

122/4 2026/08/27 20:36 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 37330
							output: 37
							thoughts: 15
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience and written in the first person:

**Diving Back into `net/bluetooth/msft.c`**

Okay, time to get back to it. Back into the depths of `net/bluetooth/msft.c`. I'm going to start up where I last left off. I need to refresh my memory on what I was analyzing. It was probably related to the HCi events or possibly how it was dealing with the driver and device specific initialization routines for the MSFT stack.

I expect to see the usual suspects: the register map defines, the interrupt handling logic, and the various `ioctl` handlers if it's got any. I'm hoping to see some of the debugging messages I had enabled last week. I am going to have to work out again what the flow of control is. Then hopefully I can identify exactly where the bottleneck is.



123/4 2026/08/27 20:37 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:600 LineCount:100]

Results:
map[Contents: 600:			handle++;
 601:		}
 602:	
 603:		/* All monitors have been reregistered */
 604:		msft->resuming = false;
 605:	}
 606:	
 607:	/* This function requires the caller holds hci_req_sync_lock */
 608:	int msft_resume_sync(struct hci_dev *hdev)
 609:	{
 610:		struct msft_data *msft = hdev->msft_data;
 611:	
 612:		if (!msft || !msft_monitor_supported(hdev))
 613:			return 0;
 614:	
 615:		hci_dev_lock(hdev);
 616:	
 617:		/* Clear already tracked devices on resume. Once the monitors are
 618:		 * reregistered, devices in range will be found again after resume.
 619:		 */
 620:		hdev->advmon_pend_notify = false;
 621:		msft_monitor_device_del(hdev, 0, NULL, 0, true);
 622:	
 623:		hci_dev_unlock(hdev);
 624:	
 625:		reregister_monitor(hdev);
 626:	
 627:		return 0;
 628:	}
 629:	
 630:	/* This function requires the caller holds hci_req_sync_lock */
 631:	void msft_do_open(struct hci_dev *hdev)
 632:	{
 633:		struct msft_data *msft = hdev->msft_data;
 634:	
 635:		if (hdev->msft_opcode == HCI_OP_NOP)
 636:			return;
 637:	
 638:		if (!msft) {
 639:			bt_dev_err(hdev, "MSFT extension not registered");
 640:			return;
 641:		}
 642:	
 643:		bt_dev_dbg(hdev, "Initialize MSFT extension");
 644:	
 645:		/* Reset existing MSFT data before re-reading */
 646:		kfree(msft->evt_prefix);
 647:		msft->evt_prefix = NULL;
 648:		msft->evt_prefix_len = 0;
 649:		msft->features = 0;
 650:	
 651:		if (!read_supported_features(hdev, msft)) {
 652:			hdev->msft_data = NULL;
 653:			kfree(msft);
 654:			return;
 655:		}
 656:	
 657:		if (msft_monitor_supported(hdev)) {
 658:			msft->resuming = true;
 659:			msft_set_filter_enable(hdev, true);
 660:			/* Monitors get removed on power off, so we need to explicitly
 661:			 * tell the controller to re-monitor.
 662:			 */
 663:			reregister_monitor(hdev);
 664:		}
 665:	}
 666:	
 667:	void msft_do_close(struct hci_dev *hdev)
 668:	{
 669:		struct msft_data *msft = hdev->msft_data;
 670:		struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
 671:		struct msft_monitor_addr_filter_data *address_filter, *n;
 672:		struct adv_monitor *monitor;
 673:	
 674:		if (!msft)
 675:			return;
 676:	
 677:		bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 678:	
 679:		/* The controller will silently remove all monitors on power off.
 680:		 * Therefore, remove handle_data mapping and reset monitor state.
 681:		 */
 682:		list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 683:			monitor = idr_find(&hdev->adv_monitors_idr,
 684:					   handle_data->mgmt_handle);
 685:	
 686:			if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED)
 687:				monitor->state = ADV_MONITOR_STATE_REGISTERED;
 688:	
 689:			list_del(&handle_data->list);
 690:			kfree(handle_data);
 691:		}
 692:	
 693:		mutex_lock(&msft->filter_lock);
 694:		list_for_each_entry_safe(address_filter, n, &msft->address_filters,
 695:					 list) {
 696:			list_del(&address_filter->list);
 697:			kfree(address_filter);
 698:		}
 699:		mutex_unlock(&msft->filter_lock);
]

124/4 2026/08/27 20:37 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 39037
							output: 26
							thoughts: 169
						

Thoughts:
**Analyzing a Potential Memory Leak**

Okay, let's break this down. I'm looking at `msft_do_open` here. The key part is that initial `if` statement. If `read_supported_features(hdev, msft)` fails, it's setting `hdev->msft_data = NULL;` and then `kfree(msft);`. The main question I have is, does that free operation properly handle everything allocated within `msft`? Does it destroy `msft->filter_lock` correctly?

The problem description mentioned commit `10f9f426ac6e`. That's a good starting point. I need to examine that specific commit to see if it provides any insight into the memory management, particularly around this `msft` structure and its associated `filter_lock`. Checking that commit will probably give me a better understanding.



125/4 2026/08/27 20:37 tool git-show
0m Args:
map[Commit:10f9f426ac6e]

Results:
map[Output:commit 10f9f426ac6e752c8d87bf4346930ba347aaabac
Author: Sungwoo Kim <iam@sung-woo.kim>
Date:   Tue Apr 30 12:20:51 2024 -0400

    Bluetooth: msft: fix slab-use-after-free in msft_do_close()
    
    Tying the msft->data lifetime to hdev by freeing it in
    hci_release_dev() to fix the following case:
    
    [use]
    msft_do_close()
      msft = hdev->msft_data;
      if (!msft)                      ...(1) <- passed.
        return;
      mutex_lock(&msft->filter_lock); ...(4) <- used after freed.
    
    [free]
    msft_unregister()
      msft = hdev->msft_data;
      hdev->msft_data = NULL;         ...(2)
      kfree(msft);                    ...(3) <- msft is freed.
    
    ==================================================================
    BUG: KASAN: slab-use-after-free in __mutex_lock_common
    kernel/locking/mutex.c:587 [inline]
    BUG: KASAN: slab-use-after-free in __mutex_lock+0x8f/0xc30
    kernel/locking/mutex.c:752
    Read of size 8 at addr ffff888106cbbca8 by task kworker/u5:2/309
    
    Fixes: bf6a4e30ffbd ("Bluetooth: disable advertisement filters during suspend")
    Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a7028d38c1f5..bc5086423ab8 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2768,8 +2768,6 @@ void hci_unregister_dev(struct hci_dev *hdev)
 
 	hci_unregister_suspend_notifier(hdev);
 
-	msft_unregister(hdev);
-
 	hci_dev_do_close(hdev);
 
 	if (!test_bit(HCI_INIT, &hdev->flags) &&
@@ -2823,6 +2821,7 @@ void hci_release_dev(struct hci_dev *hdev)
 	hci_discovery_filter_clear(hdev);
 	hci_blocked_keys_clear(hdev);
 	hci_codec_list_clear(&hdev->local_codecs);
+	msft_release(hdev);
 	hci_dev_unlock(hdev);
 
 	ida_destroy(&hdev->unset_handle_ida);
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index 9612c5d1b13f..d039683d3bdd 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -769,7 +769,7 @@ void msft_register(struct hci_dev *hdev)
 	mutex_init(&msft->filter_lock);
 }
 
-void msft_unregister(struct hci_dev *hdev)
+void msft_release(struct hci_dev *hdev)
 {
 	struct msft_data *msft = hdev->msft_data;
 
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 2a63205b377b..fe538e9c91c0 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -14,7 +14,7 @@
 
 bool msft_monitor_supported(struct hci_dev *hdev);
 void msft_register(struct hci_dev *hdev);
-void msft_unregister(struct hci_dev *hdev);
+void msft_release(struct hci_dev *hdev);
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb);
@@ -35,7 +35,7 @@ static inline bool msft_monitor_supported(struct hci_dev *hdev)
 }
 
 static inline void msft_register(struct hci_dev *hdev) {}
-static inline void msft_unregister(struct hci_dev *hdev) {}
+static inline void msft_release(struct hci_dev *hdev) {}
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, void *data,
]

126/4 2026/08/27 20:37 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 40765
							output: 36
							thoughts: 62
						

Thoughts:
**Investigating `msft_do_open` in Bluetooth**

Okay, let's dive into this. I need to take a look at `msft_do_open` within the `net/bluetooth/msft.c` file. Right, that seems like the logical starting point for understanding this particular issue. But wait... what's the control flow here? I need to consider all the possible scenarios, so let's check what happens if `read_supported_features` returns `false`. That could completely change the execution path. Therefore, before proceeding with the examination of `msft_do_open`, I need to scrutinize the `read_supported_features` function itself. I'll need to go directly to its implementation, also in `net/bluetooth/msft.c`, to understand its behavior and potential failure modes. That's the key to understanding the full context here.



127/4 2026/08/27 20:38 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:630 LineCount:40]

Results:
map[Contents: 630:	/* This function requires the caller holds hci_req_sync_lock */
 631:	void msft_do_open(struct hci_dev *hdev)
 632:	{
 633:		struct msft_data *msft = hdev->msft_data;
 634:	
 635:		if (hdev->msft_opcode == HCI_OP_NOP)
 636:			return;
 637:	
 638:		if (!msft) {
 639:			bt_dev_err(hdev, "MSFT extension not registered");
 640:			return;
 641:		}
 642:	
 643:		bt_dev_dbg(hdev, "Initialize MSFT extension");
 644:	
 645:		/* Reset existing MSFT data before re-reading */
 646:		kfree(msft->evt_prefix);
 647:		msft->evt_prefix = NULL;
 648:		msft->evt_prefix_len = 0;
 649:		msft->features = 0;
 650:	
 651:		if (!read_supported_features(hdev, msft)) {
 652:			hdev->msft_data = NULL;
 653:			kfree(msft);
 654:			return;
 655:		}
 656:	
 657:		if (msft_monitor_supported(hdev)) {
 658:			msft->resuming = true;
 659:			msft_set_filter_enable(hdev, true);
 660:			/* Monitors get removed on power off, so we need to explicitly
 661:			 * tell the controller to re-monitor.
 662:			 */
 663:			reregister_monitor(hdev);
 664:		}
 665:	}
 666:	
 667:	void msft_do_close(struct hci_dev *hdev)
 668:	{
 669:		struct msft_data *msft = hdev->msft_data;
]

128/4 2026/08/27 20:38 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 41642
							output: 36
							thoughts: 11
						

Thoughts:
Okay, here's my attempt at summarizing the thought process, speaking as if they are my own, keeping in mind the user is an expert:

**Investigating Feature Support**

Alright, let's dive in. I need to get a handle on the supported features, so my first move is to verify the `read_supported_features` method. That's the logical starting point. I want to see if this function is actually returning the information I expect, or if there's any funny business going on there. It's the lynchpin, the gateway to understanding what functionality I can rely on. I need to make sure this function behaves as documented and expected - any deviation and that's going to throw a wrench in the entire operation. So let's see what's actually returned.



129/4 2026/08/27 20:38 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:140 LineCount:50]

Results:
map[Contents: 140:	
 141:	static bool read_supported_features(struct hci_dev *hdev,
 142:					    struct msft_data *msft)
 143:	{
 144:		struct msft_cp_read_supported_features cp;
 145:		struct msft_rp_read_supported_features *rp;
 146:		struct sk_buff *skb;
 147:	
 148:		cp.sub_opcode = MSFT_OP_READ_SUPPORTED_FEATURES;
 149:	
 150:		skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
 151:				     HCI_CMD_TIMEOUT);
 152:		if (IS_ERR(skb)) {
 153:			bt_dev_err(hdev, "Failed to read MSFT supported features (%ld)",
 154:				   PTR_ERR(skb));
 155:			return false;
 156:		}
 157:	
 158:		if (skb->len < sizeof(*rp)) {
 159:			bt_dev_err(hdev, "MSFT supported features length mismatch");
 160:			goto failed;
 161:		}
 162:	
 163:		rp = (struct msft_rp_read_supported_features *)skb->data;
 164:	
 165:		if (rp->sub_opcode != MSFT_OP_READ_SUPPORTED_FEATURES)
 166:			goto failed;
 167:	
 168:		if (rp->evt_prefix_len > 0) {
 169:			msft->evt_prefix = kmemdup(rp->evt_prefix, rp->evt_prefix_len,
 170:						   GFP_KERNEL);
 171:			if (!msft->evt_prefix)
 172:				goto failed;
 173:		}
 174:	
 175:		msft->evt_prefix_len = rp->evt_prefix_len;
 176:		msft->features = __le64_to_cpu(rp->features);
 177:	
 178:		if (msft->features & MSFT_FEATURE_MASK_CURVE_VALIDITY)
 179:			hdev->msft_curve_validity = true;
 180:	
 181:		kfree_skb(skb);
 182:		return true;
 183:	
 184:	failed:
 185:		kfree_skb(skb);
 186:		return false;
 187:	}
 188:	
 189:	/* is_mgmt = true matches the handle exposed to userspace via mgmt.
]

130/4 2026/08/27 20:38 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 42624
							output: 38
							thoughts: 2097
						

Thoughts:
**Analyzing a Potential Race Condition in Bluetooth Driver Initialization**

Okay, so I'm looking at this code and immediately I see a potential race condition. Specifically, I'm focusing on the `msft_release` and `msft_do_open` functions related to the MSFT extension within the Bluetooth driver. The issue is, `msft_release` does a `mutex_destroy` on the `filter_lock` field within the `msft_data` struct. Now, `msft_do_open` might free `msft` before that, especially if `read_supported_features` fails, creating a double-free scenario. The `msft_do_close` function does a check for `if (!msft) return;` but the timing is very important.

Now, let's zoom in on the specific bug and proposed fix from the user prompt. The crash occurs when `msft_do_close()` is called from `hci_dev_close_sync()` during power-on, specifically after a call to `queue_work(hdev->req_workqueue, &hdev->power_on)`. This work queue is where the issue lies: The `hci_power_on` work can execute concurrently with the `msft_register` function, causing a race.

Within `hci_register_dev()`, these lines are of interest:

```c
	idr_init(&hdev->adv_monitors_idr);
	msft_register(hdev);
	queue_work(hdev->req_workqueue, &hdev->power_on);
```

The problem is the `queue_work` call. It's happening *after* both `idr_init` and `msft_register`, but `hci_power_on` could be executing immediately. Inside `hci_power_on`, if `HCI_UNCONFIGURED` is set, `hci_dev_do_close` is called which, in turn, calls `msft_do_close`.

Meanwhile, `msft_register` is running concurrently. Here, the `msft_data` is initialized, assigned and mutexes are created.
```c
void msft_register(struct hci_dev *hdev)
{
	struct msft_data *msft = NULL;

	bt_dev_dbg(hdev, "Register MSFT extension");

	msft = kzalloc_obj(*msft);
	if (!msft) {
		bt_dev_err(hdev, "Failed to register MSFT extension");
		return;
	}

	INIT_LIST_HEAD(&msft->handle_map);
	INIT_LIST_HEAD(&msft->address_filters);
	hdev->msft_data = msft;
	mutex_init(&msft->filter_lock);
}
```

So, the critical timing issue is:

1.  We *must* ensure that `idr_init(&hdev->adv_monitors_idr)` and `msft_register(hdev)` happen *before* the `queue_work(hdev->req_workqueue, &hdev->power_on)` call. This is to avoid `msft` being used before it is fully initialized.
2.  Within `msft_register()`, `hdev->msft_data = msft;` *must* be assigned *after* all the initialization of the `msft` struct is complete. This includes the `INIT_LIST_HEAD` calls and `mutex_init`.

This means the current ordering of operations is not thread-safe.

Now, let's re-examine `hci_register_dev` more broadly to look for similar potential issues, especially around registrations or initializations that might be done before work queue scheduling.

Here, I'm paying close attention to the order of operations within `hci_register_dev`. Anything that happens *before* a work queue is scheduled and could be accessed by that work queue is a potential trouble spot.

Alright, the `err_wqueue` path is interesting as it indicates what happens if `device_add` fails. The calls to `idr_init` and `msft_register` are after `device_add`, so that's good. In the error path, the `idr` is not cleaned up.
I am also checking `hci_alloc_dev_priv` to ensure no related structs are initialized there.



131/4 2026/08/27 20:39 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2460 LineCount:50]

Results:
map[Contents:2460:		hdev->le_max_key_size = SMP_MAX_ENC_KEY_SIZE;
2461:		hdev->le_min_key_size = SMP_MIN_ENC_KEY_SIZE;
2462:		hdev->le_tx_def_phys = HCI_LE_SET_PHY_1M;
2463:		hdev->le_rx_def_phys = HCI_LE_SET_PHY_1M;
2464:		hdev->le_num_of_adv_sets = HCI_MAX_ADV_INSTANCES;
2465:		hdev->def_multi_adv_rotation_duration = HCI_DEFAULT_ADV_DURATION;
2466:		hdev->def_le_autoconnect_timeout = HCI_LE_CONN_TIMEOUT;
2467:		hdev->min_le_tx_power = HCI_TX_POWER_INVALID;
2468:		hdev->max_le_tx_power = HCI_TX_POWER_INVALID;
2469:	
2470:		hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT;
2471:		hdev->discov_interleaved_timeout = DISCOV_INTERLEAVED_TIMEOUT;
2472:		hdev->conn_info_min_age = DEFAULT_CONN_INFO_MIN_AGE;
2473:		hdev->conn_info_max_age = DEFAULT_CONN_INFO_MAX_AGE;
2474:		hdev->auth_payload_timeout = DEFAULT_AUTH_PAYLOAD_TIMEOUT;
2475:		hdev->min_enc_key_size = HCI_MIN_ENC_KEY_SIZE;
2476:	
2477:		/* default 1.28 sec page scan */
2478:		hdev->def_page_scan_type = PAGE_SCAN_TYPE_STANDARD;
2479:		hdev->def_page_scan_int = 0x0800;
2480:		hdev->def_page_scan_window = 0x0012;
2481:	
2482:		mutex_init(&hdev->lock);
2483:		mutex_init(&hdev->req_lock);
2484:		mutex_init(&hdev->mgmt_pending_lock);
2485:	
2486:		ida_init(&hdev->unset_handle_ida);
2487:	
2488:		INIT_LIST_HEAD(&hdev->mesh_pending);
2489:		INIT_LIST_HEAD(&hdev->mgmt_pending);
2490:		INIT_LIST_HEAD(&hdev->reject_list);
2491:		INIT_LIST_HEAD(&hdev->accept_list);
2492:		INIT_LIST_HEAD(&hdev->uuids);
2493:		INIT_LIST_HEAD(&hdev->link_keys);
2494:		INIT_LIST_HEAD(&hdev->long_term_keys);
2495:		INIT_LIST_HEAD(&hdev->identity_resolving_keys);
2496:		INIT_LIST_HEAD(&hdev->remote_oob_data);
2497:		INIT_LIST_HEAD(&hdev->le_accept_list);
2498:		INIT_LIST_HEAD(&hdev->le_resolv_list);
2499:		INIT_LIST_HEAD(&hdev->le_conn_params);
2500:		INIT_LIST_HEAD(&hdev->pend_le_conns);
2501:		INIT_LIST_HEAD(&hdev->pend_le_reports);
2502:		INIT_LIST_HEAD(&hdev->conn_hash.list);
2503:		INIT_LIST_HEAD(&hdev->adv_instances);
2504:		INIT_LIST_HEAD(&hdev->blocked_keys);
2505:		INIT_LIST_HEAD(&hdev->monitored_devices);
2506:	
2507:		INIT_LIST_HEAD(&hdev->local_codecs);
2508:		INIT_WORK(&hdev->rx_work, hci_rx_work);
2509:		INIT_WORK(&hdev->cmd_work, hci_cmd_work);
]

132/4 2026/08/27 20:39 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 46826
							output: 26
							thoughts: 71
						

Thoughts:
**Investigating Potential Bluetooth Concurrency Issues**

Okay, let's dive in. I need to make sure I've got a comprehensive picture of potential concurrency problems within the Bluetooth networking code. My immediate concern is the initialization of mutexes and any associated memory allocation. First things first: I'm going to scan the `net/bluetooth/` directory meticulously. I'll need to check for instances of `kzalloc_obj`, `kzalloc`, and `mutex_init`. My focus is to identify *where* these are being called in relation to each other, to see if an object is being allocated, and then the mutex associated with it is initialized, or if there's any funny business with pointers being assigned before mutex initialization or list initialization. Any of those could be a red flag. So, let's start with a thorough search for `mutex_init` in that specific directory. I need to understand the lifecycle of these mutexes and the data they protect.



133/4 2026/08/27 20:40 tool grepper
0m Args:
map[Expression:mutex_init PathPrefix:net/bluetooth]

Results:
map[Output:net/bluetooth/hci_core.c=2398=struct hci_dev *hci_alloc_dev_priv(int sizeof_priv)
--
net/bluetooth/hci_core.c-2481-
net/bluetooth/hci_core.c:2482:	mutex_init(&hdev->lock);
net/bluetooth/hci_core.c:2483:	mutex_init(&hdev->req_lock);
net/bluetooth/hci_core.c:2484:	mutex_init(&hdev->mgmt_pending_lock);
net/bluetooth/hci_core.c-2485-
--
net/bluetooth/hci_sync.c=626=void hci_cmd_sync_init(struct hci_dev *hdev)
--
net/bluetooth/hci_sync.c-629-	INIT_LIST_HEAD(&hdev->cmd_sync_work_list);
net/bluetooth/hci_sync.c:630:	mutex_init(&hdev->cmd_sync_work_lock);
net/bluetooth/hci_sync.c:631:	mutex_init(&hdev->unregister_lock);
net/bluetooth/hci_sync.c-632-
--
net/bluetooth/hidp/core.c=926=static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr,
--
net/bluetooth/hidp/core.c-969-	/* session data */
net/bluetooth/hidp/core.c:970:	mutex_init(&session->report_mutex);
net/bluetooth/hidp/core.c-971-	init_waitqueue_head(&session->report_queue);
--
net/bluetooth/l2cap_core.c=443=struct l2cap_chan *l2cap_chan_create(void)
--
net/bluetooth/l2cap_core.c-452-	skb_queue_head_init(&chan->srej_q);
net/bluetooth/l2cap_core.c:453:	mutex_init(&chan->lock);
net/bluetooth/l2cap_core.c-454-
--
net/bluetooth/l2cap_core.c=7152=static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon)
--
net/bluetooth/l2cap_core.c-7186-
net/bluetooth/l2cap_core.c:7187:	mutex_init(&conn->lock);
net/bluetooth/l2cap_core.c-7188-
--
net/bluetooth/msft.c=753=void msft_register(struct hci_dev *hdev)
--
net/bluetooth/msft.c-767-	hdev->msft_data = msft;
net/bluetooth/msft.c:768:	mutex_init(&msft->filter_lock);
net/bluetooth/msft.c-769-}
--
net/bluetooth/rfcomm/core.c=300=struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio)
--
net/bluetooth/rfcomm/core.c-309-	skb_queue_head_init(&d->tx_queue);
net/bluetooth/rfcomm/core.c:310:	mutex_init(&d->lock);
net/bluetooth/rfcomm/core.c-311-	refcount_set(&d->refcnt, 1);
]

134/4 2026/08/27 20:40 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 48007
							output: 40
							thoughts: 91
						

Thoughts:
**Investigating a Potential Race Condition in Bluetooth Driver Initialization**

Okay, let's dive in. My initial hunch is pointing me towards a potential race condition somewhere within the Bluetooth stack's initialization. Specifically, I need to focus on how mutexes are being handled. My thought process is to trace mutex initialization and pointer publication in `net/bluetooth/msft.c`. I've already noticed something potentially problematic: the `msft_register` function, where `mutex_init` seems to be occurring *after* a pointer might have already been published. That immediately sets off alarm bells for me.

To confirm this suspicion, I'm going to follow the relevant code execution path. I will check `l2cap_conn_add`. I need to understand if this function uses the potential race-prone mutex.

Now, let's get into the details. I need to closely examine lines 7180 to 7200 in `net/bluetooth/l2cap_core.c`. This section likely contains the crucial logic I'm interested in, which involves how `l2cap_conn_add` interacts with the mutex potentially initialized in `msft_register`. This will tell me if the sequence of operations here could create a window for unintended access. I need to see if there's a possibility of concurrent access to a resource before the corresponding mutex protects it.



135/4 2026/08/27 20:40 tool read-file
0m Args:
map[File:net/bluetooth/l2cap_core.c FirstLine:7180 LineCount:25]

Results:
map[Contents:7180:		conn->local_fixed_chan = L2CAP_FC_SIG_BREDR | L2CAP_FC_CONNLESS;
7181:	
7182:		if (hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED) &&
7183:		    (bredr_sc_enabled(hcon->hdev) ||
7184:		     hci_dev_test_flag(hcon->hdev, HCI_FORCE_BREDR_SMP)))
7185:			conn->local_fixed_chan |= L2CAP_FC_SMP_BREDR;
7186:	
7187:		mutex_init(&conn->lock);
7188:	
7189:		INIT_LIST_HEAD(&conn->chan_l);
7190:		INIT_LIST_HEAD(&conn->users);
7191:	
7192:		INIT_DELAYED_WORK(&conn->info_timer, l2cap_info_timeout);
7193:		ida_init(&conn->tx_ida);
7194:	
7195:		skb_queue_head_init(&conn->pending_rx);
7196:		INIT_WORK(&conn->pending_rx_work, process_pending_rx);
7197:		INIT_DELAYED_WORK(&conn->id_addr_timer, l2cap_conn_update_id_addr);
7198:	
7199:		conn->disc_reason = HCI_ERROR_REMOTE_USER_TERM;
7200:	
7201:		return conn;
7202:	}
7203:	
7204:	static bool is_valid_psm(u16 psm, u8 dst_type)
]

136/4 2026/08/27 20:40 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 48891
							output: 149
							thoughts: 347
						

Thoughts:
**Analyzing Potential Synchronization Issues with L2CAP Connection Handling**

Okay, so I'm digging into this L2CAP connection code and something's bugging me. Specifically, in `l2cap_conn_add`, the `conn` struct is only returned *and* assigned to `hcon->l2cap_data` in the calling function, *after* the `l2cap_conn_add` function returns. This feels like a potential race condition or synchronization issue, and it demands further investigation. I need to be absolutely sure this ordering is handled correctly.

Now, let's switch gears and examine the MSFT (Microsoft) extension registration process. I'll take a look at `net/bluetooth/msft.c`: I need to understand how the MSFT extension interacts with the `hci_dev` structure, specifically with `hdev->msft_data`. I'm looking for anything that touches the `hdev` after `l2cap_conn_add` might be called. I'm noting the allocation and initialization of the `msft_data` structure, including the `handle_map`, `address_filters`, and the mutex.

I'm now going to move on to `net/bluetooth/hci_core.c` and focus on how the `hdev` is initialized, specifically how `msft_register` is called. I see the suspend notifier registration, IDR initialization, and the queuing of a work item. The `msft_register(hdev)` call is of particular interest as it sets `hdev->msft_data`. I'm watching the order of things: `msft_register` and related operations and how they might intersect with the `l2cap_conn_add` process.

The plan is to use `codeeditor` to make the edits I think are necessary to ensure proper synchronization and then use `patch-diff` to confirm the changes are sound and that they address any potential concurrency issues. I will also be testing this.



137/4 2026/08/27 20:40 tool codeeditor
0m Args:
map[CurrentCode:	INIT_LIST_HEAD(&msft->handle_map);
	INIT_LIST_HEAD(&msft->address_filters);
	hdev->msft_data = msft;
	mutex_init(&msft->filter_lock);
} NewCode:	INIT_LIST_HEAD(&msft->handle_map);
	INIT_LIST_HEAD(&msft->address_filters);
	mutex_init(&msft->filter_lock);
	hdev->msft_data = msft;
} SourceFile:net/bluetooth/msft.c]

Results:
map[]

138/4 2026/08/27 20:40 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 49821
							output: 224
							thoughts: 16
						

Thoughts:
Here's a summary of my thought process, as if I were about to edit `net/bluetooth/hci_core.c`:

**Diving into HCI Core**

Alright, time to get my hands dirty. It's time to dig into `net/bluetooth/hci_core.c`. I need to remember the architectural layout of this thing like the back of my hand. I already have a pretty good understanding of the HCI layer's role, the command and event flow, and the critical data structures involved (hci_dev, hci_conn, etc.). I need to keep the intricate balance of concurrency and interrupt handling that this core file manages in mind at all times. This is the heart of the Bluetooth stack, so precision and careful consideration are paramount. This file is probably massive, so I'll need to use my understanding of the relevant protocols and Bluetooth specifications, and my debugging skills, to find the exact section I need. Before I even think about making changes, I'll review recent commits and pull requests to understand the context and potential upstream implications. No impulsive coding here.



139/4 2026/08/27 20:41 tool codeeditor
0m Args:
map[CurrentCode:	error = hci_register_suspend_notifier(hdev);
	if (error)
		BT_WARN("register suspend notifier failed error:%d\n", error);

	queue_work(hdev->req_workqueue, &hdev->power_on);

	idr_init(&hdev->adv_monitors_idr);
	msft_register(hdev);

	return id; NewCode:	error = hci_register_suspend_notifier(hdev);
	if (error)
		BT_WARN("register suspend notifier failed error:%d\n", error);

	idr_init(&hdev->adv_monitors_idr);
	msft_register(hdev);

	queue_work(hdev->req_workqueue, &hdev->power_on);

	return id; SourceFile:net/bluetooth/hci_core.c]

Results:
map[]

140/4 2026/08/27 20:41 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 50295
							output: 10
							thoughts: 12
						

Thoughts:
Okay, here's my attempt at summarizing that thought process, keeping in mind I'm speaking to a fellow expert and adopting a first-person perspective:

**Running a Quick Patch Verification**

Right, let's take a quick look at this patch. My immediate thought is, before diving too deep, I should run `patch-diff` and get a really good handle on what's going on with this patch. It's the most expedient way to confirm everything is what I expect. I've got to make sure there are no surprises or obvious issues before I even *think* about applying it or going through it with a fine-tooth comb. Need to establish a good baseline before spending more time on it.



141/4 2026/08/27 20:41 tool patch-diff
0m Error:
log-in to see details

142/4 2026/08/27 20:41 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 50486
							output: 15
							thoughts: 15
						

Thoughts:
Okay, here's my interpretation of that thought process, assuming I'm deep in the weeds of software development and dealing with a tricky file comparison:

**Analyzing the Call to `patch-diff`**

Alright, so I'm about to call `patch-diff`. This is usually a key utility for me, it's what I rely on to figure out the differences between two files, likely to apply patches or generate them. The real question is: why am I passing an empty string as the `File:` argument? Hmm, that's unusual. It's either a deliberate edge case I'm testing, a placeholder I'll replace later, or potentially something a bit more interesting like wanting to compare to an "empty" file in my mental model. I'll need to figure out what context necessitates this unusual argument. Given my experience, I'm expecting some specific behavior with an empty file name in this particular call. Depending on the library, it could return an error, a default diff, or something entirely context-dependent. Time to dig into the surrounding code and see what I can find!



143/4 2026/08/27 20:41 tool patch-diff
0m Args:
map[File:]

Results:
map[Output:diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2544,104 +2544,104 @@ EXPORT_SYMBOL(hci_free_dev);
 /* Register HCI device */
 int hci_register_dev(struct hci_dev *hdev)
 {
 	int id, error;
 
 	if (!hdev->open || !hdev->close || !hdev->send)
 		return -EINVAL;
 
 	id = ida_alloc_max(&hci_index_ida, HCI_MAX_ID - 1, GFP_KERNEL);
 	if (id < 0)
 		return id;
 
 	error = dev_set_name(&hdev->dev, "hci%u", id);
 	if (error)
 		return error;
 
 	hdev->name = dev_name(&hdev->dev);
 	hdev->id = id;
 
 	BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
 
 	hdev->workqueue = alloc_ordered_workqueue("%s", WQ_HIGHPRI, hdev->name);
 	if (!hdev->workqueue) {
 		error = -ENOMEM;
 		goto err;
 	}
 
 	hdev->req_workqueue = alloc_ordered_workqueue("%s", WQ_HIGHPRI,
 						      hdev->name);
 	if (!hdev->req_workqueue) {
 		destroy_workqueue(hdev->workqueue);
 		error = -ENOMEM;
 		goto err;
 	}
 
 	if (!IS_ERR_OR_NULL(bt_debugfs))
 		hdev->debugfs = debugfs_create_dir(hdev->name, bt_debugfs);
 
 	error = device_add(&hdev->dev);
 	if (error < 0)
 		goto err_wqueue;
 
 	hci_leds_init(hdev);
 
 	hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev,
 				    RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops,
 				    hdev);
 	if (hdev->rfkill) {
 		if (rfkill_register(hdev->rfkill) < 0) {
 			rfkill_destroy(hdev->rfkill);
 			hdev->rfkill = NULL;
 		}
 	}
 
 	if (hdev->rfkill && rfkill_blocked(hdev->rfkill))
 		hci_dev_set_flag(hdev, HCI_RFKILLED);
 
 	hci_dev_set_flag(hdev, HCI_SETUP);
 	hci_dev_set_flag(hdev, HCI_AUTO_OFF);
 
 	/* Assume BR/EDR support until proven otherwise (such as
 	 * through reading supported features during init.
 	 */
 	hci_dev_set_flag(hdev, HCI_BREDR_ENABLED);
 
 	write_lock(&hci_dev_list_lock);
 	list_add(&hdev->list, &hci_dev_list);
 	write_unlock(&hci_dev_list_lock);
 
 	/* Devices that are marked for raw-only usage are unconfigured
 	 * and should not be included in normal operation.
 	 */
 	if (hci_test_quirk(hdev, HCI_QUIRK_RAW_DEVICE))
 		hci_dev_set_flag(hdev, HCI_UNCONFIGURED);
 
 	/* Mark Remote Wakeup connection flag as supported if driver has wakeup
 	 * callback.
 	 */
 	if (hdev->wakeup)
 		hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
 
 	hci_sock_dev_event(hdev, HCI_DEV_REG);
 	hci_dev_hold(hdev);
 
 	error = hci_register_suspend_notifier(hdev);
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
 	debugfs_remove_recursive(hdev->debugfs);
 	destroy_workqueue(hdev->workqueue);
 	destroy_workqueue(hdev->req_workqueue);
 err:
 	ida_free(&hci_index_ida, hdev->id);
 
 	return error;
 }
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -753,26 +753,26 @@ static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
 void msft_register(struct hci_dev *hdev)
 {
 	struct msft_data *msft = NULL;
 
 	bt_dev_dbg(hdev, "Register MSFT extension");
 
 	msft = kzalloc_obj(*msft);
 	if (!msft) {
 		bt_dev_err(hdev, "Failed to register MSFT extension");
 		return;
 	}
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)
 {
 	struct msft_data *msft = hdev->msft_data;
 
 	if (!msft)
 		return;
 
 	bt_dev_dbg(hdev, "Unregister MSFT extension");
]

144/4 2026/08/27 20:41 llm patch-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 52407
							output: 393
							thoughts: 48
						

Thoughts:
Here's my take on the situation:

**Reflecting on the Clean Fix**

Okay, so I've just reviewed the diff and, yeah, it's pretty satisfying. The changes are clean, to the point, and, critically, they nail down both of those nasty race conditions we were worried about. That issue in `hci_register_dev` was a real headache, and getting rid of that premature pointer publication in `msft_register` is a huge relief. Now, I feel confident we've created a really solid foundation. It's time to craft a comprehensive response, really laying out the specifics of *what* was altered and, even more importantly, *why* these alterations were necessary. We need to document everything clearly, so it's understandable for anyone reviewing the code.



145/3 2026/08/27 20:42 action test-patch
23m Results:
map[PatchDiff:diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)
 TestError:]

146/3 2026/08/27 21:05 action If
15m Args:
map[TestError:]

147/4 2026/08/27 21:05 agent patch-reviewer
15m Model:
core

Results:
map[ReviewApproved:true ReviewComments:[]]

Instruction:
You are an experienced Linux kernel maintainer reviewing a proposed patch that compiles and passes reproducer tests.
Evaluate the patch diff against the crash report, root cause, and the architectural design guidelines below.

Scope Constraint (Single-Patch Submissions):
We only generate single, standalone patches (not patch series). If a comprehensive architectural redesign would require a multi-patch series touching many files, accept a localized single-patch fix as long as it correctly fixes the bug, does not introduce new issues, and avoids sentinel band-aids within its local scope.

Evaluation:
- Set ReviewApproved=true (and leave ReviewComments empty) if the patch is acceptable for upstream submission as a single-patch fix.
- Set ReviewApproved=false and list concise, actionable feedback in ReviewComments if the patch contains fixable "Kernel Architectural Design & Maintainer Taste" violations.

Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.

---

# Kernel Architectural Design & Maintainer Taste

Evaluate kernel patches and fix proposals beyond binary bug presence. Enforce **maintainer taste**, **lifecycle symmetry**, **typestate soundness**, and **topological graph simplicity**.

---

## 1. Core Philosophy: Band-Aid vs. Architectural Design

Naive patches often introduce **defensive sentinel guards** (e.g., ad-hoc `if (!ptr) return;` checks, status flags, or suppressed warnings) directly at the point of failure. While locally avoiding crashes, they degrade subsystem architecture by leaving uninitialized states reachable.

Maintainer "good taste" solves the root cause by **shifting invariants** (making invalid states unrepresentable) and moving dynamic runtime checks into static typestate guarantees.

```
HACKY BAND-AID FIX (Monolithic Cleanup)            ARCHITECTURAL DESIGN (Scoped RAII / Invariant Shift)
───────────────────────────────────────            ────────────────────────────────────────────────────
           [ Init / Entry ]                                         [ Init / Entry ]
                  β”‚                                                         β”‚
      (Register Global Cleanup)                                    (Allocate Resource A)
                  β”‚                                                         β”‚
            [ Init Sub-B ] ──fail──┐                                  [ Init Sub-B ] ──fail──┐
                  β”‚ (success)      β”‚                                        β”‚ (success)      β”‚
                  β–Ό                β”‚                                        β–Ό                β–Ό
          [ Setup Complete ]       β”‚                             (Arm B Cleanup / RAII)  (Unwind A Only:
                  β”‚                β”‚                                        β”‚             B never armed)
         (Deferred Teardown)       β”‚                                        β–Ό                β”‚
                  β”‚                β”‚                                [ Setup Complete ]       β–Ό
                  β–Ό                β–Ό                                        β”‚            [ Error Exit ]
           [ release_all ] β—„β”€β”€β”€β”€β”€β”€β”€β”˜                               (LIFO Scope Teardown)
                  β”‚                                                         β”‚
      (if (!ctx->b) return;) <-- Defensive guard!                           β–Ό
                  β”‚                                                [ Clean Destruction ]
           [ Unsafe State ]                                        (Zero sentinel checks needed)
```

```c
// ANTI-PATTERN (Defensive Sentinel Guard): Teardown called on partial init -> callee needs guard
void driver_cleanup(struct ctx *ctx) {
    if (!ctx->buf) return; // <-- Sentinel band-aid
    free_buffer(ctx->buf);
}
// CANONICAL SHIFT (Granular Scoped Action): Registered only upon complete initialization
ctx->buf = alloc_buffer();
if (!ctx->buf) return -ENOMEM;
devm_add_action_or_reset(dev, free_buffer_action, ctx->buf);
```

---

## 2. Maintainer Taste as Graph Topology & Structural Simplicity

Software design quality maps directly to graph-theoretic properties across the Control-Flow Graph (CFG), Data-Flow Graph (DFG), and Object Lifecycle DAG:

### A. Control-Flow Graph (CFG) Simplification
* **Branch Minimization & Path Explosion (McCabe 1976):** Every defensive check added to a compound destructor or callback (`if (!ctx->buffer) return;`) adds a predicate node ($\pi$), increases cyclomatic complexity $v(G) = |E| - |V| + 2$, causes exponential path explosion ($O(2^k)$ paths), and enlarges explicit state spaces ($|S| = \prod |D_i|$). Good taste eliminates the branch by guaranteeing destructors are invoked only on initialized typestates. *(Note: Standard idempotent leaf deallocators like `kfree(NULL)` and public API input sanitizers are exempt).*
* **Single-Entry Single-Exit (SESE) Symmetry (Ferrante 1987, Johnson 1994, Dijkstra 1972):** Resource acquisition and release must form strict **nested dominator trees**. If resource $R_i$ is acquired at node $A$, the set of release actions $\{B_1, \dots, B_m\}$ must form a strict **post-dominating cut** relative to $A$ across all maximal exit paths.
* **Pointer Uniformity (Linus's "Good Taste" Rule):** Eliminate special-case conditional branches by operating on address indirection (e.g., indirect pointers `**curr` in linked list unlinking) to unify edge and interior cases into a branchless invariant.
* **Lexical Scope Invariants & Affine Lifecycles (Wadler 1990, RAII):** Enforce SESE symmetry and "consumed exactly once" affine invariants using compiler-backed scoped cleanup (`<linux/cleanup.h>` `guard()`, `scoped_guard()`, `__free()`).

### B. Ownership & Lifetime DAGs
* **Acyclic Lifecycles & Topological Teardown (Tarjan 1972, Kahn 1962):** Resource ownership must form a strict Directed Acyclic Graph (DAG) $G = (R, E)$. Teardown order must strictly follow reverse topological sort $\text{toposort}(G)^R$. Mixing conflicting lifetime paradigms (e.g., embedding a dynamic refcounted `kref`/socket struct inside a device-managed `devres` buffer or parent container) violates DAG acyclicity, creating synchronous blocking hacks (`wait_for_completion`), circular pins, and Use-After-Free hazards.
* **Three-Phase Concurrent Quiescence:** Multi-threaded and asynchronous teardown (networking, block layer, RCU) must strictly sequence: (1) **Deactivation/Delisting** (make unreachable) -> (2) **Quiescence & Draining** (`synchronize_rcu()`, `cancel_work_sync()`, `napi_disable()`) -> (3) **Physical Reclamation** (`kfree()`, `kmem_cache_destroy()`).
* **Typestate Validity (Strom & Yemini 1986, Aldrich et al. 2009):** A struct with $N$ fields should not use runtime boolean flags (`ctx->is_initialized`) to model incomplete typestates. Sub-resources must transition as a deterministic typestate automaton ($S_{uninit} \xrightarrow{\text{alloc}} S_{init} \xrightarrow{\text{publish}} S_{registered}$), and registration functions must accept only fully initialized typestates.

---

## 3. Deterministic Decision Trigger Matrix

| Code Symptom / Trigger (When you see X) | Anti-Pattern Band-Aid (DO NOT DO Z) | Canonical Invariant Shift (DO Y) |
| :--- | :--- | :--- |
| **Null deref in compound destructor / cleanup callback** | Add `if (!priv->buf) return;` in composite cleanup handler | Register granular cleanup immediately upon allocation via `devm_add_action_or_reset()`, `<linux/cleanup.h>` `__free()`, or discrete reverse LIFO labels |
| **UAF on dynamic object after container unbind** | Allocate with `devm_kzalloc()` and block on `wait_for_completion()` | Allocate with `kzalloc()`, manage lifetime via `kref_get()`/`kref_put()`, call unbind/delist on unbind, free in `kref` release callback |
| **Goto ladder lock leaks on early error exit** | Sprinkle manual `mutex_unlock()` across error returns | Use `guard(mutex)(&lock)` or `scoped_guard(spinlock, &lock)` from `<linux/cleanup.h>` |
| **Callback / IRQ / timer fires before full init** | Add `if (!priv->ready)` check inside IRQ/timer handler | Move `request_irq()`, `timer_setup()`, or `napi_enable()` strictly to the end of setup after all state structures are fully initialized |
| **Multi-step setup failure leaks resources** | Route all errors to a single `err:` label calling a monolithic `cleanup(priv)` with NULL checks | Use `cleanup.h` RAII, granular `devm` actions, or a strict reverse LIFO goto ladder (`err_free_b:` -> `err_free_a:`) |
| **Mixed ownership / asymmetric refcount drops** | Conditionally call `kref_put()` in caller based on error code | Enforce unconditional callee-cleans or caller-cleans ownership convention across all paths |
| **Ad-hoc state flag polling during teardown** | Add `priv->stopping = true` and spin/poll in callbacks | Use atomic typestate transitions and synchronous flush/drain APIs (`cancel_work_sync()`, `drain_workqueue()`) |

---

## 4. The Architectural Review Checklist

Before finalizing any kernel fix or review, audit against the following four criteria:

1. **The Sentinel Test (Caller vs. Callee Responsibility):**
   * *Smell:* Adding a defensive guard (`if (!ptr)` or `if (flags & INITIALIZED)`) inside a compound teardown callback or destructor to mask partial initialization.
   * *Invariant:* If a destructor executes on uninitialized data, the defect is at the **caller's registration/invocation point**, not the callee.
   * *Note:* Standard C allocator no-ops (`kfree(NULL)`) and public API parameter validators (`if (WARN_ON(!ptr)) return -EINVAL;`) are exempt; this rule targets *internal subsystem lifecycle pipelines and teardown paths*.
   * *Action:* Move registration to the point of complete initialization (`devm_add_action_or_reset()`, RAII/`__free()`, or discrete caller unwinding).

2. **LIFO Stack Unwinding Symmetry:**
   * *Smell:* Releasing resources in arbitrary order or invoking destructors for partially initialized subsystems.
   * *Invariant:* Resource release must strictly mirror acquisition order in reverse (LIFO) without monolithic cleanup guards.
   * *Action:* Verify that partial setup/initialization failures (e.g., `probe()`, `mount()`, `open()`, `alloc_pool()`) unwind only already-allocated resources in reverse order via strict LIFO labels or `cleanup.h` scope exit.

3. **Ownership Decoupling:**
   * *Smell:* Embedding dynamically refcounted objects (`kref`, `struct sock`, `struct inode`, `struct file`) directly inside hardware device-bound allocations (`devres`) or parent containers (`super_block`, `net_device`).
   * *Invariant:* Dynamic consumer references must outlive parent unregistration without use-after-free, circular pins, or blocking hacks.
   * *Action:* Decouple the refcounted core object from the container binding; container teardown must unbind/delist the object, but memory is freed exclusively by the final `kref_put()`.

4. **Codebase Idiom Alignment:**
   * *Smell:* Using legacy custom rollback ladders, ad-hoc state flags, or manual lock unlocking on error paths.
   * *Invariant:* Prefer standard, modern kernel abstractions with compiler-enforced safety guarantees.
   * *Action (Modern >= 6.6):* Replace manual boilerplate with `cleanup.h` (`guard()`, `scoped_guard()`, `__free()`), `devm_add_action_or_reset()`, `refcount_t`, and standard `kref` helpers.
   * *Action (Legacy / LTS / No-RAII Subsystems):* Enforce clean, branchless reverse LIFO goto ladders (`err_free_b:` -> `err_free_a:`).
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 title:
WARNING in msft_do_close

The crash report:
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u11:2/5607
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#1: kworker/u11:2/5607
Modules linked in:
CPU: 1 UID: 0 PID: 5607 Comm: kworker/u11:2 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: hci3 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 29 61 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d c5 f7 aa 04 00 75 13 48 8d 3d a8 43 ae 04 48 c7 c6 c0 c5 cd 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc90004547720 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888115658000
RDX: 0000000000000000 RSI: ffffffff8bcdc5c0 RDI: ffffffff90647540
RBP: ffffc900045478b0 R08: ffffffff90612953 R09: 1ffffffff20c252a
R10: dffffc0000000000 R11: fffffbfff20c252b R12: ffff88818c5d3a40
R13: 0000000000000000 R14: 1ffff920008a8ef8 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8882e86de000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd706dfc30 CR3: 0000000118cf8000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	29 61 90             	sub    %esp,-0x70(%rcx)
   3:	48 c1 e8 03          	shr    $0x3,%rax
   7:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax
   b:	84 c0                	test   %al,%al
   d:	0f 85 47 02 00 00    	jne    0x25a
  13:	83 3d c5 f7 aa 04 00 	cmpl   $0x0,0x4aaf7c5(%rip)        # 0x4aaf7df
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d a8 43 ae 04 	lea    0x4ae43a8(%rip),%rdi        # 0x4ae43cb
  23:	48 c7 c6 c0 c5 cd 8b 	mov    $0xffffffff8bcdc5c0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 75 ee ff ff       	jmp    0xffffeeaa
  35:	90                   	nop
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	e9 48 f2 ff ff       	jmp    0xfffff286
  3e:	90                   	nop
  3f:	0f                   	.byte 0xf


The root cause explanation:
This crash is caused by a race condition during the registration of a new Bluetooth HCI device, specifically between the initialization of the Microsoft (MSFT) extension data and the execution of the device's `power_on` workqueue.

### Root Cause Analysis

1. **Triggering the Bug**: The syzkaller reproducer creates a Virtual HCI device (`/dev/vhci`) and writes a vendor packet with opcode `0x80` (`\xff\x80`). In `__vhci_create_device()`, this specific opcode sets the `HCI_QUIRK_RAW_DEVICE` quirk on the new HCI device and then calls `hci_register_dev(hdev)`.
2. **Device Registration**: Inside `hci_register_dev()` (`net/bluetooth/hci_core.c`), because the `HCI_QUIRK_RAW_DEVICE` quirk is set, the device is marked with the `HCI_UNCONFIGURED` flag.
3. **The Race Condition**: Towards the end of `hci_register_dev()`, the code queues the `power_on` work **before** fully initializing the device's MSFT extension and IDR:
   ```c
   	queue_work(hdev->req_workqueue, &hdev->power_on); // <--- Work is queued here

   	idr_init(&hdev->adv_monitors_idr);
   	msft_register(hdev);                              // <--- MSFT initialized here
   ```
4. **Concurrent Execution**: As soon as `queue_work()` is called, the `power_on` work can start executing concurrently on another CPU, invoking `hci_power_on()`. 
5. **Closing the Unconfigured Device**: Inside `hci_power_on()`, it checks if the device is unconfigured. Since `HCI_UNCONFIGURED` is set, it immediately bails out and calls `hci_dev_do_close(hdev)`, which in turn calls `hci_dev_close_sync(hdev)` and finally `msft_do_close(hdev)`.
6. **Uninitialized Mutex Access**: Concurrently, the original thread is executing `msft_register(hdev)` (`net/bluetooth/msft.c`):
   ```c
   	msft = kzalloc_obj(*msft);
   	// ...
   	INIT_LIST_HEAD(&msft->handle_map);
   	INIT_LIST_HEAD(&msft->address_filters);
   	hdev->msft_data = msft;               // <--- Pointer is exposed
   	mutex_init(&msft->filter_lock);       // <--- Mutex initialized AFTER exposure
   ```
   If `msft_do_close()` reads `hdev->msft_data` after it has been assigned but *before* `mutex_init()` is called, it will see a non-NULL pointer and attempt to lock the uninitialized (zeroed) mutex:
   ```c
   	mutex_lock(&msft->filter_lock);
   ```
   Locking an uninitialized mutex triggers the `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` warning seen in the crash log.

### Proposed Fix

To fix this issue, two changes should be made to ensure proper initialization ordering:

**1. Fix the initialization order in `hci_register_dev`:**
The device must be fully initialized before any work that might use it is scheduled. Move `idr_init()` and `msft_register()` to be called *before* `queue_work()`.

```c
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2631,10 +2631,10 @@ int hci_register_dev(struct hci_dev *hdev)
 		if (error)
 			BT_WARN("register suspend notifier failed error:%d\n", error);
 
-		queue_work(hdev->req_workqueue, &hdev->power_on);
-
 		idr_init(&hdev->adv_monitors_idr);
 		msft_register(hdev);
 
+		queue_work(hdev->req_workqueue, &hdev->power_on);
+
 		return id;
```

**2. Fix the pointer exposure in `msft_register`:**
As a defensive measure, `hdev->msft_data` should only be assigned *after* the structure is fully initialized. This prevents any concurrent readers from observing a partially initialized state.

```c
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,6 +764,6 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
```

The proposed patch diff:
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)


Review this patch diff against the crash report, root cause explanation, and kernel architectural design guidelines.

148/5 2026/08/27 21:05 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 9956
							output: 38
							thoughts: 85
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own mental process:

**Diving into This Patch**

Alright, time to really scrutinize this patch and the associated request. I need to get a solid understanding of the changes before I even *think* about signing off. First, I'm going to leverage my usual toolkit. Time to break out `read-file`, `grepper`, `codesearch-*` – whatever's most appropriate – and the `git-*` family of commands. I need a clear picture of the surrounding code and the broader impact. Let's see... I'm particularly interested in how this interacts with the Bluetooth stack. My gut tells me to focus on `net/bluetooth/hci_core.c`, specifically around line 2629. I also want to take a look at `net/bluetooth/msft.c` around line 764. That area tends to be a hotspot for these kinds of modifications. Let's get to it.



149/5 2026/08/27 21:06 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2590 LineCount:60]

Results:
map[Contents:2590:					    hdev);
2591:		if (hdev->rfkill) {
2592:			if (rfkill_register(hdev->rfkill) < 0) {
2593:				rfkill_destroy(hdev->rfkill);
2594:				hdev->rfkill = NULL;
2595:			}
2596:		}
2597:	
2598:		if (hdev->rfkill && rfkill_blocked(hdev->rfkill))
2599:			hci_dev_set_flag(hdev, HCI_RFKILLED);
2600:	
2601:		hci_dev_set_flag(hdev, HCI_SETUP);
2602:		hci_dev_set_flag(hdev, HCI_AUTO_OFF);
2603:	
2604:		/* Assume BR/EDR support until proven otherwise (such as
2605:		 * through reading supported features during init.
2606:		 */
2607:		hci_dev_set_flag(hdev, HCI_BREDR_ENABLED);
2608:	
2609:		write_lock(&hci_dev_list_lock);
2610:		list_add(&hdev->list, &hci_dev_list);
2611:		write_unlock(&hci_dev_list_lock);
2612:	
2613:		/* Devices that are marked for raw-only usage are unconfigured
2614:		 * and should not be included in normal operation.
2615:		 */
2616:		if (hci_test_quirk(hdev, HCI_QUIRK_RAW_DEVICE))
2617:			hci_dev_set_flag(hdev, HCI_UNCONFIGURED);
2618:	
2619:		/* Mark Remote Wakeup connection flag as supported if driver has wakeup
2620:		 * callback.
2621:		 */
2622:		if (hdev->wakeup)
2623:			hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
2624:	
2625:		hci_sock_dev_event(hdev, HCI_DEV_REG);
2626:		hci_dev_hold(hdev);
2627:	
2628:		error = hci_register_suspend_notifier(hdev);
2629:		if (error)
2630:			BT_WARN("register suspend notifier failed error:%d\n", error);
2631:	
2632:		queue_work(hdev->req_workqueue, &hdev->power_on);
2633:	
2634:		idr_init(&hdev->adv_monitors_idr);
2635:		msft_register(hdev);
2636:	
2637:		return id;
2638:	
2639:	err_wqueue:
2640:		debugfs_remove_recursive(hdev->debugfs);
2641:		destroy_workqueue(hdev->workqueue);
2642:		destroy_workqueue(hdev->req_workqueue);
2643:	err:
2644:		ida_free(&hci_index_ida, hdev->id);
2645:	
2646:		return error;
2647:	}
2648:	EXPORT_SYMBOL(hci_register_dev);
2649:	
]

150/5 2026/08/27 21:06 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 11214
							output: 36
							thoughts: 14
						

Thoughts:
Here's my take on the thought process, as requested:

**Diving into `net/bluetooth/msft.c`**

Okay, time to get to it. The immediate need here is to dive into `net/bluetooth/msft.c`. I need to figure out what's going on within that specific file related to Microsoft Bluetooth drivers. This probably means I'm troubleshooting, or maybe I'm working on an enhancement, or perhaps just doing some code review. Given my expertise, I'm already mentally running through the various data structures and key functions that are likely defined or used within that file. I'm expecting to see calls related to initialization, device handling, HCI commands, maybe even some specific error handling related to the Microsoft implementation of the Bluetooth protocol stack. The fact that the file's named after MSFT clearly indicates a specific implementation of Bluetooth, and I'm going to leverage my existing knowledge of Bluetooth profiles and the Linux networking stack to quickly understand the nuances of this implementation. Let's start digging!



151/5 2026/08/27 21:06 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:740 LineCount:40]

Results:
map[Contents: 740:			goto done;
 741:		}
 742:		kfree_skb(skb);
 743:	
 744:		bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
 745:			   &address_filter->bdaddr);
 746:	
 747:	done:
 748:		kfree(address_filter);
 749:	
 750:		return err;
 751:	}
 752:	
 753:	void msft_register(struct hci_dev *hdev)
 754:	{
 755:		struct msft_data *msft = NULL;
 756:	
 757:		bt_dev_dbg(hdev, "Register MSFT extension");
 758:	
 759:		msft = kzalloc_obj(*msft);
 760:		if (!msft) {
 761:			bt_dev_err(hdev, "Failed to register MSFT extension");
 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
 770:	
 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
 779:	
]

152/5 2026/08/27 21:06 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 12013
							output: 38
							thoughts: 60
						

Thoughts:
Okay, let's dive into this. I need to get a comprehensive grasp of `hci_register_dev`. To truly understand how `hdev` and its associated resources are managed within this function, I'll need to dissect the entire process. I'm going to focus my attention on the code block from line 2500 through 2649. Let's see what the lifecycle holds within that segment.



153/5 2026/08/27 21:06 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2500 LineCount:95]

Results:
map[Contents:2500:		INIT_LIST_HEAD(&hdev->pend_le_conns);
2501:		INIT_LIST_HEAD(&hdev->pend_le_reports);
2502:		INIT_LIST_HEAD(&hdev->conn_hash.list);
2503:		INIT_LIST_HEAD(&hdev->adv_instances);
2504:		INIT_LIST_HEAD(&hdev->blocked_keys);
2505:		INIT_LIST_HEAD(&hdev->monitored_devices);
2506:	
2507:		INIT_LIST_HEAD(&hdev->local_codecs);
2508:		INIT_WORK(&hdev->rx_work, hci_rx_work);
2509:		INIT_WORK(&hdev->cmd_work, hci_cmd_work);
2510:		INIT_WORK(&hdev->tx_work, hci_tx_work);
2511:		INIT_WORK(&hdev->power_on, hci_power_on);
2512:		INIT_WORK(&hdev->error_reset, hci_error_reset);
2513:	
2514:		hci_cmd_sync_init(hdev);
2515:	
2516:		INIT_DELAYED_WORK(&hdev->power_off, hci_power_off);
2517:	
2518:		skb_queue_head_init(&hdev->rx_q);
2519:		skb_queue_head_init(&hdev->cmd_q);
2520:		skb_queue_head_init(&hdev->raw_q);
2521:	
2522:		init_waitqueue_head(&hdev->req_wait_q);
2523:	
2524:		INIT_DELAYED_WORK(&hdev->cmd_timer, hci_cmd_timeout);
2525:		INIT_DELAYED_WORK(&hdev->ncmd_timer, hci_ncmd_timeout);
2526:	
2527:		hci_devcd_setup(hdev);
2528:	
2529:		hci_init_sysfs(hdev);
2530:		discovery_init(hdev);
2531:	
2532:		return hdev;
2533:	}
2534:	EXPORT_SYMBOL(hci_alloc_dev_priv);
2535:	
2536:	/* Free HCI device */
2537:	void hci_free_dev(struct hci_dev *hdev)
2538:	{
2539:		/* will free via device release */
2540:		put_device(&hdev->dev);
2541:	}
2542:	EXPORT_SYMBOL(hci_free_dev);
2543:	
2544:	/* Register HCI device */
2545:	int hci_register_dev(struct hci_dev *hdev)
2546:	{
2547:		int id, error;
2548:	
2549:		if (!hdev->open || !hdev->close || !hdev->send)
2550:			return -EINVAL;
2551:	
2552:		id = ida_alloc_max(&hci_index_ida, HCI_MAX_ID - 1, GFP_KERNEL);
2553:		if (id < 0)
2554:			return id;
2555:	
2556:		error = dev_set_name(&hdev->dev, "hci%u", id);
2557:		if (error)
2558:			return error;
2559:	
2560:		hdev->name = dev_name(&hdev->dev);
2561:		hdev->id = id;
2562:	
2563:		BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
2564:	
2565:		hdev->workqueue = alloc_ordered_workqueue("%s", WQ_HIGHPRI, hdev->name);
2566:		if (!hdev->workqueue) {
2567:			error = -ENOMEM;
2568:			goto err;
2569:		}
2570:	
2571:		hdev->req_workqueue = alloc_ordered_workqueue("%s", WQ_HIGHPRI,
2572:							      hdev->name);
2573:		if (!hdev->req_workqueue) {
2574:			destroy_workqueue(hdev->workqueue);
2575:			error = -ENOMEM;
2576:			goto err;
2577:		}
2578:	
2579:		if (!IS_ERR_OR_NULL(bt_debugfs))
2580:			hdev->debugfs = debugfs_create_dir(hdev->name, bt_debugfs);
2581:	
2582:		error = device_add(&hdev->dev);
2583:		if (error < 0)
2584:			goto err_wqueue;
2585:	
2586:		hci_leds_init(hdev);
2587:	
2588:		hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev,
2589:					    RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops,
2590:					    hdev);
2591:		if (hdev->rfkill) {
2592:			if (rfkill_register(hdev->rfkill) < 0) {
2593:				rfkill_destroy(hdev->rfkill);
2594:				hdev->rfkill = NULL;
]

154/5 2026/08/27 21:06 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 13728
							output: 38
							thoughts: 53
						

Thoughts:
Here's my take on those thoughts:

**Dissecting the Device Unregistration Process**

Alright, time to dive into `hci_unregister_dev(struct hci_dev *hdev)`. I need to understand exactly what happens here. My first instinct is to either jump directly into the source code and locate the function, or if I remember where the common functions are, I'll start by checking around line 2650 in `hci_core.c`. Let's see what secrets this unregistration holds.



155/5 2026/08/27 21:06 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2650 LineCount:70]

Results:
map[Contents:2650:	/* Unregister HCI device */
2651:	void hci_unregister_dev(struct hci_dev *hdev)
2652:	{
2653:		BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
2654:	
2655:		mutex_lock(&hdev->unregister_lock);
2656:		hci_dev_set_flag(hdev, HCI_UNREGISTER);
2657:		mutex_unlock(&hdev->unregister_lock);
2658:	
2659:		write_lock(&hci_dev_list_lock);
2660:		list_del(&hdev->list);
2661:		write_unlock(&hci_dev_list_lock);
2662:	
2663:		synchronize_srcu(&hdev->srcu);
2664:		cleanup_srcu_struct(&hdev->srcu);
2665:	
2666:		disable_work_sync(&hdev->rx_work);
2667:		disable_work_sync(&hdev->cmd_work);
2668:		disable_work_sync(&hdev->tx_work);
2669:		disable_work_sync(&hdev->power_on);
2670:		disable_work_sync(&hdev->error_reset);
2671:		disable_delayed_work_sync(&hdev->cmd_timer);
2672:		disable_delayed_work_sync(&hdev->ncmd_timer);
2673:	
2674:		hci_cmd_sync_clear(hdev);
2675:	
2676:		hci_unregister_suspend_notifier(hdev);
2677:	
2678:		hci_dev_do_close(hdev);
2679:	
2680:		if (!test_bit(HCI_INIT, &hdev->flags) &&
2681:		    !hci_dev_test_flag(hdev, HCI_SETUP) &&
2682:		    !hci_dev_test_flag(hdev, HCI_CONFIG)) {
2683:			hci_dev_lock(hdev);
2684:			mgmt_index_removed(hdev);
2685:			hci_dev_unlock(hdev);
2686:		}
2687:	
2688:		/* mgmt_index_removed should take care of emptying the
2689:		 * pending list */
2690:		BUG_ON(!list_empty(&hdev->mgmt_pending));
2691:	
2692:		hci_sock_dev_event(hdev, HCI_DEV_UNREG);
2693:	
2694:		if (hdev->rfkill) {
2695:			rfkill_unregister(hdev->rfkill);
2696:			rfkill_destroy(hdev->rfkill);
2697:		}
2698:	
2699:		device_del(&hdev->dev);
2700:		/* Actual cleanup is deferred until hci_release_dev(). */
2701:		hci_dev_put(hdev);
2702:	}
2703:	EXPORT_SYMBOL(hci_unregister_dev);
2704:	
2705:	/* Release HCI device */
2706:	void hci_release_dev(struct hci_dev *hdev)
2707:	{
2708:		debugfs_remove_recursive(hdev->debugfs);
2709:		kfree_const(hdev->hw_info);
2710:		kfree_const(hdev->fw_info);
2711:	
2712:		destroy_workqueue(hdev->workqueue);
2713:		destroy_workqueue(hdev->req_workqueue);
2714:	
2715:		hci_dev_lock(hdev);
2716:		hci_bdaddr_list_clear(&hdev->reject_list);
2717:		hci_bdaddr_list_clear(&hdev->accept_list);
2718:		hci_uuids_clear(hdev);
2719:		hci_link_keys_clear(hdev);
]

156/5 2026/08/27 21:06 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 15057
							output: 38
							thoughts: 52
						

Thoughts:
**Investigating `adv_monitors_idr` Usage**

Alright, let's dive in. I need to understand the call sites for `msft_release` and `idr_destroy` related to the `adv_monitors_idr` structure. This is a common debugging approach; pinpointing where these key functions are invoked will illuminate how this `idr` is managed. My initial instinct, based on the codebase, is to start with `hci_core.c`. Let's zero in on the lines around 2720, perhaps a bit further, to see if we can catch the relevant code. Time to dig in and see what's actually going on in there!



157/5 2026/08/27 21:06 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2720 LineCount:40]

Results:
map[Contents:2720:		hci_smp_ltks_clear(hdev);
2721:		hci_smp_irks_clear(hdev);
2722:		hci_remote_oob_data_clear(hdev);
2723:		hci_adv_instances_clear(hdev);
2724:		hci_adv_monitors_clear(hdev);
2725:		hci_bdaddr_list_clear(&hdev->le_accept_list);
2726:		hci_bdaddr_list_clear(&hdev->le_resolv_list);
2727:		hci_conn_params_clear_all(hdev);
2728:		hci_discovery_filter_clear(hdev);
2729:		hci_blocked_keys_clear(hdev);
2730:		hci_codec_list_clear(&hdev->local_codecs);
2731:		msft_release(hdev);
2732:		hci_dev_unlock(hdev);
2733:	
2734:		ida_destroy(&hdev->unset_handle_ida);
2735:		ida_free(&hci_index_ida, hdev->id);
2736:		kfree_skb(hdev->sent_cmd);
2737:		kfree_skb(hdev->req_skb);
2738:		kfree_skb(hdev->recv_event);
2739:		kfree(hdev);
2740:	}
2741:	EXPORT_SYMBOL(hci_release_dev);
2742:	
2743:	int hci_register_suspend_notifier(struct hci_dev *hdev)
2744:	{
2745:		int ret = 0;
2746:	
2747:		if (!hdev->suspend_notifier.notifier_call &&
2748:		    !hci_test_quirk(hdev, HCI_QUIRK_NO_SUSPEND_NOTIFIER)) {
2749:			hdev->suspend_notifier.notifier_call = hci_suspend_notifier;
2750:			ret = register_pm_notifier(&hdev->suspend_notifier);
2751:		}
2752:	
2753:		return ret;
2754:	}
2755:	
2756:	int hci_unregister_suspend_notifier(struct hci_dev *hdev)
2757:	{
2758:		int ret = 0;
2759:	
]

158/5 2026/08/27 21:06 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 15974
							output: 52
							thoughts: 51
						

Thoughts:
Okay, let's dive into this code.

**Investigating `msft_do_close` and the `msft` System**

Right, my immediate focus is understanding the call sites for `msft_do_close` and, by extension, how the `msft` system functions. I need to trace its usage to grasp its overall impact. So, the first logical step is to use a powerful reference-finding tool. `codesearch-find-references` or `grepper` – either will do – should provide a comprehensive list of every instance where `msft_do_close` is invoked. This will illuminate the context in which it operates. Knowing *where* it's called is crucial to understanding *why* it's called. This is the starting point for a deeper exploration of the `msft` system.



159/5 2026/08/27 21:07 tool codesearch-find-references
0m Args:
map[ContextFile:net/bluetooth/msft.c IncludeSnippetLines:10 Name:msft_do_close SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hci_dev_close_sync SourceFile:net/bluetooth/hci_sync.c SourceLine:5522 SourceSnippet:5512:		hci_pend_le_actions_clear(hdev);
5513:		hci_conn_hash_flush(hdev);
5514:		/* Prevent data races on hdev->smp_data or hdev->smp_bredr_data */
5515:		smp_unregister(hdev);
5516:		hci_dev_unlock(hdev);
5517:	
5518:		hci_sock_dev_event(hdev, HCI_DEV_DOWN);
5519:	
5520:		if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
5521:			aosp_do_close(hdev);
5522:			msft_do_close(hdev);
5523:		}
5524:	
5525:		if (hdev->flush)
5526:			hdev->flush(hdev);
5527:	
5528:		/* Reset device */
5529:		skb_queue_purge(&hdev->cmd_q);
5530:		atomic_set(&hdev->cmd_cnt, 1);
5531:		hdev->acl_cnt = 0;
5532:		hdev->sco_cnt = 0;
]] TruncatedOutput:false]

160/5 2026/08/27 21:07 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 16672
							output: 36
							thoughts: 40
						

Thoughts:
Here's my take on those thoughts:

**Analyzing the Microsoft Bluetooth Close Function**

Alright, let's dive in. I need to understand the behavior of this `msft_do_close` function. My instinct tells me that the implementation of a close function will be critical to understand how the driver handles device disconnection, resource release, and potentially error handling.

To get a handle on what's happening, I'll go straight to the source. Specifically, I need to check out the `net/bluetooth/msft.c` file. Given what I'm looking for, my guess is that the key operations and any cleanup routines within the function that is responsible for closing the device should be in the `680-720` line region. That should give me the core logic without getting bogged down in unrelated details. Time to get my eyes on that code.



161/5 2026/08/27 21:07 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:680 LineCount:40]

Results:
map[Contents: 680:		 * Therefore, remove handle_data mapping and reset monitor state.
 681:		 */
 682:		list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 683:			monitor = idr_find(&hdev->adv_monitors_idr,
 684:					   handle_data->mgmt_handle);
 685:	
 686:			if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED)
 687:				monitor->state = ADV_MONITOR_STATE_REGISTERED;
 688:	
 689:			list_del(&handle_data->list);
 690:			kfree(handle_data);
 691:		}
 692:	
 693:		mutex_lock(&msft->filter_lock);
 694:		list_for_each_entry_safe(address_filter, n, &msft->address_filters,
 695:					 list) {
 696:			list_del(&address_filter->list);
 697:			kfree(address_filter);
 698:		}
 699:		mutex_unlock(&msft->filter_lock);
 700:	
 701:		hci_dev_lock(hdev);
 702:	
 703:		/* Clear any devices that are being monitored and notify device lost */
 704:		hdev->advmon_pend_notify = false;
 705:		msft_monitor_device_del(hdev, 0, NULL, 0, true);
 706:	
 707:		hci_dev_unlock(hdev);
 708:	}
 709:	
 710:	static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
 711:	{
 712:		struct msft_monitor_addr_filter_data *address_filter = data;
 713:		struct msft_cp_le_cancel_monitor_advertisement cp;
 714:		struct msft_data *msft = hdev->msft_data;
 715:		struct sk_buff *skb;
 716:		int err = 0;
 717:	
 718:		if (!msft) {
 719:			bt_dev_err(hdev, "MSFT: msft data is freed");
]

162/5 2026/08/27 21:07 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 17595
							output: 36
							thoughts: 41
						

Thoughts:
Okay, let's dive into this. Here's how I'd approach this task, as if these were my internal thoughts:

**Analyzing the `msft_do_close` Function**

Alright, time to examine the `msft_do_close` function. It looks like understanding its initial setup is crucial. My first step is to zero in on a specific section of code to get a handle on the function's intended purpose. Specifically, I need to see what's happening at the start. Reading lines 660 to 680 of `net/bluetooth/msft.c` should give me a good picture of the context and any initial conditions. This will probably involve looking for initialization steps, resource cleanup, or maybe some key conditional checks. Getting the lay of the land quickly is always a good starting point.



163/5 2026/08/27 21:07 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:660 LineCount:25]

Results:
map[Contents: 660:			/* Monitors get removed on power off, so we need to explicitly
 661:			 * tell the controller to re-monitor.
 662:			 */
 663:			reregister_monitor(hdev);
 664:		}
 665:	}
 666:	
 667:	void msft_do_close(struct hci_dev *hdev)
 668:	{
 669:		struct msft_data *msft = hdev->msft_data;
 670:		struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
 671:		struct msft_monitor_addr_filter_data *address_filter, *n;
 672:		struct adv_monitor *monitor;
 673:	
 674:		if (!msft)
 675:			return;
 676:	
 677:		bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 678:	
 679:		/* The controller will silently remove all monitors on power off.
 680:		 * Therefore, remove handle_data mapping and reset monitor state.
 681:		 */
 682:		list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 683:			monitor = idr_find(&hdev->adv_monitors_idr,
 684:					   handle_data->mgmt_handle);
]

164/5 2026/08/27 21:07 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 18255
							output: 38
							thoughts: 131
						

Thoughts:
**Analyzing a Potential Race Condition**

Okay, let's break this down. I'm looking at `msft_do_close`. My immediate concern is the interaction with `hdev->adv_monitors_idr`, `msft->handle_map`, and `msft->filter_lock`. That's where things can get dicey. The question is, if `hdev->power_on` – which I know triggers `hci_power_on` – gets called *before* `idr_init(&hdev->adv_monitors_idr)` and `msft_register(hdev)` are properly set up, what's the possible fallout? It's a classic initialization race condition scenario. Let's trace it back. So `power_on` calls `hci_power_on()`. Alright, I'll need to check the definition of `hci_power_on` in `net/bluetooth/hci_core.c` and verify how this all interacts.



165/5 2026/08/27 21:07 tool codesearch-definition-source
0m Args:
map[ContextFile:net/bluetooth/hci_core.c Name:hci_power_on]

Results:
map[SourceCode: 904:	static void hci_power_on(struct work_struct *work)
 905:	{
 906:		struct hci_dev *hdev = container_of(work, struct hci_dev, power_on);
 907:		int err;
 908:	
 909:		BT_DBG("%s", hdev->name);
 910:	
 911:		if (test_bit(HCI_UP, &hdev->flags) &&
 912:		    hci_dev_test_flag(hdev, HCI_MGMT) &&
 913:		    hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF)) {
 914:			cancel_delayed_work(&hdev->power_off);
 915:			err = hci_powered_update_sync(hdev);
 916:			mgmt_power_on(hdev, err);
 917:			return;
 918:		}
 919:	
 920:		err = hci_dev_do_open(hdev);
 921:		if (err < 0) {
 922:			hci_dev_lock(hdev);
 923:			mgmt_set_powered_failed(hdev, err);
 924:			hci_dev_unlock(hdev);
 925:			return;
 926:		}
 927:	
 928:		/* During the HCI setup phase, a few error conditions are
 929:		 * ignored and they need to be checked now. If they are still
 930:		 * valid, it is important to turn the device back off.
 931:		 */
 932:		if (hci_dev_test_flag(hdev, HCI_RFKILLED) ||
 933:		    hci_dev_test_flag(hdev, HCI_UNCONFIGURED) ||
 934:		    (!bacmp(&hdev->bdaddr, BDADDR_ANY) &&
 935:		     !bacmp(&hdev->static_addr, BDADDR_ANY))) {
 936:			hci_dev_clear_flag(hdev, HCI_AUTO_OFF);
 937:			hci_dev_do_close(hdev);
 938:		} else if (hci_dev_test_flag(hdev, HCI_AUTO_OFF)) {
 939:			queue_delayed_work(hdev->req_workqueue, &hdev->power_off,
 940:					   HCI_AUTO_OFF_TIMEOUT);
 941:		}
 942:	
 943:		if (hci_dev_test_and_clear_flag(hdev, HCI_SETUP)) {
 944:			/* For unconfigured devices, set the HCI_RAW flag
 945:			 * so that userspace can easily identify them.
 946:			 */
 947:			if (hci_dev_test_flag(hdev, HCI_UNCONFIGURED))
 948:				set_bit(HCI_RAW, &hdev->flags);
 949:	
 950:			/* For fully configured devices, this will send
 951:			 * the Index Added event. For unconfigured devices,
 952:			 * it will send Unconfigued Index Added event.
 953:			 *
 954:			 * Devices with HCI_QUIRK_RAW_DEVICE are ignored
 955:			 * and no event will be send.
 956:			 */
 957:			mgmt_index_added(hdev);
 958:		} else if (hci_dev_test_and_clear_flag(hdev, HCI_CONFIG)) {
 959:			/* When the controller is now configured, then it
 960:			 * is important to clear the HCI_RAW flag.
 961:			 */
 962:			if (!hci_dev_test_flag(hdev, HCI_UNCONFIGURED))
 963:				clear_bit(HCI_RAW, &hdev->flags);
 964:	
 965:			/* Powering on the controller with HCI_CONFIG set only
 966:			 * happens with the transition from unconfigured to
 967:			 * configured. This will send the Index Added event.
 968:			 */
 969:			mgmt_index_added(hdev);
 970:		}
 971:	}
 SourceFile:net/bluetooth/hci_core.c]

166/5 2026/08/27 21:07 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 19819
							output: 35
							thoughts: 183
						

Thoughts:
**Analyzing the Device Registration Process**

Okay, let's break down this `hci_register_dev` function. First, I see the typical device registration and hold process with `hci_sock_dev_event` and `hci_dev_hold`. Then, there's the standard suspend notifier registration, with a warning if it fails. The power-on workqueue is queued. So far, so good, standard stuff.

Now, here's where it gets interesting: the `idr_init` call followed by `msft_register`. I need to understand the history of this. When were these lines added? I need to check the Git log for `hci_register_dev` to see the commit history and understand the context behind these additions. What functionality do `idr_init` and `msft_register` provide? Are these features specific to certain devices or part of a more general enhancement? The log should provide the answers, tracing back to the relevant commit messages and any associated discussions. That's my next step.



167/5 2026/08/27 21:08 tool git-log
0m Error:
log-in to see details

Args:
map[Count:5 PathPrefix:net/bluetooth/ SymbolName:hci_register_dev]

Results:
map[Output:]

168/5 2026/08/27 21:08 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 20279
							output: 40
							thoughts: 19
						

Thoughts:
Here's my take on those thoughts:

**Thinking Through Git Log and Symbols**

Okay, so I need to dig into the git history, specifically focusing on a `SymbolName` within a `SourcePath`. That's a classic situation where `git-log` is going to be my best friend. I'm immediately envisioning the command line, crafting a query that filters the log messages. I need to make sure I include those key pieces of information as arguments. I'm thinking I'll need some robust filtering options, maybe `--grep` to focus on the `SymbolName`, and I'll almost certainly need to specify the `SourcePath` somehow, probably with a file path specifier. I'll need to remember to check the output format, too, to make sure it's presenting the results in a way I can easily parse and process. I'll need to tailor it to be useful for the investigation. Let's get to work.



169/5 2026/08/27 21:08 tool git-log
0m Args:
map[Count:5 SourcePath:net/bluetooth/hci_core.c SymbolName:hci_register_dev]

Results:
map[Output:6851a0c228fc Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
84a4bb6548a2 Bluetooth: HCI: Remove HCI_AMP support
9c16d0c8d93e Bluetooth: Remove usage of the deprecated ida_simple_xx() API
dcda165706b9 Bluetooth: hci_core: Fix build warnings
0d75da38e060 Bluetooth: hci_core: fix error handling in hci_register_dev()
]

170/5 2026/08/27 21:08 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 20682
							output: 40
							thoughts: 44
						

Thoughts:
Okay, let's dive into this. I need to understand the context surrounding the addition of `idr_init(&hdev->adv_monitors_idr)` and `msft_register(hdev)` in `hci_core.c`. This strongly suggests a Microsoft-specific feature or interaction related to the Bluetooth host controller driver, given the `msft_register` call. The `idr_init` call suggests the initialization of an IDR (Integer Descriptor Region), so it is very likely used to manage a dynamically allocated resource of some kind related to the advanced monitor feature, perhaps to track some kind of monitoring session or registration within the Bluetooth system on Windows. So I need to go back in the commit history for this file, `hci_core.c`, to pinpoint when these were added. My immediate goal is to understand the *why* behind this implementation. What problem was being solved, and what other changes were introduced alongside this? Specifically, I'll be looking for any accompanying commit messages or code comments that provide more insight into the purpose of `hdev->adv_monitors_idr` and `msft_register`. I want to see if the IDR is tracking monitor sessions, which is my strongest hypothesis.



171/5 2026/08/27 21:08 tool git-log
10m Error:
log-in to see details

Args:
map[CodeRegexp:msft_register Count:5 SourcePath:net/bluetooth/hci_core.c]

Results:
map[Output:]

172/5 2026/08/27 21:18 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 21061
							output: 39
							thoughts: 34
						

Thoughts:
Okay, here's my interpretation of that thought process, as if it were my own:

**Investigating a Bluetooth HCI Issue**

Right, time to dig into this Bluetooth HCI core code. I need to understand what's happening around lines 2625-2640 of `net/bluetooth/hci_core.c`. My first instinct, given my experience, is to reach for `git blame`. It's the most efficient way to see *who* last touched this section and *why*. Understanding the recent history of this code is crucial. It gives me immediate context – who was working on it, what changes were made, and perhaps, the rationale behind those changes. That information will hopefully point me toward the root cause of the issue I'm dealing with. Let's see what the blame tool reveals.



173/5 2026/08/27 21:19 tool git-blame
0m Args:
map[End:2640 File:net/bluetooth/hci_core.c Start:2625]

Results:
map[Output:05fcd4c4f1011 2625) 	hci_sock_dev_event(hdev, HCI_DEV_REG);
dc946bd86f725 2626) 	hci_dev_hold(hdev);
^1da177e4c3f4 2627) 
9111786492f13 2628) 	error = hci_register_suspend_notifier(hdev);
9111786492f13 2629) 	if (error)
0d75da38e060d 2630) 		BT_WARN("register suspend notifier failed error:%d\n", error);
9952d90ea2885 2631) 
1920257316615 2632) 	queue_work(hdev->req_workqueue, &hdev->power_on);
fbe96d6ff9f4e 2633) 
e5e1e7fd470cc 2634) 	idr_init(&hdev->adv_monitors_idr);
5031ffcc79b81 2635) 	msft_register(hdev);
e5e1e7fd470cc 2636) 
^1da177e4c3f4 2637) 	return id;
f48fd9c8cd746 2638) 
33ca954daf1ac 2639) err_wqueue:
5a4bb6a8e981d 2640) 	debugfs_remove_recursive(hdev->debugfs);
]

174/5 2026/08/27 21:19 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 21771
							output: 26
							thoughts: 161
						

Thoughts:
**Analyzing Recent Driver Initialization Changes**

Okay, so I'm looking at this sequence of events in the driver initialization. Interesting. First, I see that this job, `1920257316615`, queued a `power_on` work. Standard stuff, that's expected.

Then, commit `e5e1e7fd470cc` adds `idr_init(&hdev->adv_monitors_idr)` within `hci_register_dev()`. Right, initializing the IDR for advanced monitor management, makes sense given the context of what else is being initialized. This seems related to resource tracking. I'll need to remember that.

And *then*, commit `5031ffcc79b81` jumps in and adds `msft_register(hdev)` right after the `queue_work(hdev->req_workqueue, &hdev->power_on)` call. Now *that's* the key. It looks like the Microsoft-specific registration is occurring immediately after the power-on work is queued. That might be a potential issue if `msft_register` requires the device to be at least partially powered on. Or it might be fine, but the order of operations warrants further investigation. I'm going to have to dive into those two commits – `5031ffcc79b81` and `e5e1e7fd470cc` specifically – to understand the potential dependencies and if that ordering is intended, and if any synchronization or error handling has been considered. I need to understand why that call is there, and why it is placed where it is.



175/5 2026/08/27 21:19 tool git-show
0m Args:
map[Commit:5031ffcc79b81]

Results:
map[Output:commit 5031ffcc79b81776ac8f7f8b1a585aed8818e3d1
Author: Miao-chen Chou <mcchou@chromium.org>
Date:   Thu Sep 9 14:10:23 2021 -0700

    Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle
    
    This splits the msft_do_{open/close} to msft_do_{open/close} and
    msft_{register/unregister}. With this change it is possible to retain
    the MSFT extension info irrespective of controller power on/off state.
    This helps bluetoothd to report correct 'supported features' of the
    controller to the D-Bus clients event if the controller is off. It also
    re-reads the MSFT info upon every msft_do_open().
    
    The following test steps were performed.
    1. Boot the test device and verify the MSFT support debug log in syslog.
    2. Power off the controller and read the 'supported features', power on
       and read again.
    3. Restart the bluetoothd and verify the 'supported features' value.
    
    Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
    Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
    Reviewed-by: Archie Pusaka <apusaka@chromium.org>
    Reviewed-by: Alain Michaud <alainm@chromium.org>
    Signed-off-by: Manish Mandlik <mmandlik@google.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5236faa397fa..beda5dac1658 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3990,6 +3990,7 @@ int hci_register_dev(struct hci_dev *hdev)
 	queue_work(hdev->req_workqueue, &hdev->power_on);
 
 	idr_init(&hdev->adv_monitors_idr);
+	msft_register(hdev);
 
 	return id;
 
@@ -4022,6 +4023,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
 		cancel_work_sync(&hdev->suspend_prepare);
 	}
 
+	msft_unregister(hdev);
+
 	hci_dev_do_close(hdev);
 
 	if (!test_bit(HCI_INIT, &hdev->flags) &&
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index b4bfae41e8a5..21b1787e7893 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -184,28 +184,36 @@ static void reregister_monitor_on_restart(struct hci_dev *hdev, int handle)
 
 void msft_do_open(struct hci_dev *hdev)
 {
-	struct msft_data *msft;
+	struct msft_data *msft = hdev->msft_data;
 
 	if (hdev->msft_opcode == HCI_OP_NOP)
 		return;
 
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT extension not registered");
+		return;
+	}
+
 	bt_dev_dbg(hdev, "Initialize MSFT extension");
 
-	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
-	if (!msft)
-		return;
+	/* Reset existing MSFT data before re-reading */
+	kfree(msft->evt_prefix);
+	msft->evt_prefix = NULL;
+	msft->evt_prefix_len = 0;
+	msft->features = 0;
 
 	if (!read_supported_features(hdev, msft)) {
+		hdev->msft_data = NULL;
 		kfree(msft);
 		return;
 	}
 
-	INIT_LIST_HEAD(&msft->handle_map);
-	hdev->msft_data = msft;
-
 	if (msft_monitor_supported(hdev)) {
 		msft->reregistering = true;
 		msft_set_filter_enable(hdev, true);
+		/* Monitors get removed on power off, so we need to explicitly
+		 * tell the controller to re-monitor.
+		 */
 		reregister_monitor_on_restart(hdev, 0);
 	}
 }
@@ -221,8 +229,9 @@ void msft_do_close(struct hci_dev *hdev)
 
 	bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 
-	hdev->msft_data = NULL;
-
+	/* The controller will silently remove all monitors on power off.
+	 * Therefore, remove handle_data mapping and reset monitor state.
+	 */
 	list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 		monitor = idr_find(&hdev->adv_monitors_idr,
 				   handle_data->mgmt_handle);
@@ -233,6 +242,34 @@ void msft_do_close(struct hci_dev *hdev)
 		list_del(&handle_data->list);
 		kfree(handle_data);
 	}
+}
+
+void msft_register(struct hci_dev *hdev)
+{
+	struct msft_data *msft = NULL;
+
+	bt_dev_dbg(hdev, "Register MSFT extension");
+
+	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
+	if (!msft) {
+		bt_dev_err(hdev, "Failed to register MSFT extension");
+		return;
+	}
+
+	INIT_LIST_HEAD(&msft->handle_map);
+	hdev->msft_data = msft;
+}
+
+void msft_unregister(struct hci_dev *hdev)
+{
+	struct msft_data *msft = hdev->msft_data;
+
+	if (!msft)
+		return;
+
+	bt_dev_dbg(hdev, "Unregister MSFT extension");
+
+	hdev->msft_data = NULL;
 
 	kfree(msft->evt_prefix);
 	kfree(msft);
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 6e56d94b88d8..8018948c5975 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -13,6 +13,8 @@
 #if IS_ENABLED(CONFIG_BT_MSFTEXT)
 
 bool msft_monitor_supported(struct hci_dev *hdev);
+void msft_register(struct hci_dev *hdev);
+void msft_unregister(struct hci_dev *hdev);
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb);
@@ -31,6 +33,8 @@ static inline bool msft_monitor_supported(struct hci_dev *hdev)
 	return false;
 }
 
+static inline void msft_register(struct hci_dev *hdev) {}
+static inline void msft_unregister(struct hci_dev *hdev) {}
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb) {}
]

176/5 2026/08/27 21:19 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 24414
							output: 28
							thoughts: 53
						

Thoughts:
**Investigating the Evolution of `msft_unregister` and the Emergence of `msft_release`**

Okay, so I need to understand the relationship between `msft_unregister` and the newer `msft_release` function. What led to this change? I'll start by tracing the history. My first thought is to dive into the code and search. Let's start with `net/bluetooth/msft.c`. I'll look for instances of `msft_release` directly, but I should also check the commit history within that file. That should give me a chronological view of the changes, showing how `msft_release` came into being, and hopefully illuminate why the older `msft_unregister` was superseded, or if it was? I'm curious to see the rationale behind the change. Time to dig in!



177/5 2026/08/27 21:19 tool git-log
0m Args:
map[Count:5 PathPrefix:net/bluetooth/msft.c]

Results:
map[Output:384a4b2fef9f Bluetooth: MGMT: Fix adv monitor add failure cleanup
bf4afc53b77a Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
69050f8d6d07 treewide: Replace kmalloc with kmalloc_obj for non-scalar types
6851a0c228fc Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
936daee9cf08 Bluetooth: Remove hci_request.{c,h}
]

178/5 2026/08/27 21:19 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 24823
							output: 36
							thoughts: 24
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience, and written as if they were my own:

**Diving into the `msft_release` Implementation**

Alright, time to get to the heart of this. My initial thought process has me focusing on `msft_release`. I know it's a critical function, especially in the context of the Microsoft-specific Bluetooth handling. I want to see precisely how it's implemented within `net/bluetooth/msft.c`. I need a clear understanding of its operation to properly assess the overall architecture. I'm looking for the nitty-gritty details; how it interacts with other data structures, what resources it's cleaning up, and if there are any subtle race conditions or memory management issues I might need to consider. I'm basically going to dissect the code and look for anything that might impact system stability, security, or overall performance when interacting with Microsoft devices. This is where the devil is always in the details!



179/5 2026/08/27 21:19 tool codesearch-definition-source
0m Args:
map[ContextFile:net/bluetooth/msft.c Name:msft_release]

Results:
map[SourceCode: 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
 779:	
 780:		hdev->msft_data = NULL;
 781:	
 782:		kfree(msft->evt_prefix);
 783:		mutex_destroy(&msft->filter_lock);
 784:		kfree(msft);
 785:	}
 SourceFile:net/bluetooth/msft.c]

180/5 2026/08/27 21:19 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 25324
							output: 30
							thoughts: 82
						

Thoughts:
**Investigating Potential Errors in HCI Device Registration and Monitor Cleanup**

Okay, so I'm looking into the error handling and cleanup procedures surrounding the `hci_register_dev` function. Specifically, I'm trying to understand what happens if that function fails. My immediate concern is how `adv_monitors_idr` and `msft_data` are managed in such a scenario. I need to ensure they're properly cleaned up, so that there aren't any memory leaks or resource issues.

Wait a minute, let me take a step back and examine the lifecycle of `adv_monitors_idr`. That's the core of the issue, right? I need to know where it's initialized, used, and, crucially, destroyed. I'm going to start by confirming where `idr_destroy` is called for `adv_monitors_idr`, as that will tell the complete picture of the whole lifecycle and if there are any potential gaps that need further attention.

Let me do a quick grep for `adv_monitors_idr` throughout the codebase, in order to get all callsites in context.



181/5 2026/08/27 21:19 tool grepper
0m Args:
map[Expression:adv_monitors_idr PathPrefix:net/bluetooth]

Results:
map[Output:net/bluetooth/hci_core.c=1841=void hci_adv_monitors_clear(struct hci_dev *hdev)
--
net/bluetooth/hci_core.c-1845-
net/bluetooth/hci_core.c:1846:	idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle)
net/bluetooth/hci_core.c-1847-		hci_free_adv_monitor(hdev, monitor);
net/bluetooth/hci_core.c-1848-
net/bluetooth/hci_core.c:1849:	idr_destroy(&hdev->adv_monitors_idr);
net/bluetooth/hci_core.c-1850-}
--
net/bluetooth/hci_core.c=1855=void hci_free_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor)
--
net/bluetooth/hci_core.c-1868-	if (monitor->handle)
net/bluetooth/hci_core.c:1869:		idr_remove(&hdev->adv_monitors_idr, monitor->handle);
net/bluetooth/hci_core.c-1870-
--
net/bluetooth/hci_core.c=1881=int hci_add_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor)
--
net/bluetooth/hci_core.c-1892-	max = HCI_MIN_ADV_MONITOR_HANDLE + HCI_MAX_ADV_MONITOR_NUM_HANDLES;
net/bluetooth/hci_core.c:1893:	handle = idr_alloc(&hdev->adv_monitors_idr, monitor, min, max,
net/bluetooth/hci_core.c-1894-			   GFP_KERNEL);
--
net/bluetooth/hci_core.c=1963=int hci_remove_single_adv_monitor(struct hci_dev *hdev, u16 handle)
net/bluetooth/hci_core.c-1964-{
net/bluetooth/hci_core.c:1965:	struct adv_monitor *monitor = idr_find(&hdev->adv_monitors_idr, handle);
net/bluetooth/hci_core.c-1966-
--
net/bluetooth/hci_core.c=1974=int hci_remove_all_adv_monitor(struct hci_dev *hdev)
--
net/bluetooth/hci_core.c-1980-	while (1) {
net/bluetooth/hci_core.c:1981:		monitor = idr_get_next(&hdev->adv_monitors_idr, &idr_next_id);
net/bluetooth/hci_core.c-1982-		if (!monitor)
--
net/bluetooth/hci_core.c=1996=bool hci_is_adv_monitoring(struct hci_dev *hdev)
net/bluetooth/hci_core.c-1997-{
net/bluetooth/hci_core.c:1998:	return !idr_is_empty(&hdev->adv_monitors_idr);
net/bluetooth/hci_core.c-1999-}
--
net/bluetooth/hci_core.c=2545=int hci_register_dev(struct hci_dev *hdev)
--
net/bluetooth/hci_core.c-2633-
net/bluetooth/hci_core.c:2634:	idr_init(&hdev->adv_monitors_idr);
net/bluetooth/hci_core.c-2635-	msft_register(hdev);
--
net/bluetooth/hci_event.c=6174=static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
--
net/bluetooth/hci_event.c-6300-					       bdaddr, bdaddr_type) &&
net/bluetooth/hci_event.c:6301:		    idr_is_empty(&hdev->adv_monitors_idr))
net/bluetooth/hci_event.c-6302-			return;
--
net/bluetooth/hci_sync.c=2840=static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
--
net/bluetooth/hci_sync.c-2994-	 */
net/bluetooth/hci_sync.c:2995:	if (!idr_is_empty(&hdev->adv_monitors_idr) && !hdev->suspended &&
net/bluetooth/hci_sync.c-2996-	    hci_get_adv_monitor_offload_ext(hdev) == HCI_ADV_MONITOR_EXT_NONE &&
--
net/bluetooth/mgmt.c=5362=static int read_adv_mon_features(struct sock *sk, struct hci_dev *hdev,
--
net/bluetooth/mgmt.c-5380-
net/bluetooth/mgmt.c:5381:	idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle)
net/bluetooth/mgmt.c-5382-		handles[num_handles++] = monitor->handle;
--
net/bluetooth/msft.c=449=int msft_suspend_sync(struct hci_dev *hdev)
--
net/bluetooth/msft.c-460-	while (1) {
net/bluetooth/msft.c:461:		monitor = idr_get_next(&hdev->adv_monitors_idr, &handle);
net/bluetooth/msft.c-462-		if (!monitor)
--
net/bluetooth/msft.c=582=static void reregister_monitor(struct hci_dev *hdev)
--
net/bluetooth/msft.c-593-	while (1) {
net/bluetooth/msft.c:594:		monitor = idr_get_next(&hdev->adv_monitors_idr, &handle);
net/bluetooth/msft.c-595-		if (!monitor)
--
net/bluetooth/msft.c=667=void msft_do_close(struct hci_dev *hdev)
--
net/bluetooth/msft.c-682-	list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
net/bluetooth/msft.c:683:		monitor = idr_find(&hdev->adv_monitors_idr,
net/bluetooth/msft.c-684-				   handle_data->mgmt_handle);
]

182/5 2026/08/27 21:19 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 27360
							output: 38
							thoughts: 136
						

Thoughts:
**My Line of Reasoning**

Okay, so I'm looking at this code and I see `idr_destroy(&hdev->adv_monitors_idr)` in `hci_adv_monitors_clear`. Right, and that's called from `hci_release_dev()`. And, as I recall, `msft_release(hdev)` is *also* called from `hci_release_dev()`. So far, so good – standard cleanup stuff.

But wait a minute… I need to confirm something. Where *exactly* is `adv_monitors_idr` initialized? I'm pretty sure it's in `hci_register_dev()`, right? Okay, so it’s registered as part of device setup.

But why isn't it initialized in `hci_alloc_dev_priv`? Wouldn't that be a more logical place? It's where the device private data is set up... something seems slightly off there.

Alright, time to pull up `hci_alloc_dev_priv`. I need to double-check that this is how things are structured. Let's head over to `net/bluetooth/hci_core.c` and take a look at the code. This is a potential bug I need to confirm.



183/5 2026/08/27 21:20 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2450 LineCount:60]

Results:
map[Contents:2450:		hdev->le_conn_min_interval = 0x0018;
2451:		hdev->le_conn_max_interval = 0x0028;
2452:		hdev->le_conn_latency = 0x0000;
2453:		hdev->le_supv_timeout = 0x002a;
2454:		hdev->le_def_tx_len = 0x001b;
2455:		hdev->le_def_tx_time = 0x0148;
2456:		hdev->le_max_tx_len = 0x001b;
2457:		hdev->le_max_tx_time = 0x0148;
2458:		hdev->le_max_rx_len = 0x001b;
2459:		hdev->le_max_rx_time = 0x0148;
2460:		hdev->le_max_key_size = SMP_MAX_ENC_KEY_SIZE;
2461:		hdev->le_min_key_size = SMP_MIN_ENC_KEY_SIZE;
2462:		hdev->le_tx_def_phys = HCI_LE_SET_PHY_1M;
2463:		hdev->le_rx_def_phys = HCI_LE_SET_PHY_1M;
2464:		hdev->le_num_of_adv_sets = HCI_MAX_ADV_INSTANCES;
2465:		hdev->def_multi_adv_rotation_duration = HCI_DEFAULT_ADV_DURATION;
2466:		hdev->def_le_autoconnect_timeout = HCI_LE_CONN_TIMEOUT;
2467:		hdev->min_le_tx_power = HCI_TX_POWER_INVALID;
2468:		hdev->max_le_tx_power = HCI_TX_POWER_INVALID;
2469:	
2470:		hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT;
2471:		hdev->discov_interleaved_timeout = DISCOV_INTERLEAVED_TIMEOUT;
2472:		hdev->conn_info_min_age = DEFAULT_CONN_INFO_MIN_AGE;
2473:		hdev->conn_info_max_age = DEFAULT_CONN_INFO_MAX_AGE;
2474:		hdev->auth_payload_timeout = DEFAULT_AUTH_PAYLOAD_TIMEOUT;
2475:		hdev->min_enc_key_size = HCI_MIN_ENC_KEY_SIZE;
2476:	
2477:		/* default 1.28 sec page scan */
2478:		hdev->def_page_scan_type = PAGE_SCAN_TYPE_STANDARD;
2479:		hdev->def_page_scan_int = 0x0800;
2480:		hdev->def_page_scan_window = 0x0012;
2481:	
2482:		mutex_init(&hdev->lock);
2483:		mutex_init(&hdev->req_lock);
2484:		mutex_init(&hdev->mgmt_pending_lock);
2485:	
2486:		ida_init(&hdev->unset_handle_ida);
2487:	
2488:		INIT_LIST_HEAD(&hdev->mesh_pending);
2489:		INIT_LIST_HEAD(&hdev->mgmt_pending);
2490:		INIT_LIST_HEAD(&hdev->reject_list);
2491:		INIT_LIST_HEAD(&hdev->accept_list);
2492:		INIT_LIST_HEAD(&hdev->uuids);
2493:		INIT_LIST_HEAD(&hdev->link_keys);
2494:		INIT_LIST_HEAD(&hdev->long_term_keys);
2495:		INIT_LIST_HEAD(&hdev->identity_resolving_keys);
2496:		INIT_LIST_HEAD(&hdev->remote_oob_data);
2497:		INIT_LIST_HEAD(&hdev->le_accept_list);
2498:		INIT_LIST_HEAD(&hdev->le_resolv_list);
2499:		INIT_LIST_HEAD(&hdev->le_conn_params);
2500:		INIT_LIST_HEAD(&hdev->pend_le_conns);
2501:		INIT_LIST_HEAD(&hdev->pend_le_reports);
2502:		INIT_LIST_HEAD(&hdev->conn_hash.list);
2503:		INIT_LIST_HEAD(&hdev->adv_instances);
2504:		INIT_LIST_HEAD(&hdev->blocked_keys);
2505:		INIT_LIST_HEAD(&hdev->monitored_devices);
2506:	
2507:		INIT_LIST_HEAD(&hdev->local_codecs);
2508:		INIT_WORK(&hdev->rx_work, hci_rx_work);
2509:		INIT_WORK(&hdev->cmd_work, hci_cmd_work);
]

184/5 2026/08/27 21:20 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 29156
							output: 49
							thoughts: 2081
						

Thoughts:
**Race Condition Analysis and Patch Assessment**

Okay, let's break this down. My initial thought was to review the initialization sequence in `hci_alloc_dev_priv`, but then I realized the critical initialization for the `adv_monitors_idr` and the `msft` data, happened in `hci_register_dev`. This made me question the original order: why weren't these crucial initializations done earlier, *before* queuing the work?

Specifically, in `hci_register_dev`, after the initial device event, hold, and suspend notifier registration, we have:

```c
	idr_init(&hdev->adv_monitors_idr);
	msft_register(hdev);
	queue_work(hdev->req_workqueue, &hdev->power_on);
	return id;
```

The key issue is `queue_work`. This schedules `hdev->power_on`, which, depending on the device's state (particularly if `HCI_UNCONFIGURED` or `HCI_QUIRK_RAW_DEVICE` is set), can lead to an early call to `hci_dev_do_close` which triggers `msft_do_close`.

Inside `msft_do_close`, we have:

```c
void msft_do_close(struct hci_dev *hdev)
{
	struct msft_data *msft = hdev->msft_data;
...
	if (!msft)
		return;
...
	mutex_lock(&msft->filter_lock);
```

The race is clear: Thread 1 (the `hci_register_dev` thread) queues the work, but Thread 2 (the workqueue) potentially starts executing `hci_power_on` before `msft` is *fully* initialized. `msft_register` does this:

```c
void msft_register(struct hci_dev *hdev)
{
...
	msft = kzalloc_obj(*msft);
	if (!msft) {
		bt_dev_err(hdev, "Failed to register MSFT extension");
		return;
	}

	INIT_LIST_HEAD(&msft->handle_map);
	INIT_LIST_HEAD(&msft->address_filters);
	hdev->msft_data = msft;
	mutex_init(&msft->filter_lock);
}
```

Thread 1 *writes* `hdev->msft_data = msft;`, but Thread 2 *reads* it before the `mutex_init` is called, meaning `msft->filter_lock` is uninitialized. This leads to the `DEBUG_LOCKS_WARN_ON` trigger due to accessing an uninitialized mutex. Additionally, if the workqueue thread executed even *earlier*, it could touch the uninitialized `adv_monitors_idr`.

Now, looking at the patch, it cleverly reorders the operations. The changes are straightforward. In `hci_register_dev`, it moves the `queue_work` *after* the initializations:

```c
	idr_init(&hdev->adv_monitors_idr);
	msft_register(hdev);
	queue_work(hdev->req_workqueue, &hdev->power_on);
```

And critically, inside `msft_register`:

```c
	INIT_LIST_HEAD(&msft->handle_map);
	INIT_LIST_HEAD(&msft->address_filters);
	mutex_init(&msft->filter_lock);
	hdev->msft_data = msft;
```

This *guarantees* that `adv_monitors_idr` and `msft_data` are properly initialized before the asynchronous work is scheduled. The `hdev->msft_data = msft;` assignment, which publishes the data, is now *after* `mutex_init`.

This adheres to kernel guidelines.  Specifically:

1.  We have moved the initialization of critical data *before* the asynchronous work is started.
2.  Inside `msft_register`, we have fully initialized `struct msft_data` (including `mutex_init`) before the pointer `hdev->msft_data = msft;` is published.

I note that the patch *doesn't* add explicit null checks or sentinels in `msft_do_close` to account for this potential race, *because the race is now eliminated*. Instead, the fix relies on enforcing the correct initialization order to prevent the race from occurring in the first place.


185/5 2026/08/27 21:20 tool codesearch-find-references
0m Args:
map[ContextFile:net/bluetooth/msft.c IncludeSnippetLines:5 Name:msft_register SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hci_register_dev SourceFile:net/bluetooth/hci_core.c SourceLine:2635 SourceSnippet:2630:			BT_WARN("register suspend notifier failed error:%d\n", error);
2631:	
2632:		queue_work(hdev->req_workqueue, &hdev->power_on);
2633:	
2634:		idr_init(&hdev->adv_monitors_idr);
2635:		msft_register(hdev);
2636:	
2637:		return id;
2638:	
2639:	err_wqueue:
2640:		debugfs_remove_recursive(hdev->debugfs);
]] TruncatedOutput:false]

186/5 2026/08/27 21:20 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 32547
							output: 49
							thoughts: 12
						

Thoughts:
Here's my take on those thoughts:

**Checking `msft_release` References**

Alright, time to get down to brass tacks. I need to make sure I haven't overlooked any instances where I'm referencing this `msft_release` object or variable. It's crucial for maintaining code clarity and avoiding unexpected behavior, especially in a project of this scale. I'll need to go beyond a simple search, though; I should keep an eye out for how it's being *used*. Are there any assignments? Are there any indirect dependencies? What kinds of operations are being performed on it? Are there any potential naming collisions, even subtle ones? I want to confirm that all of its uses are consistent, intentional, and documented. This includes scrutinizing any external libraries or modules that might interact with it. No stone unturned.



187/5 2026/08/27 21:20 tool codesearch-find-references
0m Args:
map[ContextFile:net/bluetooth/msft.c IncludeSnippetLines:5 Name:msft_release SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hci_release_dev SourceFile:net/bluetooth/hci_core.c SourceLine:2731 SourceSnippet:2726:		hci_bdaddr_list_clear(&hdev->le_resolv_list);
2727:		hci_conn_params_clear_all(hdev);
2728:		hci_discovery_filter_clear(hdev);
2729:		hci_blocked_keys_clear(hdev);
2730:		hci_codec_list_clear(&hdev->local_codecs);
2731:		msft_release(hdev);
2732:		hci_dev_unlock(hdev);
2733:	
2734:		ida_destroy(&hdev->unset_handle_ida);
2735:		ida_free(&hci_index_ida, hdev->id);
2736:		kfree_skb(hdev->sent_cmd);
]] TruncatedOutput:false]

188/5 2026/08/27 21:20 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 33070
							output: 56
							thoughts: 22
						

Thoughts:
**Checking for `msft_data` Usage in `net/bluetooth`**

Okay, so I need to see if `msft_data` is used anywhere else within the `net/bluetooth` directory. It's a pretty straightforward task. I'll need to use some form of search tool – likely `grep` or a similar utility – and specify the directory and the search term. I need to be precise, though. I want to make sure I don't accidentally pick up false positives. I might need to refine the search parameters to be more targeted, like searching for the exact variable name or function call where `msft_data` might be used. I should also consider how the code is structured in that area. Are there specific modules or files where it's more likely to appear? Knowing the general architecture will help me focus my search and speed things up. Let's get started.



189/5 2026/08/27 21:20 tool codesearch-find-references
0m Args:
map[ContextFile:include/net/bluetooth/hci_core.h IncludeSnippetLines:5 Name:hci_dev::msft_data SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_add_address_filter SourceFile:net/bluetooth/msft.c SourceLine:932 SourceSnippet: 927:	static struct msft_monitor_addr_filter_data *msft_add_address_filter
 928:			(struct hci_dev *hdev, u8 addr_type, bdaddr_t *bdaddr,
 929:			 struct msft_monitor_advertisement_handle_data *handle_data)
 930:	{
 931:		struct msft_monitor_addr_filter_data *address_filter = NULL;
 932:		struct msft_data *msft = hdev->msft_data;
 933:		int err;
 934:	
 935:		address_filter = kzalloc_obj(*address_filter);
 936:		if (!address_filter)
 937:			return NULL;
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_add_address_filter_sync SourceFile:net/bluetooth/msft.c SourceLine:838 SourceSnippet: 833:	static int msft_add_address_filter_sync(struct hci_dev *hdev, void *data)
 834:	{
 835:		struct msft_monitor_addr_filter_data *address_filter = data;
 836:		struct msft_rp_le_monitor_advertisement *rp;
 837:		struct msft_cp_le_monitor_advertisement *cp;
 838:		struct msft_data *msft = hdev->msft_data;
 839:		struct sk_buff *skb = NULL;
 840:		bool remove = false;
 841:		size_t size;
 842:	
 843:		if (!msft) {
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_add_monitor_pattern SourceFile:net/bluetooth/msft.c SourceLine:1154 SourceSnippet:1151:	/* This function requires the caller holds hci_req_sync_lock */
1152:	int msft_add_monitor_pattern(struct hci_dev *hdev, struct adv_monitor *monitor)
1153:	{
1154:		struct msft_data *msft = hdev->msft_data;
1155:	
1156:		if (!msft)
1157:			return -EOPNOTSUPP;
1158:	
1159:		if (msft->resuming || msft->suspending)
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_cancel_address_filter_sync SourceFile:net/bluetooth/msft.c SourceLine:714 SourceSnippet: 710:	static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
 711:	{
 712:		struct msft_monitor_addr_filter_data *address_filter = data;
 713:		struct msft_cp_le_cancel_monitor_advertisement cp;
 714:		struct msft_data *msft = hdev->msft_data;
 715:		struct sk_buff *skb;
 716:		int err = 0;
 717:	
 718:		if (!msft) {
 719:			bt_dev_err(hdev, "MSFT: msft data is freed");
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_do_close SourceFile:net/bluetooth/msft.c SourceLine:669 SourceSnippet: 667:	void msft_do_close(struct hci_dev *hdev)
 668:	{
 669:		struct msft_data *msft = hdev->msft_data;
 670:		struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
 671:		struct msft_monitor_addr_filter_data *address_filter, *n;
 672:		struct adv_monitor *monitor;
 673:	
 674:		if (!msft)
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_do_open SourceFile:net/bluetooth/msft.c SourceLine:633 SourceSnippet: 630:	/* This function requires the caller holds hci_req_sync_lock */
 631:	void msft_do_open(struct hci_dev *hdev)
 632:	{
 633:		struct msft_data *msft = hdev->msft_data;
 634:	
 635:		if (hdev->msft_opcode == HCI_OP_NOP)
 636:			return;
 637:	
 638:		if (!msft) {
] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:msft_do_open SourceFile:net/bluetooth/msft.c SourceLine:652 SourceSnippet: 647:		msft->evt_prefix = NULL;
 648:		msft->evt_prefix_len = 0;
 649:		msft->features = 0;
 650:	
 651:		if (!read_supported_features(hdev, msft)) {
 652:			hdev->msft_data = NULL;
 653:			kfree(msft);
 654:			return;
 655:		}
 656:	
 657:		if (msft_monitor_supported(hdev)) {
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_find_address_data SourceFile:net/bluetooth/msft.c SourceLine:215 SourceSnippet: 210:	static struct msft_monitor_addr_filter_data *msft_find_address_data
 211:				(struct hci_dev *hdev, u8 addr_type, bdaddr_t *addr,
 212:				 u8 pattern_handle)
 213:	{
 214:		struct msft_monitor_addr_filter_data *entry;
 215:		struct msft_data *msft = hdev->msft_data;
 216:	
 217:		list_for_each_entry(entry, &msft->address_filters, list) {
 218:			if (entry->pattern_handle == pattern_handle &&
 219:			    addr_type == entry->addr_type &&
 220:			    !bacmp(addr, &entry->bdaddr))
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_find_handle_data SourceFile:net/bluetooth/msft.c SourceLine:197 SourceSnippet: 192:	 */
 193:	static struct msft_monitor_advertisement_handle_data *msft_find_handle_data
 194:					(struct hci_dev *hdev, u16 handle, bool is_mgmt)
 195:	{
 196:		struct msft_monitor_advertisement_handle_data *entry;
 197:		struct msft_data *msft = hdev->msft_data;
 198:	
 199:		list_for_each_entry(entry, &msft->handle_map, list) {
 200:			if (is_mgmt && entry->mgmt_handle == handle)
 201:				return entry;
 202:			if (!is_mgmt && entry->msft_handle == handle)
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_get_features SourceFile:net/bluetooth/msft.c SourceLine:1118 SourceSnippet:1116:	__u64 msft_get_features(struct hci_dev *hdev)
1117:	{
1118:		struct msft_data *msft = hdev->msft_data;
1119:	
1120:		return msft ? msft->features : 0;
1121:	}
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_le_cancel_monitor_advertisement_cb SourceFile:net/bluetooth/msft.c SourceLine:373 SourceSnippet: 368:							   struct adv_monitor *monitor,
 369:							   struct sk_buff *skb)
 370:	{
 371:		struct msft_rp_le_cancel_monitor_advertisement *rp;
 372:		struct msft_monitor_advertisement_handle_data *handle_data;
 373:		struct msft_data *msft = hdev->msft_data;
 374:		int status = 0;
 375:		u8 msft_handle;
 376:	
 377:		rp = (struct msft_rp_le_cancel_monitor_advertisement *)skb->data;
 378:		if (skb->len < sizeof(*rp)) {
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_le_monitor_advertisement_cb SourceFile:net/bluetooth/msft.c SourceLine:264 SourceSnippet: 259:						    struct adv_monitor *monitor,
 260:						    struct sk_buff *skb)
 261:	{
 262:		struct msft_rp_le_monitor_advertisement *rp;
 263:		struct msft_monitor_advertisement_handle_data *handle_data;
 264:		struct msft_data *msft = hdev->msft_data;
 265:		int status = 0;
 266:	
 267:		hci_dev_lock(hdev);
 268:	
 269:		rp = (struct msft_rp_le_monitor_advertisement *)skb->data;
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_le_set_advertisement_filter_enable_cb SourceFile:net/bluetooth/msft.c SourceLine:1128 SourceSnippet:1123:	static void msft_le_set_advertisement_filter_enable_cb(struct hci_dev *hdev,
1124:							       void *user_data,
1125:							       u8 status)
1126:	{
1127:		struct msft_cp_le_set_advertisement_filter_enable *cp = user_data;
1128:		struct msft_data *msft = hdev->msft_data;
1129:	
1130:		/* Error 0x0C would be returned if the filter enabled status is
1131:		 * already set to whatever we were trying to set.
1132:		 * Although the default state should be disabled, some controller set
1133:		 * the initial value to enabled. Because there is no way to know the
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_monitor_device_evt SourceFile:net/bluetooth/msft.c SourceLine:977 SourceSnippet: 972:	static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 973:	{
 974:		struct msft_monitor_addr_filter_data *n, *address_filter = NULL;
 975:		struct msft_ev_le_monitor_device *ev;
 976:		struct msft_monitor_advertisement_handle_data *handle_data;
 977:		struct msft_data *msft = hdev->msft_data;
 978:		u16 mgmt_handle = 0xffff;
 979:		u8 addr_type;
 980:	
 981:		ev = msft_skb_pull(hdev, skb, MSFT_EV_LE_MONITOR_DEVICE, sizeof(*ev));
 982:		if (!ev)
] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:msft_register SourceFile:net/bluetooth/msft.c SourceLine:767 SourceSnippet: 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_release SourceFile:net/bluetooth/msft.c SourceLine:773 SourceSnippet: 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:msft_release SourceFile:net/bluetooth/msft.c SourceLine:780 SourceSnippet: 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
 779:	
 780:		hdev->msft_data = NULL;
 781:	
 782:		kfree(msft->evt_prefix);
 783:		mutex_destroy(&msft->filter_lock);
 784:		kfree(msft);
 785:	}
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_remove_addr_filters_sync SourceFile:net/bluetooth/msft.c SourceLine:307 SourceSnippet: 302:	/* This function requires the caller holds hci_req_sync_lock */
 303:	static void msft_remove_addr_filters_sync(struct hci_dev *hdev, u8 handle)
 304:	{
 305:		struct msft_monitor_addr_filter_data *address_filter, *n;
 306:		struct msft_cp_le_cancel_monitor_advertisement cp;
 307:		struct msft_data *msft = hdev->msft_data;
 308:		struct list_head head;
 309:		struct sk_buff *skb;
 310:	
 311:		INIT_LIST_HEAD(&head);
 312:	
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_remove_monitor SourceFile:net/bluetooth/msft.c SourceLine:1168 SourceSnippet:1165:	/* This function requires the caller holds hci_req_sync_lock */
1166:	int msft_remove_monitor(struct hci_dev *hdev, struct adv_monitor *monitor)
1167:	{
1168:		struct msft_data *msft = hdev->msft_data;
1169:	
1170:		if (!msft)
1171:			return -EOPNOTSUPP;
1172:	
1173:		if (msft->resuming || msft->suspending)
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_resume_sync SourceFile:net/bluetooth/msft.c SourceLine:610 SourceSnippet: 607:	/* This function requires the caller holds hci_req_sync_lock */
 608:	int msft_resume_sync(struct hci_dev *hdev)
 609:	{
 610:		struct msft_data *msft = hdev->msft_data;
 611:	
 612:		if (!msft || !msft_monitor_supported(hdev))
 613:			return 0;
 614:	
 615:		hci_dev_lock(hdev);
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_set_filter_enable SourceFile:net/bluetooth/msft.c SourceLine:1182 SourceSnippet:1179:	int msft_set_filter_enable(struct hci_dev *hdev, bool enable)
1180:	{
1181:		struct msft_cp_le_set_advertisement_filter_enable cp;
1182:		struct msft_data *msft = hdev->msft_data;
1183:		int err;
1184:	
1185:		if (!msft)
1186:			return -EOPNOTSUPP;
1187:	
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_suspend_sync SourceFile:net/bluetooth/msft.c SourceLine:451 SourceSnippet: 448:	/* This function requires the caller holds hci_req_sync_lock */
 449:	int msft_suspend_sync(struct hci_dev *hdev)
 450:	{
 451:		struct msft_data *msft = hdev->msft_data;
 452:		struct adv_monitor *monitor;
 453:		int handle = 0;
 454:	
 455:		if (!msft || !msft_monitor_supported(hdev))
 456:			return 0;
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:msft_vendor_evt SourceFile:net/bluetooth/msft.c SourceLine:1070 SourceSnippet:1068:	void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
1069:	{
1070:		struct msft_data *msft = hdev->msft_data;
1071:		u8 *evt_prefix;
1072:		u8 *evt;
1073:	
1074:		if (!msft)
1075:			return;
] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:reregister_monitor SourceFile:net/bluetooth/msft.c SourceLine:585 SourceSnippet: 581:	/* This function requires the caller holds hci_req_sync_lock */
 582:	static void reregister_monitor(struct hci_dev *hdev)
 583:	{
 584:		struct adv_monitor *monitor;
 585:		struct msft_data *msft = hdev->msft_data;
 586:		int handle = 0;
 587:	
 588:		if (!msft)
 589:			return;
 590:	
]] TruncatedOutput:false]

190/5 2026/08/27 21:20 llm patch-reviewer
0m Model:
gemini-3.7-flash

Tokens:
							input: 38630
							output: 19
							thoughts: 1377
						

Thoughts:
**Analyzing a Bluetooth Driver Patch: A Deep Dive**

Okay, let's break this down. My initial thought was to examine `msft_do_open` in `net/bluetooth/msft.c`. I wanted to understand how it handles Microsoft-specific extensions. I was particularly interested in what happened if `read_supported_features` failed, and whether there was any potential for resource leaks or uninitialized data access.  I noted that the code carefully frees and nulls out the `msft->evt_prefix` and sets `hdev->msft_data = NULL;` when `read_supported_features` fails, and `msft_release` does nothing if `hdev->msft_data` is NULL.

Then, I looked at the proposed changes, specifically in `hci_register_dev`. The critical part here was the reordering of `queue_work(hdev->req_workqueue, &hdev->power_on)`.  Originally, it was called *before* initializing `hdev->adv_monitors_idr` and before `msft_register(hdev)`.  I realized this could create a race condition. `power_on` runs asynchronously and may call `hci_dev_do_close()`, which in turn, could call `msft_do_close()`. `msft_do_close` accesses `hdev->adv_monitors_idr` and `hdev->msft_data`, potentially *before* they are fully initialized. Moving `queue_work` *after* those initializations ensures that the device is fully set up before `power_on` starts. This is a fundamental kernel best practice.

Next, I scrutinized the changes within `msft_register`.  The reordering of `hdev->msft_data = msft;` *after* the `mutex_init(&msft->filter_lock);` was crucial. This guarantees that `hdev->msft_data` is only exposed *after* all its fields, including the mutex and linked lists, are fully initialized. This prevents any potential read before initialization issues.

I then ran through the checklist. This patch is standalone and touches only two files in `net/bluetooth/`. Its root cause is definitively a race condition that it directly and elegantly fixes. The patch doesn't add any band-aids like extra null checks (which would be a symptom of not addressing the root problem) or anything like that, which I would be watching for. It fixes the root cause directly by reordering initialization and workqueuing. It also ensures the correct lifecycle symmetry and typestate soundness by initializing everything before publishing it. I didn't see any memory leaks or concurrency bugs, either.

Finally, I double-checked the changes. Both modifications in the two files compile cleanly, conceptually, and are safe. They're straightforward and follow kernel best practices. This is a clean, elegant fix that directly addresses the architectural root cause.

Therefore, I'm calling it with ReviewApproved: true. No comments needed.



191/5 2026/08/27 21:21 tool set-results
0m Args:
map[ReviewApproved:true ReviewComments:[]]

Results:
map[ReviewApproved:true ReviewComments:[]]

192/4 2026/08/27 21:21 action evaluate-patch-review
0m Results:
map[NeedsIteration:false ReviewFeedback:]

193/1 2026/08/27 21:21 action apply-patch
0m Results:
map[]

194/1 2026/08/27 21:21 action init-style-items
0m Results:
map[StyleItems:<nil>]

195/1 2026/08/27 21:21 action run-checkpatch
0m Results:
map[CheckpatchOutput:total: 0 errors, 0 warnings, 0 checks, 22 lines checked

Your patch has no obvious style problems and is ready for submission.
]

196/1 2026/08/27 21:21 loop
0m
197/2 2026/08/27 21:21 iteration 0
0m
198/3 2026/08/27 21:21 agent checkpatch-arbiter
0m Model:
core

Results:
map[ActionableIssues:[]]

Instruction:
You are an expert Linux kernel maintainer acting as a code style arbiter.
Your task is to review scripts/checkpatch.pl output and reviewer style requests for a proposed patch.

Determine which reported issues are genuine, actionable formatting/style defects (e.g. indentation, whitespace,
naming, syntax style) and should be fixed. List them in ActionableIssues.

Ignore issues that are false positives, intentional constructs (e.g. BUG_ON/XA_BUG_ON in test files, macros,
subsystem conventions), or unfixable without breaking code logic or tests. If no issues should be changed,
leave ActionableIssues empty.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
The patch diff is:

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)



The checkpatch.pl output is:
total: 0 errors, 0 warnings, 0 checks, 22 lines checked

Your patch has no obvious style problems and is ready for submission.







Carefully evaluate each issue and populate ActionableIssues.

199/4 2026/08/27 21:21 llm checkpatch-arbiter
0m Model:
gemini-3.7-flash

Tokens:
							input: 805
							output: 15
							thoughts: 161
						

Thoughts:
**Patch Review: HCI Core and MSFT Module**

Okay, so I've just been looking over this patch. It's a pretty straightforward rearrangement of some initialization steps within the Bluetooth HCI core and the MSFT module. Specifically, it looks like `queue_work()` for the power-on workqueue is being moved after the `msft_register(hdev)` call in `hci_core.c`. Then, in `msft.c`, the assignment of `hdev->msft_data = msft;` is being moved after the `mutex_init(&msft->filter_lock);` call.

The `checkpatch` report is clean – no errors, no warnings, and all the lines have been checked. That's always a good sign. Looks like the style is pristine; nothing sticks out. I then went through the diff itself, double-checking for any style violations or potential issues that `checkpatch` might have missed, and I'm not seeing anything of concern. No reviewer comments, either.

Based on this quick analysis, there's nothing immediately jumping out as problematic. ActionableIssues is empty, which confirms my initial impression. The patch is clean and follows kernel style, it's ready for submission.



200/4 2026/08/27 21:21 tool set-results
0m Args:
map[ActionableIssues:[]]

Results:
map[ActionableIssues:[]]

201/3 2026/08/27 21:21 action evaluate-checkpatch-arbiter
0m Results:
map[NeedRefinement:false]

202/3 2026/08/27 21:21 action If
0m Args:
map[NeedRefinement:false]

203/1 2026/08/27 21:21 agent fixes-finder
1m Model:
core

Results:
map[FixesHash:9e14606d8f38ea52a38c27692a9c1513c987a5da]

Instruction:
You are an experienced Linux kernel developer tasked with identifying the commit
that introduced the bug being fixed. Identifying the correct buggy commit is crucial
for proper kernel maintenance (backporting to stable trees, etc.).

Your investigation strategy:
1. Examine the patch that fixes the bug. Use git tools (like git-log or git-blame)
   to trace the history of the lines or functions modified by the patch.
2. Analyze the stack trace in the crash report. Identify the key files and functions
   involved in the crash and investigate their history to see when the problematic
   logic was introduced.
3. Compare the bug explanation with the commit history to find the point where
   the described logic error first appeared.

A bug is typically introduced when a piece of code is first written, or when
a refactoring changed its logic in a way that introduced the bug.
Trace the history of relevant symbols or find when specific code patterns were introduced/removed.

You must provide exactly one bug-introducing commit hash.
If you are unable to confidently determine the bug-introducing commit after investigation,
return an empty string rather than guessing.

Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
The crash is:

------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u11:2/5607
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#1: kworker/u11:2/5607
Modules linked in:
CPU: 1 UID: 0 PID: 5607 Comm: kworker/u11:2 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: hci3 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 29 61 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d c5 f7 aa 04 00 75 13 48 8d 3d a8 43 ae 04 48 c7 c6 c0 c5 cd 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc90004547720 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888115658000
RDX: 0000000000000000 RSI: ffffffff8bcdc5c0 RDI: ffffffff90647540
RBP: ffffc900045478b0 R08: ffffffff90612953 R09: 1ffffffff20c252a
R10: dffffc0000000000 R11: fffffbfff20c252b R12: ffff88818c5d3a40
R13: 0000000000000000 R14: 1ffff920008a8ef8 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8882e86de000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd706dfc30 CR3: 0000000118cf8000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	29 61 90             	sub    %esp,-0x70(%rcx)
   3:	48 c1 e8 03          	shr    $0x3,%rax
   7:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax
   b:	84 c0                	test   %al,%al
   d:	0f 85 47 02 00 00    	jne    0x25a
  13:	83 3d c5 f7 aa 04 00 	cmpl   $0x0,0x4aaf7c5(%rip)        # 0x4aaf7df
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d a8 43 ae 04 	lea    0x4ae43a8(%rip),%rdi        # 0x4ae43cb
  23:	48 c7 c6 c0 c5 cd 8b 	mov    $0xffffffff8bcdc5c0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 75 ee ff ff       	jmp    0xffffeeaa
  35:	90                   	nop
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	e9 48 f2 ff ff       	jmp    0xfffff286
  3e:	90                   	nop
  3f:	0f                   	.byte 0xf



The explanation of the root cause is:

This crash is caused by a race condition during the registration of a new Bluetooth HCI device, specifically between the initialization of the Microsoft (MSFT) extension data and the execution of the device's `power_on` workqueue.

### Root Cause Analysis

1. **Triggering the Bug**: The syzkaller reproducer creates a Virtual HCI device (`/dev/vhci`) and writes a vendor packet with opcode `0x80` (`\xff\x80`). In `__vhci_create_device()`, this specific opcode sets the `HCI_QUIRK_RAW_DEVICE` quirk on the new HCI device and then calls `hci_register_dev(hdev)`.
2. **Device Registration**: Inside `hci_register_dev()` (`net/bluetooth/hci_core.c`), because the `HCI_QUIRK_RAW_DEVICE` quirk is set, the device is marked with the `HCI_UNCONFIGURED` flag.
3. **The Race Condition**: Towards the end of `hci_register_dev()`, the code queues the `power_on` work **before** fully initializing the device's MSFT extension and IDR:
   ```c
   	queue_work(hdev->req_workqueue, &hdev->power_on); // <--- Work is queued here

   	idr_init(&hdev->adv_monitors_idr);
   	msft_register(hdev);                              // <--- MSFT initialized here
   ```
4. **Concurrent Execution**: As soon as `queue_work()` is called, the `power_on` work can start executing concurrently on another CPU, invoking `hci_power_on()`. 
5. **Closing the Unconfigured Device**: Inside `hci_power_on()`, it checks if the device is unconfigured. Since `HCI_UNCONFIGURED` is set, it immediately bails out and calls `hci_dev_do_close(hdev)`, which in turn calls `hci_dev_close_sync(hdev)` and finally `msft_do_close(hdev)`.
6. **Uninitialized Mutex Access**: Concurrently, the original thread is executing `msft_register(hdev)` (`net/bluetooth/msft.c`):
   ```c
   	msft = kzalloc_obj(*msft);
   	// ...
   	INIT_LIST_HEAD(&msft->handle_map);
   	INIT_LIST_HEAD(&msft->address_filters);
   	hdev->msft_data = msft;               // <--- Pointer is exposed
   	mutex_init(&msft->filter_lock);       // <--- Mutex initialized AFTER exposure
   ```
   If `msft_do_close()` reads `hdev->msft_data` after it has been assigned but *before* `mutex_init()` is called, it will see a non-NULL pointer and attempt to lock the uninitialized (zeroed) mutex:
   ```c
   	mutex_lock(&msft->filter_lock);
   ```
   Locking an uninitialized mutex triggers the `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` warning seen in the crash log.

### Proposed Fix

To fix this issue, two changes should be made to ensure proper initialization ordering:

**1. Fix the initialization order in `hci_register_dev`:**
The device must be fully initialized before any work that might use it is scheduled. Move `idr_init()` and `msft_register()` to be called *before* `queue_work()`.

```c
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2631,10 +2631,10 @@ int hci_register_dev(struct hci_dev *hdev)
 		if (error)
 			BT_WARN("register suspend notifier failed error:%d\n", error);
 
-		queue_work(hdev->req_workqueue, &hdev->power_on);
-
 		idr_init(&hdev->adv_monitors_idr);
 		msft_register(hdev);
 
+		queue_work(hdev->req_workqueue, &hdev->power_on);
+
 		return id;
```

**2. Fix the pointer exposure in `msft_register`:**
As a defensive measure, `hdev->msft_data` should only be assigned *after* the structure is fully initialized. This prevents any concurrent readers from observing a partially initialized state.

```c
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,6 +764,6 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
```


The patch that fixes the bug is:

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)


Search for the commit(s) that introduced this bug.

204/2 2026/08/27 21:21 llm fixes-finder
0m Model:
gemini-3.7-flash

Tokens:
							input: 7335
							output: 75
							thoughts: 81
						

Thoughts:
Okay, here's my interpretation of this debugging process, summarized as my own thought process:

**Hunting Down the Bug's Origin**

Right, so I've been given a crash report, a breakdown of what's gone wrong, and a patch that (hopefully!) fixes the issue. Now comes the crucial step: figuring out *how* this bug made its way into the system. This is a classic "find the needle in the haystack" situation, but thankfully, we have tools to help.

The user's clearly providing evidence and details, so now it's my task to find the root cause, and where this bug originated.

My first thought is to dive into the Git history. Given the files mentioned – `net/bluetooth/msft.c` and `net/bluetooth/hci_core.c` – I'll start by focusing on those. I'll need to use either `git log` or `git blame` on these files. I can visualize which tool would be most effective by considering the nature of the change - `git blame` is perfect for finding the exact commit that introduced a specific line, while `git log` is better for understanding the broader history of changes in a file, in case the bug is related to a more significant modification.

So, I'll go ahead and call `git log` or `git blame` on those files and see what the output tells me. Hopefully, this will lead me to the culprit!



205/2 2026/08/27 21:21 tool git-blame
0m Args:
map[End:775 File:net/bluetooth/msft.c Start:755]

Results:
map[Output:5031ffcc79b81 755) 	struct msft_data *msft = NULL;
5031ffcc79b81 756) 
5031ffcc79b81 757) 	bt_dev_dbg(hdev, "Register MSFT extension");
5031ffcc79b81 758) 
bf4afc53b77ae 759) 	msft = kzalloc_obj(*msft);
5031ffcc79b81 760) 	if (!msft) {
5031ffcc79b81 761) 		bt_dev_err(hdev, "Failed to register MSFT extension");
5031ffcc79b81 762) 		return;
5031ffcc79b81 763) 	}
5031ffcc79b81 764) 
5031ffcc79b81 765) 	INIT_LIST_HEAD(&msft->handle_map);
9e14606d8f38e 766) 	INIT_LIST_HEAD(&msft->address_filters);
5031ffcc79b81 767) 	hdev->msft_data = msft;
9e14606d8f38e 768) 	mutex_init(&msft->filter_lock);
5031ffcc79b81 769) }
5031ffcc79b81 770) 
10f9f426ac6e7 771) void msft_release(struct hci_dev *hdev)
5031ffcc79b81 772) {
5031ffcc79b81 773) 	struct msft_data *msft = hdev->msft_data;
5031ffcc79b81 774) 
5031ffcc79b81 775) 	if (!msft)
]

206/2 2026/08/27 21:21 tool git-blame
0m Args:
map[End:2645 File:net/bluetooth/hci_core.c Start:2620]

Results:
map[Output:fe92ee6425a2c 2620) 	 * callback.
fe92ee6425a2c 2621) 	 */
fe92ee6425a2c 2622) 	if (hdev->wakeup)
e1cff7002b716 2623) 		hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
fe92ee6425a2c 2624) 
05fcd4c4f1011 2625) 	hci_sock_dev_event(hdev, HCI_DEV_REG);
dc946bd86f725 2626) 	hci_dev_hold(hdev);
^1da177e4c3f4 2627) 
9111786492f13 2628) 	error = hci_register_suspend_notifier(hdev);
9111786492f13 2629) 	if (error)
0d75da38e060d 2630) 		BT_WARN("register suspend notifier failed error:%d\n", error);
9952d90ea2885 2631) 
1920257316615 2632) 	queue_work(hdev->req_workqueue, &hdev->power_on);
fbe96d6ff9f4e 2633) 
e5e1e7fd470cc 2634) 	idr_init(&hdev->adv_monitors_idr);
5031ffcc79b81 2635) 	msft_register(hdev);
e5e1e7fd470cc 2636) 
^1da177e4c3f4 2637) 	return id;
f48fd9c8cd746 2638) 
33ca954daf1ac 2639) err_wqueue:
5a4bb6a8e981d 2640) 	debugfs_remove_recursive(hdev->debugfs);
33ca954daf1ac 2641) 	destroy_workqueue(hdev->workqueue);
6ead1bbc381a6 2642) 	destroy_workqueue(hdev->req_workqueue);
33ca954daf1ac 2643) err:
9c16d0c8d93e3 2644) 	ida_free(&hci_index_ida, hdev->id);
f48fd9c8cd746 2645) 
]

207/2 2026/08/27 21:21 llm fixes-finder
0m Model:
gemini-3.7-flash

Tokens:
							input: 9080
							output: 54
							thoughts: 143
						

Thoughts:
**Analyzing Recent Bluetooth Driver Commits**

Okay, let's dive in. I need to get a handle on the recent changes in the Bluetooth driver, specifically the Microsoft-related code. I see four commits in `net/bluetooth/msft.c` that look relevant. First, there's `5031ffcc79b81`, which mentions Microsoft vendor extension support. That's interesting; I'll want to see how they're handling vendor-specific commands and data structures. Then, `9e14606d8f38e` introduces monitor device support. This sounds like it could be useful for debugging or performance analysis. Next, `e5e1e7fd470cc` adds an advertising monitor list and associated APIs, which is definitely worth a closer look; I'm curious about the implementation details and how they're handling potentially large lists. Finally, `1920257316615` appears to address a bug related to power-on work queueing. That's a good find, as it suggests a potential race condition or resource management issue.

Now, I'll use `git show` to examine each of these commits in detail, starting with the oldest. I'll need to pay close attention to the code changes, commit messages, and any relevant documentation to understand the rationale behind each modification and assess its impact on the driver's overall stability, performance, and security. I'll be looking for potential regressions, areas for optimization, or architectural implications that might affect my own work.



208/2 2026/08/27 21:21 tool git-show
0m Args:
map[Commit:5031ffcc79b81]

Results:
map[Output:commit 5031ffcc79b81776ac8f7f8b1a585aed8818e3d1
Author: Miao-chen Chou <mcchou@chromium.org>
Date:   Thu Sep 9 14:10:23 2021 -0700

    Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle
    
    This splits the msft_do_{open/close} to msft_do_{open/close} and
    msft_{register/unregister}. With this change it is possible to retain
    the MSFT extension info irrespective of controller power on/off state.
    This helps bluetoothd to report correct 'supported features' of the
    controller to the D-Bus clients event if the controller is off. It also
    re-reads the MSFT info upon every msft_do_open().
    
    The following test steps were performed.
    1. Boot the test device and verify the MSFT support debug log in syslog.
    2. Power off the controller and read the 'supported features', power on
       and read again.
    3. Restart the bluetoothd and verify the 'supported features' value.
    
    Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
    Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
    Reviewed-by: Archie Pusaka <apusaka@chromium.org>
    Reviewed-by: Alain Michaud <alainm@chromium.org>
    Signed-off-by: Manish Mandlik <mmandlik@google.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5236faa397fa..beda5dac1658 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3990,6 +3990,7 @@ int hci_register_dev(struct hci_dev *hdev)
 	queue_work(hdev->req_workqueue, &hdev->power_on);
 
 	idr_init(&hdev->adv_monitors_idr);
+	msft_register(hdev);
 
 	return id;
 
@@ -4022,6 +4023,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
 		cancel_work_sync(&hdev->suspend_prepare);
 	}
 
+	msft_unregister(hdev);
+
 	hci_dev_do_close(hdev);
 
 	if (!test_bit(HCI_INIT, &hdev->flags) &&
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index b4bfae41e8a5..21b1787e7893 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -184,28 +184,36 @@ static void reregister_monitor_on_restart(struct hci_dev *hdev, int handle)
 
 void msft_do_open(struct hci_dev *hdev)
 {
-	struct msft_data *msft;
+	struct msft_data *msft = hdev->msft_data;
 
 	if (hdev->msft_opcode == HCI_OP_NOP)
 		return;
 
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT extension not registered");
+		return;
+	}
+
 	bt_dev_dbg(hdev, "Initialize MSFT extension");
 
-	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
-	if (!msft)
-		return;
+	/* Reset existing MSFT data before re-reading */
+	kfree(msft->evt_prefix);
+	msft->evt_prefix = NULL;
+	msft->evt_prefix_len = 0;
+	msft->features = 0;
 
 	if (!read_supported_features(hdev, msft)) {
+		hdev->msft_data = NULL;
 		kfree(msft);
 		return;
 	}
 
-	INIT_LIST_HEAD(&msft->handle_map);
-	hdev->msft_data = msft;
-
 	if (msft_monitor_supported(hdev)) {
 		msft->reregistering = true;
 		msft_set_filter_enable(hdev, true);
+		/* Monitors get removed on power off, so we need to explicitly
+		 * tell the controller to re-monitor.
+		 */
 		reregister_monitor_on_restart(hdev, 0);
 	}
 }
@@ -221,8 +229,9 @@ void msft_do_close(struct hci_dev *hdev)
 
 	bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 
-	hdev->msft_data = NULL;
-
+	/* The controller will silently remove all monitors on power off.
+	 * Therefore, remove handle_data mapping and reset monitor state.
+	 */
 	list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 		monitor = idr_find(&hdev->adv_monitors_idr,
 				   handle_data->mgmt_handle);
@@ -233,6 +242,34 @@ void msft_do_close(struct hci_dev *hdev)
 		list_del(&handle_data->list);
 		kfree(handle_data);
 	}
+}
+
+void msft_register(struct hci_dev *hdev)
+{
+	struct msft_data *msft = NULL;
+
+	bt_dev_dbg(hdev, "Register MSFT extension");
+
+	msft = kzalloc(sizeof(*msft), GFP_KERNEL);
+	if (!msft) {
+		bt_dev_err(hdev, "Failed to register MSFT extension");
+		return;
+	}
+
+	INIT_LIST_HEAD(&msft->handle_map);
+	hdev->msft_data = msft;
+}
+
+void msft_unregister(struct hci_dev *hdev)
+{
+	struct msft_data *msft = hdev->msft_data;
+
+	if (!msft)
+		return;
+
+	bt_dev_dbg(hdev, "Unregister MSFT extension");
+
+	hdev->msft_data = NULL;
 
 	kfree(msft->evt_prefix);
 	kfree(msft);
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 6e56d94b88d8..8018948c5975 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -13,6 +13,8 @@
 #if IS_ENABLED(CONFIG_BT_MSFTEXT)
 
 bool msft_monitor_supported(struct hci_dev *hdev);
+void msft_register(struct hci_dev *hdev);
+void msft_unregister(struct hci_dev *hdev);
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb);
@@ -31,6 +33,8 @@ static inline bool msft_monitor_supported(struct hci_dev *hdev)
 	return false;
 }
 
+static inline void msft_register(struct hci_dev *hdev) {}
+static inline void msft_unregister(struct hci_dev *hdev) {}
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb) {}
]

209/2 2026/08/27 21:21 tool git-show
0m Args:
map[Commit:9e14606d8f38e]

Results:
map[Output:commit 9e14606d8f38ea52a38c27692a9c1513c987a5da
Author: Hilda Wu <hildawu@realtek.com>
Date:   Wed Jun 21 18:00:31 2023 +0800

    Bluetooth: msft: Extended monitor tracking by address filter
    
    Since limited tracking device per condition, this feature is to support
    tracking multiple devices concurrently.
    When a pattern monitor detects the device, this feature issues an address
    monitor for tracking that device. Let pattern monitor can keep monitor
    new devices.
    This feature adds an address filter when receiving a LE monitor device
    event which monitor handle is for a pattern, and the controller started
    monitoring the device. And this feature also has cancelled the monitor
    advertisement from address filters when receiving a LE monitor device
    event when the controller stopped monitoring the device specified by an
    address and monitor handle.
    
    Below is an example to know the feature adds the address filter.
    
    //Add MSFT pattern monitor
    < HCI Command: Vendor (0x3f|0x00f0) plen 14          #142 [hci0] 55.552420
            03 b8 a4 03 ff 01 01 06 09 05 5f 52 45 46        .........._REF
    > HCI Event: Command Complete (0x0e) plen 6          #143 [hci0] 55.653960
          Vendor (0x3f|0x00f0) ncmd 2
            Status: Success (0x00)
            03 00
    
    //Got event from the pattern monitor
    > HCI Event: Vendor (0xff) plen 18                   #148 [hci0] 58.384953
            23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8  #yT3w..h....).'.
            00 01                                            ..
    
    //Add MSFT address monitor (Sample address: B8:27:EB:29:C1:FB)
    < HCI Command: Vendor (0x3f|0x00f0) plen 13          #149 [hci0] 58.385067
            03 b8 a4 03 ff 04 00 fb c1 29 eb 27 b8           .........).'.
    
    //Report to userspace about found device (ADV Monitor Device Found)
    @ MGMT Event: Unknown (0x002f) plen 38           {0x0003} [hci0] 58.680042
            01 00 fb c1 29 eb 27 b8 01 ce 00 00 00 00 16 00  ....).'.........
            0a 09 4b 45 59 42 44 5f 52 45 46 02 01 06 03 19  ..KEYBD_REF.....
            c1 03 03 03 12 18                                ......
    
    //Got event from address monitor
    > HCI Event: Vendor (0xff) plen 18                   #152 [hci0] 58.672956
            23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8  #yT3w..h....).'.
            01 01
    
    Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
    Signed-off-by: Hilda Wu <hildawu@realtek.com>
    Reviewed-by: Simon Horman <simon.horman@corigine.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 04399b3c39a0..ddae6524106d 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -1269,6 +1269,10 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
 		if (btrtl_dev->project_id == CHIP_ID_8852C)
 			btrealtek_set_flag(hdev, REALTEK_ALT6_CONTINUOUS_TX_CHIP);
 
+		if (btrtl_dev->project_id == CHIP_ID_8852A ||
+		    btrtl_dev->project_id == CHIP_ID_8852C)
+			set_bit(HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER, &hdev->quirks);
+
 		hci_set_aosp_capable(hdev);
 		break;
 	default:
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ab2f8f1817cf..5723405b833e 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -309,6 +309,16 @@ enum {
 	 * to support it.
 	 */
 	HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT,
+
+	/* When this quirk is set, MSFT extension monitor tracking by
+	 * address filter is supported. Since tracking quantity of each
+	 * pattern is limited, this feature supports tracking multiple
+	 * devices concurrently if controller supports multiple
+	 * address filters.
+	 *
+	 * This quirk must be set before hci_register_dev is called.
+	 */
+	HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER,
 };
 
 /* HCI device flags */
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index bf5cee48916c..b80a2162a5c3 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -91,6 +91,33 @@ struct msft_ev_le_monitor_device {
 struct msft_monitor_advertisement_handle_data {
 	__u8  msft_handle;
 	__u16 mgmt_handle;
+	__s8 rssi_high;
+	__s8 rssi_low;
+	__u8 rssi_low_interval;
+	__u8 rssi_sampling_period;
+	__u8 cond_type;
+	struct list_head list;
+};
+
+enum monitor_addr_filter_state {
+	AF_STATE_IDLE,
+	AF_STATE_ADDING,
+	AF_STATE_ADDED,
+	AF_STATE_REMOVING,
+};
+
+#define MSFT_MONITOR_ADVERTISEMENT_TYPE_ADDR	0x04
+struct msft_monitor_addr_filter_data {
+	__u8     msft_handle;
+	__u8     pattern_handle; /* address filters pertain to */
+	__u16    mgmt_handle;
+	int      state;
+	__s8     rssi_high;
+	__s8     rssi_low;
+	__u8     rssi_low_interval;
+	__u8     rssi_sampling_period;
+	__u8     addr_type;
+	bdaddr_t bdaddr;
 	struct list_head list;
 };
 
@@ -99,9 +126,12 @@ struct msft_data {
 	__u8  evt_prefix_len;
 	__u8  *evt_prefix;
 	struct list_head handle_map;
+	struct list_head address_filters;
 	__u8 resuming;
 	__u8 suspending;
 	__u8 filter_enabled;
+	/* To synchronize add/remove address filter and monitor device event.*/
+	struct mutex filter_lock;
 };
 
 bool msft_monitor_supported(struct hci_dev *hdev)
@@ -180,6 +210,24 @@ static struct msft_monitor_advertisement_handle_data *msft_find_handle_data
 	return NULL;
 }
 
+/* This function requires the caller holds msft->filter_lock */
+static struct msft_monitor_addr_filter_data *msft_find_address_data
+			(struct hci_dev *hdev, u8 addr_type, bdaddr_t *addr,
+			 u8 pattern_handle)
+{
+	struct msft_monitor_addr_filter_data *entry;
+	struct msft_data *msft = hdev->msft_data;
+
+	list_for_each_entry(entry, &msft->address_filters, list) {
+		if (entry->pattern_handle == pattern_handle &&
+		    addr_type == entry->addr_type &&
+		    !bacmp(addr, &entry->bdaddr))
+			return entry;
+	}
+
+	return NULL;
+}
+
 /* This function requires the caller holds hdev->lock */
 static int msft_monitor_device_del(struct hci_dev *hdev, __u16 mgmt_handle,
 				   bdaddr_t *bdaddr, __u8 addr_type,
@@ -240,6 +288,7 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode,
 
 	handle_data->mgmt_handle = monitor->handle;
 	handle_data->msft_handle = rp->handle;
+	handle_data->cond_type   = MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN;
 	INIT_LIST_HEAD(&handle_data->list);
 	list_add(&handle_data->list, &msft->handle_map);
 
@@ -254,6 +303,70 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode,
 	return status;
 }
 
+/* This function requires the caller holds hci_req_sync_lock */
+static void msft_remove_addr_filters_sync(struct hci_dev *hdev, u8 handle)
+{
+	struct msft_monitor_addr_filter_data *address_filter, *n;
+	struct msft_cp_le_cancel_monitor_advertisement cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct list_head head;
+	struct sk_buff *skb;
+
+	INIT_LIST_HEAD(&head);
+
+	/* Cancel all corresponding address monitors */
+	mutex_lock(&msft->filter_lock);
+
+	list_for_each_entry_safe(address_filter, n, &msft->address_filters,
+				 list) {
+		if (address_filter->pattern_handle != handle)
+			continue;
+
+		list_del(&address_filter->list);
+
+		/* Keep the address filter and let
+		 * msft_add_address_filter_sync() remove and free the address
+		 * filter.
+		 */
+		if (address_filter->state == AF_STATE_ADDING) {
+			address_filter->state = AF_STATE_REMOVING;
+			continue;
+		}
+
+		/* Keep the address filter and let
+		 * msft_cancel_address_filter_sync() remove and free the address
+		 * filter
+		 */
+		if (address_filter->state == AF_STATE_REMOVING)
+			continue;
+
+		list_add_tail(&address_filter->list, &head);
+	}
+
+	mutex_unlock(&msft->filter_lock);
+
+	list_for_each_entry_safe(address_filter, n, &head, list) {
+		list_del(&address_filter->list);
+
+		cp.sub_opcode = MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT;
+		cp.handle = address_filter->msft_handle;
+
+		skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
+				     HCI_CMD_TIMEOUT);
+		if (IS_ERR_OR_NULL(skb)) {
+			kfree(address_filter);
+			continue;
+		}
+
+		kfree_skb(skb);
+
+		bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
+			   &address_filter->bdaddr);
+
+		kfree(address_filter);
+	}
+}
+
 static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 						   u16 opcode,
 						   struct adv_monitor *monitor,
@@ -263,6 +376,7 @@ static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 	struct msft_monitor_advertisement_handle_data *handle_data;
 	struct msft_data *msft = hdev->msft_data;
 	int status = 0;
+	u8 msft_handle;
 
 	rp = (struct msft_rp_le_cancel_monitor_advertisement *)skb->data;
 	if (skb->len < sizeof(*rp)) {
@@ -293,11 +407,17 @@ static int msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
 						NULL, 0, false);
 		}
 
+		msft_handle = handle_data->msft_handle;
+
 		list_del(&handle_data->list);
 		kfree(handle_data);
-	}
 
-	hci_dev_unlock(hdev);
+		hci_dev_unlock(hdev);
+
+		msft_remove_addr_filters_sync(hdev, msft_handle);
+	} else {
+		hci_dev_unlock(hdev);
+	}
 
 done:
 	return status;
@@ -394,12 +514,14 @@ static int msft_add_monitor_sync(struct hci_dev *hdev,
 {
 	struct msft_cp_le_monitor_advertisement *cp;
 	struct msft_le_monitor_advertisement_pattern_data *pattern_data;
+	struct msft_monitor_advertisement_handle_data *handle_data;
 	struct msft_le_monitor_advertisement_pattern *pattern;
 	struct adv_pattern *entry;
 	size_t total_size = sizeof(*cp) + sizeof(*pattern_data);
 	ptrdiff_t offset = 0;
 	u8 pattern_count = 0;
 	struct sk_buff *skb;
+	int err;
 
 	if (!msft_monitor_pattern_valid(monitor))
 		return -EINVAL;
@@ -436,16 +558,31 @@ static int msft_add_monitor_sync(struct hci_dev *hdev,
 
 	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, total_size, cp,
 			     HCI_CMD_TIMEOUT);
-	kfree(cp);
 
 	if (IS_ERR_OR_NULL(skb)) {
-		if (!skb)
-			return -EIO;
-		return PTR_ERR(skb);
+		err = PTR_ERR(skb);
+		goto out_free;
 	}
 
-	return msft_le_monitor_advertisement_cb(hdev, hdev->msft_opcode,
-						monitor, skb);
+	err = msft_le_monitor_advertisement_cb(hdev, hdev->msft_opcode,
+					       monitor, skb);
+	if (err)
+		goto out_free;
+
+	handle_data = msft_find_handle_data(hdev, monitor->handle, true);
+	if (!handle_data) {
+		err = -ENODATA;
+		goto out_free;
+	}
+
+	handle_data->rssi_high	= cp->rssi_high;
+	handle_data->rssi_low	= cp->rssi_low;
+	handle_data->rssi_low_interval	  = cp->rssi_low_interval;
+	handle_data->rssi_sampling_period = cp->rssi_sampling_period;
+
+out_free:
+	kfree(cp);
+	return err;
 }
 
 /* This function requires the caller holds hci_req_sync_lock */
@@ -538,6 +675,7 @@ void msft_do_close(struct hci_dev *hdev)
 {
 	struct msft_data *msft = hdev->msft_data;
 	struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
+	struct msft_monitor_addr_filter_data *address_filter, *n;
 	struct adv_monitor *monitor;
 
 	if (!msft)
@@ -559,6 +697,14 @@ void msft_do_close(struct hci_dev *hdev)
 		kfree(handle_data);
 	}
 
+	mutex_lock(&msft->filter_lock);
+	list_for_each_entry_safe(address_filter, n, &msft->address_filters,
+				 list) {
+		list_del(&address_filter->list);
+		kfree(address_filter);
+	}
+	mutex_unlock(&msft->filter_lock);
+
 	hci_dev_lock(hdev);
 
 	/* Clear any devices that are being monitored and notify device lost */
@@ -568,6 +714,49 @@ void msft_do_close(struct hci_dev *hdev)
 	hci_dev_unlock(hdev);
 }
 
+static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = data;
+	struct msft_cp_le_cancel_monitor_advertisement cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct sk_buff *skb;
+	int err = 0;
+
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT: msft data is freed");
+		return -EINVAL;
+	}
+
+	/* The address filter has been removed by hci dev close */
+	if (!test_bit(HCI_UP, &hdev->flags))
+		return 0;
+
+	mutex_lock(&msft->filter_lock);
+	list_del(&address_filter->list);
+	mutex_unlock(&msft->filter_lock);
+
+	cp.sub_opcode = MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT;
+	cp.handle = address_filter->msft_handle;
+
+	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp,
+			     HCI_CMD_TIMEOUT);
+	if (IS_ERR_OR_NULL(skb)) {
+		bt_dev_err(hdev, "MSFT: Failed to cancel address (%pMR) filter",
+			   &address_filter->bdaddr);
+		err = EIO;
+		goto done;
+	}
+	kfree_skb(skb);
+
+	bt_dev_dbg(hdev, "MSFT: Canceled device %pMR address filter",
+		   &address_filter->bdaddr);
+
+done:
+	kfree(address_filter);
+
+	return err;
+}
+
 void msft_register(struct hci_dev *hdev)
 {
 	struct msft_data *msft = NULL;
@@ -581,7 +770,9 @@ void msft_register(struct hci_dev *hdev)
 	}
 
 	INIT_LIST_HEAD(&msft->handle_map);
+	INIT_LIST_HEAD(&msft->address_filters);
 	hdev->msft_data = msft;
+	mutex_init(&msft->filter_lock);
 }
 
 void msft_unregister(struct hci_dev *hdev)
@@ -596,6 +787,7 @@ void msft_unregister(struct hci_dev *hdev)
 	hdev->msft_data = NULL;
 
 	kfree(msft->evt_prefix);
+	mutex_destroy(&msft->filter_lock);
 	kfree(msft);
 }
 
@@ -645,11 +837,149 @@ static void *msft_skb_pull(struct hci_dev *hdev, struct sk_buff *skb,
 	return data;
 }
 
+static int msft_add_address_filter_sync(struct hci_dev *hdev, void *data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = data;
+	struct msft_rp_le_monitor_advertisement *rp;
+	struct msft_cp_le_monitor_advertisement *cp;
+	struct msft_data *msft = hdev->msft_data;
+	struct sk_buff *skb = NULL;
+	bool remove = false;
+	size_t size;
+
+	if (!msft) {
+		bt_dev_err(hdev, "MSFT: msft data is freed");
+		return -EINVAL;
+	}
+
+	/* The address filter has been removed by hci dev close */
+	if (!test_bit(HCI_UP, &hdev->flags))
+		return -ENODEV;
+
+	/* We are safe to use the address filter from now on.
+	 * msft_monitor_device_evt() wouldn't delete this filter because it's
+	 * not been added by now.
+	 * And all other functions that requiring hci_req_sync_lock wouldn't
+	 * touch this filter before this func completes because it's protected
+	 * by hci_req_sync_lock.
+	 */
+
+	if (address_filter->state == AF_STATE_REMOVING) {
+		mutex_lock(&msft->filter_lock);
+		list_del(&address_filter->list);
+		mutex_unlock(&msft->filter_lock);
+		kfree(address_filter);
+		return 0;
+	}
+
+	size = sizeof(*cp) +
+	       sizeof(address_filter->addr_type) +
+	       sizeof(address_filter->bdaddr);
+	cp = kzalloc(size, GFP_KERNEL);
+	if (!cp) {
+		bt_dev_err(hdev, "MSFT: Alloc cmd param err");
+		remove = true;
+		goto done;
+	}
+	cp->sub_opcode           = MSFT_OP_LE_MONITOR_ADVERTISEMENT;
+	cp->rssi_high		 = address_filter->rssi_high;
+	cp->rssi_low		 = address_filter->rssi_low;
+	cp->rssi_low_interval    = address_filter->rssi_low_interval;
+	cp->rssi_sampling_period = address_filter->rssi_sampling_period;
+	cp->cond_type            = MSFT_MONITOR_ADVERTISEMENT_TYPE_ADDR;
+	cp->data[0]              = address_filter->addr_type;
+	memcpy(&cp->data[1], &address_filter->bdaddr,
+	       sizeof(address_filter->bdaddr));
+
+	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, size, cp,
+			     HCI_CMD_TIMEOUT);
+	if (IS_ERR_OR_NULL(skb)) {
+		bt_dev_err(hdev, "Failed to enable address %pMR filter",
+			   &address_filter->bdaddr);
+		skb = NULL;
+		remove = true;
+		goto done;
+	}
+
+	rp = skb_pull_data(skb, sizeof(*rp));
+	if (!rp || rp->sub_opcode != MSFT_OP_LE_MONITOR_ADVERTISEMENT ||
+	    rp->status)
+		remove = true;
+
+done:
+	mutex_lock(&msft->filter_lock);
+
+	if (remove) {
+		bt_dev_warn(hdev, "MSFT: Remove address (%pMR) filter",
+			    &address_filter->bdaddr);
+		list_del(&address_filter->list);
+		kfree(address_filter);
+	} else {
+		address_filter->state = AF_STATE_ADDED;
+		address_filter->msft_handle = rp->handle;
+		bt_dev_dbg(hdev, "MSFT: Address %pMR filter enabled",
+			   &address_filter->bdaddr);
+	}
+	mutex_unlock(&msft->filter_lock);
+
+	kfree_skb(skb);
+
+	return 0;
+}
+
+/* This function requires the caller holds msft->filter_lock */
+static struct msft_monitor_addr_filter_data *msft_add_address_filter
+		(struct hci_dev *hdev, u8 addr_type, bdaddr_t *bdaddr,
+		 struct msft_monitor_advertisement_handle_data *handle_data)
+{
+	struct msft_monitor_addr_filter_data *address_filter = NULL;
+	struct msft_data *msft = hdev->msft_data;
+	int err;
+
+	address_filter = kzalloc(sizeof(*address_filter), GFP_KERNEL);
+	if (!address_filter)
+		return NULL;
+
+	address_filter->state             = AF_STATE_ADDING;
+	address_filter->msft_handle       = 0xff;
+	address_filter->pattern_handle    = handle_data->msft_handle;
+	address_filter->mgmt_handle       = handle_data->mgmt_handle;
+	address_filter->rssi_high         = handle_data->rssi_high;
+	address_filter->rssi_low          = handle_data->rssi_low;
+	address_filter->rssi_low_interval = handle_data->rssi_low_interval;
+	address_filter->rssi_sampling_period = handle_data->rssi_sampling_period;
+	address_filter->addr_type            = addr_type;
+	bacpy(&address_filter->bdaddr, bdaddr);
+
+	/* With the above AF_STATE_ADDING, duplicated address filter can be
+	 * avoided when receiving monitor device event (found/lost) frequently
+	 * for the same device.
+	 */
+	list_add_tail(&address_filter->list, &msft->address_filters);
+
+	err = hci_cmd_sync_queue(hdev, msft_add_address_filter_sync,
+				 address_filter, NULL);
+	if (err < 0) {
+		bt_dev_err(hdev, "MSFT: Add address %pMR filter err", bdaddr);
+		list_del(&address_filter->list);
+		kfree(address_filter);
+		return NULL;
+	}
+
+	bt_dev_dbg(hdev, "MSFT: Add device %pMR address filter",
+		   &address_filter->bdaddr);
+
+	return address_filter;
+}
+
 /* This function requires the caller holds hdev->lock */
 static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 {
+	struct msft_monitor_addr_filter_data *n, *address_filter = NULL;
 	struct msft_ev_le_monitor_device *ev;
 	struct msft_monitor_advertisement_handle_data *handle_data;
+	struct msft_data *msft = hdev->msft_data;
+	u16 mgmt_handle = 0xffff;
 	u8 addr_type;
 
 	ev = msft_skb_pull(hdev, skb, MSFT_EV_LE_MONITOR_DEVICE, sizeof(*ev));
@@ -662,9 +992,53 @@ static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		   ev->monitor_state, &ev->bdaddr);
 
 	handle_data = msft_find_handle_data(hdev, ev->monitor_handle, false);
-	if (!handle_data)
+
+	if (!test_bit(HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER, &hdev->quirks)) {
+		if (!handle_data)
+			return;
+		mgmt_handle = handle_data->mgmt_handle;
+		goto report_state;
+	}
+
+	if (handle_data) {
+		/* Don't report any device found/lost event from pattern
+		 * monitors. Pattern monitor always has its address filters for
+		 * tracking devices.
+		 */
+
+		address_filter = msft_find_address_data(hdev, ev->addr_type,
+							&ev->bdaddr,
+							handle_data->msft_handle);
+		if (address_filter)
+			return;
+
+		if (ev->monitor_state && handle_data->cond_type ==
+				MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN)
+			msft_add_address_filter(hdev, ev->addr_type,
+						&ev->bdaddr, handle_data);
+
 		return;
+	}
 
+	/* This device event is not from pattern monitor.
+	 * Report it if there is a corresponding address_filter for it.
+	 */
+	list_for_each_entry(n, &msft->address_filters, list) {
+		if (n->state == AF_STATE_ADDED &&
+		    n->msft_handle == ev->monitor_handle) {
+			mgmt_handle = n->mgmt_handle;
+			address_filter = n;
+			break;
+		}
+	}
+
+	if (!address_filter) {
+		bt_dev_warn(hdev, "MSFT: Unexpected device event %pMR, %u, %u",
+			    &ev->bdaddr, ev->monitor_handle, ev->monitor_state);
+		return;
+	}
+
+report_state:
 	switch (ev->addr_type) {
 	case ADDR_LE_DEV_PUBLIC:
 		addr_type = BDADDR_LE_PUBLIC;
@@ -681,12 +1055,18 @@ static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		return;
 	}
 
-	if (ev->monitor_state)
-		msft_device_found(hdev, &ev->bdaddr, addr_type,
-				  handle_data->mgmt_handle);
-	else
-		msft_device_lost(hdev, &ev->bdaddr, addr_type,
-				 handle_data->mgmt_handle);
+	if (ev->monitor_state) {
+		msft_device_found(hdev, &ev->bdaddr, addr_type, mgmt_handle);
+	} else {
+		if (address_filter && address_filter->state == AF_STATE_ADDED) {
+			address_filter->state = AF_STATE_REMOVING;
+			hci_cmd_sync_queue(hdev,
+					   msft_cancel_address_filter_sync,
+					   address_filter,
+					   NULL);
+		}
+		msft_device_lost(hdev, &ev->bdaddr, addr_type, mgmt_handle);
+	}
 }
 
 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
@@ -724,7 +1104,9 @@ void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
 
 	switch (*evt) {
 	case MSFT_EV_LE_MONITOR_DEVICE:
+		mutex_lock(&msft->filter_lock);
 		msft_monitor_device_evt(hdev, skb);
+		mutex_unlock(&msft->filter_lock);
 		break;
 
 	default:
]

210/2 2026/08/27 21:21 llm fixes-finder
0m Model:
gemini-3.7-flash

Tokens:
							input: 20115
							output: 54
							thoughts: 848
						

Thoughts:
**Analyzing the Bluetooth HCI Device Lifecycle with MSFT Extension**

Okay, let's break this down methodically. I need to understand this sequence of operations and any potential concurrency issues. Looking at commit `5031ffcc79b81`, I see the `msft_register(hdev)` call is added *after* the `queue_work(..., &hdev->power_on)` call within `hci_register_dev`. That immediately raises a flag.

Diving into `msft_register`, it allocates and initializes the `msft_data` structure and sets up a list head for `handle_map`.  I see `msft_do_close` cleans up the `handle_map` on device close, which involves iterating through a list of `msft_monitor_advertisement_handle_data` structures and resetting the state of associated advertisement monitors. It uses an `idr_find` call.

Now, here's where it gets interesting. I don't see any locking around that `handle_map` or `idr_find` in `5031ffcc79b81`. That's a red flag for concurrent access, especially given the `power_on` workqueue, which *could* be running concurrently.  Wait a minute, was there a lock added *later*? Ah, yes. Commit `9e14606d8f38e` ("Bluetooth: msft: Extended monitor tracking by address filter") introduces `msft->filter_lock`. So the original code *lacked* a lock!

But I need to look at the history before commit `5031ffcc79b81`. When were `idr_init(&hdev->adv_monitors_idr)` and `msft_do_close` introduced?  I need to go further back and figure out the timeline.  I need to check commits `e5e1e7fd470cc` and `1920257316615` and `5031ffcc79b81` and `9e14606d8f38e` to see how everything evolved.  Let's start by doing `git show` on those earlier commits...



211/2 2026/08/27 21:22 tool git-show
0m Args:
map[Commit:e5e1e7fd470cc]

Results:
map[Output:commit e5e1e7fd470ccf2eb38ab7fb5a3ab0fc4792fe53
Author: Miao-chen Chou <mcchou@chromium.org>
Date:   Wed Jun 17 16:39:13 2020 +0200

    Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES
    
    This adds the request handler of MGMT_OP_READ_ADV_MONITOR_FEATURES
    command. Since the controller-based monitoring is not yet in place, this
    report only the supported features but not the enabled features.
    
    The following test was performed.
    - Issuing btmgmt advmon-features.
    
    Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 6f88e5d81bd2..4e9d51087674 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -25,6 +25,7 @@
 #ifndef __HCI_CORE_H
 #define __HCI_CORE_H
 
+#include <linux/idr.h>
 #include <linux/leds.h>
 #include <linux/rculist.h>
 
@@ -237,6 +238,24 @@ struct adv_info {
 #define HCI_MAX_ADV_INSTANCES		5
 #define HCI_DEFAULT_ADV_DURATION	2
 
+struct adv_pattern {
+	struct list_head list;
+	__u8 ad_type;
+	__u8 offset;
+	__u8 length;
+	__u8 value[HCI_MAX_AD_LENGTH];
+};
+
+struct adv_monitor {
+	struct list_head patterns;
+	bool		active;
+	__u16		handle;
+};
+
+#define HCI_MIN_ADV_MONITOR_HANDLE		1
+#define HCI_MAX_ADV_MONITOR_NUM_HANDLES	32
+#define HCI_MAX_ADV_MONITOR_NUM_PATTERNS	16
+
 #define HCI_MAX_SHORT_NAME_LENGTH	10
 
 /* Min encryption key size to match with SMP */
@@ -511,6 +530,9 @@ struct hci_dev {
 	__u16			adv_instance_timeout;
 	struct delayed_work	adv_instance_expire;
 
+	struct idr		adv_monitors_idr;
+	unsigned int		adv_monitors_cnt;
+
 	__u8			irk[16];
 	__u32			rpa_timeout;
 	struct delayed_work	rpa_expired;
@@ -1258,6 +1280,8 @@ int hci_add_adv_instance(struct hci_dev *hdev, u8 instance, u32 flags,
 int hci_remove_adv_instance(struct hci_dev *hdev, u8 instance);
 void hci_adv_instances_set_rpa_expired(struct hci_dev *hdev, bool rpa_expired);
 
+void hci_adv_monitors_clear(struct hci_dev *hdev);
+
 void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
 
 void hci_init_sysfs(struct hci_dev *hdev);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8e01afb2ee8c..53aec32a5850 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -26,7 +26,6 @@
 /* Bluetooth HCI core. */
 
 #include <linux/export.h>
-#include <linux/idr.h>
 #include <linux/rfkill.h>
 #include <linux/debugfs.h>
 #include <linux/crypto.h>
@@ -2996,6 +2995,12 @@ int hci_add_adv_instance(struct hci_dev *hdev, u8 instance, u32 flags,
 	return 0;
 }
 
+/* This function requires the caller holds hdev->lock */
+void hci_adv_monitors_clear(struct hci_dev *hdev)
+{
+	idr_destroy(&hdev->adv_monitors_idr);
+}
+
 struct bdaddr_list *hci_bdaddr_list_lookup(struct list_head *bdaddr_list,
 					 bdaddr_t *bdaddr, u8 type)
 {
@@ -3646,6 +3651,8 @@ int hci_register_dev(struct hci_dev *hdev)
 
 	queue_work(hdev->req_workqueue, &hdev->power_on);
 
+	idr_init(&hdev->adv_monitors_idr);
+
 	return id;
 
 err_wqueue:
@@ -3716,6 +3723,7 @@ void hci_unregister_dev(struct hci_dev *hdev)
 	hci_smp_irks_clear(hdev);
 	hci_remote_oob_data_clear(hdev);
 	hci_adv_instances_clear(hdev);
+	hci_adv_monitors_clear(hdev);
 	hci_bdaddr_list_clear(&hdev->le_white_list);
 	hci_bdaddr_list_clear(&hdev->le_resolv_list);
 	hci_conn_params_clear_all(hdev);
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e409ff48e8e6..8aec7fbe9a38 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -37,6 +37,7 @@
 #include "smp.h"
 #include "mgmt_util.h"
 #include "mgmt_config.h"
+#include "msft.h"
 
 #define MGMT_VERSION	1
 #define MGMT_REVISION	17
@@ -118,6 +119,7 @@ static const u16 mgmt_commands[] = {
 	MGMT_OP_SET_DEF_RUNTIME_CONFIG,
 	MGMT_OP_GET_DEVICE_FLAGS,
 	MGMT_OP_SET_DEVICE_FLAGS,
+	MGMT_OP_READ_ADV_MONITOR_FEATURES,
 };
 
 static const u16 mgmt_events[] = {
@@ -3973,6 +3975,51 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
 				 &cp->addr, sizeof(cp->addr));
 }
 
+static int read_adv_mon_features(struct sock *sk, struct hci_dev *hdev,
+				 void *data, u16 len)
+{
+	struct adv_monitor *monitor = NULL;
+	struct mgmt_rp_read_adv_monitor_features *rp = NULL;
+	int handle;
+	size_t rp_size = 0;
+	__u32 supported = 0;
+	__u16 num_handles = 0;
+	__u16 handles[HCI_MAX_ADV_MONITOR_NUM_HANDLES];
+
+	BT_DBG("request for %s", hdev->name);
+
+	hci_dev_lock(hdev);
+
+	if (msft_get_features(hdev) & MSFT_FEATURE_MASK_LE_ADV_MONITOR)
+		supported |= MGMT_ADV_MONITOR_FEATURE_MASK_OR_PATTERNS;
+
+	idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle) {
+		handles[num_handles++] = monitor->handle;
+	}
+
+	hci_dev_unlock(hdev);
+
+	rp_size = sizeof(*rp) + (num_handles * sizeof(u16));
+	rp = kmalloc(rp_size, GFP_KERNEL);
+	if (!rp)
+		return -ENOMEM;
+
+	/* Once controller-based monitoring is in place, the enabled_features
+	 * should reflect the use.
+	 */
+	rp->supported_features = cpu_to_le32(supported);
+	rp->enabled_features = 0;
+	rp->max_num_handles = cpu_to_le16(HCI_MAX_ADV_MONITOR_NUM_HANDLES);
+	rp->max_num_patterns = HCI_MAX_ADV_MONITOR_NUM_PATTERNS;
+	rp->num_handles = cpu_to_le16(num_handles);
+	if (num_handles)
+		memcpy(&rp->handles, &handles, (num_handles * sizeof(u16)));
+
+	return mgmt_cmd_complete(sk, hdev->id,
+				 MGMT_OP_READ_ADV_MONITOR_FEATURES,
+				 MGMT_STATUS_SUCCESS, rp, rp_size);
+}
+
 static void read_local_oob_data_complete(struct hci_dev *hdev, u8 status,
 				         u16 opcode, struct sk_buff *skb)
 {
@@ -7441,6 +7488,7 @@ static const struct hci_mgmt_handler mgmt_handlers[] = {
 						HCI_MGMT_VAR_LEN },
 	{ get_device_flags,        MGMT_GET_DEVICE_FLAGS_SIZE },
 	{ set_device_flags,        MGMT_SET_DEVICE_FLAGS_SIZE },
+	{ read_adv_mon_features,   MGMT_READ_ADV_MONITOR_FEATURES_SIZE },
 };
 
 void mgmt_index_added(struct hci_dev *hdev)
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d6c4e6b5ae77..8579bfeb2836 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -139,3 +139,10 @@ void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb)
 
 	bt_dev_dbg(hdev, "MSFT vendor event %u", event);
 }
+
+__u64 msft_get_features(struct hci_dev *hdev)
+{
+	struct msft_data *msft = hdev->msft_data;
+
+	return  msft ? msft->features : 0;
+}
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 5aa9130e1f8a..e9c478e890b8 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -3,16 +3,25 @@
  * Copyright (C) 2020 Google Corporation
  */
 
+#define MSFT_FEATURE_MASK_BREDR_RSSI_MONITOR		BIT(0)
+#define MSFT_FEATURE_MASK_LE_CONN_RSSI_MONITOR		BIT(1)
+#define MSFT_FEATURE_MASK_LE_ADV_RSSI_MONITOR		BIT(2)
+#define MSFT_FEATURE_MASK_LE_ADV_MONITOR		BIT(3)
+#define MSFT_FEATURE_MASK_CURVE_VALIDITY		BIT(4)
+#define MSFT_FEATURE_MASK_CONCURRENT_ADV_MONITOR	BIT(5)
+
 #if IS_ENABLED(CONFIG_BT_MSFTEXT)
 
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb);
+__u64 msft_get_features(struct hci_dev *hdev);
 
 #else
 
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, struct sk_buff *skb) {}
+static inline __u64 msft_get_features(struct hci_dev *hdev) { return 0; }
 
 #endif
]

212/2 2026/08/27 21:22 tool git-show
0m Args:
map[Commit:1920257316615]

Results:
map[Output:commit 1920257316615676387794cc5fb838183b3bae7f
Author: Johan Hedberg <johan.hedberg@intel.com>
Date:   Mon Jan 14 22:33:51 2013 +0200

    Bluetooth: Use req_workqueue for hci_request operations
    
    This patch converts work assignment relying on hci_request() from the
    system-global work queue to the per-HCI device specific work queue
    (hdev->req_workqueue) intended for hci_request() related tasks.
    
    Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
    Acked-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index f73907aad79f..545553b82295 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1146,7 +1146,8 @@ static void hci_power_on(struct work_struct *work)
 		return;
 
 	if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags))
-		schedule_delayed_work(&hdev->power_off, HCI_AUTO_OFF_TIMEOUT);
+		queue_delayed_work(hdev->req_workqueue, &hdev->power_off,
+				   HCI_AUTO_OFF_TIMEOUT);
 
 	if (test_and_clear_bit(HCI_SETUP, &hdev->dev_flags))
 		mgmt_index_added(hdev);
@@ -1830,7 +1831,7 @@ int hci_register_dev(struct hci_dev *hdev)
 	hci_notify(hdev, HCI_DEV_REG);
 	hci_dev_hold(hdev);
 
-	schedule_work(&hdev->power_on);
+	queue_work(hdev->req_workqueue, &hdev->power_on);
 
 	return id;
 
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 37add53ce613..54114ff4090f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -812,9 +812,9 @@ static int set_powered(struct sock *sk, struct hci_dev *hdev, void *data,
 	}
 
 	if (cp->val)
-		schedule_work(&hdev->power_on);
+		queue_work(hdev->req_workqueue, &hdev->power_on);
 	else
-		schedule_work(&hdev->power_off.work);
+		queue_work(hdev->req_workqueue, &hdev->power_off.work);
 
 	err = 0;
 
]

213/2 2026/08/27 21:22 llm fixes-finder
0m Model:
gemini-3.7-flash

Tokens:
							input: 25547
							output: 29
							thoughts: 1610
						

Thoughts:
**Analyzing the Mutex Corruption in `msft_do_close`**

Okay, let's break this down systematically. The crash report points directly to a mutex corruption within `msft_do_close`, specifically when attempting to lock `msft->filter_lock`. The trace tells us the `DEBUG_LOCKS_WARN_ON` is triggered in the `__mutex_lock_common` function. We need to understand the sequence of events leading up to this point.

My initial thought is to examine the code changes around the introduction of this lock.  The commit `9e14606d8f38ea52a38c27692a9c1513c987a5da`, which I know off the top of my head is the commit that added address filters to the MSFT extension, is the likely culprit.

Looking at that commit, I see the following: `filter_lock` is introduced as a `struct mutex`, and initialized in `msft_register` using `mutex_init(&msft->filter_lock)`.  Critically, the sequence of operations within `msft_register` is now: `INIT_LIST_HEAD(&msft->address_filters); hdev->msft_data = msft; mutex_init(&msft->filter_lock);`. The important observation here is that `hdev->msft_data = msft` occurs *before* `mutex_init(&msft->filter_lock)`.

Now, if we consider that `msft_do_close` which is called from `hci_dev_close_sync` and eventually `hci_power_on` attempts to lock `msft->filter_lock` *after* the device data is assigned, and we consider that `hdev->msft_data` is initialized before the mutex. That does not sound right.

Let's quickly check what `msft_do_close` was like *before* this commit.  Reviewing the pre-`9e14606d8f38ea52a38c27692a9c1513c987a5da` version of `msft_do_close`, which I find in commit `5031ffcc79b81`, shows that it *did not* use the `filter_lock` at all.  It just iterated through the `handle_map` list. The important distinction is that `list_for_each_entry_safe` would not require a lock in the pre-`9e14606d8f38ea52a38c27692a9c1513c987a5da` commit.

So, here's what I am seeing: In the commit in question, the mutex is initialized *after* `hdev->msft_data = msft`. That's likely the cause. It is most likely that the data is not valid for `filter_lock` yet in the scenario.

Therefore, the fix is to move the assignment of `hdev->msft_data = msft;` after `mutex_init(&msft->filter_lock)` or to use `msft_register` to properly assign data. The former makes sense, for now.
To make sure nothing else has introduced another problem, I'll quickly look at the git log for relevant files like `net/bluetooth/msft.c` and `net/bluetooth/hci_core.c` around those functions to verify that no recent changes have introduced any new issues. I'll make sure there are no concurrent changes.



214/2 2026/08/27 21:22 tool git-log
0m Args:
map[Count:10 PathPrefix:net/bluetooth/msft.c]

Results:
map[Output:384a4b2fef9f Bluetooth: MGMT: Fix adv monitor add failure cleanup
bf4afc53b77a Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
69050f8d6d07 treewide: Replace kmalloc with kmalloc_obj for non-scalar types
6851a0c228fc Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
936daee9cf08 Bluetooth: Remove hci_request.{c,h}
10f9f426ac6e Bluetooth: msft: fix slab-use-after-free in msft_do_close()
a6e06258f4c3 Bluetooth: msft: Fix memory leak
41c56aa94c64 Bluetooth: msft: __hci_cmd_sync() doesn't return NULL
528b2acf434b Bluetooth: msft: Fix error code in msft_cancel_address_filter_sync()
9e14606d8f38 Bluetooth: msft: Extended monitor tracking by address filter
]

215/2 2026/08/27 21:22 llm fixes-finder
0m Model:
gemini-3.7-flash

Tokens:
							input: 28267
							output: 53
							thoughts: 33
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as a personal thought process, as requested:

**Checking Specific Hashes**

Right, so we've been looking at a particular data set, but I need to make sure we're not missing anything obvious. Let's not get tunnel vision. I've got to ensure we haven't overlooked any potentially related entries. I need to make a quick verification of these two hashes: `10f9f426ac6e` and `a6e06258f4c3`. They might be critical in this. They could either be key to some further analysis, or, at least, confirm that they aren't, thus saving me wasted effort further on. It's a quick check that could prevent me from chasing a rabbit down a hole later.



216/2 2026/08/27 21:22 tool git-show
0m Args:
map[Commit:10f9f426ac6e]

Results:
map[Output:commit 10f9f426ac6e752c8d87bf4346930ba347aaabac
Author: Sungwoo Kim <iam@sung-woo.kim>
Date:   Tue Apr 30 12:20:51 2024 -0400

    Bluetooth: msft: fix slab-use-after-free in msft_do_close()
    
    Tying the msft->data lifetime to hdev by freeing it in
    hci_release_dev() to fix the following case:
    
    [use]
    msft_do_close()
      msft = hdev->msft_data;
      if (!msft)                      ...(1) <- passed.
        return;
      mutex_lock(&msft->filter_lock); ...(4) <- used after freed.
    
    [free]
    msft_unregister()
      msft = hdev->msft_data;
      hdev->msft_data = NULL;         ...(2)
      kfree(msft);                    ...(3) <- msft is freed.
    
    ==================================================================
    BUG: KASAN: slab-use-after-free in __mutex_lock_common
    kernel/locking/mutex.c:587 [inline]
    BUG: KASAN: slab-use-after-free in __mutex_lock+0x8f/0xc30
    kernel/locking/mutex.c:752
    Read of size 8 at addr ffff888106cbbca8 by task kworker/u5:2/309
    
    Fixes: bf6a4e30ffbd ("Bluetooth: disable advertisement filters during suspend")
    Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a7028d38c1f5..bc5086423ab8 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2768,8 +2768,6 @@ void hci_unregister_dev(struct hci_dev *hdev)
 
 	hci_unregister_suspend_notifier(hdev);
 
-	msft_unregister(hdev);
-
 	hci_dev_do_close(hdev);
 
 	if (!test_bit(HCI_INIT, &hdev->flags) &&
@@ -2823,6 +2821,7 @@ void hci_release_dev(struct hci_dev *hdev)
 	hci_discovery_filter_clear(hdev);
 	hci_blocked_keys_clear(hdev);
 	hci_codec_list_clear(&hdev->local_codecs);
+	msft_release(hdev);
 	hci_dev_unlock(hdev);
 
 	ida_destroy(&hdev->unset_handle_ida);
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index 9612c5d1b13f..d039683d3bdd 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -769,7 +769,7 @@ void msft_register(struct hci_dev *hdev)
 	mutex_init(&msft->filter_lock);
 }
 
-void msft_unregister(struct hci_dev *hdev)
+void msft_release(struct hci_dev *hdev)
 {
 	struct msft_data *msft = hdev->msft_data;
 
diff --git a/net/bluetooth/msft.h b/net/bluetooth/msft.h
index 2a63205b377b..fe538e9c91c0 100644
--- a/net/bluetooth/msft.h
+++ b/net/bluetooth/msft.h
@@ -14,7 +14,7 @@
 
 bool msft_monitor_supported(struct hci_dev *hdev);
 void msft_register(struct hci_dev *hdev);
-void msft_unregister(struct hci_dev *hdev);
+void msft_release(struct hci_dev *hdev);
 void msft_do_open(struct hci_dev *hdev);
 void msft_do_close(struct hci_dev *hdev);
 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb);
@@ -35,7 +35,7 @@ static inline bool msft_monitor_supported(struct hci_dev *hdev)
 }
 
 static inline void msft_register(struct hci_dev *hdev) {}
-static inline void msft_unregister(struct hci_dev *hdev) {}
+static inline void msft_release(struct hci_dev *hdev) {}
 static inline void msft_do_open(struct hci_dev *hdev) {}
 static inline void msft_do_close(struct hci_dev *hdev) {}
 static inline void msft_vendor_evt(struct hci_dev *hdev, void *data,
]

217/2 2026/08/27 21:22 tool git-show
0m Args:
map[Commit:a6e06258f4c3]

Results:
map[Output:commit a6e06258f4c31eba0fcd503e19828b5f8fe7b08b
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Wed Feb 28 10:56:49 2024 -0500

    Bluetooth: msft: Fix memory leak
    
    Fix leaking buffer allocated to send MSFT_OP_LE_MONITOR_ADVERTISEMENT.
    
    Fixes: 9e14606d8f38 ("Bluetooth: msft: Extended monitor tracking by address filter")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index 630e3023273b..9612c5d1b13f 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -875,6 +875,7 @@ static int msft_add_address_filter_sync(struct hci_dev *hdev, void *data)
 		remove = true;
 		goto done;
 	}
+
 	cp->sub_opcode           = MSFT_OP_LE_MONITOR_ADVERTISEMENT;
 	cp->rssi_high		 = address_filter->rssi_high;
 	cp->rssi_low		 = address_filter->rssi_low;
@@ -887,6 +888,8 @@ static int msft_add_address_filter_sync(struct hci_dev *hdev, void *data)
 
 	skb = __hci_cmd_sync(hdev, hdev->msft_opcode, size, cp,
 			     HCI_CMD_TIMEOUT);
+	kfree(cp);
+
 	if (IS_ERR(skb)) {
 		bt_dev_err(hdev, "Failed to enable address %pMR filter",
 			   &address_filter->bdaddr);
]

218/2 2026/08/27 21:22 llm fixes-finder
0m Model:
gemini-3.7-flash

Tokens:
							input: 30404
							output: 36
							thoughts: 2098
						

Thoughts:
**Bug Analysis: Uninitialized Mutex in Bluetooth MSFT Extension**

Okay, let's break this down. The core issue appears to be an uninitialized mutex, triggering a lock warning. My immediate thought is to trace the introduction of this mutex and its usage in relation to the device's initialization and closure routines.

First, I reviewed the crash log and the explanation points to a race condition during HCI device registration, specifically with the MSFT extension data initialization and the `power_on` workqueue. The warning `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` immediately screams "uninitialized mutex" to me.

My focus goes to determining which commit introduced this mutex and whether there was a change in the initialization order that is causing the lock to be uninitialized.

Before the introduction of the mutex, the MSFT extension's `msft_register` function simply allocated memory for the `msft_data` structure and initialized a list head (`handle_map`). The `msft_do_close` function iterates over the `handle_map` without any locking.

Now, after commit `9e14606d8f38e`, a mutex `filter_lock` was added to `msft_data`. Looking closely, `msft_register` *now* initializes this mutex. However, I can already see the problem! The key lies in the order of operations within `msft_register`: `hdev->msft_data = msft;` is performed *before* `mutex_init(&msft->filter_lock);`.

This is a red flag. If `msft_do_close` is called *before* `mutex_init` is called, we'll hit the uninitialized mutex issue. It's likely that, even if `mutex_init` is run before `hdev->msft_data = msft;`, if `queue_work` is called, `msft_do_close` could still be run before `msft_register` is finished.  The timing of the `power_on` workqueue relative to the `msft_register` call is critical here.

I then went back and verified this wasn't an issue in an earlier commit by looking at commit `5031ffcc79b81`. It seemed safe because `hdev->msft_data` was assigned after the allocation and `INIT_LIST_HEAD` but before the actual call to `idr_init`. There are no mutexes at all!

The issue, therefore, seems to be a direct consequence of commit `9e14606d8f38e`, specifically the introduction of the `filter_lock` mutex and, critically, the order in which the mutex is initialized relative to the assignment of `hdev->msft_data`.

I confirmed the relevant commit is indeed `9e14606d8f38ea52a38c27692a9c1513c987a5da` by checking the subject, author, and date.
I would also read `net/bluetooth/msft.c` around line 693 to check if the code around the lock makes sense.



219/2 2026/08/27 21:22 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:670 LineCount:50]

Results:
map[Contents: 670:		struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
 671:		struct msft_monitor_addr_filter_data *address_filter, *n;
 672:		struct adv_monitor *monitor;
 673:	
 674:		if (!msft)
 675:			return;
 676:	
 677:		bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 678:	
 679:		/* The controller will silently remove all monitors on power off.
 680:		 * Therefore, remove handle_data mapping and reset monitor state.
 681:		 */
 682:		list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 683:			monitor = idr_find(&hdev->adv_monitors_idr,
 684:					   handle_data->mgmt_handle);
 685:	
 686:			if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED)
 687:				monitor->state = ADV_MONITOR_STATE_REGISTERED;
 688:	
 689:			list_del(&handle_data->list);
 690:			kfree(handle_data);
 691:		}
 692:	
 693:		mutex_lock(&msft->filter_lock);
 694:		list_for_each_entry_safe(address_filter, n, &msft->address_filters,
 695:					 list) {
 696:			list_del(&address_filter->list);
 697:			kfree(address_filter);
 698:		}
 699:		mutex_unlock(&msft->filter_lock);
 700:	
 701:		hci_dev_lock(hdev);
 702:	
 703:		/* Clear any devices that are being monitored and notify device lost */
 704:		hdev->advmon_pend_notify = false;
 705:		msft_monitor_device_del(hdev, 0, NULL, 0, true);
 706:	
 707:		hci_dev_unlock(hdev);
 708:	}
 709:	
 710:	static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
 711:	{
 712:		struct msft_monitor_addr_filter_data *address_filter = data;
 713:		struct msft_cp_le_cancel_monitor_advertisement cp;
 714:		struct msft_data *msft = hdev->msft_data;
 715:		struct sk_buff *skb;
 716:		int err = 0;
 717:	
 718:		if (!msft) {
 719:			bt_dev_err(hdev, "MSFT: msft data is freed");
]

220/2 2026/08/27 21:22 llm fixes-finder
0m Model:
gemini-3.7-flash

Tokens:
							input: 34048
							output: 55
							thoughts: 348
						

Thoughts:
**Analyzing the Bluesmoke Driver and Identifying a Potential Regression**

Okay, so line 693 in `net/bluetooth/msft.c` is where the crash is happening, specifically at `mutex_lock(&msft->filter_lock);`. The stack trace, `msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693`, confirms this pinpoint accuracy.

Looking at the code around `msft_register`, it's clear we initialize `msft->filter_lock` with `mutex_init`. So, the core data structure is set up as expected.

`msft_register` looks perfectly fine.

Based on the evidence, the line and trace point directly to commit `9e14606d8f38ea52a38c27692a9c1513c987a5da` as the culprit. I'm going to set `9e14606d8f38ea52a38c27692a9c1513c987a5da` as the result.



221/2 2026/08/27 21:23 tool set-results
0m Args:
map[FixesHash:9e14606d8f38ea52a38c27692a9c1513c987a5da]

Results:
map[FixesHash:9e14606d8f38ea52a38c27692a9c1513c987a5da]

222/1 2026/08/27 21:23 action format-fixes
0m Results:
map[Fixes:map[AuthorEmail:hildawu@realtek.com AuthorName:Hilda Wu Hash:9e14606d8f38ea52a38c27692a9c1513c987a5da Title:Bluetooth: msft: Extended monitor tracking by address filter]]

223/1 2026/08/27 21:23 action get-maintainers
0m Results:
map[Recipients:[map[Email:linux-bluetooth@vger.kernel.org Name: To:true] map[Email:linux-kernel@vger.kernel.org Name: To:false] map[Email:luiz.dentz@gmail.com Name:Luiz Augusto von Dentz To:true] map[Email:marcel@holtmann.org Name:Marcel Holtmann To:true] map[Email:hildawu@realtek.com Name:Hilda Wu To:true]]]

224/1 2026/08/27 21:23 action get-recent-commits
0m Results:
map[RecentCommits:Bluetooth: MGMT: Fix adv monitor add failure cleanup
Bluetooth: Add SPDX id lines to some source files
Bluetooth: hci_core: Fix UAF in hci_unregister_dev()
Bluetooth: hci_core: Rework hci_dev_do_reset() to use hci_sync functions
Bluetooth: hci_core: Rate limit the logging of invalid ISO handle
Bluetooth: hci_sync: annotate data-races around hdev->req_status
Convert 'alloc_flex' family to use the new default GFP_KERNEL argument
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
Bluetooth: hci_core: Export hci_discovery_active
Bluetooth: hci_core: lookup hci_conn on RX path on protocol side
Bluetooth: hci_core: Fix triggering cmd_timer for HCI_OP_NOP
Bluetooth: hci_core: Print information of hcon on hci_low_sent
Bluetooth: hci_core: Print number of packets in conn->data_q
Bluetooth: hci_core: Detect if an ISO link has stalled
Bluetooth: HCI: Fix using LE/ACL buffers for ISO packets
Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections
Bluetooth: hci_core: Eliminate an unnecessary goto label in hci_find_irk_by_addr()
Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
Bluetooth: hci_core: Fix use-after-free in vhci_flush()
]

225/1 2026/08/27 21:23 agent description-generator
2m Model:
core

Instruction:
You are an experienced Linux kernel developer tasked with writing a commit description for
a kernel bug fixing commit. The description should start with a one-line summary,
and then include description of the bug being fixed, and how it's fixed by the provided patch.
The one-line summary should describe the change being made, rather than mention the tool that
detected the bug.

The description must not contain lines starting with '#' because they will dropped by git as comments.
The description must not contain lines starting with '--' or '---' (including inline code diffs)
because they may confuse git/patch utilities.

Your final reply should contain only the text of the commit description.


The one-line summary must be not longer than 72 characters.

IMPORTANT: Do not wrap lines manually (e.g., at 80 characters); we will reformat the text
automatically, so keep paragraphs as single lines without newlines.

Generally try to phrase the description without mentioning syzkaller
(avoid phrases like "the bug was triggered by syzkaller" or "the bug was triggered by fuzzer", etc).
How the bug was triggered is generally an irrelevant detail.
Any bug triggered by a fuzzer can also be triggered by a malicious user, or a buggy program.

If the crash is reported by a sanitizer (e.g., KASAN, KMSAN, lockdep), include the relevant
parts of the sanitizer output to illustrate the problem. Exclude less relevant sections,
as the stack trace can be very long. Describe the execution path that leads to the manifestation
of the kernel bug.


If the patch removes the WARN_ON macro, refer to the fact that WARN_ON
must not be used for conditions that can legitimately happen, and that pr_err
should be used instead if necessary.

Don't assume that panic_on_warn is set, and that WARNINGs are fatal.
While panic_on_warn may be set when the bug was reproduced, it's generally not set on production systems.


Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash that corresponds to the bug is:

------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#1: kworker/u11:2/5607
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#1: kworker/u11:2/5607
Modules linked in:
CPU: 1 UID: 0 PID: 5607 Comm: kworker/u11:2 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: hci3 hci_power_on
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 29 61 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d c5 f7 aa 04 00 75 13 48 8d 3d a8 43 ae 04 48 c7 c6 c0 c5 cd 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc90004547720 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888115658000
RDX: 0000000000000000 RSI: ffffffff8bcdc5c0 RDI: ffffffff90647540
RBP: ffffc900045478b0 R08: ffffffff90612953 R09: 1ffffffff20c252a
R10: dffffc0000000000 R11: fffffbfff20c252b R12: ffff88818c5d3a40
R13: 0000000000000000 R14: 1ffff920008a8ef8 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8882e86de000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd706dfc30 CR3: 0000000118cf8000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	29 61 90             	sub    %esp,-0x70(%rcx)
   3:	48 c1 e8 03          	shr    $0x3,%rax
   7:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax
   b:	84 c0                	test   %al,%al
   d:	0f 85 47 02 00 00    	jne    0x25a
  13:	83 3d c5 f7 aa 04 00 	cmpl   $0x0,0x4aaf7c5(%rip)        # 0x4aaf7df
  1a:	75 13                	jne    0x2f
  1c:	48 8d 3d a8 43 ae 04 	lea    0x4ae43a8(%rip),%rdi        # 0x4ae43cb
  23:	48 c7 c6 c0 c5 cd 8b 	mov    $0xffffffff8bcdc5c0,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	90                   	nop
  30:	e9 75 ee ff ff       	jmp    0xffffeeaa
  35:	90                   	nop
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	e9 48 f2 ff ff       	jmp    0xfffff286
  3e:	90                   	nop
  3f:	0f                   	.byte 0xf




The explanation of the root cause of the bug is:

This crash is caused by a race condition during the registration of a new Bluetooth HCI device, specifically between the initialization of the Microsoft (MSFT) extension data and the execution of the device's `power_on` workqueue.

### Root Cause Analysis

1. **Triggering the Bug**: The syzkaller reproducer creates a Virtual HCI device (`/dev/vhci`) and writes a vendor packet with opcode `0x80` (`\xff\x80`). In `__vhci_create_device()`, this specific opcode sets the `HCI_QUIRK_RAW_DEVICE` quirk on the new HCI device and then calls `hci_register_dev(hdev)`.
2. **Device Registration**: Inside `hci_register_dev()` (`net/bluetooth/hci_core.c`), because the `HCI_QUIRK_RAW_DEVICE` quirk is set, the device is marked with the `HCI_UNCONFIGURED` flag.
3. **The Race Condition**: Towards the end of `hci_register_dev()`, the code queues the `power_on` work **before** fully initializing the device's MSFT extension and IDR:
   ```c
   	queue_work(hdev->req_workqueue, &hdev->power_on); // <--- Work is queued here

   	idr_init(&hdev->adv_monitors_idr);
   	msft_register(hdev);                              // <--- MSFT initialized here
   ```
4. **Concurrent Execution**: As soon as `queue_work()` is called, the `power_on` work can start executing concurrently on another CPU, invoking `hci_power_on()`. 
5. **Closing the Unconfigured Device**: Inside `hci_power_on()`, it checks if the device is unconfigured. Since `HCI_UNCONFIGURED` is set, it immediately bails out and calls `hci_dev_do_close(hdev)`, which in turn calls `hci_dev_close_sync(hdev)` and finally `msft_do_close(hdev)`.
6. **Uninitialized Mutex Access**: Concurrently, the original thread is executing `msft_register(hdev)` (`net/bluetooth/msft.c`):
   ```c
   	msft = kzalloc_obj(*msft);
   	// ...
   	INIT_LIST_HEAD(&msft->handle_map);
   	INIT_LIST_HEAD(&msft->address_filters);
   	hdev->msft_data = msft;               // <--- Pointer is exposed
   	mutex_init(&msft->filter_lock);       // <--- Mutex initialized AFTER exposure
   ```
   If `msft_do_close()` reads `hdev->msft_data` after it has been assigned but *before* `mutex_init()` is called, it will see a non-NULL pointer and attempt to lock the uninitialized (zeroed) mutex:
   ```c
   	mutex_lock(&msft->filter_lock);
   ```
   Locking an uninitialized mutex triggers the `DEBUG_LOCKS_WARN_ON(lock->magic != lock)` warning seen in the crash log.

### Proposed Fix

To fix this issue, two changes should be made to ensure proper initialization ordering:

**1. Fix the initialization order in `hci_register_dev`:**
The device must be fully initialized before any work that might use it is scheduled. Move `idr_init()` and `msft_register()` to be called *before* `queue_work()`.

```c
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2631,10 +2631,10 @@ int hci_register_dev(struct hci_dev *hdev)
 		if (error)
 			BT_WARN("register suspend notifier failed error:%d\n", error);
 
-		queue_work(hdev->req_workqueue, &hdev->power_on);
-
 		idr_init(&hdev->adv_monitors_idr);
 		msft_register(hdev);
 
+		queue_work(hdev->req_workqueue, &hdev->power_on);
+
 		return id;
```

**2. Fix the pointer exposure in `msft_register`:**
As a defensive measure, `hdev->msft_data` should only be assigned *after* the structure is fully initialized. This prevents any concurrent readers from observing a partially initialized state.

```c
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,6 +764,6 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
```

The diff of the bug fix is:

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5ba9fe826..771b73c99 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2629,11 +2629,11 @@ int hci_register_dev(struct hci_dev *hdev)
 	if (error)
 		BT_WARN("register suspend notifier failed error:%d\n", error);
 
-	queue_work(hdev->req_workqueue, &hdev->power_on);
-
 	idr_init(&hdev->adv_monitors_idr);
 	msft_register(hdev);
 
+	queue_work(hdev->req_workqueue, &hdev->power_on);
+
 	return id;
 
 err_wqueue:
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index d7badce87..255163033 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -764,8 +764,8 @@ void msft_register(struct hci_dev *hdev)
 
 	INIT_LIST_HEAD(&msft->handle_map);
 	INIT_LIST_HEAD(&msft->address_filters);
-	hdev->msft_data = msft;
 	mutex_init(&msft->filter_lock);
+	hdev->msft_data = msft;
 }
 
 void msft_release(struct hci_dev *hdev)


Additional description of the patch:

### Summary of Changes

1. **Reorder Device Registration and Workqueue Scheduling (`net/bluetooth/hci_core.c`):**
   In `hci_register_dev()`, scheduling `&hdev->power_on` on the request workqueue was previously done *before* initializing the advertisement monitor IDR (`idr_init(&hdev->adv_monitors_idr)`) and Microsoft extension state (`msft_register(hdev)`). For devices marked with quirks like `HCI_QUIRK_RAW_DEVICE` (flagged as `HCI_UNCONFIGURED`), the asynchronously scheduled `hci_power_on` worker immediately triggers `hci_dev_do_close()` and `msft_do_close()`. By moving `queue_work(hdev->req_workqueue, &hdev->power_on)` to after `idr_init()` and `msft_register()`, the device data structures and extensions are guaranteed to be fully initialized before any asynchronous work or cleanup routines can access them.

2. **Publish MSFT Extension State After Complete Initialization (`net/bluetooth/msft.c`):**
   In `msft_register()`, `hdev->msft_data = msft;` was previously assigned before initializing the `filter_lock` mutex (`mutex_init(&msft->filter_lock)`). This exposed a partially initialized `struct msft_data` instance to concurrent teardown and callback paths (such as `msft_do_close()`), resulting in a lock attempt on an uninitialized mutex (`DEBUG_LOCKS_WARN_ON(lock->magic != lock)`). We moved the assignment `hdev->msft_data = msft;` to the very end of `msft_register()` after all list heads and mutexes have been initialized.

Here are summaries of recent commits that touched the same files.
Format the summary line consistently with these, look how prefixes
are specified, letter capitalization, style, etc. 

Bluetooth: MGMT: Fix adv monitor add failure cleanup
Bluetooth: Add SPDX id lines to some source files
Bluetooth: hci_core: Fix UAF in hci_unregister_dev()
Bluetooth: hci_core: Rework hci_dev_do_reset() to use hci_sync functions
Bluetooth: hci_core: Rate limit the logging of invalid ISO handle
Bluetooth: hci_sync: annotate data-races around hdev->req_status
Convert 'alloc_flex' family to use the new default GFP_KERNEL argument
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
Bluetooth: hci_core: Export hci_discovery_active
Bluetooth: hci_core: lookup hci_conn on RX path on protocol side
Bluetooth: hci_core: Fix triggering cmd_timer for HCI_OP_NOP
Bluetooth: hci_core: Print information of hcon on hci_low_sent
Bluetooth: hci_core: Print number of packets in conn->data_q
Bluetooth: hci_core: Detect if an ISO link has stalled
Bluetooth: HCI: Fix using LE/ACL buffers for ISO packets
Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections
Bluetooth: hci_core: Eliminate an unnecessary goto label in hci_find_irk_by_addr()
Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
Bluetooth: hci_core: Fix use-after-free in vhci_flush()


Reply:
Bluetooth: hci_core: Fix race condition during device registration

In hci_register_dev(), the power_on work item is queued to
hdev->req_workqueue before initializing hdev->adv_monitors_idr and
registering the MSFT extension via msft_register(). For devices marked with
quirks such as HCI_QUIRK_RAW_DEVICE, the HCI_UNCONFIGURED flag is set on
the device. When the power_on work item runs concurrently on another CPU,
hci_power_on() detects that the device is unconfigured and immediately
invokes hci_dev_do_close(), which calls msft_do_close().

Concurrently, msft_register() allocates the msft structure and exposes it
to hdev->msft_data prior to calling mutex_init(&msft->filter_lock). If
msft_do_close() executes while hdev->msft_data is already assigned but the
mutex has not yet been initialized, mutex_lock(&msft->filter_lock) operates
on an uninitialized mutex, triggering a DEBUG_LOCKS warning:

DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common
kernel/locking/mutex.c:625 [inline]
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550
kernel/locking/mutex.c:821
...
Call Trace:
 <TASK>
 msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693
 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522
 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline]
 hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Fix this by moving the queue_work() call in hci_register_dev() to after
idr_init(&hdev->adv_monitors_idr) and msft_register(hdev) so that device
structures and extensions are fully initialized before asynchronous tasks
can access them. Additionally, assign hdev->msft_data in msft_register()
only after mutex_init(&msft->filter_lock) has completed.

226/2 2026/08/27 21:23 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 8164
							output: 23
							thoughts: 978
						

Thoughts:
**Crafting the Bluetooth Commit Description**

Okay, the task is to craft a concise and accurate commit description for this Bluetooth subsystem bug fix. I need to adhere strictly to the guidelines: a 72-character or less summary line, avoiding specific keywords like "syzkaller" or "fuzzer," and formatting the description appropriately without line wrapping. The goal is to provide enough information for a reviewer or a future developer to understand the problem and the solution.

First, I examined the crash log. It's a `DEBUG_LOCKS_WARN_ON` triggered by a mutex issue within `msft_do_close`. The call trace leads from `msft_do_close` through `hci_dev_close_sync` and `hci_power_on`, hinting at a synchronization problem during device closure. The key is to convey this specific sequence of events concisely. I'll need to phrase this without getting bogged down in the intricacies of the exact work queue and kthread context. The mutex is the core issue.

Now, I'll review recent commit titles within the Bluetooth subsystem, focusing on `msft` and `hci_core` to establish a proper stylistic consistency. It looks like the most relevant commits are prefixed with `Bluetooth: hci_core:` or `Bluetooth:`. Length is key, so I'll shoot for the former for precision. I'll also ensure that the description avoids any lines that might conflict with git's parsing, such as those beginning with '#' or '--'. I should focus on describing the problem concisely.

Based on this analysis, I'll construct the commit description.



227/2 2026/08/27 21:23 tool git-log
0m Args:
map[Count:5 PathPrefix:net/bluetooth]

Results:
map[Output:abd93c85c866 Bluetooth: SCO: give the socket its own sco_conn reference
c0a9dcd2be39 Bluetooth: hci_sync: remove unnecessary hci_conn_get in create_conn_sync
2c1e4e00613d Bluetooth: hci_sync: fix hci_conn_del() use in hci_le_create_conn_sync
abf9753edf3f Bluetooth: hci_sync: hold conn in hci_past_sync() callback
44fc74069d89 Bluetooth: hci_sync: hold conn in hci_connect_pa_sync() callback
]

228/2 2026/08/27 21:23 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 9664
							output: 28
							thoughts: 29
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as a personal thought process, as requested:

**Investigating Bluetooth Driver Changes**

Alright, time to dig into what's been happening in the Bluetooth subsystem. I need to get a clear picture of recent modifications, specifically within the Microsoft-specific code, so `net/bluetooth/msft.c` is on my radar, and of course, I need to understand any changes that might have impacted the core HCI layer, so `net/bluetooth/hci_core.c` is the other file of interest. Let's start with a deep dive into the Git logs for those two files. I'm hoping to spot any patterns, identify the contributing developers, and understand the motivations behind the updates. Grabbing that `git log` should tell the story... hopefully, the commit messages are descriptive enough! This is going to be good.



229/2 2026/08/27 21:23 tool git-log
0m Args:
map[Count:5 PathPrefix:net/bluetooth/msft.c]

Results:
map[Output:384a4b2fef9f Bluetooth: MGMT: Fix adv monitor add failure cleanup
bf4afc53b77a Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
69050f8d6d07 treewide: Replace kmalloc with kmalloc_obj for non-scalar types
6851a0c228fc Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap
936daee9cf08 Bluetooth: Remove hci_request.{c,h}
]

230/2 2026/08/27 21:23 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 10054
							output: 26
							thoughts: 207
						

Thoughts:
**Title Selection & Scope Assessment**

Okay, let's nail down this commit title. I've got a few options floating around: "Bluetooth: Fix race condition during HCI device registration" (59 chars), "Bluetooth: hci_core: Fix race during device registration" (56 chars), "Bluetooth: hci_core: Fix race condition in hci_register_dev()" (61 chars), and "Bluetooth: Fix race condition in hci_register_dev()" (52 chars). Hmm, considering the scope, I think the critical elements are *race condition*, *device registration*, and the fact that it's in the *hci_core* area.

Now, let's verify if the patch touches both `net/bluetooth/hci_core.c` and `net/bluetooth/msft.c`. Yes, it does. Okay, that helps narrow it down. Based on that, I'm leaning towards "Bluetooth: hci_core: Fix race condition in hci_register_dev()" or perhaps just "Bluetooth: Fix race condition in hci_register_dev()". Let's run a quick `git log` search using `Bluetooth: Fix ...` and `Bluetooth: hci_core: Fix ...` to see what's been used historically to see if there's a convention that I should follow.



231/2 2026/08/27 21:23 tool git-log
0m Args:
map[Count:10 MessageRegexps:[Bluetooth:.*race]]

Results:
map[Output:af24e338bf5d Bluetooth: ISO: fix race of kfree vs kref_get_unless_zero
0f8a5dcc6664 Bluetooth: sco: Fix a race condition in sco_sock_timeout()
1b0d946d6f08 Bluetooth: hci_uart: clear HCI_UART_SENDING when write_work is canceled
4847c5bca222 Bluetooth: SCO: Fix data-race on sco_pi fields in sco_connect
9ca7053d6215 Bluetooth: ISO: Fix data-race on iso_pi fields in hci_get_route calls
c1bb9336ae6b Bluetooth: hci_uart: fix UAFs and race conditions in close and init paths
f958c7805b18 Bluetooth: ISO: Fix data-race on iso_pi(sk) in socket and HCI event paths
ca40d481079c Bluetooth: ISO: Fix data-race on dst in iso_sock_connect()
68d39ea5e0ad Bluetooth: hci_ldisc: Clear HCI_UART_PROTO_INIT on error
0ffac654e95c Bluetooth: hci_h4: Fix race during initialization
]

232/2 2026/08/27 21:23 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 10872
							output: 25
							thoughts: 16
						

Thoughts:
Here's my take on those thoughts, tailored for an expert audience:

**Analyzing Bluetooth Commit Styles for Best Practices**

Alright, let's dive in. I'm thinking I should take a look at the commit messages within the `net/bluetooth` subsystem. I want to see how the established maintainers are handling their commit formatting, granularity, and particularly how they're framing the "why" behind their changes, not just the "what." This isn't just about syntax; I'm looking for patterns in how they structure the messages to convey complex technical rationale concisely. Are they emphasizing problem-solution frameworks? Are they linking to relevant RFCs or bug trackers effectively? What level of detail do they aim for, knowing the audience is presumably other Bluetooth experts and kernel developers? I want to see if I can adopt and improve these best practices for my own contributions and to encourage consistency across the project, including where some improvements can be made, or where I can suggest a novel methodology. This is about building a better, clearer, more maintainable commit history – something that’s crucial for collaboration and the long-term health of any complex codebase, especially one as intricate as the Bluetooth stack.



233/2 2026/08/27 21:23 tool git-show
0m Args:
map[Commit:c1bb9336ae6b]

Results:
map[Output:commit c1bb9336ae6b54a5f6a353c4bd4ed9a4307e429b
Author: Mingyu Wang <25181214217@stu.xidian.edu.cn>
Date:   Mon May 18 10:49:49 2026 +0800

    Bluetooth: hci_uart: fix UAFs and race conditions in close and init paths
    
    Vulnerabilities leading to Use-After-Free (UAF) and Null Pointer
    Dereference (NPD) conditions were observed in the lifecycle management
    of hci_uart.
    
    The primary issue arises because the workqueues (init_ready and
    write_work) are only flushed/cancelled if the HCI_UART_PROTO_READY
    flag is set during TTY close. If a hangup occurs before setup completes,
    hci_uart_tty_close() skips the teardown of these workqueues and
    proceeds to free the `hu` struct. When the scheduled work executes
    later, it blindly dereferences the freed `hu` struct.
    
    Furthermore, several data races and UAFs were identified in the teardown
    sequence:
    1. Calling hci_uart_flush() from hci_uart_close() without effectively
       disabling write_work causes a race condition where both can concurrently
       double-free hu->tx_skb. This happens because protocol timers can
       concurrently invoke hci_uart_tx_wakeup() and requeue write_work.
    2. Calling hci_free_dev(hdev) before hu->proto->close(hu) causes a UAF
       when vendor specific protocol close callbacks dereference hu->hdev.
    3. In the initialization error paths, failing to take the proto_lock
       write lock before clearing PROTO_READY leads to races with active
       readers. Additionally, hci_uart_tty_receive() accesses hu->hdev
       outside the read lock, leading to UAFs if the initialization error
       path frees hdev concurrently.
    
    Fix these synchronization and lifecycle issues by:
    1. Re-ordering hci_uart_tty_close() to clear HCI_UART_PROTO_READY first,
       followed immediately by a cancel_work_sync(&hu->write_work). Clearing
       the flag locks out concurrent protocol timers from successfully invoking
       hci_uart_tx_wakeup(), effectively rendering the cancellation permanent
       and preventing the tx_skb double-free.
    2. Note: Clearing PROTO_READY early causes hci_uart_close() to skip
       hu->proto->flush(). This is perfectly safe in the tty_close path
       because hu->proto->close() executes shortly after, which intrinsically
       purges all protocol SKB queues and tears down the state.
    3. Relocating hu->proto->close(hu) strictly prior to hci_free_dev(hdev)
       across all close and error paths to prevent vendor-level UAFs.
    4. Moving the hdev->stat.byte_rx increment in hci_uart_tty_receive()
       inside the proto_lock read-side critical section to safely synchronize
       with device unregistration.
    5. Adding cancel_work_sync(&hu->write_work) to hci_uart_close() to safely
       flush the workqueue before hci_uart_flush() is invoked via the HCI core.
    6. Utilizing cancel_work_sync() instead of disable_work_sync() across
       all paths to prevent permanently breaking user-space retry capabilities.
    
    Fixes: 3b799254cf6f ("Bluetooth: hci_uart: Cancel init work before unregistering")
    Cc: stable@vger.kernel.org
    Signed-off-by: Mingyu Wang <25181214217@stu.xidian.edu.cn>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 275ea865bc29..47f4902b40b4 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -194,7 +194,15 @@ void hci_uart_init_work(struct work_struct *work)
 	err = hci_register_dev(hu->hdev);
 	if (err < 0) {
 		BT_ERR("Can't register HCI device");
+
+		percpu_down_write(&hu->proto_lock);
 		clear_bit(HCI_UART_PROTO_READY, &hu->flags);
+		percpu_up_write(&hu->proto_lock);
+
+		/* Safely cancel work after clearing flags */
+		cancel_work_sync(&hu->write_work);
+
+		/* Close protocol before freeing hdev */
 		hu->proto->close(hu);
 		hdev = hu->hdev;
 		hu->hdev = NULL;
@@ -263,8 +271,12 @@ static int hci_uart_open(struct hci_dev *hdev)
 /* Close device */
 static int hci_uart_close(struct hci_dev *hdev)
 {
+	struct hci_uart *hu = hci_get_drvdata(hdev);
+
 	BT_DBG("hdev %p", hdev);
 
+	cancel_work_sync(&hu->write_work);
+
 	hci_uart_flush(hdev);
 	hdev->flush = NULL;
 	return 0;
@@ -531,6 +543,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
 {
 	struct hci_uart *hu = tty->disc_data;
 	struct hci_dev *hdev;
+	bool proto_ready;
 
 	BT_DBG("tty %p", tty);
 
@@ -540,24 +553,38 @@ static void hci_uart_tty_close(struct tty_struct *tty)
 	if (!hu)
 		return;
 
-	hdev = hu->hdev;
-	if (hdev)
-		hci_uart_close(hdev);
+	/* Wait for init_ready to finish to prevent registration races */
+	cancel_work_sync(&hu->init_ready);
 
-	if (test_bit(HCI_UART_PROTO_READY, &hu->flags)) {
+	proto_ready = test_bit(HCI_UART_PROTO_READY, &hu->flags);
+	if (proto_ready) {
 		percpu_down_write(&hu->proto_lock);
 		clear_bit(HCI_UART_PROTO_READY, &hu->flags);
 		percpu_up_write(&hu->proto_lock);
+	}
 
-		cancel_work_sync(&hu->init_ready);
-		cancel_work_sync(&hu->write_work);
+	/*
+	 * Unconditionally cancel write_work AFTER clearing PROTO_READY.
+	 * This ensures that concurrent protocol timers cannot requeue
+	 * write_work via hci_uart_tx_wakeup(), permanently preventing
+	 * double-free races and UAFs.
+	 */
+	cancel_work_sync(&hu->write_work);
+
+	hdev = hu->hdev;
+	if (hdev)
+		hci_uart_close(hdev); /* proto->flush is safely skipped */
 
+	if (proto_ready) {
 		if (hdev) {
 			if (test_bit(HCI_UART_REGISTERED, &hu->flags))
 				hci_unregister_dev(hdev);
-			hci_free_dev(hdev);
 		}
+		/* Close protocol before freeing hdev (intrinsically purges queues) */
 		hu->proto->close(hu);
+
+		if (hdev)
+			hci_free_dev(hdev);
 	}
 	clear_bit(HCI_UART_PROTO_SET, &hu->flags);
 
@@ -625,11 +652,12 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
 	 * tty caller
 	 */
 	hu->proto->recv(hu, data, count);
-	percpu_up_read(&hu->proto_lock);
 
 	if (hu->hdev)
 		hu->hdev->stat.byte_rx += count;
 
+	percpu_up_read(&hu->proto_lock);
+
 	tty_unthrottle(tty);
 }
 
@@ -695,6 +723,10 @@ static int hci_uart_register_dev(struct hci_uart *hu)
 		percpu_down_write(&hu->proto_lock);
 		clear_bit(HCI_UART_PROTO_INIT, &hu->flags);
 		percpu_up_write(&hu->proto_lock);
+		/* Cancel work after clearing flags */
+		cancel_work_sync(&hu->write_work);
+
+		/* Close protocol before freeing hdev */
 		hu->proto->close(hu);
 		hu->hdev = NULL;
 		hci_free_dev(hdev);
]

234/2 2026/08/27 21:23 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 13453
							output: 38
							thoughts: 811
						

Thoughts:
**Analyzing a Bluetooth Race Condition**

Okay, let's break this down. First, the one-line summary. It needs to be under 72 characters and capture the essence of the fix. I've got a few options: "Bluetooth: Fix race condition during HCI device registration" (59 chars), "Bluetooth: hci_core: Fix race condition in hci_register_dev()" (61 chars) or "Bluetooth: hci_core: Fix race during device registration" (56 chars). I'll go with "Bluetooth: hci_core: Fix race condition during device registration" because it's the most descriptive and fits the character limit at 67.

Now, for the description. I need to explain the bug and how the patch resolves it, without any line wrapping and omitting lines starting with '#' or '--' or '---'. It's important to keep the paragraphs as single lines. I have the crash log to help illustrate the problem, and I'll need to use it.

Looking at the crash log, I can see a `DEBUG_LOCKS_WARN_ON` indicating a lock corruption issue, specifically with a mutex. The stack trace points to `msft_do_close`, then `hci_dev_close_sync`, and eventually to `hci_power_on` and `hci_register_dev`. This suggests a race condition is occurring related to device registration during closing or power operations.

To fully grasp the context, I need to understand the code flow, so I'll need to examine `hci_register_dev` in `net/bluetooth/hci_core.c` and `msft_register` in `net/bluetooth/msft.c`. I'll keep the description focused on the bug, the fix, and the code sections involved without mentioning specifics of syzkaller if possible. Based on the crash log and the function names, I understand that the issue relates to a race condition.



235/2 2026/08/27 21:23 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:2620 LineCount:40]

Results:
map[Contents:2620:		 * callback.
2621:		 */
2622:		if (hdev->wakeup)
2623:			hdev->conn_flags |= HCI_CONN_FLAG_REMOTE_WAKEUP;
2624:	
2625:		hci_sock_dev_event(hdev, HCI_DEV_REG);
2626:		hci_dev_hold(hdev);
2627:	
2628:		error = hci_register_suspend_notifier(hdev);
2629:		if (error)
2630:			BT_WARN("register suspend notifier failed error:%d\n", error);
2631:	
2632:		queue_work(hdev->req_workqueue, &hdev->power_on);
2633:	
2634:		idr_init(&hdev->adv_monitors_idr);
2635:		msft_register(hdev);
2636:	
2637:		return id;
2638:	
2639:	err_wqueue:
2640:		debugfs_remove_recursive(hdev->debugfs);
2641:		destroy_workqueue(hdev->workqueue);
2642:		destroy_workqueue(hdev->req_workqueue);
2643:	err:
2644:		ida_free(&hci_index_ida, hdev->id);
2645:	
2646:		return error;
2647:	}
2648:	EXPORT_SYMBOL(hci_register_dev);
2649:	
2650:	/* Unregister HCI device */
2651:	void hci_unregister_dev(struct hci_dev *hdev)
2652:	{
2653:		BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
2654:	
2655:		mutex_lock(&hdev->unregister_lock);
2656:		hci_dev_set_flag(hdev, HCI_UNREGISTER);
2657:		mutex_unlock(&hdev->unregister_lock);
2658:	
2659:		write_lock(&hci_dev_list_lock);
]

236/2 2026/08/27 21:23 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 15315
							output: 36
							thoughts: 21
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into `msft_register`**

Okay, time to get to the heart of the matter. I need to understand how the Microsoft extensions are being integrated within the Bluetooth stack, so I'm going to jump straight into the code. Let's start by examining the `msft_register` function, and it looks like it's located in the `net/bluetooth/msft.c` file. I'm hoping to quickly grasp its role, understand how it's called, and what its dependencies are. It's likely a critical entry point for handling Microsoft-specific quirks or functionalities, and I need to figure out what it's doing under the hood. Hopefully, the code comments are descriptive enough.



237/2 2026/08/27 21:24 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:750 LineCount:35]

Results:
map[Contents: 750:		return err;
 751:	}
 752:	
 753:	void msft_register(struct hci_dev *hdev)
 754:	{
 755:		struct msft_data *msft = NULL;
 756:	
 757:		bt_dev_dbg(hdev, "Register MSFT extension");
 758:	
 759:		msft = kzalloc_obj(*msft);
 760:		if (!msft) {
 761:			bt_dev_err(hdev, "Failed to register MSFT extension");
 762:			return;
 763:		}
 764:	
 765:		INIT_LIST_HEAD(&msft->handle_map);
 766:		INIT_LIST_HEAD(&msft->address_filters);
 767:		hdev->msft_data = msft;
 768:		mutex_init(&msft->filter_lock);
 769:	}
 770:	
 771:	void msft_release(struct hci_dev *hdev)
 772:	{
 773:		struct msft_data *msft = hdev->msft_data;
 774:	
 775:		if (!msft)
 776:			return;
 777:	
 778:		bt_dev_dbg(hdev, "Unregister MSFT extension");
 779:	
 780:		hdev->msft_data = NULL;
 781:	
 782:		kfree(msft->evt_prefix);
 783:		mutex_destroy(&msft->filter_lock);
 784:		kfree(msft);
]

238/2 2026/08/27 21:24 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 16025
							output: 37
							thoughts: 38
						

Thoughts:
Okay, let's dive into this. Here's my take on those initial thoughts:

**Analyzing the Bluetooth HCI Power-On Sequence**

Alright, my immediate thought is to understand the flow of events during `hci_power_on`. That's where everything usually kicks off. To get a handle on this, I'm going to jump straight into the kernel code, specifically into `net/bluetooth/hci_core.c`. This is where I'd expect the core HCI functions to reside and where I should find the `hci_power_on` function in the Bluetooth stack. I'm keen to trace the exact steps taken to initialize the Bluetooth controller – from hardware bring-up to the point where the device is ready to receive commands. I need to understand what's happening at this critical starting point.



239/2 2026/08/27 21:24 tool read-file
0m Args:
map[File:net/bluetooth/hci_core.c FirstLine:930 LineCount:25]

Results:
map[Contents: 930:		 * valid, it is important to turn the device back off.
 931:		 */
 932:		if (hci_dev_test_flag(hdev, HCI_RFKILLED) ||
 933:		    hci_dev_test_flag(hdev, HCI_UNCONFIGURED) ||
 934:		    (!bacmp(&hdev->bdaddr, BDADDR_ANY) &&
 935:		     !bacmp(&hdev->static_addr, BDADDR_ANY))) {
 936:			hci_dev_clear_flag(hdev, HCI_AUTO_OFF);
 937:			hci_dev_do_close(hdev);
 938:		} else if (hci_dev_test_flag(hdev, HCI_AUTO_OFF)) {
 939:			queue_delayed_work(hdev->req_workqueue, &hdev->power_off,
 940:					   HCI_AUTO_OFF_TIMEOUT);
 941:		}
 942:	
 943:		if (hci_dev_test_and_clear_flag(hdev, HCI_SETUP)) {
 944:			/* For unconfigured devices, set the HCI_RAW flag
 945:			 * so that userspace can easily identify them.
 946:			 */
 947:			if (hci_dev_test_flag(hdev, HCI_UNCONFIGURED))
 948:				set_bit(HCI_RAW, &hdev->flags);
 949:	
 950:			/* For fully configured devices, this will send
 951:			 * the Index Added event. For unconfigured devices,
 952:			 * it will send Unconfigued Index Added event.
 953:			 *
 954:			 * Devices with HCI_QUIRK_RAW_DEVICE are ignored
]

240/2 2026/08/27 21:24 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 16757
							output: 36
							thoughts: 12
						

Thoughts:
Okay, I'm ready to dive into that. Let's see what this `msft_do_close` function is all about.

**Analyzing `msft_do_close`**

Alright, my first thought is to understand the context. Is this a financial model, a trading algorithm, a system shutdown routine? The name suggests it's related to Microsoft and a "close" action, likely a position or a transaction. My immediate instinct is to look for the input parameters; what data is this function receiving? Is it a stock ticker, the current market price, a quantity to close? Knowing the inputs will define the scope and purpose immediately.

Next, I need to look for conditional logic; what criteria are used to trigger the close? Is it based on a pre-defined stop-loss, a profit target, a time limit, or perhaps an external event? The meat of this function will be in those conditionals. I'm especially interested in how it handles edge cases and errors. What happens if the order fails to fill? Does it implement any retry mechanisms or does it raise an alert? Does it consider slippage and adjust accordingly?

I also need to see if it utilizes any API calls or interacts with any external services. Does it communicate with a broker or an exchange? How does it handle authentication and authorization? Securely handling these interactions is paramount. I'll need to scrutinize those API calls for best practices and any potential vulnerabilities.

Finally, the function's output is critical. Does it simply log the closing, send a confirmation message, or return some kind of status code? The output will guide the workflow and give me a clear picture of how it's integrated with the larger process. I'll be looking for robust error handling and clear reporting on execution. Ultimately, I need to know how reliable this close action is and what guarantees are in place. Now, let's see the code.



241/2 2026/08/27 21:24 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:690 LineCount:25]

Results:
map[Contents: 690:			kfree(handle_data);
 691:		}
 692:	
 693:		mutex_lock(&msft->filter_lock);
 694:		list_for_each_entry_safe(address_filter, n, &msft->address_filters,
 695:					 list) {
 696:			list_del(&address_filter->list);
 697:			kfree(address_filter);
 698:		}
 699:		mutex_unlock(&msft->filter_lock);
 700:	
 701:		hci_dev_lock(hdev);
 702:	
 703:		/* Clear any devices that are being monitored and notify device lost */
 704:		hdev->advmon_pend_notify = false;
 705:		msft_monitor_device_del(hdev, 0, NULL, 0, true);
 706:	
 707:		hci_dev_unlock(hdev);
 708:	}
 709:	
 710:	static int msft_cancel_address_filter_sync(struct hci_dev *hdev, void *data)
 711:	{
 712:		struct msft_monitor_addr_filter_data *address_filter = data;
 713:		struct msft_cp_le_cancel_monitor_advertisement cp;
 714:		struct msft_data *msft = hdev->msft_data;
]

242/2 2026/08/27 21:24 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 17611
							output: 36
							thoughts: 18
						

Thoughts:
Here's my analysis of the `msft_do_close` function, broken down as though it's my own thought process:

**Diving into `msft_do_close`**

Okay, so I need to understand what this `msft_do_close` function is doing. The first thing I always do is look at the beginning. What are the initial checks? What are the immediate conditions it's concerned with? This is crucial for establishing the preconditions and, potentially, identifying any guard clauses or early exits. I'm focusing on those first lines; they set the tone and often dictate the subsequent control flow. Knowing those initial checks gives me a solid foundation for interpreting the rest of the function. I need to get a handle on the assumptions being made right off the bat.



243/2 2026/08/27 21:24 tool read-file
0m Args:
map[File:net/bluetooth/msft.c FirstLine:670 LineCount:25]

Results:
map[Contents: 670:		struct msft_monitor_advertisement_handle_data *handle_data, *tmp;
 671:		struct msft_monitor_addr_filter_data *address_filter, *n;
 672:		struct adv_monitor *monitor;
 673:	
 674:		if (!msft)
 675:			return;
 676:	
 677:		bt_dev_dbg(hdev, "Cleanup of MSFT extension");
 678:	
 679:		/* The controller will silently remove all monitors on power off.
 680:		 * Therefore, remove handle_data mapping and reset monitor state.
 681:		 */
 682:		list_for_each_entry_safe(handle_data, tmp, &msft->handle_map, list) {
 683:			monitor = idr_find(&hdev->adv_monitors_idr,
 684:					   handle_data->mgmt_handle);
 685:	
 686:			if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED)
 687:				monitor->state = ADV_MONITOR_STATE_REGISTERED;
 688:	
 689:			list_del(&handle_data->list);
 690:			kfree(handle_data);
 691:		}
 692:	
 693:		mutex_lock(&msft->filter_lock);
 694:		list_for_each_entry_safe(address_filter, n, &msft->address_filters,
]

244/2 2026/08/27 21:24 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 18256
							output: 24
							thoughts: 809
						

Thoughts:
**Analyzing and Fixing a Race Condition in HCI Device Registration**

Okay, here's how I see this. It looks like we've got a classic race condition issue happening during the Bluetooth HCI device registration process. My initial analysis shows that the `hci_register_dev()` function is the culprit. Specifically, the asynchronous `hci_power_on()` work, queued immediately after device registration, can trigger cleanup operations (`msft_do_close()`) before all necessary data structures are fully initialized.

Let me break down my thinking:

1.  We register the device, and if quirks are present, like an unconfigured BD address or flags are set, an `HCI_UNCONFIGURED` flag is set.
2.  Crucially, `queue_work()` for `hci_power_on()` is called *before* we initialize `hdev->adv_monitors_idr` and register the MSFT-specific data (`msft_register(hdev)`).
3.  The `kworker` thread kicks off `hci_power_on()`, which, because of the `HCI_UNCONFIGURED` flag (or similar), calls `hci_dev_do_close()`, leading to a potentially concurrent `msft_do_close()`.
4.  Meanwhile, the registration thread *does* initialize the `msft` structure, but it sets `hdev->msft_data = msft` *before* initializing the mutex `msft->filter_lock`.
5.  This is where the problem arises: If `msft_do_close()` runs concurrently, it accesses the uninitialized `msft->filter_lock`, potentially leading to a kernel warning because we're locking an uninitialized mutex! Furthermore, it accesses an uninitialized `hdev->adv_monitors_idr` during the `idr_find()` call.

The fix I'm proposing is straightforward. First, in `hci_register_dev()`, I want to move the `queue_work()` call *after* the `idr_init(&hdev->adv_monitors_idr)` and `msft_register(hdev)` calls. This will guarantee that all the device-specific subsystems and data structures are fully initialized *before* we kick off any asynchronous power-on work that might trigger a cleanup. Second, in `msft_register()`, I'll defer the assignment of `hdev->msft_data = msft` until *after* the mutex `mutex_init(&msft->filter_lock)` is initialized. This will ensure that any concurrent access will only see fully initialized structures. This should eliminate the race, prevent the warning, and stabilize the HCI device registration process. Given the location of the fix, `hci_core` seems to be the right context for the commit prefix.



245/2 2026/08/27 21:25 tool git-log
0m Args:
map[Count:10 MessageRegexps:[Bluetooth:]]

Results:
map[Output:abd93c85c866 Bluetooth: SCO: give the socket its own sco_conn reference
cac43d360c92 Bluetooth: btusb: Fix short read errors in btusb_qca_send_vendor_req()
0cc4b5649ae8 Bluetooth: btmtk: Fix short read errors in btmtk_usb_reg_read()
b186c18c4843 Bluetooth: btmtk: Fix short read errors in btmtk_usb_uhw_reg_read()
c0a9dcd2be39 Bluetooth: hci_sync: remove unnecessary hci_conn_get in create_conn_sync
2c1e4e00613d Bluetooth: hci_sync: fix hci_conn_del() use in hci_le_create_conn_sync
abf9753edf3f Bluetooth: hci_sync: hold conn in hci_past_sync() callback
44fc74069d89 Bluetooth: hci_sync: hold conn in hci_connect_pa_sync() callback
56e78b670356 Bluetooth: hci_sync: hold conn in hci_connect_big_sync() callback
2f5d635ad590 Bluetooth: hci_sync: hold conn in hci_connect_acl/le_sync() callbacks
]

246/2 2026/08/27 21:25 llm description-generator
0m Model:
gemini-3.7-flash

Tokens:
							input: 20019
							output: 721
							thoughts: 2006
						

Thoughts:
**Bluetooth: Fix race condition during HCI device registration**

I've identified a race condition in `hci_register_dev()`. Specifically, the `hdev->power_on` work is queued before initializing `adv_monitors_idr` and calling `msft_register()`. If a device uses quirks like `HCI_QUIRK_RAW_DEVICE`, the `HCI_UNCONFIGURED` flag is set. Then, `hci_power_on()` runs asynchronously and, finding the device unconfigured, calls `hci_dev_do_close()`, which calls `msft_do_close()`. The bug manifests when in `msft_register()`, `hdev->msft_data` is assigned before `msft->filter_lock` is initialized. This can lead `msft_do_close()` to try and lock an uninitialized mutex, resulting in a lockdep/debug_locks warning: `DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline] WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821 ... Call Trace: <TASK> msft_do_close+0x308/0x7b0 net/bluetooth/msft.c:693 hci_dev_close_sync+0x86b/0x10a0 net/bluetooth/hci_sync.c:5522 hci_dev_do_close net/bluetooth/hci_core.c:499 [inline] hci_power_on+0x32c/0x750 net/bluetooth/hci_core.c:937 process_one_work kernel/workqueue.c:3322 [inline] process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405 worker_thread+0x92d/0xe10 kernel/workqueue.c:3486 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK>`. To fix this, I've moved `queue_work(hdev->req_workqueue, &hdev->power_on)` after `idr_init(&hdev->adv_monitors_idr)` and `msft_register(hdev)` in `hci_register_dev()`, ensuring proper device setup before the asynchronous work runs, and I publish `hdev->msft_data` in `msft_register()` after mutex initialization to prevent partial access.



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)