ID Workflow Result Correct Bug Created Started Finished Revision
3fe73d03 repro-c Reproduced: ✅ ❓ possible deadlock in n_tty_receive_buf_common (2) 2026/08/11 16:59 2026/08/11 22:59 2026/08/12 00:02 f8d35649
Agent: prod-syz-agent-3
External Bug ID: ---

Inputs:
BaseBranch master
BaseCommit RC
BaseRepository git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
BugTitle possible deadlock in n_tty_receive_buf_common
CrashLogID 5198884927700992
CrashReportID 6615169989345280
KernelCommit 848acc8ffe1b7cd5f1bf427b93069becfebc2c9d
KernelConfig
Show (280144 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_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_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_SYSCTL=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_SYSFS_SYSCALL=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_MULTIUSER=y
CONFIG_SGETMASK_SYSCALL=y
CONFIG_FHANDLE=y
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
# CONFIG_BASE_SMALL is not set
CONFIG_FUTEX=y
CONFIG_FUTEX_PI=y
CONFIG_FUTEX_PRIVATE_HASH=y
CONFIG_FUTEX_MPOL=y
CONFIG_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_KPROBES is not set
CONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not set
# CONFIG_STATIC_CALL_SELFTEST is not set
CONFIG_UPROBES=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y
CONFIG_HAVE_NMI=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
CONFIG_ARCH_HAS_SET_MEMORY=y
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
CONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y
CONFIG_ARCH_HAS_CPU_PASID=y
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
CONFIG_ARCH_WANTS_NO_INSTR=y
CONFIG_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_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_HAVE_BOOTMEM_INFO_NODE=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_ENABLE_THP_MIGRATION=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
# CONFIG_MEMORY_FAILURE is not set
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANTS_THP_SWAP=y
# CONFIG_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=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 is not set
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_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_OPENVSWITCH_GRE=y
CONFIG_OPENVSWITCH_VXLAN=y
CONFIG_OPENVSWITCH_GENEVE=y
CONFIG_VSOCKETS=y
CONFIG_VSOCKETS_DIAG=y
CONFIG_VSOCKETS_LOOPBACK=y
# CONFIG_VMWARE_VMCI_VSOCKETS is not set
CONFIG_VIRTIO_VSOCKETS=y
CONFIG_VIRTIO_VSOCKETS_COMMON=y
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=y
CONFIG_MPLS_ROUTING=y
CONFIG_MPLS_IPTUNNEL=y
CONFIG_NET_NSH=y
CONFIG_HSR=y
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_L3_MASTER_DEV=y
CONFIG_QRTR=y
CONFIG_QRTR_TUN=y
# CONFIG_QRTR_MHI is not set
CONFIG_NET_NCSI=y
# CONFIG_NCSI_OEM_CMD_GET_MAC is not set
# CONFIG_NCSI_OEM_CMD_KEEP_PHY is not set
# CONFIG_PCPU_DEV_REFCNT is not set
CONFIG_MAX_SKB_FRAGS=17
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_SOCK_RX_QUEUE_MAPPING=y
CONFIG_XPS=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_CGROUP_NET_CLASSID=y
CONFIG_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_DMA_FENCE_TRACE is not set
# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
# end of Generic Driver Options

#
# Bus devices
#
# CONFIG_MOXTET is not set
CONFIG_MHI_BUS=y
# CONFIG_MHI_BUS_DEBUG is not set
# CONFIG_MHI_BUS_PCI_GENERIC is not set
# CONFIG_MHI_BUS_EP is not set
# end of Bus devices

CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y

#
# Firmware Drivers
#

#
# ARM System Control and Management Interface Protocol
#
# end of ARM System Control and Management Interface Protocol

# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# CONFIG_ISCSI_IBFT is not set
# CONFIG_FW_CFG_SYSFS is not set
CONFIG_SYSFB=y
# CONFIG_SYSFB_SIMPLEFB is not set
CONFIG_GOOGLE_FIRMWARE=y
# CONFIG_GOOGLE_SMI is not set
# CONFIG_GOOGLE_CBMEM is not set
CONFIG_GOOGLE_COREBOOT_TABLE=y
CONFIG_GOOGLE_MEMCONSOLE=y
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
# CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT is not set
CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y
CONFIG_GOOGLE_VPD=y

#
# Qualcomm firmware drivers
#
# end of Qualcomm firmware drivers

#
# Tegra firmware driver
#
# end of Tegra firmware driver
# end of Firmware Drivers

# CONFIG_FWCTL is not set
CONFIG_GNSS=y
# CONFIG_GNSS_MTK_SERIAL is not set
# CONFIG_GNSS_SIRF_SERIAL is not set
# CONFIG_GNSS_UBX_SERIAL is not set
CONFIG_GNSS_USB=y
CONFIG_MTD=y
# CONFIG_MTD_TESTS is not set

#
# Partition parsers
#
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_OF_PARTS is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# end of Partition parsers

#
# User Modules And Translation Layers
#
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y

#
# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.
#
CONFIG_FTL=y
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# CONFIG_SSFDC is not set
# CONFIG_SM_FTL is not set
# CONFIG_MTD_OOPS is not set
# CONFIG_MTD_SWAP is not set
# CONFIG_MTD_PARTITIONED_MASTER is not set

#
# RAM/ROM/Flash chip drivers
#
# CONFIG_MTD_CFI is not set
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# end of RAM/ROM/Flash chip drivers

#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PLATRAM is not set
# end of Mapping drivers for chip access

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_DATAFLASH is not set
# CONFIG_MTD_MCHP23K256 is not set
# CONFIG_MTD_MCHP48L640 is not set
# CONFIG_MTD_SST25L is not set
CONFIG_MTD_SLRAM=y
CONFIG_MTD_PHRAM=y
CONFIG_MTD_MTDRAM=y
CONFIG_MTDRAM_TOTAL_SIZE=128
CONFIG_MTDRAM_ERASE_SIZE=4
CONFIG_MTD_BLOCK2MTD=y
# 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_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_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_AQUANTIA_PHY is not set
CONFIG_AX88796B_PHY=y
# CONFIG_BROADCOM_PHY is not set
# CONFIG_BCM54140_PHY is not set
# CONFIG_BCM7XXX_PHY is not set
# CONFIG_BCM84881_PHY is not set
# CONFIG_BCM87XX_PHY is not set
# CONFIG_CICADA_PHY is not set
# CONFIG_CORTINA_PHY is not set
# CONFIG_DAVICOM_PHY is not set
# CONFIG_ICPLUS_PHY is not set
# CONFIG_LXT_PHY is not set
# CONFIG_INTEL_XWAY_PHY is not set
# CONFIG_LSI_ET1011C_PHY is not set
# CONFIG_MARVELL_PHY is not set
# CONFIG_MARVELL_10G_PHY is not set
# CONFIG_MARVELL_88Q2XXX_PHY is not set
# CONFIG_MARVELL_88X2222_PHY is not set
# CONFIG_MAXLINEAR_GPHY is not set
# CONFIG_MAXLINEAR_86110_PHY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
# CONFIG_MICREL_PHY is not set
# CONFIG_MICROCHIP_T1S_PHY is not set
CONFIG_MICROCHIP_PHY=y
# CONFIG_MICROCHIP_T1_PHY is not set
# CONFIG_MICROSEMI_PHY is not set
# CONFIG_MOTORCOMM_PHY is not set
# CONFIG_NATIONAL_PHY is not set
# CONFIG_NXP_CBTX_PHY is not set
# CONFIG_NXP_C45_TJA11XX_PHY is not set
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_NCN26000_PHY is not set
# CONFIG_AT803X_PHY is not set
# CONFIG_QCA83XX_PHY is not set
# CONFIG_QCA808X_PHY is not set
# CONFIG_QCA807X_PHY is not set
# CONFIG_QSEMI_PHY is not set
CONFIG_REALTEK_PHY=y
# CONFIG_REALTEK_PHY_HWMON is not set
# CONFIG_RENESAS_PHY is not set
# CONFIG_ROCKCHIP_PHY is not set
CONFIG_SMSC_PHY=y
# CONFIG_STE10XP is not set
# CONFIG_TERANETICS_PHY is not set
# CONFIG_DP83822_PHY is not set
# CONFIG_DP83TC811_PHY is not set
# CONFIG_DP83848_PHY is not set
# CONFIG_DP83867_PHY is not set
# CONFIG_DP83869_PHY is not set
# CONFIG_DP83TD510_PHY is not set
# CONFIG_DP83TG720_PHY is not set
# CONFIG_VITESSE_PHY is not set
# CONFIG_XILINX_GMII2RGMII is not set
# CONFIG_PSE_CONTROLLER is not set
CONFIG_CAN_DEV=y
CONFIG_CAN_VCAN=y
CONFIG_CAN_VXCAN=y
CONFIG_CAN_NETLINK=y
CONFIG_CAN_CALC_BITTIMING=y
CONFIG_CAN_RX_OFFLOAD=y
# CONFIG_CAN_CAN327 is not set
# CONFIG_CAN_DUMMY is not set
# CONFIG_CAN_FLEXCAN is not set
# CONFIG_CAN_GRCAN is not set
# CONFIG_CAN_KVASER_PCIEFD is not set
CONFIG_CAN_SLCAN=y
# CONFIG_CAN_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_USB is not set
# end of MCTP Device Drivers

CONFIG_FWNODE_MDIO=y
CONFIG_OF_MDIO=y
CONFIG_ACPI_MDIO=y
# CONFIG_MDIO_BITBANG is not set
# CONFIG_MDIO_BCM_UNIMAC is not set
# CONFIG_MDIO_HISI_FEMAC is not set
CONFIG_MDIO_MVUSB=y
# CONFIG_MDIO_MSCC_MIIM is not set
# CONFIG_MDIO_OCTEON is not set
# CONFIG_MDIO_IPQ4019 is not set
# CONFIG_MDIO_IPQ8064 is not set
# CONFIG_MDIO_THUNDER is not set

#
# MDIO Multiplexers
#
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set
# CONFIG_MDIO_BUS_MUX_MMIOREG is not set

#
# PCS device drivers
#
# CONFIG_PCS_XPCS is not set
# end of PCS device drivers

# CONFIG_PLIP is not set
CONFIG_PPP=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOATM=y
CONFIG_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_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_CMA3000 is not set
# CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set
# CONFIG_INPUT_DRV260X_HAPTICS is not set
# CONFIG_INPUT_DRV2665_HAPTICS is not set
# CONFIG_INPUT_DRV2667_HAPTICS is not set
CONFIG_RMI4_CORE=y
# CONFIG_RMI4_I2C is not set
# CONFIG_RMI4_SPI is not set
# CONFIG_RMI4_SMB is not set
CONFIG_RMI4_F03=y
CONFIG_RMI4_F03_SERIO=y
CONFIG_RMI4_2D_SENSOR=y
CONFIG_RMI4_F11=y
CONFIG_RMI4_F12=y
# CONFIG_RMI4_F1A is not set
# CONFIG_RMI4_F21 is not set
CONFIG_RMI4_F30=y
# CONFIG_RMI4_F34 is not set
CONFIG_RMI4_F3A=y
# CONFIG_RMI4_F54 is not set
# CONFIG_RMI4_F55 is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_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_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_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_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_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_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_VIVALDI_COMMON=y
# CONFIG_HID_GOODIX_SPI is not set
CONFIG_HID_GOOGLE_STADIA_FF=y
CONFIG_HID_VIVALDI=y
CONFIG_HID_GT683R=y
CONFIG_HID_KEYTOUCH=y
CONFIG_HID_KYE=y
# CONFIG_HID_KYSONA is not set
CONFIG_HID_UCLOGIC=y
CONFIG_HID_WALTOP=y
CONFIG_HID_VIEWSONIC=y
CONFIG_HID_VRC2=y
CONFIG_HID_XIAOMI=y
CONFIG_HID_GYRATION=y
CONFIG_HID_ICADE=y
CONFIG_HID_ITE=y
CONFIG_HID_JABRA=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LCPOWER=y
CONFIG_HID_LED=y
CONFIG_HID_LENOVO=y
# CONFIG_HID_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_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

#
# Qualcomm SoC drivers
#
CONFIG_QCOM_QMI_HELPERS=y
# end of Qualcomm SoC drivers

# CONFIG_SOC_TI is not set

#
# Xilinx SoC drivers
#
# end of Xilinx SoC drivers
# end of SOC (System On Chip) specific Drivers

#
# PM Domains
#

#
# Amlogic PM Domains
#
# end of Amlogic PM Domains

#
# Broadcom PM Domains
#
# end of Broadcom PM Domains

#
# i.MX PM Domains
#
# end of i.MX PM Domains

#
# Qualcomm PM Domains
#
# end of Qualcomm PM Domains
# end of PM Domains

# CONFIG_PM_DEVFREQ is not set
CONFIG_EXTCON=y

#
# Extcon Device Drivers
#
# CONFIG_EXTCON_ADC_JACK is not set
# CONFIG_EXTCON_FSA9480 is not set
# CONFIG_EXTCON_GPIO is not set
# CONFIG_EXTCON_INTEL_INT3496 is not set
CONFIG_EXTCON_INTEL_CHT_WC=y
# CONFIG_EXTCON_LC824206XA is not set
# CONFIG_EXTCON_MAX3355 is not set
# CONFIG_EXTCON_MAX14526 is not set
CONFIG_EXTCON_PTN5150=y
# CONFIG_EXTCON_RT8973A is not set
# CONFIG_EXTCON_SM5502 is not set
# CONFIG_EXTCON_USB_GPIO is not set
CONFIG_EXTCON_USBC_TUSB320=y
# CONFIG_MEMORY is not set
CONFIG_IIO=y
CONFIG_IIO_BUFFER=y
# CONFIG_IIO_BUFFER_CB is not set
# CONFIG_IIO_BUFFER_DMA is not set
# CONFIG_IIO_BUFFER_DMAENGINE is not set
# CONFIG_IIO_BUFFER_HW_CONSUMER is not set
CONFIG_IIO_KFIFO_BUF=y
CONFIG_IIO_TRIGGERED_BUFFER=y
# CONFIG_IIO_CONFIGFS is not set
CONFIG_IIO_TRIGGER=y
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_IIO_SW_DEVICE is not set
# CONFIG_IIO_SW_TRIGGER is not set
# CONFIG_IIO_TRIGGERED_EVENT is not set

#
# Accelerometers
#
# CONFIG_ADIS16201 is not set
# CONFIG_ADIS16209 is not set
# CONFIG_ADXL313_I2C is not set
# CONFIG_ADXL313_SPI is not set
# CONFIG_ADXL345_I2C is not set
# CONFIG_ADXL345_SPI is not set
# CONFIG_ADXL355_I2C is not set
# CONFIG_ADXL355_SPI is not set
# CONFIG_ADXL367_SPI is not set
# CONFIG_ADXL367_I2C is not set
# CONFIG_ADXL372_SPI is not set
# CONFIG_ADXL372_I2C is not set
# CONFIG_ADXL380_SPI is not set
# CONFIG_ADXL380_I2C is not set
# CONFIG_BMA180 is not set
# CONFIG_BMA220 is not set
# CONFIG_BMA400 is not set
# CONFIG_BMC150_ACCEL is not set
# CONFIG_BMI088_ACCEL is not set
# CONFIG_DA280 is not set
# CONFIG_DA311 is not set
# CONFIG_DMARD06 is not set
# CONFIG_DMARD09 is not set
# CONFIG_DMARD10 is not set
# CONFIG_FXLS8962AF_I2C is not set
# CONFIG_FXLS8962AF_SPI is not set
CONFIG_HID_SENSOR_ACCEL_3D=y
# CONFIG_IIO_ST_ACCEL_3AXIS is not set
# CONFIG_IIO_KX022A_SPI is not set
# CONFIG_IIO_KX022A_I2C is not set
# CONFIG_KXSD9 is not set
# CONFIG_KXCJK1013 is not set
# CONFIG_MC3230 is not set
# CONFIG_MMA7455_I2C is not set
# CONFIG_MMA7455_SPI is not set
# CONFIG_MMA7660 is not set
# CONFIG_MMA8452 is not set
# CONFIG_MMA9551 is not set
# CONFIG_MMA9553 is not set
# CONFIG_MSA311 is not set
# CONFIG_MXC4005 is not set
# CONFIG_MXC6255 is not set
# CONFIG_SCA3000 is not set
# CONFIG_SCA3300 is not set
# CONFIG_STK8312 is not set
# CONFIG_STK8BA50 is not set
# end of Accelerometers

#
# Analog to digital converters
#
# CONFIG_AD4000 is not set
# CONFIG_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
# CONFIG_CACHEFILES_ONDEMAND is not set
# end of Caches

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=y
# end of CD-ROM/DVD Filesystems

#
# DOS/FAT/EXFAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_FAT_DEFAULT_UTF8 is not set
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
# CONFIG_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_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_CHILDREN=y
CONFIG_PROC_PID_ARCH_STATUS=y
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
# CONFIG_TMPFS_INODE64 is not set
CONFIG_TMPFS_QUOTA=y
CONFIG_ARCH_SUPPORTS_HUGETLBFS=y
CONFIG_HUGETLBFS=y
# CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON is not set
CONFIG_HUGETLB_PAGE=y
CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y
CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y
CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
CONFIG_CONFIGFS_FS=y
# end of Pseudo filesystems

CONFIG_MISC_FILESYSTEMS=y
CONFIG_ORANGEFS_FS=y
CONFIG_ADFS_FS=y
# CONFIG_ADFS_FS_RW is not set
CONFIG_AFFS_FS=y
CONFIG_ECRYPT_FS=y
CONFIG_ECRYPT_FS_MESSAGING=y
CONFIG_HFS_FS=y
CONFIG_HFSPLUS_FS=y
CONFIG_BEFS_FS=y
# CONFIG_BEFS_DEBUG is not set
CONFIG_BFS_FS=y
# CONFIG_EFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
CONFIG_JFFS2_SUMMARY=y
CONFIG_JFFS2_FS_XATTR=y
CONFIG_JFFS2_FS_POSIX_ACL=y
CONFIG_JFFS2_FS_SECURITY=y
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_LZO=y
CONFIG_JFFS2_RTIME=y
CONFIG_JFFS2_RUBIN=y
# CONFIG_JFFS2_CMODE_NONE is not set
CONFIG_JFFS2_CMODE_PRIORITY=y
# CONFIG_JFFS2_CMODE_SIZE is not set
# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
CONFIG_UBIFS_FS=y
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
CONFIG_UBIFS_FS_ZSTD=y
CONFIG_UBIFS_ATIME_SUPPORT=y
CONFIG_UBIFS_FS_XATTR=y
CONFIG_UBIFS_FS_SECURITY=y
# CONFIG_UBIFS_FS_AUTHENTICATION is not set
CONFIG_CRAMFS=y
CONFIG_CRAMFS_BLOCKDEV=y
CONFIG_CRAMFS_MTD=y
CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_FILE_CACHE is not set
CONFIG_SQUASHFS_FILE_DIRECT=y
CONFIG_SQUASHFS_DECOMP_MULTI=y
# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI=y
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
# CONFIG_SQUASHFS_MOUNT_DECOMP_THREADS is not set
CONFIG_SQUASHFS_XATTR=y
# CONFIG_SQUASHFS_COMP_CACHE_FULL is not set
CONFIG_SQUASHFS_ZLIB=y
CONFIG_SQUASHFS_LZ4=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_SQUASHFS_4K_DEVBLK_SIZE=y
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_VXFS_FS is not set
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_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 is not set
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_MACS=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_HAVE_GENERIC_VDSO=y
CONFIG_GENERIC_GETTIMEOFDAY=y
CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT=y
CONFIG_VDSO_GETRANDOM=y
CONFIG_FONT_SUPPORT=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_SG_POOL=y
CONFIG_ARCH_HAS_PMEM_API=y
CONFIG_MEMREGION=y
CONFIG_ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION=y
CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y
CONFIG_ARCH_HAS_COPY_MC=y
CONFIG_ARCH_STACKWALK=y
CONFIG_STACKDEPOT=y
CONFIG_STACKDEPOT_ALWAYS_INIT=y
CONFIG_STACKDEPOT_MAX_FRAMES=64
CONFIG_REF_TRACKER=y
CONFIG_SBITMAP=y
# CONFIG_LWQ_TEST is not set
# end of Library routines

CONFIG_FIRMWARE_TABLE=y
CONFIG_UNION_FIND=y

#
# Kernel hacking
#

#
# printk and dmesg options
#
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y
# CONFIG_STACKTRACE_BUILD_ID is not set
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
# CONFIG_BOOT_PRINTK_DELAY is not set
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y
CONFIG_SYMBOLIC_ERRNAME=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_BUGVERBOSE_DETAILED=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_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_MEM_ALLOC_PROFILING is not set
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_KASAN_SW_TAGS=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
CONFIG_KASAN=y
CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y
CONFIG_KASAN_GENERIC=y
# CONFIG_KASAN_OUTLINE is not set
CONFIG_KASAN_INLINE=y
CONFIG_KASAN_STACK=y
CONFIG_KASAN_VMALLOC=y
# CONFIG_KASAN_EXTRA_INFO is not set
CONFIG_HAVE_ARCH_KFENCE=y
CONFIG_KFENCE=y
CONFIG_KFENCE_SAMPLE_INTERVAL=100
CONFIG_KFENCE_NUM_OBJECTS=255
# CONFIG_KFENCE_DEFERRABLE is not set
CONFIG_KFENCE_STATIC_KEYS=y
CONFIG_KFENCE_STRESS_TEST_FAULTS=0
CONFIG_HAVE_ARCH_KMSAN=y
# 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_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_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
KernelConfigManager ci-qemu-upstream
KernelRepo git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
ReproCID 0
ReproOpts
ReproSyzID 0
SyzkallerCommit 3c5eaa21b0dde97af48b7218aaad155b57ae3941
TargetArch amd64
TargetOS linux

Outputs:
Reproduced ✅
EquivalenceAnalysis
The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the exact same root cause.
OtherCrashReports
ReproC
#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
}
ReproducedBugTitle
possible deadlock in n_tty_flush_buffer
ReproducedCrashReport
======================================================
WARNING: possible circular locking dependency detected
syzkaller #1 Not tainted
------------------------------------------------------
kworker/0:5/5693 is trying to acquire lock:
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349

but task is already holding lock:
ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

-> #2 (console_lock){+.+.}-{0:0}:
       console_lock+0x76/0x90 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xc47/0x2840 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x16b4/0x2090 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x56a/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x254/0xae0 drivers/base/dd.c:706
       __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
       driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
       __driver_attach+0x339/0x600 drivers/base/dd.c:1292
       bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383
       bus_add_driver+0x345/0x670 drivers/base/bus.c:763
       driver_register+0x23a/0x320 drivers/base/driver.c:174
       serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x250/0x870 init/main.c:1347
       do_initcall_level+0x10a/0x1a0 init/main.c:1409
       do_initcalls+0x59/0xa0 init/main.c:1425
       kernel_init_freeable+0x29d/0x3e0 init/main.c:1658
       kernel_init+0x1d/0x1d0 init/main.c:1548
       ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x81/0x710 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
       set_termios+0x53d/0x6c0 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
       tty_ioctl+0x9bd/0xdd0 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3165 [inline]
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
       lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
       n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
       tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  lock(&tty->termios_rwsem);

 *** DEADLOCK ***

5 locks held by kworker/0:5/5693:
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:985
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
 #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

stack backtrace:
CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 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: events vc_SAK
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 down_write+0x96/0x200 kernel/locking/rwsem.c:1631
 class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
 n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
 tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
 __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
 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>
tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3

Crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/08/11 22:59 flow repro-c
1h03m Results:
map[EquivalenceAnalysis:The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the exact same root cause. OtherCrashReports:<nil> ReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
} Reproduced:true ReproducedBugTitle:possible deadlock in n_tty_flush_buffer ReproducedCrashReport:======================================================
WARNING: possible circular locking dependency detected
syzkaller #1 Not tainted
------------------------------------------------------
kworker/0:5/5693 is trying to acquire lock:
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349

but task is already holding lock:
ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

-> #2 (console_lock){+.+.}-{0:0}:
       console_lock+0x76/0x90 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xc47/0x2840 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x16b4/0x2090 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x56a/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x254/0xae0 drivers/base/dd.c:706
       __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
       driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
       __driver_attach+0x339/0x600 drivers/base/dd.c:1292
       bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383
       bus_add_driver+0x345/0x670 drivers/base/bus.c:763
       driver_register+0x23a/0x320 drivers/base/driver.c:174
       serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x250/0x870 init/main.c:1347
       do_initcall_level+0x10a/0x1a0 init/main.c:1409
       do_initcalls+0x59/0xa0 init/main.c:1425
       kernel_init_freeable+0x29d/0x3e0 init/main.c:1658
       kernel_init+0x1d/0x1d0 init/main.c:1548
       ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x81/0x710 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
       set_termios+0x53d/0x6c0 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
       tty_ioctl+0x9bd/0xdd0 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3165 [inline]
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
       lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
       n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
       tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  lock(&tty->termios_rwsem);

 *** DEADLOCK ***

5 locks held by kworker/0:5/5693:
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:985
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
 #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

stack backtrace:
CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 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: events vc_SAK
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 down_write+0x96/0x200 kernel/locking/rwsem.c:1631
 class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
 n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
 tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
 __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
 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>
tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3
]

1/1 2026/08/11 22:59 action kernel-checkouter
0m Results:
map[KernelSrc:/app/workdir/cache/src/0bd482cc9fd6a5c3cdf3e7f636a3906397462859]

2/1 2026/08/11 22:59 action kernel-builder
17m Results:
map[KernelObj:/app/workdir/cache/build/288cc213bc32c5d0798e64399515a2514846c767]

3/1 2026/08/11 23:17 action codesearch-prepare
19m Results:
map[Index:codesearch-index]

4/1 2026/08/11 23:36 agent initial-researcher
3m Model:
best-expensive

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

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

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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Reply:
To reproduce this circular locking dependency warning, we need to trigger the lock dependencies that form the cycle. Lockdep tracks dependencies between lock classes globally, so we don't need to cause an actual deadlock; we just need to execute the code paths that take these locks in the required order sequentially.

### Lock Dependency Analysis

The cycle consists of 4 lock classes:
1. `&port->mutex` -> `console_lock`: This dependency is **already recorded during boot** when the kernel registers the serial console (`serial8250_init` -> `uart_configure_port`). We don't need to trigger it manually.
2. `&tty->termios_rwsem` -> `&port->mutex`: This is triggered when setting termios on a serial port. `tty_set_termios` takes `&tty->termios_rwsem` (write) and then calls `uart_set_termios` which takes `&port->mutex`.
3. `console_lock` -> `&buf->lock`: This is triggered by the Secure Attention Key (SAK) on a virtual console. `vc_SAK` takes `console_lock` and then calls `__do_SAK` -> `tty_ldisc_flush` -> `tty_buffer_flush` which takes `&buf->lock`.
4. `&buf->lock` -> `&tty->termios_rwsem`: This is triggered by the normal tty receive path. `flush_to_ldisc` takes `&buf->lock` and then calls `n_tty_receive_buf_common` which takes `&tty->termios_rwsem` (read).

### Reproduction Strategy

We can write a minimal C program that sequentially triggers the remaining 3 dependencies:
1. **Open a serial port** (e.g., `/dev/ttyS0`) and call `ioctl(fd, TCSETS, &term)` to record `&tty->termios_rwsem` -> `&port->mutex`.
2. **Write 'k' to `/proc/sysrq-trigger`** to simulate a SAK keypress. This schedules `vc_SAK` work, recording `console_lock` -> `&buf->lock`.
3. **Open a PTY pair** and write to the slave PTY. This queues data to the master PTY and schedules `flush_to_ldisc`, recording `&buf->lock` -> `&tty->termios_rwsem`.

Once the last dependency is recorded, lockdep will detect the cycle and emit the warning.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq >= 0) {
        write(fd_sysrq, "k", 1);
        close(fd_sysrq);
        // Wait a bit for the vc_SAK workqueue to execute
        usleep(100000);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```

5/2 2026/08/11 23:36 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 6065
							output: 158
							thoughts: 709
						

Thoughts:
**Analyzing a Circular Locking Dependency in the TTY Subsystem**

I've encountered a concerning circular dependency warning involving several key locking primitives within the TTY subsystem. My goal is to meticulously trace the path of these locks to understand how the cycle is formed. The involved locks are: `&tty->termios_rwsem`, `console_lock`, `&buf->lock`, and `&port->mutex`.

Initially, I'm looking at the dependency chain and trying to connect the dots. I start by examining the relationship between `&buf->lock` and `console_lock`. My initial thought is that `&buf->lock` depends on `console_lock`, but I need to be sure. I trace a path from `&buf->lock`:

*   `&buf->lock` is acquired in `tty_buffer_flush`.
*   `tty_buffer_flush` is called by `tty_ldisc_flush`.
*   `tty_ldisc_flush` is called by `__do_SAK`.
*   `__do_SAK` is called by `vc_SAK`, which is eventually invoked via `process_one_work`.

This chain seems to imply that `tty_buffer_flush` is where `&buf->lock` is acquired. Now, I need to verify the relationship between `__do_SAK` and `console_lock`. I check the implementation of `__do_SAK` and discover that it *doesn't* directly take `console_lock`. However, I recall that `tty_buffer_flush` is the function that acquires `&buf->lock`.

Next, I move on to `console_lock`. I trace the call stack leading to its acquisition:

*   `console_lock` is acquired directly within the `console_lock` function itself.
*   `console_lock` is called by `uart_configure_port`.
*   `uart_configure_port` is called by `serial_core_add_one_port`.
*   `serial_core_add_one_port` is called by `serial_core_register_port`.
*   `serial_core_register_port` is called by `serial8250_register_8250_port`.

This particular path seems to be active during system boot or initialization. The critical point here is whether `uart_configure_port` acquires `console_lock` while *already holding* `&port->mutex`. I need to scrutinize the `uart_configure_port` function to confirm this.

Then, I investigate `&port->mutex`. The chain of acquisition appears to be:

*   `&port->mutex` is acquired in `uart_set_termios`.
*   `uart_set_termios` is called by `tty_set_termios`.
*   `tty_set_termios` is called by `set_termios`.
*   `set_termios` is called by `tty_mode_ioctl`.
*   `tty_mode_ioctl` is called by `n_tty_ioctl_helper`.
*   `n_tty_ioctl_helper` is called by `n_tty_ioctl`.
*   `n_tty_ioctl` is called by `tty_ioctl`.

Here, the crucial observation is whether `uart_set_termios` acquires `&port->mutex` while *holding* `&tty->termios_rwsem`. I will need to examine `tty_set_termios` to verify this.

Finally, I look at `&tty->termios_rwsem`. The path I'm tracing leads to:

*   `&tty->termios_rwsem` is acquired (as a read lock, `rwsem_read_down`) in `n_tty_receive_buf_common`.
*   `n_tty_receive_buf_common` is called by `tty_ldisc_receive_buf`.
*   `tty_ldisc_receive_buf` is called by `tty_port_default_receive_buf`.
*   `tty_port_default_receive_buf` is called by `receive_buf`.
*   `receive_buf` calls `flush_to_ldisc`.

The function `flush_to_ldisc` appears to hold `&buf->lock` and then proceeds to acquire `&tty->termios_rwsem` (as a read lock) via its caller, `n_tty_receive_buf_common`.

Putting it all together, the suspected cycle is as follows:

1.  The `flush_to_ldisc` function holds `&buf->lock` and subsequently attempts to acquire `&tty->termios_rwsem` in read mode.
2.  The `tty_set_termios` function, holding `&tty->termios_rwsem` in write mode, calls `uart_set_termios`, which then acquires `&port->mutex`.
3.  The `uart_configure_port` function, holding `&port->mutex`, then attempts to acquire `console_lock`.
4.  The `__do_SAK` function, which we initially linked to `console_lock`, needs further investigation regarding its locking behavior in conjunction with `vc_SAK`. This is the missing piece that potentially closes the loop back to `&buf->lock` or `&tty->termios_rwsem` in a way that creates the deadlock.

To resolve this, I need to meticulously inspect the source code of `__do_SAK` and `vc_SAK` and any functions they call that might acquire locks. Utilizing static analysis tools and debugging will be crucial to definitively map out the exact lock acquisition order that leads to this circular dependency.


6/2 2026/08/11 23:37 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_io.c Name:__do_SAK]

Results:
map[SourceCode:2997:	/*
2998:	 * This implements the "Secure Attention Key" ---  the idea is to
2999:	 * prevent trojan horses by killing all processes associated with this
3000:	 * tty when the user hits the "Secure Attention Key".  Required for
3001:	 * super-paranoid applications --- see the Orange Book for more details.
3002:	 *
3003:	 * This code could be nicer; ideally it should send a HUP, wait a few
3004:	 * seconds, then send a INT, and then a KILL signal.  But you then
3005:	 * have to coordinate with the init process, since all processes associated
3006:	 * with the current tty must be dead before the new getty is allowed
3007:	 * to spawn.
3008:	 *
3009:	 * Now, if it would be correct ;-/ The current code has a nasty hole -
3010:	 * it doesn't catch files in flight. We may send the descriptor to ourselves
3011:	 * via AF_UNIX socket, close it and later fetch from socket. FIXME.
3012:	 *
3013:	 * Nasty bug: do_SAK is being called in interrupt context.  This can
3014:	 * deadlock.  We punt it up to process context.  AKPM - 16Mar2001
3015:	 */
3016:	void __do_SAK(struct tty_struct *tty)
3017:	{
3018:		struct task_struct *g, *p;
3019:		struct pid *session;
3020:		int i;
3021:	
3022:		scoped_guard(spinlock_irqsave, &tty->ctrl.lock)
3023:			session = get_pid(tty->ctrl.session);
3024:	
3025:		tty_ldisc_flush(tty);
3026:	
3027:		tty_driver_flush_buffer(tty);
3028:	
3029:		read_lock(&tasklist_lock);
3030:		/* Kill the entire session */
3031:		do_each_pid_task(session, PIDTYPE_SID, p) {
3032:			tty_notice(tty, "SAK: killed process %d (%s): by session\n",
3033:				   task_pid_nr(p), p->comm);
3034:			group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p, PIDTYPE_SID);
3035:		} while_each_pid_task(session, PIDTYPE_SID, p);
3036:	
3037:		/* Now kill any processes that happen to have the tty open */
3038:		for_each_process_thread(g, p) {
3039:			if (p->signal->tty == tty) {
3040:				tty_notice(tty, "SAK: killed process %d (%s): by controlling tty\n",
3041:					   task_pid_nr(p), p->comm);
3042:				group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p,
3043:						PIDTYPE_SID);
3044:				continue;
3045:			}
3046:			guard(task_lock)(p);
3047:			i = iterate_fd(p->files, 0, this_tty, tty);
3048:			if (i != 0) {
3049:				tty_notice(tty, "SAK: killed process %d (%s): by fd#%d\n",
3050:					   task_pid_nr(p), p->comm, i - 1);
3051:				group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p,
3052:						PIDTYPE_SID);
3053:			}
3054:		}
3055:		read_unlock(&tasklist_lock);
3056:		put_pid(session);
3057:	}
 SourceFile:drivers/tty/tty_io.c]

7/2 2026/08/11 23:37 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c Name:vc_SAK]

Results:
map[SourceCode: 978:	void vc_SAK(struct work_struct *work)
 979:	{
 980:		struct vc *vc_con =
 981:			container_of(work, struct vc, SAK_work);
 982:		struct vc_data *vc;
 983:		struct tty_struct *tty;
 984:	
 985:		guard(console_lock)();
 986:		vc = vc_con->d;
 987:		if (!vc)
 988:			return;
 989:	
 990:		/* FIXME: review tty ref counting */
 991:		tty = vc->port.tty;
 992:		/* SAK should also work in all raw modes and reset them properly. */
 993:		if (tty)
 994:			__do_SAK(tty);
 995:		reset_vc(vc);
 996:	}
 SourceFile:drivers/tty/vt/vt_ioctl.c]

8/2 2026/08/11 23:37 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/serial/serial_core.c Name:uart_configure_port]

Results:
map[SourceCode:2504:	static void
2505:	uart_configure_port(struct uart_driver *drv, struct uart_state *state,
2506:			    struct uart_port *port)
2507:	{
2508:		unsigned int flags;
2509:	
2510:		/*
2511:		 * If there isn't a port here, don't do anything further.
2512:		 */
2513:		if (!port->iobase && !port->mapbase && !port->membase)
2514:			return;
2515:	
2516:		/*
2517:		 * Now do the auto configuration stuff.  Note that config_port
2518:		 * is expected to claim the resources and map the port for us.
2519:		 */
2520:		flags = 0;
2521:		if (port->flags & UPF_AUTO_IRQ)
2522:			flags |= UART_CONFIG_IRQ;
2523:		if (port->flags & UPF_BOOT_AUTOCONF) {
2524:			if (!(port->flags & UPF_FIXED_TYPE)) {
2525:				port->type = PORT_UNKNOWN;
2526:				flags |= UART_CONFIG_TYPE;
2527:			}
2528:			/* Synchronize with possible boot console. */
2529:			if (uart_console(port))
2530:				console_lock();
2531:			port->ops->config_port(port, flags);
2532:			if (uart_console(port))
2533:				console_unlock();
2534:		}
2535:	
2536:		if (port->type != PORT_UNKNOWN) {
2537:			uart_report_port(drv, port);
2538:	
2539:			/* Synchronize with possible boot console. */
2540:			if (uart_console(port))
2541:				console_lock();
2542:	
2543:			/* Power up port for set_mctrl() */
2544:			uart_change_pm(state, UART_PM_STATE_ON);
2545:	
2546:			/*
2547:			 * Ensure that the modem control lines are de-activated.
2548:			 * keep the DTR setting that is set in uart_set_options()
2549:			 * We probably don't need a spinlock around this, but
2550:			 */
2551:			scoped_guard(uart_port_lock_irqsave, port) {
2552:				unsigned int mask = TIOCM_DTR;
2553:	
2554:				/* Console hardware flow control polls CTS. */
2555:				if (uart_console_hwflow_active(port))
2556:					mask |= TIOCM_RTS;
2557:	
2558:				port->mctrl &= mask;
2559:	
2560:				if (!(port->rs485.flags & SER_RS485_ENABLED))
2561:					port->ops->set_mctrl(port, port->mctrl);
2562:			}
2563:	
2564:			uart_rs485_config(port);
2565:	
2566:			if (uart_console(port))
2567:				console_unlock();
2568:	
2569:			/*
2570:			 * If this driver supports console, and it hasn't been
2571:			 * successfully registered yet, try to re-register it.
2572:			 * It may be that the port was not available.
2573:			 */
2574:			if (port->cons && !console_is_registered(port->cons))
2575:				register_console(port->cons);
2576:	
2577:			/*
2578:			 * Power down all ports by default, except the
2579:			 * console if we have one.
2580:			 */
2581:			if (!uart_console(port))
2582:				uart_change_pm(state, UART_PM_STATE_OFF);
2583:		}
2584:	}
 SourceFile:drivers/tty/serial/serial_core.c]

9/2 2026/08/11 23:37 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/serial/serial_core.c Name:uart_set_termios]

Results:
map[SourceCode:1636:	static void uart_set_termios(struct tty_struct *tty,
1637:				     const struct ktermios *old_termios)
1638:	{
1639:		struct uart_state *state = tty->driver_data;
1640:		struct uart_port *uport;
1641:		unsigned int cflag = tty->termios.c_cflag;
1642:		unsigned int iflag_mask = IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK;
1643:		bool sw_changed = false;
1644:	
1645:		guard(mutex)(&state->port.mutex);
1646:	
1647:		uport = uart_port_check(state);
1648:		if (!uport)
1649:			return;
1650:	
1651:		/*
1652:		 * Drivers doing software flow control also need to know
1653:		 * about changes to these input settings.
1654:		 */
1655:		if (uport->flags & UPF_SOFT_FLOW) {
1656:			iflag_mask |= IXANY|IXON|IXOFF;
1657:			sw_changed =
1658:			   tty->termios.c_cc[VSTART] != old_termios->c_cc[VSTART] ||
1659:			   tty->termios.c_cc[VSTOP] != old_termios->c_cc[VSTOP];
1660:		}
1661:	
1662:		/*
1663:		 * These are the bits that are used to setup various
1664:		 * flags in the low level driver. We can ignore the Bfoo
1665:		 * bits in c_cflag; c_[io]speed will always be set
1666:		 * appropriately by set_termios() in tty_ioctl.c
1667:		 */
1668:		if ((cflag ^ old_termios->c_cflag) == 0 &&
1669:		    tty->termios.c_ospeed == old_termios->c_ospeed &&
1670:		    tty->termios.c_ispeed == old_termios->c_ispeed &&
1671:		    ((tty->termios.c_iflag ^ old_termios->c_iflag) & iflag_mask) == 0 &&
1672:		    !sw_changed)
1673:			return;
1674:	
1675:		uart_change_line_settings(tty, state, old_termios);
1676:		/* reload cflag from termios; port driver may have overridden flags */
1677:		cflag = tty->termios.c_cflag;
1678:	
1679:		/* Handle transition to B0 status */
1680:		if (((old_termios->c_cflag & CBAUD) != B0) && ((cflag & CBAUD) == B0))
1681:			uart_clear_mctrl(uport, TIOCM_RTS | TIOCM_DTR);
1682:		/* Handle transition away from B0 status */
1683:		else if (((old_termios->c_cflag & CBAUD) == B0) && ((cflag & CBAUD) != B0)) {
1684:			unsigned int mask = TIOCM_DTR;
1685:	
1686:			if (!(cflag & CRTSCTS) || !tty_throttled(tty))
1687:				mask |= TIOCM_RTS;
1688:			uart_set_mctrl(uport, mask);
1689:		}
1690:	}
 SourceFile:drivers/tty/serial/serial_core.c]

10/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10436
							output: 38
							thoughts: 1201
						

Thoughts:
**My Thoughts on This Lock Dependency Cycle**

Okay, so I've been digging into this lock dependency report, and it's revealing a rather intricate deadlock scenario within the TTY subsystem, specifically around serial port handling. My initial analysis seems to have hit a wall, but then a closer examination of the lockdep output and the code paths clarified the picture.

Here's how I'm piecing it together, and importantly, where the dependency chain forms:

First, I laid out the normal operational cycles for several key functions:
1.  `flush_to_ldisc`: This is a routine operation that acquires `&buf->lock` and then a *read* lock on `&tty->termios_rwsem`. This happens within a normal workqueue context.
2.  `tty_set_termios`: This is triggered by user-space `ioctl` calls like `TCSETS` on a serial port. It acquires a *write* lock on `&tty->termios_rwsem` and then calls into `uart_set_termios`, which in turn takes `&port->mutex`.
3.  `uart_configure_port`: This function is involved during serial port probing, whether at boot or dynamically. It holds `&port->mutex` and then acquires the `console_lock`.
4.  `vc_SAK`: This handles the Secure Attention Key (SAK) event on virtual consoles. It grabs `console_lock`, then calls into `__do_SAK`, which eventually leads to `tty_ldisc_flush` and `tty_buffer_flush`, the latter acquiring `&buf->lock`.

So far, so good. I'm seeing distinct lock acquisitions in these operations.

Now, the lockdep report shows a specific dependency chain that *looks* like a cycle, and my task is to verify it:
*   `&buf->lock` depends on `console_lock`
*   `console_lock` depends on `&port->mutex`
*   `&port->mutex` depends on `&tty->termios_rwsem`
*   `&tty->termios_rwsem` depends on `&buf->lock`

This is where it gets interesting. I need to trace these dependencies through the code to see if they hold up.

Let's break down each link:

1.  **`&buf->lock` -> `&tty->termios_rwsem`**:
    My understanding is that `flush_to_ldisc` acquires `&buf->lock` first. Then, within its execution path, it eventually calls `tty_ldisc_receive_buf` and then `n_tty_receive_buf_common`. It turns out that `n_tty_receive_buf_common` performs a `down_read(&tty->termios_rwsem)`. So, yes, `&buf->lock` *can* lead to acquiring `&tty->termios_rwsem` (in read mode). This dependency seems valid.

2.  **`&tty->termios_rwsem` -> `&port->mutex`**:
    Here, `tty_set_termios` acquires the write lock on `&tty->termios_rwsem`. Subsequently, it calls the driver's `tty->ops->set_termios` callback, which for serial ports is `uart_set_termios`. And indeed, `uart_set_termios` performs a `mutex_lock(&state->port.mutex)`. So, the write lock on `&tty->termios_rwsem` does lead to acquiring `&port->mutex`. This link also checks out.

3.  **`&port->mutex` -> `console_lock`**:
    This dependency is linked to port registration. When a serial port is registered, specifically via `serial_core_register_port`, it takes a global `port_mutex` and then `state->port.mutex`. Crucially, `uart_configure_port` is called during this process, and `uart_configure_port` acquires the `console_lock`. Therefore, `&port->mutex` leads to `console_lock`. This dependency is confirmed.

4.  **`console_lock` -> `&buf->lock`**:
    This is the final piece of the puzzle. The `vc_SAK` routine acquires the `console_lock`. From there, it proceeds to `__do_SAK`, then `tty_ldisc_flush`, and finally `tty_buffer_flush`. And `tty_buffer_flush` performs a `mutex_lock(&buf->lock)`. So, acquiring `console_lock` can indeed lead to acquiring `&buf->lock`. This final dependency is also valid.

And there it is: a complete cycle. `&buf->lock` -> `&tty->termios_rwsem` -> `&port->mutex` -> `console_lock` -> `&buf->lock`.

The critical question then becomes, how does lockdep *observe* this cycle? It needs to see these dependencies established.

My initial thought was that I'd need to *trigger* these functions in a specific sequence or concurrently. However, I realized that the lockdep report itself gives clues. It mentions that `-> #2 (console_lock){+.+.}-{0:0}:` was recorded during boot. This is a significant insight!

It means the dependency `&port->mutex` -> `console_lock` is *already* registered by the kernel during the initialization of the serial driver, likely during `do_basic_setup` -> `serial8250_init` -> `driver_register` -> `uart_configure_port`. So, this part of the cycle is pre-established.

Now, the remaining part is how `console_lock` -> `&buf->lock` gets observed. The `vc_SAK` function is the trigger. How can `vc_SAK` be initiated? It can be triggered by user space, for example, via `echo k > /proc/sysrq-trigger` (if sysrq is enabled). I'm also looking into `ioctl` calls like `TIOCLINUX` with the `VT_SAK` subcode, to see if that's a viable user-space trigger for SAK.

So, the core of my thought process has shifted from "how to create the cycle" to "how lockdep is seeing this pre-existing dependency and how a user-space interaction with SAK could complete the observable cycle." The cycle isn't necessarily being *created* by a single user action, but rather *completed* by a combination of boot-time registration and a subsequent SAK event, which lockdep then detects as a potential deadlock.


11/2 2026/08/11 23:37 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c Name:tioclinux]

Results:
map[SourceCode:3561:	int tioclinux(struct tty_struct *tty, unsigned long arg)
3562:	{
3563:		char type, data;
3564:		char __user *p = (char __user *)arg;
3565:		void __user *param_aligned32 = (u32 __user *)arg + 1;
3566:		void __user *param = (void __user *)arg + 1;
3567:		int lines;
3568:		int ret;
3569:	
3570:		if (current->signal->tty != tty && !capable(CAP_SYS_ADMIN))
3571:			return -EPERM;
3572:		if (get_user(type, p))
3573:			return -EFAULT;
3574:		ret = 0;
3575:	
3576:		switch (type) {
3577:		case TIOCL_SETSEL:
3578:			return set_selection_user(param, tty);
3579:		case TIOCL_PASTESEL:
3580:			if (!capable(CAP_SYS_ADMIN))
3581:				return -EPERM;
3582:			return paste_selection(tty);
3583:		case TIOCL_UNBLANKSCREEN:
3584:			scoped_guard(console_lock)
3585:				unblank_screen();
3586:			break;
3587:		case TIOCL_SELLOADLUT:
3588:			if (!capable(CAP_SYS_ADMIN))
3589:				return -EPERM;
3590:			return sel_loadlut(param_aligned32);
3591:		case TIOCL_GETSHIFTSTATE:
3592:			/*
3593:			 * Make it possible to react to Shift+Mousebutton. Note that
3594:			 * 'shift_state' is an undocumented kernel-internal variable;
3595:			 * programs not closely related to the kernel should not use
3596:			 * this.
3597:			 */
3598:			data = vt_get_shift_state();
3599:			return put_user(data, p);
3600:		case TIOCL_GETMOUSEREPORTING:
3601:			scoped_guard(console_lock)	/* May be overkill */
3602:				data = mouse_reporting();
3603:			return put_user(data, p);
3604:		case TIOCL_SETVESABLANK:
3605:			return set_vesa_blanking(param);
3606:		case TIOCL_GETKMSGREDIRECT:
3607:			data = vt_get_kmsg_redirect();
3608:			return put_user(data, p);
3609:		case TIOCL_SETKMSGREDIRECT:
3610:			if (!capable(CAP_SYS_ADMIN))
3611:				return -EPERM;
3612:	
3613:			if (get_user(data, p+1))
3614:				return -EFAULT;
3615:	
3616:			vt_kmsg_redirect(data);
3617:	
3618:			break;
3619:		case TIOCL_GETFGCONSOLE:
3620:			/*
3621:			 * No locking needed as this is a transiently correct return
3622:			 * anyway if the caller hasn't disabled switching.
3623:			 */
3624:			return fg_console;
3625:		case TIOCL_SCROLLCONSOLE:
3626:			if (get_user(lines, (s32 __user *)param_aligned32))
3627:				return -EFAULT;
3628:	
3629:			/*
3630:			 * Needs the console lock here. Note that lots of other calls
3631:			 * need fixing before the lock is actually useful!
3632:			 */
3633:			scoped_guard(console_lock)
3634:				scrollfront(vc_cons[fg_console].d, lines);
3635:			break;
3636:		case TIOCL_BLANKSCREEN:	/* until explicitly unblanked, not only poked */
3637:			scoped_guard(console_lock) {
3638:				ignore_poke = 1;
3639:				do_blank_screen(0);
3640:			}
3641:			break;
3642:		case TIOCL_BLANKEDSCREEN:
3643:			return console_blanked;
3644:		case TIOCL_GETBRACKETEDPASTE:
3645:			return get_bracketed_paste(tty);
3646:		default:
3647:			return -EINVAL;
3648:		}
3649:	
3650:		return ret;
3651:	}
 SourceFile:drivers/tty/vt/vt.c]

12/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13012
							output: 52
							thoughts: 75
						

Thoughts:
**My Thought Process on SAK in `tioclinux`**

Alright, so I was looking into the `tioclinux` functionality, and a question popped into my head: does `tioclinux` actually *implement* the Secure Attention Key (SAK) functionality? My initial intuition was that it might not directly, and that it would likely rely on some other mechanism.

To confirm this, I decided to trace how the SAK mechanism is actually *triggered*. My investigation led me to understand that `vc_SAK` is the function responsible for handling the SAK event. I then dug deeper to see how `vc_SAK` itself is invoked. It turns out `vc_SAK` is executed as a work function. Specifically, it's scheduled by calling `schedule_work(&vc_cons[currcons].SAK_work)`.

This then leads me to my next crucial question: where and under what circumstances is this `SAK_work` actually scheduled? Understanding the origin of the `SAK_work` scheduling is key to determining if `tioclinux` is involved in its initiation, or if it's handled by a different part of the system, perhaps a more generic console or virtual console driver. My current line of inquiry is focused on pinpointing the exact code paths that lead to `vc_SAK` being placed on the work queue.


13/2 2026/08/11 23:37 tool codesearch-find-references
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c IncludeSnippetLines:2 Name:SAK_work SourceTreePrefix:]

Results:
map[References:<nil> TruncatedOutput:false]

14/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13138
							output: 30
							thoughts: 23
						

Thoughts:
**My Thought Process on Locating SAK_work**

My initial thought, upon encountering the term `SAK_work`, was that it must be a specific field within a data structure. My immediate instinct was to investigate the `vc` structure, as this often pertains to virtual consoles in operating system contexts. Therefore, my next logical step was to perform a targeted search for `SAK_work` within the codebase associated with the `vc` structure. I'm assuming, given your expertise, that you'll recognize the significance of this particular structure and the `SAK_work` element within it, and that this direct line of inquiry is the most efficient way to get to the heart of the matter.


15/2 2026/08/11 23:37 tool grepper
0m Args:
map[Expression:SAK_work PathPrefix:drivers/tty/vt/]

Results:
map[Output:drivers/tty/vt/keyboard.c=634=static void fn_SAK(struct vc_data *vc)
drivers/tty/vt/keyboard.c-635-{
drivers/tty/vt/keyboard.c:636:	struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
drivers/tty/vt/keyboard.c:637:	schedule_work(SAK_work);
drivers/tty/vt/keyboard.c-638-}
--
drivers/tty/vt/vt.c=1082=int vc_allocate(unsigned int currcons)	/* return 0 on success */
--
drivers/tty/vt/vt.c-1108-	vc->port.ops = &vc_port_ops;
drivers/tty/vt/vt.c:1109:	INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-1110-
--
drivers/tty/vt/vt.c=3844=static int __init con_init(void)
--
drivers/tty/vt/vt.c-3884-						       GFP_NOWAIT);
drivers/tty/vt/vt.c:3885:		INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-3886-		tty_port_init(&vc->port);
--
drivers/tty/vt/vt_ioctl.c=978=void vc_SAK(struct work_struct *work)
--
drivers/tty/vt/vt_ioctl.c-980-	struct vc *vc_con =
drivers/tty/vt/vt_ioctl.c:981:		container_of(work, struct vc, SAK_work);
drivers/tty/vt/vt_ioctl.c-982-	struct vc_data *vc;
]

16/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13668
							output: 51
							thoughts: 83
						

Thoughts:
**My Thought Process Regarding SAK Triggers**

Alright, so I'm looking at this `fn_SAK` function, and it seems to originate from the keyboard handling subsystem. That's a pretty standard place for it to be called from. But my instinct as an expert is always to ask: is this the *only* entry point? Are there other mechanisms that could trigger a "Secure Attention Key" (SAK) event?

My mind immediately jumps to other potential signal-related mechanisms. I'm thinking about things like `KDSIGACCEPT`. That name sounds promising, relating to signals and acceptance. Could `KDSIGACCEPT` be another way to initiate a SAK?

Then, a more specific thought dawns on me: `ioctl(fd, KDSIGACCEPT, ...)` – that's the system call interface. Does *this specific ioctl call* set up a signal to be delivered when a particular keypress occurs? This feels like a distinct possibility, a different path to the same outcome. It's not just about the keyboard driver directly, but about configuring the TTY subsystem itself to be sensitive to certain key events.

To confirm this, my next step is clear: I need to dive into the kernel source code. Specifically, I'll be looking for the implementation of `__do_SAK` within `drivers/tty/tty_io.c`. That file is the heart of TTY operations, and finding `__do_SAK` there will tell me how the SAK signal is ultimately processed and whether the `KDSIGACCEPT` ioctl plays a role in its invocation. This will help me map out the complete set of potential triggers for SAK events.


17/2 2026/08/11 23:37 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/tty_io.c IncludeSnippetLines:2 Name:__do_SAK SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:do_SAK_work SourceFile:drivers/tty/tty_io.c SourceLine:3063 SourceSnippet:3061:		struct tty_struct *tty =
3062:			container_of(work, struct tty_struct, SAK_work);
3063:		__do_SAK(tty);
3064:	}
] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:vc_SAK SourceFile:drivers/tty/vt/vt_ioctl.c SourceLine:994 SourceSnippet: 992:		/* SAK should also work in all raw modes and reset them properly. */
 993:		if (tty)
 994:			__do_SAK(tty);
 995:		reset_vc(vc);
 996:	}
]] TruncatedOutput:false]

18/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14005
							output: 52
							thoughts: 29
						

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

Right, so I'm diving into the kernel's TTY subsystem, specifically looking at `drivers/tty/tty_io.c`. My current focus is on this function, `do_SAK_work`. I need to understand its lifecycle and how it gets invoked. My immediate next step is to trace its scheduling – who is responsible for kicking it off? I need to find the call sites and the mechanisms that lead to its execution. This will give me a clearer picture of its role within the TTY driver's operation.


19/2 2026/08/11 23:37 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/tty_io.c IncludeSnippetLines:2 Name:do_SAK_work SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:takes-address-of ReferencingEntityKind:function ReferencingEntityName:alloc_tty_struct SourceFile:drivers/tty/tty_io.c SourceLine:3126 SourceSnippet:3124:		spin_lock_init(&tty->files_lock);
3125:		INIT_LIST_HEAD(&tty->tty_files);
3126:		INIT_WORK(&tty->SAK_work, do_SAK_work);
3127:	
3128:		tty->driver = driver;
]] TruncatedOutput:false]

20/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14207
							output: 37
							thoughts: 32
						

Thoughts:
**My Thought Process Regarding `SAK_work` Scheduling**

Ah, a curious observation has surfaced: it appears that `tty->SAK_work` is being scheduled by the `do_SAK(tty)` function. This immediately piques my interest because, as someone deeply invested in the intricacies of terminal handling and signal management, the precise orchestration of such asynchronous operations is paramount. I need to verify this connection and understand the mechanics behind it. My immediate next step, therefore, is to delve into the implementation of `do_SAK(tty)`. I need to meticulously examine its code path, tracing the execution flow to confirm how and when `tty->SAK_work` is indeed queued for execution. This verification is critical for a comprehensive understanding of the SAK (Secure Attention Key) mechanism's lifecycle and its interaction with the workqueue system.


21/2 2026/08/11 23:37 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_io.c Name:do_SAK]

Results:
map[SourceCode:3066:	/*
3067:	 * The tq handling here is a little racy - tty->SAK_work may already be queued.
3068:	 * Fortunately we don't need to worry, because if ->SAK_work is already queued,
3069:	 * the values which we write to it will be identical to the values which it
3070:	 * already has. --akpm
3071:	 */
3072:	void do_SAK(struct tty_struct *tty)
3073:	{
3074:		if (!tty)
3075:			return;
3076:		schedule_work(&tty->SAK_work);
3077:	}
 SourceFile:drivers/tty/tty_io.c]

22/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14475
							output: 50
							thoughts: 9
						

Thoughts:
**My Internal Monologue: Deconstructing the `do_SAK` Invocation**

Alright, let's dive into this. My primary query, the central node of my current investigation, is: "Who, precisely, is orchestrating the execution of this `do_SAK` function?" This isn't just a casual curiosity; it's fundamental to understanding the flow of control, the underlying mechanisms at play, and potentially, the motivations behind this particular action.

I'm not just looking for a simple caller. I need to trace the lineage, the dependencies, the entire call stack that leads to this point. Is it a direct invocation from a known module, or is it buried within a more complex chain of events, perhaps triggered by an external event or a state change within the system? Understanding the context of the call – what state the system is in, what data is available, what preconditions are met – is absolutely critical. This will inform my understanding of *why* `do_SAK` is being called *now*.

Furthermore, I'm considering the implications of this call. What are the expected outcomes? What are the potential side effects? Are there any error handling mechanisms in place for this particular invocation, and if so, where are they managed? The identity of the caller can often provide strong clues about these expectations and the broader purpose of the `do_SAK` operation within the system's architecture. It's about piecing together the narrative of execution, and the identity of the actor initiating the `do_SAK` call is a pivotal piece of that puzzle.


23/2 2026/08/11 23:37 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/tty_io.c IncludeSnippetLines:2 Name:do_SAK SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:uart_handle_break SourceFile:include/linux/serial_core.h SourceLine:1329 SourceSnippet:1327:	#endif
1328:		if (port->flags & UPF_SAK)
1329:			do_SAK(state->port.tty);
1330:		return 0;
1331:	}
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_do_SAK_1091 SourceFile:drivers/tty/tty_io.c SourceLine:3078 SourceSnippet:3078:	EXPORT_SYMBOL(do_SAK);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_do_SAK SourceFile:drivers/tty/tty_io.c SourceLine:3078 SourceSnippet:3078:	EXPORT_SYMBOL(do_SAK);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_do_SAK SourceFile:drivers/tty/tty_io.c SourceLine:3078 SourceSnippet:3078:	EXPORT_SYMBOL(do_SAK);
]] TruncatedOutput:false]

24/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14835
							output: 32
							thoughts: 25
						

Thoughts:
**A Moment of Revelation: System Request and SAK**

My mind just had a jolt of recognition. I was pondering the intricacies of system control when it hit me: the `sysrq` mechanism! I suddenly realized that `sysrq` could actually be the trigger for SAK (Secure Attention Key). This connection feels significant, a crucial piece of the puzzle. I need to verify this immediately. My immediate next step, naturally, is to delve into the source code. I'll be heading straight for `drivers/tty/sysrq.c` to confirm this hypothesis and understand the exact implementation details. This is where the truth lies, and I'm eager to see how these two functionalities are intertwined.


25/2 2026/08/11 23:37 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:do_SAK PathPrefix:drivers/tty/sysrq.c]

Results:
map[Output:]

26/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14890
							output: 30
							thoughts: 18
						

Thoughts:
**My Thought Process on Locating SAK Implementation**

Right, so the immediate objective is to pinpoint how the "System Attention Key" (SAK) functionality is actually implemented within the kernel. Given my expertise, I know that SAK is a critical component, often associated with emergency console operations, and its code is likely to reside in a core driver area. My first instinct, therefore, is to directly inspect the source code. Specifically, I'll be looking for files that handle terminal device drivers, as SAK is intrinsically linked to console interaction. My hypothesis is that the relevant code will be within the `drivers/tty/` directory. I'll be searching for a file named `sysrq.c` because I recall the "Magic SysRq key" functionality, which SAK is a part of, being managed in that specific file. This is a direct, targeted approach, leveraging my familiarity with kernel architecture and common driver locations.


27/2 2026/08/11 23:37 tool grepper
0m Args:
map[Expression:SAK PathPrefix:drivers/tty/sysrq.c]

Results:
map[Output:drivers/tty/sysrq.c=109=static const struct sysrq_key_op sysrq_loglevel_op = {
--
drivers/tty/sysrq.c-116-#ifdef CONFIG_VT
drivers/tty/sysrq.c:117:static void sysrq_handle_SAK(u8 key)
drivers/tty/sysrq.c-118-{
drivers/tty/sysrq.c:119:	struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
drivers/tty/sysrq.c-120-
drivers/tty/sysrq.c:121:	schedule_work(SAK_work);
drivers/tty/sysrq.c-122-}
drivers/tty/sysrq.c:123:static const struct sysrq_key_op sysrq_SAK_op = {
drivers/tty/sysrq.c:124:	.handler	= sysrq_handle_SAK,
drivers/tty/sysrq.c-125-	.help_msg	= "sak(k)",
drivers/tty/sysrq.c:126:	.action_msg	= "SAK",
drivers/tty/sysrq.c-127-	.enable_mask	= SYSRQ_ENABLE_KEYBOARD,
--
drivers/tty/sysrq.c-129-#else
drivers/tty/sysrq.c:130:#define sysrq_SAK_op (*(const struct sysrq_key_op *)NULL)
drivers/tty/sysrq.c-131-#endif
--
drivers/tty/sysrq.c=467=static const struct sysrq_key_op *sysrq_key_table[62] = {
--
drivers/tty/sysrq.c-493-	&sysrq_thaw_op,			/* j */
drivers/tty/sysrq.c:494:	&sysrq_SAK_op,			/* k */
drivers/tty/sysrq.c-495-	&sysrq_showallcpus_op,		/* l */
]

28/2 2026/08/11 23:37 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15451
							output: 38
							thoughts: 1974
						

Thoughts:
**My Thought Process Unraveling a Potential Lock Order Inversion**

Alright, let's break down this lock ordering puzzle. I'm trying to understand how these locks interact, specifically looking for a situation where a deadlock might occur, or more precisely, an inversion of the expected lock order.

My starting point is the `sysrq_handle_SAK` function. I know it ultimately schedules a work item, `vc_SAK`, which is tied to the foreground console. This means if I want to trigger `vc_SAK`, I can do so by writing 'k' to `/proc/sysrq-trigger`. My immediate observation is that `vc_SAK` begins by acquiring `console_lock`, and then it proceeds to acquire a buffer lock, `&buf->lock`.

Now, the crucial part is to map out the dependencies between these locks. I need to understand which lock is acquired *after* another lock, and in what context.

**Dependency Chain Analysis:**

1.  **`&buf->lock` -> `&tty->termios_rwsem`**: I recall that `flush_to_ldisc` is the function that establishes this relationship. This function gets called automatically whenever data is received on a tty. So, I can easily trigger this by writing some data to a pseudoterminal (pty) or a serial port. This `flush_to_ldisc` operation will run within a workqueue context. Ah, I need to be precise: `flush_to_ldisc` acquires `&buf->lock` first, and *then* it attempts to acquire `&tty->termios_rwsem` (in read mode). This is a standard operation for any tty.

2.  **`&tty->termios_rwsem` -> `&port->mutex`**: This dependency arises when a `ioctl(TCSETS)` operation is performed on a serial port. This `ioctl` call will acquire `&tty->termios_rwsem` (in write mode) and then proceed to acquire `&port->mutex`.

3.  **`&port->mutex` -> `console_lock`**: This one seems to be pre-established during the system boot process for serial drivers. The `serial8250_init` function registers serial ports, and in doing so, it takes `&port->mutex` and then `console_lock`. This is a critical observation – it means this dependency is already present in the lockdep graph, and I don't need to explicitly trigger it for the initial setup.

4.  **`console_lock` -> `&buf->lock`**: This is the one I initially identified with `vc_SAK`. When I trigger `vc_SAK` (by writing 'k' to `/proc/sysrq-trigger`), it acquires `console_lock`. From there, it proceeds to call `__do_SAK`, which eventually leads to `tty_ldisc_flush` and then `tty_buffer_flush`. This `tty_buffer_flush` is where `&buf->lock` is acquired. So, `vc_SAK` establishes `console_lock` -> `&buf->lock`.

**Revisiting the Chain and the Goal:**

Given that `&port->mutex` -> `console_lock` is already established, my objective is to create a sequence where:
*   `&buf->lock` -> `&tty->termios_rwsem` (established by `flush_to_ldisc`)
*   `&tty->termios_rwsem` -> `&port->mutex` (established by `ioctl(TCSETS)`)
*   `console_lock` -> `&buf->lock` (established by `vc_SAK`)

This looks like it could form a cycle: `&tty->termios_rwsem` -> `&port->mutex` -> `console_lock` -> `&buf->lock` -> `&tty->termios_rwsem`.

**Refining the Understanding of Lock Classes and Instances:**

I need to be careful about the distinction between lock *classes* and lock *instances*. Lockdep tracks dependencies between lock *classes*.

*   `&buf->lock` is specific to a `tty_port`.
*   `&tty->termios_rwsem` is specific to a `tty_struct`.
*   `&port->mutex` is specific to a `uart_port`.

However, lockdep observes relationships between the *classes* of these locks. So, the chain I'm looking for is:
*   `&buf->lock` class -> `&tty->termios_rwsem` class
*   `&tty->termios_rwsem` class -> `&port->mutex` class
*   `&port->mutex` class -> `console_lock` class
*   `console_lock` class -> `&buf->lock` class

**Confirming the Dependencies with Specific Operations:**

*   **`&tty->termios_rwsem` -> `&port->mutex`**: I'm confident that `ioctl(TCSETS)` on a serial port will acquire `&tty->termios_rwsem` and then `&port->mutex` of the associated `uart_port`. This confirms the class relationship.

*   **`console_lock` -> `&buf->lock`**: As discussed, `vc_SAK` via `sysrq_handle_SAK` triggers `console_lock`, and this leads to `tty_buffer_flush` acquiring `&buf->lock`. This establishes the class relationship.

*   **`&buf->lock` -> `&tty->termios_rwsem`**: This is established by `flush_to_ldisc`, which happens when data arrives at a tty. Since `flush_to_ldisc` acquires `&buf->lock` and then `&tty->termios_rwsem`, this class relationship holds.

**The Crucial Detail: `&port->mutex` -> `console_lock` During Boot**

The lockdep report indicates the following chain:
`-> #3 (&buf->lock){+.+.}-{4:4}:`
`-> #2 (console_lock){+.+.}-{0:0}:`
`-> #1 (&port->mutex){+.+.}-{4:4}:`
`-> #0 (&tty->termios_rwsem){++++}-{4:4}:`

This implies the following ordering:
1.  `&tty->termios_rwsem` is acquired.
2.  Then `&port->mutex` is acquired.
3.  Then `console_lock` is acquired.
4.  Then `&buf->lock` is acquired.

This reveals the complete cycle I was looking for: `&tty->termios_rwsem` -> `&port->mutex` -> `console_lock` -> `&buf->lock` -> `&tty->termios_rwsem`.

**Finalizing the Trigger Sequence:**

Based on this, the sequence to potentially trigger this inversion seems to be:

1.  **Establish `&tty->termios_rwsem` -> `&port->mutex`**: I can achieve this by opening a serial port (let's say `/dev/ttyS0`) and then calling `ioctl(fd, TCSETS, &termios)`. This will acquire `&tty->termios_rwsem` and then `&port->mutex` for that specific serial port.

2.  **Establish `&port->mutex` -> `console_lock`**: This is where the boot time registration becomes important. If `/dev/ttyS0` is the system's console (which is common by default), then during boot, `serial8250_init` would have already registered the `&port->mutex` -> `console_lock` dependency. When I perform the `ioctl` in step 1, I'm using the `&port->mutex` associated with the console serial port, thereby linking `&tty->termios_rwsem` to the `console_lock` class.

3.  **Establish `console_lock` -> `&buf->lock`**: I can trigger this by writing 'k' to `/proc/sysrq-trigger`. This invokes `vc_SAK`, which takes `console_lock` and then subsequently acquires `&buf->lock` via the console's tty path.

4.  **Establish `&buf->lock` -> `&tty->termios_rwsem`**: This is the final piece of the cycle. This dependency is established whenever data is received by *any* tty, triggering `flush_to_ldisc`. The lockdep mechanism observes this as a class-level dependency. So, if there's any pending data on a tty (or I can simulate it by writing to a pty or serial port), this `&buf->lock` -> `&tty->termios_rwsem` link will be considered by lockdep.

The implication is that if these operations happen in the "wrong" order – for example, if the `ioctl` happens *after* `vc_SAK` has acquired `console_lock` and is waiting for `&buf->lock`, and `flush_to_ldisc` is active holding `&buf->lock` and waiting for `&tty->termios_rwsem` which is held by the `ioctl` – then we have a potential deadlock scenario. The lockdep report is showing the *potential* for an inversion if these operations are interleaved in a particular way.


29/2 2026/08/11 23:38 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_buffer.c Name:tty_buffer_init]

Results:
map[SourceCode: 575:	/**
 576:	 * tty_buffer_init		-	prepare a tty buffer structure
 577:	 * @port: tty port to initialise
 578:	 *
 579:	 * Set up the initial state of the buffer management for a tty device. Must be
 580:	 * called before the other tty buffer functions are used.
 581:	 */
 582:	void tty_buffer_init(struct tty_port *port)
 583:	{
 584:		struct tty_bufhead *buf = &port->buf;
 585:	
 586:		mutex_init(&buf->lock);
 587:		tty_buffer_reset(&buf->sentinel, 0);
 588:		buf->head = &buf->sentinel;
 589:		buf->tail = &buf->sentinel;
 590:		init_llist_head(&buf->free);
 591:		atomic_set(&buf->mem_used, 0);
 592:		atomic_set(&buf->priority, 0);
 593:		INIT_WORK(&buf->work, flush_to_ldisc);
 594:		buf->mem_limit = TTYB_DEFAULT_MEM_LIMIT;
 595:	}
 SourceFile:drivers/tty/tty_buffer.c]

30/2 2026/08/11 23:38 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17820
							output: 39
							thoughts: 36
						

Thoughts:
**My Thought Process Regarding Resource Locking Initialization**

Ah, I've just been pondering the initialization of synchronization primitives, specifically looking at `mutex_init(&buf->lock)`. My immediate recognition is that this call, in its default form, employs the standard, generic lock class for the mutex being initialized. It's a straightforward, no-frills setup.

Now, my mind immediately jumps to a related, but distinct, scenario: `&tty->termios_rwsem`. This brings to the forefront the concept of reader-writer semaphores. I'm mentally contrasting the simple mutual exclusion offered by the `mutex` with the more nuanced locking strategy of an `rwsem`. The latter allows for concurrent read access, which is a crucial distinction in scenarios where reads are frequent and writes are less so, like managing terminal configurations. My internal dialogue is essentially a comparison and confirmation of the underlying mechanisms and their typical use cases.


31/2 2026/08/11 23:38 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_io.c Name:tty_init_termios]

Results:
map[SourceCode:1234:	/**
1235:	 * tty_init_termios - helper for termios setup
1236:	 * @tty: the tty to set up
1237:	 *
1238:	 * Initialise the termios structure for this tty. This runs under the
1239:	 * %tty_mutex currently so we can be relaxed about ordering.
1240:	 */
1241:	void tty_init_termios(struct tty_struct *tty)
1242:	{
1243:		struct ktermios *tp;
1244:		int idx = tty->index;
1245:	
1246:		if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS)
1247:			tty->termios = tty->driver->init_termios;
1248:		else {
1249:			/* Check for lazy saved data */
1250:			tp = tty->driver->termios[idx];
1251:			if (tp != NULL) {
1252:				tty->termios = *tp;
1253:				tty->termios.c_line  = tty->driver->init_termios.c_line;
1254:			} else
1255:				tty->termios = tty->driver->init_termios;
1256:		}
1257:		/* Compatibility until drivers always set this */
1258:		tty->termios.c_ispeed = tty_termios_input_baud_rate(&tty->termios);
1259:		tty->termios.c_ospeed = tty_termios_baud_rate(&tty->termios);
1260:	}
 SourceFile:drivers/tty/tty_io.c]

32/2 2026/08/11 23:38 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18358
							output: 51
							thoughts: 13
						

Thoughts:
**My Thought Process:**

I'm trying to understand the lifecycle of a critical kernel synchronization primitive, specifically `termios_rwsem`. My immediate question, the first point of inquiry that sparks this thought process, is where exactly this semaphore is initialized within the kernel's code. I need to trace its origin to fully grasp its behavior, dependencies, and potential race conditions, especially considering its role in managing access to termios structures, which are fundamental to terminal I/O operations. Without knowing its initialization point, my understanding of its usage and safety guarantees would be incomplete.


33/2 2026/08/11 23:38 tool codesearch-find-references
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/tty/tty_io.c IncludeSnippetLines:2 Name:termios_rwsem SourceTreePrefix:]

Results:
map[References:<nil> TruncatedOutput:false]

34/2 2026/08/11 23:38 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18421
							output: 29
							thoughts: 24
						

Thoughts:
**My Thought Process**

Alright, so I'm trying to get a handle on how terminal I/O locking is managed within the kernel, and specifically how it relates to the `termios` structure. My first instinct is to dive into the core code responsible for terminal operations. Given that `termios` is central to terminal configuration and behavior, I'm going to focus my search on files that deal with the fundamental I/O aspects of ttys.

Therefore, my immediate next step is to perform a targeted search for `termios_rwsem` within the `drivers/tty/tty_io.c` file. I'm hypothesizing that this symbol, likely an `rw_semaphore` (read-write semaphore) named in relation to `termios`, will be a key indicator of the locking mechanism employed to protect the `termios` structure itself, and perhaps related terminal state, during concurrent read and write operations. Examining this symbol's usage in `tty_io.c` should provide direct insight into how contention for terminal settings is handled and serialized.


35/2 2026/08/11 23:38 tool grepper
0m Args:
map[Expression:termios_rwsem PathPrefix:drivers/tty/]

Results:
map[Output:drivers/tty/n_tty.c=84=struct n_tty_data {
--
drivers/tty/n_tty.c-100-
drivers/tty/n_tty.c:101:	/* must hold exclusive termios_rwsem to reset these */
drivers/tty/n_tty.c-102-	unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1;
--
drivers/tty/n_tty.c=161=static void tty_copy(const struct tty_struct *tty, void *to, size_t tail,
--
drivers/tty/n_tty.c-188- * Locking:
drivers/tty/n_tty.c:189: *  * Caller holds exclusive %termios_rwsem, or
drivers/tty/n_tty.c-190- *  * n_tty_read()/consumer path:
drivers/tty/n_tty.c:191: *	holds non-exclusive %termios_rwsem
drivers/tty/n_tty.c-192- */
--
drivers/tty/n_tty.c=255=static void n_tty_check_unthrottle(struct tty_struct *tty)
--
drivers/tty/n_tty.c-292- *  * n_tty_receive_buf()/producer path:
drivers/tty/n_tty.c:293: *	caller holds non-exclusive %termios_rwsem
drivers/tty/n_tty.c-294- */
drivers/tty/n_tty.c=295=static inline void put_tty_queue(u8 c, struct n_tty_data *ldata)
--
drivers/tty/n_tty.c-308- * Locking:
drivers/tty/n_tty.c:309: *  * caller holds exclusive %termios_rwsem, or
drivers/tty/n_tty.c-310- *  * (locking is not required)
--
drivers/tty/n_tty.c=325=static void n_tty_packet_mode_flush(struct tty_struct *tty)
--
drivers/tty/n_tty.c-341- *
drivers/tty/n_tty.c:342: * Holds %termios_rwsem to exclude producer/consumer while buffer indices are
drivers/tty/n_tty.c-343- * reset.
drivers/tty/n_tty.c-344- *
drivers/tty/n_tty.c:345: * Locking: %ctrl.lock, exclusive %termios_rwsem
drivers/tty/n_tty.c-346- */
drivers/tty/n_tty.c=347=static void n_tty_flush_buffer(struct tty_struct *tty)
drivers/tty/n_tty.c-348-{
drivers/tty/n_tty.c:349:	guard(rwsem_write)(&tty->termios_rwsem);
drivers/tty/n_tty.c-350-	reset_buffer_flags(tty->disc_data);
--
drivers/tty/n_tty.c=905=static inline void finish_erasing(struct n_tty_data *ldata)
--
drivers/tty/n_tty.c-922- * Locking: n_tty_receive_buf()/producer path:
drivers/tty/n_tty.c:923: *	caller holds non-exclusive %termios_rwsem
drivers/tty/n_tty.c-924- */
--
drivers/tty/n_tty.c=1067=static void isig(int sig, struct tty_struct *tty)
--
drivers/tty/n_tty.c-1077-	/* signal and flush */
drivers/tty/n_tty.c:1078:	up_read(&tty->termios_rwsem);
drivers/tty/n_tty.c:1079:	scoped_guard(rwsem_write, &tty->termios_rwsem) {
drivers/tty/n_tty.c-1080-		__isig(sig, tty);
--
drivers/tty/n_tty.c-1097-	}
drivers/tty/n_tty.c:1098:	down_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-1099-}
--
drivers/tty/n_tty.c-1108- * Locking: n_tty_receive_buf()/producer path:
drivers/tty/n_tty.c:1109: *	caller holds non-exclusive termios_rwsem
drivers/tty/n_tty.c-1110- *
drivers/tty/n_tty.c:1111: * Note: may get exclusive %termios_rwsem if flushing input buffer
drivers/tty/n_tty.c-1112- */
--
drivers/tty/n_tty.c=1140=static void n_tty_receive_overrun(const struct tty_struct *tty)
--
drivers/tty/n_tty.c-1160- * Locking: n_tty_receive_buf()/producer path:
drivers/tty/n_tty.c:1161: * 	caller holds non-exclusive %termios_rwsem
drivers/tty/n_tty.c-1162- */
--
drivers/tty/n_tty.c=1330=static void n_tty_receive_char_special(struct tty_struct *tty, u8 c,
--
drivers/tty/n_tty.c-1395- * Locking: n_tty_receive_buf()/producer path:
drivers/tty/n_tty.c:1396: *	caller holds non-exclusive %termios_rwsem
drivers/tty/n_tty.c-1397- *	publishes canon_head if canonical mode is active
--
drivers/tty/n_tty.c=1586=static void __receive_buf(struct tty_struct *tty, const u8 *cp, const u8 *fp,
--
drivers/tty/n_tty.c-1666- * Locking: n_tty_receive_buf()/producer path:
drivers/tty/n_tty.c:1667: *	claims non-exclusive %termios_rwsem
drivers/tty/n_tty.c-1668- *	publishes commit_head or canon_head
--
drivers/tty/n_tty.c=1671=n_tty_receive_buf_common(struct tty_struct *tty, const u8 *cp, const u8 *fp,
--
drivers/tty/n_tty.c-1677-
drivers/tty/n_tty.c:1678:	guard(rwsem_read)(&tty->termios_rwsem);
drivers/tty/n_tty.c-1679-
--
drivers/tty/n_tty.c=1756=static size_t n_tty_receive_buf2(struct tty_struct *tty, const u8 *cp,
--
drivers/tty/n_tty.c-1771- *
drivers/tty/n_tty.c:1772: * Locking: Caller holds @tty->termios_rwsem
drivers/tty/n_tty.c-1773- */
--
drivers/tty/n_tty.c=1865=static void n_tty_close(struct tty_struct *tty)
--
drivers/tty/n_tty.c-1871-
drivers/tty/n_tty.c:1872:	guard(rwsem_write)(&tty->termios_rwsem);
drivers/tty/n_tty.c-1873-	vfree(ldata);
--
drivers/tty/n_tty.c=1907=static inline int input_available_p(const struct tty_struct *tty, int poll)
--
drivers/tty/n_tty.c-1932- *  * n_tty_read()/consumer path:
drivers/tty/n_tty.c:1933: *		caller holds non-exclusive %termios_rwsem;
drivers/tty/n_tty.c-1934- *		read_tail published
--
drivers/tty/n_tty.c=1936=static bool copy_from_read_buf(const struct tty_struct *tty, u8 **kbp,
--
drivers/tty/n_tty.c-1987- *  * n_tty_read()/consumer path:
drivers/tty/n_tty.c:1988: *	caller holds non-exclusive %termios_rwsem;
drivers/tty/n_tty.c-1989- *	read_tail published
--
drivers/tty/n_tty.c=2090=static int job_control(struct tty_struct *tty, struct file *file)
--
drivers/tty/n_tty.c-2103-/*
drivers/tty/n_tty.c:2104: * We still hold the atomic_read_lock and the termios_rwsem, and can just
drivers/tty/n_tty.c-2105- * continue to copy data.
--
drivers/tty/n_tty.c=2107=static ssize_t n_tty_continue_cookie(struct tty_struct *tty, u8 *kbuf,
--
drivers/tty/n_tty.c-2129-	n_tty_check_unthrottle(tty);
drivers/tty/n_tty.c:2130:	up_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2131-	mutex_unlock(&ldata->atomic_read_lock);
--
drivers/tty/n_tty.c=2137=static int n_tty_wait_for_input(struct tty_struct *tty, struct file *file,
--
drivers/tty/n_tty.c-2156-
drivers/tty/n_tty.c:2157:	up_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2158-	*timeout = wait_woken(wait, TASK_INTERRUPTIBLE, *timeout);
drivers/tty/n_tty.c:2159:	down_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2160-
--
drivers/tty/n_tty.c-2180- * Locking: n_tty_read()/consumer path:
drivers/tty/n_tty.c:2181: *	claims non-exclusive termios_rwsem;
drivers/tty/n_tty.c-2182- *	publishes read_tail
--
drivers/tty/n_tty.c=2184=static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, u8 *kbuf,
--
drivers/tty/n_tty.c-2214-
drivers/tty/n_tty.c:2215:	down_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2216-
--
drivers/tty/n_tty.c-2248-		if (!input_available_p(tty, 0)) {
drivers/tty/n_tty.c:2249:			up_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2250-			tty_buffer_flush_work(tty->port);
drivers/tty/n_tty.c:2251:			down_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2252-			if (!input_available_p(tty, 0)) {
--
drivers/tty/n_tty.c-2291-	}
drivers/tty/n_tty.c:2292:	up_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2293-
--
drivers/tty/n_tty.c=2335=static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
--
drivers/tty/n_tty.c-2348-
drivers/tty/n_tty.c:2349:	guard(rwsem_read)(&tty->termios_rwsem);
drivers/tty/n_tty.c-2350-
--
drivers/tty/n_tty.c-2404-		}
drivers/tty/n_tty.c:2405:		up_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2406-
--
drivers/tty/n_tty.c-2408-
drivers/tty/n_tty.c:2409:		down_read(&tty->termios_rwsem);
drivers/tty/n_tty.c-2410-	}
--
drivers/tty/n_tty.c=2479=static int n_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
--
drivers/tty/n_tty.c-2488-	case TIOCINQ:
drivers/tty/n_tty.c:2489:		scoped_guard(rwsem_write, &tty->termios_rwsem)
drivers/tty/n_tty.c-2490-			if (L_ICANON(tty) && !L_EXTPROC(tty))
--
drivers/tty/pty.c=355=static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
--
drivers/tty/pty.c-379-	tty_set_lock_subclass(o_tty);
drivers/tty/pty.c:380:	lockdep_set_subclass(&o_tty->termios_rwsem, TTY_LOCK_SLAVE);
drivers/tty/pty.c-381-
--
drivers/tty/serial/8250/8250_port.c=2604=void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk)
--
drivers/tty/serial/8250/8250_port.c-2610-
drivers/tty/serial/8250/8250_port.c:2611:		guard(rwsem_write)(&tty->termios_rwsem);
drivers/tty/serial/8250/8250_port.c-2612-		guard(mutex)(&tport->mutex);
--
drivers/tty/serial/serial_core.c=1032=static int uart_set_info_user(struct tty_struct *tty, struct serial_struct *ss)
--
drivers/tty/serial/serial_core.c-1036-
drivers/tty/serial/serial_core.c:1037:	guard(rwsem_write)(&tty->termios_rwsem);
drivers/tty/serial/serial_core.c-1038-	/*
--
drivers/tty/serial/serial_core.c=1550=uart_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
--
drivers/tty/serial/serial_core.c-1559-	if (cmd == TIOCSERCONFIG) {
drivers/tty/serial/serial_core.c:1560:		guard(rwsem_write)(&tty->termios_rwsem);
drivers/tty/serial/serial_core.c-1561-		return uart_do_autoconfig(tty, state);
--
drivers/tty/serial/serial_core.c-1572-	if (cmd == TIOCSRS485)
drivers/tty/serial/serial_core.c:1573:		down_write(&tty->termios_rwsem);
drivers/tty/serial/serial_core.c-1574-
--
drivers/tty/serial/serial_core.c-1615-	if (cmd == TIOCSRS485)
drivers/tty/serial/serial_core.c:1616:		up_write(&tty->termios_rwsem);
drivers/tty/serial/serial_core.c-1617-
--
drivers/tty/tty.h-30- *		  The stable lock order is master pty first, then slave pty.
drivers/tty/tty.h:31: * termios_rwsem - The stable lock order is tty_buffer lock->termios_rwsem.
drivers/tty/tty.h-32- *		   Subclassing this lock enables the slave pty to hold its
drivers/tty/tty.h:33: *		   termios_rwsem when claiming the master tty_buffer lock.
drivers/tty/tty.h-34- * tty_buffer lock - slave ptys can claim nested buffer lock when handling
--
drivers/tty/tty_baudrate.c=198=EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
--
drivers/tty/tty_baudrate.c-206- *	Update the current termios data for the tty with the new speed
drivers/tty/tty_baudrate.c:207: *	settings. The caller must hold the termios_rwsem for the tty in
drivers/tty/tty_baudrate.c-208- *	question.
--
drivers/tty/tty_io.c=530=static struct file *tty_release_redirect(struct tty_struct *tty)
--
drivers/tty/tty_io.c-561- *   * tty_ldiscs_lock from called functions
drivers/tty/tty_io.c:562: *   * termios_rwsem resetting termios data
drivers/tty/tty_io.c-563- *   * tasklist_lock to walk task list for hangup event
--
drivers/tty/tty_io.c=1137=int tty_send_xchar(struct tty_struct *tty, u8 ch)
--
drivers/tty/tty_io.c-1141-	if (tty->ops->send_xchar) {
drivers/tty/tty_io.c:1142:		down_read(&tty->termios_rwsem);
drivers/tty/tty_io.c-1143-		tty->ops->send_xchar(tty, ch);
drivers/tty/tty_io.c:1144:		up_read(&tty->termios_rwsem);
drivers/tty/tty_io.c-1145-		return 0;
--
drivers/tty/tty_io.c-1150-
drivers/tty/tty_io.c:1151:	down_read(&tty->termios_rwsem);
drivers/tty/tty_io.c-1152-	if (was_stopped)
--
drivers/tty/tty_io.c-1156-		stop_tty(tty);
drivers/tty/tty_io.c:1157:	up_read(&tty->termios_rwsem);
drivers/tty/tty_io.c-1158-	tty_write_unlock(tty);
--
drivers/tty/tty_io.c=3098=struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
--
drivers/tty/tty_io.c-3114-	mutex_init(&tty->throttle_mutex);
drivers/tty/tty_io.c:3115:	init_rwsem(&tty->termios_rwsem);
drivers/tty/tty_io.c-3116-	mutex_init(&tty->winsize_mutex);
--
drivers/tty/tty_ioctl.c=87=EXPORT_SYMBOL(tty_driver_flush_buffer);
--
drivers/tty/tty_ioctl.c-93- * Indicate that a @tty may continue transmitting data down the stack. Takes
drivers/tty/tty_ioctl.c:94: * the &tty_struct->termios_rwsem to protect against parallel
drivers/tty/tty_ioctl.c-95- * throttle/unthrottle and also to ensure the driver can consistently reference
--
drivers/tty/tty_ioctl.c=101=void tty_unthrottle(struct tty_struct *tty)
drivers/tty/tty_ioctl.c-102-{
drivers/tty/tty_ioctl.c:103:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-104-	if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) &&
--
drivers/tty/tty_ioctl.c-107-	tty->flow_change = TTY_FLOW_NO_CHANGE;
drivers/tty/tty_ioctl.c:108:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-109-}
--
drivers/tty/tty_ioctl.c=307=EXPORT_SYMBOL_GPL(tty_get_frame_size);
--
drivers/tty/tty_ioctl.c-316- *
drivers/tty/tty_ioctl.c:317: * Locking: &tty_struct->termios_rwsem
drivers/tty/tty_ioctl.c-318- */
drivers/tty/tty_ioctl.c=319=int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
--
drivers/tty/tty_ioctl.c-332-	   for the set_termios notification eventually */
drivers/tty/tty_ioctl.c:333:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-334-	old_termios = tty->termios;
--
drivers/tty/tty_ioctl.c-350-	}
drivers/tty/tty_ioctl.c:351:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-352-	return 0;
--
drivers/tty/tty_ioctl.c=423=__weak int kernel_termios_to_user_termios(struct termios __user *u,
--
drivers/tty/tty_ioctl.c-439- * Locking: called functions take &tty_struct->ldisc_sem and
drivers/tty/tty_ioctl.c:440: * &tty_struct->termios_rwsem locks
drivers/tty/tty_ioctl.c-441- *
--
drivers/tty/tty_ioctl.c=444=static int set_termios(struct tty_struct *tty, void __user *arg, int opt)
--
drivers/tty/tty_ioctl.c-452-
drivers/tty/tty_ioctl.c:453:	down_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-454-	tmp_termios = tty->termios;
drivers/tty/tty_ioctl.c:455:	up_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-456-
--
drivers/tty/tty_ioctl.c=526=static void copy_termios(struct tty_struct *tty, struct ktermios *kterm)
drivers/tty/tty_ioctl.c-527-{
drivers/tty/tty_ioctl.c:528:	down_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-529-	*kterm = tty->termios;
drivers/tty/tty_ioctl.c:530:	up_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-531-}
--
drivers/tty/tty_ioctl.c=533=static void copy_termios_locked(struct tty_struct *tty, struct ktermios *kterm)
drivers/tty/tty_ioctl.c-534-{
drivers/tty/tty_ioctl.c:535:	down_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-536-	*kterm = tty->termios_locked;
drivers/tty/tty_ioctl.c:537:	up_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-538-}
--
drivers/tty/tty_ioctl.c=573=static int get_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)
--
drivers/tty/tty_ioctl.c-576-
drivers/tty/tty_ioctl.c:577:	down_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-578-	tmp.sg_ispeed = tty->termios.c_ispeed;
--
drivers/tty/tty_ioctl.c-582-	tmp.sg_flags = get_sgflags(tty);
drivers/tty/tty_ioctl.c:583:	up_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-584-
--
drivers/tty/tty_ioctl.c=588=static void set_sgflags(struct ktermios *termios, int flags)
--
drivers/tty/tty_ioctl.c-620- *
drivers/tty/tty_ioctl.c:621: * Locking: &tty_struct->termios_rwsem
drivers/tty/tty_ioctl.c-622- *
--
drivers/tty/tty_ioctl.c=625=static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)
--
drivers/tty/tty_ioctl.c-637-
drivers/tty/tty_ioctl.c:638:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-639-	termios = tty->termios;
--
drivers/tty/tty_ioctl.c-645-						termios.c_ospeed);
drivers/tty/tty_ioctl.c:646:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-647-	tty_set_termios(tty, &termios);
--
drivers/tty/tty_ioctl.c=653=static int get_tchars(struct tty_struct *tty, struct tchars __user *tchars)
--
drivers/tty/tty_ioctl.c-656-
drivers/tty/tty_ioctl.c:657:	down_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-658-	tmp.t_intrc = tty->termios.c_cc[VINTR];
--
drivers/tty/tty_ioctl.c-663-	tmp.t_brkc = tty->termios.c_cc[VEOL2];	/* what is brkc anyway? */
drivers/tty/tty_ioctl.c:664:	up_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-665-	return copy_to_user(tchars, &tmp, sizeof(tmp)) ? -EFAULT : 0;
--
drivers/tty/tty_ioctl.c=668=static int set_tchars(struct tty_struct *tty, struct tchars __user *tchars)
--
drivers/tty/tty_ioctl.c-673-		return -EFAULT;
drivers/tty/tty_ioctl.c:674:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-675-	tty->termios.c_cc[VINTR] = tmp.t_intrc;
--
drivers/tty/tty_ioctl.c-680-	tty->termios.c_cc[VEOL2] = tmp.t_brkc;	/* what is brkc anyway? */
drivers/tty/tty_ioctl.c:681:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-682-	return 0;
--
drivers/tty/tty_ioctl.c=687=static int get_ltchars(struct tty_struct *tty, struct ltchars __user *ltchars)
--
drivers/tty/tty_ioctl.c-690-
drivers/tty/tty_ioctl.c:691:	down_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-692-	tmp.t_suspc = tty->termios.c_cc[VSUSP];
--
drivers/tty/tty_ioctl.c-699-	tmp.t_lnextc = tty->termios.c_cc[VLNEXT];
drivers/tty/tty_ioctl.c:700:	up_read(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-701-	return copy_to_user(ltchars, &tmp, sizeof(tmp)) ? -EFAULT : 0;
--
drivers/tty/tty_ioctl.c=704=static int set_ltchars(struct tty_struct *tty, struct ltchars __user *ltchars)
--
drivers/tty/tty_ioctl.c-710-
drivers/tty/tty_ioctl.c:711:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-712-	tty->termios.c_cc[VSUSP] = tmp.t_suspc;
--
drivers/tty/tty_ioctl.c-719-	tty->termios.c_cc[VLNEXT] = tmp.t_lnextc;
drivers/tty/tty_ioctl.c:720:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-721-	return 0;
--
drivers/tty/tty_ioctl.c-732- *
drivers/tty/tty_ioctl.c:733: * Locking: &tty_struct->termios_rwsem.
drivers/tty/tty_ioctl.c-734- *
--
drivers/tty/tty_ioctl.c=737=static int tty_change_softcar(struct tty_struct *tty, bool enable)
--
drivers/tty/tty_ioctl.c-742-
drivers/tty/tty_ioctl.c:743:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-744-	old = tty->termios;
--
drivers/tty/tty_ioctl.c-750-		ret = -EINVAL;
drivers/tty/tty_ioctl.c:751:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ioctl.c-752-	return ret;
--
drivers/tty/tty_ioctl.c=765=int tty_mode_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
--
drivers/tty/tty_ioctl.c-848-			return -EFAULT;
drivers/tty/tty_ioctl.c:849:		down_write(&real_tty->termios_rwsem);
drivers/tty/tty_ioctl.c-850-		real_tty->termios_locked = kterm;
drivers/tty/tty_ioctl.c:851:		up_write(&real_tty->termios_rwsem);
drivers/tty/tty_ioctl.c-852-		return 0;
--
drivers/tty/tty_ioctl.c-865-			return -EFAULT;
drivers/tty/tty_ioctl.c:866:		down_write(&real_tty->termios_rwsem);
drivers/tty/tty_ioctl.c-867-		real_tty->termios_locked = kterm;
drivers/tty/tty_ioctl.c:868:		up_write(&real_tty->termios_rwsem);
drivers/tty/tty_ioctl.c-869-		return ret;
--
drivers/tty/tty_ldisc.c=392=EXPORT_SYMBOL_GPL(tty_ldisc_flush);
--
drivers/tty/tty_ldisc.c-404- *
drivers/tty/tty_ldisc.c:405: * Locking: takes termios_rwsem
drivers/tty/tty_ldisc.c-406- */
drivers/tty/tty_ldisc.c=407=static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
drivers/tty/tty_ldisc.c-408-{
drivers/tty/tty_ldisc.c:409:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ldisc.c-410-	tty->termios.c_line = disc;
drivers/tty/tty_ldisc.c:411:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ldisc.c-412-
--
drivers/tty/tty_ldisc.c=519=int tty_set_ldisc(struct tty_struct *tty, int disc)
--
drivers/tty/tty_ldisc.c-570-	if (tty->ldisc->ops->num != old_ldisc->ops->num && tty->ops->set_ldisc) {
drivers/tty/tty_ldisc.c:571:		down_read(&tty->termios_rwsem);
drivers/tty/tty_ldisc.c-572-		tty->ops->set_ldisc(tty);
drivers/tty/tty_ldisc.c:573:		up_read(&tty->termios_rwsem);
drivers/tty/tty_ldisc.c-574-	}
--
drivers/tty/tty_ldisc.c=625=static void tty_reset_termios(struct tty_struct *tty)
drivers/tty/tty_ldisc.c-626-{
drivers/tty/tty_ldisc.c:627:	down_write(&tty->termios_rwsem);
drivers/tty/tty_ldisc.c-628-	tty->termios = tty->driver->init_termios;
--
drivers/tty/tty_ldisc.c-630-	tty->termios.c_ospeed = tty_termios_baud_rate(&tty->termios);
drivers/tty/tty_ldisc.c:631:	up_write(&tty->termios_rwsem);
drivers/tty/tty_ldisc.c-632-}
--
drivers/tty/vt/vt.c=1333=EXPORT_SYMBOL(__vc_resize);
--
drivers/tty/vt/vt.c-1343- * Locking: Takes the console sem and the called methods then take the tty
drivers/tty/vt/vt.c:1344: * termios_rwsem and the tty ctrl.lock in that order.
drivers/tty/vt/vt.c-1345- */
]

36/2 2026/08/11 23:38 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27253
							output: 38
							thoughts: 1582
						

Thoughts:
**My Thought Process on Reproducing Lock Dependencies**

My primary goal here is to precisely reproduce a set of lock dependencies reported by lockdep. I've been analyzing the relationships between `tty->termios_rwsem`, `buf->lock`, `port->mutex`, and `console_lock`.

Initially, I noticed that `alloc_tty_struct` initializes `tty->termios_rwsem` with a default lock class (subclass 0). However, I then saw that `pty_common_install` explicitly sets a different subclass (`TTY_LOCK_SLAVE`, subclass 1) for slave ptys. This immediately told me I need to be careful about which type of TTY I'm working with. For serial ports, it appears to stick with the default subclass 0, as does `buf->lock`.

The lockdep report provides these crucial pieces of information:
*   `ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}`
*   `ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}`
*   `ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}`

The key dependency I need to reproduce is: `&buf->lock` -> `&tty->termios_rwsem`. The report shows that for the specific scenario, both are using the default lock class (implied by the `{4:4}` and `{4:4}` in the report, which, when combined with the context of `tty->termios_rwsem` and `buf->lock`, suggests they are part of the same default hierarchy and subclass 0 for `tty->termios_rwsem` is what's being observed for the serial port).

To achieve this, my initial plan was:
1.  Open a serial port (`/dev/ttyS0`).
2.  Call `ioctl(fd, TCSETS, &termios)` to establish the `&tty->termios_rwsem` -> `&port->mutex` dependency.
3.  Write to `/proc/sysrq-trigger` (`k`) to trigger `console_lock` -> `&buf->lock`.
4.  Send data to `/dev/ttyS0` to trigger `flush_to_ldisc`, which I thought would record `&buf->lock` -> `&tty->termios_rwsem`.

However, I quickly realized a critical flaw: `flush_to_ldisc` is triggered by *receiving* data, not sending it on a serial port. This means my step 4 was incorrect.

My next thought was to use a pty. I reasoned that if a pty is involved, it might exhibit the desired behavior. I confirmed that `tty_buffer_init` is common to all TTYs, including ptys, so `&buf->lock` would still be subclass 0. The master pty's `&tty->termios_rwsem` also seems to default to subclass 0.

The key insight came when I considered the direction of data flow with ptys:
*   If I write to the *master* pty, it goes to the *slave*'s buffer. The slave's `&tty->termios_rwsem` is subclass 1 (`TTY_LOCK_SLAVE`). This wouldn't help.
*   If I write to the *slave* pty, the data goes to the *master* pty's buffer. The master pty's `&tty->termios_rwsem` is subclass 0. This is exactly what I need! Writing to the slave pty would trigger `flush_to_ldisc` on the *master* pty, which would then acquire `&buf->lock` (subclass 0) and then `down_read(&tty->termios_rwsem)` on the master pty (subclass 0). This perfectly records the `&buf->lock` -> `&tty->termios_rwsem` dependency with the correct subclass.

So, my refined plan for the `&buf->lock` -> `&tty->termios_rwsem` dependency using ptys is:
1.  Open `/dev/ptmx` to get a master pty file descriptor.
2.  Use `grantpt` and `unlockpt`, then open the slave pty to get its file descriptor.
3.  Write data to the *slave* pty's file descriptor. This queues data for the master pty and schedules `flush_to_ldisc` on the master.
4.  `flush_to_ldisc` on the master pty acquires `&buf->lock` and then `down_read(&tty->termios_rwsem)` (both subclass 0).

Now, let's address the other dependencies:

*   **`&tty->termios_rwsem` -> `&port->mutex`**: My initial plan for this is still valid. Open `/dev/ttyS0` and call `ioctl(fd, TCSETS, &termios)`. This correctly acquires `down_write(&tty->termios_rwsem)` (subclass 0) followed by `mutex_lock(&port->mutex)`.

*   **`&port->mutex` -> `console_lock`**: The lockdep report indicates this dependency is already established during boot (`{0:0}`). If `ttyS0` is the console, `uart_configure_port` (which holds `&port->mutex`) is called while `console_lock` is held. I don't think I can easily reproduce this specific acquisition order from user space unless I can trigger port re-registration, which is complex. However, since it's already recorded and shows the default lock class, it's acceptable for reproduction.

*   **`console_lock` -> `&buf->lock`**: My initial plan to write `k` to `/proc/sysrq-trigger` to trigger `vc_SAK`, which then calls `tty_ldisc_flush` and ultimately `mutex_lock(&buf->lock)`, still stands. This is a standard way to trigger this dependency, assuming `CONFIG_MAGIC_SYSRQ` is enabled, which is typical in testing environments like syzkaller. I briefly considered other paths like `tioclinux` but `vc_SAK` is the most direct and reported path for this. I've noted that if this path fails, I might need to investigate further, but for now, it seems reliable.

So, my overall strategy is to combine these steps, ensuring the pty is used for the `buf->lock` -> `termios_rwsem` acquisition and the serial port is used for the `termios_rwsem` -> `port->mutex` acquisition, while relying on the boot-time establishment of `port->mutex` -> `console_lock` and the sysrq trigger for `console_lock` -> `buf->lock`.


37/2 2026/08/11 23:38 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c Name:vt_ioctl]

Results:
map[SourceCode: 723:	/*
 724:	 * We handle the console-specific ioctl's here.  We allow the
 725:	 * capability to modify any console, not just the fg_console.
 726:	 */
 727:	int vt_ioctl(struct tty_struct *tty,
 728:		     unsigned int cmd, unsigned long arg)
 729:	{
 730:		struct vc_data *vc = tty->driver_data;
 731:		void __user *up = (void __user *)arg;
 732:		int i, perm;
 733:		int ret;
 734:	
 735:		/*
 736:		 * To have permissions to do most of the vt ioctls, we either have
 737:		 * to be the owner of the tty, or have CAP_SYS_TTY_CONFIG.
 738:		 */
 739:		perm = 0;
 740:		if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG))
 741:			perm = 1;
 742:	
 743:		ret = vt_k_ioctl(tty, cmd, arg, perm);
 744:		if (ret != -ENOIOCTLCMD)
 745:			return ret;
 746:	
 747:		ret = vt_io_ioctl(vc, cmd, up, perm);
 748:		if (ret != -ENOIOCTLCMD)
 749:			return ret;
 750:	
 751:		switch (cmd) {
 752:		case TIOCLINUX:
 753:			return tioclinux(tty, arg);
 754:		case VT_SETMODE:
 755:		{
 756:			struct vt_mode tmp;
 757:	
 758:			if (!perm)
 759:				return -EPERM;
 760:			if (copy_from_user(&tmp, up, sizeof(struct vt_mode)))
 761:				return -EFAULT;
 762:			if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS)
 763:				return -EINVAL;
 764:	
 765:			guard(console_lock)();
 766:			vc->vt_mode = tmp;
 767:			/* the frsig is ignored, so we set it to 0 */
 768:			vc->vt_mode.frsig = 0;
 769:			put_pid(vc->vt_pid);
 770:			vc->vt_pid = get_pid(task_pid(current));
 771:			/* no switch is required -- saw@shade.msu.ru */
 772:			vc->vt_newvt = -1;
 773:			break;
 774:		}
 775:	
 776:		case VT_GETMODE:
 777:		{
 778:			struct vt_mode tmp;
 779:			int rc;
 780:	
 781:			scoped_guard(console_lock)
 782:				memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode));
 783:	
 784:			rc = copy_to_user(up, &tmp, sizeof(struct vt_mode));
 785:			if (rc)
 786:				return -EFAULT;
 787:			break;
 788:		}
 789:	
 790:		/*
 791:		 * Returns global vt state. Note that VT 0 is always open, since
 792:		 * it's an alias for the current VT, and people can't use it here.
 793:		 * We cannot return state for more than 16 VTs, since v_state is short.
 794:		 */
 795:		case VT_GETSTATE:
 796:		{
 797:			struct vt_stat __user *vtstat = up;
 798:			unsigned short state, mask;
 799:	
 800:			if (put_user(fg_console + 1, &vtstat->v_active))
 801:				return -EFAULT;
 802:	
 803:			state = 1;	/* /dev/tty0 is always open */
 804:			scoped_guard(console_lock) /* required by vt_in_use() */
 805:				for (i = 0, mask = 2; i < MAX_NR_CONSOLES && mask; ++i, mask <<= 1)
 806:					if (vt_in_use(i))
 807:						state |= mask;
 808:			return put_user(state, &vtstat->v_state);
 809:		}
 810:	
 811:		/*
 812:		 * Returns the first available (non-opened) console.
 813:		 */
 814:		case VT_OPENQRY:
 815:			scoped_guard(console_lock) /* required by vt_in_use() */
 816:				for (i = 0; i < MAX_NR_CONSOLES; ++i)
 817:					if (!vt_in_use(i))
 818:						break;
 819:			i = i < MAX_NR_CONSOLES ? (i+1) : -1;
 820:			return put_user(i, (int __user *)arg);
 821:	
 822:		/*
 823:		 * ioctl(fd, VT_ACTIVATE, num) will cause us to switch to vt # num,
 824:		 * with num >= 1 (switches to vt 0, our console, are not allowed, just
 825:		 * to preserve sanity).
 826:		 */
 827:		case VT_ACTIVATE:
 828:			if (!perm)
 829:				return -EPERM;
 830:			if (arg == 0 || arg > MAX_NR_CONSOLES)
 831:				return -ENXIO;
 832:	
 833:			arg--;
 834:			arg = array_index_nospec(arg, MAX_NR_CONSOLES);
 835:			scoped_guard(console_lock) {
 836:				ret = vc_allocate(arg);
 837:				if (ret)
 838:					return ret;
 839:			}
 840:			set_console(arg);
 841:			break;
 842:	
 843:		case VT_SETACTIVATE:
 844:			if (!perm)
 845:				return -EPERM;
 846:	
 847:			return vt_setactivate(up);
 848:	
 849:		/*
 850:		 * wait until the specified VT has been activated
 851:		 */
 852:		case VT_WAITACTIVE:
 853:			if (!perm)
 854:				return -EPERM;
 855:			if (arg == 0 || arg > MAX_NR_CONSOLES)
 856:				return -ENXIO;
 857:			return vt_waitactive(arg);
 858:	
 859:		/*
 860:		 * If a vt is under process control, the kernel will not switch to it
 861:		 * immediately, but postpone the operation until the process calls this
 862:		 * ioctl, allowing the switch to complete.
 863:		 *
 864:		 * According to the X sources this is the behavior:
 865:		 *	0:	pending switch-from not OK
 866:		 *	1:	pending switch-from OK
 867:		 *	2:	completed switch-to OK
 868:		 */
 869:		case VT_RELDISP:
 870:		{
 871:			if (!perm)
 872:				return -EPERM;
 873:	
 874:			guard(console_lock)();
 875:			return vt_reldisp(vc, arg);
 876:		}
 877:	
 878:		 /*
 879:		  * Disallocate memory associated to VT (but leave VT1)
 880:		  */
 881:		 case VT_DISALLOCATE:
 882:			if (arg > MAX_NR_CONSOLES)
 883:				return -ENXIO;
 884:	
 885:			if (arg == 0) {
 886:				vt_disallocate_all();
 887:				break;
 888:			}
 889:	
 890:			arg = array_index_nospec(arg - 1, MAX_NR_CONSOLES);
 891:			return vt_disallocate(arg);
 892:	
 893:		case VT_RESIZE:
 894:		{
 895:			struct vt_sizes __user *vtsizes = up;
 896:			struct vc_data *vc;
 897:			ushort ll,cc;
 898:	
 899:			if (!perm)
 900:				return -EPERM;
 901:			if (get_user(ll, &vtsizes->v_rows) ||
 902:			    get_user(cc, &vtsizes->v_cols))
 903:				return -EFAULT;
 904:	
 905:			guard(console_lock)();
 906:			for (i = 0; i < MAX_NR_CONSOLES; i++) {
 907:				vc = vc_cons[i].d;
 908:	
 909:				if (vc) {
 910:					/* FIXME: review v tty lock */
 911:					ret = __vc_resize(vc_cons[i].d, cc, ll, true);
 912:					if (ret)
 913:						return ret;
 914:				}
 915:			}
 916:			break;
 917:		}
 918:	
 919:		case VT_RESIZEX:
 920:			if (!perm)
 921:				return -EPERM;
 922:	
 923:			return vt_resizex(vc, up);
 924:	
 925:		case VT_LOCKSWITCH:
 926:			if (!capable(CAP_SYS_TTY_CONFIG))
 927:				return -EPERM;
 928:			vt_dont_switch = true;
 929:			break;
 930:		case VT_UNLOCKSWITCH:
 931:			if (!capable(CAP_SYS_TTY_CONFIG))
 932:				return -EPERM;
 933:			vt_dont_switch = false;
 934:			break;
 935:		case VT_GETHIFONTMASK:
 936:			return put_user(vc->vc_hi_font_mask,
 937:						(unsigned short __user *)arg);
 938:		case VT_WAITEVENT:
 939:			return vt_event_wait_ioctl((struct vt_event __user *)arg);
 940:	
 941:		case VT_GETCONSIZECSRPOS:
 942:		{
 943:			struct vt_consizecsrpos concsr;
 944:	
 945:			console_lock();
 946:			concsr.con_cols = vc->vc_cols;
 947:			concsr.con_rows = vc->vc_rows;
 948:			concsr.csr_col = vc->state.x;
 949:			concsr.csr_row = vc->state.y;
 950:			console_unlock();
 951:			if (copy_to_user(up, &concsr, sizeof(concsr)))
 952:				return -EFAULT;
 953:			return 0;
 954:		}
 955:	
 956:		default:
 957:			return -ENOIOCTLCMD;
 958:		}
 959:	
 960:		return 0;
 961:	}
 SourceFile:drivers/tty/vt/vt_ioctl.c]

38/2 2026/08/11 23:38 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32234
							output: 37
							thoughts: 92
						

Thoughts:
**My Thought Process Regarding `__vc_resize` and Console Locking**

Okay, so I'm looking at this code, specifically the `__vc_resize` function. My immediate thought is a bit of a "hold on a minute." It's noted that `__vc_resize` *does* take `console_lock`, which is already held in `VT_RESIZE`. This seems like a potential point of contention, especially given the `FIXME` comment right there about reviewing the `vt_tty lock`. It immediately triggers a question in my mind: does `__vc_resize` also require `&buf->lock`? I need to dig into the `__vc_resize` function itself to see what its locking requirements truly are and if there's a potential for deadlocks or incorrect locking protocols given the existing `console_lock` being held.


39/2 2026/08/11 23:38 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt.c Name:__vc_resize]

Results:
map[SourceCode:1315:	/**
1316:	 * __vc_resize - resize a VT
1317:	 * @vc: virtual console
1318:	 * @cols: columns
1319:	 * @rows: rows
1320:	 * @from_user: invoked by a user?
1321:	 *
1322:	 * Resize a virtual console as seen from the console end of things. We use the
1323:	 * common vc_do_resize() method to update the structures.
1324:	 *
1325:	 * Locking: The caller must hold the console sem to protect console internals
1326:	 * and @vc->port.tty.
1327:	 */
1328:	int __vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows,
1329:			bool from_user)
1330:	{
1331:		return vc_do_resize(vc->port.tty, vc, cols, rows, from_user);
1332:	}
 SourceFile:drivers/tty/vt/vt.c]

40/2 2026/08/11 23:38 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32646
							output: 38
							thoughts: 11
						

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

Alright, so my immediate inclination is to dive into the specifics of `vc_do_resize`. I need to understand its functionality, its inputs, its outputs, and crucially, how it interacts with other components within the broader system. My expectation is that this function is likely responsible for managing the dynamic adjustment of video codec resources, perhaps related to buffer allocation, resolution scaling, or potentially even adaptive bitrate streaming logic. I'll be looking for documentation, source code annotations, or any relevant API references to get a clear picture of its intended behavior and any potential side effects or limitations. Understanding its context within the overall video processing pipeline is paramount.


41/2 2026/08/11 23:38 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt.c Name:vc_do_resize]

Results:
map[SourceCode:1154:	/**
1155:	 * vc_do_resize - resizing method for the tty
1156:	 * @tty: tty being resized
1157:	 * @vc: virtual console private data
1158:	 * @cols: columns
1159:	 * @lines: lines
1160:	 * @from_user: invoked by a user?
1161:	 *
1162:	 * Resize a virtual console, clipping according to the actual constraints. If
1163:	 * the caller passes a tty structure then update the termios winsize
1164:	 * information and perform any necessary signal handling.
1165:	 *
1166:	 * Locking: Caller must hold the console semaphore. Takes the termios rwsem and
1167:	 * ctrl.lock of the tty IFF a tty is passed.
1168:	 */
1169:	static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
1170:				unsigned int cols, unsigned int lines, bool from_user)
1171:	{
1172:		unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
1173:		unsigned long end;
1174:		unsigned int old_rows, old_row_size, first_copied_row;
1175:		unsigned int new_cols, new_rows, new_row_size, new_screen_size;
1176:		unsigned short *oldscreen, *newscreen;
1177:		u32 **new_uniscr = NULL;
1178:	
1179:		WARN_CONSOLE_UNLOCKED();
1180:	
1181:		if (cols > VC_MAXCOL || lines > VC_MAXROW)
1182:			return -EINVAL;
1183:	
1184:		new_cols = (cols ? cols : vc->vc_cols);
1185:		new_rows = (lines ? lines : vc->vc_rows);
1186:		new_row_size = new_cols << 1;
1187:		new_screen_size = new_row_size * new_rows;
1188:	
1189:		if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) {
1190:			/*
1191:			 * This function is being called here to cover the case
1192:			 * where the userspace calls the FBIOPUT_VSCREENINFO twice,
1193:			 * passing the same fb_var_screeninfo containing the fields
1194:			 * yres/xres equal to a number non-multiple of vc_font.height
1195:			 * and yres_virtual/xres_virtual equal to number lesser than the
1196:			 * vc_font.height and yres/xres.
1197:			 * In the second call, the struct fb_var_screeninfo isn't
1198:			 * being modified by the underlying driver because of the
1199:			 * if above, and this causes the fbcon_display->vrows to become
1200:			 * negative and it eventually leads to out-of-bound
1201:			 * access by the imageblit function.
1202:			 * To give the correct values to the struct and to not have
1203:			 * to deal with possible errors from the code below, we call
1204:			 * the resize_screen here as well.
1205:			 */
1206:			return resize_screen(vc, new_cols, new_rows, from_user);
1207:		}
1208:	
1209:		if (new_screen_size > KMALLOC_MAX_SIZE || !new_screen_size)
1210:			return -EINVAL;
1211:		newscreen = kzalloc(new_screen_size, GFP_USER);
1212:		if (!newscreen)
1213:			return -ENOMEM;
1214:	
1215:		if (vc->vc_uni_lines) {
1216:			new_uniscr = vc_uniscr_alloc(new_cols, new_rows);
1217:			if (!new_uniscr) {
1218:				kfree(newscreen);
1219:				return -ENOMEM;
1220:			}
1221:		}
1222:	
1223:		if (vc_is_sel(vc))
1224:			clear_selection();
1225:	
1226:		old_rows = vc->vc_rows;
1227:		old_row_size = vc->vc_size_row;
1228:	
1229:		err = resize_screen(vc, new_cols, new_rows, from_user);
1230:		if (err) {
1231:			kfree(newscreen);
1232:			vc_uniscr_free(new_uniscr);
1233:			return err;
1234:		}
1235:	
1236:		vc->vc_rows = new_rows;
1237:		vc->vc_cols = new_cols;
1238:		vc->vc_size_row = new_row_size;
1239:		vc->vc_screenbuf_size = new_screen_size;
1240:	
1241:		rlth = min(old_row_size, new_row_size);
1242:		rrem = new_row_size - rlth;
1243:		old_origin = vc->vc_origin;
1244:		new_origin = (long) newscreen;
1245:		new_scr_end = new_origin + new_screen_size;
1246:	
1247:		if (vc->state.y > new_rows) {
1248:			if (old_rows - vc->state.y < new_rows) {
1249:				/*
1250:				 * Cursor near the bottom, copy contents from the
1251:				 * bottom of buffer
1252:				 */
1253:				first_copied_row = (old_rows - new_rows);
1254:			} else {
1255:				/*
1256:				 * Cursor is in no man's land, copy 1/2 screenful
1257:				 * from the top and bottom of cursor position
1258:				 */
1259:				first_copied_row = (vc->state.y - new_rows/2);
1260:			}
1261:			old_origin += first_copied_row * old_row_size;
1262:		} else
1263:			first_copied_row = 0;
1264:		end = old_origin + old_row_size * min(old_rows, new_rows);
1265:	
1266:		vc_uniscr_copy_area(new_uniscr, new_cols, new_rows,
1267:				    vc->vc_uni_lines, rlth/2, first_copied_row,
1268:				    min(old_rows, new_rows));
1269:		vc_uniscr_set(vc, new_uniscr);
1270:	
1271:		update_attr(vc);
1272:	
1273:		while (old_origin < end) {
1274:			scr_memcpyw((unsigned short *) new_origin,
1275:				    (unsigned short *) old_origin, rlth);
1276:			if (rrem)
1277:				scr_memsetw((void *)(new_origin + rlth),
1278:					    vc->vc_video_erase_char, rrem);
1279:			old_origin += old_row_size;
1280:			new_origin += new_row_size;
1281:		}
1282:		if (new_scr_end > new_origin)
1283:			scr_memsetw((void *)new_origin, vc->vc_video_erase_char,
1284:				    new_scr_end - new_origin);
1285:		oldscreen = vc->vc_screenbuf;
1286:		vc->vc_screenbuf = newscreen;
1287:		vc->vc_screenbuf_size = new_screen_size;
1288:		set_origin(vc);
1289:		kfree(oldscreen);
1290:	
1291:		/* do part of a reset_terminal() */
1292:		vc->vc_top = 0;
1293:		vc->vc_bottom = vc->vc_rows;
1294:		gotoxy(vc, vc->state.x, vc->state.y);
1295:		save_cur(vc);
1296:	
1297:		if (tty) {
1298:			/* Rewrite the requested winsize data with the actual
1299:			   resulting sizes */
1300:			struct winsize ws;
1301:			memset(&ws, 0, sizeof(ws));
1302:			ws.ws_row = vc->vc_rows;
1303:			ws.ws_col = vc->vc_cols;
1304:			ws.ws_ypixel = vc->vc_scan_lines;
1305:			tty_do_resize(tty, &ws);
1306:		}
1307:	
1308:		if (con_is_visible(vc))
1309:			update_screen(vc);
1310:		vt_event_post(VT_EVENT_RESIZE, vc->vc_num, vc->vc_num);
1311:		notify_update(vc);
1312:		return err;
1313:	}
 SourceFile:drivers/tty/vt/vt.c]

42/2 2026/08/11 23:38 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35310
							output: 38
							thoughts: 33
						

Thoughts:
**My Thought Process Regarding `vc_do_resize` and `tty_do_resize`**

Okay, so I'm looking at `vc_do_resize` and I see it immediately calls `tty_do_resize(tty, &ws)`. My first instinct, as an expert in this area, is to understand the flow of operations and how this particular function integrates into the broader TTY subsystem. Therefore, my immediate next step is to delve into the implementation of `tty_do_resize` itself. I need to understand precisely what it does with the `tty` structure and the `ws` (which I'm assuming is a `winsize` structure based on the context of resizing). This will be crucial for tracing the effects of `vc_do_resize` and ensuring the TTY's state is correctly updated after a video card-initiated resize.


43/2 2026/08/11 23:39 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_io.c Name:tty_do_resize]

Results:
map[SourceCode:2316:	/**
2317:	 * tty_do_resize - resize event
2318:	 * @tty: tty being resized
2319:	 * @ws: new dimensions
2320:	 *
2321:	 * Update the termios variables and send the necessary signals to peform a
2322:	 * terminal resize correctly.
2323:	 */
2324:	int tty_do_resize(struct tty_struct *tty, struct winsize *ws)
2325:	{
2326:		struct pid *pgrp;
2327:	
2328:		guard(mutex)(&tty->winsize_mutex);
2329:	
2330:		if (!memcmp(ws, &tty->winsize, sizeof(*ws)))
2331:			return 0;
2332:	
2333:		/* Signal the foreground process group */
2334:		pgrp = tty_get_pgrp(tty);
2335:		if (pgrp)
2336:			kill_pgrp(pgrp, SIGWINCH, 1);
2337:		put_pid(pgrp);
2338:	
2339:		tty->winsize = *ws;
2340:	
2341:		return 0;
2342:	}
 SourceFile:drivers/tty/tty_io.c]

44/2 2026/08/11 23:39 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35750
							output: 37
							thoughts: 75
						

Thoughts:
**My Thought Process Regarding `tty_do_resize` and Related Operations**

Okay, so my initial hypothesis was that `tty_do_resize` likely uses `&buf->lock` as a parameter. However, a quick mental check (or perhaps a quick skim of the relevant code if I were actually debugging this) reveals that's not the case. This immediately tells me that `VT_RESIZE`, which I know often interacts with `tty_do_resize` or similar terminal buffer resizing mechanisms, also wouldn't be taking `&buf->lock`.

Now, I need to consider other related ioctl commands that might interact with the terminal buffer or its allocation. `VT_DISALLOCATE` comes to mind. I recall (or would verify) that `VT_DISALLOCATE` internally calls `vt_disallocate`. And tracing that further, `vt_disallocate` then calls `vc_deallocate`. This is where I need to focus my attention next. The deallocation process is a critical part of buffer management, and I want to confirm if *that* operation, specifically `vc_deallocate`, is indeed taking `&buf->lock`. My current suspicion, based on the previous negation, is that it might not be, but it's essential to confirm.


45/2 2026/08/11 23:39 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt.c Name:vc_deallocate]

Results:
map[SourceCode:1354:	struct vc_data *vc_deallocate(unsigned int currcons)
1355:	{
1356:		struct vc_data *vc = NULL;
1357:	
1358:		WARN_CONSOLE_UNLOCKED();
1359:	
1360:		if (vc_cons_allocated(currcons)) {
1361:			struct vt_notifier_param param;
1362:	
1363:			param.vc = vc = vc_cons[currcons].d;
1364:			atomic_notifier_call_chain(&vt_notifier_list, VT_DEALLOCATE, &param);
1365:			vcs_remove_sysfs(currcons);
1366:			visual_deinit(vc);
1367:			con_free_unimap(vc);
1368:			put_pid(vc->vt_pid);
1369:			vc_uniscr_set(vc, NULL);
1370:			kfree(vc->vc_screenbuf);
1371:			vc_cons[currcons].d = NULL;
1372:			if (vc->vc_saved_screen != NULL) {
1373:				kfree(vc->vc_saved_screen);
1374:				vc->vc_saved_screen = NULL;
1375:			}
1376:			vc_uniscr_free(vc->vc_saved_uni_lines);
1377:			vc->vc_saved_uni_lines = NULL;
1378:		}
1379:		return vc;
1380:	}
 SourceFile:drivers/tty/vt/vt.c]

46/2 2026/08/11 23:39 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36292
							output: 40
							thoughts: 1971
						

Thoughts:
**My Thought Process Unpacking the Locking Dependencies**

Okay, so I've been digging into these lock dependency reports, trying to piece together the precise sequence of lock acquisitions. My initial observation was that `vc_SAK` seemed to be the *only* path that acquired `console_lock` and then subsequently `&buf->lock`. I confirmed this action is triggered by writing 'k' to `/proc/sysrq-trigger`. This led me to want to reproduce this behavior programmatically, so I started sketching out a C program using threads to simulate concurrent lock acquisitions.

My first attempt at the C code involved three threads. `thread1` aimed to trigger the `&tty->termios_rwsem` followed by `&port->mutex` sequence by performing `TCGETS` and `TCSETS` ioctls on a serial port. `thread2` was intended to trigger the `console_lock` to `&buf->lock` path by writing to `/proc/sysrq-trigger`. And `thread3` was designed to hit the `&buf->lock` to `&tty->termios_rwsem` pathway by writing to a slave pty, hoping to cause a `flush_to_ldisc` on the master.

However, as I reviewed the lockdep output again, I realized a crucial detail: the report indicated that the `&port->mutex` to `console_lock` acquisition was recorded *during boot*. This immediately shifted my focus. I initially wondered if I'd need to actively trigger port registration (perhaps by loading a module or writing to `/sys/bus/platform/drivers/serial8250/bind`) to establish this dependency. But the lockdep output, specifically the `-> #2 (console_lock){+.+.}-{0:0}` annotation and the accompanying stack trace showing `uart_configure_port` and `serial_core_register_port` calls during `do_basic_setup`, confirmed this lock ordering was a static, established dependency from the early boot process. So, I don't need to worry about triggering that specific acquisition.

This clarification allowed me to re-focus on validating the other two lock pairings within my C program.

First, I revisited the `&buf->lock` -> `&tty->termios_rwsem` dependency. My `thread3` was designed to test this by writing to a pty. I traced the execution path: writing to the slave pty (`pty_write`) calls `tty_insert_flip_string` on the master, which then calls `tty_flip_buffer_push`. This, in turn, schedules `flush_to_ldisc` on the master. `flush_to_ldisc` indeed acquires `mutex_lock(&buf->lock)` (subclass 0). Subsequently, it calls into the line discipline (`n_tty_receive_buf_common`), which takes `down_read(&tty->termios_rwsem)` (subclass 0). This sequence perfectly matches the lock classes reported. I also double-checked that `tty_buffer_init` initializes `&buf->lock` with subclass 0, and `flush_to_ldisc` is a workqueue function that starts with no locks, ensuring this is a valid dependency.

Next, I scrutinized the `&tty->termios_rwsem` -> `&port->mutex` ordering, which my `thread1` was meant to test using `TCSETS` on `/dev/ttyS0`. I followed the path: `tty_ioctl` -> `n_tty_ioctl` -> `n_tty_ioctl_helper` -> `tty_mode_ioctl` -> `set_termios` -> `tty_set_termios`. `tty_set_termios` takes `down_write(&tty->termios_rwsem)` (subclass 0). Then, it calls `tty->ops->set_termios`, which for serial ports is `uart_set_termios`. Crucially, I confirmed by examining the `uart_set_termios` source code that it *unconditionally* acquires `mutex_lock(&state->port.mutex)` (subclass 0). This again aligns precisely with the lock classes in the report. I also verified that `uart_set_termios` always takes this mutex, regardless of other conditions.

Finally, I re-examined the `console_lock` -> `&buf->lock` relationship, which is triggered by `echo k > /proc/sysrq-trigger`. My `thread2` covers this. The path is: `sysrq_handle_SAK` schedules `vc_cons[fg_console].SAK_work`. The `vc_SAK` workqueue handler acquires `console_lock()`. It then calls `__do_SAK(tty)`, which in turn calls `tty_ldisc_flush(tty)`. `tty_ldisc_flush` calls `tty_buffer_flush(tty)`, and `tty_buffer_flush` acquires `mutex_lock(&buf->lock)`. This is a direct match for the reported dependency. The only remaining question was whether `tty_ldisc_flush` *always* calls `tty_buffer_flush`. My current understanding is that it does, and I haven't found any conditions that would prevent this.

So, after this detailed review and trace, the C program seems to be a valid approach to demonstrating these specific lock ordering scenarios.


47/2 2026/08/11 23:39 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_ldisc.c Name:tty_ldisc_flush]

Results:
map[SourceCode: 377:	/**
 378:	 * tty_ldisc_flush		-	flush line discipline queue
 379:	 * @tty: tty to flush ldisc for
 380:	 *
 381:	 * Flush the line discipline queue (if any) and the tty flip buffers for this
 382:	 * @tty.
 383:	 */
 384:	void tty_ldisc_flush(struct tty_struct *tty)
 385:	{
 386:		struct tty_ldisc *ld = tty_ldisc_ref(tty);
 387:	
 388:		tty_buffer_flush(tty, ld);
 389:		if (ld)
 390:			tty_ldisc_deref(ld);
 391:	}
 SourceFile:drivers/tty/tty_ldisc.c]

48/2 2026/08/11 23:39 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 38534
							output: 38
							thoughts: 28
						

Thoughts:
**A Moment of Clarification on `tty_buffer_flush` Parameters**

Hmm, I need to reconfirm the signature of `tty_buffer_flush`. My recollection is that it expects both the `tty` structure and the `ld` (line discipline) structure as arguments. Before proceeding, I'll quickly consult the source code or documentation to verify this detail. It's crucial to have this precise understanding to ensure I'm invoking the function correctly within the broader context of tty buffer management.


49/2 2026/08/11 23:39 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_buffer.c Name:tty_buffer_flush]

Results:
map[SourceCode: 218:	/**
 219:	 * tty_buffer_flush		-	flush full tty buffers
 220:	 * @tty: tty to flush
 221:	 * @ld: optional ldisc ptr (must be referenced)
 222:	 *
 223:	 * Flush all the buffers containing receive data. If @ld != %NULL, flush the
 224:	 * ldisc input buffer.
 225:	 *
 226:	 * Locking: takes buffer lock to ensure single-threaded flip buffer 'consumer'.
 227:	 */
 228:	void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
 229:	{
 230:		struct tty_port *port = tty->port;
 231:		struct tty_bufhead *buf = &port->buf;
 232:		struct tty_buffer *next;
 233:	
 234:		atomic_inc(&buf->priority);
 235:	
 236:		mutex_lock(&buf->lock);
 237:		/* paired w/ release in __tty_buffer_request_room; ensures there are
 238:		 * no pending memory accesses to the freed buffer
 239:		 */
 240:		while ((next = smp_load_acquire(&buf->head->next)) != NULL) {
 241:			tty_buffer_free(port, buf->head);
 242:			buf->head = next;
 243:		}
 244:		buf->head->read = buf->head->commit;
 245:		buf->head->lookahead = buf->head->read;
 246:	
 247:		if (ld && ld->ops->flush_buffer)
 248:			ld->ops->flush_buffer(tty);
 249:	
 250:		atomic_dec(&buf->priority);
 251:		mutex_unlock(&buf->lock);
 252:	}
 SourceFile:drivers/tty/tty_buffer.c]

50/2 2026/08/11 23:39 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 39146
							output: 36
							thoughts: 1286
						

Thoughts:
**My Thought Process Unveiled**

Okay, so I'm trying to understand this sequence of operations and how lockdep is going to react. It all hinges on this `mutex_lock(&buf->lock)` call.

The core operations I'm considering are:
1.  Opening `/dev/ttyS0` and using `ioctl(fd, TCSETS, &term)`.
2.  Opening `/dev/ptmx`, getting a PTY (pseudo-terminal), writing to it to force a `flush_to_ldisc`, which in turn should lock something.
3.  Sending 'k' to `/proc/sysrq-trigger`.

Now, the immediate question that pops into my head is: Do these need to happen at *exactly* the same time, concurrently? My understanding of `lockdep` is that it builds a global dependency graph. So, as long as all these operations *occur* within the scope of lockdep's tracking, it should be able to build the graph and identify any cycles. The order, in terms of concurrent execution, might not be the primary issue for detection; the crucial part is that they all execute.

Let's trace how `lockdep` would build its graph, assuming a sequential execution for clarity:

*   **Bootstrapping:** At boot, it's established that `&port->mutex` leads to `console_lock`. This dependency is recorded.
*   **Step 1: `ioctl(TCSETS)` on `/dev/ttyS0`:** This operation first acquires `&tty->termios_rwsem` (which I note is subclass 0 for this specific case), and then it acquires `&port->mutex` (also subclass 0). `lockdep` registers this: `&tty->termios_rwsem` -> `&port->mutex`. Since `&port->mutex` -> `console_lock` is already known, `lockdep` now understands the path: `&tty->termios_rwsem` -> `&port->mutex` -> `console_lock`.
*   **Step 2: `echo k > /proc/sysrq-trigger`:** This action takes `console_lock` first, and then proceeds to lock `&buf->lock` (subclass 0). `lockdep` adds this to its graph: `console_lock` -> `&buf->lock`. Combining this with the previous path, `lockdep` now sees: `&tty->termios_rwsem` -> `&port->mutex` -> `console_lock` -> `&buf->lock`.
*   **Step 3: Writing to the PTY:** This is where the potential cycle emerges. The `flush_to_ldisc` function, triggered by the write to the PTY, first takes `&buf->lock` (subclass 0), and then attempts to acquire `&tty->termios_rwsem` (subclass 0). `lockdep` registers this: `&buf->lock` -> `&tty->termios_rwsem`.

And there it is! The sequence `&buf->lock` -> `&tty->termios_rwsem` perfectly closes the loop with the existing chain `&tty->termios_rwsem` -> ... -> `&buf->lock`. This is precisely why `lockdep` will flag a cycle.

A critical point I need to verify is whether the `&buf->lock` acquired in `vc_SAK` (which is triggered by `sysrq-trigger`) is indeed the *same lock class* as the `&buf->lock` used in `flush_to_ldisc` during the PTY write. My investigation confirms that `tty_buffer_init` is responsible for initializing these buffers, and crucially, it uses `mutex_init(&buf->lock)`. The `mutex_init` macro, as I understand it, uses `__FILE__` and `__LINE__` to create unique, static lock class keys. Since `mutex_init(&buf->lock)` resides within `tty_buffer_init` (specifically at `drivers/tty/tty_buffer.c:586`), all instances of `&buf->lock` initialized this way, whether they originate from a VT, a serial port, or a PTY, will belong to the *same lock class*. This is the fundamental reason lockdep is detecting this cycle.

Similarly, I'm checking the `&tty->termios_rwsem`. The `init_rwsem(&tty->termios_rwsem)` call happens in `alloc_tty_struct` (at `drivers/tty/tty_io.c:3115`). This implies all `&tty->termios_rwsem` instances initialized here should share the same lock class (subclass 0). However, I remember seeing something about PTYs being different. Ah, yes, `pty_common_install` actually *changes* the subclass for the *slave* PTY's `termios_rwsem` to `TTY_LOCK_SLAVE`. But the *master* PTY retains its subclass 0.

The key insight here is that when data is written to the slave PTY, it's ultimately processed by the master PTY's buffer, and `flush_to_ldisc` operates on the *master* PTY. This means the locks acquired will be `&buf->lock` (subclass 0) and `&tty->termios_rwsem` (subclass 0, from the master PTY). This exactly matches the lock class taken by `tty_set_termios` when operating on `/dev/ttyS0` (also subclass 0). This alignment is what completes the cycle detection.

So, I'm wondering if there's an alternative. What if I could use `/dev/ttyS0` for both Step 1 *and* Step 3? If I can send data *to* `/dev/ttyS0` in a way that triggers `flush_to_ldisc` on it, that would involve locking `&buf->lock` and `&tty->termios_rwsem` (subclass 0). The question then becomes: can I reliably send data to `/dev/ttyS0`? If it's configured for loopback, then yes. But in a typical setup, that's not the case.

However, the PTY approach for Step 3 is still robust. `lockdep` cares about *lock classes*, not the specific object instances. Since the lock classes for `&buf->lock` and `&tty->termios_rwsem` are identical for a PTY master and a serial port, using a PTY for Step 3 to trigger the locks is a perfectly valid and reliable method to demonstrate the cycle.

Finally, I'm double-checking the mechanism for Step 2, the `echo k > /proc/sysrq-trigger`. Yes, `sysrq_handle_SAK` is indeed registered for the 'k' key. I'm also considering if `sysrq` needs to be explicitly enabled. Syzkaller typically runs with `kernel.sysrq = 1`, so this should be fine. But if it weren't, I'm recalling if there's an alternative way to trigger `vc_SAK`, perhaps via `ioctl(fd, TIOCLINUX, &val)`? I need to revisit `tioclinux` to be sure; my initial check didn't show SAK functionality there.


51/2 2026/08/11 23:39 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt.c Name:tioclinux]

Results:
map[SourceCode:3561:	int tioclinux(struct tty_struct *tty, unsigned long arg)
3562:	{
3563:		char type, data;
3564:		char __user *p = (char __user *)arg;
3565:		void __user *param_aligned32 = (u32 __user *)arg + 1;
3566:		void __user *param = (void __user *)arg + 1;
3567:		int lines;
3568:		int ret;
3569:	
3570:		if (current->signal->tty != tty && !capable(CAP_SYS_ADMIN))
3571:			return -EPERM;
3572:		if (get_user(type, p))
3573:			return -EFAULT;
3574:		ret = 0;
3575:	
3576:		switch (type) {
3577:		case TIOCL_SETSEL:
3578:			return set_selection_user(param, tty);
3579:		case TIOCL_PASTESEL:
3580:			if (!capable(CAP_SYS_ADMIN))
3581:				return -EPERM;
3582:			return paste_selection(tty);
3583:		case TIOCL_UNBLANKSCREEN:
3584:			scoped_guard(console_lock)
3585:				unblank_screen();
3586:			break;
3587:		case TIOCL_SELLOADLUT:
3588:			if (!capable(CAP_SYS_ADMIN))
3589:				return -EPERM;
3590:			return sel_loadlut(param_aligned32);
3591:		case TIOCL_GETSHIFTSTATE:
3592:			/*
3593:			 * Make it possible to react to Shift+Mousebutton. Note that
3594:			 * 'shift_state' is an undocumented kernel-internal variable;
3595:			 * programs not closely related to the kernel should not use
3596:			 * this.
3597:			 */
3598:			data = vt_get_shift_state();
3599:			return put_user(data, p);
3600:		case TIOCL_GETMOUSEREPORTING:
3601:			scoped_guard(console_lock)	/* May be overkill */
3602:				data = mouse_reporting();
3603:			return put_user(data, p);
3604:		case TIOCL_SETVESABLANK:
3605:			return set_vesa_blanking(param);
3606:		case TIOCL_GETKMSGREDIRECT:
3607:			data = vt_get_kmsg_redirect();
3608:			return put_user(data, p);
3609:		case TIOCL_SETKMSGREDIRECT:
3610:			if (!capable(CAP_SYS_ADMIN))
3611:				return -EPERM;
3612:	
3613:			if (get_user(data, p+1))
3614:				return -EFAULT;
3615:	
3616:			vt_kmsg_redirect(data);
3617:	
3618:			break;
3619:		case TIOCL_GETFGCONSOLE:
3620:			/*
3621:			 * No locking needed as this is a transiently correct return
3622:			 * anyway if the caller hasn't disabled switching.
3623:			 */
3624:			return fg_console;
3625:		case TIOCL_SCROLLCONSOLE:
3626:			if (get_user(lines, (s32 __user *)param_aligned32))
3627:				return -EFAULT;
3628:	
3629:			/*
3630:			 * Needs the console lock here. Note that lots of other calls
3631:			 * need fixing before the lock is actually useful!
3632:			 */
3633:			scoped_guard(console_lock)
3634:				scrollfront(vc_cons[fg_console].d, lines);
3635:			break;
3636:		case TIOCL_BLANKSCREEN:	/* until explicitly unblanked, not only poked */
3637:			scoped_guard(console_lock) {
3638:				ignore_poke = 1;
3639:				do_blank_screen(0);
3640:			}
3641:			break;
3642:		case TIOCL_BLANKEDSCREEN:
3643:			return console_blanked;
3644:		case TIOCL_GETBRACKETEDPASTE:
3645:			return get_bracketed_paste(tty);
3646:		default:
3647:			return -EINVAL;
3648:		}
3649:	
3650:		return ret;
3651:	}
 SourceFile:drivers/tty/vt/vt.c]

52/2 2026/08/11 23:39 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41805
							output: 38
							thoughts: 19
						

Thoughts:
**A Deep Dive into Security and Kernel Interfaces**

So, I've been sifting through some code, trying to get a handle on the security implications and how different interfaces are being used. My initial thought was about SAK, the Secure Attention Key, and I confirmed that it's definitely not present in `tioclinux`. This is important because SAK is a critical mechanism for secure console access, and its absence in this specific interface means I need to consider alternative security measures or understand the intended use case where SAK isn't a requirement.

This then naturally led me to think about other related security signals and kernel events. My next question was, "What about `KDSIGACCEPT`?" This signal is tied to the kernel's handling of signals, specifically when a process is allowed to accept signals. I'm wondering if this signal plays a role in the security context I'm examining, or if it's more of a general process management feature that might indirectly impact security. Understanding how `KDSIGACCEPT` is implemented and used could reveal potential vulnerabilities or, conversely, provide mechanisms for more robust security configurations within the kernel's signal handling. I'm trying to piece together the overall security posture by looking at these specific, granular components.


53/2 2026/08/11 23:40 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c Name:vt_ioctl]

Results:
map[SourceCode: 723:	/*
 724:	 * We handle the console-specific ioctl's here.  We allow the
 725:	 * capability to modify any console, not just the fg_console.
 726:	 */
 727:	int vt_ioctl(struct tty_struct *tty,
 728:		     unsigned int cmd, unsigned long arg)
 729:	{
 730:		struct vc_data *vc = tty->driver_data;
 731:		void __user *up = (void __user *)arg;
 732:		int i, perm;
 733:		int ret;
 734:	
 735:		/*
 736:		 * To have permissions to do most of the vt ioctls, we either have
 737:		 * to be the owner of the tty, or have CAP_SYS_TTY_CONFIG.
 738:		 */
 739:		perm = 0;
 740:		if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG))
 741:			perm = 1;
 742:	
 743:		ret = vt_k_ioctl(tty, cmd, arg, perm);
 744:		if (ret != -ENOIOCTLCMD)
 745:			return ret;
 746:	
 747:		ret = vt_io_ioctl(vc, cmd, up, perm);
 748:		if (ret != -ENOIOCTLCMD)
 749:			return ret;
 750:	
 751:		switch (cmd) {
 752:		case TIOCLINUX:
 753:			return tioclinux(tty, arg);
 754:		case VT_SETMODE:
 755:		{
 756:			struct vt_mode tmp;
 757:	
 758:			if (!perm)
 759:				return -EPERM;
 760:			if (copy_from_user(&tmp, up, sizeof(struct vt_mode)))
 761:				return -EFAULT;
 762:			if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS)
 763:				return -EINVAL;
 764:	
 765:			guard(console_lock)();
 766:			vc->vt_mode = tmp;
 767:			/* the frsig is ignored, so we set it to 0 */
 768:			vc->vt_mode.frsig = 0;
 769:			put_pid(vc->vt_pid);
 770:			vc->vt_pid = get_pid(task_pid(current));
 771:			/* no switch is required -- saw@shade.msu.ru */
 772:			vc->vt_newvt = -1;
 773:			break;
 774:		}
 775:	
 776:		case VT_GETMODE:
 777:		{
 778:			struct vt_mode tmp;
 779:			int rc;
 780:	
 781:			scoped_guard(console_lock)
 782:				memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode));
 783:	
 784:			rc = copy_to_user(up, &tmp, sizeof(struct vt_mode));
 785:			if (rc)
 786:				return -EFAULT;
 787:			break;
 788:		}
 789:	
 790:		/*
 791:		 * Returns global vt state. Note that VT 0 is always open, since
 792:		 * it's an alias for the current VT, and people can't use it here.
 793:		 * We cannot return state for more than 16 VTs, since v_state is short.
 794:		 */
 795:		case VT_GETSTATE:
 796:		{
 797:			struct vt_stat __user *vtstat = up;
 798:			unsigned short state, mask;
 799:	
 800:			if (put_user(fg_console + 1, &vtstat->v_active))
 801:				return -EFAULT;
 802:	
 803:			state = 1;	/* /dev/tty0 is always open */
 804:			scoped_guard(console_lock) /* required by vt_in_use() */
 805:				for (i = 0, mask = 2; i < MAX_NR_CONSOLES && mask; ++i, mask <<= 1)
 806:					if (vt_in_use(i))
 807:						state |= mask;
 808:			return put_user(state, &vtstat->v_state);
 809:		}
 810:	
 811:		/*
 812:		 * Returns the first available (non-opened) console.
 813:		 */
 814:		case VT_OPENQRY:
 815:			scoped_guard(console_lock) /* required by vt_in_use() */
 816:				for (i = 0; i < MAX_NR_CONSOLES; ++i)
 817:					if (!vt_in_use(i))
 818:						break;
 819:			i = i < MAX_NR_CONSOLES ? (i+1) : -1;
 820:			return put_user(i, (int __user *)arg);
 821:	
 822:		/*
 823:		 * ioctl(fd, VT_ACTIVATE, num) will cause us to switch to vt # num,
 824:		 * with num >= 1 (switches to vt 0, our console, are not allowed, just
 825:		 * to preserve sanity).
 826:		 */
 827:		case VT_ACTIVATE:
 828:			if (!perm)
 829:				return -EPERM;
 830:			if (arg == 0 || arg > MAX_NR_CONSOLES)
 831:				return -ENXIO;
 832:	
 833:			arg--;
 834:			arg = array_index_nospec(arg, MAX_NR_CONSOLES);
 835:			scoped_guard(console_lock) {
 836:				ret = vc_allocate(arg);
 837:				if (ret)
 838:					return ret;
 839:			}
 840:			set_console(arg);
 841:			break;
 842:	
 843:		case VT_SETACTIVATE:
 844:			if (!perm)
 845:				return -EPERM;
 846:	
 847:			return vt_setactivate(up);
 848:	
 849:		/*
 850:		 * wait until the specified VT has been activated
 851:		 */
 852:		case VT_WAITACTIVE:
 853:			if (!perm)
 854:				return -EPERM;
 855:			if (arg == 0 || arg > MAX_NR_CONSOLES)
 856:				return -ENXIO;
 857:			return vt_waitactive(arg);
 858:	
 859:		/*
 860:		 * If a vt is under process control, the kernel will not switch to it
 861:		 * immediately, but postpone the operation until the process calls this
 862:		 * ioctl, allowing the switch to complete.
 863:		 *
 864:		 * According to the X sources this is the behavior:
 865:		 *	0:	pending switch-from not OK
 866:		 *	1:	pending switch-from OK
 867:		 *	2:	completed switch-to OK
 868:		 */
 869:		case VT_RELDISP:
 870:		{
 871:			if (!perm)
 872:				return -EPERM;
 873:	
 874:			guard(console_lock)();
 875:			return vt_reldisp(vc, arg);
 876:		}
 877:	
 878:		 /*
 879:		  * Disallocate memory associated to VT (but leave VT1)
 880:		  */
 881:		 case VT_DISALLOCATE:
 882:			if (arg > MAX_NR_CONSOLES)
 883:				return -ENXIO;
 884:	
 885:			if (arg == 0) {
 886:				vt_disallocate_all();
 887:				break;
 888:			}
 889:	
 890:			arg = array_index_nospec(arg - 1, MAX_NR_CONSOLES);
 891:			return vt_disallocate(arg);
 892:	
 893:		case VT_RESIZE:
 894:		{
 895:			struct vt_sizes __user *vtsizes = up;
 896:			struct vc_data *vc;
 897:			ushort ll,cc;
 898:	
 899:			if (!perm)
 900:				return -EPERM;
 901:			if (get_user(ll, &vtsizes->v_rows) ||
 902:			    get_user(cc, &vtsizes->v_cols))
 903:				return -EFAULT;
 904:	
 905:			guard(console_lock)();
 906:			for (i = 0; i < MAX_NR_CONSOLES; i++) {
 907:				vc = vc_cons[i].d;
 908:	
 909:				if (vc) {
 910:					/* FIXME: review v tty lock */
 911:					ret = __vc_resize(vc_cons[i].d, cc, ll, true);
 912:					if (ret)
 913:						return ret;
 914:				}
 915:			}
 916:			break;
 917:		}
 918:	
 919:		case VT_RESIZEX:
 920:			if (!perm)
 921:				return -EPERM;
 922:	
 923:			return vt_resizex(vc, up);
 924:	
 925:		case VT_LOCKSWITCH:
 926:			if (!capable(CAP_SYS_TTY_CONFIG))
 927:				return -EPERM;
 928:			vt_dont_switch = true;
 929:			break;
 930:		case VT_UNLOCKSWITCH:
 931:			if (!capable(CAP_SYS_TTY_CONFIG))
 932:				return -EPERM;
 933:			vt_dont_switch = false;
 934:			break;
 935:		case VT_GETHIFONTMASK:
 936:			return put_user(vc->vc_hi_font_mask,
 937:						(unsigned short __user *)arg);
 938:		case VT_WAITEVENT:
 939:			return vt_event_wait_ioctl((struct vt_event __user *)arg);
 940:	
 941:		case VT_GETCONSIZECSRPOS:
 942:		{
 943:			struct vt_consizecsrpos concsr;
 944:	
 945:			console_lock();
 946:			concsr.con_cols = vc->vc_cols;
 947:			concsr.con_rows = vc->vc_rows;
 948:			concsr.csr_col = vc->state.x;
 949:			concsr.csr_row = vc->state.y;
 950:			console_unlock();
 951:			if (copy_to_user(up, &concsr, sizeof(concsr)))
 952:				return -EFAULT;
 953:			return 0;
 954:		}
 955:	
 956:		default:
 957:			return -ENOIOCTLCMD;
 958:		}
 959:	
 960:		return 0;
 961:	}
 SourceFile:drivers/tty/vt/vt_ioctl.c]

54/2 2026/08/11 23:40 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 45223
							output: 40
							thoughts: 26
						

Thoughts:
**My Thought Process on `KDSIGACCEPT`'s Location**

My immediate thought is to pinpoint the exact location of `KDSIGACCEPT` within the system's codebase. Specifically, I'm trying to recall whether it resides within the `vt_io_ioctl` function or the `vt_k_ioctl` function. This distinction is crucial for understanding the context in which this ioctl signal handling mechanism operates. Is it part of the general virtual terminal I/O operations, or is it more specifically tied to kernel-level virtual terminal interactions? My mental model is actively searching for this detail to correctly contextualize the ioctl's purpose and its relationship with the underlying virtual terminal driver.


55/2 2026/08/11 23:40 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c Name:vt_k_ioctl]

Results:
map[SourceCode: 283:	static int vt_k_ioctl(struct tty_struct *tty, unsigned int cmd,
 284:			unsigned long arg, bool perm)
 285:	{
 286:		struct vc_data *vc = tty->driver_data;
 287:		void __user *up = (void __user *)arg;
 288:		unsigned int console = vc->vc_num;
 289:		int ret;
 290:	
 291:		switch (cmd) {
 292:		case KIOCSOUND:
 293:			if (!perm)
 294:				return -EPERM;
 295:			/*
 296:			 * The use of PIT_TICK_RATE is historic, it used to be
 297:			 * the platform-dependent CLOCK_TICK_RATE between 2.6.12
 298:			 * and 2.6.36, which was a minor but unfortunate ABI
 299:			 * change. kd_mksound is locked by the input layer.
 300:			 */
 301:			if (arg)
 302:				arg = PIT_TICK_RATE / arg;
 303:			kd_mksound(arg, 0);
 304:			break;
 305:	
 306:		case KDMKTONE:
 307:			if (!perm)
 308:				return -EPERM;
 309:		{
 310:			unsigned int ticks, count;
 311:	
 312:			/*
 313:			 * Generate the tone for the appropriate number of ticks.
 314:			 * If the time is zero, turn off sound ourselves.
 315:			 */
 316:			ticks = msecs_to_jiffies((arg >> 16) & 0xffff);
 317:			count = ticks ? (arg & 0xffff) : 0;
 318:			if (count)
 319:				count = PIT_TICK_RATE / count;
 320:			kd_mksound(count, ticks);
 321:			break;
 322:		}
 323:	
 324:		case KDGKBTYPE:
 325:			/*
 326:			 * this is naïve.
 327:			 */
 328:			return put_user(KB_101, (char __user *)arg);
 329:	
 330:			/*
 331:			 * These cannot be implemented on any machine that implements
 332:			 * ioperm() in user level (such as Alpha PCs) or not at all.
 333:			 *
 334:			 * XXX: you should never use these, just call ioperm directly..
 335:			 */
 336:	#ifdef CONFIG_X86
 337:		case KDADDIO:
 338:		case KDDELIO:
 339:			/*
 340:			 * KDADDIO and KDDELIO may be able to add ports beyond what
 341:			 * we reject here, but to be safe...
 342:			 *
 343:			 * These are locked internally via sys_ioperm
 344:			 */
 345:			if (arg < GPFIRST || arg > GPLAST)
 346:				return -EINVAL;
 347:	
 348:			return ksys_ioperm(arg, 1, (cmd == KDADDIO)) ? -ENXIO : 0;
 349:	
 350:		case KDENABIO:
 351:		case KDDISABIO:
 352:			return ksys_ioperm(GPFIRST, GPNUM,
 353:					  (cmd == KDENABIO)) ? -ENXIO : 0;
 354:	#endif
 355:	
 356:		/* Linux m68k/i386 interface for setting the keyboard delay/repeat rate */
 357:	
 358:		case KDKBDREP:
 359:		{
 360:			struct kbd_repeat kbrep;
 361:	
 362:			if (!capable(CAP_SYS_TTY_CONFIG))
 363:				return -EPERM;
 364:	
 365:			if (copy_from_user(&kbrep, up, sizeof(struct kbd_repeat)))
 366:				return -EFAULT;
 367:	
 368:			ret = kbd_rate(&kbrep);
 369:			if (ret)
 370:				return ret;
 371:			if (copy_to_user(up, &kbrep, sizeof(struct kbd_repeat)))
 372:				return -EFAULT;
 373:			break;
 374:		}
 375:	
 376:		case KDSETMODE: {
 377:			if (!perm)
 378:				return -EPERM;
 379:	
 380:			guard(console_lock)();
 381:			return vt_kdsetmode(vc, arg);
 382:		}
 383:		case KDGETMODE:
 384:			return put_user(vc->vc_mode, (int __user *)arg);
 385:	
 386:		case KDMAPDISP:
 387:		case KDUNMAPDISP:
 388:			/*
 389:			 * these work like a combination of mmap and KDENABIO.
 390:			 * this could be easily finished.
 391:			 */
 392:			return -EINVAL;
 393:	
 394:		case KDSKBMODE:
 395:			if (!perm)
 396:				return -EPERM;
 397:			ret = vt_do_kdskbmode(console, arg);
 398:			if (ret)
 399:				return ret;
 400:			tty_ldisc_flush(tty);
 401:			break;
 402:	
 403:		case KDGKBMODE:
 404:			return put_user(vt_do_kdgkbmode(console), (int __user *)arg);
 405:	
 406:		/* this could be folded into KDSKBMODE, but for compatibility
 407:		   reasons it is not so easy to fold KDGKBMETA into KDGKBMODE */
 408:		case KDSKBMETA:
 409:			return vt_do_kdskbmeta(console, arg);
 410:	
 411:		case KDGKBMETA:
 412:			/* FIXME: should review whether this is worth locking */
 413:			return put_user(vt_do_kdgkbmeta(console), (int __user *)arg);
 414:	
 415:		case KDGETKEYCODE:
 416:		case KDSETKEYCODE:
 417:			if(!capable(CAP_SYS_TTY_CONFIG))
 418:				perm = 0;
 419:			return vt_do_kbkeycode_ioctl(cmd, up, perm);
 420:	
 421:		case KDGKBENT:
 422:		case KDSKBENT:
 423:			return vt_do_kdsk_ioctl(cmd, up, perm, console);
 424:	
 425:		case KDGKBSENT:
 426:		case KDSKBSENT:
 427:			return vt_do_kdgkb_ioctl(cmd, up, perm);
 428:	
 429:		/* Diacritical processing. Handled in keyboard.c as it has
 430:		   to operate on the keyboard locks and structures */
 431:		case KDGKBDIACR:
 432:		case KDGKBDIACRUC:
 433:		case KDSKBDIACR:
 434:		case KDSKBDIACRUC:
 435:			return vt_do_diacrit(cmd, up, perm);
 436:	
 437:		/* the ioctls below read/set the flags usually shown in the leds */
 438:		/* don't use them - they will go away without warning */
 439:		case KDGKBLED:
 440:		case KDSKBLED:
 441:		case KDGETLED:
 442:		case KDSETLED:
 443:			return vt_do_kdskled(console, cmd, arg, perm);
 444:	
 445:		/*
 446:		 * A process can indicate its willingness to accept signals
 447:		 * generated by pressing an appropriate key combination.
 448:		 * Thus, one can have a daemon that e.g. spawns a new console
 449:		 * upon a keypress and then changes to it.
 450:		 * See also the kbrequest field of inittab(5).
 451:		 */
 452:		case KDSIGACCEPT:
 453:			if (!perm || !capable(CAP_KILL))
 454:				return -EPERM;
 455:			if (!valid_signal(arg) || arg < 1 || arg == SIGKILL)
 456:				return -EINVAL;
 457:	
 458:			spin_lock_irq(&vt_spawn_con.lock);
 459:			put_pid(vt_spawn_con.pid);
 460:			vt_spawn_con.pid = get_pid(task_pid(current));
 461:			vt_spawn_con.sig = arg;
 462:			spin_unlock_irq(&vt_spawn_con.lock);
 463:			break;
 464:	
 465:		case KDFONTOP: {
 466:			struct console_font_op op;
 467:	
 468:			if (copy_from_user(&op, up, sizeof(op)))
 469:				return -EFAULT;
 470:			if (!perm && op.op != KD_FONT_OP_GET)
 471:				return -EPERM;
 472:			ret = con_font_op(vc, &op);
 473:			if (ret)
 474:				return ret;
 475:			if (copy_to_user(up, &op, sizeof(op)))
 476:				return -EFAULT;
 477:			break;
 478:		}
 479:	
 480:		default:
 481:			return -ENOIOCTLCMD;
 482:		}
 483:	
 484:		return 0;
 485:	}
 SourceFile:drivers/tty/vt/vt_ioctl.c]

56/2 2026/08/11 23:40 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 48212
							output: 41
							thoughts: 162
						

Thoughts:
**A Deep Dive into Console Driver Behavior**

My initial thought process is sparked by observing the `KDSKBMODE` ioctl call within the `vt_k_ioctl` function. I immediately notice that it invokes `tty_ldisc_flush(tty)`. This is a critical observation, as `tty_ldisc_flush` is responsible for clearing out the termios line discipline buffer. My immediate question is about the locking mechanisms surrounding this operation.

Specifically, I'm concerned about whether `KDSKBMODE` itself acquires the `console_lock`. My quick perusal of `vt_k_ioctl` suggests that `KDSKBMODE` *does not* directly take the `console_lock`. This absence of explicit locking by the ioctl call itself is a red flag.

This leads me to the next logical step in my investigation: does the function called by `KDSKBMODE`, namely `vt_do_kdskbmode`, acquire the `console_lock`? If `KDSKBMODE` doesn't lock, the responsibility for protecting the shared console data structures must fall upon `vt_do_kdskbmode`. Therefore, my next action is to examine the implementation of `vt_do_kdskbmode` to ascertain its locking behavior.


57/2 2026/08/11 23:40 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/keyboard.c Name:vt_do_kdskbmode]

Results:
map[SourceCode:1867:	/**
1868:	 *	vt_do_kdskbmode		-	set keyboard mode ioctl
1869:	 *	@console: the console to use
1870:	 *	@arg: the requested mode
1871:	 *
1872:	 *	Update the keyboard mode bits while holding the correct locks.
1873:	 *	Return 0 for success or an error code.
1874:	 */
1875:	int vt_do_kdskbmode(unsigned int console, unsigned int arg)
1876:	{
1877:		struct kbd_struct *kb = &kbd_table[console];
1878:	
1879:		guard(spinlock_irqsave)(&kbd_event_lock);
1880:		switch(arg) {
1881:		case K_RAW:
1882:			kb->kbdmode = VC_RAW;
1883:			return 0;
1884:		case K_MEDIUMRAW:
1885:			kb->kbdmode = VC_MEDIUMRAW;
1886:			return 0;
1887:		case K_XLATE:
1888:			kb->kbdmode = VC_XLATE;
1889:			do_compute_shiftstate();
1890:			return 0;
1891:		case K_UNICODE:
1892:			kb->kbdmode = VC_UNICODE;
1893:			do_compute_shiftstate();
1894:			return 0;
1895:		case K_OFF:
1896:			kb->kbdmode = VC_OFF;
1897:			return 0;
1898:		default:
1899:			return -EINVAL;
1900:		}
1901:	}
 SourceFile:drivers/tty/vt/keyboard.c]

58/2 2026/08/11 23:40 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 48907
							output: 1059
							thoughts: 2622
						

Thoughts:
**My Thought Process for Reproducing a Circular Locking Dependency**

Alright, let's break down how I've arrived at this reproduction strategy. My goal here is to trigger a specific circular locking dependency that I've identified in the kernel, and I need to explain my reasoning clearly, assuming you're as familiar with kernel internals as I am.

First off, I’ve been looking at the interactions involving `console_lock`, `&buf->lock`, `&port->mutex`, and `&tty->termios_rwsem`. My initial thought was to check if `KDSKBMODE` or `vc_SAK` directly acquire these locks in sequence. I quickly determined that `KDSKBMODE` doesn’t involve `console_lock` in the way I was expecting.

However, when I examined the `vc_SAK` function, I saw it clearly takes `console_lock`.

```c
	void vc_SAK(struct work_struct *work)
	{
		struct vc *vc_con =
			container_of(work, struct vc, SAK_work);
		struct vc_data *vc;
		struct tty_struct *tty;

		guard(console_lock)(); // Ah, here it is!
		vc = vc_con->d;
		if (!vc)
			return;

		/* FIXME: review tty ref counting */
		tty = vc->port.tty;
		/* SAK should also work in all raw modes and reset them properly. */
		if (tty)
			__do_SAK(tty); // This path is key
		reset_vc(vc);
	}
```

Crucially, the `__do_SAK` call within `vc_SAK` eventually leads to `tty_ldisc_flush` and then `tty_buffer_flush`. It's `tty_buffer_flush` that acquires `&buf->lock`. So, this establishes a path: `console_lock` -> `&buf->lock`.

Now, I need to figure out how to connect the other pieces of the puzzle to form a cycle. My next question was: "Are there other ways to trigger `vc_SAK`?" I know that `fn_SAK` in `drivers/tty/vt/keyboard.c` is called from the keyboard interrupt handler, meaning a physical SAK key press would also trigger it. But for a programmatic reproduction, writing to `/proc/sysrq-trigger` with `k` is the most straightforward method. This is how I’ll trigger the `console_lock` -> `&buf->lock` transition.

The remaining locks are `&tty->termios_rwsem` and `&port->mutex`. I need to see how they relate to the others. I know that operations on serial ports, specifically `uart_set_termios`, acquire `&port->mutex`. Furthermore, `tty_set_termios` (which calls `uart_set_termios`) operates while holding `&tty->termios_rwsem`. This gives me a link: `&tty->termios_rwsem` -> `&port->mutex`.

The final link I need is `&port->mutex` to `console_lock`. My understanding is that during kernel boot, serial console devices are registered, and this registration process involves acquiring `console_lock` under certain conditions related to the serial port's mutex. The lockdep report confirms this; it shows `console_lock` being acquired, and its dependency chain includes `uart_configure_port`, which operates on serial ports. Therefore, I can confidently say that `&port->mutex` -> `console_lock` is a dependency that is *already recorded* by lockdep during boot. I don’t need to actively trigger this specific transition myself; it's implicitly present.

Now, let's assemble the full cycle:
1.  I need to acquire `&tty->termios_rwsem` and then `&port->mutex`. The easiest way to do this is by opening a serial port (like `/dev/ttyS0`) and performing an `ioctl` with `TCSETS` (or `TCGETS` followed by `TCSETS`). This establishes `&tty->termios_rwsem` -> `&port->mutex`.
2.  I know the system already records `&port->mutex` -> `console_lock`.
3.  I can then trigger `console_lock` -> `&buf->lock` by writing `k` to `/proc/sysrq-trigger`.
4.  Finally, I need to acquire `&buf->lock` and then transition to `&tty->termios_rwsem`. This is achieved by writing to a pseudo-terminal (pty). When I write to the slave pty, it triggers `flush_to_ldisc` on the master pty. `flush_to_ldisc` acquires `&buf->lock` and then subsequently tries to acquire `&tty->termios_rwsem` (specifically, it interacts with the TTY's line discipline, which is tied to the termios settings). This creates the path `&buf->lock` -> `&tty->termios_rwsem`.

Putting it all together, the complete circular dependency chain I've identified is:
`&tty->termios_rwsem` -> `&port->mutex` -> `console_lock` -> `&buf->lock` -> `&tty->termios_rwsem`.

To reproduce this for lockdep, I need to ensure these transitions happen in a way that lockdep can observe them. My initial thought was to use threads to run these operations concurrently. However, lockdep's dependency tracking is global. It doesn't require an actual deadlock to occur; it just needs to see the *potential* for a deadlock by observing the lock acquisition order. Therefore, executing these steps sequentially is perfectly sufficient. In fact, sequential execution is *better* because it avoids any actual system instability while still allowing lockdep to detect the circular dependency.

Here’s the refined reproduction strategy:

1.  **Establish `&tty->termios_rwsem` -> `&port->mutex`:** Open a serial port (e.g., `/dev/ttyS0`) and call `ioctl(fd, TCSETS, &term)`. This ensures the relevant termios rwsem is held, and then the serial port mutex is acquired.
2.  **Establish `console_lock` -> `&buf->lock`:** Write `k` to `/proc/sysrq-trigger`. This schedules the `vc_SAK` work item, which will acquire `console_lock` and then, through its call to `__do_SAK`, eventually acquire `&buf->lock`. I'll add a small `usleep` here to give the work item time to be processed.
3.  **Establish `&buf->lock` -> `&tty->termios_rwsem`:** Open `/dev/ptmx`, get the slave pty, and write a byte to it. This will cause `flush_to_ldisc` on the master pty, acquiring `&buf->lock` and then `&tty->termios_rwsem`. Again, a small `usleep` is added for the work to complete.

The dependency `&port->mutex` -> `console_lock` is already recorded by lockdep during boot, so I don't need to explicitly trigger it. By executing these three sequential steps, I will trigger the necessary lock acquisitions in an order that exposes the full circular dependency to lockdep, causing it to issue the warning. I've verified this logic against the lockdep report, and it aligns perfectly with the observed lock acquisition paths.

Regarding availability of resources like `/dev/ttyS0`: syzkaller tests typically run as root, so permissions are not an issue. Even if a specific `/dev/ttyS0` isn't available, any serial port managed by `serial_core` will have its `uart_port` mutex initialized in a way that contributes to the `&port->mutex` -> `console_lock` dependency, as all these mutexes share the same lock class. So, any available serial port will suffice.

The C program I've drafted directly implements these sequential steps. It's designed to be simple, clear, and to trigger the specific lock order necessary for lockdep to detect the cycle.


59/1 2026/08/11 23:40 loop
21m
60/2 2026/08/11 23:40 iteration 0
4m
61/3 2026/08/11 23:40 action If
0m Args:
map[OracleFeedback:]

62/3 2026/08/11 23:40 action merge-strategy
0m Results:
map[CurrentReproStrategy:To reproduce this circular locking dependency warning, we need to trigger the lock dependencies that form the cycle. Lockdep tracks dependencies between lock classes globally, so we don't need to cause an actual deadlock; we just need to execute the code paths that take these locks in the required order sequentially.

### Lock Dependency Analysis

The cycle consists of 4 lock classes:
1. `&port->mutex` -> `console_lock`: This dependency is **already recorded during boot** when the kernel registers the serial console (`serial8250_init` -> `uart_configure_port`). We don't need to trigger it manually.
2. `&tty->termios_rwsem` -> `&port->mutex`: This is triggered when setting termios on a serial port. `tty_set_termios` takes `&tty->termios_rwsem` (write) and then calls `uart_set_termios` which takes `&port->mutex`.
3. `console_lock` -> `&buf->lock`: This is triggered by the Secure Attention Key (SAK) on a virtual console. `vc_SAK` takes `console_lock` and then calls `__do_SAK` -> `tty_ldisc_flush` -> `tty_buffer_flush` which takes `&buf->lock`.
4. `&buf->lock` -> `&tty->termios_rwsem`: This is triggered by the normal tty receive path. `flush_to_ldisc` takes `&buf->lock` and then calls `n_tty_receive_buf_common` which takes `&tty->termios_rwsem` (read).

### Reproduction Strategy

We can write a minimal C program that sequentially triggers the remaining 3 dependencies:
1. **Open a serial port** (e.g., `/dev/ttyS0`) and call `ioctl(fd, TCSETS, &term)` to record `&tty->termios_rwsem` -> `&port->mutex`.
2. **Write 'k' to `/proc/sysrq-trigger`** to simulate a SAK keypress. This schedules `vc_SAK` work, recording `console_lock` -> `&buf->lock`.
3. **Open a PTY pair** and write to the slave PTY. This queues data to the master PTY and schedules `flush_to_ldisc`, recording `&buf->lock` -> `&tty->termios_rwsem`.

Once the last dependency is recorded, lockdep will detect the cycle and emit the warning.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq >= 0) {
        write(fd_sysrq, "k", 1);
        close(fd_sysrq);
        // Wait a bit for the vc_SAK workqueue to execute
        usleep(100000);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```]

63/3 2026/08/11 23:40 agent repro-generator
0m Model:
best-expensive

Results:
map[IsProbe:true RawCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq < 0) {
        printf("[-] Failed to open /proc/sysrq-trigger: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /proc/sysrq-trigger.\n");
    close(fd_sysrq);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}
]

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

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


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

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

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


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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Strategy: To reproduce this circular locking dependency warning, we need to trigger the lock dependencies that form the cycle. Lockdep tracks dependencies between lock classes globally, so we don't need to cause an actual deadlock; we just need to execute the code paths that take these locks in the required order sequentially.

### Lock Dependency Analysis

The cycle consists of 4 lock classes:
1. `&port->mutex` -> `console_lock`: This dependency is **already recorded during boot** when the kernel registers the serial console (`serial8250_init` -> `uart_configure_port`). We don't need to trigger it manually.
2. `&tty->termios_rwsem` -> `&port->mutex`: This is triggered when setting termios on a serial port. `tty_set_termios` takes `&tty->termios_rwsem` (write) and then calls `uart_set_termios` which takes `&port->mutex`.
3. `console_lock` -> `&buf->lock`: This is triggered by the Secure Attention Key (SAK) on a virtual console. `vc_SAK` takes `console_lock` and then calls `__do_SAK` -> `tty_ldisc_flush` -> `tty_buffer_flush` which takes `&buf->lock`.
4. `&buf->lock` -> `&tty->termios_rwsem`: This is triggered by the normal tty receive path. `flush_to_ldisc` takes `&buf->lock` and then calls `n_tty_receive_buf_common` which takes `&tty->termios_rwsem` (read).

### Reproduction Strategy

We can write a minimal C program that sequentially triggers the remaining 3 dependencies:
1. **Open a serial port** (e.g., `/dev/ttyS0`) and call `ioctl(fd, TCSETS, &term)` to record `&tty->termios_rwsem` -> `&port->mutex`.
2. **Write 'k' to `/proc/sysrq-trigger`** to simulate a SAK keypress. This schedules `vc_SAK` work, recording `console_lock` -> `&buf->lock`.
3. **Open a PTY pair** and write to the slave PTY. This queues data to the master PTY and schedules `flush_to_ldisc`, recording `&buf->lock` -> `&tty->termios_rwsem`.

Once the last dependency is recorded, lockdep will detect the cycle and emit the warning.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq >= 0) {
        write(fd_sysrq, "k", 1);
        close(fd_sysrq);
        // Wait a bit for the vc_SAK workqueue to execute
        usleep(100000);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```




64/4 2026/08/11 23:40 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7680
							output: 385
							thoughts: 1337
						

Thoughts:
**My Thought Process for Generating a Capability Probe Program**

When tasked with generating a minimal C program for capability probing, my primary goal is to verify access to the specific system resources implicated in a suspected locking bug within `n_tty_receive_buf_common`. The bug description hints at a circular locking dependency, and the proposed strategy involves interacting with serial ports, the `/proc/sysrq-trigger` interface, and PTY (pseudo-terminal) devices.

First, I need to confirm that I can interact with the components mentioned in the strategy. This means being able to:

1.  **Open a serial port:** The strategy specifically points to `/dev/ttyS0`. While other serial ports might exist, `/dev/ttyS0` is a common default, so it's a good starting point for probing. My initial thought is to just attempt an `open()` call with read/write and `O_NOCTTY` flags. If this fails, it might indicate a lack of access to serial devices or that `/dev/ttyS0` simply isn't present.

2.  **Access `/proc/sysrq-trigger`:** The strategy requires writing to this special file to simulate a SAK (System Request Key) event. This operation typically demands elevated privileges, often root or specific capabilities. My immediate concern is whether the testing environment (likely syzkaller, which usually runs with high privileges) will permit this. I need to attempt an `open()` call with write-only access (`O_WRONLY`).

3.  **Create a PTY pair:** The strategy involves opening `/dev/ptmx` and subsequently creating a PTY pair. This is crucial for testing interactions that might rely on terminal emulation. I'll need to `open()` `/dev/ptmx` with read/write and `O_NOCTTY` flags.

Considering these points, I'll construct a simple C program. I'll start by attempting to open `/dev/ttyS0`. If that fails, my initial inclination is to exit, as it's a key component of the proposed trigger mechanism. However, I pause to reconsider: is `/dev/ttyS0` *strictly* necessary for the *initial capability probe*? Or can I proceed if it's unavailable, perhaps relying on another serial device or even a PTY for a later stage? The dependency `&tty->termios_rwsem` -> `&port->mutex` seems specific to `serial_core`, reinforcing the importance of a serial port. For the purpose of a *capability probe* to ensure the environment is set up correctly, it's safer to be strict. If `/dev/ttyS0` isn't accessible, the trigger might fail anyway, so I'll stick with exiting if it can't be opened.

Next, I'll check the `/proc/sysrq-trigger` opening. If this fails, it's a definite blocker for the proposed exploit, so I'll exit immediately. Similarly, opening `/dev/ptmx` is essential. If that fails, the PTY interaction cannot occur, and I'll exit.

My initial C code draft would look something like this, including basic error checking using `strerror(errno)` for informative messages:

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

int main(void) {
    // Attempt to open /dev/ttyS0
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1); // Exiting as /dev/ttyS0 seems crucial for the initial dependency
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial); // Close immediately as we only need to check accessibility

    // Attempt to open /proc/sysrq-trigger
    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq < 0) {
        printf("[-] Failed to open /proc/sysrq-trigger: %s\n", strerror(errno));
        exit(1); // Essential for triggering SAK
    }
    printf("[+] Successfully opened /proc/sysrq-trigger.\n");
    close(fd_sysrq); // Close immediately

    // Attempt to open /dev/ptmx
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1); // Essential for PTY interaction
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx); // Close immediately

    printf("[+] All probes successful.\n");
    return 0;
}
```

I then refine this slightly. For the probe itself, I don't need to perform any `ioctl` operations or use `termios.h`. The core requirement is simply to verify that the *files* can be opened with the necessary permissions. Thus, the code I've drafted seems sufficient. I also add a final message indicating overall success.

Finally, I understand that this probe will be delivered using the `set-results` tool, which implies it's intended to be part of a larger test harness. The code is minimal, self-contained, and directly addresses the capability checks derived from the proposed bug reproduction strategy.


65/4 2026/08/11 23:41 tool set-results
0m Args:
map[IsProbe:true RawCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq < 0) {
        printf("[-] Failed to open /proc/sysrq-trigger: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /proc/sysrq-trigger.\n");
    close(fd_sysrq);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}
]

Results:
map[IsProbe:true RawCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq < 0) {
        printf("[-] Failed to open /proc/sysrq-trigger: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /proc/sysrq-trigger.\n");
    close(fd_sysrq);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}
]

66/3 2026/08/11 23:41 loop
0m
67/4 2026/08/11 23:41 iteration 0
0m
68/5 2026/08/11 23:41 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq < 0) {
        printf("[-] Failed to open /proc/sysrq-trigger: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /proc/sysrq-trigger.\n");
    close(fd_sysrq);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}
]

69/5 2026/08/11 23:41 action compile-c-prog
0m Results:
map[CompilerError: FormattedReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq < 0) {
        printf("[-] Failed to open /proc/sysrq-trigger: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /proc/sysrq-trigger.\n");
    close(fd_sysrq);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}
]

70/5 2026/08/11 23:41 action If
0m Args:
map[CompilerError:]

71/3 2026/08/11 23:41 action run-c-repro
3m Results:
map[CandidateBugTitle: CandidateCrashReport: CandidateReproduced:false ConsoleOutput:[   96.654172][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   96.654181][   T33] audit: type=1400 audit(1786491773.474:201): avc:  denied  { transition } for  pid=5833 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.663622][   T33] audit: type=1400 audit(1786491773.474:202): avc:  denied  { noatsecure } for  pid=5833 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.670028][   T33] audit: type=1400 audit(1786491773.474:203): avc:  denied  { rlimitinh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.676599][   T33] audit: type=1400 audit(1786491773.474:204): avc:  denied  { siginh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   98.375821][   T33] audit: type=1400 audit(1786491775.194:205): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.420779][   T33] audit: type=1400 audit(1786491775.234:206): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.497555][   T33] audit: type=1400 audit(1786491775.314:207): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.540677][   T33] audit: type=1400 audit(1786491775.354:208): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:23431' (ED25519) to the list of known hosts.
[+] Successfully opened /dev/ttyS0.
[-] Failed to open /proc/sysrq-trigger: No such file or directory
[  100.608951][   T33] audit: type=1400 audit(1786491777.424:209): avc:  denied  { write } for  pid=5863 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  100.655350][   T33] audit: type=1400 audit(1786491777.474:210): avc:  denied  { write } for  pid=5866 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  101.765923][   T33] kauditd_printk_skb: 2 callbacks suppressed
[  101.765935][   T33] audit: type=1400 audit(1786491778.584:213): avc:  denied  { write } for  pid=5875 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  101.804515][   T33] audit: type=1400 audit(1786491778.624:214): avc:  denied  { write } for  pid=5878 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.510686][   T33] audit: type=1400 audit(1786491779.324:215): avc:  denied  { write } for  pid=5881 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.556083][   T33] audit: type=1400 audit(1786491779.374:216): avc:  denied  { write } for  pid=5884 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.626988][   T33] audit: type=1400 audit(1786491779.444:217): avc:  denied  { write } for  pid=5887 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.671082][   T33] audit: type=1400 audit(1786491779.484:218): avc:  denied  { write } for  pid=5890 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.882249][   T33] audit: type=1400 audit(1786491779.704:219): avc:  denied  { write } for  pid=5893 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.920387][   T33] audit: type=1400 audit(1786491779.734:220): avc:  denied  { write } for  pid=5896 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
 OtherCrashReports:<nil> StraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor3847421792

<...>
[   69.221755][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   69.221765][   T33] audit: type=1400 audit(1786491872.347:201): avc:  denied  { transition } for  pid=5826 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.239624][   T33] audit: type=1400 audit(1786491872.357:202): avc:  denied  { noatsecure } for  pid=5826 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.247448][   T33] audit: type=1400 audit(1786491872.357:203): avc:  denied  { rlimitinh } for  pid=5826 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.255009][   T33] audit: type=1400 audit(1786491872.357:204): avc:  denied  { siginh } for  pid=5826 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   71.833144][ T1374] ieee802154 phy0 wpan0: encryption failed: -22
[   71.835627][ T1374] ieee802154 phy1 wpan1: encryption failed: -22
[   72.602196][   T33] audit: type=1400 audit(1786491875.727:205): avc:  denied  { write } for  pid=5839 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.654665][   T33] audit: type=1400 audit(1786491875.777:206): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.756100][   T33] audit: type=1400 audit(1786491875.877:207): avc:  denied  { write } for  pid=5846 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.805659][   T33] audit: type=1400 audit(1786491875.927:208): avc:  denied  { write } for  pid=5850 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:65465' (ED25519) to the list of known hosts.
[   72.882526][   T33] audit: type=1400 audit(1786491876.007:209): avc:  denied  { write } for  pid=5854 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.927314][   T33] audit: type=1400 audit(1786491876.047:210): avc:  denied  { write } for  pid=5858 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
execve("/syz-executor3847421792", ["/syz-executor3847421792"], 0x7ffd8edd68a0 /* 11 vars */) = 0
brk(NULL)                               = 0x5555877dd000
brk(0x5555877ddd80)                     = 0x5555877ddd80
arch_prctl(ARCH_SET_FS, 0x5555877dd400) = 0
set_tid_address(0x5555877dd6d0)         = 5863
set_robust_list(0x5555877dd6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor3847421792", 4096) = 23
getrandom("\xd4\x4d\x24\x95\x8d\xcc\x6e\x4d", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x5555877ddd80
brk(0x5555877fed80)                     = 0x5555877fed80
brk(0x5555877ff000)                     = 0x5555877ff000
mprotect(0x7f1e3aa8a000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/proc/sysrq-trigger", O_WRONLY) = -1 ENOENT (No such file or directory)
write(1, "[+] Successfully opened /dev/ttyS0.\n[-] Failed to open /proc/sysrq-trigger: No such file or director"..., 102) = 102
[+] Successfully opened /dev/ttyS0.
[-] Failed to open /proc/sysrq-trigger: No such file or directory
exit_group(1)                           = ?
+++ exited with 1 +++
[   74.259827][   T33] kauditd_printk_skb: 5 callbacks suppressed
[   74.259838][   T33] audit: type=1400 audit(1786491877.387:216): avc:  denied  { write } for  pid=5879 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.337567][   T33] audit: type=1400 audit(1786491877.457:217): avc:  denied  { write } for  pid=5882 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.378373][   T33] audit: type=1400 audit(1786491877.497:218): avc:  denied  { write } for  pid=5885 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.998007][   T33] audit: type=1400 audit(1786491878.117:219): avc:  denied  { write } for  pid=5888 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   75.038084][   T33] audit: type=1400 audit(1786491878.157:220): avc:  denied  { write } for  pid=5891 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   82.076596][   T32] cfg80211: failed to load regulatory.db
 TestError:]

72/3 2026/08/11 23:44 action truncate-log
0m Results:
map[TruncatedConsoleOutput:[   96.654172][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   96.654181][   T33] audit: type=1400 audit(1786491773.474:201): avc:  denied  { transition } for  pid=5833 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.663622][   T33] audit: type=1400 audit(1786491773.474:202): avc:  denied  { noatsecure } for  pid=5833 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.670028][   T33] audit: type=1400 audit(1786491773.474:203): avc:  denied  { rlimitinh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.676599][   T33] audit: type=1400 audit(1786491773.474:204): avc:  denied  { siginh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   98.375821][   T33] audit: type=1400 audit(1786491775.194:205): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.420779][   T33] audit: type=1400 audit(1786491775.234:206): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.497555][   T33] audit: type=1400 audit(1786491775.314:207): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.540677][   T33] audit: type=1400 audit(1786491775.354:208): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:23431' (ED25519) to the list of known hosts.
[+] Successfully opened /dev/ttyS0.
[-] Failed to open /proc/sysrq-trigger: No such file or directory
[  100.608951][   T33] audit: type=1400 audit(1786491777.424:209): avc:  denied  { write } for  pid=5863 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  100.655350][   T33] audit: type=1400 audit(1786491777.474:210): avc:  denied  { write } for  pid=5866 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  101.765923][   T33] kauditd_printk_skb: 2 callbacks suppressed
[  101.765935][   T33] audit: type=1400 audit(1786491778.584:213): avc:  denied  { write } for  pid=5875 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  101.804515][   T33] audit: type=1400 audit(1786491778.624:214): avc:  denied  { write } for  pid=5878 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.510686][   T33] audit: type=1400 audit(1786491779.324:215): avc:  denied  { write } for  pid=5881 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.556083][   T33] audit: type=1400 audit(1786491779.374:216): avc:  denied  { write } for  pid=5884 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.626988][   T33] audit: type=1400 audit(1786491779.444:217): avc:  denied  { write } for  pid=5887 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.671082][   T33] audit: type=1400 audit(1786491779.484:218): avc:  denied  { write } for  pid=5890 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.882249][   T33] audit: type=1400 audit(1786491779.704:219): avc:  denied  { write } for  pid=5893 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.920387][   T33] audit: type=1400 audit(1786491779.734:220): avc:  denied  { write } for  pid=5896 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
 TruncatedCrashReport: TruncatedStraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor3847421792

<...>
[   69.221755][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   69.221765][   T33] audit: type=1400 audit(1786491872.347:201): avc:  denied  { transition } for  pid=5826 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.239624][   T33] audit: type=1400 audit(1786491872.357:202): avc:  denied  { noatsecure } for  pid=5826 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.247448][   T33] audit: type=1400 audit(1786491872.357:203): avc:  denied  { rlimitinh } for  pid=5826 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.255009][   T33] audit: type=1400 audit(1786491872.357:204): avc:  denied  { siginh } for  pid=5826 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   71.833144][ T1374] ieee802154 phy0 wpan0: encryption failed: -22
[   71.835627][ T1374] ieee802154 phy1 wpan1: encryption failed: -22
[   72.602196][   T33] audit: type=1400 audit(1786491875.727:205): avc:  denied  { write } for  pid=5839 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.654665][   T33] audit: type=1400 audit(1786491875.777:206): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.756100][   T33] audit: type=1400 audit(1786491875.877:207): avc:  denied  { write } for  pid=5846 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.805659][   T33] audit: type=1400 audit(1786491875.927:208): avc:  denied  { write } for  pid=5850 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:65465' (ED25519) to the list of known hosts.
[   72.882526][   T33] audit: type=1400 audit(1786491876.007:209): avc:  denied  { write } for  pid=5854 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.927314][   T33] audit: type=1400 audit(1786491876.047:210): avc:  denied  { write } for  pid=5858 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
execve("/syz-executor3847421792", ["/syz-executor3847421792"], 0x7ffd8edd68a0 /* 11 vars */) = 0
brk(NULL)                               = 0x5555877dd000
brk(0x5555877ddd80)                     = 0x5555877ddd80
arch_prctl(ARCH_SET_FS, 0x5555877dd400) = 0
set_tid_address(0x5555877dd6d0)         = 5863
set_robust_list(0x5555877dd6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor3847421792", 4096) = 23
getrandom("\xd4\x4d\x24\x95\x8d\xcc\x6e\x4d", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x5555877ddd80
brk(0x5555877fed80)                     = 0x5555877fed80
brk(0x5555877ff000)                     = 0x5555877ff000
mprotect(0x7f1e3aa8a000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/proc/sysrq-trigger", O_WRONLY) = -1 ENOENT (No such file or directory)
write(1, "[+] Successfully opened /dev/ttyS0.\n[-] Failed to open /proc/sysrq-trigger: No such file or director"..., 102) = 102
[+] Successfully opened /dev/ttyS0.
[-] Failed to open /proc/sysrq-trigger: No such file or directory
exit_group(1)                           = ?
+++ exited with 1 +++
[   74.259827][   T33] kauditd_printk_skb: 5 callbacks suppressed
[   74.259838][   T33] audit: type=1400 audit(1786491877.387:216): avc:  denied  { write } for  pid=5879 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.337567][   T33] audit: type=1400 audit(1786491877.457:217): avc:  denied  { write } for  pid=5882 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.378373][   T33] audit: type=1400 audit(1786491877.497:218): avc:  denied  { write } for  pid=5885 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.998007][   T33] audit: type=1400 audit(1786491878.117:219): avc:  denied  { write } for  pid=5888 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   75.038084][   T33] audit: type=1400 audit(1786491878.157:220): avc:  denied  { write } for  pid=5891 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   82.076596][   T32] cfg80211: failed to load regulatory.db
]

73/3 2026/08/11 23:44 agent repro-oracle
0m Model:
best-expensive

Results:
map[Feedback:The probe successfully opened `/dev/ttyS0`, but failed to open `/proc/sysrq-trigger` (No such file or directory). This indicates that sysrq is either disabled in the kernel config or restricted by the sandbox. You will need to find an alternative way to trigger the console lock or whatever you intended to do with sysrq (e.g., writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)`, or other console-related operations). Please adjust your reproducer strategy accordingly. ProbePassed:false TerminalError: TitleMatches:false]

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

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

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


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

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


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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

IsProbe: true
Reproduced: false
Console Output: [   96.654172][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   96.654181][   T33] audit: type=1400 audit(1786491773.474:201): avc:  denied  { transition } for  pid=5833 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.663622][   T33] audit: type=1400 audit(1786491773.474:202): avc:  denied  { noatsecure } for  pid=5833 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.670028][   T33] audit: type=1400 audit(1786491773.474:203): avc:  denied  { rlimitinh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   96.676599][   T33] audit: type=1400 audit(1786491773.474:204): avc:  denied  { siginh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   98.375821][   T33] audit: type=1400 audit(1786491775.194:205): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.420779][   T33] audit: type=1400 audit(1786491775.234:206): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.497555][   T33] audit: type=1400 audit(1786491775.314:207): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   98.540677][   T33] audit: type=1400 audit(1786491775.354:208): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:23431' (ED25519) to the list of known hosts.
[+] Successfully opened /dev/ttyS0.
[-] Failed to open /proc/sysrq-trigger: No such file or directory
[  100.608951][   T33] audit: type=1400 audit(1786491777.424:209): avc:  denied  { write } for  pid=5863 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  100.655350][   T33] audit: type=1400 audit(1786491777.474:210): avc:  denied  { write } for  pid=5866 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  101.765923][   T33] kauditd_printk_skb: 2 callbacks suppressed
[  101.765935][   T33] audit: type=1400 audit(1786491778.584:213): avc:  denied  { write } for  pid=5875 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  101.804515][   T33] audit: type=1400 audit(1786491778.624:214): avc:  denied  { write } for  pid=5878 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.510686][   T33] audit: type=1400 audit(1786491779.324:215): avc:  denied  { write } for  pid=5881 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.556083][   T33] audit: type=1400 audit(1786491779.374:216): avc:  denied  { write } for  pid=5884 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.626988][   T33] audit: type=1400 audit(1786491779.444:217): avc:  denied  { write } for  pid=5887 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.671082][   T33] audit: type=1400 audit(1786491779.484:218): avc:  denied  { write } for  pid=5890 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.882249][   T33] audit: type=1400 audit(1786491779.704:219): avc:  denied  { write } for  pid=5893 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  102.920387][   T33] audit: type=1400 audit(1786491779.734:220): avc:  denied  { write } for  pid=5896 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1

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

<...>
[   69.221755][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   69.221765][   T33] audit: type=1400 audit(1786491872.347:201): avc:  denied  { transition } for  pid=5826 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.239624][   T33] audit: type=1400 audit(1786491872.357:202): avc:  denied  { noatsecure } for  pid=5826 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.247448][   T33] audit: type=1400 audit(1786491872.357:203): avc:  denied  { rlimitinh } for  pid=5826 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   69.255009][   T33] audit: type=1400 audit(1786491872.357:204): avc:  denied  { siginh } for  pid=5826 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   71.833144][ T1374] ieee802154 phy0 wpan0: encryption failed: -22
[   71.835627][ T1374] ieee802154 phy1 wpan1: encryption failed: -22
[   72.602196][   T33] audit: type=1400 audit(1786491875.727:205): avc:  denied  { write } for  pid=5839 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.654665][   T33] audit: type=1400 audit(1786491875.777:206): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.756100][   T33] audit: type=1400 audit(1786491875.877:207): avc:  denied  { write } for  pid=5846 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.805659][   T33] audit: type=1400 audit(1786491875.927:208): avc:  denied  { write } for  pid=5850 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:65465' (ED25519) to the list of known hosts.
[   72.882526][   T33] audit: type=1400 audit(1786491876.007:209): avc:  denied  { write } for  pid=5854 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.927314][   T33] audit: type=1400 audit(1786491876.047:210): avc:  denied  { write } for  pid=5858 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
execve("/syz-executor3847421792", ["/syz-executor3847421792"], 0x7ffd8edd68a0 /* 11 vars */) = 0
brk(NULL)                               = 0x5555877dd000
brk(0x5555877ddd80)                     = 0x5555877ddd80
arch_prctl(ARCH_SET_FS, 0x5555877dd400) = 0
set_tid_address(0x5555877dd6d0)         = 5863
set_robust_list(0x5555877dd6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor3847421792", 4096) = 23
getrandom("\xd4\x4d\x24\x95\x8d\xcc\x6e\x4d", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x5555877ddd80
brk(0x5555877fed80)                     = 0x5555877fed80
brk(0x5555877ff000)                     = 0x5555877ff000
mprotect(0x7f1e3aa8a000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/proc/sysrq-trigger", O_WRONLY) = -1 ENOENT (No such file or directory)
write(1, "[+] Successfully opened /dev/ttyS0.\n[-] Failed to open /proc/sysrq-trigger: No such file or director"..., 102) = 102
[+] Successfully opened /dev/ttyS0.
[-] Failed to open /proc/sysrq-trigger: No such file or directory
exit_group(1)                           = ?
+++ exited with 1 +++
[   74.259827][   T33] kauditd_printk_skb: 5 callbacks suppressed
[   74.259838][   T33] audit: type=1400 audit(1786491877.387:216): avc:  denied  { write } for  pid=5879 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.337567][   T33] audit: type=1400 audit(1786491877.457:217): avc:  denied  { write } for  pid=5882 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.378373][   T33] audit: type=1400 audit(1786491877.497:218): avc:  denied  { write } for  pid=5885 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   74.998007][   T33] audit: type=1400 audit(1786491878.117:219): avc:  denied  { write } for  pid=5888 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   75.038084][   T33] audit: type=1400 audit(1786491878.157:220): avc:  denied  { write } for  pid=5891 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   82.076596][   T32] cfg80211: failed to load regulatory.db

Crash Report: 


74/4 2026/08/11 23:44 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11760
							output: 138
							thoughts: 1040
						

Thoughts:
**My Thought Process: Analyzing Probe Results and Identifying the Core Issue**

Okay, so I've just run this capability probe, and the output is telling me something crucial. It clearly states it successfully opened `/dev/ttyS0`, which is good – the serial port itself is accessible. However, it *failed* to open `/proc/sysrq-trigger`, with the error "No such file or directory." This immediately jumps out at me because the exit code was 1, indicating an overall failure.

Now, the bug description itself is pointing towards a potential circular locking dependency within `n_tty_receive_buf_common`. The locks involved are `&tty->termios_rwsem`, `console_lock`, `&buf->lock`, and `&port->mutex`. This is the core of the problem I need to investigate.

The probe's attempt to interact with `/dev/ttyS0` and `/proc/sysrq-trigger` needs to be contextualized against this locking bug. The absence of `/proc/sysrq-trigger` is a significant observation. It could mean `CONFIG_MAGIC_SYSRQ` isn't enabled in the kernel, or more likely in this context, the sandbox environment is restricting access to it.

But here's the critical realization: is `/proc/sysrq-trigger` *absolutely essential* for triggering the scenario described in the bug? The bug report *itself* shows the lock dependency chain. We see `serial_core_register_port` and `serial8250_register_8250_port` interacting with `console_lock`, and then `uart_set_termios` and `tty_set_termios` dealing with `&port->mutex`. Most importantly, `n_tty_receive_buf_common` is where the circular lock is detected, and it's explicitly shown to involve `&tty->termios_rwsem`.

The sysrq trigger *might* have been a convenient way to initiate a console print or a similar kernel operation that would exercise these locks. But if the bug is indeed about the locking dependency itself, then the *exact method* of triggering it, as long as it exercises the relevant code paths, might be less critical than the *fact* that the locks are being acquired in a conflicting order.

Given the prompt's instructions: "If the probe failed (e.g., missing permissions, missing devices, or sandbox restrictions), set the field 'ProbePassed' to false, and explain what failed in the 'Feedback' field so the generator can adjust its setups." – this is exactly what I need to do. The probe *did* fail due to a missing device (`/proc/sysrq-trigger`), likely due to sandbox restrictions. Therefore, `ProbePassed` must be `false`.

The feedback needs to clearly state *why* it failed and suggest alternatives. The generator needs to know that sysrq is unavailable and that it should look for another way to provoke the console lock or whatever operation it intended to perform. Options like writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)` for console selection, or directly interacting with `/dev/tty0` could be viable alternatives.

So, to summarize my internal decision-making:
1.  **Probe Outcome:** Successful access to `/dev/ttyS0`, but failed access to `/proc/sysrq-trigger` (exit code 1).
2.  **Bug Context:** Circular locking dependency in `n_tty_receive_buf_common` involving `tty->termios_rwsem`, `console_lock`, `buf->lock`, and `port->mutex`.
3.  **Sysrq Trigger Relevance:** Likely a mechanism to trigger the locking scenario, but not necessarily the *only* way. The core issue is the lock dependency itself.
4.  **Action Required:** Mark `ProbePassed` as `false` due to the missing `/proc/sysrq-trigger`.
5.  **Feedback Content:** Explain the missing `/proc/sysrq-trigger` (kernel config or sandbox restriction) and suggest alternative methods for triggering the console lock/related operations.
6.  **Other Fields:** `TitleMatches` is `false` because no crash occurred. `TerminalError` is empty as the failure was specific to the probe's device access, not a general terminal issue.

This leads me to the `set-results` call with the specific feedback I've outlined.


75/4 2026/08/11 23:45 tool set-results
0m Args:
map[Feedback:The probe successfully opened `/dev/ttyS0`, but failed to open `/proc/sysrq-trigger` (No such file or directory). This indicates that sysrq is either disabled in the kernel config or restricted by the sandbox. You will need to find an alternative way to trigger the console lock or whatever you intended to do with sysrq (e.g., writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)`, or other console-related operations). Please adjust your reproducer strategy accordingly. ProbePassed:false TerminalError: TitleMatches:false]

Results:
map[Feedback:The probe successfully opened `/dev/ttyS0`, but failed to open `/proc/sysrq-trigger` (No such file or directory). This indicates that sysrq is either disabled in the kernel config or restricted by the sandbox. You will need to find an alternative way to trigger the console lock or whatever you intended to do with sysrq (e.g., writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)`, or other console-related operations). Please adjust your reproducer strategy accordingly. ProbePassed:false TerminalError: TitleMatches:false]

76/3 2026/08/11 23:45 action loop-controller
0m Results:
map[CapabilitiesVerified:false ContinueSignal:continue EquivalenceAnalysis: OracleFeedback:The probe successfully opened `/dev/ttyS0`, but failed to open `/proc/sysrq-trigger` (No such file or directory). This indicates that sysrq is either disabled in the kernel config or restricted by the sandbox. You will need to find an alternative way to trigger the console lock or whatever you intended to do with sysrq (e.g., writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)`, or other console-related operations). Please adjust your reproducer strategy accordingly. ReproC: Reproduced:false ReproducedBugTitle: ReproducedCrashReport:]

77/2 2026/08/11 23:45 iteration 1
9m
78/3 2026/08/11 23:45 action If
4m Args:
map[OracleFeedback:The probe successfully opened `/dev/ttyS0`, but failed to open `/proc/sysrq-trigger` (No such file or directory). This indicates that sysrq is either disabled in the kernel config or restricted by the sandbox. You will need to find an alternative way to trigger the console lock or whatever you intended to do with sysrq (e.g., writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)`, or other console-related operations). Please adjust your reproducer strategy accordingly.]

79/4 2026/08/11 23:45 agent strategy-refiner
4m Model:
best-expensive

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

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

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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Current Strategy: To reproduce this circular locking dependency warning, we need to trigger the lock dependencies that form the cycle. Lockdep tracks dependencies between lock classes globally, so we don't need to cause an actual deadlock; we just need to execute the code paths that take these locks in the required order sequentially.

### Lock Dependency Analysis

The cycle consists of 4 lock classes:
1. `&port->mutex` -> `console_lock`: This dependency is **already recorded during boot** when the kernel registers the serial console (`serial8250_init` -> `uart_configure_port`). We don't need to trigger it manually.
2. `&tty->termios_rwsem` -> `&port->mutex`: This is triggered when setting termios on a serial port. `tty_set_termios` takes `&tty->termios_rwsem` (write) and then calls `uart_set_termios` which takes `&port->mutex`.
3. `console_lock` -> `&buf->lock`: This is triggered by the Secure Attention Key (SAK) on a virtual console. `vc_SAK` takes `console_lock` and then calls `__do_SAK` -> `tty_ldisc_flush` -> `tty_buffer_flush` which takes `&buf->lock`.
4. `&buf->lock` -> `&tty->termios_rwsem`: This is triggered by the normal tty receive path. `flush_to_ldisc` takes `&buf->lock` and then calls `n_tty_receive_buf_common` which takes `&tty->termios_rwsem` (read).

### Reproduction Strategy

We can write a minimal C program that sequentially triggers the remaining 3 dependencies:
1. **Open a serial port** (e.g., `/dev/ttyS0`) and call `ioctl(fd, TCSETS, &term)` to record `&tty->termios_rwsem` -> `&port->mutex`.
2. **Write 'k' to `/proc/sysrq-trigger`** to simulate a SAK keypress. This schedules `vc_SAK` work, recording `console_lock` -> `&buf->lock`.
3. **Open a PTY pair** and write to the slave PTY. This queues data to the master PTY and schedules `flush_to_ldisc`, recording `&buf->lock` -> `&tty->termios_rwsem`.

Once the last dependency is recorded, lockdep will detect the cycle and emit the warning.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq >= 0) {
        write(fd_sysrq, "k", 1);
        close(fd_sysrq);
        // Wait a bit for the vc_SAK workqueue to execute
        usleep(100000);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```
Feedback: The probe successfully opened `/dev/ttyS0`, but failed to open `/proc/sysrq-trigger` (No such file or directory). This indicates that sysrq is either disabled in the kernel config or restricted by the sandbox. You will need to find an alternative way to trigger the console lock or whatever you intended to do with sysrq (e.g., writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)`, or other console-related operations). Please adjust your reproducer strategy accordingly.

Reply:
To trigger the `console_lock` -> `&buf->lock` dependency without relying on `/proc/sysrq-trigger` (which might be disabled or restricted), we can use the VT keyboard driver. 

The function `vc_SAK` takes `console_lock` and then calls `__do_SAK`, which takes `&buf->lock`. `vc_SAK` is scheduled by `fn_SAK`, which is triggered when the keyboard driver receives a key mapped to the `K_SAK` keysym. 

We can dynamically map a normal key (e.g., `KEY_A`) to `K_SAK` using the `KDSKBENT` ioctl on a VT device (like `/dev/tty0`). Then, we can inject a `KEY_A` keypress using a virtual input device via `/dev/uinput`. This will simulate the SAK key combination and execute `vc_SAK`, recording the required lock dependency.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/uinput.h>
#include <string.h>
#include <stdio.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    // Map KEY_A (keycode 30) to K_SAK (0x020F)
    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    
    if (fd_tty >= 0) {
        struct kbentry ke;
        ke.kb_table = 0;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        ioctl(fd_tty, KDSKBENT, &ke);
        close(fd_tty);
    }

    // Inject KEY_A via uinput to trigger fn_SAK -> vc_SAK
    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        ioctl(ufd, UI_SET_EVBIT, EV_KEY);
        ioctl(ufd, UI_SET_KEYBIT, KEY_A);

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        ioctl(ufd, UI_DEV_SETUP, &usetup);
        ioctl(ufd, UI_DEV_CREATE);

        usleep(100000); // wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 1;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        // Release KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        usleep(100000); // wait for vc_SAK workqueue to execute
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```

80/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7227
							output: 39
							thoughts: 477
						

Thoughts:
**My Thought Process on Triggering Console Lock Dependencies**

Okay, so my primary objective here is to reliably trigger a specific lock dependency: `console_lock` leading to `&buf->lock`. The key constraint is that I absolutely *cannot* use the `/proc/sysrq-trigger` mechanism for this.

I've been tracing the dependency chain, and the established path I'm seeing is: `console_lock` -> `&buf->lock`. The specific sequence looks something like this, as indicated by the lockdep output:

```
-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_work+0xa23/0x1940 kernel/workqueue.c:3322
```

The critical point in this chain is `vc_SAK`. This function appears to be the entry point that eventually acquires the `console_lock` and then proceeds to `&buf->lock`.

Now, I'm recalling that `vc_SAK` is a work function. This means it's not directly callable in the traditional sense; it's scheduled to run asynchronously. My next step is to figure out *how* `vc_SAK` gets scheduled. Is it initiated by `do_SAK` within `drivers/tty/vt/vt_ioctl.c`? I need to dive into that to understand the scheduling mechanism.

My immediate thought is: can I manipulate userspace to trigger `__do_SAK` or directly schedule `vc_SAK`? This would be the ideal way to achieve my goal without relying on the forbidden `/proc/sysrq-trigger`.

However, I'm also keeping an open mind. Is there *another* independent path that leads to acquiring the `console_lock` and *then* subsequently acquiring `&buf->lock`? Perhaps a different kernel path that also happens to call `console_lock` followed by `&buf->lock`?

Before I get too deep into the workqueue scheduling, I need to double-check my assumption. Does `vc_SAK` *actually* hold or acquire the `console_lock` itself? I'll need to go directly to the source code for `vc_SAK` in `drivers/tty/vt/vt_ioctl.c` to confirm this crucial detail. If it doesn't, my entire line of investigation needs to pivot.


81/5 2026/08/11 23:45 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c Name:vc_SAK]

Results:
map[SourceCode: 978:	void vc_SAK(struct work_struct *work)
 979:	{
 980:		struct vc *vc_con =
 981:			container_of(work, struct vc, SAK_work);
 982:		struct vc_data *vc;
 983:		struct tty_struct *tty;
 984:	
 985:		guard(console_lock)();
 986:		vc = vc_con->d;
 987:		if (!vc)
 988:			return;
 989:	
 990:		/* FIXME: review tty ref counting */
 991:		tty = vc->port.tty;
 992:		/* SAK should also work in all raw modes and reset them properly. */
 993:		if (tty)
 994:			__do_SAK(tty);
 995:		reset_vc(vc);
 996:	}
 SourceFile:drivers/tty/vt/vt_ioctl.c]

82/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8013
							output: 52
							thoughts: 62
						

Thoughts:
**My Thought Process Regarding `vc_SAK` and its Scheduling**

Okay, so I've landed on the `vc_SAK` function, and my immediate observation is that this is a "work function." This tells me it's likely intended to be executed asynchronously, likely within a workqueue context, rather than being called directly and synchronously. I see it takes `console_lock` as an argument, which immediately raises a flag about synchronization and potential contention, and then it proceeds to call `__do_SAK(tty)`. This nested call confirms my suspicion that `vc_SAK` is a wrapper or a handler for the core Safety Alert Key (SAK) logic, delegating the actual work to `__do_SAK`.

Now, the crucial question for me, as someone who needs to understand the flow and timing of this code, is *how* `vc_SAK` itself gets scheduled and executed. Since it's identified as a work function, the natural next step is to hunt for where it's *enqueued* or *triggered*. My instinct is to look for any references to `SAK_work` or `vc_SAK` within the scheduling mechanisms of the kernel's workqueue subsystem. I'll be scrutinizing the code that submits work items to the appropriate workqueue, as that's where the initiation point for `vc_SAK`'s execution must reside. This search will be key to understanding the event that leads to a SAK being processed and how the system manages that process.


83/5 2026/08/11 23:45 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c IncludeSnippetLines:2 Name:vc_SAK SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:takes-address-of ReferencingEntityKind:function ReferencingEntityName:con_init SourceFile:drivers/tty/vt/vt.c SourceLine:3885 SourceSnippet:3883:			vc_cons[currcons].d = vc = kzalloc_obj(struct vc_data,
3884:							       GFP_NOWAIT);
3885:			INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
3886:			tty_port_init(&vc->port);
3887:			visual_init(vc, currcons, true);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:function ReferencingEntityName:vc_allocate SourceFile:drivers/tty/vt/vt.c SourceLine:1109 SourceSnippet:1107:		tty_port_init(&vc->port);
1108:		vc->port.ops = &vc_port_ops;
1109:		INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
1110:	
1111:		visual_init(vc, currcons, true);
]] TruncatedOutput:false]

84/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8396
							output: 50
							thoughts: 41
						

Thoughts:
**My Thought Process on SAK_work Scheduling**

Alright, so I've identified that `SAK_work` is being initialized in both `con_init` and `vc_allocate`. My immediate next thought is about how this `SAK_work` is actually being *scheduled* and put into action. Given its initialization points, it's clearly meant to be processed, and I need to understand the mechanism responsible for that. Therefore, my next logical step is to perform a thorough search for all references to `SAK_work` within the codebase. This will help me trace its lifecycle, understand which functions or events trigger its execution, and ultimately clarify its scheduling behavior.


85/5 2026/08/11 23:45 tool codesearch-find-references
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/tty/vt/vt.c IncludeSnippetLines:2 Name:SAK_work SourceTreePrefix:]

Results:
map[References:<nil> TruncatedOutput:false]

86/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8486
							output: 30
							thoughts: 27
						

Thoughts:
**A Moment of Revelation About `SAK_work`**

Ah, I see it now! It dawns on me that `SAK_work` isn't some standalone entity; my understanding was a bit fragmented. I've just realized, with a sudden flash of clarity, that `SAK_work` is actually an integral field *within* the `struct vc`. This is a crucial piece of information that shifts my perspective considerably. My immediate next step, naturally, is to dive deeper and thoroughly investigate where and how `SAK_work` is being utilized within the context of `struct vc`. This is going to be illuminating.


87/5 2026/08/11 23:45 tool grepper
0m Args:
map[Expression:SAK_work PathPrefix:drivers/tty/vt/]

Results:
map[Output:drivers/tty/vt/keyboard.c=634=static void fn_SAK(struct vc_data *vc)
drivers/tty/vt/keyboard.c-635-{
drivers/tty/vt/keyboard.c:636:	struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
drivers/tty/vt/keyboard.c:637:	schedule_work(SAK_work);
drivers/tty/vt/keyboard.c-638-}
--
drivers/tty/vt/vt.c=1082=int vc_allocate(unsigned int currcons)	/* return 0 on success */
--
drivers/tty/vt/vt.c-1108-	vc->port.ops = &vc_port_ops;
drivers/tty/vt/vt.c:1109:	INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-1110-
--
drivers/tty/vt/vt.c=3844=static int __init con_init(void)
--
drivers/tty/vt/vt.c-3884-						       GFP_NOWAIT);
drivers/tty/vt/vt.c:3885:		INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-3886-		tty_port_init(&vc->port);
--
drivers/tty/vt/vt_ioctl.c=978=void vc_SAK(struct work_struct *work)
--
drivers/tty/vt/vt_ioctl.c-980-	struct vc *vc_con =
drivers/tty/vt/vt_ioctl.c:981:		container_of(work, struct vc, SAK_work);
drivers/tty/vt/vt_ioctl.c-982-	struct vc_data *vc;
]

88/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9020
							output: 33
							thoughts: 59
						

Thoughts:
**My Thought Process on SAK Key Handling**

Right, so my current line of inquiry is how the SAK (Secure Attention Key) combination is handled within the system. I've identified that `fn_SAK` is the function responsible for initiating the SAK sequence. My immediate question is, what triggers `fn_SAK`? I've confirmed it's activated when the SAK key combination is detected on the keyboard input.

My next logical step is to investigate the underlying mechanism for invoking this SAK functionality. Specifically, I'm wondering if there's a direct `ioctl` (input/output control) call that can be used to programmatically trigger the SAK event. To explore this, I plan to delve into the `vt_ioctl.c` file, as this is where I anticipate finding relevant `ioctl` definitions related to virtual terminal (vt) operations, and therefore, where I'd expect to find any SAK-specific `ioctl` calls. I'll be looking for any `ioctl` commands that explicitly mention or are associated with the SAK functionality.


89/5 2026/08/11 23:45 tool grepper
0m Args:
map[Expression:SAK PathPrefix:drivers/tty/vt/vt_ioctl.c]

Results:
map[Output:drivers/tty/vt/vt_ioctl.c=963=void reset_vc(struct vc_data *vc)
--
drivers/tty/vt/vt_ioctl.c-977-
drivers/tty/vt/vt_ioctl.c:978:void vc_SAK(struct work_struct *work)
drivers/tty/vt/vt_ioctl.c-979-{
drivers/tty/vt/vt_ioctl.c-980-	struct vc *vc_con =
drivers/tty/vt/vt_ioctl.c:981:		container_of(work, struct vc, SAK_work);
drivers/tty/vt/vt_ioctl.c-982-	struct vc_data *vc;
--
drivers/tty/vt/vt_ioctl.c-991-	tty = vc->port.tty;
drivers/tty/vt/vt_ioctl.c:992:	/* SAK should also work in all raw modes and reset them properly. */
drivers/tty/vt/vt_ioctl.c-993-	if (tty)
drivers/tty/vt/vt_ioctl.c:994:		__do_SAK(tty);
drivers/tty/vt/vt_ioctl.c-995-	reset_vc(vc);
]

90/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9419
							output: 38
							thoughts: 58
						

Thoughts:
**My Thought Process Regarding `SAK` ioctls**

My initial line of inquiry centers on a fundamental question: does a specific `ioctl` call exist within the kernel that directly initiates the `fn_SAK` or `vc_SAK` functionality? This is a crucial point because understanding the programmatic interface for such system-level actions is paramount for anyone working with the kernel's low-level interactions.

My immediate thought process then turned to exploring potential candidates for such an `ioctl`. I began considering known `ioctl` commands that deal with signal handling or terminal-specific operations. Two specific candidates that immediately sprang to mind were `KDSIGACCEPT` and `TIOCLINUX`.

I know `KDSIGACCEPT` is related to signal acceptance, which feels like it *could* be in the same ballpark as triggering a `SAK` event. However, my experience suggests it might be more about how signals are processed *after* they've been generated, rather than the generation itself.

My attention then shifted more firmly to `TIOCLINUX`. This `ioctl` is notoriously versatile and often employed for a variety of non-standard terminal operations. I recalled that `TIOCLINUX` has capabilities that extend beyond simple character manipulation, including the ability to simulate keypresses and, more broadly, to execute other special commands within the terminal context. This versatility makes it a strong contender for something as specific as triggering a `SAK` event, which is often initiated by a particular key combination. Therefore, my focus is now on definitively determining if `TIOCLINUX`, or indeed `KDSIGACCEPT`, provides the direct `ioctl` interface I'm looking for to invoke `fn_SAK` or `vc_SAK`.


91/5 2026/08/11 23:45 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c Name:tioclinux]

Results:
map[SourceCode:3561:	int tioclinux(struct tty_struct *tty, unsigned long arg)
3562:	{
3563:		char type, data;
3564:		char __user *p = (char __user *)arg;
3565:		void __user *param_aligned32 = (u32 __user *)arg + 1;
3566:		void __user *param = (void __user *)arg + 1;
3567:		int lines;
3568:		int ret;
3569:	
3570:		if (current->signal->tty != tty && !capable(CAP_SYS_ADMIN))
3571:			return -EPERM;
3572:		if (get_user(type, p))
3573:			return -EFAULT;
3574:		ret = 0;
3575:	
3576:		switch (type) {
3577:		case TIOCL_SETSEL:
3578:			return set_selection_user(param, tty);
3579:		case TIOCL_PASTESEL:
3580:			if (!capable(CAP_SYS_ADMIN))
3581:				return -EPERM;
3582:			return paste_selection(tty);
3583:		case TIOCL_UNBLANKSCREEN:
3584:			scoped_guard(console_lock)
3585:				unblank_screen();
3586:			break;
3587:		case TIOCL_SELLOADLUT:
3588:			if (!capable(CAP_SYS_ADMIN))
3589:				return -EPERM;
3590:			return sel_loadlut(param_aligned32);
3591:		case TIOCL_GETSHIFTSTATE:
3592:			/*
3593:			 * Make it possible to react to Shift+Mousebutton. Note that
3594:			 * 'shift_state' is an undocumented kernel-internal variable;
3595:			 * programs not closely related to the kernel should not use
3596:			 * this.
3597:			 */
3598:			data = vt_get_shift_state();
3599:			return put_user(data, p);
3600:		case TIOCL_GETMOUSEREPORTING:
3601:			scoped_guard(console_lock)	/* May be overkill */
3602:				data = mouse_reporting();
3603:			return put_user(data, p);
3604:		case TIOCL_SETVESABLANK:
3605:			return set_vesa_blanking(param);
3606:		case TIOCL_GETKMSGREDIRECT:
3607:			data = vt_get_kmsg_redirect();
3608:			return put_user(data, p);
3609:		case TIOCL_SETKMSGREDIRECT:
3610:			if (!capable(CAP_SYS_ADMIN))
3611:				return -EPERM;
3612:	
3613:			if (get_user(data, p+1))
3614:				return -EFAULT;
3615:	
3616:			vt_kmsg_redirect(data);
3617:	
3618:			break;
3619:		case TIOCL_GETFGCONSOLE:
3620:			/*
3621:			 * No locking needed as this is a transiently correct return
3622:			 * anyway if the caller hasn't disabled switching.
3623:			 */
3624:			return fg_console;
3625:		case TIOCL_SCROLLCONSOLE:
3626:			if (get_user(lines, (s32 __user *)param_aligned32))
3627:				return -EFAULT;
3628:	
3629:			/*
3630:			 * Needs the console lock here. Note that lots of other calls
3631:			 * need fixing before the lock is actually useful!
3632:			 */
3633:			scoped_guard(console_lock)
3634:				scrollfront(vc_cons[fg_console].d, lines);
3635:			break;
3636:		case TIOCL_BLANKSCREEN:	/* until explicitly unblanked, not only poked */
3637:			scoped_guard(console_lock) {
3638:				ignore_poke = 1;
3639:				do_blank_screen(0);
3640:			}
3641:			break;
3642:		case TIOCL_BLANKEDSCREEN:
3643:			return console_blanked;
3644:		case TIOCL_GETBRACKETEDPASTE:
3645:			return get_bracketed_paste(tty);
3646:		default:
3647:			return -EINVAL;
3648:		}
3649:	
3650:		return ret;
3651:	}
 SourceFile:drivers/tty/vt/vt.c]

92/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10852
							output: 36
							thoughts: 424
						

Thoughts:
**My Thought Process Regarding `TIOCLINUX` and `console_lock` Acquisition**

My initial thought was that `TIOCLINUX`, as a mechanism, doesn't directly expose a Signal-Asserted Key (SAK) trigger, which is a common way to initiate certain console operations. This led me to question how, then, we might arrive at a state where `console_lock` is acquired, and subsequently `&buf->lock` is also acquired.

I then recalled or reviewed the original report, which clearly shows a call trace leading to the acquisition of `&buf->lock`. This trace reveals the path: `lock_acquire` -> `__mutex_lock_common` -> `__mutex_lock`, ultimately within `tty_buffer_flush`. Crucially, this `tty_buffer_flush` is called by `tty_ldisc_flush`, which in turn is invoked by `__do_SAK`, ultimately originating from `vc_SAK`. This entire sequence is triggered by `process_one_work`, which implies a workqueue item is responsible for the SAK operation.

This detailed trace solidified my understanding of how `&buf->lock` is acquired *in that specific context* – via a SAK event processed by the workqueue. However, it didn't immediately answer my core question: is there *any other way* to acquire `console_lock` and then subsequently `&buf->lock` without going through this specific SAK workqueue path?

This prompted me to consider alternative entry points into the console locking mechanism. I started thinking about direct `ioctl` calls that might touch upon the console lock. My attention then turned to `ioctl(fd, TIOCLINUX, ...)` itself. The question became: could `TIOCLINUX`, when invoked with specific arguments, first acquire `console_lock` and then, as part of its execution, subsequently acquire `&buf->lock`?

I decided to investigate one of the `TIOCLINUX` subcommands, specifically `TIOCL_PASTESEL`. My understanding is that this command, when issued, triggers the `paste_selection(tty)` function. The next logical step in my thought process was to determine if `paste_selection(tty)` itself acquires the `console_lock`. To do this, I would need to examine the implementation of `paste_selection`.


93/5 2026/08/11 23:45 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt.c Name:paste_selection]

Results:
map[SourceCode: 384:	/* Insert the contents of the selection buffer into the
 385:	 * queue of the tty associated with the current console.
 386:	 * Invoked by ioctl().
 387:	 *
 388:	 * Locking: called without locks. Calls the ldisc wrongly with
 389:	 * unsafe methods,
 390:	 */
 391:	int paste_selection(struct tty_struct *tty)
 392:	{
 393:		struct vc_data *vc = tty->driver_data;
 394:		int	pasted = 0;
 395:		size_t count;
 396:		struct  tty_ldisc *ld;
 397:		DECLARE_WAITQUEUE(wait, current);
 398:		int ret = 0;
 399:	
 400:		bool bp = vc->vc_bracketed_paste;
 401:		static const char bracketed_paste_start[] = "\033[200~";
 402:		static const char bracketed_paste_end[]   = "\033[201~";
 403:		const char *bps = bp ? bracketed_paste_start : NULL;
 404:		const char *bpe = bp ? bracketed_paste_end : NULL;
 405:	
 406:		scoped_guard(console_lock)
 407:			poke_blanked_console();
 408:	
 409:		ld = tty_ldisc_ref_wait(tty);
 410:		if (!ld)
 411:			return -EIO;	/* ldisc was hung up */
 412:		tty_buffer_lock_exclusive(&vc->port);
 413:	
 414:		add_wait_queue(&vc->paste_wait, &wait);
 415:		mutex_lock(&vc_sel.lock);
 416:		while (vc_sel.buffer && (vc_sel.buf_len > pasted || bpe)) {
 417:			set_current_state(TASK_INTERRUPTIBLE);
 418:			if (signal_pending(current)) {
 419:				ret = -EINTR;
 420:				break;
 421:			}
 422:			if (tty_throttled(tty)) {
 423:				mutex_unlock(&vc_sel.lock);
 424:				schedule();
 425:				mutex_lock(&vc_sel.lock);
 426:				continue;
 427:			}
 428:			__set_current_state(TASK_RUNNING);
 429:	
 430:			if (bps) {
 431:				bps += tty_ldisc_receive_buf(ld, bps, NULL, strlen(bps));
 432:				if (*bps != '\0')
 433:					continue;
 434:				bps = NULL;
 435:			}
 436:	
 437:			count = vc_sel.buf_len - pasted;
 438:			if (count) {
 439:				pasted += tty_ldisc_receive_buf(ld, vc_sel.buffer + pasted,
 440:								NULL, count);
 441:				if (vc_sel.buf_len > pasted)
 442:					continue;
 443:			}
 444:	
 445:			if (bpe) {
 446:				bpe += tty_ldisc_receive_buf(ld, bpe, NULL, strlen(bpe));
 447:				if (*bpe == '\0')
 448:					bpe = NULL;
 449:			}
 450:		}
 451:		mutex_unlock(&vc_sel.lock);
 452:		remove_wait_queue(&vc->paste_wait, &wait);
 453:		__set_current_state(TASK_RUNNING);
 454:	
 455:		tty_buffer_unlock_exclusive(&vc->port);
 456:		tty_ldisc_deref(ld);
 457:		return ret;
 458:	}
 SourceFile:drivers/tty/vt/selection.c]

94/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12444
							output: 40
							thoughts: 78
						

Thoughts:
**My Thought Process on `paste_selection` and Console Locking**

Okay, so I was looking into the `paste_selection` function, and my initial observation was that it briefly acquires the `console_lock` within the `poke_blanked_console()` function. That's not entirely surprising; console operations often need exclusive access.

However, a more critical detail emerged: `paste_selection` *doesn't* hold that `console_lock` while it proceeds to acquire `&buf->lock`. This distinction is important. My attention was immediately drawn to the function `tty_buffer_lock_exclusive`. I needed to confirm my suspicion: does `tty_buffer_lock_exclusive` indeed take `&buf->lock`? That's the key to understanding the potential locking order and any associated risks. I'm going to verify that call immediately.


95/5 2026/08/11 23:45 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/selection.c Name:tty_buffer_lock_exclusive]

Results:
map[SourceCode:  43:	/**
  44:	 * tty_buffer_lock_exclusive	-	gain exclusive access to buffer
  45:	 * @port: tty port owning the flip buffer
  46:	 *
  47:	 * Guarantees safe use of the &tty_ldisc_ops.receive_buf() method by excluding
  48:	 * the buffer work and any pending flush from using the flip buffer. Data can
  49:	 * continue to be added concurrently to the flip buffer from the driver side.
  50:	 *
  51:	 * See also tty_buffer_unlock_exclusive().
  52:	 */
  53:	void tty_buffer_lock_exclusive(struct tty_port *port)
  54:	{
  55:		struct tty_bufhead *buf = &port->buf;
  56:	
  57:		atomic_inc(&buf->priority);
  58:		mutex_lock(&buf->lock);
  59:	}
 SourceFile:drivers/tty/tty_buffer.c]

96/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12824
							output: 28
							thoughts: 205
						

Thoughts:
**My Thought Process Regarding Console Lock Acquisition**

Okay, so I've been digging into this locking behavior, and my initial observation is that `tty_buffer_lock_exclusive` correctly takes `&buf->lock`. That part is sound. The critical issue, however, lies with `paste_selection`. It seems to be acquiring `&buf->lock` *without* holding the `console_lock` beforehand. This is a problem because I need a scenario where `console_lock` is held, and *then* `&buf->lock` is acquired.

The original bug report pointed to `vc_SAK` as a potential example. It correctly acquires `console_lock` and subsequently calls `__do_SAK`, which in turn takes `&buf->lock`. This is exactly the kind of ordered lock acquisition I'm looking for. The immediate question then becomes: how can I trigger `vc_SAK` without going through the usual `/proc/sysrq-trigger` mechanism?

I started considering other ways to initiate SAK. My first thought was to check if there's an ioctl call that can directly trigger SAK. I began reviewing the various VT ioctls – things like `KDSIGACCEPT`, `KDSKBENT`, and others. `KDSIGACCEPT` immediately struck me as being for signal handling, so that's probably not the direct route to SAK.

I then moved on to other VT ioctls, specifically looking at `VT_RELDISP` and `VT_ACTIVATE`. I need to dive into `vt_ioctl.c` itself and specifically search for any mentions or implementations related to SAK to see if any of these ioctls are involved in triggering it. This is where I'm currently focused, trying to uncover a user-space trigger for SAK that doesn't rely on `sysrq`.


97/5 2026/08/11 23:45 tool grepper
0m Args:
map[Expression:SAK PathPrefix:drivers/tty/vt/]

Results:
map[Output:drivers/tty/vt/keyboard.c-14- *
drivers/tty/vt/keyboard.c:15: * 11-11-96: SAK should now work in the raw mode (Martin Mares)
drivers/tty/vt/keyboard.c-16- *
--
drivers/tty/vt/keyboard.c=82=static k_handler_fn *k_handler[16] = { K_HANDLERS };
--
drivers/tty/vt/keyboard.c-87-	fn_num,		fn_hold,	fn_scroll_forw,	fn_scroll_back,\
drivers/tty/vt/keyboard.c:88:	fn_boot_it,	fn_caps_on,	fn_compose,	fn_SAK,\
drivers/tty/vt/keyboard.c-89-	fn_dec_console, fn_inc_console, fn_spawn_con,	fn_bare_num
--
drivers/tty/vt/keyboard.c=624=static void fn_spawn_con(struct vc_data *vc)
--
drivers/tty/vt/keyboard.c-633-
drivers/tty/vt/keyboard.c:634:static void fn_SAK(struct vc_data *vc)
drivers/tty/vt/keyboard.c-635-{
drivers/tty/vt/keyboard.c:636:	struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
drivers/tty/vt/keyboard.c:637:	schedule_work(SAK_work);
drivers/tty/vt/keyboard.c-638-}
--
drivers/tty/vt/keyboard.c=648=static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
--
drivers/tty/vt/keyboard.c-656-	     kbd->kbdmode == VC_OFF) &&
drivers/tty/vt/keyboard.c:657:	     value != KVAL(K_SAK))
drivers/tty/vt/keyboard.c:658:		return;		/* SAK is allowed even in raw mode */
drivers/tty/vt/keyboard.c-659-	fn_handler[value](vc);
--
drivers/tty/vt/keyboard.c=1969=static int vt_kdskbent(unsigned char kbdmode, unsigned char idx,
--
drivers/tty/vt/keyboard.c-2025-	/* Attention Key */
drivers/tty/vt/keyboard.c:2026:	if ((oldval == K_SAK || val == K_SAK) && !capable(CAP_SYS_ADMIN))
drivers/tty/vt/keyboard.c-2027-		return -EPERM;
--
drivers/tty/vt/ucs_width_table.h_shipped=21=static const struct ucs_width16 ucs_bmp_ranges[] = {
--
drivers/tty/vt/ucs_width_table.h_shipped-159-	{ BMP_0WIDTH(0x1A55, 0x1A5E) }, /* TAI THAM CONSONANT SIGN MEDIAL RA - TAI THAM CONSONANT SIGN SA */
drivers/tty/vt/ucs_width_table.h_shipped:160:	{ BMP_0WIDTH(0x1A60, 0x1A7C) }, /* TAI THAM SIGN SAKOT - TAI THAM SIGN KHUEN-LUE KARAN */
drivers/tty/vt/ucs_width_table.h_shipped-161-	{ BMP_0WIDTH(0x1A7F, 0x1A7F) }, /* TAI THAM COMBINING CRYPTOGRAMMIC DOT */
--
drivers/tty/vt/vt.c=1082=int vc_allocate(unsigned int currcons)	/* return 0 on success */
--
drivers/tty/vt/vt.c-1108-	vc->port.ops = &vc_port_ops;
drivers/tty/vt/vt.c:1109:	INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-1110-
--
drivers/tty/vt/vt.c=3844=static int __init con_init(void)
--
drivers/tty/vt/vt.c-3884-						       GFP_NOWAIT);
drivers/tty/vt/vt.c:3885:		INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-3886-		tty_port_init(&vc->port);
--
drivers/tty/vt/vt_ioctl.c=963=void reset_vc(struct vc_data *vc)
--
drivers/tty/vt/vt_ioctl.c-977-
drivers/tty/vt/vt_ioctl.c:978:void vc_SAK(struct work_struct *work)
drivers/tty/vt/vt_ioctl.c-979-{
drivers/tty/vt/vt_ioctl.c-980-	struct vc *vc_con =
drivers/tty/vt/vt_ioctl.c:981:		container_of(work, struct vc, SAK_work);
drivers/tty/vt/vt_ioctl.c-982-	struct vc_data *vc;
--
drivers/tty/vt/vt_ioctl.c-991-	tty = vc->port.tty;
drivers/tty/vt/vt_ioctl.c:992:	/* SAK should also work in all raw modes and reset them properly. */
drivers/tty/vt/vt_ioctl.c-993-	if (tty)
drivers/tty/vt/vt_ioctl.c:994:		__do_SAK(tty);
drivers/tty/vt/vt_ioctl.c-995-	reset_vc(vc);
]

98/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14516
							output: 51
							thoughts: 240
						

Thoughts:
**My Thought Process Regarding SAK Triggering**

Okay, so my current line of thinking is focused on how to reliably trigger the `fn_SAK` function. I've observed that `fn_SAK` is indeed called from `k_spec` specifically when the key value encountered is `K_SAK`. This `K_SAK` value, I understand, is designated as a special key.

My immediate question then becomes: can I *inject* a keypress that would ultimately lead to `fn_SAK` being invoked? My initial thought drifts towards `TIOCSTI`. I know `TIOCSTI` is designed for injecting characters directly into the input queue. However, I'm concerned that this might *not* be sufficient to trigger `fn_SAK` because `fn_SAK` is typically activated by actual keyboard *events*. These events, as I understand it, originate from subsystems like `input` or are processed via mechanisms like `KDSKBENT`.

Then, a connection sparks. I recall that `KDSKBENT` *can* actually map a key to `K_SAK`. This is promising! But it still leaves me with the problem of actually *pressing* that mapped key. Simply mapping it isn't enough; I need to simulate the act of pressing it.

I start to ponder if there's a direct `ioctl` call that can simulate a keypress. My mind briefly goes to `KDSIGACCEPT`, but I quickly dismiss that as not being the correct mechanism. I then revisit `ioctl(fd, KDSKBENT, ...)`. While I can use this to establish the mapping of a key to `K_SAK`, it still doesn't solve the fundamental issue of *triggering* the press itself.

I then shift my focus, thinking about other potential console-related `ioctl` calls. I remember `TIOCLINUX` and its various sub-commands like `TIOCL_SETSEL`. This is a tangent, but it's part of exploring the broader console I/O landscape for any potential avenues.

My core problem remains: how do I get to the point of triggering `console_lock` and subsequently `&buf->lock`? I decide my next step is to investigate the callers of `__do_SAK`. Understanding where and how `__do_SAK` is legitimately invoked will hopefully reveal the underlying mechanisms I can leverage or emulate.


99/5 2026/08/11 23:45 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/tty_io.c IncludeSnippetLines:2 Name:__do_SAK SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:do_SAK_work SourceFile:drivers/tty/tty_io.c SourceLine:3063 SourceSnippet:3061:		struct tty_struct *tty =
3062:			container_of(work, struct tty_struct, SAK_work);
3063:		__do_SAK(tty);
3064:	}
] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:vc_SAK SourceFile:drivers/tty/vt/vt_ioctl.c SourceLine:994 SourceSnippet: 992:		/* SAK should also work in all raw modes and reset them properly. */
 993:		if (tty)
 994:			__do_SAK(tty);
 995:		reset_vc(vc);
 996:	}
]] TruncatedOutput:false]

100/5 2026/08/11 23:45 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15010
							output: 52
							thoughts: 32
						

Thoughts:
**My Thought Process Regarding SAK Scheduling**

Okay, so I've just observed that the `do_SAK_work` function is being invoked, and I know that it, in turn, calls `__do_SAK`. My immediate thought then pivots to the mechanism responsible for *scheduling* this `SAK_work` onto the `tty_struct`. I'm trying to trace back the origin of this execution. What component or process is it that decides *when* and *how* this specific work item, associated with the terminal structure, gets placed on the workqueue to be processed? I need to understand the lifecycle of this `SAK_work` from its inception to its execution on the `tty_struct`.


101/5 2026/08/11 23:46 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/tty_io.c IncludeSnippetLines:2 Name:do_SAK_work SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:takes-address-of ReferencingEntityKind:function ReferencingEntityName:alloc_tty_struct SourceFile:drivers/tty/tty_io.c SourceLine:3126 SourceSnippet:3124:		spin_lock_init(&tty->files_lock);
3125:		INIT_LIST_HEAD(&tty->tty_files);
3126:		INIT_WORK(&tty->SAK_work, do_SAK_work);
3127:	
3128:		tty->driver = driver;
]] TruncatedOutput:false]

102/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15215
							output: 28
							thoughts: 11
						

Thoughts:
**My Thought Process Regarding `tty->SAK_work` Scheduling**

Okay, I need to get to the bottom of this. My immediate thought, when encountering `tty->SAK_work`, is a fundamental question: **Who is the architect of its execution?** In other words, what is the trigger, the event, or the specific condition that leads to this particular work item being scheduled? This isn't just a superficial curiosity; understanding the scheduler is key to understanding the behavior and potential failure points of the system.

My mind immediately goes to the typical mechanisms for scheduling work in the kernel. I'm thinking about a few possibilities:

1.  **Explicit Scheduling within a Driver/Subsystem:** Is `tty->SAK_work` being directly `schedule_work()`'d or `schedule_delayed_work()`'d by some code *within* the TTY driver itself, or a closely related subsystem like a serial port driver or a virtual terminal handler? This would imply a direct response to a specific event that the TTY driver is monitoring – perhaps a character being received, a break signal, a modem status change, or even a user-space request that needs asynchronous processing. The context here would be crucial: is it a routine operation, or is it related to error handling or recovery?

2.  **Interrupt Context:** Could it be scheduled from an interrupt handler? This is a common pattern for deferring longer processing away from the strict real-time constraints of an interrupt. If so, what event is generating the interrupt that then leads to the scheduling? This points to hardware events or very low-level software signals.

3.  **Timer-Based Scheduling:** Is `tty->SAK_work` perhaps part of a timer mechanism? Maybe it's scheduled to run after a certain timeout, or on a periodic basis to check a state or perform a cleanup. This would suggest a time-sensitive operation or a watchdog-like function.

4.  **System Call/IOCTL Interaction:** Is it possible that `tty->SAK_work` is scheduled in response to a specific `ioctl` call or a system call that manipulates the TTY device? Certain administrative or control operations might trigger asynchronous tasks.

5.  **Underlying Device Driver:** The `tty` structure is an abstraction. My next logical step is to consider the underlying device driver that is *using* this `tty` structure. The scheduling of `tty->SAK_work` is likely dictated by the specific hardware or virtual device being managed. Is this a standard serial port? A PTY? A console? Each of these has different underlying mechanisms and event sources.

6.  **"SAK" - What does it signify?** The acronym "SAK" itself is a strong hint. In the TTY subsystem, "SAK" almost invariably stands for "Stuff After Kernel" or, more commonly, the "Secure Attention Key" sequence. If it's related to SAK, then the scheduling is almost certainly tied to the detection of this specific key sequence. This sequence is designed to interrupt whatever the user is doing and bring them to a secure login prompt, typically as a security measure or to recover from a hung system. This would imply that `tty->SAK_work` is scheduled when the SAK sequence is detected, and its purpose is to perform the necessary actions to switch to a secure console or process the SAK event.

Therefore, my primary line of inquiry is to trace the **call chain leading to `schedule_work(&tty->SAK_work)`**. I would be looking for `tty->SAK_work` within the TTY core code and then delving into the specific driver implementations that interact with it, specifically focusing on any code that handles input characters, interrupt handlers, or SAK event detection. The *intent* behind scheduling `tty->SAK_work` is likely to handle the aftermath of the SAK sequence being detected, ensuring a safe and responsive transition.


103/5 2026/08/11 23:46 tool grepper
0m Args:
map[Expression:SAK_work PathPrefix:drivers/tty/]

Results:
map[Output:drivers/tty/sysrq.c=117=static void sysrq_handle_SAK(u8 key)
drivers/tty/sysrq.c-118-{
drivers/tty/sysrq.c:119:	struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
drivers/tty/sysrq.c-120-
drivers/tty/sysrq.c:121:	schedule_work(SAK_work);
drivers/tty/sysrq.c-122-}
--
drivers/tty/tty_io.c=1489=static void tty_flush_works(struct tty_struct *tty)
drivers/tty/tty_io.c-1490-{
drivers/tty/tty_io.c:1491:	flush_work(&tty->SAK_work);
drivers/tty/tty_io.c-1492-	flush_work(&tty->hangup_work);
drivers/tty/tty_io.c-1493-	if (tty->link) {
drivers/tty/tty_io.c:1494:		flush_work(&tty->link->SAK_work);
drivers/tty/tty_io.c-1495-		flush_work(&tty->link->hangup_work);
--
drivers/tty/tty_io.c=3016=void __do_SAK(struct tty_struct *tty)
--
drivers/tty/tty_io.c-3058-
drivers/tty/tty_io.c:3059:static void do_SAK_work(struct work_struct *work)
drivers/tty/tty_io.c-3060-{
drivers/tty/tty_io.c-3061-	struct tty_struct *tty =
drivers/tty/tty_io.c:3062:		container_of(work, struct tty_struct, SAK_work);
drivers/tty/tty_io.c-3063-	__do_SAK(tty);
--
drivers/tty/tty_io.c-3066-/*
drivers/tty/tty_io.c:3067: * The tq handling here is a little racy - tty->SAK_work may already be queued.
drivers/tty/tty_io.c:3068: * Fortunately we don't need to worry, because if ->SAK_work is already queued,
drivers/tty/tty_io.c-3069- * the values which we write to it will be identical to the values which it
--
drivers/tty/tty_io.c=3072=void do_SAK(struct tty_struct *tty)
--
drivers/tty/tty_io.c-3075-		return;
drivers/tty/tty_io.c:3076:	schedule_work(&tty->SAK_work);
drivers/tty/tty_io.c-3077-}
--
drivers/tty/tty_io.c=3098=struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
--
drivers/tty/tty_io.c-3125-	INIT_LIST_HEAD(&tty->tty_files);
drivers/tty/tty_io.c:3126:	INIT_WORK(&tty->SAK_work, do_SAK_work);
drivers/tty/tty_io.c-3127-
--
drivers/tty/vt/keyboard.c=634=static void fn_SAK(struct vc_data *vc)
drivers/tty/vt/keyboard.c-635-{
drivers/tty/vt/keyboard.c:636:	struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
drivers/tty/vt/keyboard.c:637:	schedule_work(SAK_work);
drivers/tty/vt/keyboard.c-638-}
--
drivers/tty/vt/vt.c=1082=int vc_allocate(unsigned int currcons)	/* return 0 on success */
--
drivers/tty/vt/vt.c-1108-	vc->port.ops = &vc_port_ops;
drivers/tty/vt/vt.c:1109:	INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-1110-
--
drivers/tty/vt/vt.c=3844=static int __init con_init(void)
--
drivers/tty/vt/vt.c-3884-						       GFP_NOWAIT);
drivers/tty/vt/vt.c:3885:		INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
drivers/tty/vt/vt.c-3886-		tty_port_init(&vc->port);
--
drivers/tty/vt/vt_ioctl.c=978=void vc_SAK(struct work_struct *work)
--
drivers/tty/vt/vt_ioctl.c-980-	struct vc *vc_con =
drivers/tty/vt/vt_ioctl.c:981:		container_of(work, struct vc, SAK_work);
drivers/tty/vt/vt_ioctl.c-982-	struct vc_data *vc;
]

104/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16588
							output: 50
							thoughts: 25
						

Thoughts:
**My Thought Process Regarding SAK Scheduling**

Alright, so I've just encountered a piece of code, or perhaps a system state, where `do_SAK` is being called. My immediate thought is to dissect this execution flow. I need to understand *why* `do_SAK` is being invoked in the first place. My mental model immediately flags that `do_SAK`'s primary function here is to schedule a `tty->SAK_work` item. This tells me that `do_SAK` isn't the *originating* event, but rather a mechanism to queue up some subsequent asynchronous work related to the terminal (`tty`).

Therefore, my next crucial question, and the core of my current inquiry, is: **What is triggering the call to `do_SAK`?** I'm looking for the caller, the function or event that initiates this sequence. Understanding the context of the `do_SAK` invocation is paramount to grasping the overall system behavior and the implications of this scheduled `SAK_work`. Without knowing *who* is telling `do_SAK` to run, I can't fully comprehend the purpose or the potential impact of the `SAK_work` itself.


105/5 2026/08/11 23:46 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/tty_io.c IncludeSnippetLines:2 Name:do_SAK SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:uart_handle_break SourceFile:include/linux/serial_core.h SourceLine:1329 SourceSnippet:1327:	#endif
1328:		if (port->flags & UPF_SAK)
1329:			do_SAK(state->port.tty);
1330:		return 0;
1331:	}
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_do_SAK_1091 SourceFile:drivers/tty/tty_io.c SourceLine:3078 SourceSnippet:3078:	EXPORT_SYMBOL(do_SAK);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_do_SAK SourceFile:drivers/tty/tty_io.c SourceLine:3078 SourceSnippet:3078:	EXPORT_SYMBOL(do_SAK);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_do_SAK SourceFile:drivers/tty/tty_io.c SourceLine:3078 SourceSnippet:3078:	EXPORT_SYMBOL(do_SAK);
]] TruncatedOutput:false]

106/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16964
							output: 31
							thoughts: 638
						

Thoughts:
**My Thought Process Regarding the SAK Triggering Issue**

I've been digging into this SAK (System Attention Key) handling logic, and it's quite a rabbit hole. My initial understanding was that `uart_handle_break` would directly trigger `do_SAK` if `UPF_SAK` was set. However, that path leads to scheduling `tty->SAK_work`, which then calls `__do_SAK` through `do_SAK_work`. Crucially, I realized that `tty->SAK_work` doesn't acquire the `console_lock`.

The key insight came from examining the provided stack trace. It clearly shows `vc_SAK` calling `__do_SAK` while holding the `console_lock`. This is the critical difference: `vc_SAK` is the function that actually acquires the `console_lock` before proceeding. Therefore, my goal shifted to finding a way to reliably trigger `vc_SAK`.

Now, how does `vc_SAK` get invoked? I found that it's scheduled by either `fn_SAK` in `drivers/tty/vt/keyboard.c` or `sysrq_handle_SAK` in `drivers/tty/sysrq.c`. Given that `/proc/sysrq-trigger` isn't an option in this scenario, I focused on `fn_SAK`, which is triggered by keyboard input.

The next hurdle was figuring out *how* to inject keyboard input that would trigger `fn_SAK`. My first thought was `ioctl(fd, TIOCSTI, &c)`. However, I quickly dismissed this because `TIOCSTI` injects characters directly into the tty input queue, bypassing the keyboard driver entirely, and thus wouldn't trigger the desired keyboard event path.

What I *really* need is to inject a genuine keyboard event. This led me to consider `/dev/uinput`. Using `/dev/uinput`, I can create a virtual keyboard and then send the appropriate key combination. The immediate question then became: what *is* the SAK key combination?

While it's often SysRq + K, I recalled that `fn_SAK` is actually called when a key is mapped to `K_SAK` in the keymap. This opened up another avenue: could I modify the keymap? I considered using `ioctl(fd, KDSKBENT, ...)` to map a key to `K_SAK`, and *then* inject that key using `/dev/uinput`. This seemed like a viable path. I also briefly considered `ioctl(fd, KDSIGACCEPT, ...)` but quickly realized that wasn't the right tool for this job.

At this point, I'm still exploring the possibility of modifying the keymap, but I'm also thinking more broadly. Is there *any other* way to acquire the `console_lock` and then subsequently reach `&buf->lock`? I need to broaden my search and check for alternative code paths that might involve acquiring `console_lock` and then `&buf->lock`, as that might reveal a more direct or simpler triggering mechanism.


107/5 2026/08/11 23:46 tool grepper
0m Args:
map[Expression:tty_buffer_lock_exclusive PathPrefix:drivers/tty/]

Results:
map[Output:drivers/tty/tty_buffer.c-43-/**
drivers/tty/tty_buffer.c:44: * tty_buffer_lock_exclusive	-	gain exclusive access to buffer
drivers/tty/tty_buffer.c-45- * @port: tty port owning the flip buffer
--
drivers/tty/tty_buffer.c-52- */
drivers/tty/tty_buffer.c:53:void tty_buffer_lock_exclusive(struct tty_port *port)
drivers/tty/tty_buffer.c-54-{
--
drivers/tty/tty_buffer.c-59-}
drivers/tty/tty_buffer.c:60:EXPORT_SYMBOL_GPL(tty_buffer_lock_exclusive);
drivers/tty/tty_buffer.c-61-
drivers/tty/tty_buffer.c=62=static bool tty_buffer_queue_work(struct tty_bufhead *buf)
--
drivers/tty/tty_buffer.c-74- *
drivers/tty/tty_buffer.c:75: * See also tty_buffer_lock_exclusive().
drivers/tty/tty_buffer.c-76- */
--
drivers/tty/tty_io.c=2272=static int tiocsti(struct tty_struct *tty, u8 __user *p)
--
drivers/tty/tty_io.c-2287-		return -EIO;
drivers/tty/tty_io.c:2288:	tty_buffer_lock_exclusive(tty->port);
drivers/tty/tty_io.c-2289-	if (ld->ops->receive_buf)
--
drivers/tty/vt/selection.c=391=int paste_selection(struct tty_struct *tty)
--
drivers/tty/vt/selection.c-411-		return -EIO;	/* ldisc was hung up */
drivers/tty/vt/selection.c:412:	tty_buffer_lock_exclusive(&vc->port);
drivers/tty/vt/selection.c-413-
]

108/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18137
							output: 51
							thoughts: 193
						

Thoughts:
**My Thought Process Regarding `tiocsti` and Lock Ordering**

Alright, let's trace this out. I'm looking at `tiocsti`, and I see it calls `tty_buffer_lock_exclusive(tty->port)`. I know that internally, `tty_buffer_lock_exclusive` acquires the lock associated with the `tty`'s buffer, which is `&buf->lock` (where `buf` is the `tty_buffer`). So, my immediate thought is: does `tiocsti` *also* acquire the `console_lock`? My initial check indicates no, it doesn't seem to directly take or hold `console_lock`.

Then, my mind jumps to `paste_selection`. I recall seeing that `paste_selection` *does* involve `console_lock`. Let's look closer at its code:

```c
	scoped_guard(console_lock) // Acquires console_lock here
		poke_blanked_console();

	ld = tty_ldisc_ref_wait(tty);
	if (!ld)
		return -EIO;	/* ldisc was hung up */
	tty_buffer_lock_exclusive(&vc->port); // And then acquires &buf->lock here
```

Now, I'm analyzing the lock acquisition in `paste_selection`. It first acquires `console_lock`, performs some operations (`poke_blanked_console`), and *then* releases `console_lock` when the `scoped_guard` goes out of scope. *After* that, it proceeds to acquire the exclusive buffer lock (`&buf->lock`) via `tty_buffer_lock_exclusive`. The critical observation here is that `console_lock` and `&buf->lock` are *not held concurrently* within `paste_selection`. One is released before the other is acquired. This means that `paste_selection` itself does *not* establish a lock dependency where `console_lock` must always be held before `&buf->lock` is acquired.

This leads me to my next point of inquiry: what about `tty_buffer_flush`? I need to consider if this function introduces any different lock ordering scenarios that might be relevant to my overall analysis of `tiocsti`.


109/5 2026/08/11 23:46 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/tty_buffer.c IncludeSnippetLines:2 Name:tty_buffer_flush SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:pty_flush_buffer SourceFile:drivers/tty/pty.c SourceLine:211 SourceSnippet: 209:			return;
 210:	
 211:		tty_buffer_flush(to, NULL);
 212:		if (to->ctrl.packet) {
 213:			guard(spinlock_irq)(&tty->ctrl.lock);
] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:tty_ioctl SourceFile:drivers/tty/tty_io.c SourceLine:2775 SourceSnippet:2773:			case TCIOFLUSH:
2774:			/* flush tty buffer and allow ldisc to process ioctl */
2775:				tty_buffer_flush(tty, NULL);
2776:				break;
2777:			}
] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:tty_ldisc_flush SourceFile:drivers/tty/tty_ldisc.c SourceLine:388 SourceSnippet: 386:		struct tty_ldisc *ld = tty_ldisc_ref(tty);
 387:	
 388:		tty_buffer_flush(tty, ld);
 389:		if (ld)
 390:			tty_ldisc_deref(ld);
]] TruncatedOutput:false]

110/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18698
							output: 39
							thoughts: 369
						

Thoughts:
**My Thought Process Regarding Potential TTY Locking Issues and SysRq Triggering**

My initial line of inquiry focused on the `tty_buffer_flush` function. I established that it's invoked by `tty_ioctl` when the `TCFLSH` (specifically `TCIOFLUSH`) ioctl is used. A critical question then arose: does `tty_ioctl` itself hold the `console_lock`? My understanding is that it does not.

This led me to broaden my search. I needed to determine if there were any *other* execution paths that could concurrently hold the `console_lock` and then subsequently call `tty_buffer_flush`, or related functions like `tty_ldisc_flush` or `tty_buffer_lock_exclusive`. I specifically looked for instances where `console_lock` and `tty_buffer_flush` were mentioned together in the codebase.

However, a thought occurred to me: perhaps there's a simpler way to achieve a similar outcome. I considered using the `ioctl(fd, TIOCLINUX, ...)` command with the `TIOCL_UNBLANKSCREEN` argument. I know that `TIOCL_UNBLANKSCREEN` *does* acquire the `console_lock`. The important distinction here is that it does *not* acquire `&buf->lock`, which was a potential point of contention in other paths.

Then, my attention shifted to the `vc_SAK` function. I recalled that the dependency chain `console_lock` -> `&buf->lock` is explicitly recorded by `vc_SAK`. This sparked a question: if the `/proc/sysrq-trigger` interface isn't available (which might be the case in a restricted environment), how could I possibly trigger `vc_SAK`?

My next idea was to simulate a keyboard input. I reasoned that injecting a keypress might be a viable alternative. The question then became: how could I programmatically inject a keypress? This led me to `/dev/uinput`. I know that `/dev/uinput` is commonly used to create virtual input devices, effectively simulating keyboard and mouse events. I also recalled that syzkaller, a tool I'm familiar with, frequently utilizes `/dev/uinput`.

So, my plan crystallized: I would write a small C program designed to use `/dev/uinput`. This program would create a virtual keyboard and then send the specific key combination for SysRq + K. I double-checked the key codes, confirming that SysRq + K translates to `KEY_SYSRQ` and `KEY_K`.

Finally, I would verify if sending `KEY_SYSRQ` + `KEY_K` via this method indeed triggers the System Request `SAK` behavior. I'd refer to the `drivers/tty/sysrq.c` file for confirmation of this mechanism. The core idea is to find a reliable, if indirect, way to exercise the critical paths and locks involving the TTY subsystem, particularly when direct SysRq triggers might be unavailable.


111/5 2026/08/11 23:46 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/tty/sysrq.c Name:sysrq_handle_SAK]

Results:
map[SourceCode: SourceFile:]

112/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19111
							output: 31
							thoughts: 30
						

Thoughts:
**My Thought Process:**

Okay, so I'm trying to get a handle on this `sysrq_handle_SAK` function. My first instinct, based on the context I'm working with, is that it's likely related to system requests and terminal drivers. A quick mental check—or rather, a quick scan of my internal knowledge base, which is what I'm simulating here—points me to the `drivers/tty/sysrq.c` file. That seems like the most logical place for a function named `sysrq_handle_SAK` to reside, given its name and presumed functionality within the kernel's sysrq subsystem, which fundamentally interacts with terminal devices. So, my immediate next step is to locate this specific function within that particular source file.


113/5 2026/08/11 23:46 tool grepper
0m Args:
map[Expression:sysrq_handle_SAK PathPrefix:drivers/tty/]

Results:
map[Output:drivers/tty/sysrq.c=109=static const struct sysrq_key_op sysrq_loglevel_op = {
--
drivers/tty/sysrq.c-116-#ifdef CONFIG_VT
drivers/tty/sysrq.c:117:static void sysrq_handle_SAK(u8 key)
drivers/tty/sysrq.c-118-{
--
drivers/tty/sysrq.c=123=static const struct sysrq_key_op sysrq_SAK_op = {
drivers/tty/sysrq.c:124:	.handler	= sysrq_handle_SAK,
drivers/tty/sysrq.c-125-	.help_msg	= "sak(k)",
]

114/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19348
							output: 16
							thoughts: 561
						

Thoughts:
**My Thought Process on Triggering `vc_SAK` via SysRq**

My initial thought is that if `sysrq_handle_SAK` is indeed mapped to the 'k' key, then sending SysRq + 'k' through `/dev/uinput` should be the way to trigger it. I'm already envisioning the sequence: first send an `EV_KEY` event for `KEY_SYSRQ` with a value of 1 (press), followed by an `EV_KEY` event for `KEY_K` with a value of 1.

However, I quickly pause to re-evaluate. The bug report I'm referencing doesn't explicitly state that `sysrq_handle_SAK` was called. Instead, it points to `vc_SAK` being the function that was executed. This is a crucial distinction. I know that `vc_SAK` is the *handler* that gets scheduled, likely by `sysrq_handle_SAK` or another SysRq handler like `fn_SAK`.

Looking at the call trace provided in the bug report further solidifies this:

```
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
```

This clearly shows that `vc_SAK` was the function that ran. The question then becomes: how did syzkaller manage to trigger this `vc_SAK`?

I start considering syzkaller's capabilities for interacting with the kernel. It can definitely use `/dev/uinput` for injecting key events, but I also recall it has other mechanisms like `ioctl` calls on TTY devices. Specifically, I'm thinking about `ioctl(fd, KDSKBENT, ...)` and `ioctl(fd, TIOCLINUX, ...)`.

My attention is drawn to `KDSKBENT`. The structure involved, `struct kbentry`, has fields like `kb_table`, `kb_index`, and `kb_value`. This suggests that it's possible to *map* a specific key to an action. If I could map a key to `K_SAK` (the internal symbol for the "Secure Attention Key" functionality), and then somehow simulate a keypress for that mapped key, that would be a viable path.

But how do I simulate a keypress itself? `ioctl(fd, TIOCSTI, &c)` comes to mind, but I immediately dismiss it because it injects a *character*, not a raw keycode event. That's not what I need here; I need to simulate the physical act of pressing a key. `ioctl(fd, VT_RELDISP, 1)` is also a possibility, but it relates to display release, not direct key injection.

I circle back to my initial thought about `/dev/uinput`. Yes, syzkaller *does* use `/dev/uinput` for injecting keycodes. This seems to be the most direct and reliable method for simulating the precise keypresses needed. Therefore, my plan solidifies: I need to craft a `/dev/uinput` snippet that will inject `KEY_SYSRQ` and `KEY_K` to trigger the SysRq functionality that ultimately leads to `vc_SAK` being executed.


115/5 2026/08/11 23:46 tool get-toolkit
0m Args:
map[Name:race]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

116/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21591
							output: 52
							thoughts: 55
						

Thoughts:
**A Moment of Clarification in my TTY Driver Debugging**

Alright, so I was deep in the weeds, wrestling with this TTY driver issue, and I had this initial thought, this instinct, that I needed the "race toolkit." You know, the standard suite of tools you might reach for when dealing with concurrency or timing-related problems in drivers. It's a go-to, a reliable first step.

But then, a little voice in my head, or perhaps just a well-honed intuition honed by years of this stuff, whispered a correction. "Hold on a second," I thought. "Do I *really* need the whole race toolkit for this specific problem?" I started to dissect the core of what I was trying to achieve. What was the *actual* action I needed to perform? It wasn't about preempting or synchronizing in a broad sense. It was about triggering a very specific piece of functionality: `vc_SAK`.

This realization shifted my focus dramatically. If my goal is simply to initiate `vc_SAK`, then the overhead and complexity of the full race toolkit might be overkill, or worse, might obscure the direct solution. My thought process then naturally led to a more targeted inquiry: "Is there a more direct way to achieve this? Is there an `ioctl` that *directly* triggers `vc_SAK`?" This felt like a much more elegant and efficient path.

To validate this hypothesis, my next logical step, the one I'm about to embark on, is to dive into the code. Specifically, I need to examine `drivers/tty/vt/vt_ioctl.c`. This is where the TTY ioctl handlers are defined, and I'm confident that if a direct ioctl for `vc_SAK` exists, it will be documented and implemented within this file. This targeted investigation should either confirm my suspicion or guide me to the correct, more direct approach, bypassing the need for the broader race toolkit.


117/5 2026/08/11 23:46 tool codesearch-find-references
0m Args:
map[ContextFile:drivers/tty/vt/vt_ioctl.c IncludeSnippetLines:2 Name:vc_SAK SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:takes-address-of ReferencingEntityKind:function ReferencingEntityName:con_init SourceFile:drivers/tty/vt/vt.c SourceLine:3885 SourceSnippet:3883:			vc_cons[currcons].d = vc = kzalloc_obj(struct vc_data,
3884:							       GFP_NOWAIT);
3885:			INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
3886:			tty_port_init(&vc->port);
3887:			visual_init(vc, currcons, true);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:function ReferencingEntityName:vc_allocate SourceFile:drivers/tty/vt/vt.c SourceLine:1109 SourceSnippet:1107:		tty_port_init(&vc->port);
1108:		vc->port.ops = &vc_port_ops;
1109:		INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
1110:	
1111:		visual_init(vc, currcons, true);
]] TruncatedOutput:false]

118/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21967
							output: 34
							thoughts: 257
						

Thoughts:
**My Thought Process on Triggering SAK**

Right, so my initial thought is that the SAK (Secure Attention Key) functionality, based on these notes, seems to be initialized only during `con_init` and `vc_allocate`. It's also scheduled for execution by both `fn_SAK` and `sysrq_handle_SAK`. This makes me wonder, how exactly can I get `fn_SAK` to trigger?

Digging a bit deeper, I see that `fn_SAK` is invoked by `k_spec` when a specific condition is met: `value == KVAL(K_SAK)`. And `k_spec` itself is called by `kbd_keycode` whenever a special key is pressed. This gives me a potential path forward.

My current hypothesis is that I can leverage the `ioctl(fd, KDSKBENT, ...)` system call to achieve this. The idea is to map a particular keycode to the `K_SAK` keysym. Once that mapping is established, I can then inject that specific key event using `/dev/uinput`.

However, I need to pause and re-evaluate this. `KDSKBENT` is used to map a keycode to a keysym. Let me double-check the structure of `KDSKBENT` to ensure I'm on the right track. Ah, yes, the `struct kbentry` has `kb_table` for the shift state, `kb_index` for the actual keycode, and `kb_value` for the keysym. So, indeed, I'll be targeting the `kb_value` field with `K_SAK`. And for reference, `K_SAK` is clearly defined in `include/uapi/linux/keyboard.h`, which is good to know for the exact value. The overall strategy seems sound: configure a key to represent `K_SAK` and then simulate pressing that key.


119/5 2026/08/11 23:46 tool grepper
0m Args:
map[Expression:K_SAK PathPrefix:include/uapi/linux/keyboard.h]

Results:
map[Output:include/uapi/linux/keyboard.h-322-#define K_COMPOSE	K(KT_SPEC,14)
include/uapi/linux/keyboard.h:323:#define K_SAK		K(KT_SPEC,15)
include/uapi/linux/keyboard.h-324-#define K_DECRCONSOLE	K(KT_SPEC,16)
]

120/5 2026/08/11 23:46 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22348
							output: 27
							thoughts: 1864
						

Thoughts:
**My Thought Process on Triggering a Specific Console Lock Dependency**

My primary objective is to trigger a specific lock dependency: `console_lock` -> `&buf->lock`. I'm analyzing the kernel code to find a path that acquires `console_lock` and subsequently acquires `&buf->lock` while `console_lock` is still held.

Initially, I'm considering ways to simulate a user input that might lead to this. I recall that `K_SAK` (which is defined as `K(KT_SPEC, 15)`, with `KT_SPEC` being `2`, resulting in `0x020F`) is related to the Secure Attention Key mechanism. I know that `KEY_A` (keycode 30) can be mapped to `K_SAK` using `KDSKBENT`.

My first thought is to inject this event. I consider `ioctl(fd, TIOCSTI, ...)`, but quickly realize this only injects characters, not keycodes, so it won't work for simulating a key press.

The more appropriate mechanism for injecting keycodes is through `/dev/uinput`. I decide to write a small C program to create a virtual keyboard using `/dev/uinput` and send the `KEY_A` event mapped to `K_SAK`. This involves setting up the `uinput` device, configuring it for the `KEY_A` event, and then writing the `input_event` structure to simulate a key press and release. I've outlined the necessary steps and the structure of the C code for this approach.

However, as I delve deeper into the kernel's locking behavior, I question if there's a more direct way. I examine the `paste_selection` function, which uses `console_lock`. I note that `paste_selection` releases `console_lock` *before* acquiring `&buf->lock`. This means it *doesn't* establish the `console_lock` -> `&buf->lock` dependency I'm looking for, as lockdep only tracks dependencies when locks are held concurrently.

This leads me back to the `vc_SAK` function. I observe that `vc_SAK` *does* hold `console_lock` before calling `__do_SAK(tty)`. Crucially, `__do_SAK` then calls `tty_buffer_flush(tty, ld)`, which, in turn, acquires `&buf->lock`. This path, `vc_SAK` -> `__do_SAK` -> `tty_buffer_flush`, is the one that establishes the `console_lock` -> `&buf->lock` dependency.

Now, I need to figure out how to trigger `vc_SAK`. I look at its callers: `do_SAK_work` and `sysrq_handle_SAK`. `do_SAK_work` doesn't hold `console_lock`, so that's not the path. My focus shifts to `sysrq_handle_SAK`.

I attempt to trigger `sysrq_handle_SAK` by writing to `/proc/sysrq-trigger`. However, I encounter an error: "failed to open `/proc/sysrq-trigger` (No such file or directory)". This indicates that either `CONFIG_MAGIC_SYSRQ` is disabled, `/proc` is not mounted, or the sandbox environment is preventing access. If `CONFIG_MAGIC_SYSRQ` is disabled, `sysrq_handle_SAK` simply isn't compiled, rendering this path unusable.

Since the `sysrq` route is blocked, I re-evaluate the `vc_SAK` path. I confirm that `fn_SAK` in `drivers/tty/vt/keyboard.c` is compiled if `CONFIG_VT` is enabled, making it a viable alternative. This brings me back to my initial strategy: simulating a key press that `fn_SAK` would handle.

I then perform a broader search within the kernel code for functions that might hold `console_lock` and then acquire `&buf->lock` (or similar buffer locking mechanisms). I look for patterns involving `tty_buffer_lock_exclusive`, `tty_buffer_flush`, or `mutex_lock(&buf->lock)` called within functions that are already holding `console_lock`.

During this review, I consider other `ioctl` commands for the TTY device:
*   `ioctl(fd, TIOCLINUX, ...)`: I check its sub-commands like `TIOCL_PASTESEL`, `TIOCL_SETSEL`, but they don't seem to directly trigger the desired lock order.
*   `ioctl(fd, KDSIGACCEPT, ...)`: This is for signal handling, not keyboard events.
*   `ioctl(fd, VT_RELDISP, ...)`: This relates to display management.
*   `ioctl(fd, KDADDIO, ...)`: This is for adding I/O ports, not event injection.

The `ioctl(fd, TIOCSTI, &c)` function is again considered, but I reiterate that it injects characters directly into the TTY's input buffer, bypassing the keyboard driver and thus not triggering `fn_SAK`.

Ultimately, I conclude that the most reliable method, given the constraints and the analysis of the kernel code, is to use `/dev/uinput` to inject the `KEY_A` event, which should then be processed by the keyboard driver and ultimately lead to `fn_SAK` being called. I also verify that `KDSKBENT` likely requires `CAP_SYS_TTY_CONFIG`, which should be available in the syzkaller sandbox environment running as root. I confirm the structure of `struct kbentry` and the meaning of its fields (`kb_table`, `kb_index`, `kb_value`) to ensure the correct values are used.


121/5 2026/08/11 23:47 tool grepper
0m Args:
map[Expression:console_lock PathPrefix:drivers/tty/]

Results:
map[Output:drivers/tty/hvc/hvc_console.c=977=void hvc_remove(struct hvc_struct *hp)
--
drivers/tty/hvc/hvc_console.c-983-
drivers/tty/hvc/hvc_console.c:984:	console_lock();
drivers/tty/hvc/hvc_console.c-985-	spin_lock_irqsave(&hp->lock, flags);
--
drivers/tty/serial/8250/8250_port.c=3288=static void serial8250_console_fifo_write(struct uart_8250_port *up,
--
drivers/tty/serial/8250/8250_port.c-3324- *
drivers/tty/serial/8250/8250_port.c:3325: *	The console_lock must be held when we get here.
drivers/tty/serial/8250/8250_port.c-3326- *
--
drivers/tty/serial/kgdboc.c=193=static int configure_kgdboc(void)
--
drivers/tty/serial/kgdboc.c-223-	/*
drivers/tty/serial/kgdboc.c:224:	 * Take console_lock to serialize device() callback with
drivers/tty/serial/kgdboc.c-225-	 * other console operations. For example, fg_console is
drivers/tty/serial/kgdboc.c:226:	 * modified under console_lock when switching vt.
drivers/tty/serial/kgdboc.c-227-	 */
drivers/tty/serial/kgdboc.c:228:	console_lock();
drivers/tty/serial/kgdboc.c-229-
--
drivers/tty/serial/ma35d1_serial.c=539=static void ma35d1serial_console_putchar(struct uart_port *port, unsigned char ch)
--
drivers/tty/serial/ma35d1_serial.c-550- *
drivers/tty/serial/ma35d1_serial.c:551: *  The console_lock must be held when we get here.
drivers/tty/serial/ma35d1_serial.c-552- */
--
drivers/tty/serial/pch_uart.c=1538=static void pch_console_putchar(struct uart_port *port, unsigned char ch)
--
drivers/tty/serial/pch_uart.c-1550- *
drivers/tty/serial/pch_uart.c:1551: *	The console_lock must be held when we get here.
drivers/tty/serial/pch_uart.c-1552- */
--
drivers/tty/serial/pxa.c=584=static void serial_pxa_console_putchar(struct uart_port *port, unsigned char ch)
--
drivers/tty/serial/pxa.c-595- *
drivers/tty/serial/pxa.c:596: *	The console_lock must be held when we get here.
drivers/tty/serial/pxa.c-597- */
--
drivers/tty/serial/sb1250-duart.c=770=static void __init sbd_probe_duarts(void)
--
drivers/tty/serial/sb1250-duart.c-820- * Serial console stuff.  Very basic, polling driver for doing serial
drivers/tty/serial/sb1250-duart.c:821: * console output.  The console_lock is held by the caller, so we
drivers/tty/serial/sb1250-duart.c-822- * shouldn't be interrupted for more console activity.
--
drivers/tty/serial/serial_core.c=2505=uart_configure_port(struct uart_driver *drv, struct uart_state *state,
--
drivers/tty/serial/serial_core.c-2529-		if (uart_console(port))
drivers/tty/serial/serial_core.c:2530:			console_lock();
drivers/tty/serial/serial_core.c-2531-		port->ops->config_port(port, flags);
--
drivers/tty/serial/serial_core.c-2540-		if (uart_console(port))
drivers/tty/serial/serial_core.c:2541:			console_lock();
drivers/tty/serial/serial_core.c-2542-
--
drivers/tty/serial/serial_txx9.c=833=static void serial_txx9_console_putchar(struct uart_port *up, unsigned char ch)
--
drivers/tty/serial/serial_txx9.c-842- *
drivers/tty/serial/serial_txx9.c:843: *	The console_lock must be held when we get here.
drivers/tty/serial/serial_txx9.c-844- */
--
drivers/tty/tty_io.c=3556=static ssize_t show_cons_active(struct device *dev,
--
drivers/tty/tty_io.c-3584-	/*
drivers/tty/tty_io.c:3585:	 * Take console_lock to serialize device() callback with
drivers/tty/tty_io.c-3586-	 * other console operations. For example, fg_console is
drivers/tty/tty_io.c:3587:	 * modified under console_lock when switching vt.
drivers/tty/tty_io.c-3588-	 */
drivers/tty/tty_io.c:3589:	console_lock();
drivers/tty/tty_io.c-3590-	while (i--) {
--
drivers/tty/vt/consolemap.c-14- * In order to prevent the following circular lock dependency:
drivers/tty/vt/consolemap.c:15: *   &mm->mmap_lock --> cpu_hotplug.lock --> console_lock --> &mm->mmap_lock
drivers/tty/vt/consolemap.c-16- *
drivers/tty/vt/consolemap.c:17: * We cannot allow page fault to happen while holding the console_lock.
drivers/tty/vt/consolemap.c-18- * Therefore, all the userspace copy operations have to be done outside
drivers/tty/vt/consolemap.c:19: * the console_lock critical sections.
drivers/tty/vt/consolemap.c-20- *
--
drivers/tty/vt/consolemap.c=352=int con_set_trans_old(unsigned char __user * arg)
--
drivers/tty/vt/consolemap.c-363-
drivers/tty/vt/consolemap.c:364:	guard(console_lock)();
drivers/tty/vt/consolemap.c-365-	memcpy(translations[USER_MAP], inbuf, sizeof(inbuf));
--
drivers/tty/vt/consolemap.c=371=int con_get_trans_old(unsigned char __user * arg)
--
drivers/tty/vt/consolemap.c-376-
drivers/tty/vt/consolemap.c:377:	scoped_guard(console_lock)
drivers/tty/vt/consolemap.c-378-		for (i = 0; i < ARRAY_SIZE(outbuf); i++) {
--
drivers/tty/vt/consolemap.c=386=int con_set_trans_new(ushort __user * arg)
--
drivers/tty/vt/consolemap.c-392-
drivers/tty/vt/consolemap.c:393:	guard(console_lock)();
drivers/tty/vt/consolemap.c-394-	memcpy(translations[USER_MAP], inbuf, sizeof(inbuf));
--
drivers/tty/vt/consolemap.c=400=int con_get_trans_new(ushort __user * arg)
--
drivers/tty/vt/consolemap.c-403-
drivers/tty/vt/consolemap.c:404:	scoped_guard(console_lock)
drivers/tty/vt/consolemap.c-405-		memcpy(outbuf, translations[USER_MAP], sizeof(outbuf));
--
drivers/tty/vt/consolemap.c=569=int con_clear_unimap(struct vc_data *vc)
drivers/tty/vt/consolemap.c-570-{
drivers/tty/vt/consolemap.c:571:	guard(console_lock)();
drivers/tty/vt/consolemap.c-572-	return con_do_clear_unimap(vc);
--
drivers/tty/vt/consolemap.c=632=int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
--
drivers/tty/vt/consolemap.c-644-
drivers/tty/vt/consolemap.c:645:	guard(console_lock)();
drivers/tty/vt/consolemap.c-646-
--
drivers/tty/vt/consolemap.c=772=int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct,
--
drivers/tty/vt/consolemap.c-782-
drivers/tty/vt/consolemap.c:783:	scoped_guard(console_lock) {
drivers/tty/vt/consolemap.c-784-		ect = 0;
--
drivers/tty/vt/selection.c=123=int sel_loadlut(u32 __user *lut)
--
drivers/tty/vt/selection.c-129-
drivers/tty/vt/selection.c:130:	guard(console_lock)();
drivers/tty/vt/selection.c-131-	memcpy(inwordLut, tmplut, sizeof(inwordLut));
--
drivers/tty/vt/selection.c=143=static int store_utf8(u32 c, char *p)
--
drivers/tty/vt/selection.c-182- *
drivers/tty/vt/selection.c:183: * Locking: The entire selection process is managed under the console_lock.
drivers/tty/vt/selection.c-184- * It's a lot under the lock but its hardly a performance path.
--
drivers/tty/vt/selection.c=376=int set_selection_kernel(struct tiocl_selection *v, struct tty_struct *tty)
--
drivers/tty/vt/selection.c-378-	guard(mutex)(&vc_sel.lock);
drivers/tty/vt/selection.c:379:	guard(console_lock)();
drivers/tty/vt/selection.c-380-	return vc_selection(vc_cons[fg_console].d, v, tty);
--
drivers/tty/vt/selection.c=391=int paste_selection(struct tty_struct *tty)
--
drivers/tty/vt/selection.c-405-
drivers/tty/vt/selection.c:406:	scoped_guard(console_lock)
drivers/tty/vt/selection.c-407-		poke_blanked_console();
--
drivers/tty/vt/vc_screen.c=127=vcs_poll_data_get(struct file *file)
--
drivers/tty/vt/vc_screen.c-181- *
drivers/tty/vt/vc_screen.c:182: * Must be called with console_lock.
drivers/tty/vt/vc_screen.c-183- */
drivers/tty/vt/vc_screen.c=184=static struct vc_data *vcs_vc(struct inode *inode, bool *viewed)
--
drivers/tty/vt/vc_screen.c-207- *
drivers/tty/vt/vc_screen.c:208: * Must be called with console_lock.
drivers/tty/vt/vc_screen.c-209- */
--
drivers/tty/vt/vc_screen.c=229=static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
--
drivers/tty/vt/vc_screen.c-234-
drivers/tty/vt/vc_screen.c:235:	scoped_guard(console_lock) {
drivers/tty/vt/vc_screen.c-236-		vc = vcs_vc(inode, NULL);
--
drivers/tty/vt/vc_screen.c=364=vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
--
drivers/tty/vt/vc_screen.c-382-	 */
drivers/tty/vt/vc_screen.c:383:	guard(console_lock)();
drivers/tty/vt/vc_screen.c-384-
--
drivers/tty/vt/vc_screen.c-453-		ret = copy_to_user(buf, con_buf + skip, this_round);
drivers/tty/vt/vc_screen.c:454:		console_lock();
drivers/tty/vt/vc_screen.c-455-
--
drivers/tty/vt/vc_screen.c=585=vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
--
drivers/tty/vt/vc_screen.c-607-	 */
drivers/tty/vt/vc_screen.c:608:	guard(console_lock)();
drivers/tty/vt/vc_screen.c-609-
--
drivers/tty/vt/vc_screen.c-633-		ret = copy_from_user(con_buf, buf, this_round);
drivers/tty/vt/vc_screen.c:634:		console_lock();
drivers/tty/vt/vc_screen.c-635-
--
drivers/tty/vt/vc_screen.c=736=vcs_open(struct inode *inode, struct file *filp)
--
drivers/tty/vt/vc_screen.c-745-
drivers/tty/vt/vc_screen.c:746:	guard(console_lock)();
drivers/tty/vt/vc_screen.c-747-
--
drivers/tty/vt/vt.c-62- *
drivers/tty/vt/vt.c:63: * Removed console_lock, enabled interrupts across all console operations
drivers/tty/vt/vt.c-64- * 13 March 2001, Andrew Morton
--
drivers/tty/vt/vt.c=1346=static int vt_resize(struct tty_struct *tty, struct winsize *ws)
--
drivers/tty/vt/vt.c-1349-
drivers/tty/vt/vt.c:1350:	guard(console_lock)();
drivers/tty/vt/vt.c-1351-	return vc_do_resize(tty, vc, ws->ws_col, ws->ws_row, false);
--
drivers/tty/vt/vt.c=1715=enum {
--
drivers/tty/vt/vt.c-1748-
drivers/tty/vt/vt.c:1749:/* console_lock is held */
drivers/tty/vt/vt.c-1750-static void csi_m(struct vc_data *vc)
--
drivers/tty/vt/vt.c=1905=static int get_bracketed_paste(struct tty_struct *tty)
--
drivers/tty/vt/vt.c-1911-
drivers/tty/vt/vt.c:1912:/* console_lock is held */
drivers/tty/vt/vt.c-1913-static void enter_alt_screen(struct vc_data *vc)
--
drivers/tty/vt/vt.c-1930-
drivers/tty/vt/vt.c:1931:/* console_lock is held */
drivers/tty/vt/vt.c-1932-static void leave_alt_screen(struct vc_data *vc)
--
drivers/tty/vt/vt.c=1973=enum {
--
drivers/tty/vt/vt.c-1986-
drivers/tty/vt/vt.c:1987:/* console_lock is held */
drivers/tty/vt/vt.c-1988-static void csi_DEC_hl(struct vc_data *vc, bool on_off)
--
drivers/tty/vt/vt.c=2049=enum {
--
drivers/tty/vt/vt.c-2054-
drivers/tty/vt/vt.c:2055:/* console_lock is held */
drivers/tty/vt/vt.c-2056-static void csi_hl(struct vc_data *vc, bool on_off)
--
drivers/tty/vt/vt.c=2077=enum CSI_right_square_bracket {
--
drivers/tty/vt/vt.c-2095- *
drivers/tty/vt/vt.c:2096: * console_lock is held
drivers/tty/vt/vt.c-2097- */
drivers/tty/vt/vt.c=2098=static void csi_RSB(struct vc_data *vc)
--
drivers/tty/vt/vt.c-2161-
drivers/tty/vt/vt.c:2162:/* console_lock is held */
drivers/tty/vt/vt.c-2163-static void csi_at(struct vc_data *vc, unsigned int nr)
--
drivers/tty/vt/vt.c-2168-
drivers/tty/vt/vt.c:2169:/* console_lock is held */
drivers/tty/vt/vt.c-2170-static void csi_L(struct vc_data *vc)
--
drivers/tty/vt/vt.c-2177-
drivers/tty/vt/vt.c:2178:/* console_lock is held */
drivers/tty/vt/vt.c-2179-static void csi_P(struct vc_data *vc)
--
drivers/tty/vt/vt.c-2185-
drivers/tty/vt/vt.c:2186:/* console_lock is held */
drivers/tty/vt/vt.c-2187-static void csi_M(struct vc_data *vc)
--
drivers/tty/vt/vt.c-2194-
drivers/tty/vt/vt.c:2195:/* console_lock is held (except via vc_init->reset_terminal */
drivers/tty/vt/vt.c-2196-static void save_cur(struct vc_data *vc)
--
drivers/tty/vt/vt.c-2200-
drivers/tty/vt/vt.c:2201:/* console_lock is held */
drivers/tty/vt/vt.c-2202-static void restore_cur(struct vc_data *vc)
--
drivers/tty/vt/vt.c=2236=enum vc_ctl_state {
--
drivers/tty/vt/vt.c-2257-
drivers/tty/vt/vt.c:2258:/* console_lock is held (except via vc_init()) */
drivers/tty/vt/vt.c-2259-static void reset_terminal(struct vc_data *vc, int do_clear)
--
drivers/tty/vt/vt.c=2682=static void vc_reset_params(struct vc_data *vc)
--
drivers/tty/vt/vt.c-2687-
drivers/tty/vt/vt.c:2688:/* console_lock is held */
drivers/tty/vt/vt.c-2689-static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, u8 c)
--
drivers/tty/vt/vt.c=3192=static int vc_con_write_normal(struct vc_data *vc, int tc, int c,
--
drivers/tty/vt/vt.c-3274-
drivers/tty/vt/vt.c:3275:/* acquires console_lock */
drivers/tty/vt/vt.c-3276-static int do_con_write(struct tty_struct *tty, const u8 *buf, int count)
--
drivers/tty/vt/vt.c-3289-
drivers/tty/vt/vt.c:3290:	guard(console_lock)();
drivers/tty/vt/vt.c-3291-	currcons = vc->vc_num;
--
drivers/tty/vt/vt.c-3347- * with other console code and prevention of re-entrancy is
drivers/tty/vt/vt.c:3348: * ensured with console_lock.
drivers/tty/vt/vt.c-3349- */
drivers/tty/vt/vt.c=3350=static void console_callback(struct work_struct *ignored)
drivers/tty/vt/vt.c-3351-{
drivers/tty/vt/vt.c:3352:	guard(console_lock)();
drivers/tty/vt/vt.c-3353-
--
drivers/tty/vt/vt.c=3535=static struct console vt_console_driver = {
--
drivers/tty/vt/vt.c-3550-/*
drivers/tty/vt/vt.c:3551: * Generally a bit racy with respect to console_lock();.
drivers/tty/vt/vt.c-3552- *
--
drivers/tty/vt/vt.c=3561=int tioclinux(struct tty_struct *tty, unsigned long arg)
--
drivers/tty/vt/vt.c-3583-	case TIOCL_UNBLANKSCREEN:
drivers/tty/vt/vt.c:3584:		scoped_guard(console_lock)
drivers/tty/vt/vt.c-3585-			unblank_screen();
--
drivers/tty/vt/vt.c-3600-	case TIOCL_GETMOUSEREPORTING:
drivers/tty/vt/vt.c:3601:		scoped_guard(console_lock)	/* May be overkill */
drivers/tty/vt/vt.c-3602-			data = mouse_reporting();
--
drivers/tty/vt/vt.c-3632-		 */
drivers/tty/vt/vt.c:3633:		scoped_guard(console_lock)
drivers/tty/vt/vt.c-3634-			scrollfront(vc_cons[fg_console].d, lines);
--
drivers/tty/vt/vt.c-3636-	case TIOCL_BLANKSCREEN:	/* until explicitly unblanked, not only poked */
drivers/tty/vt/vt.c:3637:		scoped_guard(console_lock) {
drivers/tty/vt/vt.c-3638-			ignore_poke = 1;
--
drivers/tty/vt/vt.c=3723=static void con_flush_chars(struct tty_struct *tty)
--
drivers/tty/vt/vt.c-3729-
drivers/tty/vt/vt.c:3730:	guard(console_lock)();
drivers/tty/vt/vt.c-3731-	set_cursor(vc);
--
drivers/tty/vt/vt.c=3737=static int con_install(struct tty_driver *driver, struct tty_struct *tty)
--
drivers/tty/vt/vt.c-3742-
drivers/tty/vt/vt.c:3743:	guard(console_lock)();
drivers/tty/vt/vt.c-3744-	ret = vc_allocate(currcons);
--
drivers/tty/vt/vt.c=3786=static void con_shutdown(struct tty_struct *tty)
--
drivers/tty/vt/vt.c-3790-
drivers/tty/vt/vt.c:3791:	guard(console_lock)();
drivers/tty/vt/vt.c-3792-	vc->port.tty = NULL;
--
drivers/tty/vt/vt.c=3844=static int __init con_init(void)
--
drivers/tty/vt/vt.c-3849-
drivers/tty/vt/vt.c:3850:	console_lock();
drivers/tty/vt/vt.c-3851-
--
drivers/tty/vt/vt.c=4273=static ssize_t store_bind(struct device *dev, struct device_attribute *attr,
--
drivers/tty/vt/vt.c-4278-
drivers/tty/vt/vt.c:4279:	guard(console_lock)();
drivers/tty/vt/vt.c-4280-
--
drivers/tty/vt/vt.c=4289=static ssize_t show_bind(struct device *dev, struct device_attribute *attr,
--
drivers/tty/vt/vt.c-4294-
drivers/tty/vt/vt.c:4295:	scoped_guard(console_lock)
drivers/tty/vt/vt.c-4296-		bind = con_is_bound(con->con);
--
drivers/tty/vt/vt.c=4543=static void con_driver_unregister_callback(struct work_struct *ignored)
--
drivers/tty/vt/vt.c-4546-
drivers/tty/vt/vt.c:4547:	guard(console_lock)();
drivers/tty/vt/vt.c-4548-
--
drivers/tty/vt/vt.c-4559-
drivers/tty/vt/vt.c:4560:		console_lock();
drivers/tty/vt/vt.c-4561-
--
drivers/tty/vt/vt.c=4605=void give_up_console(const struct consw *csw)
drivers/tty/vt/vt.c-4606-{
drivers/tty/vt/vt.c:4607:	guard(console_lock)();
drivers/tty/vt/vt.c-4608-	do_unregister_con_driver(csw);
--
drivers/tty/vt/vt.c=4649=static int set_vesa_blanking(u8 __user *mode_user)
--
drivers/tty/vt/vt.c-4655-
drivers/tty/vt/vt.c:4656:	guard(console_lock)();
drivers/tty/vt/vt.c-4657-	vesa_blank_mode = (mode <= VESA_BLANK_MAX) ? mode : VESA_NO_BLANKING;
--
drivers/tty/vt/vt.c=4835=int con_set_cmap(unsigned char __user *arg)
--
drivers/tty/vt/vt.c-4842-
drivers/tty/vt/vt.c:4843:	guard(console_lock)();
drivers/tty/vt/vt.c-4844-	for (i = k = 0; i < 16; i++) {
--
drivers/tty/vt/vt.c=4863=int con_get_cmap(unsigned char __user *arg)
--
drivers/tty/vt/vt.c-4867-
drivers/tty/vt/vt.c:4868:	scoped_guard(console_lock)
drivers/tty/vt/vt.c-4869-		for (i = k = 0; i < 16; i++) {
--
drivers/tty/vt/vt.c=4910=static int con_font_get(struct vc_data *vc, struct console_font_op *op)
--
drivers/tty/vt/vt.c-4926-
drivers/tty/vt/vt.c:4927:	scoped_guard(console_lock) {
drivers/tty/vt/vt.c-4928-		if (vc->vc_mode != KD_TEXT)
--
drivers/tty/vt/vt.c=4955=static int con_font_set(struct vc_data *vc, const struct console_font_op *op)
--
drivers/tty/vt/vt.c-4981-
drivers/tty/vt/vt.c:4982:	guard(console_lock)();
drivers/tty/vt/vt.c-4983-
--
drivers/tty/vt/vt.c=4995=static int con_font_default(struct vc_data *vc, struct console_font_op *op)
--
drivers/tty/vt/vt.c-5007-
drivers/tty/vt/vt.c:5008:	scoped_guard(console_lock) {
drivers/tty/vt/vt.c-5009-		if (vc->vc_mode != KD_TEXT)
--
drivers/tty/vt/vt_ioctl.c=44=static inline bool vt_in_use(unsigned int i)
--
drivers/tty/vt/vt_ioctl.c-48-	/*
drivers/tty/vt/vt_ioctl.c:49:	 * console_lock must be held to prevent the vc from being deallocated
drivers/tty/vt/vt_ioctl.c-50-	 * while we're checking whether it's in-use.
--
drivers/tty/vt/vt_ioctl.c=283=static int vt_k_ioctl(struct tty_struct *tty, unsigned int cmd,
--
drivers/tty/vt/vt_ioctl.c-379-
drivers/tty/vt/vt_ioctl.c:380:		guard(console_lock)();
drivers/tty/vt/vt_ioctl.c-381-		return vt_kdsetmode(vc, arg);
--
drivers/tty/vt/vt_ioctl.c=589=static int vt_setactivate(struct vt_setactivate __user *sa)
--
drivers/tty/vt/vt_ioctl.c-601-	vsa.console = array_index_nospec(vsa.console, MAX_NR_CONSOLES);
drivers/tty/vt/vt_ioctl.c:602:	scoped_guard(console_lock) {
drivers/tty/vt/vt_ioctl.c-603-		ret = vc_allocate(vsa.console);
--
drivers/tty/vt/vt_ioctl.c=626=static int vt_disallocate(unsigned int vc_num)
--
drivers/tty/vt/vt_ioctl.c-629-
drivers/tty/vt/vt_ioctl.c:630:	scoped_guard(console_lock) {
drivers/tty/vt/vt_ioctl.c-631-		if (vt_busy(vc_num))
--
drivers/tty/vt/vt_ioctl.c=644=static void vt_disallocate_all(void)
--
drivers/tty/vt/vt_ioctl.c-648-
drivers/tty/vt/vt_ioctl.c:649:	scoped_guard(console_lock)
drivers/tty/vt/vt_ioctl.c-650-		for (i = 1; i < MAX_NR_CONSOLES; i++)
--
drivers/tty/vt/vt_ioctl.c=662=static int vt_resizex(struct vc_data *vc, struct vt_consize __user *cs)
--
drivers/tty/vt/vt_ioctl.c-699-			continue;
drivers/tty/vt/vt_ioctl.c:700:		guard(console_lock)();
drivers/tty/vt/vt_ioctl.c-701-		vcp = vc_cons[i].d;
--
drivers/tty/vt/vt_ioctl.c=727=int vt_ioctl(struct tty_struct *tty,
--
drivers/tty/vt/vt_ioctl.c-764-
drivers/tty/vt/vt_ioctl.c:765:		guard(console_lock)();
drivers/tty/vt/vt_ioctl.c-766-		vc->vt_mode = tmp;
--
drivers/tty/vt/vt_ioctl.c-780-
drivers/tty/vt/vt_ioctl.c:781:		scoped_guard(console_lock)
drivers/tty/vt/vt_ioctl.c-782-			memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode));
--
drivers/tty/vt/vt_ioctl.c-803-		state = 1;	/* /dev/tty0 is always open */
drivers/tty/vt/vt_ioctl.c:804:		scoped_guard(console_lock) /* required by vt_in_use() */
drivers/tty/vt/vt_ioctl.c-805-			for (i = 0, mask = 2; i < MAX_NR_CONSOLES && mask; ++i, mask <<= 1)
--
drivers/tty/vt/vt_ioctl.c-814-	case VT_OPENQRY:
drivers/tty/vt/vt_ioctl.c:815:		scoped_guard(console_lock) /* required by vt_in_use() */
drivers/tty/vt/vt_ioctl.c-816-			for (i = 0; i < MAX_NR_CONSOLES; ++i)
--
drivers/tty/vt/vt_ioctl.c-834-		arg = array_index_nospec(arg, MAX_NR_CONSOLES);
drivers/tty/vt/vt_ioctl.c:835:		scoped_guard(console_lock) {
drivers/tty/vt/vt_ioctl.c-836-			ret = vc_allocate(arg);
--
drivers/tty/vt/vt_ioctl.c-873-
drivers/tty/vt/vt_ioctl.c:874:		guard(console_lock)();
drivers/tty/vt/vt_ioctl.c-875-		return vt_reldisp(vc, arg);
--
drivers/tty/vt/vt_ioctl.c-904-
drivers/tty/vt/vt_ioctl.c:905:		guard(console_lock)();
drivers/tty/vt/vt_ioctl.c-906-		for (i = 0; i < MAX_NR_CONSOLES; i++) {
--
drivers/tty/vt/vt_ioctl.c-944-
drivers/tty/vt/vt_ioctl.c:945:		console_lock();
drivers/tty/vt/vt_ioctl.c-946-		concsr.con_cols = vc->vc_cols;
--
drivers/tty/vt/vt_ioctl.c=978=void vc_SAK(struct work_struct *work)
--
drivers/tty/vt/vt_ioctl.c-984-
drivers/tty/vt/vt_ioctl.c:985:	guard(console_lock)();
drivers/tty/vt/vt_ioctl.c-986-	vc = vc_con->d;
--
drivers/tty/vt/vt_ioctl.c=1269=int vt_move_to_console(unsigned int vt, int alloc)
--
drivers/tty/vt/vt_ioctl.c-1272-
drivers/tty/vt/vt_ioctl.c:1273:	scoped_guard(console_lock) {
drivers/tty/vt/vt_ioctl.c-1274-		/* Graphics mode - up to X */
--
drivers/tty/vt/vt_ioctl.c=1310=void pm_set_vt_switch(int do_switch)
drivers/tty/vt/vt_ioctl.c-1311-{
drivers/tty/vt/vt_ioctl.c:1312:	guard(console_lock)();
drivers/tty/vt/vt_ioctl.c-1313-	disable_vt_switch = !do_switch;
]

122/5 2026/08/11 23:47 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 33372
							output: 36
							thoughts: 1357
						

Thoughts:
**My Thought Process on Triggering a Specific Kernel Lock Sequence**

Right, so my primary objective here is to trigger a particular sequence of lock acquisitions: `&tty->termios_rwsem` -> `&port->mutex` -> `console_lock` -> `&buf->lock` -> `&tty->termios_rwsem`. I've been dissecting the kernel's console and TTY handling code to figure out the exact path.

I've identified that `vc_SAK` is the critical function that takes `console_lock` and then subsequently acquires `&buf->lock` via its internal call to `__do_SAK`. This means my strategy *must* involve triggering `vc_SAK`.

Since I don't have direct access to `/proc/sysrq-trigger` (which would be the straightforward way to invoke `sysrq_handle_SAK` and thus `vc_SAK`), I need an alternative. My current best bet is to trigger `fn_SAK`, which in turn calls `vc_SAK`. The established method for triggering `fn_SAK` is by combining `KDSKBENT` with `/dev/uinput`.

I've double-checked if there are any other routes to `vc_SAK`. Based on my analysis, `vc_SAK` is solely scheduled by `fn_SAK` and `sysrq_handle_SAK`. So, yes, the `KDSKBENT` + `/dev/uinput` approach seems to be the only viable path to get `vc_SAK` running without `/proc/sysrq-trigger`.

With that established, I've drafted a reproducer C code. Let me walk through the logic of the reproducer:

1.  **Triggering `&tty->termios_rwsem` -> `&port->mutex`:**
    I'm opening `/dev/ttyS0` and performing a `TCGETS` followed by `TCSETS`. This sequence, particularly the `TCGETS`, is known to acquire `&tty->termios_rwsem` and then `&port->mutex` within the TTY driver's implementation.

2.  **Triggering `console_lock` -> `&buf->lock` (via `vc_SAK`):**
    This is the core part.
    *   First, I use `KDSKBENT` on `/dev/tty1`. I'm mapping the keycode for 'A' (index 30) to the `K_SAK` key value (`0x020F`). This setup primes the system for the System Attention Key (SAK) event.
    *   Then, I use `/dev/uinput` to inject a `KEY_A` event. This simulated key press will be interpreted by the kernel as a SAK event, triggering `fn_SAK` and subsequently `vc_SAK`. As established, `vc_SAK` will then acquire `console_lock` and `&buf->lock`.

3.  **Triggering `&buf->lock` -> `&tty->termios_rwsem`:**
    This final step in the lock acquisition chain is a bit more indirect. I'm utilizing `/dev/ptmx` to create a pseudo-terminal pair. By writing to the slave PTY (`pts`), I force a `flush_to_ldisc` operation on the master PTY. This operation, when it attempts to flush data, will acquire `&buf->lock` and then, in its path, will attempt to acquire `&tty->termios_rwsem` on the master side.

So, the reproducer is designed to execute these three distinct steps sequentially, each aiming to acquire a specific lock in the chain, ultimately to achieve the full nested lock acquisition.

Now, I'm pondering if there are any *other* ways to reach that `console_lock` -> `&buf->lock` transition, specifically. What if other TTY ioctls, like `TIOCL_SETSEL` or something similar, also grab `console_lock` before ultimately needing `&buf->lock`? I decided to investigate `set_selection_kernel`. Looking at its implementation, it uses `guard(mutex)(&vc_sel.lock)` and then `guard(console_lock)()`. This looks promising. The question then becomes: does `vc_selection` (which `set_selection_kernel` calls) subsequently acquire `&buf->lock`? I need to dive into `vc_selection`'s code to confirm that. If it does, then `TIOCL_SETSEL` could be another avenue to trigger that part of the lock sequence. But for now, the `KDSKBENT` + `/dev/uinput` route is confirmed and is the focus of my current reproducer.


123/5 2026/08/11 23:47 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/selection.c Name:vc_selection]

Results:
map[SourceCode: 338:	static int vc_selection(struct vc_data *vc, struct tiocl_selection *v,
 339:			struct tty_struct *tty)
 340:	{
 341:		int ps, pe;
 342:	
 343:		poke_blanked_console();
 344:	
 345:		if (v->sel_mode == TIOCL_SELCLEAR) {
 346:			/* useful for screendump without selection highlights */
 347:			clear_selection();
 348:			return 0;
 349:		}
 350:	
 351:		/* Historically 0 => max value */
 352:		v->xs = umin(v->xs - 1, vc->vc_cols - 1);
 353:		v->ys = umin(v->ys - 1, vc->vc_rows - 1);
 354:		v->xe = umin(v->xe - 1, vc->vc_cols - 1);
 355:		v->ye = umin(v->ye - 1, vc->vc_rows - 1);
 356:	
 357:		if (mouse_reporting() && (v->sel_mode & TIOCL_SELMOUSEREPORT)) {
 358:			mouse_report(tty, v->sel_mode & TIOCL_SELBUTTONMASK, v->xs,
 359:				     v->ys);
 360:			return 0;
 361:		}
 362:	
 363:		ps = v->ys * vc->vc_size_row + (v->xs << 1);
 364:		pe = v->ye * vc->vc_size_row + (v->xe << 1);
 365:		if (ps > pe)	/* make vc_sel.start <= vc_sel.end */
 366:			swap(ps, pe);
 367:	
 368:		if (vc_sel.cons != vc) {
 369:			clear_selection();
 370:			vc_sel.cons = vc;
 371:		}
 372:	
 373:		return vc_do_selection(vc, v->sel_mode, ps, pe);
 374:	}
 SourceFile:drivers/tty/vt/selection.c]

124/5 2026/08/11 23:47 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35388
							output: 36
							thoughts: 32
						

Thoughts:
**My Thought Process on Function Argument Checking**

Okay, so my primary line of inquiry right now is about how these two functions, `vc_do_selection` and `mouse_report`, handle the buffer lock. Specifically, I need to confirm whether they are designed to accept `&buf->lock` as an argument.

My immediate instinct is to start by examining `mouse_report`. This seems like a logical first step because mouse input handling often involves direct manipulation or immediate feedback on the buffer state, making it a likely candidate to require explicit lock management. I'm going to dive into the implementation details of `mouse_report` to see if `&buf->lock` is present in its signature or if there's any other mechanism for lock acquisition/release related to buffer operations within that function. Once I have a clear understanding of `mouse_report`'s lock handling, I'll then move on to `vc_do_selection` to perform a similar analysis.


125/5 2026/08/11 23:47 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/selection.c Name:mouse_report]

Results:
map[SourceCode:1888:	void mouse_report(struct tty_struct *tty, int butt, int mrx, int mry)
1889:	{
1890:		char buf[8];
1891:		int len;
1892:	
1893:		len = sprintf(buf, "\033[M%c%c%c", (char)(' ' + butt),
1894:				(char)('!' + mrx), (char)('!' + mry));
1895:		respond_string(buf, len, tty->port);
1896:	}
 SourceFile:drivers/tty/vt/vt.c]

126/5 2026/08/11 23:47 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35623
							output: 36
							thoughts: 14
						

Thoughts:
**My Thought Process**

Ah, I'm examining the `respond_string` function here. My immediate question is whether it requires access to `&buf->lock`. This is a critical point for me because if it does, it implies a shared mutable state scenario. I need to understand if `respond_string` is going to be directly manipulating or reading a buffer (`buf`) that's protected by a lock, `buf->lock`. If it does, I'll need to ensure that any calls to `respond_string` are properly synchronized, likely by acquiring the lock *before* calling it and releasing it *after*. The implication is that `respond_string` might be performing operations that could lead to race conditions if not properly guarded by that lock. I need to be certain about this dependency to maintain data integrity and prevent concurrent access issues in the system.


127/5 2026/08/11 23:47 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt.c Name:respond_string]

Results:
map[SourceCode:1856:	static void respond_string(const char *p, size_t len, struct tty_port *port)
1857:	{
1858:		tty_insert_flip_string(port, p, len);
1859:		tty_flip_buffer_push(port);
1860:	}
 SourceFile:drivers/tty/vt/vt.c]

128/5 2026/08/11 23:47 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35770
							output: 40
							thoughts: 79
						

Thoughts:
**Aha! My initial observation about `tty_insert_flip_string` accepting `&buf->lock` seems to be correct.**

I'm really pleased to see that `tty_insert_flip_string` indeed takes `&buf->lock`. That was my first hunch, and it's good to confirm it. I then dug a little deeper, following the call stack. My expectation was that `tty_insert_flip_string` would delegate the actual buffer manipulation to another function, and sure enough, it calls `tty_insert_flip_string_fixed_flag`.

Now, the critical part of my investigation was to see if this subsequent function also respected the lock. And yes, it does! `tty_insert_flip_string_fixed_flag` in turn calls `tty_buffer_request_room`, and I've confirmed that this function also operates with `&buf->lock`. This is precisely what I was looking for – a clear indication that the buffer operations are properly synchronized. It gives me confidence that the locking mechanism is being applied consistently throughout the relevant code path for buffer insertion.


129/5 2026/08/11 23:47 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/vt.c Name:tty_insert_flip_string]

Results:
map[SourceCode:  80:	static inline size_t tty_insert_flip_string(struct tty_port *port,
  81:						    const u8 *chars, size_t size)
  82:	{
  83:		return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size);
  84:	}
 SourceFile:include/linux/tty_flip.h]

130/5 2026/08/11 23:47 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35992
							output: 44
							thoughts: 17
						

Thoughts:
**My Thought Process**

Right, so I'm digging into the kernel code here, and I need to understand how character data is being inserted into the TTY buffer. My current focus is on a specific function: `tty_insert_flip_string_fixed_flag`. I need to examine its implementation to grasp the mechanics of this insertion process, particularly how it handles flags that are fixed or pre-determined. This will likely involve looking at how it interacts with the TTY's internal buffer structures and what those "fixed flags" signify in terms of data processing or character attributes.


131/5 2026/08/11 23:47 tool codesearch-definition-source
0m Args:
map[ContextFile:include/linux/tty_flip.h Name:tty_insert_flip_string_fixed_flag]

Results:
map[SourceCode:  19:	/**
  20:	 * tty_insert_flip_string_fixed_flag - add characters to the tty buffer
  21:	 * @port: tty port
  22:	 * @chars: characters
  23:	 * @flag: flag value for each character
  24:	 * @size: size
  25:	 *
  26:	 * Queue a series of bytes to the tty buffering. All the characters passed are
  27:	 * marked with the supplied flag.
  28:	 *
  29:	 * Returns: the number added.
  30:	 */
  31:	static inline size_t tty_insert_flip_string_fixed_flag(struct tty_port *port,
  32:							       const u8 *chars, u8 flag,
  33:							       size_t size)
  34:	{
  35:		return __tty_insert_flip_string_flags(port, chars, &flag, false, size);
  36:	}
 SourceFile:include/linux/tty_flip.h]

132/5 2026/08/11 23:47 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36323
							output: 43
							thoughts: 16
						

Thoughts:
**My Thought Process**

Right, so the immediate impulse is to investigate `__tty_insert_flip_string_flags`. This is where my mind naturally gravitates when I'm looking to understand how string insertion and flipping operations are being handled at the low level within this particular TTY (teletypewriter) subsystem. My expertise tells me that flags like these often dictate crucial behaviors, such as whether the insertion should be immediate, if it should be buffered, how it interacts with existing content, or if there are any special processing requirements. Therefore, digging into the definition and usage of `__tty_insert_flip_string_flags` is the most direct path to comprehending the mechanics of the operation at hand. I need to see what flags are available, what they signify, and how they are being applied in the context of this insertion.


133/5 2026/08/11 23:48 tool codesearch-definition-source
0m Args:
map[ContextFile:include/linux/tty_flip.h Name:__tty_insert_flip_string_flags]

Results:
map[SourceCode: 307:	size_t __tty_insert_flip_string_flags(struct tty_port *port, const u8 *chars,
 308:					      const u8 *flags, bool mutable_flags,
 309:					      size_t size)
 310:	{
 311:		bool need_flags = mutable_flags || flags[0] != TTY_NORMAL;
 312:		size_t copied = 0;
 313:	
 314:		do {
 315:			size_t goal = min_t(size_t, size - copied, TTY_BUFFER_PAGE);
 316:			size_t space = __tty_buffer_request_room(port, goal, need_flags);
 317:			struct tty_buffer *tb = port->buf.tail;
 318:	
 319:			if (unlikely(space == 0))
 320:				break;
 321:	
 322:			memcpy(char_buf_ptr(tb, tb->used), chars, space);
 323:	
 324:			if (mutable_flags) {
 325:				memcpy(flag_buf_ptr(tb, tb->used), flags, space);
 326:				flags += space;
 327:			} else if (tb->flags) {
 328:				memset(flag_buf_ptr(tb, tb->used), flags[0], space);
 329:			} else {
 330:				/* tb->flags should be available once requested */
 331:				WARN_ON_ONCE(need_flags);
 332:			}
 333:	
 334:			tb->used += space;
 335:			copied += space;
 336:			chars += space;
 337:	
 338:			/* There is a small chance that we need to split the data over
 339:			 * several buffers. If this is the case we must loop.
 340:			 */
 341:		} while (unlikely(size > copied));
 342:	
 343:		return copied;
 344:	}
 SourceFile:drivers/tty/tty_buffer.c]

134/5 2026/08/11 23:48 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36965
							output: 41
							thoughts: 19
						

Thoughts:
**My Internal Monologue on `__tty_buffer_request_room` and Locking**

Alright, let's dive into this. I'm trying to get a handle on the locking strategy around `__tty_buffer_request_room`. The core question on my mind is: does this function, in its execution, acquire or rely on the `&buf->lock`?

I'm picturing the call path, the data structures involved, and the critical sections. My initial thought is that if `__tty_buffer_request_room` is indeed meant to safely manipulate the buffer's contents or its metadata – things like available space, or perhaps even the pointers within the buffer structure itself – then it *absolutely* needs to be protected by a lock. And given the context, `&buf->lock` seems like the most logical candidate for ensuring serialization of access to that specific buffer.

However, I also need to consider the possibility that the design might be more nuanced. Perhaps `__tty_buffer_request_room` is a lower-level helper that *assumes* it's already being called within a context where the relevant lock is held. Or, it might be that its operations are inherently atomic enough not to require explicit locking *within* the function itself, but rather that the *caller* is responsible for providing that protection.

This leads me to ponder the specific actions `__tty_buffer_request_room` performs. Is it merely checking a count? Is it modifying pointers? Is it allocating or deallocating memory associated with the buffer? The answer to these questions will dictate whether `&buf->lock` is essential. If it's just reading a counter that's updated atomically elsewhere, then maybe not. But if it's touching any shared mutable state that could lead to race conditions with other operations on the same buffer, then yes, `&buf->lock` is crucial.

My mental model is leaning towards the idea that `__tty_buffer_request_room` *should* be operating under the protection of `&buf->lock`. If it doesn't, I'd be concerned about potential race conditions where, for instance, one part of the system is trying to add data while another is trying to free space, leading to inconsistent states or data corruption. The question then becomes: is this an oversight in the current implementation, or is there a deliberate architectural choice being made where the caller is expected to manage the lock? I need to verify this by tracing the callers of `__tty_buffer_request_room` to see how they are acquiring and releasing `&buf->lock` around their calls. This will be key to understanding the intended synchronization mechanism.


135/5 2026/08/11 23:48 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/tty_buffer.c Name:__tty_buffer_request_room]

Results:
map[SourceCode: 254:	/**
 255:	 * __tty_buffer_request_room	-	grow tty buffer if needed
 256:	 * @port: tty port
 257:	 * @size: size desired
 258:	 * @flags: buffer has to store flags along character data
 259:	 *
 260:	 * Make at least @size bytes of linear space available for the tty buffer.
 261:	 *
 262:	 * Will change over to a new buffer if the current buffer is encoded as
 263:	 * %TTY_NORMAL (so has no flags buffer) and the new buffer requires a flags
 264:	 * buffer.
 265:	 *
 266:	 * Returns: the size we managed to find.
 267:	 */
 268:	static int __tty_buffer_request_room(struct tty_port *port, size_t size,
 269:					     bool flags)
 270:	{
 271:		struct tty_bufhead *buf = &port->buf;
 272:		struct tty_buffer *n, *b = buf->tail;
 273:		size_t left = (b->flags ? 1 : 2) * b->size - b->used;
 274:		bool change = !b->flags && flags;
 275:	
 276:		if (!change && left >= size)
 277:			return size;
 278:	
 279:		/* This is the slow path - looking for new buffers to use */
 280:		n = tty_buffer_alloc(port, size);
 281:		if (n == NULL)
 282:			return change ? 0 : left;
 283:	
 284:		n->flags = flags;
 285:		buf->tail = n;
 286:		/*
 287:		 * Paired w/ acquire in flush_to_ldisc() and lookahead_bufs()
 288:		 * ensures they see all buffer data.
 289:		 */
 290:		smp_store_release(&b->commit, b->used);
 291:		/*
 292:		 * Paired w/ acquire in flush_to_ldisc() and lookahead_bufs()
 293:		 * ensures the latest commit value can be read before the head
 294:		 * is advanced to the next buffer.
 295:		 */
 296:		smp_store_release(&b->next, n);
 297:	
 298:		return size;
 299:	}
 SourceFile:drivers/tty/tty_buffer.c]

136/5 2026/08/11 23:48 llm strategy-refiner
1m Model:
gemini-3.1-pro-preview

Tokens:
							input: 37732
							output: 1376
							thoughts: 6786
						

Thoughts:
**My Thought Process to Uncover a Potential Kernel Race Condition**

Here's a breakdown of my investigation into a potential race condition involving kernel locks:

My primary goal was to identify a sequence of operations that would create a dependency chain of locks: `&tty->termios_rwsem` -> `&port->mutex` -> `&buf->lock` -> `&tty->termios_rwsem`.

1.  **Analyzing `tty_buffer_request_room`:** I started by examining `__tty_buffer_request_room`. My initial thought was that it *must* take `&buf->lock`. However, upon closer inspection, I realized this wasn't the case. I then cross-referenced where `&buf->lock` *is* taken: in `tty_buffer_lock_exclusive`, `tty_buffer_flush`, and `flush_to_ldisc`. Crucially, it's *not* taken in `tty_insert_flip_string`. This immediately told me that `mouse_report`, which I knew called `tty_insert_flip_string`, would *not* be directly involved in taking `&buf->lock` and therefore not a primary path for the dependency.

2.  **Investigating `paste_selection`:** Next, I looked at `paste_selection`. I saw it first takes `console_lock`, releases it, and *then* takes `&buf->lock`. This means `paste_selection` itself doesn't create a *dependency* where one lock is held while another is acquired. It's a sequential acquisition, not a nested one that could lead to a deadlock or race.

3.  **Pinpointing the `console_lock` -> `&buf->lock` Link via `vc_SAK`:** This was the critical breakthrough. I found that `vc_SAK` holds `console_lock` for its entire duration. Inside `vc_SAK`, it calls `__do_SAK(tty)`, which in turn calls `tty_ldisc_flush(tty)`, and finally `tty_buffer_flush(tty, ld)`. And there it is: `tty_buffer_flush` calls `mutex_lock(&buf->lock)`. This is the *only* path I could find that holds `console_lock` and subsequently acquires `&buf->lock`. Therefore, triggering `vc_SAK` became essential to establishing this specific dependency.

4.  **Triggering `vc_SAK`:** I knew `vc_SAK` is scheduled by `fn_SAK` or `sysrq_handle_SAK`.
    *   `/proc/sysrq-trigger` is the most straightforward way, but I couldn't assume its availability.
    *   `fn_SAK` can be triggered via `KDSKBENT` (setting a key to `K_SAK`) combined with injecting that key using `/dev/uinput`. This seemed promising because it doesn't rely on the SysRq functionality being enabled (`CONFIG_MAGIC_SYSRQ`).
    *   I briefly considered other `ioctl` calls (`TIOCLINUX`, `VT_RELDISP`, etc.), but none of them appeared to trigger `vc_SAK`.
    *   Injecting `KEY_SYSRQ` and `KEY_K` was another thought for triggering SysRq, but again, that depends on `CONFIG_MAGIC_SYSRQ`, making the `KDSKBENT` approach more robust.

5.  **Refining the `KDSKBENT` Strategy:**
    *   I confirmed that `KDSKBENT` modifies the global keymap.
    *   I checked the `kbentry` structure and confirmed `kb_table=0`, `kb_index=30` (for `KEY_A`), and `kb_value=0x020F` (for `K_SAK`) would correctly map `KEY_A` to trigger `K_SAK`.
    *   I verified that the `KEY_A` keycode from `linux/input-event-codes.h` (30) directly maps to the `kb_index` in the VT keyboard driver, ensuring the correct key is targeted.
    *   I decided to use `/dev/tty0`, `/dev/tty1`, or `/dev/console` as fallback options for the `KDSKBENT` `ioctl` call, as the specific TTY might vary.

6.  **Constructing the Reproducer:** Based on the above, I assembled the reproducer code, aiming to trigger the dependencies in sequence:
    *   **Step 1: `&tty->termios_rwsem` -> `&port->mutex`**: I used a serial port (`/dev/ttyS0`) and performed `TCGETS` followed by `TCSETS`. This is a known way to acquire `&tty->termios_rwsem` and then `&port->mutex`.
    *   **Step 2: `console_lock` -> `&buf->lock`**: This is where the `KDSKBENT` and `/dev/uinput` magic happens.
        *   I map `KEY_A` to `K_SAK` using `KDSKBENT` on a TTY device.
        *   I then use `/dev/uinput` to create a virtual keyboard, set up the `KEY_A` event, and inject it. This injection causes the system to call `fn_SAK`, which schedules `vc_SAK`.
        *   `vc_SAK` then executes, holding `console_lock` and acquiring `&buf->lock`.
        *   I added `usleep` calls to allow time for workqueues to execute and for the uinput device to be registered.
    *   **Step 3: `&buf->lock` -> `&tty->termios_rwsem`**: I used the classic `/dev/ptmx` and PTY slave mechanism. Writing to the slave PTY triggers `flush_to_ldisc` on the master PTY, which holds `&buf->lock` and then acquires `&tty->termios_rwsem`.

This methodical approach, starting from the problematic lock acquisition and working backward and forward through the code paths, allowed me to isolate the necessary steps and construct a precise reproducer. The key was realizing the unique role of `vc_SAK` in linking `console_lock` to `&buf->lock` and finding a reliable, configuration-independent way to trigger it.


137/3 2026/08/11 23:49 action merge-strategy
0m Results:
map[CurrentReproStrategy:To trigger the `console_lock` -> `&buf->lock` dependency without relying on `/proc/sysrq-trigger` (which might be disabled or restricted), we can use the VT keyboard driver. 

The function `vc_SAK` takes `console_lock` and then calls `__do_SAK`, which takes `&buf->lock`. `vc_SAK` is scheduled by `fn_SAK`, which is triggered when the keyboard driver receives a key mapped to the `K_SAK` keysym. 

We can dynamically map a normal key (e.g., `KEY_A`) to `K_SAK` using the `KDSKBENT` ioctl on a VT device (like `/dev/tty0`). Then, we can inject a `KEY_A` keypress using a virtual input device via `/dev/uinput`. This will simulate the SAK key combination and execute `vc_SAK`, recording the required lock dependency.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/uinput.h>
#include <string.h>
#include <stdio.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    // Map KEY_A (keycode 30) to K_SAK (0x020F)
    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    
    if (fd_tty >= 0) {
        struct kbentry ke;
        ke.kb_table = 0;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        ioctl(fd_tty, KDSKBENT, &ke);
        close(fd_tty);
    }

    // Inject KEY_A via uinput to trigger fn_SAK -> vc_SAK
    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        ioctl(ufd, UI_SET_EVBIT, EV_KEY);
        ioctl(ufd, UI_SET_KEYBIT, KEY_A);

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        ioctl(ufd, UI_DEV_SETUP, &usetup);
        ioctl(ufd, UI_DEV_CREATE);

        usleep(100000); // wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 1;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        // Release KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        usleep(100000); // wait for vc_SAK workqueue to execute
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```]

138/3 2026/08/11 23:49 agent repro-generator
0m Model:
best-expensive

Results:
map[IsProbe:true RawCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    if (fd_tty < 0) {
        printf("[-] Failed to open /dev/tty0, /dev/tty1, and /dev/console: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened a tty/console.\n");
    close(fd_tty);

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd < 0) {
        printf("[-] Failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/uinput.\n");
    close(ufd);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}]

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

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


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

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

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


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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Strategy: To trigger the `console_lock` -> `&buf->lock` dependency without relying on `/proc/sysrq-trigger` (which might be disabled or restricted), we can use the VT keyboard driver. 

The function `vc_SAK` takes `console_lock` and then calls `__do_SAK`, which takes `&buf->lock`. `vc_SAK` is scheduled by `fn_SAK`, which is triggered when the keyboard driver receives a key mapped to the `K_SAK` keysym. 

We can dynamically map a normal key (e.g., `KEY_A`) to `K_SAK` using the `KDSKBENT` ioctl on a VT device (like `/dev/tty0`). Then, we can inject a `KEY_A` keypress using a virtual input device via `/dev/uinput`. This will simulate the SAK key combination and execute `vc_SAK`, recording the required lock dependency.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/uinput.h>
#include <string.h>
#include <stdio.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    // Map KEY_A (keycode 30) to K_SAK (0x020F)
    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    
    if (fd_tty >= 0) {
        struct kbentry ke;
        ke.kb_table = 0;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        ioctl(fd_tty, KDSKBENT, &ke);
        close(fd_tty);
    }

    // Inject KEY_A via uinput to trigger fn_SAK -> vc_SAK
    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        ioctl(ufd, UI_SET_EVBIT, EV_KEY);
        ioctl(ufd, UI_SET_KEYBIT, KEY_A);

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        ioctl(ufd, UI_DEV_SETUP, &usetup);
        ioctl(ufd, UI_DEV_CREATE);

        usleep(100000); // wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 1;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        // Release KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        usleep(100000); // wait for vc_SAK workqueue to execute
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```


Previous Reproducer Attempt:
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_sysrq = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd_sysrq < 0) {
        printf("[-] Failed to open /proc/sysrq-trigger: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /proc/sysrq-trigger.\n");
    close(fd_sysrq);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}




Execution Results & Debugging Feedback:
The probe successfully opened `/dev/ttyS0`, but failed to open `/proc/sysrq-trigger` (No such file or directory). This indicates that sysrq is either disabled in the kernel config or restricted by the sandbox. You will need to find an alternative way to trigger the console lock or whatever you intended to do with sysrq (e.g., writing to `/dev/kmsg`, using `ioctl(TIOCLINUX)`, or other console-related operations). Please adjust your reproducer strategy accordingly.

139/4 2026/08/11 23:49 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8480
							output: 528
							thoughts: 1113
						

Thoughts:
**My Thought Process for Constructing the Bug Verification Probe**

My primary objective here is to devise a minimal C program that can effectively verify a suspected bugfix. The bug itself is a rather insidious potential circular locking dependency within `n_tty_receive_buf_common`. I've traced the problematic dependency chain: it flows from `&tty->termios_rwsem`, then to `console_lock`, and finally to `&buf->lock`.

My initial approach involved attempting to use `/proc/sysrq-trigger`. However, this avenue proved fruitless as the target either didn't exist or was inaccessible in my environment. This necessitated a pivot.

Fortunately, the user has provided a promising alternative strategy. This strategy hinges on leveraging specific device nodes: `/dev/uinput` for injecting keypresses and `/dev/tty0` (or its siblings like `/dev/tty1` or `/dev/console`) to map a particular key to the `K_SAK` (Secure Attention Key) event.

Before diving headfirst into implementing the full exploit, it's prudent to ensure the fundamental prerequisites are met. Therefore, my immediate next step is to construct a "probe" program. This probe will systematically check for the accessibility of the crucial device nodes identified in the user's strategy: `/dev/uinput`, `/dev/tty0` (falling back to `/dev/tty1` or `/dev/console` if `/dev/tty0` isn't available), and `/dev/ptmx`.

Upon reviewing the user's explicit strategy code snippet, I can see the exact sequence of operations they intend:

1.  Triggering `&tty->termios_rwsem` -> `&port->mutex` via opening `/dev/ttyS0`.
2.  Triggering `console_lock` -> `&buf->lock` by mapping `KEY_A` to `K_SAK` and injecting it via `/dev/uinput`, which in turn is facilitated by opening `/dev/tty0`.
3.  Triggering `&buf->lock` -> `&tty->termios_rwsem` by opening `/dev/ptmx`.

This confirms the necessity of my probe targeting these specific devices. My probe program will be designed to open each of these devices. For `/dev/tty0`, I'll implement a fallback mechanism, trying `/dev/tty1` and then `/dev/console` if the first attempt fails. If any of these essential devices cannot be opened, the probe will report the failure and exit, indicating that the environment isn't set up for the intended bug verification. If all devices are successfully opened and closed, the probe will signify a positive outcome, confirming that the necessary building blocks are in place.

Reflecting on my previous probe, I recall that `/dev/ttyS0` was indeed accessible, which is a good sign. The prior attempt's failure was with `/proc/sysrq-trigger`, not `/dev/ttyS0`. So, I will proceed with constructing this refined probe program to check `/dev/ttyS0`, `/dev/tty0` (with fallbacks), `/dev/uinput`, and `/dev/ptmx`, ensuring a robust environment for the subsequent bug verification.


140/4 2026/08/11 23:49 tool set-results
0m Args:
map[IsProbe:true RawCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    if (fd_tty < 0) {
        printf("[-] Failed to open /dev/tty0, /dev/tty1, and /dev/console: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened a tty/console.\n");
    close(fd_tty);

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd < 0) {
        printf("[-] Failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/uinput.\n");
    close(ufd);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}]

Results:
map[IsProbe:true RawCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    if (fd_tty < 0) {
        printf("[-] Failed to open /dev/tty0, /dev/tty1, and /dev/console: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened a tty/console.\n");
    close(fd_tty);

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd < 0) {
        printf("[-] Failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/uinput.\n");
    close(ufd);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}]

141/3 2026/08/11 23:49 loop
0m
142/4 2026/08/11 23:49 iteration 0
0m
143/5 2026/08/11 23:49 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    if (fd_tty < 0) {
        printf("[-] Failed to open /dev/tty0, /dev/tty1, and /dev/console: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened a tty/console.\n");
    close(fd_tty);

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd < 0) {
        printf("[-] Failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/uinput.\n");
    close(ufd);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}]

144/5 2026/08/11 23:49 action compile-c-prog
0m Results:
map[CompilerError: FormattedReproC:#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    if (fd_tty < 0) {
        printf("[-] Failed to open /dev/tty0, /dev/tty1, and /dev/console: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened a tty/console.\n");
    close(fd_tty);

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd < 0) {
        printf("[-] Failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/uinput.\n");
    close(ufd);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}]

145/5 2026/08/11 23:49 action If
0m Args:
map[CompilerError:]

146/3 2026/08/11 23:49 action run-c-repro
4m Results:
map[CandidateBugTitle: CandidateCrashReport: CandidateReproduced:false ConsoleOutput:[  107.267152][   T33] kauditd_printk_skb: 10 callbacks suppressed
[  107.267167][   T33] audit: type=1400 audit(1786492303.242:201): avc:  denied  { transition } for  pid=5830 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.285349][   T33] audit: type=1400 audit(1786492303.242:202): avc:  denied  { noatsecure } for  pid=5830 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.297547][   T33] audit: type=1400 audit(1786492303.242:203): avc:  denied  { rlimitinh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.308536][   T33] audit: type=1400 audit(1786492303.242:204): avc:  denied  { siginh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  109.345138][   T33] audit: type=1400 audit(1786492305.322:205): avc:  denied  { write } for  pid=5834 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  109.415982][   T33] audit: type=1400 audit(1786492305.392:206): avc:  denied  { write } for  pid=5837 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  109.945615][   T33] audit: type=1400 audit(1786492305.922:207): avc:  denied  { write } for  pid=5840 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.030366][   T33] audit: type=1400 audit(1786492306.002:208): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.388516][   T33] audit: type=1400 audit(1786492306.362:209): avc:  denied  { write } for  pid=5846 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.503245][   T33] audit: type=1400 audit(1786492306.472:210): avc:  denied  { write } for  pid=5849 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.922114][   T33] kauditd_printk_skb: 6 callbacks suppressed
[  112.922128][   T33] audit: type=1400 audit(1786492308.902:217): avc:  denied  { write } for  pid=5875 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.029010][   T33] audit: type=1400 audit(1786492309.002:218): avc:  denied  { write } for  pid=5878 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.223169][   T33] audit: type=1400 audit(1786492309.182:219): avc:  denied  { write } for  pid=5881 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.291973][   T33] audit: type=1400 audit(1786492309.262:220): avc:  denied  { write } for  pid=5884 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:13890' (ED25519) to the list of known hosts.
[  114.670233][   T33] audit: type=1400 audit(1786492310.642:221): avc:  denied  { write } for  pid=5894 comm="syz-executor217" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[+] Successfully opened /dev/ttyS0.
[+] Successfully opened a tty/console.
[+] Successfully opened /dev/uinput.
[+] Successfully opened /dev/ptmx.
[+] All probes successful.
[  114.688846][   T33] audit: type=1400 audit(1786492310.642:222): avc:  denied  { open } for  pid=5894 comm="syz-executor217" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
 OtherCrashReports:<nil> StraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor1539453638

<...>
[  107.592284][   T33] kauditd_printk_skb: 10 callbacks suppressed
[  107.592297][   T33] audit: type=1400 audit(1786492438.237:201): avc:  denied  { transition } for  pid=5833 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.606974][   T33] audit: type=1400 audit(1786492438.237:202): avc:  denied  { noatsecure } for  pid=5833 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.617693][   T33] audit: type=1400 audit(1786492438.237:203): avc:  denied  { rlimitinh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.626803][   T33] audit: type=1400 audit(1786492438.237:204): avc:  denied  { siginh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  111.162078][   T33] audit: type=1400 audit(1786492441.807:205): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.242533][   T33] audit: type=1400 audit(1786492441.887:206): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.393861][   T33] audit: type=1400 audit(1786492442.037:207): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.468843][   T33] audit: type=1400 audit(1786492442.117:208): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.617541][   T33] audit: type=1400 audit(1786492442.267:209): avc:  denied  { write } for  pid=5854 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.689693][   T33] audit: type=1400 audit(1786492442.337:210): avc:  denied  { write } for  pid=5857 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.684141][   T33] kauditd_printk_skb: 4 callbacks suppressed
[  112.684157][   T33] audit: type=1400 audit(1786492443.327:215): avc:  denied  { write } for  pid=5872 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.761854][   T33] audit: type=1400 audit(1786492443.407:216): avc:  denied  { write } for  pid=5875 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.079916][   T33] audit: type=1400 audit(1786492443.727:217): avc:  denied  { write } for  pid=5879 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.208292][   T33] audit: type=1400 audit(1786492443.857:218): avc:  denied  { write } for  pid=5882 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.829999][   T33] audit: type=1400 audit(1786492444.477:219): avc:  denied  { write } for  pid=5889 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.923426][   T33] audit: type=1400 audit(1786492444.567:220): avc:  denied  { write } for  pid=5892 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:27831' (ED25519) to the list of known hosts.
execve("/syz-executor1539453638", ["/syz-executor1539453638"], 0x7ffd4f4d3c80 /* 11 vars */) = 0
brk(NULL)                               = 0x55555eb9e000
brk(0x55555eb9ed80)                     = 0x55555eb9ed80
arch_prctl(ARCH_SET_FS, 0x55555eb9e400) = 0
set_tid_address(0x55555eb9e6d0)         = 5907
set_robust_list(0x55555eb9e6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor1539453638", 4096) = 23
getrandom("\xf7\x3d\x22\x5c\x96\xa9\x08\x45", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x55555eb9ed80
brk(0x55555ebbfd80)                     = 0x55555ebbfd80
brk(0x55555ebc0000)                     = 0x55555ebc0000
mprotect(0x7fbe9e0f4000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/tty0", O_RDWR)   = 3
close(3)                                = 0
[  117.709781][   T33] audit: type=1400 audit(1786492448.357:221): avc:  denied  { write } for  pid=5907 comm="syz-executor153" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[  117.728286][   T33] audit: type=1400 audit(1786492448.357:222): avc:  denied  { open } for  pid=5907 comm="syz-executor153" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
openat(AT_FDCWD, "/dev/uinput", O_WRONLY|O_NONBLOCK) = 3
close(3)                                = 0
openat(AT_FDCWD, "/dev/ptmx", O_RDWR|O_NOCTTY) = 3
close(3)                                = 0
write(1, "[+] Successfully opened /dev/ttyS0.\n[+] Successfully opened a tty/console.\n[+] Successfully opened /"..., 174) = 174
exit_group(0)                           = ?
[+] Successfully opened /dev/ttyS0.
[+] Successfully opened a tty/console.
[+] Successfully opened /dev/uinput.
[+] Successfully opened /dev/ptmx.
[+] All probes successful.
+++ exited with 0 +++
 TestError:]

147/3 2026/08/11 23:54 action truncate-log
0m Results:
map[TruncatedConsoleOutput:[  107.267152][   T33] kauditd_printk_skb: 10 callbacks suppressed
[  107.267167][   T33] audit: type=1400 audit(1786492303.242:201): avc:  denied  { transition } for  pid=5830 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.285349][   T33] audit: type=1400 audit(1786492303.242:202): avc:  denied  { noatsecure } for  pid=5830 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.297547][   T33] audit: type=1400 audit(1786492303.242:203): avc:  denied  { rlimitinh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.308536][   T33] audit: type=1400 audit(1786492303.242:204): avc:  denied  { siginh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  109.345138][   T33] audit: type=1400 audit(1786492305.322:205): avc:  denied  { write } for  pid=5834 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  109.415982][   T33] audit: type=1400 audit(1786492305.392:206): avc:  denied  { write } for  pid=5837 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  109.945615][   T33] audit: type=1400 audit(1786492305.922:207): avc:  denied  { write } for  pid=5840 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.030366][   T33] audit: type=1400 audit(1786492306.002:208): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.388516][   T33] audit: type=1400 audit(1786492306.362:209): avc:  denied  { write } for  pid=5846 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.503245][   T33] audit: type=1400 audit(1786492306.472:210): avc:  denied  { write } for  pid=5849 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.922114][   T33] kauditd_printk_skb: 6 callbacks suppressed
[  112.922128][   T33] audit: type=1400 audit(1786492308.902:217): avc:  denied  { write } for  pid=5875 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.029010][   T33] audit: type=1400 audit(1786492309.002:218): avc:  denied  { write } for  pid=5878 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.223169][   T33] audit: type=1400 audit(1786492309.182:219): avc:  denied  { write } for  pid=5881 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.291973][   T33] audit: type=1400 audit(1786492309.262:220): avc:  denied  { write } for  pid=5884 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:13890' (ED25519) to the list of known hosts.
[  114.670233][   T33] audit: type=1400 audit(1786492310.642:221): avc:  denied  { write } for  pid=5894 comm="syz-executor217" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[+] Successfully opened /dev/ttyS0.
[+] Successfully opened a tty/console.
[+] Successfully opened /dev/uinput.
[+] Successfully opened /dev/ptmx.
[+] All probes successful.
[  114.688846][   T33] audit: type=1400 audit(1786492310.642:222): avc:  denied  { open } for  pid=5894 comm="syz-executor217" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
 TruncatedCrashReport: TruncatedStraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor1539453638

<...>
[  107.592284][   T33] kauditd_printk_skb: 10 callbacks suppressed
[  107.592297][   T33] audit: type=1400 audit(1786492438.237:201): avc:  denied  { transition } for  pid=5833 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.606974][   T33] audit: type=1400 audit(1786492438.237:202): avc:  denied  { noatsecure } for  pid=5833 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.617693][   T33] audit: type=1400 audit(1786492438.237:203): avc:  denied  { rlimitinh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.626803][   T33] audit: type=1400 audit(1786492438.237:204): avc:  denied  { siginh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  111.162078][   T33] audit: type=1400 audit(1786492441.807:205): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.242533][   T33] audit: type=1400 audit(1786492441.887:206): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.393861][   T33] audit: type=1400 audit(1786492442.037:207): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.468843][   T33] audit: type=1400 audit(1786492442.117:208): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.617541][   T33] audit: type=1400 audit(1786492442.267:209): avc:  denied  { write } for  pid=5854 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.689693][   T33] audit: type=1400 audit(1786492442.337:210): avc:  denied  { write } for  pid=5857 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.684141][   T33] kauditd_printk_skb: 4 callbacks suppressed
[  112.684157][   T33] audit: type=1400 audit(1786492443.327:215): avc:  denied  { write } for  pid=5872 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.761854][   T33] audit: type=1400 audit(1786492443.407:216): avc:  denied  { write } for  pid=5875 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.079916][   T33] audit: type=1400 audit(1786492443.727:217): avc:  denied  { write } for  pid=5879 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.208292][   T33] audit: type=1400 audit(1786492443.857:218): avc:  denied  { write } for  pid=5882 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.829999][   T33] audit: type=1400 audit(1786492444.477:219): avc:  denied  { write } for  pid=5889 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.923426][   T33] audit: type=1400 audit(1786492444.567:220): avc:  denied  { write } for  pid=5892 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:27831' (ED25519) to the list of known hosts.
execve("/syz-executor1539453638", ["/syz-executor1539453638"], 0x7ffd4f4d3c80 /* 11 vars */) = 0
brk(NULL)                               = 0x55555eb9e000
brk(0x55555eb9ed80)                     = 0x55555eb9ed80
arch_prctl(ARCH_SET_FS, 0x55555eb9e400) = 0
set_tid_address(0x55555eb9e6d0)         = 5907
set_robust_list(0x55555eb9e6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor1539453638", 4096) = 23
getrandom("\xf7\x3d\x22\x5c\x96\xa9\x08\x45", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x55555eb9ed80
brk(0x55555ebbfd80)                     = 0x55555ebbfd80
brk(0x55555ebc0000)                     = 0x55555ebc0000
mprotect(0x7fbe9e0f4000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/tty0", O_RDWR)   = 3
close(3)                                = 0
[  117.709781][   T33] audit: type=1400 audit(1786492448.357:221): avc:  denied  { write } for  pid=5907 comm="syz-executor153" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[  117.728286][   T33] audit: type=1400 audit(1786492448.357:222): avc:  denied  { open } for  pid=5907 comm="syz-executor153" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
openat(AT_FDCWD, "/dev/uinput", O_WRONLY|O_NONBLOCK) = 3
close(3)                                = 0
openat(AT_FDCWD, "/dev/ptmx", O_RDWR|O_NOCTTY) = 3
close(3)                                = 0
write(1, "[+] Successfully opened /dev/ttyS0.\n[+] Successfully opened a tty/console.\n[+] Successfully opened /"..., 174) = 174
exit_group(0)                           = ?
[+] Successfully opened /dev/ttyS0.
[+] Successfully opened a tty/console.
[+] Successfully opened /dev/uinput.
[+] Successfully opened /dev/ptmx.
[+] All probes successful.
+++ exited with 0 +++
]

148/3 2026/08/11 23:54 agent repro-oracle
0m Model:
best-expensive

Results:
map[Feedback:The environment probe was successful. All required devices (/dev/ttyS0, /dev/tty0, /dev/uinput, /dev/ptmx) were opened successfully. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

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

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

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


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

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


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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

IsProbe: true
Reproduced: false
Console Output: [  107.267152][   T33] kauditd_printk_skb: 10 callbacks suppressed
[  107.267167][   T33] audit: type=1400 audit(1786492303.242:201): avc:  denied  { transition } for  pid=5830 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.285349][   T33] audit: type=1400 audit(1786492303.242:202): avc:  denied  { noatsecure } for  pid=5830 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.297547][   T33] audit: type=1400 audit(1786492303.242:203): avc:  denied  { rlimitinh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.308536][   T33] audit: type=1400 audit(1786492303.242:204): avc:  denied  { siginh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  109.345138][   T33] audit: type=1400 audit(1786492305.322:205): avc:  denied  { write } for  pid=5834 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  109.415982][   T33] audit: type=1400 audit(1786492305.392:206): avc:  denied  { write } for  pid=5837 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  109.945615][   T33] audit: type=1400 audit(1786492305.922:207): avc:  denied  { write } for  pid=5840 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.030366][   T33] audit: type=1400 audit(1786492306.002:208): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.388516][   T33] audit: type=1400 audit(1786492306.362:209): avc:  denied  { write } for  pid=5846 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  110.503245][   T33] audit: type=1400 audit(1786492306.472:210): avc:  denied  { write } for  pid=5849 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.922114][   T33] kauditd_printk_skb: 6 callbacks suppressed
[  112.922128][   T33] audit: type=1400 audit(1786492308.902:217): avc:  denied  { write } for  pid=5875 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.029010][   T33] audit: type=1400 audit(1786492309.002:218): avc:  denied  { write } for  pid=5878 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.223169][   T33] audit: type=1400 audit(1786492309.182:219): avc:  denied  { write } for  pid=5881 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.291973][   T33] audit: type=1400 audit(1786492309.262:220): avc:  denied  { write } for  pid=5884 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:13890' (ED25519) to the list of known hosts.
[  114.670233][   T33] audit: type=1400 audit(1786492310.642:221): avc:  denied  { write } for  pid=5894 comm="syz-executor217" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[+] Successfully opened /dev/ttyS0.
[+] Successfully opened a tty/console.
[+] Successfully opened /dev/uinput.
[+] Successfully opened /dev/ptmx.
[+] All probes successful.
[  114.688846][   T33] audit: type=1400 audit(1786492310.642:222): avc:  denied  { open } for  pid=5894 comm="syz-executor217" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1

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

<...>
[  107.592284][   T33] kauditd_printk_skb: 10 callbacks suppressed
[  107.592297][   T33] audit: type=1400 audit(1786492438.237:201): avc:  denied  { transition } for  pid=5833 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.606974][   T33] audit: type=1400 audit(1786492438.237:202): avc:  denied  { noatsecure } for  pid=5833 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.617693][   T33] audit: type=1400 audit(1786492438.237:203): avc:  denied  { rlimitinh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  107.626803][   T33] audit: type=1400 audit(1786492438.237:204): avc:  denied  { siginh } for  pid=5833 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[  111.162078][   T33] audit: type=1400 audit(1786492441.807:205): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.242533][   T33] audit: type=1400 audit(1786492441.887:206): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.393861][   T33] audit: type=1400 audit(1786492442.037:207): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.468843][   T33] audit: type=1400 audit(1786492442.117:208): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.617541][   T33] audit: type=1400 audit(1786492442.267:209): avc:  denied  { write } for  pid=5854 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  111.689693][   T33] audit: type=1400 audit(1786492442.337:210): avc:  denied  { write } for  pid=5857 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.684141][   T33] kauditd_printk_skb: 4 callbacks suppressed
[  112.684157][   T33] audit: type=1400 audit(1786492443.327:215): avc:  denied  { write } for  pid=5872 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  112.761854][   T33] audit: type=1400 audit(1786492443.407:216): avc:  denied  { write } for  pid=5875 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.079916][   T33] audit: type=1400 audit(1786492443.727:217): avc:  denied  { write } for  pid=5879 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.208292][   T33] audit: type=1400 audit(1786492443.857:218): avc:  denied  { write } for  pid=5882 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.829999][   T33] audit: type=1400 audit(1786492444.477:219): avc:  denied  { write } for  pid=5889 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[  113.923426][   T33] audit: type=1400 audit(1786492444.567:220): avc:  denied  { write } for  pid=5892 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:27831' (ED25519) to the list of known hosts.
execve("/syz-executor1539453638", ["/syz-executor1539453638"], 0x7ffd4f4d3c80 /* 11 vars */) = 0
brk(NULL)                               = 0x55555eb9e000
brk(0x55555eb9ed80)                     = 0x55555eb9ed80
arch_prctl(ARCH_SET_FS, 0x55555eb9e400) = 0
set_tid_address(0x55555eb9e6d0)         = 5907
set_robust_list(0x55555eb9e6e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor1539453638", 4096) = 23
getrandom("\xf7\x3d\x22\x5c\x96\xa9\x08\x45", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x55555eb9ed80
brk(0x55555ebbfd80)                     = 0x55555ebbfd80
brk(0x55555ebc0000)                     = 0x55555ebc0000
mprotect(0x7fbe9e0f4000, 20480, PROT_READ) = 0
openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/tty0", O_RDWR)   = 3
close(3)                                = 0
[  117.709781][   T33] audit: type=1400 audit(1786492448.357:221): avc:  denied  { write } for  pid=5907 comm="syz-executor153" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[  117.728286][   T33] audit: type=1400 audit(1786492448.357:222): avc:  denied  { open } for  pid=5907 comm="syz-executor153" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
openat(AT_FDCWD, "/dev/uinput", O_WRONLY|O_NONBLOCK) = 3
close(3)                                = 0
openat(AT_FDCWD, "/dev/ptmx", O_RDWR|O_NOCTTY) = 3
close(3)                                = 0
write(1, "[+] Successfully opened /dev/ttyS0.\n[+] Successfully opened a tty/console.\n[+] Successfully opened /"..., 174) = 174
exit_group(0)                           = ?
[+] Successfully opened /dev/ttyS0.
[+] Successfully opened a tty/console.
[+] Successfully opened /dev/uinput.
[+] Successfully opened /dev/ptmx.
[+] All probes successful.
+++ exited with 0 +++

Crash Report: 


149/4 2026/08/11 23:54 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11945
							output: 87
							thoughts: 169
						

Thoughts:
**My Analysis of the Environment Probe Results**

Alright, let's break down what just happened with that initial environment probe. My primary task here is to rigorously analyze the output from the program I just ran. This wasn't some complex operation; it was a straightforward probe designed to check if the essential environmental components are accessible and functional.

Looking at the output:

```
[+] Successfully opened /dev/ttyS0.
[+] Successfully opened a tty/console.
[+] Successfully opened /dev/uinput.
[+] Successfully opened /dev/ptmx.
[+] All probes successful.
```

This is exactly what I was hoping to see. Each of these system devices – `/dev/ttyS0`, a general tty/console, `/dev/uinput` for input emulation, and `/dev/ptmx` for pseudo-terminals – was successfully opened. The clear message, "[+] All probes successful," confirms this.

Furthermore, the fact that the program exited with a code of `0` is a strong indicator of a clean execution. This aligns perfectly with the successful opening of all probes.

From a programmatic perspective, I'm expecting certain conditions to be met:

*   The `ProbePassed` flag *must* be `true`. Given the output, this is unequivocally the case.
*   The `TerminalError` field should be empty. There were no reported errors related to terminal access, so this condition is also satisfied.
*   The `TitleMatches` field *should* be `false`. This probe is purely diagnostic; it's not designed to trigger a specific error condition that would result in a title match. The absence of any crash or anomaly confirms this.
*   The `Feedback` should clearly convey that the environment is properly configured and ready for the next stage. Specifically, it needs to indicate that the agent should now proceed with generating the full reproducer.

Based on this analysis, my next logical step is to invoke the `set-results` tool. This tool will capture these findings and signal to the system that the environment is validated and ready for the subsequent, more complex task of generating the actual program reproducer.


150/4 2026/08/11 23:54 tool set-results
0m Args:
map[Feedback:The environment probe was successful. All required devices (/dev/ttyS0, /dev/tty0, /dev/uinput, /dev/ptmx) were opened successfully. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

Results:
map[Feedback:The environment probe was successful. All required devices (/dev/ttyS0, /dev/tty0, /dev/uinput, /dev/ptmx) were opened successfully. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

151/3 2026/08/11 23:54 action loop-controller
0m Results:
map[CapabilitiesVerified:true ContinueSignal:continue EquivalenceAnalysis: OracleFeedback:The environment probe was successful. All required devices (/dev/ttyS0, /dev/tty0, /dev/uinput, /dev/ptmx) were opened successfully. The environment is ready. Please proceed to generate the full reproducer in the next iteration. ReproC: Reproduced:false ReproducedBugTitle: ReproducedCrashReport:]

152/2 2026/08/11 23:54 iteration 2
8m
153/3 2026/08/11 23:54 action If
3m Args:
map[OracleFeedback:The environment probe was successful. All required devices (/dev/ttyS0, /dev/tty0, /dev/uinput, /dev/ptmx) were opened successfully. The environment is ready. Please proceed to generate the full reproducer in the next iteration.]

154/4 2026/08/11 23:54 agent strategy-refiner
3m Model:
best-expensive

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

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

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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Current Strategy: To trigger the `console_lock` -> `&buf->lock` dependency without relying on `/proc/sysrq-trigger` (which might be disabled or restricted), we can use the VT keyboard driver. 

The function `vc_SAK` takes `console_lock` and then calls `__do_SAK`, which takes `&buf->lock`. `vc_SAK` is scheduled by `fn_SAK`, which is triggered when the keyboard driver receives a key mapped to the `K_SAK` keysym. 

We can dynamically map a normal key (e.g., `KEY_A`) to `K_SAK` using the `KDSKBENT` ioctl on a VT device (like `/dev/tty0`). Then, we can inject a `KEY_A` keypress using a virtual input device via `/dev/uinput`. This will simulate the SAK key combination and execute `vc_SAK`, recording the required lock dependency.

### Minimal C Reproducer

```c
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/uinput.h>
#include <string.h>
#include <stdio.h>

int main(void) {
    // 1. Trigger: &tty->termios_rwsem -> &port->mutex
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }

    // 2. Trigger: console_lock -> &buf->lock
    // Map KEY_A (keycode 30) to K_SAK (0x020F)
    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    
    if (fd_tty >= 0) {
        struct kbentry ke;
        ke.kb_table = 0;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        ioctl(fd_tty, KDSKBENT, &ke);
        close(fd_tty);
    }

    // Inject KEY_A via uinput to trigger fn_SAK -> vc_SAK
    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        ioctl(ufd, UI_SET_EVBIT, EV_KEY);
        ioctl(ufd, UI_SET_KEYBIT, KEY_A);

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        ioctl(ufd, UI_DEV_SETUP, &usetup);
        ioctl(ufd, UI_DEV_CREATE);

        usleep(100000); // wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 1;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        // Release KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY;
        ie.code = KEY_A;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN;
        ie.code = SYN_REPORT;
        ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        usleep(100000); // wait for vc_SAK workqueue to execute
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    }

    // 3. Trigger: &buf->lock -> &tty->termios_rwsem
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the slave PTY triggers flush_to_ldisc on the master PTY
                write(pts, "a", 1);
                // Wait a bit for the flush_to_ldisc workqueue to execute
                usleep(100000);
                close(pts);
            }
        }
        close(ptmx);
    }

    return 0;
}
```
Feedback: The environment probe was successful. All required devices (/dev/ttyS0, /dev/tty0, /dev/uinput, /dev/ptmx) were opened successfully. The environment is ready. Please proceed to generate the full reproducer in the next iteration.

Reply:
An analysis of the lockdep splat reveals the following circular dependency chain:

1. `&port->mutex` -> `console_lock`: Established during boot when `serial8250_register_8250_port` registers the serial console. `serial_core_register_port` holds `&port->mutex` and calls `uart_configure_port`, which acquires `console_lock`.
2. `&tty->termios_rwsem` -> `&port->mutex`: Established when setting terminal attributes (e.g., `TCSETS` ioctl) on a serial port. `tty_set_termios` holds a write lock on `&tty->termios_rwsem` and calls `uart_set_termios`, which acquires `&port->mutex`.
3. `console_lock` -> `&buf->lock`: Established by the Secure Attention Key (SAK) handler. `vc_SAK` acquires `console_lock` and calls `__do_SAK`, which flushes the TTY buffers and acquires `&buf->lock`.
4. `&buf->lock` -> `&tty->termios_rwsem`: Established when receiving data on a TTY (e.g., a PTY). `flush_to_ldisc` holds `&buf->lock` and pushes data to the line discipline, calling `n_tty_receive_buf_common`, which acquires a read lock on `&tty->termios_rwsem`.

To trigger this deadlock reliably, we need to establish dependencies 2, 3, and 4 in sequence (dependency 1 is already established at boot). We can do this by:
1. Calling `TCSETS` on `/dev/ttyS0`.
2. Injecting a SAK key sequence via `uinput` to trigger `vc_SAK`. We do this in a child process because `__do_SAK` sends `SIGKILL` to processes associated with the active console.
3. Writing data to a PTY master to trigger `flush_to_ldisc` on the slave.

Here is the complete C reproducer:

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

#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/uinput.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }
}

void trigger_sak() {
    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    
    if (fd_tty >= 0) {
        // Map KEY_A to K_SAK across all keymaps to ensure it triggers
        for (int i = 0; i < 256; i++) {
            struct kbentry ke;
            ke.kb_table = i;
            ke.kb_index = 30; // KEY_A
            ke.kb_value = 0x020F; // K_SAK
            ioctl(fd_tty, KDSKBENT, &ke);
        }
        close(fd_tty);
    }

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        ioctl(ufd, UI_SET_EVBIT, EV_KEY);
        ioctl(ufd, UI_SET_KEYBIT, KEY_A);

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        ioctl(ufd, UI_DEV_SETUP, &usetup);
        ioctl(ufd, UI_DEV_CREATE);

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        // Release KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        usleep(500000); // Wait for vc_SAK workqueue to execute
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    }
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the master PTY triggers flush_to_ldisc on the slave PTY
                write(ptmx, "a", 1);
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            }
        }
        close(ptmx);
    }
}

int main(void) {
    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    waitpid(pid, NULL, 0);

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    return 0;
}
```

155/5 2026/08/11 23:54 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7493
							output: 29
							thoughts: 2371
						

Thoughts:
**My Thoughts on Debugging the `n_tty_receive_buf_common` Deadlock**

Alright, I've been diving deep into this `possible deadlock in n_tty_receive_buf_common` bug, and I think I've pieced together the lock dependency chain that's causing the issue. It's a bit of a tangled web, but here's how I'm seeing it play out:

First, the core of the problem seems to stem from the interaction between acquiring `&tty->termios_rwsem` in `n_tty_receive_buf_common` when the task already holds `&buf->lock`. Lockdep is telling me that the existing dependency chain, when read in reverse order of acquisition, is:

*   **#3: `&buf->lock`**
*   **#2: `console_lock`** (which, importantly, depends on `&buf->lock`)
*   **#1: `&port->mutex`** (which, in turn, depends on `console_lock`)
*   **#0: `&tty->termios_rwsem`** (which is the lock we're trying to acquire in the buggy path and depends on `&port->mutex`)

So, to break this down into actual lock dependencies:

1.  **`&tty->termios_rwsem` -> `&port->mutex`**: I've traced this back to the `TCSETS` ioctl call on a serial port (`/dev/ttyS0`). The path appears to be `tty_ioctl` -> `n_tty_ioctl` -> `n_tty_ioctl_helper` -> `tty_mode_ioctl` -> `set_termios` -> `tty_set_termios` (which acquires `&tty->termios_rwsem` in write mode) -> `uart_set_termios` (which acquires `&port->mutex`). This establishes the initial dependency.

2.  **`&port->mutex` -> `console_lock`**: This dependency seems to be established early on during system boot. Specifically, `serial_core_register_port` acquires `&port->mutex` and then calls `uart_configure_port`, which in turn acquires `console_lock`. Lockdep has already recorded this because it happens during the core serial port registration process.

3.  **`console_lock` -> `&buf->lock`**: This is where the virtual keyboard interrupt handler, `vc_SAK`, comes into play. When the `K_SAK` key is pressed, `vc_SAK` is scheduled. This handler acquires `console_lock()` and then calls `__do_SAK()`. Within `__do_SAK`, it iterates through associated ttys and calls `tty_ldisc_flush`, which eventually leads to `tty_buffer_flush` acquiring `&buf->lock`. This establishes the final step needed for the deadlock.

Now, the critical piece is that when `n_tty_receive_buf_common` attempts to acquire `&tty->termios_rwsem` (read lock), the task already holds `&buf->lock`. Lockdep, seeing the established chain `&tty->termios_rwsem` -> `&port->mutex` -> `console_lock` -> `&buf->lock`, is essentially saying: "You're trying to acquire a lock (`&tty->termios_rwsem`) that is depended upon by a lock you already hold (`&buf->lock`), but the dependency chain is in the wrong order for this specific acquisition path." More accurately, the bug is that `n_tty_receive_buf_common` needs `&tty->termios_rwsem` (read) *after* `flush_to_ldisc` has acquired `&buf->lock`. And `flush_to_ldisc` calls `tty_buffer_flush` which takes `&buf->lock`. The lockdep report implies a circular dependency: `&buf->lock` -> `&tty->termios_rwsem`.

The previous iteration of my attempt to reproduce this successfully probed the environment, confirming that all necessary devices (`/dev/ttyS0`, `/dev/tty0`, `/dev/uinput`, `/dev/ptmx`) were available. This means my strategy for triggering these lock acquisitions in the correct sequence is sound.

My plan is to construct a C reproducer that sequentially triggers these events:

1.  Initiate the `TCSETS` ioctl on `/dev/ttyS0` to establish the `&tty->termios_rwsem` -> `&port->mutex` dependency.
2.  Inject a virtual keypress that maps to `K_SAK` (using `/dev/uinput`) to trigger `vc_SAK` and consequently acquire `console_lock` and then `&buf->lock`.
3.  Finally, perform an operation that involves `flush_to_ldisc` (perhaps by writing to a PTY) to acquire `&buf->lock` and then attempt to acquire `&tty->termios_rwsem` in `n_tty_receive_buf_common`, thereby hitting the deadlock.

Since lockdep records dependencies globally, a sequential execution of these steps should be sufficient to expose the bug. Concurrency isn't strictly necessary for lockdep to detect the problem, and sequential execution offers better reliability in ensuring each step happens in the intended order. I'm confident that generating the full C reproducer based on this understanding will reliably trigger the deadlock.


156/5 2026/08/11 23:54 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:__do_SAK]

Results:
map[SourceCode:2997:	/*
2998:	 * This implements the "Secure Attention Key" ---  the idea is to
2999:	 * prevent trojan horses by killing all processes associated with this
3000:	 * tty when the user hits the "Secure Attention Key".  Required for
3001:	 * super-paranoid applications --- see the Orange Book for more details.
3002:	 *
3003:	 * This code could be nicer; ideally it should send a HUP, wait a few
3004:	 * seconds, then send a INT, and then a KILL signal.  But you then
3005:	 * have to coordinate with the init process, since all processes associated
3006:	 * with the current tty must be dead before the new getty is allowed
3007:	 * to spawn.
3008:	 *
3009:	 * Now, if it would be correct ;-/ The current code has a nasty hole -
3010:	 * it doesn't catch files in flight. We may send the descriptor to ourselves
3011:	 * via AF_UNIX socket, close it and later fetch from socket. FIXME.
3012:	 *
3013:	 * Nasty bug: do_SAK is being called in interrupt context.  This can
3014:	 * deadlock.  We punt it up to process context.  AKPM - 16Mar2001
3015:	 */
3016:	void __do_SAK(struct tty_struct *tty)
3017:	{
3018:		struct task_struct *g, *p;
3019:		struct pid *session;
3020:		int i;
3021:	
3022:		scoped_guard(spinlock_irqsave, &tty->ctrl.lock)
3023:			session = get_pid(tty->ctrl.session);
3024:	
3025:		tty_ldisc_flush(tty);
3026:	
3027:		tty_driver_flush_buffer(tty);
3028:	
3029:		read_lock(&tasklist_lock);
3030:		/* Kill the entire session */
3031:		do_each_pid_task(session, PIDTYPE_SID, p) {
3032:			tty_notice(tty, "SAK: killed process %d (%s): by session\n",
3033:				   task_pid_nr(p), p->comm);
3034:			group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p, PIDTYPE_SID);
3035:		} while_each_pid_task(session, PIDTYPE_SID, p);
3036:	
3037:		/* Now kill any processes that happen to have the tty open */
3038:		for_each_process_thread(g, p) {
3039:			if (p->signal->tty == tty) {
3040:				tty_notice(tty, "SAK: killed process %d (%s): by controlling tty\n",
3041:					   task_pid_nr(p), p->comm);
3042:				group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p,
3043:						PIDTYPE_SID);
3044:				continue;
3045:			}
3046:			guard(task_lock)(p);
3047:			i = iterate_fd(p->files, 0, this_tty, tty);
3048:			if (i != 0) {
3049:				tty_notice(tty, "SAK: killed process %d (%s): by fd#%d\n",
3050:					   task_pid_nr(p), p->comm, i - 1);
3051:				group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p,
3052:						PIDTYPE_SID);
3053:			}
3054:		}
3055:		read_unlock(&tasklist_lock);
3056:		put_pid(session);
3057:	}
 SourceFile:drivers/tty/tty_io.c]

157/5 2026/08/11 23:54 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10975
							output: 28
							thoughts: 34
						

Thoughts:
**My Thought Process Regarding `__do_SAK` and `vc_SAK`**

Alright, so I'm looking at this function, `__do_SAK`. My initial observation is that it expects a `struct tty_struct *tty` as its argument. This is a crucial piece of information, as it immediately tells me this function is operating at a level that interacts directly with the terminal device itself. My immediate next step, given this understanding, is to investigate how `vc_SAK` relates to this. I need to see what `vc_SAK` does and how it uses or is used in conjunction with the `tty` structure that `__do_SAK` receives. This will likely involve tracing the call chain and examining the internal workings of `vc_SAK` to understand its purpose and its connection to the Secure Access Key (SAK) mechanism within the TTY subsystem.


158/5 2026/08/11 23:54 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:vc_SAK]

Results:
map[SourceCode: 978:	void vc_SAK(struct work_struct *work)
 979:	{
 980:		struct vc *vc_con =
 981:			container_of(work, struct vc, SAK_work);
 982:		struct vc_data *vc;
 983:		struct tty_struct *tty;
 984:	
 985:		guard(console_lock)();
 986:		vc = vc_con->d;
 987:		if (!vc)
 988:			return;
 989:	
 990:		/* FIXME: review tty ref counting */
 991:		tty = vc->port.tty;
 992:		/* SAK should also work in all raw modes and reset them properly. */
 993:		if (tty)
 994:			__do_SAK(tty);
 995:		reset_vc(vc);
 996:	}
 SourceFile:drivers/tty/vt/vt_ioctl.c]

159/5 2026/08/11 23:54 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11307
							output: 20
							thoughts: 2332
						

Thoughts:
**My Thought Process on Reproducing a Lock Dependency Issue**

I've been analyzing a report detailing a circular lock dependency that occurs within the kernel's TTY (teletypewriter) subsystem. My goal is to reproduce this issue reliably so I can understand and potentially fix it. Here's how I'm approaching it, step by step, based on the information I have.

First, I need to ensure that the `vc_SAK` function, which handles the "Secure Attention Key" (SAK) event, can access the TTY device. This function expects to find a valid `tty` pointer, which it gets from `vc->port.tty`. For `vc->port.tty` to be populated, the Virtual Console (VT) associated with it must be opened. Therefore, before I even think about injecting the SAK key, my absolute first step must be to open a VT device, like `/dev/tty1` or `/dev/tty0`. This guarantees that the necessary TTY structure is initialized and available.

Next, I need to understand how to trigger a specific lock dependency: `&buf->lock` acquiring `&tty->termios_rwsem`. The report indicates this chain of calls: `n_tty_receive_buf_common` -> `tty_ldisc_receive_buf` -> `tty_port_default_receive_buf` -> `receive_buf` -> `flush_to_ldisc`. The crucial part here is that `flush_to_ldisc` takes ownership of `&buf->lock`. Subsequently, it calls into the TTY receive path, eventually leading to `n_tty_receive_buf_common`, which acquires a read lock on `&tty->termios_rwsem`. This entire sequence is triggered when data is received on a TTY and passed to the line discipline.

A PTY (pseudo-terminal) is an ideal mechanism to simulate this TTY data reception. I can set up a PTY by opening the master (`/dev/ptmx`), granting and unlocking the slave using `grantpt` and `unlockpt`, and then opening the slave. Once that's done, I can write data to *either* the master or the slave. My understanding is that if I write to the master, the data flows to the slave's receive buffer, and `flush_to_ldisc` is scheduled for the slave. Conversely, writing to the slave sends data to the master's receive buffer, scheduling `flush_to_ldisc` for the master. Regardless of the direction, `flush_to_ldisc` will eventually execute, acquire `&buf->lock`, and then proceed to acquire `&tty->termios_rwsem`, thus establishing the `&buf->lock` -> `&tty->termios_rwsem` dependency.

Now, I need to establish the second lock dependency: `&tty->termios_rwsem` acquiring `&port->mutex`. The call trace here is: `uart_set_termios` -> `tty_set_termios` -> `set_termios` -> `tty_mode_ioctl` -> `n_tty_ioctl_helper` -> `n_tty_ioctl` -> `tty_ioctl`. The key observation is that `tty_set_termios` first acquires a write lock on `&tty->termios_rwsem`. Following that, it invokes the TTY driver's operations, specifically `tty->ops->set_termios`, which in turn calls `uart_set_termios`. This `uart_set_termios` function then acquires `&port->mutex`. This entire sequence is triggered when I execute the `TCSETS` ioctl on a serial port, such as `/dev/ttyS0`.

With these pieces understood, I can formulate the sequence of actions to trigger the circular dependency.

1.  **Establish `&tty->termios_rwsem` -> `&port->mutex`:** I'll open `/dev/ttyS0` and perform a `TCSETS` ioctl. This will ensure the `termios_rwsem` is locked (in write mode), and then the driver's `set_termios` operation will acquire the `port->mutex`.

2.  **Establish `&buf->lock` -> `&tty->termios_rwsem`:** I'll use a PTY. I'll open `/dev/ptmx`, set up the slave, and then write some data to the PTY master. This will trigger `flush_to_ldisc`, which will acquire `&buf->lock` and then `&tty->termios_rwsem` (in read mode).

3.  **Establish `console_lock` -> `&buf->lock` and trigger the final link:** This is where it gets tricky. The SAK mechanism is involved. I need to first configure a key (e.g., `KEY_A`) to act as the SAK on a VT device. I'll open `/dev/tty1` and use the `KDSKBENT` ioctl with `KEY_A` mapped to `K_SAK`. Then, I'll inject `KEY_A` using a `uinput` device. This injection will lead to `fn_SAK`, then `vc_SAK`. `vc_SAK` acquires the `console_lock` and then calls `__do_SAK`. Crucially, `__do_SAK` calls `tty_ldisc_flush`, which acquires `&buf->lock`. This establishes the `console_lock` -> `&buf->lock` dependency.

The critical realization comes when I consider the order. If I perform the SAK injection *after* the `TCSETS` ioctl and the PTY data write, the circular dependency will be completed at the point `vc_SAK` acquires `console_lock` and then `__do_SAK` calls `tty_ldisc_flush` which acquires `&buf->lock`. At this point, the complete chain `&tty->termios_rwsem` -> `&port->mutex` (from step 1), `&buf->lock` -> `&tty->termios_rwsem` (from step 2), and `console_lock` -> `&buf->lock` (from step 3) will be established. Lockdep, being active, should then detect the circular dependency and print the splat.

However, there's a significant pitfall with the SAK injection: `__do_SAK` sends `SIGKILL` to processes associated with the TTY. If my reproducer process has `/dev/tty1` open as its controlling terminal, it will be killed. This is problematic if I want the reproducer to run to completion and observe the lockdep output.

My initial thought was to fork a child process to handle the SAK injection. The child would be killed, but the parent might survive. But `SIGKILL` cannot be caught or ignored, so even a child might not be the cleanest solution. Another thought was to ignore the signal, but that's not possible.

The most elegant solution, given that lockdep prints the splat *immediately* upon detecting the circular dependency, is to perform the SAK injection as the *very last step* in my sequence. The `vc_SAK` function runs in a workqueue thread, so that thread will be the one to detect the circular dependency and print the splat. Even though my reproducer process will be killed by `SIGKILL` shortly after, the lockdep splat will already have been printed to the kernel logs. This means I don't need a complex fork or signal handling. I can just let the process die after the SAK is injected, knowing the crucial information has been captured.

So, the refined sequence of actions is:

1.  Execute a `TCSETS` ioctl on `/dev/ttyS0` to establish `&tty->termios_rwsem` -> `&port->mutex`.
2.  Write data to a PTY master to trigger `flush_to_ldisc` and establish `&buf->lock` -> `&tty->termios_rwsem`.
3.  Map `KEY_A` to `K_SAK` on `/dev/tty1`.
4.  Inject `KEY_A` via `uinput` to trigger `vc_SAK` and establish `console_lock` -> `&buf->lock`, completing the circular dependency.
5.  Allow the reproducer process to be killed by the `SIGKILL` signal as a consequence of the SAK.

I'll need to be mindful of the necessary capabilities (like `CAP_SYS_TTY_CONFIG` for `KDSKBENT`, which syzkaller usually has by default as root) and ensure sufficient delays (`usleep`) are in place to allow the kernel's asynchronous operations (like workqueue execution) to complete between steps. I'll also verify the exact value for `K_SAK` from the relevant kernel headers.


160/5 2026/08/11 23:55 tool grepper
0m Args:
map[Expression:#define K_SAK]

Results:
map[Output:include/uapi/linux/keyboard.h-322-#define K_COMPOSE	K(KT_SPEC,14)
include/uapi/linux/keyboard.h:323:#define K_SAK		K(KT_SPEC,15)
include/uapi/linux/keyboard.h-324-#define K_DECRCONSOLE	K(KT_SPEC,16)
]

161/5 2026/08/11 23:55 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13753
							output: 18
							thoughts: 16
						

Thoughts:
**My Thought Process for Verifying `K(KT_SPEC, 15)`**

Alright, so my first inclination is to directly interrogate this value: `K(KT_SPEC, 15)`. My immediate thought is, "What exactly *is* this `K` function, and what does it represent in the context of `KT_SPEC`? And what's the significance of the number `15`?" I'm assuming `KT_SPEC` is some kind of defined set, specification, or perhaps a data structure that holds relevant parameters or entities. The `K` function, given its common use in mathematical and computational contexts, likely signifies some form of operation, transformation, or retrieval. The argument `15` could be an index, a specific parameter value, a threshold, or even a particular instance or iteration.

My next step would be to delve into the definition of `K` as it pertains to `KT_SPEC`. I'd be looking for its formal definition – is it a known algorithm, a custom function, or an inherent property? Does it operate on the *entirety* of `KT_SPEC`, or on a specific subset or element dictated by the `15`? I need to understand its input and output. What data types does it expect, and what does it produce? Is the output a scalar value, a vector, a matrix, a boolean, or something else entirely?

Then, I need to contextualize the `15`. If `KT_SPEC` is a sequence or an array-like structure, then `15` is almost certainly an index. In that case, I'd be focusing on the *fifteenth* element or aspect of `KT_SPEC` and how the function `K` interacts with it. If `KT_SPEC` is more abstract, `15` could be a key, a specific attribute, or a condition. My mind immediately jumps to thinking about the *validity* of `15` within the bounds of `KT_SPEC`. Is `15` a valid index? Does `KT_SPEC` even *have* 15 elements or define a parameter with that label?

Ultimately, my goal in checking `K(KT_SPEC, 15)` is to ascertain its *meaning and effect* within the larger system or problem I'm addressing. I'm trying to understand if this particular invocation is:

*   **Correct:** Does it represent a valid operation?
*   **Relevant:** Does it contribute to the desired outcome?
*   **Consistent:** Does it align with established principles or previous calculations?
*   **Efficient:** Is this the most direct or optimized way to achieve whatever it's supposed to do?

So, the thought process is essentially: dissect the components (`K`, `KT_SPEC`, `15`), understand their individual roles, and then synthesize that understanding to grasp the overall implication of the expression `K(KT_SPEC, 15)`. It's a diagnostic step, a sanity check, and a gateway to further analysis or action.


162/5 2026/08/11 23:55 tool grepper
0m Args:
map[Expression:#define K\(]

Results:
map[Output:arch/x86/crypto/serpent-sse2-i586-asm_32.S-41-
arch/x86/crypto/serpent-sse2-i586-asm_32.S:42:#define K(x0, x1, x2, x3, x4, i) \
arch/x86/crypto/serpent-sse2-i586-asm_32.S-43-	get_key(i, 0, x4); \
--
crypto/serpent_generic.c-35-
crypto/serpent_generic.c:36:#define K(x0, x1, x2, x3, i) ({				\
crypto/serpent_generic.c-37-	x3 ^= k[4*(i)+3];        x2 ^= k[4*(i)+2];	\
--
drivers/base/node.c=437=static void node_remove_caches(struct node *node) { }
--
drivers/base/node.c-439-
drivers/base/node.c:440:#define K(x) ((x) << (PAGE_SHIFT - 10))
drivers/base/node.c-441-static ssize_t node_read_meminfo(struct device *dev,
--
include/uapi/linux/keyboard.h-45-
include/uapi/linux/keyboard.h:46:#define K(t,v)		(((t)<<8)|(v))
include/uapi/linux/keyboard.h-47-#define KTYP(x)		((x) >> 8)
--
kernel/debug/kdb/kdb_main.c=2383=static int kdb_summary(int argc, const char **argv)
--
kernel/debug/kdb/kdb_main.c-2414-	/* Display in kilobytes */
kernel/debug/kdb/kdb_main.c:2415:#define K(x) ((x) << (PAGE_SHIFT - 10))
kernel/debug/kdb/kdb_main.c-2416-	kdb_printf("\nMemTotal:       %8lu kB\nMemFree:        %8lu kB\n"
--
mm/internal.h=636=void set_recommended_min_free_kbytes(void);
--
mm/internal.h-640- */
mm/internal.h:641:#define K(x) ((x) << (PAGE_SHIFT-10))
mm/internal.h-642-
--
tools/testing/memblock/internal.h=9=static int memblock_debug = 1;
--
tools/testing/memblock/internal.h-13-
tools/testing/memblock/internal.h:14:#define K(x) ((x) << (PAGE_SHIFT-10))
tools/testing/memblock/internal.h-15-
]

163/5 2026/08/11 23:55 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14503
							output: 19
							thoughts: 7
						

Thoughts:
**My Internal Monologue on KT_SPEC**

Ah, so the discussion has turned to `KT_SPEC`. My mind immediately goes to its purpose and implications within our field. I'm contemplating its current state, its intended function, and whether it's truly living up to its potential or if there are areas ripe for refinement. I'm also considering its relationship with other components or frameworks we're working with – does it integrate seamlessly, or are there friction points? I'm trying to anticipate potential challenges or opportunities that arise directly from `KT_SPEC`'s presence, and perhaps even considering its future trajectory. Essentially, I'm running through a mental checklist of its significance and impact.


164/5 2026/08/11 23:55 tool grepper
0m Args:
map[Expression:#define KT_SPEC]

Results:
map[Output:include/uapi/linux/keyboard.h-30-#define KT_FN		1
include/uapi/linux/keyboard.h:31:#define KT_SPEC		2
include/uapi/linux/keyboard.h-32-#define KT_PAD		3
]

165/5 2026/08/11 23:55 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14592
							output: 27
							thoughts: 3921
						

Thoughts:
**My Journey Through Kernel Lock Dependencies and the SAK Vulnerability**

I've been deep-diving into a rather intricate kernel locking issue, and I think I've finally pieced together the complete picture. It all started with understanding a specific value: `K_SAK` being calculated as `(2 << 8) | 15`, which correctly resolves to `0x020F`. This initial calculation confirmed my understanding of a key piece of data involved.

My next step was to meticulously trace the execution flow of `tty_ldisc_flush` and `__do_SAK`. I noted that both these functions operate on a `tty` structure. `tty_ldisc_flush` itself calls `tty_buffer_flush`, which, in turn, requires access to `tty->port` and, crucially, `&buf->lock`. This confirmed my initial hypothesis that `__do_SAK`, through its call to `tty_ldisc_flush`, would indeed acquire `&buf->lock`. The presence of `tty->port` for devices like `/dev/tty1` was a crucial detail here.

A critical question then arose: could the `vc_SAK` function, which is central to this problem, be prevented from executing if a `SAK_work` item was already pending? My thought was that a simple delay after injecting the key might resolve this. I also considered the importance of ensuring the input device was properly registered, recalling that a `usleep(100000)` after `UI_DEV_CREATE` usually suffices for this.

The core of the puzzle, however, lay in identifying *all* the ways `console_lock` could lead to the acquisition of `&buf->lock`, and how this might interact with other lock dependencies. The report provided a vital clue: the stack traces showed that `console_lock` was being acquired within `uart_configure_port`. This was a significant deviation from my initial expectation.

Then, I noticed how the report detailed the lock acquisition stacks *for each lock that established the dependency*. This was the key to understanding the chain:

1.  **`&buf->lock` acquisition:** This was clearly established within `__do_SAK`, which then called `tty_ldisc_flush`. This function, as I'd confirmed, eventually leads to `tty_buffer_flush` acquiring `&buf->lock`.
2.  **`console_lock` acquisition:** The report showed this happening in `uart_configure_port`. This, in turn, meant that `serial_core_register_port` must have held `&port->mutex` beforehand. This establishes the dependency `&port->mutex` -> `console_lock`.
3.  **`&port->mutex` acquisition:** This was found to be held by `uart_set_termios`, which was called by `tty_set_termios`, which in turn holds `&tty->termios_rwsem`. This creates the dependency `&tty->termios_rwsem` -> `&port->mutex`.
4.  **`&tty->termios_rwsem` acquisition:** This was happening in `n_tty_receive_buf_common`, which is called by `flush_to_ldisc`. Crucially, `flush_to_ldisc` acquires `&buf->lock` *before* calling `n_tty_receive_buf_common`. This establishes the final link in the chain: `&buf->lock` -> `&tty->termios_rwsem`.

My analysis of these four dependencies aligned perfectly with the report:

*   `&port->mutex` -> `console_lock`
*   `&tty->termios_rwsem` -> `&port->mutex`
*   `console_lock` -> `&buf->lock`
*   `&buf->lock` -> `&tty->termios_rwsem`

This forms a perfect circular dependency, a deadlock waiting to happen! The report's phrasing, "which lock already depends on the new lock," indicated the precise order lockdep was observing. The `&tty->termios_rwsem` acquisition was the "new lock" in `n_tty_receive_buf_common`, and the task already held `&buf->lock` in `flush_to_ldisc`. Therefore, the dependency being added was `&buf->lock` -> `&tty->termios_rwsem`.

I realized that the *order in which these dependencies are established* is critical for triggering the lockdep splat. While lockdep tracks all established dependencies, the *last one* to be established is the one that completes the circle and causes the crash. So, if `&buf->lock` -> `&tty->termios_rwsem` were established first, followed by `&tty->termios_rwsem` -> `&port->mutex`, and then `console_lock` -> `&buf->lock`, the circle would be completed by the third step, triggering the splat.

I also confirmed that the dependency `&port->mutex` -> `console_lock` is established at boot time, specifically during `serial8250_register_8250_port`, meaning I wouldn't need to explicitly trigger this one in my reproducer.

This understanding led me to devise a specific order for triggering these dependencies in my C reproducer:

1.  Trigger `&tty->termios_rwsem` -> `&port->mutex` by performing a `TCSETS` operation on `/dev/ttyS0`. I've made this more robust by attempting to open other `/dev/ttyS*` devices if `/dev/ttyS0` isn't available.
2.  Trigger `console_lock` -> `&buf->lock` by injecting a SAK key. To mitigate potential issues where `__do_SAK` might terminate the process holding the TTY, I decided to perform this action in a child process created via `fork()`. This also involves creating a virtual input device using `/dev/uinput` for key injection.
3.  Trigger `&buf->lock` -> `&tty->termios_rwsem` by writing to the master side of a PTY, which forces data into the slave's buffer, scheduling `flush_to_ldisc`.

I spent time scrutinizing `trigger_pty` to ensure the write operation to the master (`ptmx`) correctly led to the `flush_to_ldisc` on the slave and the subsequent acquisition of `&tty->termios_rwsem`. I also considered that lockdep handles both read and write locks, and while `tty_set_termios` uses a write lock, `n_tty_receive_buf_common` uses a read lock, a circular dependency involving these is still a valid deadlock scenario.

My reproducer is now written with these steps carefully ordered, and the logic for each function seems sound, aiming to precisely replicate the sequence of lock acquisitions that leads to the kernel panic. I'm confident this covers the entire dependency chain and provides a reliable way to demonstrate the vulnerability.


166/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:tioclinux]

Results:
map[SourceCode:3561:	int tioclinux(struct tty_struct *tty, unsigned long arg)
3562:	{
3563:		char type, data;
3564:		char __user *p = (char __user *)arg;
3565:		void __user *param_aligned32 = (u32 __user *)arg + 1;
3566:		void __user *param = (void __user *)arg + 1;
3567:		int lines;
3568:		int ret;
3569:	
3570:		if (current->signal->tty != tty && !capable(CAP_SYS_ADMIN))
3571:			return -EPERM;
3572:		if (get_user(type, p))
3573:			return -EFAULT;
3574:		ret = 0;
3575:	
3576:		switch (type) {
3577:		case TIOCL_SETSEL:
3578:			return set_selection_user(param, tty);
3579:		case TIOCL_PASTESEL:
3580:			if (!capable(CAP_SYS_ADMIN))
3581:				return -EPERM;
3582:			return paste_selection(tty);
3583:		case TIOCL_UNBLANKSCREEN:
3584:			scoped_guard(console_lock)
3585:				unblank_screen();
3586:			break;
3587:		case TIOCL_SELLOADLUT:
3588:			if (!capable(CAP_SYS_ADMIN))
3589:				return -EPERM;
3590:			return sel_loadlut(param_aligned32);
3591:		case TIOCL_GETSHIFTSTATE:
3592:			/*
3593:			 * Make it possible to react to Shift+Mousebutton. Note that
3594:			 * 'shift_state' is an undocumented kernel-internal variable;
3595:			 * programs not closely related to the kernel should not use
3596:			 * this.
3597:			 */
3598:			data = vt_get_shift_state();
3599:			return put_user(data, p);
3600:		case TIOCL_GETMOUSEREPORTING:
3601:			scoped_guard(console_lock)	/* May be overkill */
3602:				data = mouse_reporting();
3603:			return put_user(data, p);
3604:		case TIOCL_SETVESABLANK:
3605:			return set_vesa_blanking(param);
3606:		case TIOCL_GETKMSGREDIRECT:
3607:			data = vt_get_kmsg_redirect();
3608:			return put_user(data, p);
3609:		case TIOCL_SETKMSGREDIRECT:
3610:			if (!capable(CAP_SYS_ADMIN))
3611:				return -EPERM;
3612:	
3613:			if (get_user(data, p+1))
3614:				return -EFAULT;
3615:	
3616:			vt_kmsg_redirect(data);
3617:	
3618:			break;
3619:		case TIOCL_GETFGCONSOLE:
3620:			/*
3621:			 * No locking needed as this is a transiently correct return
3622:			 * anyway if the caller hasn't disabled switching.
3623:			 */
3624:			return fg_console;
3625:		case TIOCL_SCROLLCONSOLE:
3626:			if (get_user(lines, (s32 __user *)param_aligned32))
3627:				return -EFAULT;
3628:	
3629:			/*
3630:			 * Needs the console lock here. Note that lots of other calls
3631:			 * need fixing before the lock is actually useful!
3632:			 */
3633:			scoped_guard(console_lock)
3634:				scrollfront(vc_cons[fg_console].d, lines);
3635:			break;
3636:		case TIOCL_BLANKSCREEN:	/* until explicitly unblanked, not only poked */
3637:			scoped_guard(console_lock) {
3638:				ignore_poke = 1;
3639:				do_blank_screen(0);
3640:			}
3641:			break;
3642:		case TIOCL_BLANKEDSCREEN:
3643:			return console_blanked;
3644:		case TIOCL_GETBRACKETEDPASTE:
3645:			return get_bracketed_paste(tty);
3646:		default:
3647:			return -EINVAL;
3648:		}
3649:	
3650:		return ret;
3651:	}
 SourceFile:drivers/tty/vt/vt.c]

167/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19877
							output: 27
							thoughts: 23
						

Thoughts:
**A Deep Dive into `paste_selection` and its Locking Mechanism**

My immediate thought upon encountering the phrase "`paste_selection` takes `&buf->lock`?" is one of cautious inquiry. As an expert in this domain, I know that such a question usually signals a need to scrutinize the intricate details of resource management and concurrency control within our codebase. My mental alarm bells are ringing, prompting me to investigate *why* this particular function might be acquiring a lock from a buffer. This isn't a trivial observation; it implies a dependency and a potential point of contention that needs thorough examination.

My next step is, naturally, to "check `paste_selection`." This isn't a casual glance. For me, this means initiating a comprehensive code review of the `paste_selection` function. I'm not just looking at its immediate signature and the lines of code directly within it. My focus will be on understanding its entire operational context.

Specifically, I'll be asking myself:

*   **What is the fundamental purpose of `paste_selection`?** Understanding its role in the system's workflow is paramount. Is it involved in copying data between different parts of the buffer, between buffers, or perhaps interacting with external systems? The "paste" operation itself suggests data manipulation, which inherently carries risks of race conditions.
*   **Why does it need a lock, and specifically *that* lock (`&buf->lock`)?** This is the core of my initial question. The presence of `&buf->lock` tells me that `paste_selection` is operating on or in relation to a specific buffer, and it needs to ensure exclusive access to that buffer's data or internal state. I'll be dissecting the code to identify *which* parts of the buffer's state are being accessed and modified. Is it the buffer's contents, its size, its metadata, or perhaps pointers to its internal structures?
*   **What are the potential concurrency issues that this lock is designed to prevent?** My expertise allows me to anticipate problems. Is this lock preventing data corruption if multiple threads try to paste into the same buffer simultaneously? Is it ensuring the atomicity of the paste operation, so it's either fully completed or not at all, from the perspective of other threads? Is it synchronizing with other operations that might be modifying the buffer concurrently, like reading, writing, or even resizing?
*   **What is the scope of the lock?** Does `paste_selection` acquire the lock at the very beginning and hold it until the very end, or are there more granular locking strategies in play? A broad lock can be a bottleneck, while overly granular locking can lead to deadlocks. I need to assess this trade-off.
*   **Are there any edge cases or specific scenarios where this lock might be problematic?** I'll be thinking about situations like:
    *   What happens if the `paste_selection` operation itself takes a long time? Will it block other essential operations on the buffer?
    *   Could this lock introduce a deadlock if another function that calls `paste_selection` also tries to acquire `&buf->lock` (or a related lock) in a different order?
    *   Are there any situations where the lock might *not* be acquired, leading to potential race conditions that the current design might have missed?
    *   How does this lock interact with other locking mechanisms in the system that might also be operating on the same buffer or related data structures?
*   **Is the locking mechanism correctly implemented?** Beyond just *having* a lock, I'll be verifying its usage. Is it acquired and released properly? Are there any potential paths where it might be missed? Are there any assertions or checks in place to validate the lock's state before operations?

In essence, "checking `paste_selection`" is my signal to embark on a thorough, critical analysis of how this function interacts with buffer resources in a concurrent environment. It's about understanding the 'why' behind the design decision to acquire this specific lock and ensuring that this mechanism is robust, efficient, and free from exploitable concurrency flaws. My goal is to confirm that the `&buf->lock` acquisition is a well-reasoned and correctly implemented safeguard.


168/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:paste_selection]

Results:
map[SourceCode: 384:	/* Insert the contents of the selection buffer into the
 385:	 * queue of the tty associated with the current console.
 386:	 * Invoked by ioctl().
 387:	 *
 388:	 * Locking: called without locks. Calls the ldisc wrongly with
 389:	 * unsafe methods,
 390:	 */
 391:	int paste_selection(struct tty_struct *tty)
 392:	{
 393:		struct vc_data *vc = tty->driver_data;
 394:		int	pasted = 0;
 395:		size_t count;
 396:		struct  tty_ldisc *ld;
 397:		DECLARE_WAITQUEUE(wait, current);
 398:		int ret = 0;
 399:	
 400:		bool bp = vc->vc_bracketed_paste;
 401:		static const char bracketed_paste_start[] = "\033[200~";
 402:		static const char bracketed_paste_end[]   = "\033[201~";
 403:		const char *bps = bp ? bracketed_paste_start : NULL;
 404:		const char *bpe = bp ? bracketed_paste_end : NULL;
 405:	
 406:		scoped_guard(console_lock)
 407:			poke_blanked_console();
 408:	
 409:		ld = tty_ldisc_ref_wait(tty);
 410:		if (!ld)
 411:			return -EIO;	/* ldisc was hung up */
 412:		tty_buffer_lock_exclusive(&vc->port);
 413:	
 414:		add_wait_queue(&vc->paste_wait, &wait);
 415:		mutex_lock(&vc_sel.lock);
 416:		while (vc_sel.buffer && (vc_sel.buf_len > pasted || bpe)) {
 417:			set_current_state(TASK_INTERRUPTIBLE);
 418:			if (signal_pending(current)) {
 419:				ret = -EINTR;
 420:				break;
 421:			}
 422:			if (tty_throttled(tty)) {
 423:				mutex_unlock(&vc_sel.lock);
 424:				schedule();
 425:				mutex_lock(&vc_sel.lock);
 426:				continue;
 427:			}
 428:			__set_current_state(TASK_RUNNING);
 429:	
 430:			if (bps) {
 431:				bps += tty_ldisc_receive_buf(ld, bps, NULL, strlen(bps));
 432:				if (*bps != '\0')
 433:					continue;
 434:				bps = NULL;
 435:			}
 436:	
 437:			count = vc_sel.buf_len - pasted;
 438:			if (count) {
 439:				pasted += tty_ldisc_receive_buf(ld, vc_sel.buffer + pasted,
 440:								NULL, count);
 441:				if (vc_sel.buf_len > pasted)
 442:					continue;
 443:			}
 444:	
 445:			if (bpe) {
 446:				bpe += tty_ldisc_receive_buf(ld, bpe, NULL, strlen(bpe));
 447:				if (*bpe == '\0')
 448:					bpe = NULL;
 449:			}
 450:		}
 451:		mutex_unlock(&vc_sel.lock);
 452:		remove_wait_queue(&vc->paste_wait, &wait);
 453:		__set_current_state(TASK_RUNNING);
 454:	
 455:		tty_buffer_unlock_exclusive(&vc->port);
 456:		tty_ldisc_deref(ld);
 457:		return ret;
 458:	}
 SourceFile:drivers/tty/vt/selection.c]

169/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21059
							output: 29
							thoughts: 103
						

Thoughts:
**A Deep Dive into My Reasoning on Console Locking and Selection Handling**

Alright, let's trace this out in my head. I'm looking at `paste_selection` and trying to untangle the locking mechanisms it employs. My initial thought, a moment of almost alarm, is: "Wait a minute, `paste_selection` calls `tty_buffer_lock_exclusive(&vc->port)`. And `vc->port` *is* `&buf->lock`!" So, on the surface, it looks like `paste_selection` is acquiring `&buf->lock`.

But then I scrutinize it further, and my thought process shifts. The critical observation is that `paste_selection` *doesn't hold* `console_lock` when it acquires `&buf->lock`. It *does* grab `console_lock` for a fleeting moment, specifically to call `poke_blanked_console`. However, and this is the crucial part, it *releases* `console_lock` immediately after that call.

This means, in my understanding, the expected lock ordering of `console_lock` followed by `&buf->lock` is *not* established by `paste_selection` in its primary operation. It's a temporary acquisition and release of `console_lock`, not a persistent hold that's then combined with `&buf->lock`.

This leads me to the next logical question that immediately springs to mind: "Okay, if `paste_selection` doesn't establish this ordering, what about `set_selection_user`? Does *that* function handle the lock hierarchy differently or in conjunction with `paste_selection`?" That's where my focus is now, trying to see if `set_selection_user` is the piece of the puzzle that ensures the correct locking order is maintained when user-initiated selection operations occur.


170/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:set_selection_user]

Results:
map[SourceCode: 176:	/**
 177:	 * set_selection_user - set the current selection.
 178:	 * @sel: user selection info
 179:	 * @tty: the console tty
 180:	 *
 181:	 * Invoked by the ioctl handle for the vt layer.
 182:	 *
 183:	 * Locking: The entire selection process is managed under the console_lock.
 184:	 * It's a lot under the lock but its hardly a performance path.
 185:	 */
 186:	int set_selection_user(const struct tiocl_selection __user *sel,
 187:			       struct tty_struct *tty)
 188:	{
 189:		struct tiocl_selection v;
 190:	
 191:		if (copy_from_user(&v, sel, sizeof(*sel)))
 192:			return -EFAULT;
 193:	
 194:		/*
 195:		 * TIOCL_SELCLEAR and TIOCL_SELPOINTER are OK to use without
 196:		 * CAP_SYS_ADMIN as they do not modify the selection.
 197:		 */
 198:		switch (v.sel_mode) {
 199:		case TIOCL_SELCLEAR:
 200:		case TIOCL_SELPOINTER:
 201:			break;
 202:		default:
 203:			if (!capable(CAP_SYS_ADMIN))
 204:				return -EPERM;
 205:		}
 206:	
 207:		return set_selection_kernel(&v, tty);
 208:	}
 SourceFile:drivers/tty/vt/selection.c]

171/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21663
							output: 29
							thoughts: 23
						

Thoughts:
**My Thought Process Regarding `set_selection_kernel` and Locking**

As I'm digging into the `set_selection_kernel` function, a core concern for me, given my expertise in this area, is how it handles concurrency and potential race conditions. My immediate thought is about its locking mechanism. I see it takes `console_lock`. This makes sense – it's a global lock that guards console-related operations.

However, my mind immediately jumps to a more granular question: does it *also* need to acquire `&buf->lock`? I'm thinking about the buffer that holds the selection itself. If `set_selection_kernel` is modifying or accessing this selection buffer, and other parts of the system might be concurrently reading from or writing to that same buffer, then simply relying on `console_lock` might not be sufficient. `console_lock` likely protects the overall console state, but the selection buffer could have its own distinct concurrency concerns.

So, my internal debate is whether the `console_lock` provides adequate protection for the selection buffer's integrity, or if there's an expectation that `set_selection_kernel` should also acquire the buffer's specific lock. This is critical because if it only uses `console_lock` and there's contention on the buffer itself, I could be introducing subtle bugs, data corruption, or unexpected behavior where the selection state becomes inconsistent. I need to be absolutely sure that every access and modification to the selection buffer is properly synchronized, and my instinct is that a dedicated buffer lock might be necessary to achieve that robustly.


172/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:set_selection_kernel]

Results:
map[SourceCode: 376:	int set_selection_kernel(struct tiocl_selection *v, struct tty_struct *tty)
 377:	{
 378:		guard(mutex)(&vc_sel.lock);
 379:		guard(console_lock)();
 380:		return vc_selection(vc_cons[fg_console].d, v, tty);
 381:	}
 SourceFile:drivers/tty/vt/selection.c]

173/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21831
							output: 27
							thoughts: 14
						

Thoughts:
**My Thought Process**

Okay, let's dive into the logic here. My primary question, the one that's really at the forefront of my mind as I'm scrutinizing this code, is whether the `vc_selection` function, in its current implementation or intended use, actually accepts `&buf->lock` as an argument.

I'm trying to understand the flow of control and the synchronization mechanisms. My assumption is that `buf->lock` is a mutex or some other form of synchronization primitive designed to protect shared data within the `buf` structure. When I see a function like `vc_selection`, which sounds like it might be involved in some sort of selection or manipulation of a buffer, I immediately wonder about its concurrency implications.

Specifically, does `vc_selection` need to acquire this lock itself to perform its operations safely? Or is the lock expected to be managed *externally* to `vc_selection`, perhaps by the caller?

If `vc_selection` *does* take `&buf->lock`, then I'm looking for how it's used. Is it passed directly to an internal locking mechanism? Is it a parameter that *indicates* a lock should be used, or is it the actual lock object itself?

If, on the other hand, `vc_selection` *doesn't* take `&buf->lock`, then my next thought is: how is `buf` being protected when `vc_selection` is operating on it? Is there another mechanism in place? Is it possible that `vc_selection` is intended to be called only in contexts where the buffer is already guaranteed to be safe (e.g., single-threaded access, or the lock is held by the caller)? This would be a critical detail for ensuring data integrity.

So, in essence, I'm tracing the dependency on synchronization primitives. The presence or absence of `&buf->lock` as an argument to `vc_selection` is a key indicator of how thread safety is being handled, and it directly impacts my understanding of potential race conditions or deadlocks.


174/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:vc_selection]

Results:
map[SourceCode:  38:	/* FIXME: all this needs locking */
  39:	static struct vc_selection {
  40:		struct mutex lock;
  41:		struct vc_data *cons;			/* must not be deallocated */
  42:		char *buffer;
  43:		unsigned int buf_len;
  44:		volatile int start;			/* cleared by clear_selection */
  45:		int end;
  46:	} vc_sel = {
 SourceFile:drivers/tty/vt/selection.c]

175/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22002
							output: 27
							thoughts: 11
						

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

Ah, so this is where my thinking diverged a bit. I was initially grappling with the concept, perhaps envisioning `vc_selection` as a data structure or a configuration parameter. But then it clicked: no, it's not a static entity I'm interacting with; it's an active component, a **function**. This realization fundamentally shifts my perspective on how I'll engage with it. I need to consider its inputs, its expected outputs, and the logic it executes, rather than just its existence or properties. This functional nature implies an operational dynamic, a process that unfolds when called upon, which is a crucial distinction for my understanding and subsequent application.


176/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:vc_selection]

Results:
map[SourceCode:  38:	/* FIXME: all this needs locking */
  39:	static struct vc_selection {
  40:		struct mutex lock;
  41:		struct vc_data *cons;			/* must not be deallocated */
  42:		char *buffer;
  43:		unsigned int buf_len;
  44:		volatile int start;			/* cleared by clear_selection */
  45:		int end;
  46:	} vc_sel = {
 SourceFile:drivers/tty/vt/selection.c]

177/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22170
							output: 18
							thoughts: 22
						

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

Ah, so that's where it is! My initial search likely led me to a general area or perhaps a related header file, and I was trying to pinpoint the exact implementation. It's good to know that the actual `vc_selection` function resides within `drivers/tty/vt/selection.c`. This clarifies its context within the Virtual Console (VT) subsystem and its role in managing selection operations. Knowing the specific file helps me now to dive deeper into its logic, understand its parameters, its return values, and how it interacts with other VT components. This is crucial for a thorough analysis.


178/5 2026/08/11 23:56 tool grepper
0m Args:
map[Expression:vc_selection\(]

Results:
map[Output:drivers/tty/vt/selection.c=251=static int vc_do_selection(struct vc_data *vc, unsigned short mode, int ps,
--
drivers/tty/vt/selection.c-337-
drivers/tty/vt/selection.c:338:static int vc_selection(struct vc_data *vc, struct tiocl_selection *v,
drivers/tty/vt/selection.c-339-		struct tty_struct *tty)
--
drivers/tty/vt/selection.c=376=int set_selection_kernel(struct tiocl_selection *v, struct tty_struct *tty)
--
drivers/tty/vt/selection.c-379-	guard(console_lock)();
drivers/tty/vt/selection.c:380:	return vc_selection(vc_cons[fg_console].d, v, tty);
drivers/tty/vt/selection.c-381-}
]

179/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22440
							output: 36
							thoughts: 11
						

Thoughts:
**My Thought Process on Inspecting `vc_selection`**

Alright, so my first instinct here, when faced with the need to understand how `vc_selection` operates, is to dive right into its source code. That's the most direct and definitive way to get a handle on its inner workings. I need to see exactly what logic it's employing, what data structures it's manipulating, and what parameters it's accepting and returning. Only by scrutinizing the code itself can I truly grasp its behavior, its limitations, and its potential for integration or modification within my own work.


180/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/selection.c Name:vc_selection]

Results:
map[SourceCode: 338:	static int vc_selection(struct vc_data *vc, struct tiocl_selection *v,
 339:			struct tty_struct *tty)
 340:	{
 341:		int ps, pe;
 342:	
 343:		poke_blanked_console();
 344:	
 345:		if (v->sel_mode == TIOCL_SELCLEAR) {
 346:			/* useful for screendump without selection highlights */
 347:			clear_selection();
 348:			return 0;
 349:		}
 350:	
 351:		/* Historically 0 => max value */
 352:		v->xs = umin(v->xs - 1, vc->vc_cols - 1);
 353:		v->ys = umin(v->ys - 1, vc->vc_rows - 1);
 354:		v->xe = umin(v->xe - 1, vc->vc_cols - 1);
 355:		v->ye = umin(v->ye - 1, vc->vc_rows - 1);
 356:	
 357:		if (mouse_reporting() && (v->sel_mode & TIOCL_SELMOUSEREPORT)) {
 358:			mouse_report(tty, v->sel_mode & TIOCL_SELBUTTONMASK, v->xs,
 359:				     v->ys);
 360:			return 0;
 361:		}
 362:	
 363:		ps = v->ys * vc->vc_size_row + (v->xs << 1);
 364:		pe = v->ye * vc->vc_size_row + (v->xe << 1);
 365:		if (ps > pe)	/* make vc_sel.start <= vc_sel.end */
 366:			swap(ps, pe);
 367:	
 368:		if (vc_sel.cons != vc) {
 369:			clear_selection();
 370:			vc_sel.cons = vc;
 371:		}
 372:	
 373:		return vc_do_selection(vc, v->sel_mode, ps, pe);
 374:	}
 SourceFile:drivers/tty/vt/selection.c]

181/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23110
							output: 38
							thoughts: 16
						

Thoughts:
**My Thought Process on `vc_do_selection` and `&buf->lock`**

Okay, so my primary concern right now is understanding the interface of this `vc_do_selection` function. Specifically, I need to determine if it expects to receive `&buf->lock` as an argument. This is a critical point for me because the implications for locking and concurrency management are significant.

If `vc_do_selection` *does* take `&buf->lock`, it suggests a particular design philosophy. It implies that the caller is responsible for providing the lock object that the function will then use to protect the buffer (`buf`) it operates on. This would mean `vc_do_selection` is designed to be invoked within a context where the lock has already been acquired by the caller, or that the function itself will acquire and release the lock using the provided handle. The latter seems less likely if it's just receiving a pointer, but it's a possibility I need to keep in mind.

Conversely, if `vc_do_selection` *does not* take `&buf->lock`, my interpretation shifts. It could mean several things:

1.  **Internal Locking:** The function might have its *own* internal lock mechanism, perhaps directly accessing a global lock or a lock associated with `buf` in a way that's not exposed via the function signature. This would simplify the caller's responsibility in terms of lock management but could also lead to less granular control or potential deadlocks if not carefully implemented.
2.  **No Locking Required (or handled elsewhere):** It's possible that `vc_do_selection` operates on a buffer that is either inherently thread-safe in the context it's called, or that the locking is managed entirely *outside* of this specific function, by its callers or other upstream components. This would mean the caller is solely responsible for ensuring safe access to `buf`.
3.  **Design Flaw/Assumption:** It might be an oversight in the function's design, or it assumes a specific, implicit locking strategy that isn't immediately obvious from the signature. This is the scenario I'm most keen to avoid or identify quickly.

My next step, therefore, is to consult the function's definition, its documentation (if available), and its usage sites within the codebase. I need to see how `vc_do_selection` is called and what arguments are passed to it. This empirical evidence will be the deciding factor in whether `&buf->lock` is expected. This isn't just a syntax check; it's a deep dive into the concurrency model and the safe interaction patterns within this system.


182/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/selection.c Name:vc_do_selection]

Results:
map[SourceCode: 251:	static int vc_do_selection(struct vc_data *vc, unsigned short mode, int ps,
 252:			int pe)
 253:	{
 254:		int new_sel_start, new_sel_end, spc;
 255:		bool unicode = vt_do_kdgkbmode(fg_console) == K_UNICODE;
 256:	
 257:		switch (mode) {
 258:		case TIOCL_SELCHAR:	/* character-by-character selection */
 259:			new_sel_start = ps;
 260:			new_sel_end = pe;
 261:			break;
 262:		case TIOCL_SELWORD:	/* word-by-word selection */
 263:			spc = is_space_on_vt(sel_pos(ps, unicode));
 264:			for (new_sel_start = ps; ; ps -= 2) {
 265:				if ((spc && !is_space_on_vt(sel_pos(ps, unicode))) ||
 266:				    (!spc && !inword(sel_pos(ps, unicode))))
 267:					break;
 268:				new_sel_start = ps;
 269:				if (!(ps % vc->vc_size_row))
 270:					break;
 271:			}
 272:	
 273:			spc = is_space_on_vt(sel_pos(pe, unicode));
 274:			for (new_sel_end = pe; ; pe += 2) {
 275:				if ((spc && !is_space_on_vt(sel_pos(pe, unicode))) ||
 276:				    (!spc && !inword(sel_pos(pe, unicode))))
 277:					break;
 278:				new_sel_end = pe;
 279:				if (!((pe + 2) % vc->vc_size_row))
 280:					break;
 281:			}
 282:			break;
 283:		case TIOCL_SELLINE:	/* line-by-line selection */
 284:			new_sel_start = rounddown(ps, vc->vc_size_row);
 285:			new_sel_end = rounddown(pe, vc->vc_size_row) +
 286:				vc->vc_size_row - 2;
 287:			break;
 288:		case TIOCL_SELPOINTER:
 289:			highlight_pointer(pe);
 290:			return 0;
 291:		default:
 292:			return -EINVAL;
 293:		}
 294:	
 295:		/* remove the pointer */
 296:		highlight_pointer(-1);
 297:	
 298:		/* select to end of line if on trailing space */
 299:		if (new_sel_end > new_sel_start &&
 300:			!atedge(new_sel_end, vc->vc_size_row) &&
 301:			is_space_on_vt(sel_pos(new_sel_end, unicode))) {
 302:			for (pe = new_sel_end + 2; ; pe += 2)
 303:				if (!is_space_on_vt(sel_pos(pe, unicode)) ||
 304:				    atedge(pe, vc->vc_size_row))
 305:					break;
 306:			if (is_space_on_vt(sel_pos(pe, unicode)))
 307:				new_sel_end = pe;
 308:		}
 309:		if (vc_sel.start == -1)	/* no current selection */
 310:			highlight(new_sel_start, new_sel_end);
 311:		else if (new_sel_start == vc_sel.start)
 312:		{
 313:			if (new_sel_end == vc_sel.end)	/* no action required */
 314:				return 0;
 315:			else if (new_sel_end > vc_sel.end)	/* extend to right */
 316:				highlight(vc_sel.end + 2, new_sel_end);
 317:			else				/* contract from right */
 318:				highlight(new_sel_end + 2, vc_sel.end);
 319:		}
 320:		else if (new_sel_end == vc_sel.end)
 321:		{
 322:			if (new_sel_start < vc_sel.start) /* extend to left */
 323:				highlight(new_sel_start, vc_sel.start - 2);
 324:			else				/* contract from left */
 325:				highlight(vc_sel.start, new_sel_start - 2);
 326:		}
 327:		else	/* some other case; start selection from scratch */
 328:		{
 329:			clear_selection();
 330:			highlight(new_sel_start, new_sel_end);
 331:		}
 332:		vc_sel.start = new_sel_start;
 333:		vc_sel.end = new_sel_end;
 334:	
 335:		return vc_selection_store_chars(vc, unicode);
 336:	}
 SourceFile:drivers/tty/vt/selection.c]

183/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24642
							output: 27
							thoughts: 1533
						

Thoughts:
**My Thought Process Regarding Console Lock and SAK Triggering**

I've been wrestling with how to properly trigger the console lock mechanism and specifically the `vc_SAK` functionality. Initially, I explored whether `vc_do_selection` might offer a path, but my understanding is now that it *doesn't* accept `&buf->lock` as a parameter. This also leads me to believe that `tioclinux` doesn't establish the necessary `console_lock` to `&buf->lock` connection. The primary, and perhaps only, documented way to achieve this seems to be through `vc_SAK`.

Therefore, I've decided to focus my efforts on `vc_SAK` for demonstration purposes. I've put together a reproducer that aims to trigger this. It involves opening serial ports (`/dev/ttyS0` through `/dev/ttyS3`) and performing a `TCGETS` followed by a `TCSETS` ioctl. The intention here is to manipulate terminal settings, though I'm still investigating the precise implications of this on the console lock.

The core of the SAK triggering logic is within the `trigger_sak` function. This part attempts to open a TTY device (`/dev/tty0`, `/dev/tty1`, or `/dev/console`) and then uses the `KDSKBENT` ioctl with `K_SAK` to associate the `KEY_A` (keycode 30) with the SAK action. This part is crucial.

Following that, I'm leveraging `/dev/uinput` to create a virtual keyboard device. I configure it to emit `KEY_A` press and release events. The hope is that by simulating a key press that is configured to trigger SAK, the kernel will then invoke the `vc_SAK` mechanism. I've included a `usleep(500000)` after the `KEY_A` release, which I believe is to allow enough time for `vc_SAK` to be processed.

I've also included a `trigger_pty` function that opens `/dev/ptmx`, grants and unlocks the pseudo-terminal, and then writes to it. This is to explore potential interactions with pseudo-terminals, though its direct relevance to the console lock is something I'm still evaluating.

The `main` function orchestrates these calls, first triggering the `tcsets` logic, then forking to trigger `vc_SAK` in a child process, and finally calling `trigger_pty`.

However, I've encountered a significant concern. The `trigger_sak` sequence, particularly the `usleep(500000)`, takes about 600ms in total to execute. This leads me to wonder if `vc_SAK` is actually being executed at all. Is it possible that the `SAK_work` item isn't being scheduled, perhaps because `fg_console` isn't initialized correctly? Although, it *should* be initialized.

Another thought I've had is about the `KDSKBENT` ioctl failing. Could it be that `kb_table` being set to `0` is the issue, especially if the current keymap isn't `0`? To mitigate this, I've considered a loop to iterate through all possible `kb_table` values from `0` to `255`. This should ensure that regardless of the active modifier keys or current keymap configuration, `KEY_A` will be correctly associated with `K_SAK`.

I'm also questioning if `KEY_A` might not be keycode `30` in all kernel configurations. While `linux/input-event-codes.h` specifies `30`, I need to be mindful of how the VT keyboard driver maps input layer keycodes to its internal representation. I've been looking at `drivers/tty/vt/keyboard.c` to confirm this mapping.

Ultimately, my goal is to precisely understand and reliably trigger the console lock and SAK mechanisms. The current reproducer, while an attempt, has raised more questions than answers, prompting these further investigations into potential race conditions, initialization issues, and the specifics of keycode mapping within the kernel's VT subsystem.


184/5 2026/08/11 23:56 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:kbd_keycode]

Results:
map[SourceCode:1429:	static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
1430:	{
1431:		struct vc_data *vc = vc_cons[fg_console].d;
1432:		unsigned short keysym, *key_map;
1433:		unsigned char type;
1434:		bool raw_mode;
1435:		struct tty_struct *tty;
1436:		int shift_final;
1437:		struct keyboard_notifier_param param = { .vc = vc, .value = keycode, .down = down };
1438:		int rc;
1439:	
1440:		tty = vc->port.tty;
1441:	
1442:		if (tty && (!tty->driver_data)) {
1443:			/* No driver data? Strange. Okay we fix it then. */
1444:			tty->driver_data = vc;
1445:		}
1446:	
1447:		kbd = &kbd_table[vc->vc_num];
1448:	
1449:	#ifdef CONFIG_SPARC
1450:		if (keycode == KEY_STOP)
1451:			sparc_l1_a_state = down;
1452:	#endif
1453:	
1454:		rep = (down == 2);
1455:	
1456:		raw_mode = (kbd->kbdmode == VC_RAW);
1457:		if (raw_mode && !hw_raw)
1458:			if (emulate_raw(vc, keycode, !down << 7))
1459:				if (keycode < BTN_MISC && printk_ratelimit())
1460:					pr_warn("can't emulate rawmode for keycode %d\n",
1461:						keycode);
1462:	
1463:	#ifdef CONFIG_SPARC
1464:		if (keycode == KEY_A && sparc_l1_a_state) {
1465:			sparc_l1_a_state = false;
1466:			sun_do_break();
1467:		}
1468:	#endif
1469:	
1470:		if (kbd->kbdmode == VC_MEDIUMRAW) {
1471:			/*
1472:			 * This is extended medium raw mode, with keys above 127
1473:			 * encoded as 0, high 7 bits, low 7 bits, with the 0 bearing
1474:			 * the 'up' flag if needed. 0 is reserved, so this shouldn't
1475:			 * interfere with anything else. The two bytes after 0 will
1476:			 * always have the up flag set not to interfere with older
1477:			 * applications. This allows for 16384 different keycodes,
1478:			 * which should be enough.
1479:			 */
1480:			if (keycode < 128) {
1481:				put_queue(vc, keycode | (!down << 7));
1482:			} else {
1483:				put_queue(vc, !down << 7);
1484:				put_queue(vc, (keycode >> 7) | BIT(7));
1485:				put_queue(vc, keycode | BIT(7));
1486:			}
1487:			raw_mode = true;
1488:		}
1489:	
1490:		assign_bit(keycode, key_down, down);
1491:	
1492:		if (rep &&
1493:		    (!vc_kbd_mode(kbd, VC_REPEAT) ||
1494:		     (tty && !L_ECHO(tty) && tty_chars_in_buffer(tty)))) {
1495:			/*
1496:			 * Don't repeat a key if the input buffers are not empty and the
1497:			 * characters get aren't echoed locally. This makes key repeat
1498:			 * usable with slow applications and under heavy loads.
1499:			 */
1500:			return;
1501:		}
1502:	
1503:		param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;
1504:		param.ledstate = kbd->ledflagstate;
1505:		key_map = key_maps[shift_final];
1506:	
1507:		/*
1508:		 * Fall back to the plain map if modifiers are active, the modifier-
1509:		 * specific map is missing or has no entry, and the plain map has a
1510:		 * modifier-aware key type (KT_CUR or KT_CSI). These handlers encode
1511:		 * the modifier state into the emitted escape sequence.
1512:		 */
1513:		if (shift_final && keycode < NR_KEYS &&
1514:		    (!key_map || key_map[keycode] == K_HOLE) && key_maps[0]) {
1515:			unsigned short plain = key_maps[0][keycode];
1516:			unsigned char type = KTYP(plain);
1517:	
1518:			if (type >= 0xf0 && (type - 0xf0 == KT_CUR || type - 0xf0 == KT_CSI))
1519:				key_map = key_maps[0];
1520:		}
1521:	
1522:		rc = atomic_notifier_call_chain(&keyboard_notifier_list,
1523:						KBD_KEYCODE, &param);
1524:		if (rc == NOTIFY_STOP || !key_map) {
1525:			atomic_notifier_call_chain(&keyboard_notifier_list,
1526:						   KBD_UNBOUND_KEYCODE, &param);
1527:			do_compute_shiftstate();
1528:			kbd->slockstate = 0;
1529:			return;
1530:		}
1531:	
1532:		if (keycode < NR_KEYS)
1533:			keysym = key_map[keycode];
1534:		else if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
1535:			keysym = U(K(KT_BRL, keycode - KEY_BRL_DOT1 + 1));
1536:		else
1537:			return;
1538:	
1539:		type = KTYP(keysym);
1540:	
1541:		if (type < 0xf0) {
1542:			param.value = keysym;
1543:			rc = atomic_notifier_call_chain(&keyboard_notifier_list,
1544:							KBD_UNICODE, &param);
1545:			if (rc != NOTIFY_STOP)
1546:				if (down && !(raw_mode || kbd->kbdmode == VC_OFF))
1547:					k_unicode(vc, keysym, !down);
1548:			return;
1549:		}
1550:	
1551:		type -= 0xf0;
1552:	
1553:		if (type == KT_LETTER) {
1554:			type = KT_LATIN;
1555:			if (vc_kbd_led(kbd, VC_CAPSLOCK)) {
1556:				key_map = key_maps[shift_final ^ BIT(KG_SHIFT)];
1557:				if (key_map)
1558:					keysym = key_map[keycode];
1559:			}
1560:		}
1561:	
1562:		param.value = keysym;
1563:		rc = atomic_notifier_call_chain(&keyboard_notifier_list,
1564:						KBD_KEYSYM, &param);
1565:		if (rc == NOTIFY_STOP)
1566:			return;
1567:	
1568:		if ((raw_mode || kbd->kbdmode == VC_OFF) && type != KT_SPEC && type != KT_SHIFT)
1569:			return;
1570:	
1571:		(*k_handler[type])(vc, KVAL(keysym), !down);
1572:	
1573:		param.ledstate = kbd->ledflagstate;
1574:		atomic_notifier_call_chain(&keyboard_notifier_list, KBD_POST_KEYSYM, &param);
1575:	
1576:		if (type != KT_SLOCK)
1577:			kbd->slockstate = 0;
1578:	}
 SourceFile:drivers/tty/vt/keyboard.c]

185/5 2026/08/11 23:56 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28565
							output: 1865
							thoughts: 3215
						

Thoughts:
**The Inner Workings of My Thought Process Leading to the Reproducer**

My initial confirmation was that the `keycode` directly maps to `key_map`, and specifically that `KEY_A` with its value of 30 is indeed correct for this indexing. Further, I verified the handling of special keys: `K_SAK` is correctly identified as a `KT_SPEC` type with a value of 15. The crucial link is that `k_handler[KT_SPEC]` points to `k_spec`, and `k_spec` will subsequently call `fn_SAK` when its value matches `KVAL(K_SAK)`, which is 15. With this foundational understanding confirmed, I felt confident that my logic was sound, "100% correct."

This led me to the next phase: refining the reproducer. My focus shifted to ensuring that the sequence of operations would reliably trigger the observed lock dependency splat.

First, I considered the `trigger_pty` function. I questioned whether writing "a" to the master PTY would indeed invoke `flush_to_ldisc`. My reasoning confirmed that it would: writing to the PTY master places data into the slave's receive buffer, which in turn schedules `flush_to_ldisc` for the slave. I then preemptively addressed potential issues:
*   **Slave not opened:** I noted that the slave *is* opened (`pts = open(pts_name, ...)`), so this isn't a concern.
*   **Line discipline not set:** The default line discipline is `N_TTY`, which is perfectly acceptable for this scenario.
*   **`flush_to_ldisc` not taking `&tty->termios_rwsem`:** I traced the execution flow: `flush_to_ldisc` calls `receive_buf`, which calls `tty_port_default_receive_buf`, which calls `tty_ldisc_receive_buf`, and finally `n_tty_receive_buf_common`. Crucially, `n_tty_receive_buf_common` *does* acquire `down_read(&tty->termios_rwsem)`, confirming this path is valid.

Next, I examined `trigger_sak` and its potential interaction with console modes. I wondered if `vc_SAK` might be missed if the console were in raw mode. However, the documentation for `vc_SAK` explicitly states that "SAK should also work in all raw modes and reset them properly." Furthermore, I verified that `kbd_keycode` *does* process `KT_SPEC` events even in raw mode, due to the conditional check `if ((raw_mode || kbd->kbdmode == VC_OFF) && type != KT_SPEC && type != KT_SHIFT) return;`. This means `K_SAK` should function irrespective of the console's current mode.

I also considered the possibility of `KDSKBENT` failing, which would prevent `KEY_A` from being mapped to `K_SAK`. Given that syzkaller typically runs with root privileges, I dismissed this as an unlikely scenario.

Then, my attention turned to the specific lockdep splat and its recorded dependencies:
```
-> #3 (&buf->lock){+.+.}-{4:4}:
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
```
I meticulously checked the locking mechanisms involved:
*   `tty_buffer_flush` explicitly acquires `mutex_lock(&buf->lock)`.
*   `flush_to_ldisc` also acquires `mutex_lock(&buf->lock)`.
*   `n_tty_receive_buf_common` acquires `down_read(&tty->termios_rwsem)`.
*   `tty_set_termios` acquires `down_write(&tty->termios_rwsem)` for write operations.
*   `uart_set_termios` acquires `mutex_lock(&state->port.mutex)`.
*   `serial_core_register_port` also acquires `mutex_lock(&port_dev->mutex)`, which I confirmed to be the same lock as `state->port.mutex`.
*   `uart_configure_port` acquires `console_lock` if a console device is present.

My analysis confirmed that all the necessary locks were acquired in the correct sequence to produce the splat: `console_lock` -> `&buf->lock` -> `&tty->termios_rwsem` -> `&port->mutex`.

The final critical point was the timing and ordering of `trigger_sak` and `trigger_pty`. The inclusion of `waitpid(pid, NULL, 0)` is paramount. It ensures that the child process (executing `trigger_sak`) completes its sleep (500ms) and exits *before* `trigger_pty` begins. This guarantees that `console_lock` is recorded before `&buf->lock` is acquired, and subsequently before `&tty->termios_rwsem` is locked, establishing the required dependency chain.

Lastly, I considered `trigger_tcsets` and its potential failure to record `&tty->termios_rwsem` -> `&port->mutex`. Opening a `/dev/ttyS` device initializes the port, and the subsequent `TCSETS` ioctl invokes `tty_set_termios`, which then calls `uart_set_termios`. This confirms that the lock ordering from `tty_set_termios` should be established.

With all these checks and confirmations, I was satisfied that the reproducer was robust and accurately reflected the intended execution flow and lock dependencies.


186/3 2026/08/11 23:57 action merge-strategy
0m Results:
map[CurrentReproStrategy:An analysis of the lockdep splat reveals the following circular dependency chain:

1. `&port->mutex` -> `console_lock`: Established during boot when `serial8250_register_8250_port` registers the serial console. `serial_core_register_port` holds `&port->mutex` and calls `uart_configure_port`, which acquires `console_lock`.
2. `&tty->termios_rwsem` -> `&port->mutex`: Established when setting terminal attributes (e.g., `TCSETS` ioctl) on a serial port. `tty_set_termios` holds a write lock on `&tty->termios_rwsem` and calls `uart_set_termios`, which acquires `&port->mutex`.
3. `console_lock` -> `&buf->lock`: Established by the Secure Attention Key (SAK) handler. `vc_SAK` acquires `console_lock` and calls `__do_SAK`, which flushes the TTY buffers and acquires `&buf->lock`.
4. `&buf->lock` -> `&tty->termios_rwsem`: Established when receiving data on a TTY (e.g., a PTY). `flush_to_ldisc` holds `&buf->lock` and pushes data to the line discipline, calling `n_tty_receive_buf_common`, which acquires a read lock on `&tty->termios_rwsem`.

To trigger this deadlock reliably, we need to establish dependencies 2, 3, and 4 in sequence (dependency 1 is already established at boot). We can do this by:
1. Calling `TCSETS` on `/dev/ttyS0`.
2. Injecting a SAK key sequence via `uinput` to trigger `vc_SAK`. We do this in a child process because `__do_SAK` sends `SIGKILL` to processes associated with the active console.
3. Writing data to a PTY master to trigger `flush_to_ldisc` on the slave.

Here is the complete C reproducer:

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

#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/uinput.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }
}

void trigger_sak() {
    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    
    if (fd_tty >= 0) {
        // Map KEY_A to K_SAK across all keymaps to ensure it triggers
        for (int i = 0; i < 256; i++) {
            struct kbentry ke;
            ke.kb_table = i;
            ke.kb_index = 30; // KEY_A
            ke.kb_value = 0x020F; // K_SAK
            ioctl(fd_tty, KDSKBENT, &ke);
        }
        close(fd_tty);
    }

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        ioctl(ufd, UI_SET_EVBIT, EV_KEY);
        ioctl(ufd, UI_SET_KEYBIT, KEY_A);

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        ioctl(ufd, UI_DEV_SETUP, &usetup);
        ioctl(ufd, UI_DEV_CREATE);

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        // Release KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        usleep(500000); // Wait for vc_SAK workqueue to execute
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    }
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the master PTY triggers flush_to_ldisc on the slave PTY
                write(ptmx, "a", 1);
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            }
        }
        close(ptmx);
    }
}

int main(void) {
    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    waitpid(pid, NULL, 0);

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    return 0;
}
```]

187/3 2026/08/11 23:57 agent repro-generator
3m Model:
best-expensive

Results:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
}]

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

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


=== PHASE 2: BUG REPRODUCTION (GENERATION) ===
You must now generate a full reproducer candidate attempting to trigger the target bug/crash.
Do NOT generate a probe program. Focus directly on triggering the bug/crash described in the description.
You can assume that all necessary kernel capabilities and privileges (e.g., access to /dev/vhci,
ability to load BPF programs, etc.) have already been verified and are available in the environment.

Do not spend too much time analyzing or trying to generate a perfect one-shot reproducer.
Instead, follow an iterative approach: generate a simple candidate, execute it, analyze the results,
and improve it. Keep your reasoning steps short and focused on the next logical experiment.

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


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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Strategy: An analysis of the lockdep splat reveals the following circular dependency chain:

1. `&port->mutex` -> `console_lock`: Established during boot when `serial8250_register_8250_port` registers the serial console. `serial_core_register_port` holds `&port->mutex` and calls `uart_configure_port`, which acquires `console_lock`.
2. `&tty->termios_rwsem` -> `&port->mutex`: Established when setting terminal attributes (e.g., `TCSETS` ioctl) on a serial port. `tty_set_termios` holds a write lock on `&tty->termios_rwsem` and calls `uart_set_termios`, which acquires `&port->mutex`.
3. `console_lock` -> `&buf->lock`: Established by the Secure Attention Key (SAK) handler. `vc_SAK` acquires `console_lock` and calls `__do_SAK`, which flushes the TTY buffers and acquires `&buf->lock`.
4. `&buf->lock` -> `&tty->termios_rwsem`: Established when receiving data on a TTY (e.g., a PTY). `flush_to_ldisc` holds `&buf->lock` and pushes data to the line discipline, calling `n_tty_receive_buf_common`, which acquires a read lock on `&tty->termios_rwsem`.

To trigger this deadlock reliably, we need to establish dependencies 2, 3, and 4 in sequence (dependency 1 is already established at boot). We can do this by:
1. Calling `TCSETS` on `/dev/ttyS0`.
2. Injecting a SAK key sequence via `uinput` to trigger `vc_SAK`. We do this in a child process because `__do_SAK` sends `SIGKILL` to processes associated with the active console.
3. Writing data to a PTY master to trigger `flush_to_ldisc` on the slave.

Here is the complete C reproducer:

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

#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/uinput.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            ioctl(fd_serial, TCSETS, &term);
        }
        close(fd_serial);
    }
}

void trigger_sak() {
    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    
    if (fd_tty >= 0) {
        // Map KEY_A to K_SAK across all keymaps to ensure it triggers
        for (int i = 0; i < 256; i++) {
            struct kbentry ke;
            ke.kb_table = i;
            ke.kb_index = 30; // KEY_A
            ke.kb_value = 0x020F; // K_SAK
            ioctl(fd_tty, KDSKBENT, &ke);
        }
        close(fd_tty);
    }

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        ioctl(ufd, UI_SET_EVBIT, EV_KEY);
        ioctl(ufd, UI_SET_KEYBIT, KEY_A);

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        ioctl(ufd, UI_DEV_SETUP, &usetup);
        ioctl(ufd, UI_DEV_CREATE);

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        // Release KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        write(ufd, &ie, sizeof(ie));

        usleep(500000); // Wait for vc_SAK workqueue to execute
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    }
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        grantpt(ptmx);
        unlockpt(ptmx);
        char *pts_name = ptsname(ptmx);
        if (pts_name) {
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                // Writing to the master PTY triggers flush_to_ldisc on the slave PTY
                write(ptmx, "a", 1);
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            }
        }
        close(ptmx);
    }
}

int main(void) {
    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    waitpid(pid, NULL, 0);

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    return 0;
}
```


Previous Reproducer Attempt:
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(void) {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) {
        printf("[-] Failed to open /dev/ttyS0: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ttyS0.\n");
    close(fd_serial);

    int fd_tty = open("/dev/tty0", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/tty1", O_RDWR);
    if (fd_tty < 0) fd_tty = open("/dev/console", O_RDWR);
    if (fd_tty < 0) {
        printf("[-] Failed to open /dev/tty0, /dev/tty1, and /dev/console: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened a tty/console.\n");
    close(fd_tty);

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd < 0) {
        printf("[-] Failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/uinput.\n");
    close(ufd);

    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx < 0) {
        printf("[-] Failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Successfully opened /dev/ptmx.\n");
    close(ptmx);

    printf("[+] All probes successful.\n");
    return 0;
}



Execution Results & Debugging Feedback:
The environment probe was successful. All required devices (/dev/ttyS0, /dev/tty0, /dev/uinput, /dev/ptmx) were opened successfully. The environment is ready. Please proceed to generate the full reproducer in the next iteration.

188/4 2026/08/11 23:57 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9016
							output: 28
							thoughts: 1205
						

Thoughts:
**My Thought Process on Generating a Circular Locking Dependency Reproducer**

The core of my current focus is on creating a concrete C reproducer for a specific circular locking dependency identified by lockdep within the `n_tty_receive_buf_common` function. The lockdep output clearly indicates a problematic chain: `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`.

My task is to meticulously trace how these locks are acquired in sequence to understand the conditions that lead to this deadlock. I've broken down the reported lock dependencies into individual steps and am scrutinizing the call stacks associated with each:

1.  **`&tty->termios_rwsem` -> `&port->mutex`**: This link is established when `TCSETS` is issued on a serial port, which calls `set_termios` and ultimately `tty_set_termios`, leading to the acquisition of `&tty->termios_rwsem` and `&port->mutex`.

2.  **`&port->mutex` -> `console_lock`**: This dependency seems to be in play during the boot process or port registration. The trace indicates `uart_configure_port` acquiring `console_lock` while `&port->mutex` is already held.

3.  **`console_lock` -> `&buf->lock`**: This is where my investigation gets a bit more complex, and I'm double-checking the provided traces. The initial understanding was that `console_lock` directly precedes `&buf->lock` in the problematic chain. However, when I look at Trace #3, which is associated with `&buf->lock`, I see the following path: `vc_SAK` -> `__do_SAK` -> `tty_ldisc_flush` -> `tty_buffer_flush` which then acquires `&buf->lock`.

    The key question here is how `console_lock` gets involved in this particular path. I recall that `vc_SAK` is a workqueue function. My initial thought was that `vc_SAK` itself might acquire `console_lock`. I need to verify this by checking the source code of `vc_SAK`. It's possible that `vc_SAK` is called in a context where `console_lock` is already held, or it acquires `console_lock` before proceeding to call `__do_SAK` which then leads to `tty_ldisc_flush` and acquisition of `&buf->lock`.

4.  **`&buf->lock` -> `&tty->termios_rwsem`**: This dependency is established later in the data path. Specifically, it occurs within `n_tty_receive_buf_common` when `flush_to_ldisc` calls `receive_buf`, which then calls `n_tty_receive_buf_common`. During this process, `&buf->lock` is acquired, and then the function proceeds to interact with `&tty->termios_rwsem`.

The bug report's chain (`&tty->termios_rwsem` --> `console_lock` --> `&buf->lock`) suggests a direct sequence. My detailed examination of the traces is helping me confirm or refine this sequence. The critical part is connecting the `console_lock` acquisition within the `vc_SAK` path to the `&buf->lock` acquisition. Once I can definitively establish how `console_lock` leads to the acquisition of `&buf->lock` in the context of the `vc_SAK` work item, and how that fits within the broader sequence involving `&tty->termios_rwsem` and `&port->mutex`, I'll have all the pieces to construct a reliable reproducer.


189/4 2026/08/11 23:57 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:vc_SAK]

Results:
map[SourceCode: 978:	void vc_SAK(struct work_struct *work)
 979:	{
 980:		struct vc *vc_con =
 981:			container_of(work, struct vc, SAK_work);
 982:		struct vc_data *vc;
 983:		struct tty_struct *tty;
 984:	
 985:		guard(console_lock)();
 986:		vc = vc_con->d;
 987:		if (!vc)
 988:			return;
 989:	
 990:		/* FIXME: review tty ref counting */
 991:		tty = vc->port.tty;
 992:		/* SAK should also work in all raw modes and reset them properly. */
 993:		if (tty)
 994:			__do_SAK(tty);
 995:		reset_vc(vc);
 996:	}
 SourceFile:drivers/tty/vt/vt_ioctl.c]

190/4 2026/08/11 23:57 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10519
							output: 20
							thoughts: 1464
						

Thoughts:
**My Thought Process on Replicating the Lockdep Splat**

Okay, so I've been diving deep into this lock dependency issue, and I think I've pieced together a clear path to triggering the lockdep splat. It all comes down to understanding the specific lock acquisition order within the kernel's serial console and pseudo-terminal (pty) handling.

The core of the problem lies in a chain of lock dependencies that, if traversed in a particular sequence, will cause lockdep to flag a violation. I've identified four key lock acquisitions that form this chain:

1.  **`&tty->termios_rwsem` then `&port->mutex`**: This dependency is established when we perform an `ioctl` with `TCSETS` on a serial port (`/dev/ttyS*`). The `tty_ioctl` path eventually leads to `uart_set_termios`, which first acquires `tty->termios_rwsem` (via `down_write`) and then `port->mutex` (via `mutex_lock`). This is a crucial step I need to explicitly trigger.

2.  **`&port->mutex` then `console_lock`**: This is something that's already present in the kernel's lockdep graph from boot time. When a serial port is registered and configured as a console, this dependency is established. So, I don't need to do anything special to *create* this link; it's there by default.

3.  **`console_lock` then `&buf->lock`**: This lock acquisition happens when `vc_SAK` is invoked. `vc_SAK` is a function that, in turn, calls `__do_SAK(tty)`. And `__do_SAK` requires the `buf->lock`. The key here is that `vc_SAK` itself takes `console_lock` using a `guard(console_lock)()`. So, if I can get `vc_SAK` to execute, this link will be formed.

4.  **`&buf->lock` then `&tty->termios_rwsem`**: This is the final piece of the puzzle, and it's a bit more intricate. This dependency arises when data is written to a PTY master. This write operation triggers `flush_to_ldisc`, and on a PTY, `flush_to_ldisc` will eventually try to acquire `tty->termios_rwsem`. The `buf->lock` would have been acquired earlier in the process of handling the write.

My strategy is to execute code that forces these lock acquisitions in the correct order, or at least ensures lockdep observes all of them so it can build its dependency graph and spot the violation. Since dependency 2 is already in place, I only need to create and observe dependencies 1, 3, and 4.

To achieve dependency 1 (`&tty->termios_rwsem` -> `&port->mutex`), I've outlined a `trigger_tcsets` function. This function will attempt to open a serial port (`/dev/ttyS0` to `/dev/ttyS3`), get its current terminal settings using `TCGETS`, and then immediately apply them back using `TCSETS`. This `TCSETS` ioctl is the entry point that leads to acquiring both `tty->termios_rwsem` and `port->mutex`.

For dependency 3 (`console_lock` -> `&buf->lock`), I need to trigger `vc_SAK`. The mechanism for triggering `vc_SAK` is by generating a `K_SAK` (Keyboard Signal). My `trigger_sak` function is designed to do this. I'll use `/dev/uinput` to simulate pressing the 'A' key and map it to `K_SAK`. This involves:
    *   Configuring `/dev/uinput` to emit key events.
    *   Sending a key press and release event for `KEY_A`.
    *   Crucially, I need to ensure `K_SAK` is properly mapped. I'll iterate through keymaps and set `KEY_A` to `K_SAK` (which I believe is `0x020F`, though I need to double-check headers like `linux/kd.h` or `linux/keyboard.h`). The `usleep(500000)` after sending the key event is to give the `vc_SAK` workqueue enough time to execute.

And for dependency 4 (`&buf->lock` -> `&tty->termios_rwsem`), this is also handled within the PTY context that `vc_SAK` implicitly interacts with. When I trigger `K_SAK` via the simulated input events, the system will eventually try to flush output to the console/tty, which, in the context of a PTY slave device (which is linked to the console indirectly), will lead to the `flush_to_ldisc` call and thus the acquisition of `&tty->termios_rwsem` while `buf->lock` is already held.

So, the refined reproducer will involve executing these two functions sequentially. The `trigger_tcsets` call will establish the first dependency, and then `trigger_sak` will, through a series of events, bring in the subsequent dependencies, culminating in the lockdep splat. I've also included some initial `open` calls for different serial devices to ensure the `tcsets` trigger is as robust as possible. I'm going to double-check the `K_SAK` value and the exact path through `flush_to_ldisc` to ensure the final lock acquisition is correctly triggered.


191/4 2026/08/11 23:57 tool grepper
0m Args:
map[Expression:#define K_SAK]

Results:
map[Output:include/uapi/linux/keyboard.h-322-#define K_COMPOSE	K(KT_SPEC,14)
include/uapi/linux/keyboard.h:323:#define K_SAK		K(KT_SPEC,15)
include/uapi/linux/keyboard.h-324-#define K_DECRCONSOLE	K(KT_SPEC,16)
]

192/4 2026/08/11 23:57 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12097
							output: 18
							thoughts: 19
						

Thoughts:
**My Thought Process for Evaluating `K(KT_SPEC, 15)`**

Right, first things first, I need to understand what this expression, `K(KT_SPEC, 15)`, actually signifies. My immediate instinct is to break it down: I see a function call, `K`, taking two arguments. The first argument is `KT_SPEC`. This name strongly suggests to me that `KT_SPEC` is likely a constant, a data structure, or perhaps a type definition that's specific to some form of knowledge representation or a particular specification, likely related to temporal logic or a similar formal system given the "KT" prefix which often hints at temporal or epistemic logic. The second argument is the integer literal `15`. This is straightforward enough – a scalar value.

My primary objective now is to determine the *value* that `K(KT_SPEC, 15)` resolves to. This will depend entirely on the *definition* of the function `K`. Without that definition, I'm essentially in the dark.

So, my next step is to locate the definition of the `K` function. I'd be looking for:

*   **Function Signature:** What are its formal parameters? What are their types? Does it expect something like `K(Specification, Integer)` or `K(KnowledgeBase, Integer)`?
*   **Function Body/Implementation:** What operations does it perform? What logic does it execute? Does it query `KT_SPEC` in some way? Does it use the integer `15` as an index, a bound, a parameter for a temporal operator, or a weight?

Let's consider the possibilities for what `K` might *do*, given the context of "KT_SPEC":

1.  **Temporal Logic Operator:** If `KT_SPEC` represents a temporal logic formula or a temporal constraint, and `K` is a function that interprets this specification at a particular time step or state, then `15` could very well be that specific time index. `K(KT_SPEC, 15)` might then evaluate to the truth value of `KT_SPEC` at time `15`, or perhaps a more complex result like a set of reachable states at time `15` given the specification.
2.  **Knowledge Representation Lookup:** If `KT_SPEC` is a knowledge base or a set of defined entities, `K` might be a function that retrieves a specific piece of knowledge or a property. `15` could be an identifier, an index into a list of facts, or a parameter for a retrieval mechanism.
3.  **Constraint Satisfaction/Verification:** `KT_SPEC` could be a specification for a system's behavior. `K` might be a function that verifies certain properties of the system up to a certain point, or a specific check at time `15`.
4.  **Abstract Interpretation/Model Checking:** In the context of formal methods, `K` could be a function involved in abstracting or analyzing a system described by `KT_SPEC`. The `15` might relate to a depth of analysis, a number of iterations, or a specific property being checked.

Without the explicit definition of `K`, I cannot provide a concrete evaluation. My process is thus: identify `K`, understand its parameters, and then trace its execution flow using the provided `KT_SPEC` and the integer `15` to determine the final output. It's a procedural execution based on definitions.


193/4 2026/08/11 23:58 tool grepper
0m Args:
map[Expression:#define K\(]

Results:
map[Output:arch/x86/crypto/serpent-sse2-i586-asm_32.S-41-
arch/x86/crypto/serpent-sse2-i586-asm_32.S:42:#define K(x0, x1, x2, x3, x4, i) \
arch/x86/crypto/serpent-sse2-i586-asm_32.S-43-	get_key(i, 0, x4); \
--
crypto/serpent_generic.c-35-
crypto/serpent_generic.c:36:#define K(x0, x1, x2, x3, i) ({				\
crypto/serpent_generic.c-37-	x3 ^= k[4*(i)+3];        x2 ^= k[4*(i)+2];	\
--
drivers/base/node.c=437=static void node_remove_caches(struct node *node) { }
--
drivers/base/node.c-439-
drivers/base/node.c:440:#define K(x) ((x) << (PAGE_SHIFT - 10))
drivers/base/node.c-441-static ssize_t node_read_meminfo(struct device *dev,
--
include/uapi/linux/keyboard.h-45-
include/uapi/linux/keyboard.h:46:#define K(t,v)		(((t)<<8)|(v))
include/uapi/linux/keyboard.h-47-#define KTYP(x)		((x) >> 8)
--
kernel/debug/kdb/kdb_main.c=2383=static int kdb_summary(int argc, const char **argv)
--
kernel/debug/kdb/kdb_main.c-2414-	/* Display in kilobytes */
kernel/debug/kdb/kdb_main.c:2415:#define K(x) ((x) << (PAGE_SHIFT - 10))
kernel/debug/kdb/kdb_main.c-2416-	kdb_printf("\nMemTotal:       %8lu kB\nMemFree:        %8lu kB\n"
--
mm/internal.h=636=void set_recommended_min_free_kbytes(void);
--
mm/internal.h-640- */
mm/internal.h:641:#define K(x) ((x) << (PAGE_SHIFT-10))
mm/internal.h-642-
--
tools/testing/memblock/internal.h=9=static int memblock_debug = 1;
--
tools/testing/memblock/internal.h-13-
tools/testing/memblock/internal.h:14:#define K(x) ((x) << (PAGE_SHIFT-10))
tools/testing/memblock/internal.h-15-
]

194/4 2026/08/11 23:58 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12850
							output: 19
							thoughts: 8
						

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

Alright, so the first thing that pops into my head is: "What *is* this `KT_SPEC`?" It's a bit of an enigmatic abbreviation, isn't it? My immediate impulse, given my background and the context I'm operating in, is to break it down, to dissect the components and see what they suggest.

"KT" – that could be a lot of things, right? In my field, I'm constantly encountering acronyms and shorthand. Is it a project name? A specific type of technology? A particular methodology or standard? My mind immediately starts cataloging potential interpretations. It could be something as straightforward as "Knowledge Transfer Specification" or perhaps something more niche like "Key Technology Specification." Or maybe it's even more abstract – a key performance indicator, a technical parameter, a specific set of requirements for a system or component.

Then there's "SPEC." That's a bit clearer, thankfully. It almost certainly stands for "Specification." That implies a document, a set of rules, definitions, or requirements. It's the blueprint, the detailed description of *something*. So, if "SPEC" is specification, then `KT_SPEC` is likely the "Specification *related to* KT."

Now, combining the two, my thinking process moves to identifying the *purpose* of this `KT_SPEC`. If it's a specification, then it's designed to define, constrain, or describe. What is it defining? The "KT" part. This is where the expert within me kicks in, demanding more context. I'm not just looking for a definition; I'm looking for the *implications* of this specification.

Is this `KT_SPEC` something I need to adhere to? Is it something I've created or am expected to contribute to? Is it a constraint on our current work, or is it a goal we're aiming for? My brain is actively trying to place this `KT_SPEC` within the broader operational or strategic framework.

I'm also considering the *source* of this `KT_SPEC`. Who or what generated it? Is it an internal document, or something from an external body, a regulatory agency, or a vendor? The origin often dictates the level of formality and the authority of the specification.

Ultimately, my primary thought is that `KT_SPEC` represents a defined set of requirements or characteristics related to an unspecified "KT" entity. To move forward effectively, I need to understand:

1.  **What does "KT" stand for in this specific context?** This is the absolute prerequisite.
2.  **What is the scope and purpose of this specification?** What is it intended to achieve or govern?
3.  **What are the key requirements or parameters outlined within the `KT_SPEC`?** What are the actionable details?
4.  **What is my role or responsibility concerning this `KT_SPEC`?**

Without that foundational understanding of "KT," the term `KT_SPEC` remains a placeholder, a question mark that demands immediate clarification before any meaningful analysis or action can be taken. It's the kind of ambiguity that immediately flags a need for further inquiry.


195/4 2026/08/11 23:58 tool grepper
0m Args:
map[Expression:#define KT_SPEC]

Results:
map[Output:include/uapi/linux/keyboard.h-30-#define KT_FN		1
include/uapi/linux/keyboard.h:31:#define KT_SPEC		2
include/uapi/linux/keyboard.h-32-#define KT_PAD		3
]

196/4 2026/08/11 23:58 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12940
							output: 19
							thoughts: 193
						

Thoughts:
**My Thought Process Regarding KDSKBENT and K_SAK Configuration**

Okay, let's trace this through. I've just confirmed that the constant `K(KT_SPEC, 15)` resolves to `(2 << 8) | 15`, which is `0x020F`. This value is indeed the correct representation for `K_SAK` as I understand it within this context.

Now, my attention shifts to the `trigger_sak()` function. I'm looking at the loop within it, specifically how it's interacting with the `KDSKBENT` ioctl. The code iterates 256 times, and in each iteration, it sets up a `struct kbentry`. The key fields I'm focusing on are `ke.kb_table`, `ke.kb_index`, and `ke.kb_value`.

The `ke.kb_value` is being set to `0x020F`, which, as I just verified, is `K_SAK`. This part seems right.

However, I'm encountering a point of potential discrepancy. The `ke.kb_index` is consistently set to `30`. The comment indicates this is `KEY_A`. Now, my immediate concern is to verify this specific mapping. I need to check the definition of `KEY_A` within the `linux/input-event-codes.h` header file to ensure that index `30` accurately corresponds to `KEY_A`. If the index is incorrect, then `trigger_sak()` might not be configuring the `K_SAK` binding for the intended key, or perhaps it's attempting to set it for *all* keys if the loop is meant to cover a broader range of keycodes. This is a crucial detail I need to confirm.


197/4 2026/08/11 23:58 tool grepper
0m Args:
map[Expression:#define KEY_A]

Results:
map[Output:drivers/input/keyboard/locomokbd.c=25=MODULE_LICENSE("GPL");
--
drivers/input/keyboard/locomokbd.c-28-
drivers/input/keyboard/locomokbd.c:29:#define KEY_ACTIVITY		KEY_F16
drivers/input/keyboard/locomokbd.c-30-#define KEY_CONTACT		KEY_F18
--
drivers/net/wireless/marvell/mwifiex/fw.h=90=enum KEY_TYPE_ID {
--
drivers/net/wireless/marvell/mwifiex/fw.h-101-#define KEY_INDEX_MASK		0xf
drivers/net/wireless/marvell/mwifiex/fw.h:102:#define KEY_API_VER_MAJOR_V2	2
drivers/net/wireless/marvell/mwifiex/fw.h-103-
--
drivers/s390/crypto/zcrypt_ep11misc.c=736=EXPORT_SYMBOL(ep11_get_domain_info);
--
drivers/s390/crypto/zcrypt_ep11misc.c-741- */
drivers/s390/crypto/zcrypt_ep11misc.c:742:#define KEY_ATTR_DEFAULTS 0x00200c00
drivers/s390/crypto/zcrypt_ep11misc.c-743-
--
include/linux/key.h=284=extern struct key *key_alloc(struct key_type *type,
--
include/linux/key.h-292-
include/linux/key.h:293:#define KEY_ALLOC_IN_QUOTA		0x0000	/* add to quota, reject if would overrun */
include/linux/key.h:294:#define KEY_ALLOC_QUOTA_OVERRUN		0x0001	/* add to quota, permit even if overrun */
include/linux/key.h:295:#define KEY_ALLOC_NOT_IN_QUOTA		0x0002	/* not in quota */
include/linux/key.h:296:#define KEY_ALLOC_BUILT_IN		0x0004	/* Key is built into kernel */
include/linux/key.h:297:#define KEY_ALLOC_BYPASS_RESTRICTION	0x0008	/* Override the check on restricted keyrings */
include/linux/key.h:298:#define KEY_ALLOC_UID_KEYRING		0x0010	/* allocating a user or user session keyring */
include/linux/key.h:299:#define KEY_ALLOC_SET_KEEP		0x0020	/* Set the KEEP flag on the key/keyring */
include/linux/key.h-300-
--
include/uapi/linux/input-event-codes.h-105-#define KEY_LEFTCTRL		29
include/uapi/linux/input-event-codes.h:106:#define KEY_A			30
include/uapi/linux/input-event-codes.h-107-#define KEY_S			31
--
include/uapi/linux/input-event-codes.h-115-#define KEY_SEMICOLON		39
include/uapi/linux/input-event-codes.h:116:#define KEY_APOSTROPHE		40
include/uapi/linux/input-event-codes.h-117-#define KEY_GRAVE		41
--
include/uapi/linux/input-event-codes.h-207-#define KEY_STOP		128	/* AC Stop */
include/uapi/linux/input-event-codes.h:208:#define KEY_AGAIN		129
include/uapi/linux/input-event-codes.h-209-#define KEY_PROPS		130	/* AC Properties */
--
include/uapi/linux/input-event-codes.h-281-#define KEY_PROG4		203
include/uapi/linux/input-event-codes.h:282:#define KEY_ALL_APPLICATIONS	204	/* AC Desktop Show All Applications */
include/uapi/linux/input-event-codes.h-283-#define KEY_DASHBOARD		KEY_ALL_APPLICATIONS
--
include/uapi/linux/input-event-codes.h-300-#define KEY_SHOP		221
include/uapi/linux/input-event-codes.h:301:#define KEY_ALTERASE		222
include/uapi/linux/input-event-codes.h-302-#define KEY_CANCEL		223	/* AC Cancel */
--
include/uapi/linux/input-event-codes.h-432-#define KEY_VENDOR		0x168
include/uapi/linux/input-event-codes.h:433:#define KEY_ARCHIVE		0x169
include/uapi/linux/input-event-codes.h-434-#define KEY_PROGRAM		0x16a	/* Media Select Program Guide */
--
include/uapi/linux/input-event-codes.h-442-#define KEY_SUBTITLE		0x172
include/uapi/linux/input-event-codes.h:443:#define KEY_ANGLE		0x173
include/uapi/linux/input-event-codes.h-444-#define KEY_FULL_SCREEN		0x174	/* AC View Toggle */
--
include/uapi/linux/input-event-codes.h-447-#define KEY_KEYBOARD		0x176
include/uapi/linux/input-event-codes.h:448:#define KEY_ASPECT_RATIO	0x177	/* HUTRR37: Aspect */
include/uapi/linux/input-event-codes.h-449-#define KEY_SCREEN		KEY_ASPECT_RATIO
--
include/uapi/linux/input-event-codes.h-463-#define KEY_DVD			0x185	/* Media Select DVD */
include/uapi/linux/input-event-codes.h:464:#define KEY_AUX			0x186
include/uapi/linux/input-event-codes.h-465-#define KEY_MP3			0x187
include/uapi/linux/input-event-codes.h:466:#define KEY_AUDIO		0x188	/* AL Audio Browser */
include/uapi/linux/input-event-codes.h-467-#define KEY_VIDEO		0x189	/* AL Movie Browser */
--
include/uapi/linux/input-event-codes.h-479-#define KEY_LAST		0x195	/* Recall Last */
include/uapi/linux/input-event-codes.h:480:#define KEY_AB			0x196
include/uapi/linux/input-event-codes.h-481-#define KEY_NEXT		0x197
--
include/uapi/linux/input-event-codes.h-502-#define KEY_VOICEMAIL		0x1ac	/* AL Voicemail */
include/uapi/linux/input-event-codes.h:503:#define KEY_ADDRESSBOOK		0x1ad	/* AL Contacts/Address Book */
include/uapi/linux/input-event-codes.h-504-#define KEY_MESSENGER		0x1ae	/* AL Instant Messaging */
--
include/uapi/linux/input-event-codes.h-594-
include/uapi/linux/input-event-codes.h:595:#define KEY_ATTENDANT_ON	0x21b
include/uapi/linux/input-event-codes.h:596:#define KEY_ATTENDANT_OFF	0x21c
include/uapi/linux/input-event-codes.h:597:#define KEY_ATTENDANT_TOGGLE	0x21d	/* Attendant call on or off */
include/uapi/linux/input-event-codes.h-598-#define KEY_LIGHTS_TOGGLE	0x21e	/* Reading light on or off */
--
include/uapi/linux/input-event-codes.h-609-
include/uapi/linux/input-event-codes.h:610:#define KEY_ALS_TOGGLE		0x230	/* Ambient light sensor */
include/uapi/linux/input-event-codes.h-611-#define KEY_ROTATE_LOCK_TOGGLE	0x231	/* Display rotation lock */
--
include/uapi/linux/input-event-codes.h-617-#define KEY_CONTROLPANEL		0x243	/* AL Control Panel */
include/uapi/linux/input-event-codes.h:618:#define KEY_APPSELECT		0x244	/* AL Select Task/Application */
include/uapi/linux/input-event-codes.h-619-#define KEY_SCREENSAVER		0x245	/* AL Screen Saver */
include/uapi/linux/input-event-codes.h-620-#define KEY_VOICECOMMAND		0x246	/* Listening Voice Command */
include/uapi/linux/input-event-codes.h:621:#define KEY_ASSISTANT		0x247	/* AL Context-aware desktop assistant */
include/uapi/linux/input-event-codes.h-622-#define KEY_KBD_LAYOUT_NEXT	0x248	/* AC Next Keyboard Layout Select */
--
include/uapi/linux/input-event-codes.h-627-#define KEY_CAMERA_ACCESS_TOGGLE	0x24d	/* Toggles the current state of the camera access control. (HUTRR72) */
include/uapi/linux/input-event-codes.h:628:#define KEY_ACCESSIBILITY		0x24e	/* Toggles the system bound accessibility UI/command (HUTRR116) */
include/uapi/linux/input-event-codes.h-629-#define KEY_DO_NOT_DISTURB		0x24f	/* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/
--
include/uapi/linux/input-event-codes.h-645-
include/uapi/linux/input-event-codes.h:646:#define KEY_ACTION_ON_SELECTION		0x254	/* AL Action on Selection (HUTRR119) */
include/uapi/linux/input-event-codes.h-647-#define KEY_CONTEXTUAL_INSERT		0x255	/* AL Contextual Insertion (HUTRR119) */
--
include/uapi/linux/input-event-codes.h-672- */
include/uapi/linux/input-event-codes.h:673:#define KEY_AUDIO_DESC			0x26e
include/uapi/linux/input-event-codes.h-674-#define KEY_3D_MODE			0x26f
--
include/uapi/linux/input-event-codes.h-698-/* Toggle Autopilot engagement */
include/uapi/linux/input-event-codes.h:699:#define KEY_AUTOPILOT_ENGAGE_TOGGLE    0x27d
include/uapi/linux/input-event-codes.h-700-
--
net/mac80211/trace.h-104-			__field(s8, keyidx)
net/mac80211/trace.h:105:#define KEY_ASSIGN(k)	__entry->cipher = (k)->cipher;					\
net/mac80211/trace.h-106-			__entry->flags = (k)->flags;					\
]

198/4 2026/08/11 23:58 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16080
							output: 27
							thoughts: 4333
						

Thoughts:
**My Thought Process in Crafting the Exploit**

So, I've been digging into this kernel bug, and it seems like a classic race condition involving console locks. My goal is to trigger a specific lockdep warning, which means I need to orchestrate a particular sequence of lock acquisitions.

It all starts with this `KDSKBENT` ioctl. I know `KEY_A` maps to a value, and it's `30`. The `KDSKBENT` ioctl itself requires root privileges, which is fine because I'm operating in a syzkaller environment that has them. The structure it uses, `struct kbentry`, has a `kb_table` field. I've confirmed that there are 256 keymaps, so `kb_table` can indeed range from 0 to 255.

Now, the tricky part is triggering the `vc_SAK` function. This function is associated with a workqueue. When `vc_SAK` is triggered, it flushes the TTY buffer, and crucially, this flush operation acquires `&buf->lock`. This is one of the locks I need to acquire.

The problem is, `vc_SAK` also calls `__do_SAK`, which, in its turn, sends `SIGKILL` to processes associated with the active console. If I simply run `trigger_sak()` in a child process, there's a high chance that child will be killed. This is undesirable because I need the reproducer to complete and allow lockdep to report the warning.

My initial thought was that if the child process isn't directly associated with the active console (meaning it hasn't opened it and become its session leader), it might be safe. But to be absolutely sure, I decided to fork. The child process would then perform the `vc_SAK` trigger.

However, `__do_SAK` is quite aggressive. It iterates through *all* processes and checks if they have the TTY open. If they do, they get killed. So, even if my child process isn't the session leader, if it has `/dev/tty0` open, it's still at risk. And that's fine, as long as it happens *after* the lock is acquired. The main concern is the parent process being killed prematurely.

If the parent process has `/dev/console` open (which might happen if the test program's stdin/stdout are redirected to it), `__do_SAK` could potentially kill it. This would cause the reproducer to exit too early, potentially preventing lockdep from printing its warning, or the test framework would interpret it as a crash.

So, the question becomes: can I trigger `vc_SAK` without getting killed?

I realized that `__do_SAK` kills processes in the *session* of the TTY. If I can avoid being in that session, or at least avoid having the TTY open, I might be safe. Using `open("/dev/tty0", O_RDWR | O_NOCTTY)` is a good first step to prevent the TTY from becoming the controlling terminal.

Still, `__do_SAK` iterates over all processes that have the TTY open. My child process *will* likely have `/dev/tty0` open when `vc_SAK` is triggered. But if it closes that file descriptor *before* `__do_SAK` executes, it might survive. The challenge is that `vc_SAK` is triggered asynchronously by an input event.

My current plan is to have the child process close `/dev/tty0` right after mapping `KEY_A` to `K_SAK` and before the actual key injection via uinput. This way, by the time `vc_SAK` is scheduled and runs, the child no longer has `/dev/tty0` open and shouldn't be killed by that specific check. The uinput file descriptor itself isn't a TTY, so that shouldn't be an issue.

The parent process, on the other hand, ideally shouldn't have `/dev/tty0` open. The primary concern is if its stdin/stdout is `/dev/console`. To mitigate this, the parent can fork again, and the grandchild process can `setsid()` to detach itself from the session and avoid being killed.

Looking at the lockdep output, the path is: `console_lock` -> `&buf->lock`. `vc_SAK` acquires `console_lock` and then calls `__do_SAK`, which eventually calls `tty_ldisc_flush`, which takes `&buf->lock`. This looks like the target path.

I also need to consider how `vc_SAK` is actually invoked. It's scheduled as a work item. It's triggered by `fn_SAK` which is called when a `K_SAK` key press is detected by the keyboard driver. Injecting `KEY_A` as `K_SAK` using `/dev/uinput` is the way to go.

Another critical path I identified is `trigger_tcsets()`. This function interacts with serial ports and uses `TCGETS`/`TCSETS` ioctls. This seems to be where the `&tty->termios_rwsem` lock is acquired.

The third piece of the puzzle is `trigger_pty()`. This function aims to acquire `&buf->lock`. It does this by writing to the master side of a pseudo-terminal (PTY), which then causes `flush_to_ldisc` on the slave side. `flush_to_ldisc`, in turn, leads to `tty_buffer_flush` and thus `&buf->lock`.

So, the desired lock acquisition order is:
1.  `trigger_tcsets()`: acquires `&tty->termios_rwsem`.
2.  `trigger_sak()`: indirectly triggers `vc_SAK`, which acquires `console_lock` and then `&buf->lock`.
3.  `trigger_pty()`: acquires `&buf->lock` again (which is fine if it's already held, or the race happens with the other acquisition) and also might cause `tty_buffer_flush` to call `tty_ldisc_flush` again.

The key is the timing. I need `vc_SAK` to acquire `console_lock` and `&buf->lock` (from its `tty_ldisc_flush` call), and then I need `trigger_pty` to acquire `&buf->lock` again (this seems redundant based on the lockdep path, but it's part of the sequence that also involves `tty_ldisc_flush`). The real circular dependency I'm targeting is `&tty->termios_rwsem` -> `&port->mutex` and `console_lock` -> `&buf->lock`.

The lockdep splat `-> #3 (&buf->lock){+.+.}-{4:4}: __mutex_lock tty_buffer_flush tty_ldisc_flush __do_SAK vc_SAK` tells me that `vc_SAK` is the trigger for `&buf->lock`.

The order I've settled on is:
1.  `trigger_tcsets()` to acquire `&tty->termios_rwsem`.
2.  Fork a child to perform `trigger_sak()`. This child will map `KEY_A` to `K_SAK` and inject `KEY_A`. The child should ideally close `/dev/tty0` before `__do_SAK` runs to avoid being killed. This step acquires `console_lock` and `&buf->lock`.
3.  `trigger_pty()` to acquire `&buf->lock` again. This is where the lockdep warning should occur, showing the circular dependency: `&tty->termios_rwsem` is held, `console_lock` is held, and then `&buf->lock` is acquired while `console_lock` is held.

I've also considered the libc functions like `grantpt`, `unlockpt`, and `ptsname`. While syzkaller usually uses glibc, it's safer to use direct `ioctl` calls for PTY manipulation to avoid potential issues with minimal libc implementations. So, I've adjusted the `trigger_pty` to use `TIOCSPTLCK` and `TIOCGPTN`.

The core of the strategy is to introduce delays (`usleep`) at critical points to give the workqueues and asynchronous operations time to execute, ensuring the locks are held in the desired sequence before the next step attempts to acquire them.


199/4 2026/08/11 23:58 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:kbd_keycode]

Results:
map[SourceCode:1429:	static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
1430:	{
1431:		struct vc_data *vc = vc_cons[fg_console].d;
1432:		unsigned short keysym, *key_map;
1433:		unsigned char type;
1434:		bool raw_mode;
1435:		struct tty_struct *tty;
1436:		int shift_final;
1437:		struct keyboard_notifier_param param = { .vc = vc, .value = keycode, .down = down };
1438:		int rc;
1439:	
1440:		tty = vc->port.tty;
1441:	
1442:		if (tty && (!tty->driver_data)) {
1443:			/* No driver data? Strange. Okay we fix it then. */
1444:			tty->driver_data = vc;
1445:		}
1446:	
1447:		kbd = &kbd_table[vc->vc_num];
1448:	
1449:	#ifdef CONFIG_SPARC
1450:		if (keycode == KEY_STOP)
1451:			sparc_l1_a_state = down;
1452:	#endif
1453:	
1454:		rep = (down == 2);
1455:	
1456:		raw_mode = (kbd->kbdmode == VC_RAW);
1457:		if (raw_mode && !hw_raw)
1458:			if (emulate_raw(vc, keycode, !down << 7))
1459:				if (keycode < BTN_MISC && printk_ratelimit())
1460:					pr_warn("can't emulate rawmode for keycode %d\n",
1461:						keycode);
1462:	
1463:	#ifdef CONFIG_SPARC
1464:		if (keycode == KEY_A && sparc_l1_a_state) {
1465:			sparc_l1_a_state = false;
1466:			sun_do_break();
1467:		}
1468:	#endif
1469:	
1470:		if (kbd->kbdmode == VC_MEDIUMRAW) {
1471:			/*
1472:			 * This is extended medium raw mode, with keys above 127
1473:			 * encoded as 0, high 7 bits, low 7 bits, with the 0 bearing
1474:			 * the 'up' flag if needed. 0 is reserved, so this shouldn't
1475:			 * interfere with anything else. The two bytes after 0 will
1476:			 * always have the up flag set not to interfere with older
1477:			 * applications. This allows for 16384 different keycodes,
1478:			 * which should be enough.
1479:			 */
1480:			if (keycode < 128) {
1481:				put_queue(vc, keycode | (!down << 7));
1482:			} else {
1483:				put_queue(vc, !down << 7);
1484:				put_queue(vc, (keycode >> 7) | BIT(7));
1485:				put_queue(vc, keycode | BIT(7));
1486:			}
1487:			raw_mode = true;
1488:		}
1489:	
1490:		assign_bit(keycode, key_down, down);
1491:	
1492:		if (rep &&
1493:		    (!vc_kbd_mode(kbd, VC_REPEAT) ||
1494:		     (tty && !L_ECHO(tty) && tty_chars_in_buffer(tty)))) {
1495:			/*
1496:			 * Don't repeat a key if the input buffers are not empty and the
1497:			 * characters get aren't echoed locally. This makes key repeat
1498:			 * usable with slow applications and under heavy loads.
1499:			 */
1500:			return;
1501:		}
1502:	
1503:		param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;
1504:		param.ledstate = kbd->ledflagstate;
1505:		key_map = key_maps[shift_final];
1506:	
1507:		/*
1508:		 * Fall back to the plain map if modifiers are active, the modifier-
1509:		 * specific map is missing or has no entry, and the plain map has a
1510:		 * modifier-aware key type (KT_CUR or KT_CSI). These handlers encode
1511:		 * the modifier state into the emitted escape sequence.
1512:		 */
1513:		if (shift_final && keycode < NR_KEYS &&
1514:		    (!key_map || key_map[keycode] == K_HOLE) && key_maps[0]) {
1515:			unsigned short plain = key_maps[0][keycode];
1516:			unsigned char type = KTYP(plain);
1517:	
1518:			if (type >= 0xf0 && (type - 0xf0 == KT_CUR || type - 0xf0 == KT_CSI))
1519:				key_map = key_maps[0];
1520:		}
1521:	
1522:		rc = atomic_notifier_call_chain(&keyboard_notifier_list,
1523:						KBD_KEYCODE, &param);
1524:		if (rc == NOTIFY_STOP || !key_map) {
1525:			atomic_notifier_call_chain(&keyboard_notifier_list,
1526:						   KBD_UNBOUND_KEYCODE, &param);
1527:			do_compute_shiftstate();
1528:			kbd->slockstate = 0;
1529:			return;
1530:		}
1531:	
1532:		if (keycode < NR_KEYS)
1533:			keysym = key_map[keycode];
1534:		else if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
1535:			keysym = U(K(KT_BRL, keycode - KEY_BRL_DOT1 + 1));
1536:		else
1537:			return;
1538:	
1539:		type = KTYP(keysym);
1540:	
1541:		if (type < 0xf0) {
1542:			param.value = keysym;
1543:			rc = atomic_notifier_call_chain(&keyboard_notifier_list,
1544:							KBD_UNICODE, &param);
1545:			if (rc != NOTIFY_STOP)
1546:				if (down && !(raw_mode || kbd->kbdmode == VC_OFF))
1547:					k_unicode(vc, keysym, !down);
1548:			return;
1549:		}
1550:	
1551:		type -= 0xf0;
1552:	
1553:		if (type == KT_LETTER) {
1554:			type = KT_LATIN;
1555:			if (vc_kbd_led(kbd, VC_CAPSLOCK)) {
1556:				key_map = key_maps[shift_final ^ BIT(KG_SHIFT)];
1557:				if (key_map)
1558:					keysym = key_map[keycode];
1559:			}
1560:		}
1561:	
1562:		param.value = keysym;
1563:		rc = atomic_notifier_call_chain(&keyboard_notifier_list,
1564:						KBD_KEYSYM, &param);
1565:		if (rc == NOTIFY_STOP)
1566:			return;
1567:	
1568:		if ((raw_mode || kbd->kbdmode == VC_OFF) && type != KT_SPEC && type != KT_SHIFT)
1569:			return;
1570:	
1571:		(*k_handler[type])(vc, KVAL(keysym), !down);
1572:	
1573:		param.ledstate = kbd->ledflagstate;
1574:		atomic_notifier_call_chain(&keyboard_notifier_list, KBD_POST_KEYSYM, &param);
1575:	
1576:		if (type != KT_SLOCK)
1577:			kbd->slockstate = 0;
1578:	}
 SourceFile:drivers/tty/vt/keyboard.c]

200/4 2026/08/11 23:58 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22803
							output: 36
							thoughts: 87
						

Thoughts:
**My Thought Process Regarding Special Key Handling in Raw Mode**

Ah, I've just encountered this intriguing piece of code: `if ((raw_mode || kbd->kbdmode == VC_OFF) && type != KT_SPEC && type != KT_SHIFT) return;`. My immediate thought is to dissect its implications. The `return` statement, conditional on the combination of `raw_mode` being active, the keyboard mode being `VC_OFF`, and the key type *not* being `KT_SPEC` or `KT_SHIFT`, tells me something significant.

Specifically, the negation of `type != KT_SPEC` in the condition means that if the `type` *is* `KT_SPEC`, this entire `if` statement's condition will be false, and therefore, the `return` will *not* be executed. This leads me to the crucial realization: `KT_SPEC` keys, which I know include important sequences like `K_SAK` (Secure Attention Key), are indeed processed even when the system is in `raw_mode`. This is a critical security and usability consideration.

Following this line of reasoning, I anticipate that if `KT_SPEC` keys are not immediately returned from, then the `k_handler[KT_SPEC]` function will be invoked. My next logical step, therefore, is to delve into the implementation of `k_handler[KT_SPEC]` to understand precisely how these special key events are managed and what actions are taken. This will be key to understanding the system's behavior under these specific conditions.


201/4 2026/08/11 23:58 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/tty/vt/keyboard.c Name:k_spec]

Results:
map[SourceCode: 645:	/*
 646:	 * Special key handlers
 647:	 */
 648:	static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
 649:	{
 650:		if (up_flag)
 651:			return;
 652:		if (value >= ARRAY_SIZE(fn_handler))
 653:			return;
 654:		if ((kbd->kbdmode == VC_RAW ||
 655:		     kbd->kbdmode == VC_MEDIUMRAW ||
 656:		     kbd->kbdmode == VC_OFF) &&
 657:		     value != KVAL(K_SAK))
 658:			return;		/* SAK is allowed even in raw mode */
 659:		fn_handler[value](vc);
 660:	}
 SourceFile:drivers/tty/vt/keyboard.c]

202/4 2026/08/11 23:58 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23167
							output: 20
							thoughts: 2281
						

Thoughts:
**The Journey to a Safe SAK Trigger**

This has been a fascinating deep dive into the kernel's handling of SAK (Switch to Alternate Key). My primary goal is to reliably trigger the `vc_SAK` workqueue, which involves acquiring two crucial locks: `console_lock` and `&buf->lock`.

Initially, I was excited to realize that SAK is indeed allowed even in raw mode, and specifically, mapping `KEY_A` to `K_SAK` would invoke `fn_SAK` via `fn_handler[KVAL(K_SAK)]`. This seemed like a direct path to triggering the `vc_SAK` workqueue.

However, my expert brain immediately flagged a critical question: what if `tty0` isn't the active console? I know `kbd_keycode` relies on `vc_cons[fg_console].d` to identify the active console. This means SAK would correctly target the *currently active* console. The real concern became: what happens if the active console isn't opened by my process?

I traced the logic further and realized that `__do_SAK` is called on `tty = vc->port.tty`. If `tty` is NULL, `__do_SAK` returns, meaning `&buf->lock` is *never* acquired. This would be the case if the active console hasn't been opened by anyone, which is a potential pitfall. To ensure `vc->port.tty` is populated, I deduced that opening `/dev/tty0` is necessary, as `tty_open` on this device resolves to the active VT and sets `port.tty`.

This brought me to a new dilemma: if I keep `/dev/tty0` open to ensure `vc->port.tty` is set, `__do_SAK` will then kill my process that holds the TTY open! But then I realized, if the *child* process is killed by `__do_SAK`, that's perfectly acceptable. The child is purely a disposable mechanism to inject the SAK event. So, the proposed child process structure emerged: open `/dev/tty0`, map `KEY_A` to `K_SAK`, inject `KEY_A` via uinput, pause to allow `vc_SAK` to run, and then either exit or be killed.

I also considered the implication of the child process dying. I confirmed that when a process terminates, its file descriptors are closed, effectively destroying the uinput device and releasing any held keys. This seemed robust. I also noted that `k_spec` (which SAK utilizes) only triggers on key down events, so explicit key release before termination wasn't critical for SAK itself.

The critical concern then shifted to the potential impact on the system's init process. If my child process opening `/dev/tty0` caused `__do_SAK` to kill the system's init process (which might have `/dev/tty1` open, for example), that would lead to system instability or a panic. I meticulously re-examined the `__do_SAK` logic, specifically how it identifies processes to kill. It targets processes with the TTY as their controlling TTY or those with a read file descriptor open for that TTY.

In the syzkaller environment, the serial console (`ttyS0`) is often the primary console for init. If SAK is triggered on a virtual console (`tty1`), and init *only* has `/dev/console` (mapping to `ttyS0`) open, it wouldn't be affected. This suggested that my child process, which *would* have `tty1` open, would be killed, but init would be safe. This felt like a more acceptable risk.

However, the most elegant and safest solution presented itself: instead of relying on the existing active console (which might have unknown processes attached), why not *create* a new, dedicated virtual console, make it active, and then trigger SAK on *that* specific console? This guarantees that no other critical processes will have that new VT open, completely circumventing the risk of killing init or other vital system components. I decided this is the superior approach for reliable and safe SAK triggering.


203/4 2026/08/11 23:59 tool grepper
0m Args:
map[Expression:#define VT_ACTIVATE]

Results:
map[Output:include/uapi/linux/vt.h=34=struct vt_stat {
--
include/uapi/linux/vt.h-43-
include/uapi/linux/vt.h:44:#define VT_ACTIVATE	0x5606	/* make vt active */
include/uapi/linux/vt.h-45-#define VT_WAITACTIVE	0x5607	/* wait for vt active */
]

204/4 2026/08/11 23:59 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25572
							output: 21
							thoughts: 5038
						

Thoughts:
**My Thought Process on Developing the Kernel Exploit Reproducer**

I've been tasked with developing a reproducer for a kernel lock dependency bug, and I've been meticulously working through the necessary steps, thinking about each component and its role in triggering the specific lock acquisition order that causes the issue.

My initial plan for the `trigger_sak()` function, which is central to one part of the exploit, involved a clear sequence of actions within a child process. I envisioned it would:
1.  **Open `/dev/tty5`**: This is the target virtual console we want to interact with.
2.  **Activate `tty5`**: Using `ioctl(fd_tty, VT_ACTIVATE, 5)`, I need to make sure `tty5` is the active console.
3.  **Wait for `tty5` to be active**: `ioctl(fd_tty, VT_WAITACTIVE, 5)` ensures the system has fully switched to it.
4.  **Map `KEY_A` to `K_SAK`**: This is the core of the SAK (Secure Attention Key) trigger. I need to modify the keyboard mapping so that pressing `KEY_A` will simulate the SAK.
5.  **Inject `KEY_A` via `uinput`**: This simulates the user pressing the key, which, due to the mapping, should then trigger the SAK logic.
6.  **Sleep**: A brief pause to allow the kernel's SAK handling to execute.

Based on this, I started writing the `trigger_sak()` function. I made sure to handle potential errors during file opening and `ioctl` calls, printing informative messages with `strerror(errno)`. I also noted that `K_SAK` is represented by the hex value `0x020F`, and confirmed that `KDSKBENT` is indeed the correct `ioctl` for modifying key mappings and should accept `K_SAK`.

A crucial consideration arose: what if `tty5` isn't available? To address this, I decided to implement a fallback mechanism. If opening `/dev/tty5` fails, I'll attempt to open `/dev/tty0` and set the `vt_num` to `0`. In this fallback scenario, I'll skip the `VT_ACTIVATE` and `VT_WAITACTIVE` calls, as `tty0` is typically the default console and doesn't need explicit activation in the same way.

Next, I moved on to the `trigger_pty()` function, which is responsible for the other side of the lock dependency. The goal here is to initiate a specific lock acquisition pattern on a pseudo-terminal (PTY).
1.  **Open `/dev/ptmx`**: This is the master device for creating PTYs.
2.  **Unlock the PTY**: `ioctl(ptmx, TIOCSPTLCK, &unlock)` is used to make the PTY slave accessible.
3.  **Get PTY Number**: `ioctl(ptmx, TIOCGPTN, &ptn)` retrieves the PTY number.
4.  **Construct Slave PTY Name**: Using the obtained number, I create the path to the slave PTY, e.g., `/dev/pts/X`.
5.  **Open Slave PTY**: This is the device the kernel will interact with via its line discipline.
6.  **Write to Master PTY**: A simple write of `"a"` to the master PTY (`ptmx`) is designed to trigger data flow.
7.  **Wait for `flush_to_ldisc`**: A small `usleep` is added to give the kernel's workqueue for flushing data to the line discipline a chance to run.
8.  **Close FDs**: Finally, close the opened file descriptors.

I then delved into the lock dependency analysis for `trigger_pty()`. I realized that writing to the master PTY would enqueue data in the slave PTY's buffer and schedule `flush_to_ldisc`. This function, in turn, acquires `&buf->lock` and then `&tty->termios_rwsem` on the slave PTY. This establishes a lock order: `&buf->lock` -> `&tty->termios_rwsem`.

The critical insight came when I combined this with the locks acquired during the SAK trigger. In `trigger_sak()`, the SAK mechanism, specifically `vc_SAK` calling `__do_SAK` and then `tty_buffer_flush` (which takes `&buf->lock`), eventually leads to `tty_ldisc_flush` and `tty_port_default_receive_buf` which takes `&tty->termios_rwsem` on the *console* TTY (`tty5`). Furthermore, during the console activation and setup, locks like `console_lock` and `&port->mutex` on serial ports (triggered by `trigger_tcsets()`) are acquired.

The lockdep splat I was seeing indicated a circular dependency:
*   `&tty->termios_rwsem` (on console TTY)
*   `&port->mutex` (on serial port, which can be taken before console operations)
*   `console_lock` (global lock, often taken during console operations)
*   `&buf->lock` (on console TTY)

And then, my PTY logic introduced:
*   `&buf->lock` (on PTY slave)
*   `&tty->termios_rwsem` (on PTY slave)

The key point is that lockdep tracks lock classes, not individual instances. The classes for `&tty->termios_rwsem`, `&buf->lock`, `&port->mutex`, and `console_lock` are the same across different TTYs and serial ports. This means the following sequence, where the locks are acquired in the same *order* but on *different* objects:

1.  `trigger_tcsets()`: `&tty->termios_rwsem` -> `&port->mutex`
2.  `trigger_sak()` (in child process): `&port->mutex` -> `console_lock` -> `&buf->lock` -> `&tty->termios_rwsem` (on console TTY)
3.  `trigger_pty()`: `&buf->lock` -> `&tty->termios_rwsem` (on PTY slave)

This creates the circular dependency that lockdep detects, specifically:
`&tty->termios_rwsem` (on console) -> `&port->mutex` -> `console_lock` -> `&buf->lock` (on console) -> `&tty->termios_rwsem` (on console)
*AND*
`&buf->lock` (on PTY) -> `&tty->termios_rwsem` (on PTY)

The exact path leading to the splat is a bit complex and involves how these locks are acquired in sequence by different kernel subsystems. The critical part is that the lock classes are repeated in a cycle across the distinct operations initiated by `trigger_tcsets`, `trigger_sak`, and `trigger_pty`.

I also had to ensure all necessary headers were included, like `<linux/input.h>` for `struct input_event` and related codes. I considered potential issues with older kernel versions regarding `UI_DEV_SETUP` and decided to add a fallback to the older `uinput_user_dev` mechanism for broader compatibility. The use of a child process for `trigger_sak()` is essential because the SAK mechanism can send `SIGKILL` to the foreground process, which we don't want to happen to our main reproducer. Finally, the `main` function orchestrates these calls in the correct sequence to expose the lockdep issue.


205/4 2026/08/11 23:59 tool grepper
0m Args:
map[Expression:struct uinput_user_dev]

Results:
map[Output:Documentation/input/uinput.rst=185=but interact with uinput via ioctl calls, or use libevdev.
--
Documentation/input/uinput.rst-194-   {
Documentation/input/uinput.rst:195:      struct uinput_user_dev uud;
Documentation/input/uinput.rst-196-      int version, rc, fd;
--
drivers/input/misc/uinput.c=545=static int uinput_setup_device_legacy(struct uinput_device *udev,
--
drivers/input/misc/uinput.c-547-{
drivers/input/misc/uinput.c:548:	struct uinput_user_dev	*user_dev;
drivers/input/misc/uinput.c-549-	struct input_dev	*dev;
--
drivers/input/misc/uinput.c-552-
drivers/input/misc/uinput.c:553:	if (count != sizeof(struct uinput_user_dev))
drivers/input/misc/uinput.c-554-		return -EINVAL;
--
drivers/input/misc/uinput.c-563-
drivers/input/misc/uinput.c:564:	user_dev = memdup_user(buffer, sizeof(struct uinput_user_dev));
drivers/input/misc/uinput.c-565-	if (IS_ERR(user_dev))
--
include/uapi/linux/uinput.h=67=struct uinput_setup {
--
include/uapi/linux/uinput.h-76- * This ioctl sets parameters for the input device to be created.  It
include/uapi/linux/uinput.h:77: * supersedes the old "struct uinput_user_dev" method, which wrote this data
include/uapi/linux/uinput.h-78- * via write(). To actually set the absolute axes UI_ABS_SETUP should be
--
include/uapi/linux/uinput.h=102=struct uinput_abs_setup {
--
include/uapi/linux/uinput.h-111- * This ioctl sets one absolute axis information for the input device to be
include/uapi/linux/uinput.h:112: * created. It supersedes the old "struct uinput_user_dev" method, which wrote
include/uapi/linux/uinput.h-113- * part of this data and the content of UI_DEV_SETUP via write().
--
include/uapi/linux/uinput.h-222-
include/uapi/linux/uinput.h:223:struct uinput_user_dev {
include/uapi/linux/uinput.h-224-	char name[UINPUT_MAX_NAME_SIZE];
]

206/4 2026/08/11 23:59 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 31323
							output: 29
							thoughts: 4428
						

Thoughts:
**My Thought Process in Reconstructing the Lock Dependency**

Right, so the core of this exercise is to trace the intricate dance of locks within the TTY subsystem to create a specific circular dependency that will trigger a lockdep splat. I need to ensure that a series of lock acquisitions, in a particular order, are guaranteed to happen based on the code paths I intend to execute.

First, I confirmed that `struct uinput_user_dev` is indeed the correct structure to use for interacting with the `uinput` device. The question then arose: how do I ensure the `console_lock` is acquired? I followed the call chain: `vc_SAK` takes `console_lock`. Is `vc_SAK` always called? Yes, `fn_SAK` schedules `SAK_work`, which is executed by a workqueue, and that workqueue runs `vc_SAK`. So, `console_lock` acquisition is guaranteed.

Now, a critical point: what if `tty5` (which `vc_SAK` interacts with) is not open by the child process when `vc_SAK` eventually runs? If the child process dies and closes `tty5`, `vc->port.tty` could become `NULL`. The kernel code explicitly checks `if (tty)` before calling `__do_SAK`. If `tty` is `NULL`, `__do_SAK` is skipped. And if `__do_SAK` isn't called, then `&buf->lock` is *not* acquired. This is a potential deadlock scenario I *must* prevent.

The key insight here is that the child process, after injecting the keypress, sleeps for 2 seconds. During this sleep, `vc_SAK` will execute. When `vc_SAK` calls `__do_SAK`, it *sends a SIGKILL to the child process*. Crucially, this happens *after* `__do_SAK` has already acquired `&buf->lock`. When the child process is killed, it closes `tty5`. However, because `__do_SAK` is already in progress and has already acquired `&buf->lock`, the lock dependency (`&buf->lock` taken by `__do_SAK`) is successfully recorded *before* `tty5` is closed and `vc->port.tty` might become `NULL`. This appears to be the intended mechanism for the dependency.

I then delved into `trigger_pty`. The question was whether `flush_to_ldisc` is guaranteed to run. Writing to `ptmx` triggers `pty_write`, which in turn calls `tty_insert_flip_string` and then `tty_flip_buffer_push`. The latter schedules the `flush_to_ldisc` work. So, yes, it's guaranteed. The `usleep(100000)` is there to provide sufficient time for this work to execute. Then, I verified that `flush_to_ldisc` unconditionally acquires `&buf->lock`.

My verification continued by examining other functions:
*   `n_tty_receive_buf_common` unconditionally takes `down_read(&tty->termios_rwsem)`.
*   `flush_to_ldisc` unconditionally takes `mutex_lock(&buf->lock)`.
*   `vc_SAK` unconditionally takes `console_lock`.
*   `uart_set_termios` unconditionally takes `mutex_lock(&state->port.mutex)`.
*   `tty_set_termios` unconditionally takes `down_write(&tty->termios_rwsem)`.

It seems that if these functions are executed, the locks they are supposed to acquire *will* be acquired. The challenge then is to orchestrate their execution in the correct sequence to create the desired circular dependency.

The overall strategy coalesced into these steps:

1.  **Trigger `&tty->termios_rwsem` -> `&port->mutex`:** The `trigger_tcsets()` function, by calling `TCGETS` and then `TCSETS` on a serial port, is intended to exercise the path that leads to `tty_set_termios` (which takes `&tty->termios_rwsem`) and then potentially calls into `uart_set_termios` (which takes `&port->mutex`).
2.  **Trigger `console_lock` -> `&buf->lock`:** This is the most delicate part. The `trigger_sak()` function, by injecting `KEY_A` which is mapped to `K_SAK`, aims to trigger `vc_SAK`. Because `__do_SAK` sends `SIGKILL` to the calling process, I realized this must be done in a child process. This way, the child process is killed, but the parent process (which is running the rest of the reproducer) survives to observe the lockdep splat. The child process sleeps for 2 seconds, which is crucial for `vc_SAK` to execute and, importantly, for `__do_SAK` to acquire `&buf->lock` *before* the child process is terminated and closes its TTY.
3.  **Trigger `&buf->lock` -> `&tty->termios_rwsem`:** The `trigger_pty()` function, by writing to `ptmx`, schedules `flush_to_ldisc`. `flush_to_ldisc` takes `&buf->lock`. This then needs to lead to a call that takes `&tty->termios_rwsem`. The logic here suggests that the flush operation might trigger something that eventually leads back to `tty_set_termios` or a related path.

The code structure reflects this: `trigger_tcsets` first, then the child process for `trigger_sak`, and finally `trigger_pty` in the parent to complete the loop.

Finally, I did a quick check on `uinput_user_dev`'s availability and standard size definitions, confirming it's not an issue for compilation. The detail about restoring keymap mappings was also considered and deemed unnecessary for the immediate goal of triggering the splat, as a VM reboot would follow anyway.

This detailed breakdown confirms the logic and the execution order necessary to expose the lock dependency.


207/4 2026/08/12 00:00 tool codesearch-definition-source
0m Args:
map[ContextFile: Name:tty_buffer_flush]

Results:
map[SourceCode: 218:	/**
 219:	 * tty_buffer_flush		-	flush full tty buffers
 220:	 * @tty: tty to flush
 221:	 * @ld: optional ldisc ptr (must be referenced)
 222:	 *
 223:	 * Flush all the buffers containing receive data. If @ld != %NULL, flush the
 224:	 * ldisc input buffer.
 225:	 *
 226:	 * Locking: takes buffer lock to ensure single-threaded flip buffer 'consumer'.
 227:	 */
 228:	void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
 229:	{
 230:		struct tty_port *port = tty->port;
 231:		struct tty_bufhead *buf = &port->buf;
 232:		struct tty_buffer *next;
 233:	
 234:		atomic_inc(&buf->priority);
 235:	
 236:		mutex_lock(&buf->lock);
 237:		/* paired w/ release in __tty_buffer_request_room; ensures there are
 238:		 * no pending memory accesses to the freed buffer
 239:		 */
 240:		while ((next = smp_load_acquire(&buf->head->next)) != NULL) {
 241:			tty_buffer_free(port, buf->head);
 242:			buf->head = next;
 243:		}
 244:		buf->head->read = buf->head->commit;
 245:		buf->head->lookahead = buf->head->read;
 246:	
 247:		if (ld && ld->ops->flush_buffer)
 248:			ld->ops->flush_buffer(tty);
 249:	
 250:		atomic_dec(&buf->priority);
 251:		mutex_unlock(&buf->lock);
 252:	}
 SourceFile:drivers/tty/tty_buffer.c]

208/4 2026/08/12 00:00 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36326
							output: 2408
							thoughts: 37
						

Thoughts:
**My Thought Process**

Right, so my immediate thought upon reviewing this is the critical need to acquire the `mutex_lock(&buf->lock)` before proceeding. That's the foundational step.

Beyond that, I'm assessing if there are any other lingering concerns or potential edge cases I might have overlooked. I'm looking at the provided reproducer – and yes, it appears to be robust and well-constructed. It accurately reflects the issue at hand.

Therefore, my next action is to finalize the packaging of this information and transmit it.


209/4 2026/08/12 00:00 tool set-results
0m Args:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
}]

Results:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
}]

210/3 2026/08/12 00:00 loop
0m
211/4 2026/08/12 00:00 iteration 0
0m
212/5 2026/08/12 00:00 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
}]

213/5 2026/08/12 00:00 action compile-c-prog
0m Results:
map[CompilerError: FormattedReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
}]

214/5 2026/08/12 00:00 action If
0m Args:
map[CompilerError:]

215/3 2026/08/12 00:00 action run-c-repro
1m Results:
map[CandidateBugTitle:possible deadlock in n_tty_flush_buffer CandidateCrashReport:======================================================
WARNING: possible circular locking dependency detected
syzkaller #1 Not tainted
------------------------------------------------------
kworker/0:5/5693 is trying to acquire lock:
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349

but task is already holding lock:
ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

-> #2 (console_lock){+.+.}-{0:0}:
       console_lock+0x76/0x90 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xc47/0x2840 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x16b4/0x2090 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x56a/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x254/0xae0 drivers/base/dd.c:706
       __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
       driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
       __driver_attach+0x339/0x600 drivers/base/dd.c:1292
       bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383
       bus_add_driver+0x345/0x670 drivers/base/bus.c:763
       driver_register+0x23a/0x320 drivers/base/driver.c:174
       serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x250/0x870 init/main.c:1347
       do_initcall_level+0x10a/0x1a0 init/main.c:1409
       do_initcalls+0x59/0xa0 init/main.c:1425
       kernel_init_freeable+0x29d/0x3e0 init/main.c:1658
       kernel_init+0x1d/0x1d0 init/main.c:1548
       ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x81/0x710 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
       set_termios+0x53d/0x6c0 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
       tty_ioctl+0x9bd/0xdd0 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3165 [inline]
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
       lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
       n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
       tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  lock(&tty->termios_rwsem);

 *** DEADLOCK ***

5 locks held by kworker/0:5/5693:
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:985
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
 #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

stack backtrace:
CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 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: events vc_SAK
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 down_write+0x96/0x200 kernel/locking/rwsem.c:1631
 class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
 n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
 tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
 __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
 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>
tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3
 CandidateReproduced:true ConsoleOutput:[   70.393413][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   70.393425][   T33] audit: type=1400 audit(1786492918.814:201): avc:  denied  { transition } for  pid=5830 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.402610][   T33] audit: type=1400 audit(1786492918.814:202): avc:  denied  { noatsecure } for  pid=5830 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.408936][   T33] audit: type=1400 audit(1786492918.814:203): avc:  denied  { rlimitinh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.414729][   T33] audit: type=1400 audit(1786492918.814:204): avc:  denied  { siginh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   71.829223][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   71.831342][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.855342][   T33] audit: type=1400 audit(1786492921.274:205): avc:  denied  { write } for  pid=5832 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.905174][   T33] audit: type=1400 audit(1786492921.324:206): avc:  denied  { write } for  pid=5835 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.606571][   T33] audit: type=1400 audit(1786492922.024:207): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.660017][   T33] audit: type=1400 audit(1786492922.084:208): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:59174' (ED25519) to the list of known hosts.
[   74.426076][   T33] audit: type=1400 audit(1786492922.844:209): avc:  denied  { write } for  pid=5856 comm="syz-executor241" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[   74.429762][ T5856] input: Virtual Keyboard as /devices/virtual/input/input4
[   74.435675][   T33] audit: type=1400 audit(1786492922.844:210): avc:  denied  { open } for  pid=5856 comm="syz-executor241" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[   74.550716][ T5693] 
[   74.550723][ T5693] ======================================================
[   74.550727][ T5693] WARNING: possible circular locking dependency detected
[   74.550731][ T5693] syzkaller #1 Not tainted
[   74.550735][ T5693] ------------------------------------------------------
[   74.550738][ T5693] kworker/0:5/5693 is trying to acquire lock:
[   74.550743][ T5693] ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230
[   74.550771][ T5693] 
[   74.550771][ T5693] but task is already holding lock:
[   74.550773][ T5693] ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0
[   74.550791][ T5693] 
[   74.550791][ T5693] which lock already depends on the new lock.
[   74.550791][ T5693] 
[   74.550794][ T5693] 
[   74.550794][ T5693] the existing dependency chain (in reverse order) is:
[   74.550797][ T5693] 
[   74.550797][ T5693] -> #3 (&buf->lock){+.+.}-{4:4}:
[   74.550807][ T5693]        __mutex_lock+0x19d/0x1550
[   74.550815][ T5693]        tty_buffer_flush+0x74/0x2b0
[   74.550823][ T5693]        tty_ldisc_flush+0x6b/0xc0
[   74.550830][ T5693]        __do_SAK+0x25e/0x680
[   74.550838][ T5693]        vc_SAK+0x78/0x220
[   74.550844][ T5693]        process_scheduled_works+0xa8e/0x14e0
[   74.550853][ T5693]        worker_thread+0x92d/0xe10
[   74.550862][ T5693]        kthread+0x388/0x470
[   74.550868][ T5693]        ret_from_fork+0x514/0xb70
[   74.550879][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.550890][ T5693] 
[   74.550890][ T5693] -> #2 (console_lock){+.+.}-{0:0}:
[   74.550900][ T5693]        console_lock+0x76/0x90
[   74.550908][ T5693]        serial_core_register_port+0xc47/0x2840
[   74.550916][ T5693]        serial8250_register_8250_port+0x16b4/0x2090
[   74.550923][ T5693]        serial_pnp_probe+0x56a/0x7f0
[   74.550930][ T5693]        pnp_device_probe+0x30b/0x4c0
[   74.550937][ T5693]        really_probe+0x254/0xae0
[   74.550945][ T5693]        __driver_probe_device+0x1e8/0x360
[   74.550952][ T5693]        driver_probe_device+0x4f/0x240
[   74.550960][ T5693]        __driver_attach+0x339/0x600
[   74.550967][ T5693]        bus_for_each_dev+0x23b/0x2c0
[   74.550976][ T5693]        bus_add_driver+0x345/0x670
[   74.550985][ T5693]        driver_register+0x23a/0x320
[   74.550993][ T5693]        serial8250_init+0x8f/0x160
[   74.551005][ T5693]        do_one_initcall+0x250/0x870
[   74.551015][ T5693]        do_initcall_level+0x10a/0x1a0
[   74.551023][ T5693]        do_initcalls+0x59/0xa0
[   74.551028][ T5693]        kernel_init_freeable+0x29d/0x3e0
[   74.551034][ T5693]        kernel_init+0x1d/0x1d0
[   74.551043][ T5693]        ret_from_fork+0x514/0xb70
[   74.551053][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.551062][ T5693] 
[   74.551062][ T5693] -> #1 (&port->mutex){+.+.}-{4:4}:
[   74.551073][ T5693]        __mutex_lock+0x19d/0x1550
[   74.551079][ T5693]        uart_set_termios+0x81/0x710
[   74.551087][ T5693]        tty_set_termios+0xcaf/0x1800
[   74.551094][ T5693]        set_termios+0x53d/0x6c0
[   74.551100][ T5693]        tty_mode_ioctl+0x49c/0x7c0
[   74.551106][ T5693]        tty_ioctl+0x9bd/0xdd0
[   74.551113][ T5693]        __se_sys_ioctl+0xfc/0x170
[   74.551123][ T5693]        do_syscall_64+0x174/0x580
[   74.551130][ T5693]        entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   74.551137][ T5693] 
[   74.551137][ T5693] -> #0 (&tty->termios_rwsem){++++}-{4:4}:
[   74.551147][ T5693]        __lock_acquire+0x1520/0x2cf0
[   74.551153][ T5693]        lock_acquire+0x106/0x350
[   74.551159][ T5693]        down_write+0x96/0x200
[   74.551166][ T5693]        n_tty_flush_buffer+0x30/0x230
[   74.551175][ T5693]        tty_buffer_flush+0x1ec/0x2b0
[   74.551183][ T5693]        tty_ldisc_flush+0x6b/0xc0
[   74.551190][ T5693]        __do_SAK+0x25e/0x680
[   74.551197][ T5693]        vc_SAK+0x78/0x220
[   74.551203][ T5693]        process_scheduled_works+0xa8e/0x14e0
[   74.551211][ T5693]        worker_thread+0x92d/0xe10
[   74.551219][ T5693]        kthread+0x388/0x470
[   74.551225][ T5693]        ret_from_fork+0x514/0xb70
[   74.551234][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.551244][ T5693] 
[   74.551244][ T5693] other info that might help us debug this:
[   74.551244][ T5693] 
[   74.551247][ T5693] Chain exists of:
[   74.551247][ T5693]   &tty->termios_rwsem --> console_lock --> &buf->lock
[   74.551247][ T5693] 
[   74.551259][ T5693]  Possible unsafe locking scenario:
[   74.551259][ T5693] 
[   74.551261][ T5693]        CPU0                    CPU1
[   74.551285][ T5693]        ----                    ----
[   74.551288][ T5693]   lock(&buf->lock);
[   74.551294][ T5693]                                lock(console_lock);
[   74.551299][ T5693]                                lock(&buf->lock);
[   74.551305][ T5693]   lock(&tty->termios_rwsem);
[   74.551310][ T5693] 
[   74.551310][ T5693]  *** DEADLOCK ***
[   74.551310][ T5693] 
[   74.551312][ T5693] 5 locks held by kworker/0:5/5693:
[   74.551316][ T5693]  #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
[   74.551336][ T5693]  #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
[   74.551391][ T5693]  #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220
[   74.551407][ T5693]  #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0
[   74.551425][ T5693]  #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0
[   74.551443][ T5693] 
[   74.551443][ T5693] stack backtrace:
[   74.551462][ T5693] CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 Not tainted syzkaller #1 PREEMPT(full) 
[   74.551470][ T5693] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   74.551475][ T5693] Workqueue: events vc_SAK
[   74.551482][ T5693] Call Trace:
[   74.551486][ T5693]  <TASK>
[   74.551490][ T5693]  dump_stack_lvl+0xe8/0x150
[   74.551500][ T5693]  print_circular_bug+0x2e1/0x300
[   74.551509][ T5693]  check_noncircular+0x12e/0x150
[   74.551522][ T5693]  __lock_acquire+0x1520/0x2cf0
[   74.551529][ T5693]  ? __pfx___mutex_trylock_common+0x10/0x10
[   74.551538][ T5693]  ? rcu_is_watching+0x15/0xb0
[   74.551547][ T5693]  ? trace_contention_end+0x3d/0x140
[   74.551555][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551564][ T5693]  lock_acquire+0x106/0x350
[   74.551570][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551582][ T5693]  down_write+0x96/0x200
[   74.551589][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551599][ T5693]  ? __pfx_down_write+0x10/0x10
[   74.551608][ T5693]  ? __pfx_n_tty_flush_buffer+0x10/0x10
[   74.551622][ T5693]  n_tty_flush_buffer+0x30/0x230
[   74.551635][ T5693]  ? tty_buffer_flush+0x1df/0x2b0
[   74.551648][ T5693]  ? __pfx_n_tty_flush_buffer+0x10/0x10
[   74.551658][ T5693]  tty_buffer_flush+0x1ec/0x2b0
[   74.551666][ T5693]  tty_ldisc_flush+0x6b/0xc0
[   74.551674][ T5693]  __do_SAK+0x25e/0x680
[   74.551683][ T5693]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   74.551694][ T5693]  vc_SAK+0x78/0x220
[   74.551700][ T5693]  ? process_scheduled_works+0xa20/0x14e0
[   74.551709][ T5693]  process_scheduled_works+0xa8e/0x14e0
[   74.551721][ T5693]  ? __pfx_process_scheduled_works+0x10/0x10
[   74.551729][ T5693]  ? do_raw_spin_lock+0x12b/0x2f0
[   74.551741][ T5693]  worker_thread+0x92d/0xe10
[   74.551751][ T5693]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   74.551763][ T5693]  kthread+0x388/0x470
[   74.551769][ T5693]  ? __pfx_worker_thread+0x10/0x10
[   74.551778][ T5693]  ? __pfx_kthread+0x10/0x10
[   74.551784][ T5693]  ret_from_fork+0x514/0xb70
[   74.551795][ T5693]  ? __pfx_ret_from_fork+0x10/0x10
[   74.551805][ T5693]  ? __switch_to+0xc89/0x1420
[   74.551814][ T5693]  ? __pfx_kthread+0x10/0x10
[   74.551820][ T5693]  ret_from_fork_asm+0x1a/0x30
[   74.551833][ T5693]  </TASK>
[   74.552445][ T5693] tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3
[+] Starting reproducer...
[+] trigger_tcsets successful.
[+] Child process for SAK killed by signal 9 (expected if SAK triggered).
[-] TIOCSPTLCK failed: Inappropriate ioctl for device
[-] trigger_pty failed to open /dev/pts/0: Input/output error
[+] Reproducer finished.
[   76.613056][   T33] kauditd_printk_skb: 11 callbacks suppressed
[   76.613066][   T33] audit: type=1400 audit(1786492925.034:222): avc:  denied  { write } for  pid=5890 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   76.646560][   T33] audit: type=1400 audit(1786492925.064:223): avc:  denied  { write } for  pid=5893 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   82.069355][    T9] cfg80211: failed to load regulatory.db
 OtherCrashReports:<nil> StraceOutput: TestError:]

216/3 2026/08/12 00:02 action truncate-log
0m Results:
map[TruncatedConsoleOutput:[   70.393413][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   70.393425][   T33] audit: type=1400 audit(1786492918.814:201): avc:  denied  { transition } for  pid=5830 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.402610][   T33] audit: type=1400 audit(1786492918.814:202): avc:  denied  { noatsecure } for  pid=5830 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.408936][   T33] audit: type=1400 audit(1786492918.814:203): avc:  denied  { rlimitinh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.414729][   T33] audit: type=1400 audit(1786492918.814:204): avc:  denied  { siginh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   71.829223][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   71.831342][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.855342][   T33] audit: type=1400 audit(1786492921.274:205): avc:  denied  { write } for  pid=5832 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.905174][   T33] audit: type=1400 audit(1786492921.324:206): avc:  denied  { write } for  pid=5835 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.606571][   T33] audit: type=1400 audit(1786492922.024:207): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.660017][   T33] audit: type=1400 audit(1786492922.084:208): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:59174' (ED25519) to the list of known hosts.
[   74.426076][   T33] audit: type=1400 audit(1786492922.844:209): avc:  denied  { write } for  pid=5856 comm="syz-executor241" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[   74.429762][ T5856] input: Virtual Keyboard as /devices/virtual/input/input4
[   74.435675][   T33] audit: type=1400 audit(1786492922.844:210): avc:  denied  { open } for  pid=5856 comm="syz-executor241" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[   74.550716][ T5693] 
[   74.550723][ T5693] ======================================================
[   74.550727][ T5693] WARNING: possible circular locking dependency detected
[   74.550731][ T5693] syzkaller #1 Not tainted
[   74.550735][ T5693] ------------------------------------------------------
[   74.550738][ T5693] kworker/0:5/5693 is trying to acquire lock:
[   74.550743][ T5693] ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230
[   74.550771][ T5693] 
[   74.550771][ T5693] but task is already holding lock:
[   74.550773][ T5693] ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0
[   74.550791][ T5693] 
[   74.550791][ T5693] which lock already depends on the new lock.
[   74.550791][ T5693] 
[   74.550794][ T5693] 
[   74.550794][ T5693] the existing dependency chain (in reverse order) is:
[   74.550797][ T5693] 
[   74.550797][ T5693] -> #3 (&buf->lock){+.+.}-{4:4}:
[   74.550807][ T5693]        __mutex_lock+0x19d/0x1550
[   74.550815][ T5693]        tty_buffer_flush+0x74/0x2b0
[   74.550823][ T5693]        tty_ldisc_flush+0x6b/0xc0
[   74.550830][ T5693]        __do_SAK+0x25e/0x680
[   74.550838][ T5693]        vc_SAK+0x78/0x220
[   74.550844][ T5693]        process_scheduled_works+0xa8e/0x14e0
[   74.550853][ T5693]        worker_thread+0x92d/0xe10
[   74.550862][ T5693]        kthread+0x388/0x470
[   74.550868][ T5693]        ret_from_fork+0x514/0xb70
[   74.550879][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.550890][ T5693] 
[   74.550890][ T5693] -> #2 (console_lock){+.+.}-{0:0}:
[   74.550900][ T5693]        console_lock+0x76/0x90
[   74.550908][ T5693]        serial_core_register_port+0xc47/0x2840
[   74.550916][ T5693]        serial8250_register_8250_port+0x16b4/0x2090
[   74.550923][ T5693]        serial_pnp_probe+0x56a/0x7f0
[   74.550930][ T5693]        pnp_device_probe+0x30b/0x4c0
[   74.550937][ T5693]        really_probe+0x254/0xae0
[   74.550945][ T5693]        __driver_probe_device+0x1e8/0x360
[   74.550952][ T5693]        driver_probe_device+0x4f/0x240
[   74.550960][ T5693]        __driver_attach+0x339/0x600
[   74.550967][ T5693]        bus_for_each_dev+0x23b/0x2c0
[   74.550976][ T5693]        bus_add_driver+0x345/0x670
[   74.550985][ T5693]        driver_register+0x23a/0x320
[   74.550993][ T5693]        serial8250_init+0x8f/0x160
[   74.551005][ T5693]        do_one_initcall+0x250/0x870
[   74.551015][ T5693]        do_initcall_level+0x10a/0x1a0
[   74.551023][ T5693]        do_initcalls+0x59/0xa0
[   74.551028][ T5693]        kernel_init_freeable+0x29d/0x3e0
[   74.551034][ T5693]        kernel_init+0x1d/0x1d0
[   74.551043][ T5693]        ret_from_fork+0x514/0xb70
[   74.551053][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.551062][ T5693] 
[   74.551062][ T5693] -> #1 (&port->mutex){+.+.}-{4:4}:
[   74.551073][ T5693]        __mutex_lock+0x19d/0x1550
[   74.551079][ T5693]        uart_set_termios+0x81/0x710
[   74.551087][ T5693]        tty_set_termios+0xcaf/0x1800
[   74.551094][ T5693]        set_termios+0x53d/0x6c0
[   74.551100][ T5693]        tty_mode_ioctl+0x49c/0x7c0
[   74.551106][ T5693]        tty_ioctl+0x9bd/0xdd0
[   74.551113][ T5693]        __se_sys_ioctl+0xfc/0x170
[   74.551123][ T5693]        do_syscall_64+0x174/0x580
[   74.551130][ T5693]        entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   74.551137][ T5693] 
[   74.551137][ T5693] -> #0 (&tty->termios_rwsem){++++}-{4:4}:
[   74.551147][ T5693]        __lock_acquire+0x1520/0x2cf0
[   74.551153][ T5693]        lock_acquire+0x106/0x350
[   74.551159][ T5693]        down_write+0x96/0x200
[   74.551166][ T5693]        n_tty_flush_buffer+0x30/0x230
[   74.551175][ T5693]        tty_buffer_flush+0x1ec/0x2b0
[   74.551183][ T5693]        tty_ldisc_flush+0x6b/0xc0
[   74.551190][ T5693]        __do_SAK+0x25e/0x680
[   74.551197][ T5693]        vc_SAK+0x78/0x220
[   74.551203][ T5693]        process_scheduled_works+0xa8e/0x14e0
[   74.551211][ T5693]        worker_thread+0x92d/0xe10
[   74.551219][ T5693]        kthread+0x388/0x470
[   74.551225][ T5693]        ret_from_fork+0x514/0xb70
[   74.551234][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.551244][ T5693] 
[   74.551244][ T5693] other info that might help us debug this:
[   74.551244][ T5693] 
[   74.551247][ T5693] Chain exists of:
[   74.551247][ T5693]   &tty->termios_rwsem --> console_lock --> &buf->lock
[   74.551247][ T5693] 
[   74.551259][ T5693]  Possible unsafe locking scenario:
[   74.551259][ T5693] 
[   74.551261][ T5693]        CPU0                    CPU1
[   74.551285][ T5693]        ----                    ----
[   74.551288][ T5693]   lock(&buf->lock);
[   74.551294][ T5693]                                lock(console_lock);
[   74.551299][ T5693]                                lock(&buf->lock);
[   74.551305][ T5693]   lock(&tty->termios_rwsem);
[   74.551310][ T5693] 
[   74.551310][ T5693]  *** DEADLOCK ***
[   74.551310][ T5693] 
[   74.551312][ T5693] 5 locks held by kworker/0:5/5693:
[   74.551316][ T5693]  #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
[   74.551336][ T5693]  #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
[   74.551391][ T5693]  #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220
[   74.551407][ T5693]  #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0
[   74.551425][ T5693]  #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0
[   74.551443][ T5693] 
[   74.551443][ T5693] stack backtrace:
[   74.551462][ T5693] CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 Not tainted syzkaller #1 PREEMPT(full) 
[   74.551470][ T5693] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   74.551475][ T5693] Workqueue: events vc_SAK
[   74.551482][ T5693] Call Trace:
[   74.551486][ T5693]  <TASK>
[   74.551490][ T5693]  dump_stack_lvl+0xe8/0x150
[   74.551500][ T5693]  print_circular_bug+0x2e1/0x300
[   74.551509][ T5693]  check_noncircular+0x12e/0x150
[   74.551522][ T5693]  __lock_acquire+0x1520/0x2cf0
[   74.551529][ T5693]  ? __pfx___mutex_trylock_common+0x10/0x10
[   74.551538][ T5693]  ? rcu_is_watching+0x15/0xb0
[   74.551547][ T5693]  ? trace_contention_end+0x3d/0x140
[   74.551555][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551564][ T5693]  lock_acquire+0x106/0x350
[   74.551570][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551582][ T5693]  down_write+0x96/0x200
[   74.551589][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551599][ T5693]  ? __pfx_down_write+0x10/0x10
[   74.551608][ T5693]  ? __pfx_n_tty_flush_buffer+0x10/0x10
[   74.551622][ T5693]  n_tty_flush_buffer+0x30/0x230
[   74.551635][ T5693]  ? tty_buffer_flush+0x1df/0x2b0
[   74.551648][ T5693]  ? __pfx_n_tty_flush_buffer+0x10/0x10
[   74.551658][ T5693]  tty_buffer_flush+0x1ec/0x2b0
[   74.551666][ T5693]  tty_ldisc_flush+0x6b/0xc0
[   74.551674][ T5693]  __do_SAK+0x25e/0x680
[   74.551683][ T5693]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   74.551694][ T5693]  vc_SAK+0x78/0x220
[   74.551700][ T5693]  ? process_scheduled_works+0xa20/0x14e0
[   74.551709][ T5693]  process_scheduled_works+0xa8e/0x14e0
[   74.551721][ T5693]  ? __pfx_process_scheduled_works+0x10/0x10
[   74.551729][ T5693]  ? do_raw_spin_lock+0x12b/0x2f0
[   74.551741][ T5693]  worker_thread+0x92d/0xe10
[   74.551751][ T5693]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   74.551763][ T5693]  kthread+0x388/0x470
[   74.551769][ T5693]  ? __pfx_worker_thread+0x10/0x10
[   74.551778][ T5693]  ? __pfx_kthread+0x10/0x10
[   74.551784][ T5693]  ret_from_fork+0x514/0xb70
[   74.551795][ T5693]  ? __pfx_ret_from_fork+0x10/0x10
[   74.551805][ T5693]  ? __switch_to+0xc89/0x1420
[   74.551814][ T5693]  ? __pfx_kthread+0x10/0x10
[   74.551820][ T5693]  ret_from_fork_asm+0x1a/0x30
[   74.551833][ T5693]  </TASK>
[   74.552445][ T5693] tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3
[+] Starting reproducer...
[+] trigger_tcsets successful.
[+] Child process for SAK killed by signal 9 (expected if SAK triggered).
[-] TIOCSPTLCK failed: Inappropriate ioctl for device
[-] trigger_pty failed to open /dev/pts/0: Input/output error
[+] Reproducer finished.
[   76.613056][   T33] kauditd_printk_skb: 11 callbacks suppressed
[   76.613066][   T33] audit: type=1400 audit(1786492925.034:222): avc:  denied  { write } for  pid=5890 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   76.646560][   T33] audit: type=1400 audit(1786492925.064:223): avc:  denied  { write } for  pid=5893 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   82.069355][    T9] cfg80211: failed to load regulatory.db
 TruncatedCrashReport:======================================================
WARNING: possible circular locking dependency detected
syzkaller #1 Not tainted
------------------------------------------------------
kworker/0:5/5693 is trying to acquire lock:
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349

but task is already holding lock:
ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

-> #2 (console_lock){+.+.}-{0:0}:
       console_lock+0x76/0x90 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xc47/0x2840 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x16b4/0x2090 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x56a/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x254/0xae0 drivers/base/dd.c:706
       __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
       driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
       __driver_attach+0x339/0x600 drivers/base/dd.c:1292
       bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383
       bus_add_driver+0x345/0x670 drivers/base/bus.c:763
       driver_register+0x23a/0x320 drivers/base/driver.c:174
       serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x250/0x870 init/main.c:1347
       do_initcall_level+0x10a/0x1a0 init/main.c:1409
       do_initcalls+0x59/0xa0 init/main.c:1425
       kernel_init_freeable+0x29d/0x3e0 init/main.c:1658
       kernel_init+0x1d/0x1d0 init/main.c:1548
       ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x81/0x710 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
       set_termios+0x53d/0x6c0 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
       tty_ioctl+0x9bd/0xdd0 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3165 [inline]
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
       lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
       n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
       tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  lock(&tty->termios_rwsem);

 *** DEADLOCK ***

5 locks held by kworker/0:5/5693:
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:985
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
 #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

stack backtrace:
CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 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: events vc_SAK
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 down_write+0x96/0x200 kernel/locking/rwsem.c:1631
 class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
 n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
 tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
 __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
 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>
tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3
 TruncatedStraceOutput:]

217/3 2026/08/12 00:02 agent repro-oracle
0m Model:
best-expensive

Results:
map[Feedback:The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the exact same root cause. ProbePassed:false TerminalError: TitleMatches:true]

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

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

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


=== PHASE 2: BUG REPRODUCTION (EVALUATION) ===
The executed program was a full reproducer candidate attempting to trigger the target bug/crash.
Use this to guide your classification and feedback:
1. If a crash was triggered (Reproduced is true):
   - Determine if the triggered crash matches the expected bug.
   - If you conclude they represent the same underlying bug (the same root cause)
     despite different titles, crash signatures, or call traces, set TitleMatches
     to true and provide a detailed, technical, and verbose explanation of the
     equivalence in the 'Feedback' field.
   - If they do not represent the same bug (a completely unrelated crash/collision),
     set TitleMatches to false and explain the collision in 'Feedback'.
   - If they match exactly, set TitleMatches to true and provide a brief confirmation in 'Feedback'.
2. If the execution was successful (exit 0) WITHOUT a crash (Reproduced is false):
   - The reproduction attempt failed to trigger the bug. Analyze the console/strace output
     to understand why the bug did not trigger (e.g., timing, input arguments, environment setup)
     and provide feedback on how to improve the reproducer logic to trigger the crash.

Critical Diagnostic Rule for Reproduction Failures:
If the reproduction attempt fails (e.g., a system call returns an error, or a
warning/error message appears in the console log), you MUST:
1. Identify the failing system call from the execution trace or strace output.
2. Identify any corresponding warning or error messages in the console log.
3. Immediately search the kernel source tree for the warning message strings or
   the code of the failing system call/subsystem to locate the validation logic.
4. Trace the kernel's validation logic to diagnose the exact constraint violation
   or input mismatch in the generated program.
5. Provide a technical diagnosis in the feedback explaining the exact kernel constraint that was violated and why.

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


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

Prompt:
Bug Description: possible deadlock in n_tty_receive_buf_common

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u33:3/62 is trying to acquire lock:
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
ffff88804b3fe2c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678

but task is already holding lock:
ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       tty_buffer_flush+0x72/0x310 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0xd2/0xf0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x368/0x480 drivers/tty/tty_io.c:3025
       vc_SAK+0x7f/0x320 drivers/tty/vt/vt_ioctl.c:994
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 (console_lock){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       console_lock+0x7a/0xa0 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xe65/0x16f0 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x15af/0x2330 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x436/0x930 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x2b3/0x4a0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:628 [inline]
       really_probe+0x241/0xa60 drivers/base/dd.c:706
       __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
       driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
       __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
       bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
       bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
       driver_register+0x1e2/0x360 drivers/base/driver.c:174
       serial8250_init+0xcc/0x1c0 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x11d/0x700 init/main.c:1347
       do_initcall_level init/main.c:1409 [inline]
       do_initcalls init/main.c:1425 [inline]
       do_basic_setup init/main.c:1445 [inline]
       kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658
       kernel_init+0x1f/0x1e0 init/main.c:1548
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x8e/0x690 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0x64d/0x980 drivers/tty/tty_ioctl.c:341
       set_termios+0x5c8/0x880 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x17e/0xd40 drivers/tty/tty_ioctl.c:803
       n_tty_ioctl_helper+0x47/0x2b0 drivers/tty/tty_ioctl.c:982
       n_tty_ioctl+0x53/0x340 drivers/tty/n_tty.c:2496
       tty_ioctl+0x11b4/0x1640 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
       lock_acquire kernel/locking/lockdep.c:5868 [inline]
       lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
       down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
       class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
       n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
       tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
       tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
       receive_buf drivers/tty/tty_buffer.c:452 [inline]
       flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
       process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
       process_scheduled_works kernel/workqueue.c:3405 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
       kthread+0x370/0x450 kernel/kthread.c:436
       ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  rlock(&tty->termios_rwsem);

 *** DEADLOCK ***

4 locks held by kworker/u33:3/62:
 #0: ffff88801bce4140 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
 #1: ffffc900009efd08 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
 #2: ffff88801404a8b8 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x34/0x730 drivers/tty/tty_buffer.c:474
 #3: ffff88804b3fe0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x21/0x90 drivers/tty/tty_ldisc.c:263

stack backtrace:
CPU: 0 UID: 0 PID: 62 Comm: kworker/u33:3 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: events_unbound flush_to_ldisc
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3165
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x136c/0x1a40 kernel/locking/lockdep.c:5237
 lock_acquire kernel/locking/lockdep.c:5868 [inline]
 lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825
 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574
 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline]
 n_tty_receive_buf_common+0x85/0x1930 drivers/tty/n_tty.c:1678
 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394
 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x26b/0x730 drivers/tty/tty_buffer.c:502
 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
 process_scheduled_works kernel/workqueue.c:3405 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
 kthread+0x370/0x450 kernel/kthread.c:436
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

IsProbe: false
Reproduced: true
Console Output: [   70.393413][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   70.393425][   T33] audit: type=1400 audit(1786492918.814:201): avc:  denied  { transition } for  pid=5830 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.402610][   T33] audit: type=1400 audit(1786492918.814:202): avc:  denied  { noatsecure } for  pid=5830 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.408936][   T33] audit: type=1400 audit(1786492918.814:203): avc:  denied  { rlimitinh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.414729][   T33] audit: type=1400 audit(1786492918.814:204): avc:  denied  { siginh } for  pid=5830 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   71.829223][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   71.831342][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.855342][   T33] audit: type=1400 audit(1786492921.274:205): avc:  denied  { write } for  pid=5832 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.905174][   T33] audit: type=1400 audit(1786492921.324:206): avc:  denied  { write } for  pid=5835 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.606571][   T33] audit: type=1400 audit(1786492922.024:207): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.660017][   T33] audit: type=1400 audit(1786492922.084:208): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:59174' (ED25519) to the list of known hosts.
[   74.426076][   T33] audit: type=1400 audit(1786492922.844:209): avc:  denied  { write } for  pid=5856 comm="syz-executor241" name="uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[   74.429762][ T5856] input: Virtual Keyboard as /devices/virtual/input/input4
[   74.435675][   T33] audit: type=1400 audit(1786492922.844:210): avc:  denied  { open } for  pid=5856 comm="syz-executor241" path="/dev/uinput" dev="devtmpfs" ino=924 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:event_device_t tclass=chr_file permissive=1
[   74.550716][ T5693] 
[   74.550723][ T5693] ======================================================
[   74.550727][ T5693] WARNING: possible circular locking dependency detected
[   74.550731][ T5693] syzkaller #1 Not tainted
[   74.550735][ T5693] ------------------------------------------------------
[   74.550738][ T5693] kworker/0:5/5693 is trying to acquire lock:
[   74.550743][ T5693] ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230
[   74.550771][ T5693] 
[   74.550771][ T5693] but task is already holding lock:
[   74.550773][ T5693] ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0
[   74.550791][ T5693] 
[   74.550791][ T5693] which lock already depends on the new lock.
[   74.550791][ T5693] 
[   74.550794][ T5693] 
[   74.550794][ T5693] the existing dependency chain (in reverse order) is:
[   74.550797][ T5693] 
[   74.550797][ T5693] -> #3 (&buf->lock){+.+.}-{4:4}:
[   74.550807][ T5693]        __mutex_lock+0x19d/0x1550
[   74.550815][ T5693]        tty_buffer_flush+0x74/0x2b0
[   74.550823][ T5693]        tty_ldisc_flush+0x6b/0xc0
[   74.550830][ T5693]        __do_SAK+0x25e/0x680
[   74.550838][ T5693]        vc_SAK+0x78/0x220
[   74.550844][ T5693]        process_scheduled_works+0xa8e/0x14e0
[   74.550853][ T5693]        worker_thread+0x92d/0xe10
[   74.550862][ T5693]        kthread+0x388/0x470
[   74.550868][ T5693]        ret_from_fork+0x514/0xb70
[   74.550879][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.550890][ T5693] 
[   74.550890][ T5693] -> #2 (console_lock){+.+.}-{0:0}:
[   74.550900][ T5693]        console_lock+0x76/0x90
[   74.550908][ T5693]        serial_core_register_port+0xc47/0x2840
[   74.550916][ T5693]        serial8250_register_8250_port+0x16b4/0x2090
[   74.550923][ T5693]        serial_pnp_probe+0x56a/0x7f0
[   74.550930][ T5693]        pnp_device_probe+0x30b/0x4c0
[   74.550937][ T5693]        really_probe+0x254/0xae0
[   74.550945][ T5693]        __driver_probe_device+0x1e8/0x360
[   74.550952][ T5693]        driver_probe_device+0x4f/0x240
[   74.550960][ T5693]        __driver_attach+0x339/0x600
[   74.550967][ T5693]        bus_for_each_dev+0x23b/0x2c0
[   74.550976][ T5693]        bus_add_driver+0x345/0x670
[   74.550985][ T5693]        driver_register+0x23a/0x320
[   74.550993][ T5693]        serial8250_init+0x8f/0x160
[   74.551005][ T5693]        do_one_initcall+0x250/0x870
[   74.551015][ T5693]        do_initcall_level+0x10a/0x1a0
[   74.551023][ T5693]        do_initcalls+0x59/0xa0
[   74.551028][ T5693]        kernel_init_freeable+0x29d/0x3e0
[   74.551034][ T5693]        kernel_init+0x1d/0x1d0
[   74.551043][ T5693]        ret_from_fork+0x514/0xb70
[   74.551053][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.551062][ T5693] 
[   74.551062][ T5693] -> #1 (&port->mutex){+.+.}-{4:4}:
[   74.551073][ T5693]        __mutex_lock+0x19d/0x1550
[   74.551079][ T5693]        uart_set_termios+0x81/0x710
[   74.551087][ T5693]        tty_set_termios+0xcaf/0x1800
[   74.551094][ T5693]        set_termios+0x53d/0x6c0
[   74.551100][ T5693]        tty_mode_ioctl+0x49c/0x7c0
[   74.551106][ T5693]        tty_ioctl+0x9bd/0xdd0
[   74.551113][ T5693]        __se_sys_ioctl+0xfc/0x170
[   74.551123][ T5693]        do_syscall_64+0x174/0x580
[   74.551130][ T5693]        entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   74.551137][ T5693] 
[   74.551137][ T5693] -> #0 (&tty->termios_rwsem){++++}-{4:4}:
[   74.551147][ T5693]        __lock_acquire+0x1520/0x2cf0
[   74.551153][ T5693]        lock_acquire+0x106/0x350
[   74.551159][ T5693]        down_write+0x96/0x200
[   74.551166][ T5693]        n_tty_flush_buffer+0x30/0x230
[   74.551175][ T5693]        tty_buffer_flush+0x1ec/0x2b0
[   74.551183][ T5693]        tty_ldisc_flush+0x6b/0xc0
[   74.551190][ T5693]        __do_SAK+0x25e/0x680
[   74.551197][ T5693]        vc_SAK+0x78/0x220
[   74.551203][ T5693]        process_scheduled_works+0xa8e/0x14e0
[   74.551211][ T5693]        worker_thread+0x92d/0xe10
[   74.551219][ T5693]        kthread+0x388/0x470
[   74.551225][ T5693]        ret_from_fork+0x514/0xb70
[   74.551234][ T5693]        ret_from_fork_asm+0x1a/0x30
[   74.551244][ T5693] 
[   74.551244][ T5693] other info that might help us debug this:
[   74.551244][ T5693] 
[   74.551247][ T5693] Chain exists of:
[   74.551247][ T5693]   &tty->termios_rwsem --> console_lock --> &buf->lock
[   74.551247][ T5693] 
[   74.551259][ T5693]  Possible unsafe locking scenario:
[   74.551259][ T5693] 
[   74.551261][ T5693]        CPU0                    CPU1
[   74.551285][ T5693]        ----                    ----
[   74.551288][ T5693]   lock(&buf->lock);
[   74.551294][ T5693]                                lock(console_lock);
[   74.551299][ T5693]                                lock(&buf->lock);
[   74.551305][ T5693]   lock(&tty->termios_rwsem);
[   74.551310][ T5693] 
[   74.551310][ T5693]  *** DEADLOCK ***
[   74.551310][ T5693] 
[   74.551312][ T5693] 5 locks held by kworker/0:5/5693:
[   74.551316][ T5693]  #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
[   74.551336][ T5693]  #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
[   74.551391][ T5693]  #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220
[   74.551407][ T5693]  #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0
[   74.551425][ T5693]  #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0
[   74.551443][ T5693] 
[   74.551443][ T5693] stack backtrace:
[   74.551462][ T5693] CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 Not tainted syzkaller #1 PREEMPT(full) 
[   74.551470][ T5693] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   74.551475][ T5693] Workqueue: events vc_SAK
[   74.551482][ T5693] Call Trace:
[   74.551486][ T5693]  <TASK>
[   74.551490][ T5693]  dump_stack_lvl+0xe8/0x150
[   74.551500][ T5693]  print_circular_bug+0x2e1/0x300
[   74.551509][ T5693]  check_noncircular+0x12e/0x150
[   74.551522][ T5693]  __lock_acquire+0x1520/0x2cf0
[   74.551529][ T5693]  ? __pfx___mutex_trylock_common+0x10/0x10
[   74.551538][ T5693]  ? rcu_is_watching+0x15/0xb0
[   74.551547][ T5693]  ? trace_contention_end+0x3d/0x140
[   74.551555][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551564][ T5693]  lock_acquire+0x106/0x350
[   74.551570][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551582][ T5693]  down_write+0x96/0x200
[   74.551589][ T5693]  ? n_tty_flush_buffer+0x30/0x230
[   74.551599][ T5693]  ? __pfx_down_write+0x10/0x10
[   74.551608][ T5693]  ? __pfx_n_tty_flush_buffer+0x10/0x10
[   74.551622][ T5693]  n_tty_flush_buffer+0x30/0x230
[   74.551635][ T5693]  ? tty_buffer_flush+0x1df/0x2b0
[   74.551648][ T5693]  ? __pfx_n_tty_flush_buffer+0x10/0x10
[   74.551658][ T5693]  tty_buffer_flush+0x1ec/0x2b0
[   74.551666][ T5693]  tty_ldisc_flush+0x6b/0xc0
[   74.551674][ T5693]  __do_SAK+0x25e/0x680
[   74.551683][ T5693]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   74.551694][ T5693]  vc_SAK+0x78/0x220
[   74.551700][ T5693]  ? process_scheduled_works+0xa20/0x14e0
[   74.551709][ T5693]  process_scheduled_works+0xa8e/0x14e0
[   74.551721][ T5693]  ? __pfx_process_scheduled_works+0x10/0x10
[   74.551729][ T5693]  ? do_raw_spin_lock+0x12b/0x2f0
[   74.551741][ T5693]  worker_thread+0x92d/0xe10
[   74.551751][ T5693]  ? _raw_spin_unlock_irqrestore+0x30/0x80
[   74.551763][ T5693]  kthread+0x388/0x470
[   74.551769][ T5693]  ? __pfx_worker_thread+0x10/0x10
[   74.551778][ T5693]  ? __pfx_kthread+0x10/0x10
[   74.551784][ T5693]  ret_from_fork+0x514/0xb70
[   74.551795][ T5693]  ? __pfx_ret_from_fork+0x10/0x10
[   74.551805][ T5693]  ? __switch_to+0xc89/0x1420
[   74.551814][ T5693]  ? __pfx_kthread+0x10/0x10
[   74.551820][ T5693]  ret_from_fork_asm+0x1a/0x30
[   74.551833][ T5693]  </TASK>
[   74.552445][ T5693] tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3
[+] Starting reproducer...
[+] trigger_tcsets successful.
[+] Child process for SAK killed by signal 9 (expected if SAK triggered).
[-] TIOCSPTLCK failed: Inappropriate ioctl for device
[-] trigger_pty failed to open /dev/pts/0: Input/output error
[+] Reproducer finished.
[   76.613056][   T33] kauditd_printk_skb: 11 callbacks suppressed
[   76.613066][   T33] audit: type=1400 audit(1786492925.034:222): avc:  denied  { write } for  pid=5890 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   76.646560][   T33] audit: type=1400 audit(1786492925.064:223): avc:  denied  { write } for  pid=5893 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   82.069355][    T9] cfg80211: failed to load regulatory.db

Strace Output: 
Crash Report: ======================================================
WARNING: possible circular locking dependency detected
syzkaller #1 Not tainted
------------------------------------------------------
kworker/0:5/5693 is trying to acquire lock:
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349

but task is already holding lock:
ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

-> #2 (console_lock){+.+.}-{0:0}:
       console_lock+0x76/0x90 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xc47/0x2840 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x16b4/0x2090 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x56a/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x254/0xae0 drivers/base/dd.c:706
       __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
       driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
       __driver_attach+0x339/0x600 drivers/base/dd.c:1292
       bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383
       bus_add_driver+0x345/0x670 drivers/base/bus.c:763
       driver_register+0x23a/0x320 drivers/base/driver.c:174
       serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x250/0x870 init/main.c:1347
       do_initcall_level+0x10a/0x1a0 init/main.c:1409
       do_initcalls+0x59/0xa0 init/main.c:1425
       kernel_init_freeable+0x29d/0x3e0 init/main.c:1658
       kernel_init+0x1d/0x1d0 init/main.c:1548
       ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x81/0x710 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
       set_termios+0x53d/0x6c0 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
       tty_ioctl+0x9bd/0xdd0 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3165 [inline]
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
       lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
       n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
       tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  lock(&tty->termios_rwsem);

 *** DEADLOCK ***

5 locks held by kworker/0:5/5693:
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:985
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
 #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

stack backtrace:
CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 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: events vc_SAK
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 down_write+0x96/0x200 kernel/locking/rwsem.c:1631
 class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
 n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
 tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
 __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
 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>
tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3



218/4 2026/08/12 00:02 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17322
							output: 156
							thoughts: 1116
						

Thoughts:
**My Thoughts on the Reproducer Run and Deadlock Analysis**

Here's my analysis of the reproducer run results. I've been asked to evaluate whether the bug description, "possible deadlock in n_tty_receive_buf_common," matches the output from a reproducer. I've carefully examined the crash report and compared it to the original bug description, focusing on the circular locking dependencies identified by lockdep.

**The Core Issue: A Circular Lock Dependency**

The fundamental problem, as revealed by the lockdep splat, is a circular locking dependency. Specifically, the chain appears to be:

*   `&tty->termios_rwsem`
*   `console_lock`
*   `&buf->lock`

This means a task holding one of these locks is trying to acquire another lock that is already held by a task that is, in turn, trying to acquire the first lock. This creates a deadlock scenario, where tasks are permanently blocked, waiting for each other.

**Comparing the Original Bug and the Reproduced Crash**

Let's break down how this circular dependency manifests in both scenarios:

*   **Original Bug Report:**
    *   The task was holding `&buf->lock` (at `flush_to_ldisc`).
    *   It was attempting to acquire `&tty->termios_rwsem` (at `n_tty_receive_buf_common`).
    *   The reported dependency chain was:
        *   3: `&buf->lock` acquired in `tty_buffer_flush` (called from `__do_SAK`)
        *   2: `console_lock` acquired in `serial_core_register_port`
        *   1: `&port->mutex` acquired in `uart_set_termios`
        *   0: `&tty->termios_rwsem` acquired in `n_tty_receive_buf_common`

*   **Reproducer Crash Report:**
    *   The task (kworker/0:5/5693) was holding `&buf->lock` (at `tty_buffer_flush`).
    *   It was attempting to acquire `&tty->termios_rwsem` (at `n_tty_flush_buffer`).
    *   The reported dependency chain was:
        *   3: `&buf->lock` acquired in `tty_buffer_flush` (from `__do_SAK`)
        *   2: `console_lock` acquired in `serial_core_register_port`
        *   1: `&port->mutex` acquired in `uart_set_termios`
        *   0: `&tty->termios_rwsem` acquired in `n_tty_flush_buffer`

**The Key Insight: Same Root Cause, Different Path**

I can see that the lockdep splat in the reproduced crash is, in essence, the *same* circular dependency involving `&tty->termios_rwsem`, `console_lock`, and `&buf->lock`. The only superficial difference is that the task triggering the warning is attempting to acquire `&tty->termios_rwsem` in `n_tty_flush_buffer` instead of `n_tty_receive_buf_common`.

Crucially, both scenarios are triggered by the same fundamental lock ordering issue. The code paths, while slightly different in their final function calls (`n_tty_flush_buffer` vs. `n_tty_receive_buf_common`), lead to the same deadlock.

*   The original crash was triggered by `flush_to_ldisc` holding `&buf->lock` and then calling into `n_tty_receive_buf_common` to acquire `&tty->termios_rwsem`.
*   The reproduced crash was triggered by `tty_buffer_flush` holding `&buf->lock` and then calling into `n_tty_flush_buffer` to acquire `&tty->termios_rwsem`.

Both these paths demonstrate that `&buf->lock` is being taken *before* `&tty->termios_rwsem` within the TTY buffer management code. This clashes with other parts of the system (like `uart_set_termios`) that take `&tty->termios_rwsem` first, and then proceed to acquire `console_lock` and subsequently `&buf->lock`. This creates the inevitable circular dependency.

**Conclusion: Title Matches**

Therefore, I am confident that `TitleMatches` should be `true`. The reproducer successfully triggered the same underlying bug as described in the original report: the circular locking dependency between `&buf->lock` and `&tty->termios_rwsem`. The fact that the reproducer reached a slightly different function (`n_tty_flush_buffer` vs. `n_tty_receive_buf_common`) when acquiring the second lock doesn't negate the fact that it uncovered the same root cause of the deadlock.

**Tool Parameters for `set-results`:**

*   `TitleMatches`: `true`
*   `ProbePassed`: `false` (as this isn't a probe in the sense of a minimal capability test)
*   `TerminalError`: `""` (no terminal error to report beyond the deadlock itself)
*   `Feedback`: "The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the same root cause."


219/4 2026/08/12 00:02 tool set-results
0m Args:
map[Feedback:The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the exact same root cause. ProbePassed:false TerminalError: TitleMatches:true]

Results:
map[Feedback:The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the exact same root cause. ProbePassed:false TerminalError: TitleMatches:true]

220/3 2026/08/12 00:02 action loop-controller
0m Results:
map[CapabilitiesVerified:true ContinueSignal: EquivalenceAnalysis:The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the exact same root cause. OracleFeedback:The reproducer successfully triggered the circular locking dependency. Although the exact function where `&tty->termios_rwsem` is acquired differs slightly (`n_tty_flush_buffer` instead of `n_tty_receive_buf_common`), the underlying deadlock cycle is identical. Both crashes involve a task holding `&buf->lock` and attempting to acquire `&tty->termios_rwsem`, conflicting with the established dependency chain `&tty->termios_rwsem` -> `console_lock` -> `&buf->lock`. This confirms the reproducer triggers the exact same root cause. ReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <stdlib.h>
#include <linux/kd.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/vt.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>

#define TIOCSPTLCK	_IOW('T', 0x40, int)
#define TIOCGPTN	_IOR('T', 0x30, unsigned int)

void trigger_tcsets() {
    int fd_serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS2", O_RDWR | O_NOCTTY);
    if (fd_serial < 0) fd_serial = open("/dev/ttyS3", O_RDWR | O_NOCTTY);
    if (fd_serial >= 0) {
        struct termios term;
        if (ioctl(fd_serial, TCGETS, &term) == 0) {
            if (ioctl(fd_serial, TCSETS, &term) < 0) {
                printf("[-] TCSETS failed: %s\n", strerror(errno));
            } else {
                printf("[+] trigger_tcsets successful.\n");
            }
        } else {
            printf("[-] TCGETS failed: %s\n", strerror(errno));
        }
        close(fd_serial);
    } else {
        printf("[-] trigger_tcsets failed to open serial port: %s\n", strerror(errno));
    }
}

void trigger_sak() {
    int vt_num = 5;
    int fd_tty = open("/dev/tty5", O_RDWR | O_NOCTTY);
    if (fd_tty < 0) {
        vt_num = 0;
        fd_tty = open("/dev/tty0", O_RDWR | O_NOCTTY);
    }
    if (fd_tty < 0) {
        printf("[-] trigger_sak failed to open tty: %s\n", strerror(errno));
        exit(1);
    }
    
    if (vt_num != 0) {
        if (ioctl(fd_tty, VT_ACTIVATE, vt_num) < 0) {
            printf("[-] VT_ACTIVATE failed: %s\n", strerror(errno));
        }
        if (ioctl(fd_tty, VT_WAITACTIVE, vt_num) < 0) {
            printf("[-] VT_WAITACTIVE failed: %s\n", strerror(errno));
        }
        printf("[+] Activated /dev/tty%d.\n", vt_num);
    }

    // Map KEY_A to K_SAK across all keymaps to ensure it triggers
    for (int i = 0; i < 256; i++) {
        struct kbentry ke;
        ke.kb_table = i;
        ke.kb_index = 30; // KEY_A
        ke.kb_value = 0x020F; // K_SAK
        if (ioctl(fd_tty, KDSKBENT, &ke) < 0) {
            // Some keymaps might not exist, ignore errors
        }
    }
    printf("[+] trigger_sak mapped KEY_A to K_SAK.\n");

    int ufd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
    if (ufd >= 0) {
        if (ioctl(ufd, UI_SET_EVBIT, EV_KEY) < 0) {
            printf("[-] UI_SET_EVBIT failed: %s\n", strerror(errno));
        }
        if (ioctl(ufd, UI_SET_KEYBIT, KEY_A) < 0) {
            printf("[-] UI_SET_KEYBIT failed: %s\n", strerror(errno));
        }

        struct uinput_setup usetup;
        memset(&usetup, 0, sizeof(usetup));
        usetup.id.bustype = BUS_USB;
        usetup.id.vendor = 0x1234;
        usetup.id.product = 0x5678;
        strcpy(usetup.name, "Virtual Keyboard");
        if (ioctl(ufd, UI_DEV_SETUP, &usetup) < 0) {
            printf("[-] UI_DEV_SETUP failed: %s, falling back to uinput_user_dev\n", strerror(errno));
            struct uinput_user_dev uud;
            memset(&uud, 0, sizeof(uud));
            uud.id.bustype = BUS_USB;
            uud.id.vendor = 0x1234;
            uud.id.product = 0x5678;
            strcpy(uud.name, "Virtual Keyboard");
            if (write(ufd, &uud, sizeof(uud)) < 0) {
                printf("[-] write uinput_user_dev failed: %s\n", strerror(errno));
            }
        }
        if (ioctl(ufd, UI_DEV_CREATE) < 0) {
            printf("[-] UI_DEV_CREATE failed: %s\n", strerror(errno));
        }

        usleep(100000); // Wait for input device to be registered

        struct input_event ie;
        
        // Press KEY_A
        memset(&ie, 0, sizeof(ie));
        ie.type = EV_KEY; ie.code = KEY_A; ie.value = 1;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_KEY failed: %s\n", strerror(errno));
        }

        memset(&ie, 0, sizeof(ie));
        ie.type = EV_SYN; ie.code = SYN_REPORT; ie.value = 0;
        if (write(ufd, &ie, sizeof(ie)) < 0) {
            printf("[-] write EV_SYN failed: %s\n", strerror(errno));
        }

        printf("[+] trigger_sak injected KEY_A.\n");
        
        // Wait for vc_SAK workqueue to execute and kill us
        sleep(2); 
        
        // If we survive:
        ioctl(ufd, UI_DEV_DESTROY);
        close(ufd);
    } else {
        printf("[-] trigger_sak failed to open /dev/uinput: %s\n", strerror(errno));
        exit(1);
    }
    close(fd_tty);
}

void trigger_pty() {
    int ptmx = open("/dev/ptmx", O_RDWR | O_NOCTTY);
    if (ptmx >= 0) {
        int unlock = 0;
        if (ioctl(ptmx, TIOCSPTLCK, &unlock) < 0) {
            printf("[-] TIOCSPTLCK failed: %s\n", strerror(errno));
        }
        unsigned int ptn;
        if (ioctl(ptmx, TIOCGPTN, &ptn) == 0) {
            char pts_name[32];
            snprintf(pts_name, sizeof(pts_name), "/dev/pts/%u", ptn);
            int pts = open(pts_name, O_RDWR | O_NOCTTY);
            if (pts >= 0) {
                if (write(ptmx, "a", 1) < 0) {
                    printf("[-] trigger_pty failed to write to ptmx: %s\n", strerror(errno));
                } else {
                    printf("[+] trigger_pty wrote to ptmx.\n");
                }
                usleep(100000); // Wait for flush_to_ldisc workqueue to execute
                close(pts);
            } else {
                printf("[-] trigger_pty failed to open %s: %s\n", pts_name, strerror(errno));
            }
        } else {
            printf("[-] TIOCGPTN failed: %s\n", strerror(errno));
        }
        close(ptmx);
    } else {
        printf("[-] trigger_pty failed to open /dev/ptmx: %s\n", strerror(errno));
        exit(1);
    }
}

int main(void) {
    printf("[+] Starting reproducer...\n");

    // 1. Trigger &tty->termios_rwsem -> &port->mutex
    trigger_tcsets();

    // 2. Trigger console_lock -> &buf->lock
    // Do this in a child process because __do_SAK sends SIGKILL to processes
    // associated with the active console.
    pid_t pid = fork();
    if (pid < 0) {
        printf("[-] fork failed: %s\n", strerror(errno));
        exit(1);
    }
    if (pid == 0) {
        trigger_sak();
        exit(0);
    }
    int status;
    waitpid(pid, &status, 0);
    if (WIFSIGNALED(status)) {
        printf("[+] Child process for SAK killed by signal %d (expected if SAK triggered).\n", WTERMSIG(status));
    } else {
        printf("[+] Child process for SAK exited normally.\n");
    }

    // 3. Trigger &buf->lock -> &tty->termios_rwsem
    // This completes the circular dependency and triggers the lockdep splat.
    trigger_pty();

    printf("[+] Reproducer finished.\n");
    return 0;
} Reproduced:true ReproducedBugTitle:possible deadlock in n_tty_flush_buffer ReproducedCrashReport:======================================================
WARNING: possible circular locking dependency detected
syzkaller #1 Not tainted
------------------------------------------------------
kworker/0:5/5693 is trying to acquire lock:
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff8881fafd02c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349

but task is already holding lock:
ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&buf->lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

-> #2 (console_lock){+.+.}-{0:0}:
       console_lock+0x76/0x90 kernel/printk/printk.c:2896
       uart_configure_port drivers/tty/serial/serial_core.c:2530 [inline]
       serial_core_add_one_port drivers/tty/serial/serial_core.c:3101 [inline]
       serial_core_register_port+0xc47/0x2840 drivers/tty/serial/serial_core.c:3322
       serial8250_register_8250_port+0x16b4/0x2090 drivers/tty/serial/8250/8250_core.c:828
       serial_pnp_probe+0x56a/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
       pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x254/0xae0 drivers/base/dd.c:706
       __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
       driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
       __driver_attach+0x339/0x600 drivers/base/dd.c:1292
       bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383
       bus_add_driver+0x345/0x670 drivers/base/bus.c:763
       driver_register+0x23a/0x320 drivers/base/driver.c:174
       serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:317
       do_one_initcall+0x250/0x870 init/main.c:1347
       do_initcall_level+0x10a/0x1a0 init/main.c:1409
       do_initcalls+0x59/0xa0 init/main.c:1425
       kernel_init_freeable+0x29d/0x3e0 init/main.c:1658
       kernel_init+0x1d/0x1d0 init/main.c:1548
       ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #1 (&port->mutex){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       class_mutex_constructor include/linux/mutex.h:253 [inline]
       uart_set_termios+0x81/0x710 drivers/tty/serial/serial_core.c:1645
       tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
       set_termios+0x53d/0x6c0 drivers/tty/tty_ioctl.c:516
       tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
       tty_ioctl+0x9bd/0xdd0 drivers/tty/tty_io.c:2801
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&tty->termios_rwsem){++++}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3165 [inline]
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
       lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
       n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
       tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
       tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
       __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
       vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
       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

other info that might help us debug this:

Chain exists of:
  &tty->termios_rwsem --> console_lock --> &buf->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&buf->lock);
                               lock(console_lock);
                               lock(&buf->lock);
  lock(&tty->termios_rwsem);

 *** DEADLOCK ***

5 locks held by kworker/0:5/5693:
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #0: ffff88810006b140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline]
 #1: ffffc90003ea7c40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
 #2: ffffffff8eb55920 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:985
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
 #3: ffff8881fafd00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
 #4: ffff8881961b50b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236

stack backtrace:
CPU: 0 UID: 0 PID: 5693 Comm: kworker/0:5 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: events vc_SAK
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 down_write+0x96/0x200 kernel/locking/rwsem.c:1631
 class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
 n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
 tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
 tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
 __do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3025
 vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:994
 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>
tty tty5: SAK: killed process 5856 (syz-executor241): by fd#3
]

221/1 2026/08/12 00:02 action save-repro-c
0m Results:
map[]

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)