ID Workflow Result Correct Bug Created Started Finished Revision
58654e59 assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ Internal error in futex_cmpxchg_value_locked 2026/09/08 09:59 2026/09/08 09:59 2026/09/08 10:35 680aa3e1
Agent: prod-syz-agent-2
External Bug ID: ---

Inputs:
BaseBranch master
BaseCommit RC
BaseRepository git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
BugTitle Internal error in futex_cmpxchg_value_locked
CrashLogID 6465614329151488
CrashReportID 5248084851818496
KernelCommit 5445d64199626974269fcdf347769ad44b0bb53b
KernelConfig
Show (261354 bytes)
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 syzkaller Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77)"
CONFIG_GCC_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_CLANG_VERSION=220108
CONFIG_AS_IS_LLVM=y
CONFIG_AS_VERSION=220108
CONFIG_LD_VERSION=0
CONFIG_LD_IS_LLD=y
CONFIG_LLD_VERSION=220108
CONFIG_RUSTC_VERSION=109600
CONFIG_RUST_IS_AVAILABLE=y
CONFIG_RUSTC_LLVM_VERSION=220102
CONFIG_RUSTC_LLVM_MAJOR_VERSION=22
CONFIG_RUSTC_CLANG_LLVM_COMPATIBLE=y
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_TOOLS_SUPPORT_RELR=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_ASSUME=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_CC_HAS_COUNTED_BY=y
CONFIG_CC_HAS_COUNTED_BY_PTR=y
CONFIG_CC_HAS_ALLOC_TOKEN=y
CONFIG_CC_HAS_MULTIDIMENSIONAL_NONSTRING=y
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
CONFIG_RUSTC_HAS_SPAN_FILE=y
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
CONFIG_RUSTC_HAS_FILE_WITH_NUL=y
CONFIG_RUSTC_HAS_FILE_AS_C_STR=y
CONFIG_PAHOLE_VERSION=130
CONFIG_CONSTRUCTORS=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
# CONFIG_WERROR is not set
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_BUILD_SALT=""
CONFIG_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_SHOW_LEVEL=y
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
CONFIG_GENERIC_IRQ_MIGRATION=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_GENERIC_IRQ_IPI=y
CONFIG_GENERIC_MSI_IRQ=y
CONFIG_IRQ_MSI_IOMMU=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
CONFIG_GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD=y
# end of IRQ subsystem

CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_ARCH_HAS_TICK_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y
CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
CONFIG_CONTEXT_TRACKING=y
CONFIG_CONTEXT_TRACKING_IDLE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_CONTEXT_TRACKING_USER=y
# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_POSIX_AUX_CLOCKS=y
# end of Timers subsystem

CONFIG_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y

#
# BPF subsystem
#
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
# CONFIG_BPF_PRELOAD is not set
# end of BPF subsystem

CONFIG_PREEMPT_BUILD=y
CONFIG_ARCH_HAS_PREEMPT_LAZY=y
CONFIG_PREEMPT=y
# CONFIG_PREEMPT_LAZY is not set
# CONFIG_PREEMPT_RT is not set
CONFIG_PREEMPT_COUNT=y
CONFIG_HAS_SEPARATE_PREEMPT_RESCHED_BITS=y
CONFIG_PREEMPTION=y
# CONFIG_PREEMPT_DYNAMIC is not set
# CONFIG_SCHED_CORE is not set

#
# 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_SCHED_HW_PRESSURE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
# CONFIG_TASK_DELAY_ACCT is not set
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_GENERIC_SCHED_CLOCK=y

#
# Scheduler features
#
# CONFIG_UCLAMP_TASK is not set
# CONFIG_SCHED_PROXY_EXEC is not set
# end of Scheduler features

CONFIG_ARCH_HAS_PTE_PROTNONE=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough"
CONFIG_CC_MS_EXTENSIONS="-fms-extensions"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_NUMA_BALANCING=y
CONFIG_SCHED_CACHE=y
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
CONFIG_SLAB_OBJ_EXT=y
CONFIG_CGROUPS=y
CONFIG_PAGE_COUNTER=y
# CONFIG_CGROUP_FAVOR_DYNMODS is not set
CONFIG_MEMCG=y
CONFIG_MEMCG_V1=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_WRITEBACK=y
CONFIG_CGROUP_SCHED=y
CONFIG_GROUP_SCHED_WEIGHT=y
CONFIG_GROUP_SCHED_BANDWIDTH=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_SCHED_MM_CID=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_RDMA=y
# CONFIG_CGROUP_DMEM is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_HUGETLB=y
CONFIG_CPUSETS=y
# CONFIG_CPUSETS_V1 is not set
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
# CONFIG_CGROUP_MISC is not set
# CONFIG_CGROUP_DEBUG is not set
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=y
# CONFIG_RELAY is not set
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 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_LD_ORPHAN_WARN=y
CONFIG_LD_ORPHAN_WARN_LEVEL="warn"
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_SYSFS_SYSCALL=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_MULTIUSER=y
# CONFIG_SGETMASK_SYSCALL is not set
CONFIG_FHANDLE=y
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
# CONFIG_BASE_SMALL is not set
CONFIG_FUTEX=y
CONFIG_FUTEX_PI=y
CONFIG_FUTEX_PRIVATE_HASH=y
CONFIG_FUTEX_MPOL=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_IO_URING=y
CONFIG_IO_URING_MOCK_FILE=y
CONFIG_ADVISE_SYSCALLS=y
CONFIG_MEMBARRIER=y
CONFIG_KCMP=y
CONFIG_RSEQ=y
# CONFIG_RSEQ_STATS is not set
# CONFIG_RSEQ_DEBUG_DEFAULT_ENABLE is not set
# CONFIG_DEBUG_RSEQ is not set
CONFIG_CACHESTAT_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_SELFTEST is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
CONFIG_ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_GUEST_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
# end of Kernel Performance Events And Counters

CONFIG_SYSTEM_DATA_VERIFICATION=y
CONFIG_PROFILING=y
# CONFIG_RUST is not set
CONFIG_TRACEPOINTS=y

#
# Kexec and crash features
#
CONFIG_CRASH_RESERVE=y
CONFIG_VMCORE_INFO=y
CONFIG_KEXEC_CORE=y
CONFIG_HAVE_IMA_KEXEC=y
CONFIG_KEXEC=y
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
CONFIG_CRASH_DUMP=y
# CONFIG_CRASH_DM_CRYPT is not set
# 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_ARM64=y
CONFIG_RUSTC_SUPPORTS_ARM64=y
CONFIG_CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
CONFIG_64BIT=y
CONFIG_MMU=y
CONFIG_ARM64_CONT_PTE_SHIFT=4
CONFIG_ARM64_CONT_PMD_SHIFT=4
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
CONFIG_ARCH_MMAP_RND_BITS_MAX=33
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CSUM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_SMP=y
CONFIG_KERNEL_MODE_NEON=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_PGTABLE_LEVELS=5
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_ARCH_PROC_KCORE_TEXT=y
CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
CONFIG_KASAN_SHADOW_OFFSET=0xdfff800000000000

#
# Platform selection
#
# CONFIG_ARCH_ACTIONS is not set
# CONFIG_ARCH_AIROHA is not set
# CONFIG_ARCH_SUNXI is not set
# CONFIG_ARCH_ALPINE is not set
# CONFIG_ARCH_APPLE is not set
# CONFIG_ARCH_ASPEED is not set
# CONFIG_ARCH_AXIADO is not set
# CONFIG_ARCH_BCM is not set
# CONFIG_ARCH_BERLIN is not set
# CONFIG_ARCH_BITMAIN is not set
# CONFIG_ARCH_BLAIZE is not set
# CONFIG_ARCH_BST is not set
# CONFIG_ARCH_CIX is not set
# CONFIG_ARCH_EXYNOS is not set
# CONFIG_ARCH_K3 is not set
# CONFIG_ARCH_LG1K is not set
# CONFIG_ARCH_HISI is not set
# CONFIG_ARCH_KEEMBAY is not set
# CONFIG_ARCH_MEDIATEK is not set
# CONFIG_ARCH_MESON is not set
# CONFIG_ARCH_MICROCHIP is not set
# CONFIG_ARCH_MMP is not set
# CONFIG_ARCH_MVEBU is not set
# CONFIG_ARCH_NXP is not set
# CONFIG_ARCH_MA35 is not set
# CONFIG_ARCH_NPCM is not set
# CONFIG_ARCH_PENSANDO is not set
# CONFIG_ARCH_QCOM is not set
# CONFIG_ARCH_REALTEK is not set
# CONFIG_ARCH_RENESAS is not set
# CONFIG_ARCH_ROCKCHIP is not set
# CONFIG_ARCH_SEATTLE is not set
# CONFIG_ARCH_INTEL_SOCFPGA is not set
# CONFIG_ARCH_SOPHGO is not set
# CONFIG_ARCH_STM32 is not set
# CONFIG_ARCH_SYNQUACER is not set
# CONFIG_ARCH_TEGRA is not set
# CONFIG_ARCH_SPRD is not set
# CONFIG_ARCH_THUNDER is not set
# CONFIG_ARCH_THUNDER2 is not set
# CONFIG_ARCH_UNIPHIER is not set
CONFIG_ARCH_VEXPRESS=y
# CONFIG_ARCH_VISCONTI is not set
# CONFIG_ARCH_XGENE is not set
# CONFIG_ARCH_ZYNQMP is not set
# end of Platform selection

#
# Kernel Features
#

#
# ARM errata workarounds via the alternatives framework
#
CONFIG_AMPERE_ERRATUM_AC03_CPU_38=y
CONFIG_AMPERE_ERRATUM_AC04_CPU_23=y
CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
CONFIG_ARM64_ERRATUM_826319=y
CONFIG_ARM64_ERRATUM_827319=y
CONFIG_ARM64_ERRATUM_824069=y
CONFIG_ARM64_ERRATUM_819472=y
CONFIG_ARM64_ERRATUM_832075=y
# CONFIG_ARM64_ERRATUM_834220 is not set
CONFIG_ARM64_ERRATUM_1742098=y
CONFIG_ARM64_ERRATUM_845719=y
CONFIG_ARM64_ERRATUM_843419=y
CONFIG_ARM64_ERRATUM_1024718=y
CONFIG_ARM64_ERRATUM_1418040=y
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
CONFIG_ARM64_ERRATUM_1165522=y
CONFIG_ARM64_ERRATUM_1319367=y
CONFIG_ARM64_ERRATUM_1530923=y
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI_SYNC=y
# CONFIG_ARM64_ERRATUM_2441007 is not set
# CONFIG_ARM64_ERRATUM_1286807 is not set
CONFIG_ARM64_ERRATUM_1463225=y
# CONFIG_ARM64_ERRATUM_1542419 is not set
CONFIG_ARM64_ERRATUM_1508412=y
CONFIG_ARM64_ERRATUM_2051678=y
CONFIG_ARM64_ERRATUM_2077057=y
CONFIG_ARM64_ERRATUM_2658417=y
CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
CONFIG_ARM64_ERRATUM_2054223=y
CONFIG_ARM64_ERRATUM_2067961=y
# CONFIG_ARM64_ERRATUM_2441009 is not set
CONFIG_ARM64_ERRATUM_2457168=y
CONFIG_ARM64_ERRATUM_2645198=y
CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD=y
CONFIG_ARM64_ERRATUM_2966298=y
CONFIG_ARM64_ERRATUM_3117295=y
CONFIG_ARM64_ERRATUM_3194386=y
CONFIG_ARM64_ERRATUM_4311569=y
CONFIG_ARM64_ERRATUM_4193714=y
CONFIG_ARM64_ERRATUM_4118414=y
CONFIG_CAVIUM_ERRATUM_22375=y
CONFIG_CAVIUM_ERRATUM_23144=y
CONFIG_CAVIUM_ERRATUM_23154=y
CONFIG_CAVIUM_ERRATUM_27456=y
CONFIG_CAVIUM_ERRATUM_30115=y
CONFIG_CAVIUM_TX2_ERRATUM_219=y
CONFIG_FUJITSU_ERRATUM_010001=y
CONFIG_HISILICON_ERRATUM_161600802=y
CONFIG_HISILICON_ERRATUM_162100801=y
CONFIG_HISILICON_ERRATUM_162100125=y
CONFIG_QCOM_FALKOR_ERRATUM_1003=y
CONFIG_QCOM_FALKOR_ERRATUM_1009=y
CONFIG_QCOM_QDF2400_ERRATUM_0065=y
CONFIG_QCOM_FALKOR_ERRATUM_E1041=y
CONFIG_ARM64_WORKAROUND_DISABLE_CNP=y
CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
CONFIG_NVIDIA_OLYMPUS_1027_ERRATUM=y
CONFIG_RENESAS_ERRATUM_GEN4GICITS1=y
CONFIG_ROCKCHIP_ERRATUM_3568002=y
CONFIG_ROCKCHIP_ERRATUM_3588001=y
CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
# end of ARM errata workarounds via the alternatives framework

CONFIG_ARM64_4K_PAGES=y
# CONFIG_ARM64_16K_PAGES is not set
# CONFIG_ARM64_64K_PAGES is not set
# CONFIG_ARM64_VA_BITS_39 is not set
# CONFIG_ARM64_VA_BITS_48 is not set
CONFIG_ARM64_VA_BITS_52=y
# CONFIG_ARM64_FORCE_52BIT is not set
CONFIG_ARM64_VA_BITS=52
CONFIG_ARM64_PA_BITS_52=y
CONFIG_ARM64_PA_BITS=52
CONFIG_ARM64_LPA2=y
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_NR_CPUS=8
CONFIG_HOTPLUG_CPU=y
CONFIG_NUMA=y
CONFIG_NODES_SHIFT=4
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_SPARSEMEM_ENABLE=y
CONFIG_HW_PERF_EVENTS=y
CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
CONFIG_ARCH_SUPPORTS_KEXEC=y
CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y
CONFIG_ARCH_SELECTS_KEXEC_FILE=y
CONFIG_ARCH_SUPPORTS_KEXEC_SIG=y
CONFIG_ARCH_SUPPORTS_KEXEC_IMAGE_VERIFY_SIG=y
CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
CONFIG_ARCH_SUPPORTS_KEXEC_HANDOVER=y
CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y
CONFIG_ARCH_DEFAULT_CRASH_DUMP=y
CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y
CONFIG_TRANS_TABLE=y
# CONFIG_XEN is not set
CONFIG_ARCH_FORCE_MAX_ORDER=10
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y
# CONFIG_ARM64_SW_TTBR0_PAN is not set
CONFIG_ARM64_TAGGED_ADDR_ABI=y
CONFIG_COMPAT=y
CONFIG_KUSER_HELPERS=y
CONFIG_COMPAT_VDSO=y
CONFIG_THUMB2_COMPAT_VDSO=y
# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set
# CONFIG_ARMV8_DEPRECATED is not set

#
# ARMv8.1 architectural features
#
CONFIG_ARM64_HW_AFDBM=y
# end of ARMv8.1 architectural features

#
# ARMv8.2 architectural features
#
CONFIG_ARM64_PMEM=y
CONFIG_ARM64_RAS_EXTN=y
CONFIG_ARM64_CNP=y
# end of ARMv8.2 architectural features

#
# ARMv8.3 architectural features
#
CONFIG_ARM64_PTR_AUTH=y
CONFIG_ARM64_PTR_AUTH_KERNEL=y
CONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y
CONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y
# end of ARMv8.3 architectural features

#
# ARMv8.4 architectural features
#
CONFIG_ARM64_AMU_EXTN=y
CONFIG_ARM64_TLB_RANGE=y
# CONFIG_ARM64_MPAM is not set
# end of ARMv8.4 architectural features

#
# ARMv8.5 architectural features
#
CONFIG_AS_HAS_ARMV8_5=y
CONFIG_ARM64_BTI=y
CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y
CONFIG_ARM64_E0PD=y
CONFIG_ARM64_AS_HAS_MTE=y
CONFIG_ARM64_MTE=y
# end of ARMv8.5 architectural features

#
# ARMv8.7 architectural features
#
CONFIG_ARM64_EPAN=y
# end of ARMv8.7 architectural features

CONFIG_AS_HAS_MOPS=y

#
# ARMv8.9 architectural features
#
CONFIG_ARM64_POE=y
CONFIG_ARCH_PKEY_BITS=3
CONFIG_ARM64_HAFT=y
# end of ARMv8.9 architectural features

#
# ARMv9.4 architectural features
#
CONFIG_ARM64_GCS=y
# end of ARMv9.4 architectural features

CONFIG_AS_HAS_LSUI=y

#
# ARMv9.6 architectural features
#
CONFIG_ARM64_LSUI=y
# end of ARMv9.6 architectural features

CONFIG_ARM64_SVE=y
CONFIG_AS_HAS_SME=y
CONFIG_ARM64_SME=y
# CONFIG_ARM64_PSEUDO_NMI is not set
# CONFIG_RELOCATABLE is not set
# CONFIG_RANDOMIZE_BASE is not set
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
CONFIG_STACKPROTECTOR_PER_TASK=y
CONFIG_ARM64_CONTPTE=y
# end of Kernel Features

#
# Boot options
#
# CONFIG_ARM64_ACPI_PARKING_PROTOCOL is not set
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/vda console=ttyAMA0 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_FROM_BOOTLOADER=y
# CONFIG_CMDLINE_FORCE is not set
CONFIG_EFI_STUB=y
CONFIG_EFI=y
# CONFIG_COMPRESSED_INSTALL is not set
CONFIG_DMI=y
# end of Boot options

#
# Power management options
#
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_CLK=y
CONFIG_PM_GENERIC_DOMAINS=y
CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
CONFIG_PM_GENERIC_DOMAINS_OF=y
CONFIG_CPU_PM=y
CONFIG_ENERGY_MODEL=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# end of Power management options

#
# CPU Power Management
#

#
# CPU Idle
#
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
# CONFIG_CPU_IDLE_GOV_LADDER is not set
CONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_CPU_IDLE_GOV_TEO is not set
CONFIG_DT_IDLE_STATES=y
CONFIG_DT_IDLE_GENPD=y

#
# ARM CPU Idle Drivers
#
CONFIG_ARM_PSCI_CPUIDLE=y
CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
# end of ARM CPU Idle Drivers
# end of CPU Idle

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
# 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_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y

#
# CPU frequency scaling drivers
#
CONFIG_CPUFREQ_DT=y
# CONFIG_CPUFREQ_VIRT is not set
CONFIG_CPUFREQ_DT_PLATDEV=y
CONFIG_ARM_SCMI_CPUFREQ=y
CONFIG_ACPI_CPPC_CPUFREQ=y
CONFIG_ACPI_CPPC_CPUFREQ_FIE=y
# end of CPU Frequency scaling
# end of CPU Power Management

CONFIG_ARCH_SUPPORTS_ACPI=y
CONFIG_ACPI=y
CONFIG_ACPI_GENERIC_GSI=y
CONFIG_ACPI_CCA_REQUIRED=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_EC 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_PROCESSOR_IDLE=y
CONFIG_ACPI_MCFG=y
CONFIG_ACPI_CPPC_LIB=y
CONFIG_ACPI_PROCESSOR=y
# CONFIG_ACPI_IPMI is not set
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=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=y
CONFIG_ACPI_HED=y
# CONFIG_ACPI_BGRT is not set
CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y
# CONFIG_ACPI_NFIT is not set
CONFIG_ACPI_NUMA=y
CONFIG_ACPI_HMAT=y
CONFIG_HAVE_ACPI_APEI=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
CONFIG_ACPI_APEI_PCIEAER=y
CONFIG_ACPI_APEI_SEA=y
CONFIG_ACPI_APEI_MEMORY_FAILURE=y
CONFIG_ACPI_APEI_EINJ=y
# CONFIG_ACPI_APEI_GHES_NVIDIA is not set
# CONFIG_ACPI_APEI_ERST_DEBUG is not set
# CONFIG_ACPI_CONFIGFS is not set
# CONFIG_ACPI_PFRUT is not set
CONFIG_ACPI_IORT=y
CONFIG_ACPI_GTDT=y
# CONFIG_ACPI_AGDI is not set
CONFIG_ACPI_APMT=y
CONFIG_ACPI_PPTT=y
CONFIG_ACPI_PCC=y
# CONFIG_ACPI_FFH is not set
CONFIG_PMIC_OPREGION=y
CONFIG_ACPI_PRMT=y
CONFIG_KVM_COMMON=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_DIRTY_RING=y
CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y
CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP=y
CONFIG_KVM_MMIO=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_HAVE_KVM_IRQ_BYPASS=y
CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE=y
CONFIG_VIRT_XFER_TO_GUEST_WORK=y
CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
CONFIG_KVM_GUEST_MEMFD=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
# CONFIG_PTDUMP_STAGE2_DEBUGFS is not set
# CONFIG_NVHE_EL2_DEBUG is not set
CONFIG_HAVE_LIVEPATCH=y
CONFIG_CPU_MITIGATIONS=y

#
# General architecture-dependent options
#
CONFIG_ARCH_HAS_SUBPAGE_FAULTS=y
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_GENERIC_IRQ_ENTRY=y
# CONFIG_KPROBES is not set
CONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=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_GENERIC_IDLE_POLL_SETUP=y
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
CONFIG_ARCH_HAS_KEEPINITRD=y
CONFIG_ARCH_HAS_SET_MEMORY=y
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
CONFIG_ARCH_WANTS_NO_INSTR=y
CONFIG_HAVE_ASM_MODVERSIONS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_RSEQ=y
CONFIG_HAVE_RUST=y
CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_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_LAZY_TLB_REFCOUNT=y
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=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_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_SHADOW_CALL_STACK=y
# CONFIG_SHADOW_CALL_STACK is not set
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
CONFIG_HAS_LTO_CLANG=y
CONFIG_LTO_NONE=y
# CONFIG_LTO_CLANG_FULL is not set
# CONFIG_LTO_CLANG_THIN is not set
# CONFIG_LTO_CLANG_THIN_DIST is not set
# CONFIG_AUTOFDO_CLANG is not set
# CONFIG_PROPELLER_CLANG is not set
CONFIG_ARCH_SUPPORTS_CFI=y
# CONFIG_CFI is not set
CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS=y
CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC=y
CONFIG_HAVE_CONTEXT_TRACKING_USER=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_HUGE_VMAP=y
CONFIG_HAVE_ARCH_HUGE_VMALLOC=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_PMD_MKWRITE=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_ARCH_WANTS_EXECMEM_LATE=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_ARCH_MMAP_RND_BITS=18
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
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_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
CONFIG_HAVE_RELIABLE_STACKTRACE=y
CONFIG_CLONE_BACKWARDS=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_COMPILER_H=y
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
CONFIG_ARCH_USE_MEMREMAP_PROT=y
# CONFIG_LOCK_EVENT_COUNTS is not set
CONFIG_ARCH_HAS_MEM_ENCRYPT=y
CONFIG_ARCH_HAS_CC_PLATFORM=y
CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y
CONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y
CONFIG_ARCH_HAS_HW_PTE_YOUNG=y
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y
CONFIG_ARCH_HAS_KERNEL_FPU_SUPPORT=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=4
CONFIG_CC_HAS_SANE_FUNCTION_ALIGNMENT=y
CONFIG_HAVE_ARCH_GET_SECUREBOOT=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_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 is not set
CONFIG_BLK_DEBUG_FS=y
# CONFIG_BLK_SED_OPAL is not set
CONFIG_BLK_INLINE_ENCRYPTION=y
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
CONFIG_ACORN_PARTITION=y
CONFIG_ACORN_PARTITION_CUMANA=y
CONFIG_ACORN_PARTITION_EESOX=y
CONFIG_ACORN_PARTITION_ICS=y
CONFIG_ACORN_PARTITION_ADFS=y
CONFIG_ACORN_PARTITION_POWERTEC=y
CONFIG_ACORN_PARTITION_RISCIX=y
CONFIG_AIX_PARTITION=y
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
CONFIG_ATARI_PARTITION=y
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not set
CONFIG_SGI_PARTITION=y
CONFIG_ULTRIX_PARTITION=y
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_SYSV68_PARTITION=y
CONFIG_CMDLINE_PARTITION=y
# CONFIG_OF_PARTITION is not set
# end of Partition Types

CONFIG_BLK_PM=y
CONFIG_BLOCK_HOLDER_DEPRECATED=y
CONFIG_BLK_MQ_STACKING=y
# CONFIG_BLK_ERROR_INJECTION is not set

#
# IO Schedulers
#
CONFIG_MQ_IOSCHED_DEADLINE=y
CONFIG_MQ_IOSCHED_KYBER=y
CONFIG_IOSCHED_BFQ=y
CONFIG_BFQ_GROUP_IOSCHED=y
CONFIG_BFQ_CGROUP_DEBUG=y
# end of IO Schedulers

CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PADATA=y
CONFIG_ASN1=y
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
CONFIG_QUEUED_SPINLOCKS=y
# CONFIG_QUEUED_SPINLOCKS_TRACE_CONTENDED_RELEASE is not set
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
CONFIG_QUEUED_RWLOCKS=y
CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y
CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
CONFIG_FREEZER=y

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_STATE=y
CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
CONFIG_ARCH_HAVE_ELF_PROT=y
CONFIG_ARCH_USE_GNU_PROPERTY=y
CONFIG_ELFCORE=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
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_HAVE_GUP_FAST=y
CONFIG_ARCH_KEEP_MEMBLOCK=y
CONFIG_NUMA_KEEP_MEMINFO=y
CONFIG_MEMORY_ISOLATION=y
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTPLUG=y
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE is not set
CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO=y
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_KERNEL is not set
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_MOVABLE is not set
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_MHP_MEMMAP_ON_MEMORY=y
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
CONFIG_SPLIT_PTE_PTLOCKS=y
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
CONFIG_SPLIT_PMD_PTLOCKS=y
CONFIG_BALLOON=y
CONFIG_BALLOON_MIGRATION=y
CONFIG_COMPACTION=y
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
CONFIG_PAGE_REPORTING=y
CONFIG_NUMA_MIGRATION=y
CONFIG_MIGRATION=y
CONFIG_DEVICE_MIGRATION=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
CONFIG_ARCH_HAS_PMD_SOFTLEAVES=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
CONFIG_MEMORY_FAILURE=y
# CONFIG_HWPOISON_INJECT is not set
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=y
# 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 is not set
CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_NEVER=y
# 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 is not set
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_ARCH_SUPPORTS_HUGE_PFNMAP=y
CONFIG_ARCH_SUPPORTS_PMD_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_GENERIC_EARLY_IOREMAP=y
# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set
CONFIG_PAGE_IDLE_FLAG=y
# CONFIG_IDLE_PAGE_TRACKING is not set
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y
CONFIG_ARCH_HAS_ZONE_DMA_SET=y
CONFIG_ZONE_DMA=y
CONFIG_ZONE_DMA32=y
CONFIG_ZONE_DEVICE=y
CONFIG_HMM_MIRROR=y
CONFIG_GET_FREE_REGION=y
CONFIG_DEVICE_PRIVATE=y
CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
CONFIG_ARCH_HAS_PKEYS=y
CONFIG_ARCH_USES_PG_ARCH_2=y
CONFIG_ARCH_USES_PG_ARCH_3=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_MEMFD_CREATE=y
CONFIG_SECRETMEM=y
CONFIG_ANON_VMA_NAME=y
CONFIG_HAVE_ARCH_USERFAULTFD_WP=y
CONFIG_HAVE_ARCH_USERFAULTFD_MINOR=y
CONFIG_USERFAULTFD_RWP=y
CONFIG_USERFAULTFD=y
# CONFIG_PTE_MARKER_UFFD_WP is not set
# CONFIG_LRU_GEN is not set
CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y
CONFIG_PER_VMA_LOCK=y
CONFIG_LOCK_MM_AND_FIND_VMA=y
CONFIG_EXECMEM=y
CONFIG_NUMA_MEMBLKS=y
# CONFIG_NUMA_EMU is not set
CONFIG_GENERIC_ARCH_NUMA=y
CONFIG_ARCH_HAS_USER_SHADOW_STACK=y
CONFIG_PT_RECLAIM=y
CONFIG_ARCH_HAS_LAZY_MMU_MODE=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_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_INTERFACE=y
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_MIGRATE=y
CONFIG_XFRM_STATISTICS=y
CONFIG_XFRM_AH=y
CONFIG_XFRM_ESP=y
CONFIG_XFRM_IPCOMP=y
CONFIG_NET_KEY=y
CONFIG_NET_KEY_MIGRATE=y
CONFIG_XFRM_IPTFS=y
CONFIG_XFRM_ESPINTCP=y
CONFIG_SMC=y
CONFIG_SMC_DIAG=y
# CONFIG_SMC_HS_CTRL_BPF is not set
CONFIG_DIBS=y
CONFIG_DIBS_LO=y
CONFIG_XDP_SOCKETS=y
CONFIG_XDP_SOCKETS_DIAG=y
CONFIG_NET_HANDSHAKE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_FIB_TRIE_STATS=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_ROUTE_CLASSID=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_NET_IPIP=y
CONFIG_NET_IPGRE_DEMUX=y
CONFIG_NET_IP_TUNNEL=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE_COMMON=y
CONFIG_IP_MROUTE=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
CONFIG_NET_IPVTI=y
CONFIG_NET_UDP_TUNNEL=y
CONFIG_NET_FOU=y
CONFIG_NET_FOU_IP_TUNNELS=y
CONFIG_INET_AH=y
CONFIG_INET_ESP=y
CONFIG_INET_ESP_OFFLOAD=y
CONFIG_INET_ESPINTCP=y
CONFIG_INET_IPCOMP=y
CONFIG_INET_TABLE_PERTURB_ORDER=16
CONFIG_INET_XFRM_TUNNEL=y
CONFIG_INET_TUNNEL=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_INET_UDP_DIAG=y
CONFIG_INET_RAW_DIAG=y
CONFIG_INET_DIAG_DESTROY=y
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_CONG_WESTWOOD=y
CONFIG_TCP_CONG_HTCP=y
CONFIG_TCP_CONG_HSTCP=y
CONFIG_TCP_CONG_HYBLA=y
CONFIG_TCP_CONG_VEGAS=y
CONFIG_TCP_CONG_NV=y
CONFIG_TCP_CONG_SCALABLE=y
CONFIG_TCP_CONG_LP=y
CONFIG_TCP_CONG_VENO=y
CONFIG_TCP_CONG_YEAH=y
CONFIG_TCP_CONG_ILLINOIS=y
CONFIG_TCP_CONG_DCTCP=y
CONFIG_TCP_CONG_CDG=y
CONFIG_TCP_CONG_BBR=y
# CONFIG_DEFAULT_BIC is not set
# CONFIG_DEFAULT_CUBIC is not set
# 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=y
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="bbr"
# 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 is not set
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=y
# 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=y
CONFIG_NET_DSA_TAG_BRCM_LEGACY_FCS=y
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
# CONFIG_NET_DSA_TAG_HELLCREEK is not set
# CONFIG_NET_DSA_TAG_GSWIP is not set
# CONFIG_NET_DSA_TAG_DSA is not set
# CONFIG_NET_DSA_TAG_EDSA is not set
# CONFIG_NET_DSA_TAG_MT7628 is not set
CONFIG_NET_DSA_TAG_MTK=y
# CONFIG_NET_DSA_TAG_MXL_862XX is not set
# CONFIG_NET_DSA_TAG_MXL_GSW1XX is not set
# CONFIG_NET_DSA_TAG_KSZ is not set
# CONFIG_NET_DSA_TAG_NETC is not set
CONFIG_NET_DSA_TAG_OCELOT=y
CONFIG_NET_DSA_TAG_OCELOT_8021Q=y
CONFIG_NET_DSA_TAG_QCA=y
CONFIG_NET_DSA_TAG_RTL4_A=y
# CONFIG_NET_DSA_TAG_RTL8_4 is not set
# CONFIG_NET_DSA_TAG_RZN1_A5PSW is not set
# CONFIG_NET_DSA_TAG_LAN9303 is not set
# CONFIG_NET_DSA_TAG_SJA1105 is not set
# CONFIG_NET_DSA_TAG_TRAILER is not set
# CONFIG_NET_DSA_TAG_VSC73XX_8021Q is not set
# CONFIG_NET_DSA_TAG_XRS700X is not set
# CONFIG_NET_DSA_TAG_YT921X is not set
CONFIG_VLAN_8021Q=y
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_LLC=y
CONFIG_LLC2=y
CONFIG_X25=y
CONFIG_LAPB=y
CONFIG_PHONET=y
CONFIG_6LOWPAN=y
# CONFIG_6LOWPAN_DEBUGFS is not set
CONFIG_6LOWPAN_NHC=y
CONFIG_6LOWPAN_NHC_DEST=y
CONFIG_6LOWPAN_NHC_FRAGMENT=y
CONFIG_6LOWPAN_NHC_HOP=y
CONFIG_6LOWPAN_NHC_IPV6=y
CONFIG_6LOWPAN_NHC_MOBILITY=y
CONFIG_6LOWPAN_NHC_ROUTING=y
CONFIG_6LOWPAN_NHC_UDP=y
CONFIG_6LOWPAN_GHC_EXT_HDR_HOP=y
CONFIG_6LOWPAN_GHC_UDP=y
CONFIG_6LOWPAN_GHC_ICMPV6=y
CONFIG_6LOWPAN_GHC_EXT_HDR_DEST=y
CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG=y
CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE=y
CONFIG_IEEE802154=y
CONFIG_IEEE802154_NL802154_EXPERIMENTAL=y
CONFIG_IEEE802154_SOCKET=y
CONFIG_IEEE802154_6LOWPAN=y
CONFIG_MAC802154=y
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_MULTIQ=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFB=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_CBS=y
CONFIG_NET_SCH_ETF=y
CONFIG_NET_SCH_MQPRIO_LIB=y
CONFIG_NET_SCH_TAPRIO=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_NETEM=y
CONFIG_NET_SCH_DRR=y
CONFIG_NET_SCH_MQPRIO=y
CONFIG_NET_SCH_SKBPRIO=y
CONFIG_NET_SCH_CHOKE=y
CONFIG_NET_SCH_QFQ=y
CONFIG_NET_SCH_CODEL=y
CONFIG_NET_SCH_FQ_CODEL=y
CONFIG_NET_SCH_CAKE=y
CONFIG_NET_SCH_FQ=y
CONFIG_NET_SCH_HHF=y
CONFIG_NET_SCH_PIE=y
CONFIG_NET_SCH_FQ_PIE=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCH_PLUG=y
CONFIG_NET_SCH_ETS=y
# CONFIG_NET_SCH_DUALPI2 is not set
CONFIG_NET_SCH_DEFAULT=y
# CONFIG_DEFAULT_FQ is not set
CONFIG_DEFAULT_CODEL=y
# CONFIG_DEFAULT_FQ_CODEL is not set
# CONFIG_DEFAULT_FQ_PIE is not set
# CONFIG_DEFAULT_SFQ is not set
# CONFIG_DEFAULT_PFIFO_FAST is not set
CONFIG_DEFAULT_NET_SCH="pfifo_fast"

#
# Classification
#
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_FLOW=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_NET_CLS_BPF=y
CONFIG_NET_CLS_FLOWER=y
CONFIG_NET_CLS_MATCHALL=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_EMATCH_CMP=y
CONFIG_NET_EMATCH_NBYTE=y
CONFIG_NET_EMATCH_U32=y
CONFIG_NET_EMATCH_META=y
CONFIG_NET_EMATCH_TEXT=y
CONFIG_NET_EMATCH_CANID=y
CONFIG_NET_EMATCH_IPSET=y
CONFIG_NET_EMATCH_IPT=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y
CONFIG_NET_ACT_GACT=y
CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=y
CONFIG_NET_ACT_SAMPLE=y
CONFIG_NET_ACT_NAT=y
CONFIG_NET_ACT_PEDIT=y
CONFIG_NET_ACT_SIMP=y
CONFIG_NET_ACT_SKBEDIT=y
CONFIG_NET_ACT_CSUM=y
CONFIG_NET_ACT_MPLS=y
CONFIG_NET_ACT_VLAN=y
CONFIG_NET_ACT_BPF=y
CONFIG_NET_ACT_CONNMARK=y
CONFIG_NET_ACT_CTINFO=y
CONFIG_NET_ACT_SKBMOD=y
CONFIG_NET_ACT_IFE=y
CONFIG_NET_ACT_TUNNEL_KEY=y
CONFIG_NET_ACT_CT=y
CONFIG_NET_ACT_GATE=y
CONFIG_NET_IFE_SKBMARK=y
CONFIG_NET_IFE_SKBPRIO=y
CONFIG_NET_IFE_SKBTCINDEX=y
CONFIG_NET_TC_SKB_EXT=y
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y
CONFIG_DNS_RESOLVER=y
CONFIG_BATMAN_ADV=y
CONFIG_BATMAN_ADV_BATMAN_V=y
CONFIG_BATMAN_ADV_BLA=y
CONFIG_BATMAN_ADV_DAT=y
CONFIG_BATMAN_ADV_MCAST=y
# CONFIG_BATMAN_ADV_DEBUG is not set
# CONFIG_BATMAN_ADV_TRACING is not set
CONFIG_OPENVSWITCH=y
CONFIG_VSOCKETS=y
CONFIG_VSOCKETS_DIAG=y
CONFIG_VSOCKETS_LOOPBACK=y
CONFIG_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_SMD=y
CONFIG_QRTR_TUN=y
CONFIG_QRTR_MHI=y
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_BPF_STREAM_PARSER is not set
CONFIG_NET_FLOW_LIMIT=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_DROP_MONITOR is not set
# 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=y
# 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=y
# 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=y
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_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=y
CONFIG_NFC_NXP_NCI_I2C=y
CONFIG_NFC_S3FWRN5=y
CONFIG_NFC_S3FWRN5_I2C=y
# 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=y
CONFIG_FAILOVER=y
CONFIG_ETHTOOL_NETLINK=y

#
# Device Drivers
#
CONFIG_ARM_AMBA=y
CONFIG_HAVE_PCI=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_DOMAINS_GENERIC=y
CONFIG_PCI_SYSCALL=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_IOV=y
# CONFIG_PCI_NPEM is not set
# CONFIG_PCI_PRI is not set
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=y
# CONFIG_HOTPLUG_PCI_ACPI_AMPERE_ALTRA is not set
# CONFIG_HOTPLUG_PCI_ACPI_IBM 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_PCIE_ALTERA=y
CONFIG_PCIE_ALTERA_MSI=y
CONFIG_PCI_HOST_THUNDER_PEM=y
CONFIG_PCI_HOST_THUNDER_ECAM=y
# CONFIG_PCI_FTPCI100 is not set
CONFIG_PCI_HOST_GENERIC=y
# CONFIG_PCIE_HISI_ERR is not set
CONFIG_PCI_XGENE=y
CONFIG_PCI_XGENE_MSI=y
CONFIG_PCIE_XILINX=y

#
# 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_PCIE_DW=y
# CONFIG_PCIE_DW_DEBUGFS is not set
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_AL is not set
# CONFIG_PCIE_AMD_MDB is not set
CONFIG_PCI_MESON=y
CONFIG_PCI_HISI=y
CONFIG_PCIE_KIRIN=y
# 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=y
# CONFIG_PCI_ENDPOINT_MSI_DOORBELL is not set
CONFIG_PCI_EPF_TEST=y
# 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=y
CONFIG_PCI_PWRCTRL_GENERIC=y
CONFIG_PCI_PWRCTRL_TC9563=y
# CONFIG_CXL_BUS is not set
CONFIG_PCCARD=y
CONFIG_PCMCIA=y
# CONFIG_PCMCIA_LOAD_CIS is not set
# CONFIG_CARDBUS is not set

#
# PC-card bridges
#
# CONFIG_YENTA is not set
# CONFIG_PD6729 is not set
# 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=y
# 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_HMEM_REPORTING=y
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
CONFIG_GENERIC_CPU_DEVICES=y
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_SOC_BUS=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_SLIMBUS=y
CONFIG_REGMAP_SPI=y
CONFIG_REGMAP_SPMI=y
CONFIG_REGMAP_MMIO=y
CONFIG_REGMAP_IRQ=y
CONFIG_DMA_SHARED_BUFFER=y
CONFIG_GENERIC_ARCH_TOPOLOGY=y
# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
# end of Generic Driver Options

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

# CONFIG_CACHEMAINT_FOR_HOTPLUG is not set
CONFIG_CONNECTOR=y
# CONFIG_PROC_EVENTS is not set

#
# Firmware Drivers
#

#
# ARM System Control and Management Interface Protocol
#
CONFIG_ARM_SCMI_PROTOCOL=y
# CONFIG_ARM_SCMI_RAW_MODE_SUPPORT is not set
# CONFIG_ARM_SCMI_DEBUG_COUNTERS is not set
CONFIG_ARM_SCMI_QUIRKS=y

#
# SCMI Transport Drivers
#
CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
CONFIG_ARM_SCMI_HAVE_SHMEM=y
CONFIG_ARM_SCMI_HAVE_MSG=y
CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
CONFIG_ARM_SCMI_TRANSPORT_SMC=y
# CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
CONFIG_ARM_SCMI_TRANSPORT_OPTEE=y
# CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
# end of SCMI Transport Drivers

#
# ARM SCMI NXP i.MX Vendor Protocols
#
CONFIG_IMX_SCMI_BBM_EXT=y
# end of ARM SCMI NXP i.MX Vendor Protocols

# CONFIG_ARM_SCMI_POWER_CONTROL is not set
# end of ARM System Control and Management Interface Protocol

CONFIG_ARM_SCPI_PROTOCOL=y
CONFIG_ARM_SDE_INTERFACE=y
# CONFIG_ARM_SDEI_NMI is not set
# CONFIG_FIRMWARE_MEMMAP is not set
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
# CONFIG_ISCSI_IBFT is not set
# CONFIG_FW_CFG_SYSFS is not set
CONFIG_SYSFB=y
# CONFIG_SYSFB_SIMPLEFB is not set
# CONFIG_ARM_FFA_TRANSPORT is not set
CONFIG_GOOGLE_FIRMWARE=y
CONFIG_GOOGLE_CBMEM=y
CONFIG_GOOGLE_COREBOOT_TABLE=y
CONFIG_GOOGLE_MEMCONSOLE=y
# CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT is not set
CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y
CONFIG_GOOGLE_VPD=y

#
# EFI (Extensible Firmware Interface) Support
#
CONFIG_EFI_ESRT=y
CONFIG_EFI_VARS_PSTORE=y
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
CONFIG_EFI_SOFT_RESERVE=y
CONFIG_EFI_PARAMS_FROM_FDT=y
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFI_GENERIC_STUB=y
# CONFIG_EFI_ZBOOT is not set
CONFIG_EFI_ARMSTUB_DTB_LOADER=y
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
CONFIG_EFI_CAPSULE_LOADER=y
# CONFIG_EFI_TEST is not set
# CONFIG_RESET_ATTACK_MITIGATION is not set
# CONFIG_EFI_DISABLE_PCI_DMA is not set
CONFIG_EFI_EARLYCON=y
CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
# CONFIG_EFI_DISABLE_RUNTIME is not set
# CONFIG_EFI_COCO_SECRET is not set
# CONFIG_OVMF_DEBUG_LOG is not set
# end of EFI (Extensible Firmware Interface) Support

CONFIG_UEFI_CPER=y
CONFIG_UEFI_CPER_ARM=y
# CONFIG_TEE_STMM_EFI is not set
CONFIG_ARM_PSCI_FW=y
# CONFIG_ARM_PSCI_CHECKER is not set

#
# Qualcomm firmware drivers
#
# CONFIG_QCOM_PAS is not set
# CONFIG_QCOM_PAS_TEE is not set
# CONFIG_QCOM_SCM is not set
# end of Qualcomm firmware drivers

CONFIG_HAVE_ARM_SMCCC=y
CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
CONFIG_ARM_SMCCC_SOC_ID=y

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

# CONFIG_FWCTL is not set
CONFIG_GNSS=y
CONFIG_GNSS_SERIAL=y
CONFIG_GNSS_MTK_SERIAL=y
# 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=y
# CONFIG_MTD_AFS_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=y
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_NOSWAP=y
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_GEOMETRY 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_OTP is not set
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_CFI_UTIL=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=y
CONFIG_MTD_PHYSMAP=y
# CONFIG_MTD_PHYSMAP_COMPAT is not set
CONFIG_MTD_PHYSMAP_OF=y
# CONFIG_MTD_PHYSMAP_VERSATILE is not set
# CONFIG_MTD_PHYSMAP_GEMINI is not set
# CONFIG_MTD_PHYSMAP_GPIO_ADDR is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_PCMCIA 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=y
# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
# CONFIG_MTD_DATAFLASH_OTP is not set
# CONFIG_MTD_MCHP23K256 is not set
# CONFIG_MTD_MCHP48L640 is not set
CONFIG_MTD_SST25L=y
CONFIG_MTD_SLRAM=y
CONFIG_MTD_PHRAM=y
CONFIG_MTD_MTDRAM=y
CONFIG_MTDRAM_TOTAL_SIZE=128
CONFIG_MTDRAM_ERASE_SIZE=4
CONFIG_MTD_BLOCK2MTD=y

#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOCG3 is not set
# end of Self-contained MTD device drivers

#
# NAND
#
CONFIG_MTD_NAND_CORE=y
# CONFIG_MTD_ONENAND is not set
CONFIG_MTD_RAW_NAND=y

#
# Raw/parallel NAND flash controllers
#
CONFIG_MTD_NAND_DENALI=y
# CONFIG_MTD_NAND_DENALI_PCI is not set
CONFIG_MTD_NAND_DENALI_DT=y
# CONFIG_MTD_NAND_CAFE is not set
CONFIG_MTD_NAND_BRCMNAND=y
# CONFIG_MTD_NAND_BRCMNAND_BCM63XX is not set
CONFIG_MTD_NAND_BRCMNAND_BCMBCA=y
CONFIG_MTD_NAND_BRCMNAND_BRCMSTB=y
CONFIG_MTD_NAND_BRCMNAND_IPROC=y
# CONFIG_MTD_NAND_MXIC is not set
# CONFIG_MTD_NAND_GPIO is not set
# CONFIG_MTD_NAND_PLATFORM is not set
# CONFIG_MTD_NAND_CADENCE is not set
# CONFIG_MTD_NAND_ARASAN is not set
# CONFIG_MTD_NAND_INTEL_LGM is not set

#
# Misc
#
# CONFIG_MTD_NAND_NANDSIM is not set
# CONFIG_MTD_NAND_RICOH is not set
# CONFIG_MTD_NAND_DISKONCHIP is not set
CONFIG_MTD_SPI_NAND=y

#
# ECC engine support
#
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
# CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC 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=y
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set
CONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y
# CONFIG_MTD_SPI_NOR_SWP_KEEP 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=y
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_DYNAMIC=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_RESERVED_MEM=y
CONFIG_OF_RESOLVE=y
CONFIG_OF_OVERLAY=y
CONFIG_OF_NUMA=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_CDROM=y
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
CONFIG_ZRAM=y
# CONFIG_ZRAM_BACKEND_LZ4 is not set
# CONFIG_ZRAM_BACKEND_LZ4HC is not set
# CONFIG_ZRAM_BACKEND_ZSTD is not set
# CONFIG_ZRAM_BACKEND_DEFLATE is not set
# CONFIG_ZRAM_BACKEND_842 is not set
CONFIG_ZRAM_BACKEND_FORCE_LZO=y
CONFIG_ZRAM_BACKEND_LZO=y
# CONFIG_ZRAM_DEF_COMP_LZORLE is not set
CONFIG_ZRAM_DEF_COMP_LZO=y
CONFIG_ZRAM_DEF_COMP="lzo"
# CONFIG_ZRAM_WRITEBACK is not set
# CONFIG_ZRAM_TRACK_ENTRY_ACTIME is not set
# CONFIG_ZRAM_MEMORY_TRACKING is not set
# CONFIG_ZRAM_MULTI_COMP is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_ATA_OVER_ETH=y
CONFIG_VIRTIO_BLK=y
# CONFIG_BLK_DEV_RBD is not set
CONFIG_BLK_DEV_UBLK=y
CONFIG_BLKDEV_UBLK_LEGACY_OPCODES=y
CONFIG_BLK_DEV_RNBD=y
CONFIG_BLK_DEV_RNBD_CLIENT=y
# CONFIG_BLK_DEV_ZONED_LOOP is not set

#
# NVME Support
#
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
CONFIG_NVME_MULTIPATH=y
# CONFIG_NVME_VERBOSE_ERRORS is not set
# CONFIG_NVME_HWMON is not set
CONFIG_NVME_FABRICS=y
CONFIG_NVME_RDMA=y
CONFIG_NVME_FC=y
CONFIG_NVME_TCP=y
# CONFIG_NVME_TCP_TLS is not set
# CONFIG_NVME_HOST_AUTH is not set
CONFIG_NVME_TARGET=y
# CONFIG_NVME_TARGET_DEBUGFS is not set
# CONFIG_NVME_TARGET_PASSTHRU is not set
CONFIG_NVME_TARGET_LOOP=y
CONFIG_NVME_TARGET_RDMA=y
CONFIG_NVME_TARGET_FC=y
CONFIG_NVME_TARGET_FCLOOP=y
CONFIG_NVME_TARGET_TCP=y
# CONFIG_NVME_TARGET_TCP_TLS is not set
# CONFIG_NVME_TARGET_AUTH is not set
# CONFIG_NVME_TARGET_PCI_EPF is not set
# end of NVME Support

#
# Misc devices
#
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_PHANTOM is not set
# CONFIG_RPMB is not set
# CONFIG_TI_FPC202 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HI6421V600_IRQ 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_LATTICE_ECP3_CONFIG is not set
CONFIG_SRAM=y
# CONFIG_DW_XDATA_PCIE is not set
CONFIG_PCI_ENDPOINT_TEST=y
CONFIG_XILINX_SDFEC=y
CONFIG_MISC_RTSX=y
# CONFIG_OPEN_DICE is not set
# CONFIG_NTSYNC is not set
# CONFIG_VCPU_STALL_DETECTOR is not set
CONFIG_TPS6594_ESM=y
CONFIG_TPS6594_PFSM=y
# CONFIG_NSM is not set
# CONFIG_MCHP_LAN966X_PCI is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_MAX6875 is not set
CONFIG_EEPROM_93CX6=y
# CONFIG_EEPROM_IDT_89HPESX is not set
# end of EEPROM support

# CONFIG_CB710_CORE is not set
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_ALTERA_STAPL is not set
# CONFIG_VMWARE_VMCI is not set
# 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=y
# CONFIG_PVPANIC is not set
# CONFIG_GP_PCI1XXXX is not set
# CONFIG_KEBA_CP500 is not set
# CONFIG_AMD_SBRMI_I2C is not set
# CONFIG_AMD_SBTSI is not set
CONFIG_MISC_RP1=y
# CONFIG_INTEL_SSEI is not set
# end of Misc devices

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

#
# 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=y
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_HISI_SAS=y
CONFIG_SCSI_HISI_SAS_PCI=y
# CONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_ESAS2R is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT3SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_MPI3MR is not set
# CONFIG_SCSI_LEAPRAID is not set
# CONFIG_SCSI_SMARTPQI is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_MYRB is not set
# CONFIG_SCSI_MYRS is not set
# CONFIG_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_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=y
CONFIG_AHCI_DWC=y
CONFIG_AHCI_CEVA=y
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
CONFIG_SATA_SIL24=y
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_PLATFORM=y
CONFIG_PATA_OF_PLATFORM=y
# 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 is not set
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_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_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=y
# CONFIG_ARCNET is not set
CONFIG_ATM_DRIVERS=y
# CONFIG_ATM_SOLOS is not set

#
# Distributed Switch Architecture drivers
#
CONFIG_B53=y
# CONFIG_B53_SPI_DRIVER is not set
# CONFIG_B53_MDIO_DRIVER is not set
# CONFIG_B53_MMAP_DRIVER is not set
CONFIG_B53_SRAB_DRIVER=y
# CONFIG_B53_SERDES is not set
CONFIG_NET_DSA_BCM_SF2=y
# 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=y
# 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_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 is not set
# CONFIG_NET_VENDOR_HUAWEI is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_JME is not set
CONFIG_NET_VENDOR_ADI=y
# CONFIG_ADIN1110 is not set
# CONFIG_ADIN1140 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 is not set
CONFIG_NET_VENDOR_META=y
# CONFIG_FBNIC is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MICROSEMI is not set
CONFIG_NET_VENDOR_MICROSOFT=y
CONFIG_NET_VENDOR_MUCSE=y
# CONFIG_MGBE is not set
# CONFIG_NET_VENDOR_MYRI is not set
# CONFIG_FEALNX is not set
# CONFIG_NET_VENDOR_NI is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NETRONOME is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_ETHOC is not set
# CONFIG_NET_VENDOR_PENSANDO is not set
# CONFIG_NET_VENDOR_QLOGIC is not set
# CONFIG_NET_VENDOR_BROCADE is not set
# CONFIG_NET_VENDOR_QUALCOMM is not set
# CONFIG_NET_VENDOR_RDC is not set
# CONFIG_NET_VENDOR_REALTEK is not set
# CONFIG_NET_VENDOR_RENESAS is not set
# CONFIG_NET_VENDOR_ROCKER is not set
# CONFIG_NET_VENDOR_SAMSUNG is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SOCIONEXT is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_SYNOPSYS is not set
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
CONFIG_NET_VENDOR_VERTEXCOM=y
# CONFIG_MSE102X is not set
# CONFIG_NET_VENDOR_VIA is not set
CONFIG_NET_VENDOR_WANGXUN=y
# CONFIG_NGBE is not set
# CONFIG_TXGBE is not set
# CONFIG_TXGBEVF is not set
# CONFIG_NGBEVF is not set
# CONFIG_NET_VENDOR_WIZNET is not set
# CONFIG_NET_VENDOR_XILINX is not set
# CONFIG_NET_VENDOR_XIRCOM is not set
CONFIG_NET_VENDOR_ZTE=y
# CONFIG_DINGHAI is not set
CONFIG_FDDI=y
# CONFIG_DEFXX is not set
# CONFIG_SKFP is not set
CONFIG_PHYLINK=y
CONFIG_PHYLIB=y
CONFIG_SWPHY=y
CONFIG_PHY_PACKAGE=y
# CONFIG_LED_TRIGGER_PHY is not set
CONFIG_OPEN_ALLIANCE_HELPERS=y
CONFIG_PHYLIB_LEDS=y
CONFIG_FIXED_PHY=y
# CONFIG_SFP is not set

#
# MII PHY device drivers
#
# CONFIG_AS21XXX_PHY is not set
# CONFIG_AIR_AN8801_PHY is not set
# CONFIG_AIR_EN8811H_PHY is not set
# CONFIG_AMD_PHY is not set
# CONFIG_ADIN_PHY is not set
# CONFIG_ADIN1100_PHY is not set
# CONFIG_ADIN1140_PHY is not set
CONFIG_AQUANTIA_PHY=y
CONFIG_AX88796B_PHY=y
CONFIG_BROADCOM_PHY=y
CONFIG_BCM54140_PHY=y
CONFIG_BCM7XXX_PHY=y
# CONFIG_BCM84881_PHY is not set
# CONFIG_BCM87XX_PHY is not set
CONFIG_BCM_NET_PHYLIB=y
# CONFIG_CICADA_PHY is not set
# CONFIG_CORTINA_PHY is not set
# CONFIG_DAP8211R_PHY is not set
# CONFIG_DAVICOM_PHY is not set
# CONFIG_ICPLUS_PHY is not set
# CONFIG_LXT_PHY is not set
# CONFIG_INTEL_XWAY_PHY is not set
# CONFIG_LSI_ET1011C_PHY is not set
CONFIG_MARVELL_PHY=y
CONFIG_MARVELL_10G_PHY=y
CONFIG_MARVELL_88Q2XXX_PHY=y
# 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=y
# CONFIG_MICROCHIP_T1S_PHY is not set
CONFIG_MICROCHIP_PHY=y
# CONFIG_MICROCHIP_T1_PHY is not set
CONFIG_MICROSEMI_PHY=y
# 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_QCOM_NET_PHYLIB=y
CONFIG_AT803X_PHY=y
# CONFIG_QCA83XX_PHY is not set
CONFIG_QCA808X_PHY=y
# 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=y
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=y
CONFIG_DP83869_PHY=y
CONFIG_DP83TD510_PHY=y
CONFIG_DP83TG720_PHY=y
CONFIG_VITESSE_PHY=y
CONFIG_XILINX_GMII2RGMII=y
# 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=y
# 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_XILINXCAN=y
# CONFIG_CAN_C_CAN is not set
# CONFIG_CAN_CC770 is not set
# CONFIG_CAN_CTUCANFD_PCI is not set
# CONFIG_CAN_CTUCANFD_PLATFORM is not set
# CONFIG_CAN_ESD_402_PCI is not set
CONFIG_CAN_IFI_CANFD=y
CONFIG_CAN_M_CAN=y
# CONFIG_CAN_M_CAN_PCI is not set
CONFIG_CAN_M_CAN_PLATFORM=y
# CONFIG_CAN_M_CAN_TCAN4X5X 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=y
# CONFIG_CAN_MCP251XFD_SANITY is not set
# end of CAN SPI interfaces

#
# CAN USB interfaces
#
CONFIG_CAN_8DEV_USB=y
CONFIG_CAN_EMS_USB=y
CONFIG_CAN_ESD_USB=y
CONFIG_CAN_ETAS_ES58X=y
CONFIG_CAN_F81604=y
CONFIG_CAN_GS_USB=y
CONFIG_CAN_KVASER_USB=y
CONFIG_CAN_MCBA_USB=y
CONFIG_CAN_PEAK_USB=y
CONFIG_CAN_UCAN=y
# end of CAN USB interfaces

# CONFIG_CAN_DEBUG_DEVICES is not set

#
# MCTP Device Drivers
#
# CONFIG_MCTP_SERIAL is not set
# CONFIG_MCTP_TRANSPORT_I2C is not set
# CONFIG_MCTP_TRANSPORT_USBLIB is not set
# CONFIG_MCTP_TRANSPORT_USB is not set
# end of MCTP Device Drivers

#
# MDIO controller drivers
#
CONFIG_FWNODE_MDIO=y
CONFIG_OF_MDIO=y
CONFIG_ACPI_MDIO=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_BCM_UNIMAC=y
CONFIG_MDIO_CAVIUM=y
CONFIG_MDIO_GPIO=y
# 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=y

#
# MDIO Multiplexers
#
CONFIG_MDIO_BUS_MUX=y
# CONFIG_MDIO_BUS_MUX_GPIO is not set
CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y
CONFIG_MDIO_BUS_MUX_MMIOREG=y
# end of MDIO Multiplexers
# end of MDIO controller drivers

#
# PCS device drivers
#
CONFIG_PCS_XPCS=y
# 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_WLAN_VENDOR_ATH is not set
# CONFIG_WLAN_VENDOR_ATMEL is not set
# CONFIG_WLAN_VENDOR_BROADCOM is not set
# CONFIG_WLAN_VENDOR_INTEL is not set
# CONFIG_WLAN_VENDOR_INTERSIL is not set
# CONFIG_WLAN_VENDOR_MARVELL is not set
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
# CONFIG_WLAN_VENDOR_MICROCHIP is not set
CONFIG_WLAN_VENDOR_MORSEMICRO=y
# CONFIG_MM81X_USB is not set
# CONFIG_MM81X_SDIO is not set
CONFIG_WLAN_VENDOR_NXP=y
# CONFIG_NXPWIFI_SDIO is not set
CONFIG_WLAN_VENDOR_PURELIFI=y
CONFIG_PLFXLC=y
# CONFIG_WLAN_VENDOR_RALINK is not set
# CONFIG_WLAN_VENDOR_REALTEK is not set
# CONFIG_WLAN_VENDOR_RSI is not set
CONFIG_WLAN_VENDOR_SILABS=y
# CONFIG_WFX is not set
# CONFIG_WLAN_VENDOR_ST is not set
# CONFIG_WLAN_VENDOR_TI is not set
# CONFIG_WLAN_VENDOR_ZYDAS is not set
# CONFIG_WLAN_VENDOR_QUANTENNA is not set
CONFIG_MAC80211_HWSIM=y
CONFIG_VIRT_WIFI=y
CONFIG_WAN=y
CONFIG_HDLC=y
CONFIG_HDLC_RAW=y
CONFIG_HDLC_RAW_ETH=y
CONFIG_HDLC_CISCO=y
CONFIG_HDLC_FR=y
CONFIG_HDLC_PPP=y
CONFIG_HDLC_X25=y
# CONFIG_FRAMER is not set
# CONFIG_PCI200SYN is not set
# CONFIG_WANXL is not set
# CONFIG_PC300TOO is not set
# CONFIG_FARSYNC is not set
CONFIG_LAPBETHER=y
CONFIG_IEEE802154_DRIVERS=y
# CONFIG_IEEE802154_FAKELB is not set
# CONFIG_IEEE802154_AT86RF230 is not set
# CONFIG_IEEE802154_MRF24J40 is not set
# CONFIG_IEEE802154_CC2520 is not set
CONFIG_IEEE802154_ATUSB=y
# CONFIG_IEEE802154_ADF7242 is not set
# CONFIG_IEEE802154_CA8210 is not set
# CONFIG_IEEE802154_MCR20A is not set
CONFIG_IEEE802154_HWSIM=y

#
# Wireless WAN
#
CONFIG_WWAN=y
CONFIG_WWAN_DEBUGFS=y
# CONFIG_WWAN_HWSIM is not set
CONFIG_MHI_WWAN_CTRL=y
CONFIG_MHI_WWAN_MBIM=y
# CONFIG_RPMSG_WWAN_CTRL 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=y
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=y
# CONFIG_KEYBOARD_ADP5585 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=y
CONFIG_KEYBOARD_GPIO_POLLED=y
# 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_IMX_BBM_SCMI=y
# 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_MTK_PMIC=y
# 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_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_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=y
CONFIG_MOUSE_ELAN_I2C_I2C=y
# CONFIG_MOUSE_ELAN_I2C_SMBUS 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=y
# CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 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=y
CONFIG_TOUCHSCREEN_GOODIX_BERLIN_CORE=y
# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_I2C is not set
CONFIG_TOUCHSCREEN_GOODIX_BERLIN_SPI=y
# 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=y
# 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=y
# 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=y
# 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=y
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
# CONFIG_INPUT_ATMEL_CAPTOUCH is not set
CONFIG_INPUT_AW86927=y
# CONFIG_INPUT_BMA150 is not set
# CONFIG_INPUT_E3X0_BUTTON is not set
# CONFIG_INPUT_MMA8450 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_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_TPS65219_PWRBUTTON=y
CONFIG_INPUT_TPS6594_PWRBUTTON=y
# CONFIG_INPUT_AXP20X_PEK 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_PWM_BEEPER=y
CONFIG_INPUT_PWM_VIBRA=y
CONFIG_INPUT_RK805_PWRKEY=y
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
# CONFIG_INPUT_DA7280_HAPTICS is not set
CONFIG_INPUT_DA9063_ONKEY=y
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_IBM_PANEL is not set
CONFIG_INPUT_IMS_PCU=y
# CONFIG_INPUT_IQS269A is not set
# CONFIG_INPUT_IQS626A is not set
# CONFIG_INPUT_IQS7222 is not set
# CONFIG_INPUT_ISA1200_HAPTIC is not set
# CONFIG_INPUT_CMA3000 is not set
# CONFIG_INPUT_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_SERIO_SERPORT=y
# CONFIG_SERIO_PARKBD is not set
CONFIG_SERIO_AMBAKMI=y
# 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=y
# CONFIG_SERIAL_8250_FINTEK is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_PCILIB=y
CONFIG_SERIAL_8250_PCI=y
# CONFIG_SERIAL_8250_EXAR is not set
CONFIG_SERIAL_8250_MOXA_PCIE=y
# CONFIG_SERIAL_8250_CS is not set
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_8250_MANY_PORTS=y
# CONFIG_SERIAL_8250_PCI1XXXX is not set
CONFIG_SERIAL_8250_FSL=y
CONFIG_SERIAL_8250_DW=y
# CONFIG_SERIAL_8250_RT288X is not set
CONFIG_SERIAL_8250_PERICOM=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_8250_DWLIB=y

#
# Non-8250 serial port support
#
# CONFIG_SERIAL_AMBA_PL010 is not set
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
# CONFIG_SERIAL_EARLYCON_SEMIHOST is not set
# 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_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=y
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
# CONFIG_SERIAL_ARC is not set
# CONFIG_SERIAL_RP2 is not set
CONFIG_SERIAL_FSL_LPUART=y
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
CONFIG_SERIAL_FSL_LINFLEXUART=y
CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
# CONFIG_SERIAL_SPRD is not set
# end of Serial drivers

CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
CONFIG_N_HDLC=y
CONFIG_N_GSM=y
CONFIG_NOZOMI=y
CONFIG_NULL_TTY=y
CONFIG_HVC_DRIVER=y
# CONFIG_HVC_DCC is not set
# CONFIG_RPMSG_TTY is not set
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=y
CONFIG_IPMI_DMI_DECODE=y
CONFIG_IPMI_PLAT_DATA=y
# CONFIG_IPMI_PANIC_EVENT is not set
CONFIG_IPMI_DEVICE_INTERFACE=y
CONFIG_IPMI_SI=y
# CONFIG_IPMI_SI_ASYNC_INIT is not set
# CONFIG_IPMI_SSIF is not set
# CONFIG_IPMI_IPMB is not set
# CONFIG_IPMI_WATCHDOG is not set
# CONFIG_IPMI_POWEROFF 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_BA431 is not set
CONFIG_HW_RANDOM_VIRTIO=y
# CONFIG_HW_RANDOM_HISI_TRNG is not set
CONFIG_HW_RANDOM_OPTEE=y
# CONFIG_HW_RANDOM_CCTRNG is not set
# CONFIG_HW_RANDOM_XIPHERA is not set
CONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y
CONFIG_HW_RANDOM_CN10K=y
# CONFIG_DEVMEM is not set
# CONFIG_DEVPORT is not set
CONFIG_TCG_TPM=y
# CONFIG_TCG_TPM2_HMAC is not set
CONFIG_HW_RANDOM_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
CONFIG_TCG_TIS_SPI=y
CONFIG_TCG_TIS_SPI_CR50=y
# CONFIG_TCG_TIS_I2C is not set
CONFIG_TCG_TIS_I2C_CR50=y
# CONFIG_TCG_TIS_I2C_ATMEL is not set
CONFIG_TCG_TIS_I2C_INFINEON=y
# CONFIG_TCG_TIS_I2C_NUVOTON is not set
# CONFIG_TCG_INFINEON is not set
CONFIG_TCG_CRB=y
# CONFIG_TCG_VTPM_PROXY is not set
# CONFIG_TCG_FTPM_TEE is not set
# CONFIG_TCG_TIS_ST33ZP24_I2C is not set
# CONFIG_TCG_TIS_ST33ZP24_SPI 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=y
CONFIG_I2C_MUX_PINCTRL=y
CONFIG_I2C_MUX_REG=y
# CONFIG_I2C_DEMUX_PINCTRL is not set
# CONFIG_I2C_MUX_MLXCPLD is not set
# CONFIG_I2C_MUX_MULE is not set
# end of Multiplexer I2C Chip support

CONFIG_I2C_HELPER_AUTO=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 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 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_CADENCE=y
# CONFIG_I2C_CBUS_GPIO is not set
CONFIG_I2C_DESIGNWARE_CORE=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EMEV2 is not set
CONFIG_I2C_GPIO=y
# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set
# CONFIG_I2C_HISI is not set
# CONFIG_I2C_NOMADIK is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
CONFIG_I2C_RK3X=y
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_VERSATILE is not set
# CONFIG_I2C_THUNDERX is not set
CONFIG_I2C_XILINX=y

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

#
# SPI Master Controller Drivers
#
# CONFIG_SPI_ALTERA is not set
# CONFIG_SPI_AXI_SPI_ENGINE is not set
CONFIG_SPI_BITBANG=y
# CONFIG_SPI_BUTTERFLY is not set
# CONFIG_SPI_CADENCE is not set
CONFIG_SPI_CADENCE_QUADSPI=y
# CONFIG_SPI_CADENCE_XSPI is not set
# CONFIG_SPI_CH341 is not set
CONFIG_SPI_DESIGNWARE=y
CONFIG_SPI_DW_DMA=y
# CONFIG_SPI_DW_PCI is not set
CONFIG_SPI_DW_MMIO=y
CONFIG_SPI_DLN2=y
# CONFIG_SPI_HISI_KUNPENG is not set
# CONFIG_SPI_HISI_SFC_V3XX is not set
# 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_OC_TINY is not set
# CONFIG_SPI_PCI1XXXX is not set
CONFIG_SPI_PL022=y
# CONFIG_SPI_SC18IS602 is not set
# CONFIG_SPI_SIFIVE is not set
# CONFIG_SPI_SN_F_OSPI is not set
# CONFIG_SPI_MXIC is not set
# CONFIG_SPI_THUNDERX is not set
# CONFIG_SPI_VIRTIO is not set
# CONFIG_SPI_XCOMM is not set
CONFIG_SPI_XILINX=y
CONFIG_SPI_ZYNQMP_GQSPI=y
# CONFIG_SPI_AMD is not set

#
# SPI Multiplexer support
#
# CONFIG_SPI_MUX is not set

#
# SPI Protocol Masters
#
CONFIG_SPI_SPIDEV=y
# 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=y
# CONFIG_SPMI_HISI3670 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_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=y
CONFIG_GENERIC_PINCTRL_GROUPS=y
CONFIG_PINMUX=y
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
CONFIG_PINCONF=y
CONFIG_GENERIC_PINCONF=y
# CONFIG_DEBUG_PINCTRL is not set
# CONFIG_PINCTRL_AMD is not set
# CONFIG_PINCTRL_AXP209 is not set
# CONFIG_PINCTRL_AW9523 is not set
# CONFIG_PINCTRL_CY8C95X0 is not set
CONFIG_PINCTRL_DA9062=y
# CONFIG_PINCTRL_GENERIC_MUX is not set
CONFIG_PINCTRL_MAX77620=y
# CONFIG_PINCTRL_MCP23S08 is not set
# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set
# CONFIG_PINCTRL_OCELOT is not set
CONFIG_PINCTRL_RK805=y
# CONFIG_PINCTRL_SCMI is not set
CONFIG_PINCTRL_SINGLE=y
# CONFIG_PINCTRL_STMFX is not set
CONFIG_PINCTRL_SX150X=y
CONFIG_PINCTRL_TPS6594=y
CONFIG_PINCTRL_RP1=y

#
# Renesas pinctrl drivers
#
# end of Renesas pinctrl drivers

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=y
# CONFIG_GPIO_CDEV_V1 is not set
CONFIG_GPIO_GENERIC=y
CONFIG_GPIO_REGMAP=y

#
# Memory mapped GPIO drivers
#
# CONFIG_GPIO_74XX_MMIO is not set
CONFIG_GPIO_ALTERA=y
# CONFIG_GPIO_AMDPT is not set
# CONFIG_GPIO_BY_PINCTRL is not set
# CONFIG_GPIO_CADENCE is not set
CONFIG_GPIO_DWAPB=y
# CONFIG_GPIO_FTGPIO010 is not set
CONFIG_GPIO_GENERIC_PLATFORM=y
# CONFIG_GPIO_GRGPIO is not set
# CONFIG_GPIO_HISI is not set
# CONFIG_GPIO_HLWD is not set
# CONFIG_GPIO_LOGICVC is not set
CONFIG_GPIO_MB86S7X=y
CONFIG_GPIO_PL061=y
# CONFIG_GPIO_POLARFIRE_SOC is not set
# CONFIG_GPIO_SIFIVE is not set
CONFIG_GPIO_SYSCON=y
# CONFIG_GPIO_WAVESHARE_DSI_TOUCH is not set
CONFIG_GPIO_WCD934X=y
CONFIG_GPIO_XGENE=y
CONFIG_GPIO_XILINX=y
# CONFIG_GPIO_AMD_FCH is not set
# end of Memory mapped 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=y
# CONFIG_GPIO_MAX732X_IRQ is not set
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
# CONFIG_GPIO_PCA9570 is not set
CONFIG_GPIO_PCF857X=y
CONFIG_GPIO_TPIC2810=y
# end of I2C GPIO expanders

#
# MFD GPIO expanders
#
CONFIG_GPIO_ADP5585=y
CONFIG_GPIO_BD9571MWV=y
CONFIG_GPIO_DLN2=y
CONFIG_GPIO_LJCA=y
# CONFIG_GPIO_LP873X is not set
CONFIG_GPIO_MAX77620=y
CONFIG_GPIO_MAX77759=y
CONFIG_GPIO_TPS65219=y
# CONFIG_GPIO_TWL4030 is not set
# CONFIG_GPIO_WM8994 is not set
# end of MFD GPIO expanders

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

#
# PCI GPIO expanders
#
# CONFIG_GPIO_BT8XX 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
# 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=y
# 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=y
CONFIG_POWER_RESET_GPIO=y
CONFIG_POWER_RESET_GPIO_RESTART=y
# CONFIG_POWER_RESET_LTC2952 is not set
# CONFIG_POWER_RESET_MT6323 is not set
# CONFIG_POWER_RESET_REGULATOR is not set
# CONFIG_POWER_RESET_RESTART is not set
# CONFIG_POWER_RESET_VEXPRESS is not set
CONFIG_POWER_RESET_XGENE=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_POWER_RESET_SYSCON_POWEROFF=y
CONFIG_REBOOT_MODE=y
CONFIG_SYSCON_REBOOT_MODE=y
CONFIG_NVMEM_REBOOT_MODE=y
# CONFIG_POWER_RESET_QEMU_VIRT_CTRL is not set
CONFIG_POWER_SEQUENCING=y
CONFIG_POWER_SEQUENCING_QCOM_WCN=y
# CONFIG_POWER_SEQUENCING_PCIE_M2 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=y
# CONFIG_CHARGER_SBS is not set
# CONFIG_MANAGER_SBS is not set
CONFIG_BATTERY_BQ27XXX=y
CONFIG_BATTERY_BQ27XXX_I2C=y
# CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set
# CONFIG_AXP20X_POWER is not set
# CONFIG_BATTERY_MAX17040 is not set
CONFIG_BATTERY_MAX17042=y
# 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_MAX77759=y
# CONFIG_CHARGER_MAX77976 is not set
# CONFIG_CHARGER_MAX8971 is not set
CONFIG_CHARGER_MT6360=y
# 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=y
CONFIG_CHARGER_BQ25980=y
# CONFIG_CHARGER_BQ25630 is not set
# CONFIG_CHARGER_BQ256XX is not set
CONFIG_CHARGER_RK817=y
# CONFIG_CHARGER_SGM41542 is not set
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
# CONFIG_BATTERY_GOLDFISH is not set
# CONFIG_BATTERY_RT5033 is not set
# CONFIG_CHARGER_RT9455 is not set
# CONFIG_CHARGER_RT9467 is not set
# CONFIG_CHARGER_RT9471 is not set
# CONFIG_CHARGER_RT9756 is not set
# CONFIG_FUEL_GAUGE_STC3117 is not set
# CONFIG_CHARGER_UCS1002 is not set
# CONFIG_CHARGER_BD99954 is not set
# CONFIG_BATTERY_SURFACE is not set
# CONFIG_CHARGER_SURFACE is not set
# CONFIG_BATTERY_UG3105 is not set
# CONFIG_BATTERY_CHARGER_SURFACE_RT is not set
# CONFIG_FUEL_GAUGE_MM8013 is not set
CONFIG_HWMON=y
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
# CONFIG_SENSORS_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_KB9002 is not set
# CONFIG_SENSORS_ARCTIC_FAN_CONTROLLER is not set
CONFIG_SENSORS_ARM_SCMI=y
CONFIG_SENSORS_ARM_SCPI=y
# 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_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_FTSTEUTATES is not set
CONFIG_SENSORS_GIGABYTE_WATERFORCE=y
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_G762 is not set
CONFIG_SENSORS_GPIO_FAN=y
# CONFIG_SENSORS_HIH6130 is not set
# CONFIG_SENSORS_HS3001 is not set
# CONFIG_SENSORS_HTU31 is not set
# CONFIG_SENSORS_IBMAEM is not set
# CONFIG_SENSORS_IBMPEX is not set
# CONFIG_SENSORS_IIO_HWMON is not set
# CONFIG_SENSORS_ISL28022 is not set
# CONFIG_SENSORS_IT87 is not set
CONFIG_SENSORS_JC42=y
CONFIG_SENSORS_POWERZ=y
# CONFIG_SENSORS_POWR1220 is not set
# CONFIG_SENSORS_PROM21_XHCI 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=y
# 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=y
# 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_PWM_FAN=y
# 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=y
# CONFIG_SENSORS_INA209 is not set
CONFIG_SENSORS_INA2XX=y
# CONFIG_SENSORS_INA238 is not set
CONFIG_SENSORS_INA3221=y
# CONFIG_SENSORS_SPD5118 is not set
# CONFIG_SENSORS_TC74 is not set
# CONFIG_SENSORS_THMC50 is not set
CONFIG_SENSORS_TMP102=y
# 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_VEXPRESS 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_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=y
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_DEFAULT_GOV_POWER_ALLOCATOR 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_THERMAL_GOV_POWER_ALLOCATOR=y
CONFIG_CPU_THERMAL=y
CONFIG_CPU_FREQ_THERMAL=y
CONFIG_DEVFREQ_THERMAL=y
# CONFIG_PCIE_THERMAL is not set
CONFIG_THERMAL_EMULATION=y
# CONFIG_THERMAL_MMIO is not set
# CONFIG_MAX77620_THERMAL is not set
# CONFIG_DA9062_THERMAL is not set
CONFIG_GENERIC_ADC_THERMAL=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
# 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
#
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set

#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
# CONFIG_DA9062_WATCHDOG is not set
# CONFIG_GPIO_WATCHDOG is not set
# CONFIG_WDAT_WDT is not set
CONFIG_XILINX_WATCHDOG=y
CONFIG_XILINX_WINDOW_WATCHDOG=y
# CONFIG_ZIIRAVE_WATCHDOG is not set
CONFIG_ARM_SP805_WATCHDOG=y
CONFIG_ARM_SBSA_WATCHDOG=y
# CONFIG_CADENCE_WATCHDOG is not set
CONFIG_DW_WATCHDOG=y
# CONFIG_TWL4030_WATCHDOG is not set
# CONFIG_MAX63XX_WATCHDOG is not set
# CONFIG_MAX77620_WATCHDOG is not set
# CONFIG_RETU_WATCHDOG is not set
CONFIG_ARM_SMC_WATCHDOG=y
# CONFIG_ALIM7101_WDT is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_HP_WATCHDOG 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=y
# 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=y
CONFIG_MFD_AXP20X=y
CONFIG_MFD_AXP20X_I2C=y
# CONFIG_MFD_CS40L50_I2C is not set
# CONFIG_MFD_CS40L50_SPI is not set
# CONFIG_MFD_CS42L43_I2C 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=y
# 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=y
# CONFIG_MFD_HI6421_SPMI is not set
CONFIG_LPC_ICH=y
# CONFIG_LPC_SCH is not set
# 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=y
# 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=y
# 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=y
# 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=y
CONFIG_MFD_RK8XX_I2C=y
CONFIG_MFD_RK8XX_SPI=y
# CONFIG_MFD_RN5T618 is not set
CONFIG_MFD_SEC_CORE=y
CONFIG_MFD_SEC_I2C=y
# 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=y
# CONFIG_MFD_TI_LP87565 is not set
# CONFIG_MFD_TPS65218 is not set
CONFIG_MFD_TPS65219=y
# 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=y
CONFIG_MFD_TPS6594_I2C=y
# 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=y
CONFIG_MFD_ROHM_PWRBUTTON=y
CONFIG_MFD_ROHM_BD718XX=y
# 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_WCD934X=y
# CONFIG_MFD_ATC260X_I2C is not set
CONFIG_MFD_QCOM_PM8008=y
CONFIG_MFD_VEXPRESS_SYSREG=y
# CONFIG_RAVE_SP_CORE is not set
# CONFIG_MFD_INTEL_M10_BMC_SPI is not set
# CONFIG_MFD_LS2K_BMC_CORE 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_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_ARM_SCMI=y
# CONFIG_REGULATOR_AW37503 is not set
CONFIG_REGULATOR_AXP20X=y
CONFIG_REGULATOR_BD718XX=y
CONFIG_REGULATOR_BD9571MWV=y
# CONFIG_REGULATOR_DA9062 is not set
# CONFIG_REGULATOR_DA9121 is not set
# CONFIG_REGULATOR_DA9210 is not set
CONFIG_REGULATOR_DA9211=y
CONFIG_REGULATOR_FAN53555=y
# CONFIG_REGULATOR_FAN53880 is not set
CONFIG_REGULATOR_GPIO=y
# CONFIG_REGULATOR_HI6421 is not set
CONFIG_REGULATOR_HI6421V530=y
# 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_LP873X=y
# 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_MAX77620=y
# 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_MAX8973=y
# CONFIG_REGULATOR_MAX20086 is not set
CONFIG_REGULATOR_MAX20411=y
# 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=y
# CONFIG_REGULATOR_MP886X is not set
# CONFIG_REGULATOR_MPQ7920 is not set
# CONFIG_REGULATOR_MT6311 is not set
CONFIG_REGULATOR_MT6315=y
# CONFIG_REGULATOR_MT6316 is not set
# CONFIG_REGULATOR_MT6323 is not set
# CONFIG_REGULATOR_MT6331 is not set
# CONFIG_REGULATOR_MT6332 is not set
CONFIG_REGULATOR_MT6357=y
CONFIG_REGULATOR_MT6358=y
CONFIG_REGULATOR_MT6359=y
CONFIG_REGULATOR_MT6360=y
# CONFIG_REGULATOR_MT6363 is not set
# CONFIG_REGULATOR_MT6370 is not set
CONFIG_REGULATOR_MT6397=y
CONFIG_REGULATOR_PCA9450=y
# CONFIG_REGULATOR_PF9453 is not set
# CONFIG_REGULATOR_PF0900 is not set
# CONFIG_REGULATOR_PF530X is not set
CONFIG_REGULATOR_PF8X00=y
CONFIG_REGULATOR_PFUZE100=y
# CONFIG_REGULATOR_PV88060 is not set
# CONFIG_REGULATOR_PV88080 is not set
# CONFIG_REGULATOR_PV88090 is not set
CONFIG_REGULATOR_PWM=y
CONFIG_REGULATOR_QCOM_PM8008=y
CONFIG_REGULATOR_QCOM_SPMI=y
CONFIG_REGULATOR_QCOM_USB_VBUS=y
CONFIG_REGULATOR_RAA215300=y
# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set
# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2 is not set
CONFIG_REGULATOR_RK808=y
CONFIG_REGULATOR_ROHM=y
# 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_S2DOS05 is not set
# CONFIG_REGULATOR_S2MPA01 is not set
CONFIG_REGULATOR_S2MPS11=y
# CONFIG_REGULATOR_S5M8767 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=y
# CONFIG_REGULATOR_TPS65185 is not set
CONFIG_REGULATOR_TPS65219=y
CONFIG_REGULATOR_TPS6594=y
# CONFIG_REGULATOR_TPS6524X is not set
CONFIG_REGULATOR_TWL4030=y
CONFIG_REGULATOR_VCTRL=y
# CONFIG_REGULATOR_VEXPRESS is not set
# CONFIG_REGULATOR_WM8994 is not set
# CONFIG_REGULATOR_QCOM_LABIBB is not set
CONFIG_RC_CORE=y
# CONFIG_LIRC is not set
CONFIG_RC_MAP=y
CONFIG_RC_DECODERS=y
# CONFIG_IR_IMON_DECODER is not set
# CONFIG_IR_JVC_DECODER is not set
# CONFIG_IR_MCE_KBD_DECODER is not set
# CONFIG_IR_NEC_DECODER is not set
# CONFIG_IR_RC5_DECODER is not set
# CONFIG_IR_RC6_DECODER is not set
# CONFIG_IR_RCMM_DECODER is not set
# CONFIG_IR_SANYO_DECODER is not set
# CONFIG_IR_SHARP_DECODER is not set
# CONFIG_IR_SONY_DECODER is not set
# CONFIG_IR_XMP_DECODER is not set
CONFIG_RC_DEVICES=y
# CONFIG_IR_ENE is not set
# CONFIG_IR_FINTEK is not set
CONFIG_IR_GPIO_CIR=y
# 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_RC_ATI_REMOTE=y
# CONFIG_RC_LOOPBACK is not set
CONFIG_RC_XBOX_DVD=y
CONFIG_CEC_CORE=y
CONFIG_CEC_NOTIFIER=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=y
# CONFIG_CEC_GPIO 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
# CONFIG_V4L2_FLASH_LED_CLASS is not set
CONFIG_V4L2_FWNODE=y
CONFIG_V4L2_ASYNC=y
CONFIG_V4L2_CCI=y
CONFIG_V4L2_CCI_I2C=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=y
# 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_USB_VIDEO_CLASS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

#
# Analog TV USB devices
#
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_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_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=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_SDR_PLATFORM_DRIVERS=y
# CONFIG_DVB_PLATFORM_DRIVERS is not set
CONFIG_V4L_MEM2MEM_DRIVERS=y
# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set
# CONFIG_VIDEO_MUX is not set

#
# Allegro DVT media platform drivers
#

#
# Amlogic media platform drivers
#

#
# Amphion drivers
#

#
# ARM media platform drivers
#
# CONFIG_VIDEO_MALI_C55 is not set

#
# Aspeed media platform drivers
#

#
# Atmel media platform drivers
#

#
# Cadence media platform drivers
#
# CONFIG_VIDEO_CADENCE_CSI2RX is not set
# CONFIG_VIDEO_CADENCE_CSI2TX is not set

#
# Chips&Media media platform drivers
#

#
# Intel media platform drivers
#

#
# Marvell media platform drivers
#
# CONFIG_VIDEO_CAFE_CCIC is not set

#
# Mediatek media platform drivers
#

#
# Microchip Technology, Inc. media platform drivers
#

#
# Nuvoton media platform drivers
#

#
# NVidia media platform drivers
#

#
# NXP media platform drivers
#

#
# Qualcomm media platform drivers
#

#
# Raspberry Pi media platform drivers
#
# CONFIG_VIDEO_RP1_CFE is not set

#
# Renesas media platform drivers
#

#
# Rockchip media platform drivers
#

#
# Samsung media platform drivers
#

#
# STMicroelectronics media platform drivers
#

#
# Sunxi media platform drivers
#

#
# Texas Instruments drivers
#

#
# Verisilicon media platform drivers
#

#
# VIA media platform drivers
#

#
# Xilinx media platform drivers
#
# CONFIG_VIDEO_XILINX 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=y
CONFIG_VIDEO_CAMERA_SENSOR=y
# CONFIG_VIDEO_ALVIUM_CSI2 is not set
# CONFIG_VIDEO_AR0521 is not set
# CONFIG_VIDEO_GC0308 is not set
# CONFIG_VIDEO_GC0310 is not set
# CONFIG_VIDEO_GC05A2 is not set
# CONFIG_VIDEO_GC08A3 is not set
# CONFIG_VIDEO_GC2145 is not set
# CONFIG_VIDEO_HI556 is not set
# CONFIG_VIDEO_HI846 is not set
# CONFIG_VIDEO_HI847 is not set
# CONFIG_VIDEO_IMX111 is not set
# CONFIG_VIDEO_IMX208 is not set
# CONFIG_VIDEO_IMX214 is not set
CONFIG_VIDEO_IMX219=y
# CONFIG_VIDEO_IMX258 is not set
# CONFIG_VIDEO_IMX274 is not set
# CONFIG_VIDEO_IMX283 is not set
# CONFIG_VIDEO_IMX290 is not set
# CONFIG_VIDEO_IMX296 is not set
# CONFIG_VIDEO_IMX319 is not set
# CONFIG_VIDEO_IMX334 is not set
# CONFIG_VIDEO_IMX335 is not set
# CONFIG_VIDEO_IMX355 is not set
CONFIG_VIDEO_IMX412=y
# CONFIG_VIDEO_IMX415 is not set
# CONFIG_VIDEO_IMX471 is not set
# CONFIG_VIDEO_IMX678 is not set
# CONFIG_VIDEO_MT9M001 is not set
# CONFIG_VIDEO_MT9M111 is not set
# CONFIG_VIDEO_MT9M114 is not set
# CONFIG_VIDEO_MT9P031 is not set
# CONFIG_VIDEO_MT9T112 is not set
# CONFIG_VIDEO_MT9V011 is not set
# CONFIG_VIDEO_MT9V032 is not set
# CONFIG_VIDEO_MT9V111 is not set
# CONFIG_VIDEO_OG01A1B is not set
# CONFIG_VIDEO_OG0VE1B is not set
# CONFIG_VIDEO_OS05B10 is not set
# CONFIG_VIDEO_OV01A10 is not set
# CONFIG_VIDEO_OV02A10 is not set
# CONFIG_VIDEO_OV02E10 is not set
# CONFIG_VIDEO_OV02C10 is not set
# CONFIG_VIDEO_OV08D10 is not set
# CONFIG_VIDEO_OV08X40 is not set
# CONFIG_VIDEO_OV13858 is not set
# CONFIG_VIDEO_OV13B10 is not set
# CONFIG_VIDEO_OV2640 is not set
# CONFIG_VIDEO_OV2659 is not set
# CONFIG_VIDEO_OV2680 is not set
# CONFIG_VIDEO_OV2685 is not set
# CONFIG_VIDEO_OV2732 is not set
# CONFIG_VIDEO_OV2735 is not set
# CONFIG_VIDEO_OV2740 is not set
# CONFIG_VIDEO_OV4689 is not set
CONFIG_VIDEO_OV5640=y
CONFIG_VIDEO_OV5645=y
# CONFIG_VIDEO_OV5647 is not set
# CONFIG_VIDEO_OV5648 is not set
# CONFIG_VIDEO_OV5670 is not set
# CONFIG_VIDEO_OV5675 is not set
# CONFIG_VIDEO_OV5693 is not set
# CONFIG_VIDEO_OV5695 is not set
# CONFIG_VIDEO_OV6211 is not set
# CONFIG_VIDEO_OV64A40 is not set
# CONFIG_VIDEO_OV7251 is not set
# CONFIG_VIDEO_OV7640 is not set
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_OV772X is not set
# CONFIG_VIDEO_OV7740 is not set
# CONFIG_VIDEO_OV8856 is not set
# CONFIG_VIDEO_OV8858 is not set
# CONFIG_VIDEO_OV8865 is not set
# CONFIG_VIDEO_OV9282 is not set
# CONFIG_VIDEO_OV9640 is not set
# CONFIG_VIDEO_OV9650 is not set
# CONFIG_VIDEO_OV9734 is not set
# CONFIG_VIDEO_RDACM20 is not set
# CONFIG_VIDEO_RDACM21 is not set
# CONFIG_VIDEO_RJ54N1 is not set
# CONFIG_VIDEO_S5C73M3 is not set
# CONFIG_VIDEO_S5K3M5 is not set
# CONFIG_VIDEO_S5K5BAF is not set
# CONFIG_VIDEO_S5K6A3 is not set
CONFIG_VIDEO_S5KJN1=y
# CONFIG_VIDEO_T4KA3 is not set
# CONFIG_VIDEO_VD55G1 is not set
# CONFIG_VIDEO_VD56G3 is not set
# CONFIG_VIDEO_VGXY61 is not set
# CONFIG_VIDEO_CCS is not set
# CONFIG_VIDEO_ET8EK8 is not set

#
# Camera ISPs
#
# CONFIG_VIDEO_THP7312 is not set
# end of Camera ISPs

CONFIG_VIDEO_CAMERA_LENS=y
# CONFIG_VIDEO_AD5820 is not set
# CONFIG_VIDEO_AK7375 is not set
# CONFIG_VIDEO_DW9714 is not set
# CONFIG_VIDEO_DW9719 is not set
# CONFIG_VIDEO_DW9768 is not set
# CONFIG_VIDEO_DW9807_VCM 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_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_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=y
CONFIG_MEDIA_TUNER_MSI001=y
# CONFIG_MEDIA_TUNER_MT2060 is not set
# CONFIG_MEDIA_TUNER_MT2063 is not set
CONFIG_MEDIA_TUNER_MT20XX=y
# 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=y
# 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=y
CONFIG_MEDIA_TUNER_TDA827X=y
CONFIG_MEDIA_TUNER_TDA8290=y
CONFIG_MEDIA_TUNER_TDA9887=y
# 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=y
CONFIG_MEDIA_TUNER_XC4000=y
CONFIG_MEDIA_TUNER_XC5000=y
# 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_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_BRIDGE_CONNECTOR=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_AUDIO_HELPER=y
CONFIG_DRM_DISPLAY_HDMI_CEC_HELPER=y
CONFIG_DRM_DISPLAY_HDMI_CEC_NOTIFIER_HELPER=y
CONFIG_DRM_DISPLAY_HDMI_HELPER=y
CONFIG_DRM_DISPLAY_HDMI_STATE_HELPER=y
CONFIG_DRM_GEM_DMA_HELPER=y
CONFIG_DRM_GEM_SHMEM_HELPER=y
# CONFIG_DRM_AMDGPU is not set

#
# ARM devices
#
CONFIG_DRM_HDLCD=y
# CONFIG_DRM_HDLCD_SHOW_UNDERRUN is not set
CONFIG_DRM_MALI_DISPLAY=y
CONFIG_DRM_KOMEDA=y
# 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=y
CONFIG_DRM_I2C_NXP_TDA998X=y
CONFIG_DRM_ITE_IT6263=y
# CONFIG_DRM_ITE_IT6505 is not set
CONFIG_DRM_LONTIUM_LT8912B=y
# CONFIG_DRM_LONTIUM_LT9211 is not set
CONFIG_DRM_LONTIUM_LT9611=y
CONFIG_DRM_LONTIUM_LT9611UXC=y
CONFIG_DRM_LONTIUM_LT8713SX=y
CONFIG_DRM_ITE_IT66121=y
# CONFIG_DRM_LVDS_CODEC is not set
# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set
CONFIG_DRM_NWL_MIPI_DSI=y
# CONFIG_DRM_NXP_PTN3460 is not set
# CONFIG_DRM_PARADE_PS8622 is not set
CONFIG_DRM_PARADE_PS8640=y
CONFIG_DRM_SAMSUNG_DSIM=y
# CONFIG_DRM_SIL_SII8620 is not set
CONFIG_DRM_SII902X=y
# CONFIG_DRM_SII9234 is not set
CONFIG_DRM_SIMPLE_BRIDGE=y
# CONFIG_DRM_SOLOMON_SSD2825 is not set
CONFIG_DRM_THINE_THC63LVD1024=y
# CONFIG_DRM_TOSHIBA_TC358762 is not set
# CONFIG_DRM_TOSHIBA_TC358764 is not set
CONFIG_DRM_TOSHIBA_TC358767=y
CONFIG_DRM_TOSHIBA_TC358768=y
# 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=y
CONFIG_DRM_TI_SN65DSI83=y
CONFIG_DRM_TI_SN65DSI86=y
# 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=y
CONFIG_DRM_I2C_ADV7511=y
CONFIG_DRM_I2C_ADV7511_CEC=y
CONFIG_DRM_CDNS_DSI=y
CONFIG_DRM_CDNS_DSI_J721E=y
CONFIG_DRM_CDNS_MHDP8546=y
# end of Display Interface Bridges

# CONFIG_DRM_ETNAVIV is not set
CONFIG_DRM_GUD=y
CONFIG_DRM_HISI_HIBMC=y
CONFIG_DRM_HISI_KIRIN=y
# CONFIG_DRM_POWERVR is not set
# CONFIG_DRM_LIMA is not set
# 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_ANBERNIC_TD4310 is not set
# CONFIG_DRM_PANEL_ARM_VERSATILE is not set
# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set
# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set
# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set
# CONFIG_DRM_PANEL_BOE_TD4320 is not set
# CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A is not set
CONFIG_DRM_PANEL_BOE_TV101WUM_NL6=y
# CONFIG_DRM_PANEL_BOE_TV101WUM_LL2 is not set
# CONFIG_DRM_PANEL_CHIPONE_ICNA35XX is not set
# CONFIG_DRM_PANEL_CHIPWEALTH_CH13726A is not set
# CONFIG_DRM_PANEL_EBBG_FT8719 is not set
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
# CONFIG_DRM_PANEL_FOCALTECH_OTA7290B is not set
# CONFIG_DRM_PANEL_DSI_CM is not set
CONFIG_DRM_PANEL_LVDS=y
CONFIG_DRM_PANEL_HIMAX_HX8279=y
# CONFIG_DRM_PANEL_HIMAX_HX83102 is not set
CONFIG_DRM_PANEL_HIMAX_HX83112A=y
CONFIG_DRM_PANEL_HIMAX_HX83112B=y
# CONFIG_DRM_PANEL_HIMAX_HX83121A is not set
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
# CONFIG_DRM_PANEL_HYDIS_HV101HD1 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI7807S is not set
# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9488 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9805 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9806E_DSI is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
CONFIG_DRM_PANEL_ILITEK_ILI9882T=y
# 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=y
# 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=y
# CONFIG_DRM_PANEL_MOTOROLA_MOT is not set
# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35532 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36536 is not set
CONFIG_DRM_PANEL_NOVATEK_NT36672A=y
CONFIG_DRM_PANEL_NOVATEK_NT36672E=y
# CONFIG_DRM_PANEL_NOVATEK_NT37700F is not set
CONFIG_DRM_PANEL_NOVATEK_NT37801=y
# 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=y
# CONFIG_DRM_PANEL_RAYDIUM_RM67200 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set
CONFIG_DRM_PANEL_RAYDIUM_RM692E5=y
# CONFIG_DRM_PANEL_RAYDIUM_RM69380 is not set
# CONFIG_DRM_PANEL_RENESAS_R61307 is not set
# CONFIG_DRM_PANEL_RENESAS_R63419 is not set
# CONFIG_DRM_PANEL_RENESAS_R69328 is not set
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
# CONFIG_DRM_PANEL_SAMSUNG_AMS581VF01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_AMS639RQ08 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set
CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y
# 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=y
# 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=y
CONFIG_DRM_PANEL_EDP=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_PANEL_SUMMIT=y
# 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=y
# 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=y
# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set
# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
# end of Display Panels

# CONFIG_DRM_PANFROST is not set
# CONFIG_DRM_PANTHOR is not set
CONFIG_DRM_PL111=y
# 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_EFIDRM is not set
CONFIG_DRM_SIMPLEDRM=y
# end of Drivers for system framebuffers

CONFIG_DRM_TIDSS=y
# 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_VGEM=y
CONFIG_DRM_VIRTIO_GPU=y
CONFIG_DRM_VIRTIO_GPU_KMS=y
CONFIG_DRM_VKMS=y
# CONFIG_DRM_VMWGFX 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_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_UVESA is not set
CONFIG_FB_EFI=y
# 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_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_DMAMEM_HELPERS=y
CONFIG_FB_DMAMEM_HELPERS_DEFERRED=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
CONFIG_FB_TILEBLITTING=y
# end of Frame buffer Devices

#
# Backlight & LCD device support
#
CONFIG_LCD_CLASS_DEVICE=y
# CONFIG_LCD_L4F00242T03 is not set
# CONFIG_LCD_LMS283GF05 is not set
# CONFIG_LCD_LTV350QV is not set
# CONFIG_LCD_ILI922X is not set
# CONFIG_LCD_ILI9320 is not set
# CONFIG_LCD_TDO24M is not set
# CONFIG_LCD_VGG2432A4 is not set
# CONFIG_LCD_PLATFORM is not set
# CONFIG_LCD_AMS369FG06 is not set
# CONFIG_LCD_LMS501KF03 is not set
# CONFIG_LCD_HX8357 is not set
# CONFIG_LCD_OTM3225A is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_AW99706 is not set
# CONFIG_BACKLIGHT_KTD253 is not set
# CONFIG_BACKLIGHT_KTD2801 is not set
# CONFIG_BACKLIGHT_KTZ8866 is not set
# CONFIG_BACKLIGHT_SY7758 is not set
CONFIG_BACKLIGHT_PWM=y
# CONFIG_BACKLIGHT_MAX25014 is not set
# CONFIG_BACKLIGHT_MT6370 is not set
CONFIG_BACKLIGHT_QCOM_WLED=y
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3509 is not set
# CONFIG_BACKLIGHT_LM3630A is not set
# CONFIG_BACKLIGHT_LM3639 is not set
CONFIG_BACKLIGHT_LP855X=y
# CONFIG_BACKLIGHT_MP3309C is not set
# CONFIG_BACKLIGHT_PANDORA is not set
CONFIG_BACKLIGHT_GPIO=y
# 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_VIDEOMODE_HELPERS=y
CONFIG_HDMI=y
# CONFIG_FIRMWARE_EDID is not set

#
# Console display driver support
#
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=y
CONFIG_LOGO_LINUX_CLUT224_FILE="drivers/video/logo/logo_linux_clut224.ppm"
CONFIG_TRACE_GPU_MEM=y
# end of Graphics support

# CONFIG_DRM_ACCEL is not set
# CONFIG_SOUND is not set
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_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_CMEDIA=y
CONFIG_HID_CP2112=y
CONFIG_HID_CREATIVE_SB0540=y
CONFIG_HID_CYPRESS=y
CONFIG_HID_DRAGONRISE=y
CONFIG_DRAGONRISE_FF=y
CONFIG_HID_EMS_FF=y
CONFIG_HID_ELAN=y
CONFIG_HID_ELECOM=y
CONFIG_HID_ELO=y
CONFIG_HID_EVISION=y
CONFIG_HID_EZKEY=y
CONFIG_HID_FT260=y
CONFIG_HID_GEMBIRD=y
CONFIG_HID_GFRM=y
CONFIG_HID_GLORIOUS=y
CONFIG_HID_HOLTEK=y
CONFIG_HOLTEK_FF=y
# CONFIG_HID_HYPERX is not set
CONFIG_HID_VIVALDI_COMMON=y
# CONFIG_HID_GOODIX_SPI is not set
CONFIG_HID_GOOGLE_STADIA_FF=y
CONFIG_HID_VIVALDI=y
CONFIG_HID_GT683R=y
# CONFIG_HID_MSI is not set
CONFIG_HID_KEYTOUCH=y
CONFIG_HID_KYE=y
# CONFIG_HID_KYSONA is not set
CONFIG_HID_UCLOGIC=y
CONFIG_HID_WALTOP=y
CONFIG_HID_VIEWSONIC=y
CONFIG_HID_VRC2=y
CONFIG_HID_XIAOMI=y
CONFIG_HID_GYRATION=y
CONFIG_HID_ICADE=y
CONFIG_HID_ITE=y
CONFIG_HID_JABRA=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LCPOWER=y
CONFIG_HID_LED=y
CONFIG_HID_LENOVO=y
# CONFIG_HID_LENOVO_GO is not set
# CONFIG_HID_LENOVO_GO_S is not set
CONFIG_HID_LETSKETCH=y
CONFIG_HID_LOGITECH=y
CONFIG_HID_LOGITECH_DJ=y
CONFIG_HID_LOGITECH_HIDPP=y
CONFIG_LOGITECH_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
CONFIG_LOGIG940_FF=y
CONFIG_LOGIWHEELS_FF=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MALTRON=y
CONFIG_HID_MAYFLASH=y
CONFIG_HID_MEGAWORLD_FF=y
# CONFIG_HID_RAKK is not set
CONFIG_HID_REDRAGON=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MONTEREY=y
CONFIG_HID_MULTITOUCH=y
CONFIG_HID_NINTENDO=y
CONFIG_NINTENDO_FF=y
CONFIG_HID_NTI=y
CONFIG_HID_NTRIG=y
CONFIG_HID_NVIDIA_SHIELD=y
CONFIG_NVIDIA_SHIELD_FF=y
CONFIG_HID_ORTEK=y
# CONFIG_HID_OXP is not set
CONFIG_HID_PANTHERLORD=y
CONFIG_PANTHERLORD_FF=y
CONFIG_HID_PENMOUNT=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_PICOLCD=y
CONFIG_HID_PICOLCD_FB=y
CONFIG_HID_PICOLCD_BACKLIGHT=y
CONFIG_HID_PICOLCD_LCD=y
CONFIG_HID_PICOLCD_LEDS=y
CONFIG_HID_PICOLCD_CIR=y
CONFIG_HID_PLANTRONICS=y
CONFIG_HID_PLAYSTATION=y
CONFIG_PLAYSTATION_FF=y
CONFIG_HID_PXRC=y
# CONFIG_HID_RAPOO is not set
CONFIG_HID_RAZER=y
CONFIG_HID_PRIMAX=y
CONFIG_HID_RETRODE=y
CONFIG_HID_ROCCAT=y
CONFIG_HID_SAITEK=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SEMITEK=y
CONFIG_HID_SIGMAMICRO=y
CONFIG_HID_SONY=y
CONFIG_SONY_FF=y
CONFIG_HID_SPEEDLINK=y
CONFIG_HID_STEAM=y
CONFIG_STEAM_FF=y
CONFIG_HID_STEELSERIES=y
CONFIG_HID_SUNPLUS=y
CONFIG_HID_RMI=y
CONFIG_HID_GREENASIA=y
CONFIG_GREENASIA_FF=y
CONFIG_HID_SMARTJOYPLUS=y
CONFIG_SMARTJOYPLUS_FF=y
CONFIG_HID_TIVO=y
CONFIG_HID_TOPSEED=y
CONFIG_HID_TOPRE=y
CONFIG_HID_THINGM=y
CONFIG_HID_THRUSTMASTER=y
CONFIG_THRUSTMASTER_FF=y
CONFIG_HID_UDRAW_PS3=y
CONFIG_HID_U2FZERO=y
# CONFIG_HID_UNIVERSAL_PIDFF is not set
CONFIG_HID_WACOM=y
CONFIG_HID_WIIMOTE=y
# CONFIG_HID_WINWING is not set
CONFIG_HID_XINMO=y
CONFIG_HID_ZEROPLUS=y
CONFIG_ZEROPLUS_FF=y
CONFIG_HID_ZYDACRON=y
CONFIG_HID_SENSOR_HUB=y
CONFIG_HID_SENSOR_CUSTOM_SENSOR=y
CONFIG_HID_ALPS=y
CONFIG_HID_MCP2200=y
CONFIG_HID_MCP2221=y
CONFIG_HID_HUAWEI=y
# end of Special HID drivers

#
# HID-BPF support
#
# end of HID-BPF support

CONFIG_I2C_HID=y
CONFIG_I2C_HID_ACPI=y
CONFIG_I2C_HID_OF=y
CONFIG_I2C_HID_OF_ELAN=y
# CONFIG_I2C_HID_OF_GOODIX is not set
CONFIG_I2C_HID_CORE=y

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

#
# 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=y
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 is not set

#
# Gadget/Dual-role mode requires USB Gadget support to be enabled
#
# CONFIG_USB_DWC2_PERIPHERAL is not set
CONFIG_USB_DWC2_DUAL_ROLE=y
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=y
CONFIG_USB_CHIPIDEA_GENERIC=y
CONFIG_USB_CHIPIDEA_TEGRA=y
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_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=y
CONFIG_USB_ONBOARD_DEV_USB5744=y
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
CONFIG_USB_ULPI=y
CONFIG_USB_ULPI_VIEWPORT=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=y
# 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_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_UVC=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_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_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_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_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_IT5205=y
CONFIG_TYPEC_MUX_NB7VPQ904M=y
CONFIG_TYPEC_MUX_PS883X=y
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_MMC=y
CONFIG_PWRSEQ_EMMC=y
# CONFIG_PWRSEQ_SD8787 is not set
CONFIG_PWRSEQ_SIMPLE=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=32
# 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_ARMMMCI=y
CONFIG_MMC_STM32_SDMMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
# CONFIG_MMC_SDHCI_PCI is not set
CONFIG_MMC_SDHCI_ACPI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_OF_ARASAN=y
# CONFIG_MMC_SDHCI_OF_AT91 is not set
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
CONFIG_MMC_SDHCI_CADENCE=y
CONFIG_MMC_SDHCI_F_SDH30=y
# CONFIG_MMC_SDHCI_MILBEAUT is not set
# CONFIG_MMC_TIFM_SD is not set
CONFIG_MMC_SPI=y
# CONFIG_MMC_SDRICOH_CS is not set
# CONFIG_MMC_CB710 is not set
# CONFIG_MMC_VIA_SDMMC is not set
CONFIG_MMC_DW=y
CONFIG_MMC_DW_PLTFM=y
# CONFIG_MMC_DW_BLUEFIELD is not set
CONFIG_MMC_DW_EXYNOS=y
CONFIG_MMC_DW_HI3798CV200=y
# CONFIG_MMC_DW_HI3798MV200 is not set
CONFIG_MMC_DW_K3=y
# CONFIG_MMC_DW_PCI 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=y
CONFIG_MMC_HSQ=y
# CONFIG_MMC_TOSHIBA_PCI is not set
CONFIG_MMC_MTK=y
CONFIG_MMC_SDHCI_XENON=y
CONFIG_SCSI_UFSHCD=y
CONFIG_SCSI_UFS_BSG=y
CONFIG_SCSI_UFS_CRYPTO=y
# CONFIG_SCSI_UFS_FAULT_INJECTION is not set
# CONFIG_SCSI_UFS_HWMON is not set
# CONFIG_SCSI_UFSHCD_PCI is not set
CONFIG_SCSI_UFSHCD_PLATFORM=y
CONFIG_SCSI_UFS_CDNS_PLATFORM=y
# CONFIG_SCSI_UFS_DWC_TC_PLATFORM 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=y
CONFIG_LEDS_CLASS_MULTICOLOR=y
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set

#
# LED drivers
#
# CONFIG_LEDS_AN30259A 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_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=y
# CONFIG_LEDS_MT6323 is not set
CONFIG_LEDS_PCA9532=y
# CONFIG_LEDS_PCA9532_GPIO is not set
CONFIG_LEDS_GPIO=y
# 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_PWM=y
# CONFIG_LEDS_REGULATOR is not set
# CONFIG_LEDS_BD2606MVV is not set
# CONFIG_LEDS_BD2802 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=y
# CONFIG_LEDS_MLXREG is not set
# CONFIG_LEDS_USER is not set
# CONFIG_LEDS_SPI_BYTE is not set
# CONFIG_LEDS_LM3697 is not set
# CONFIG_LEDS_ST1202 is not set
# CONFIG_LEDS_LTC3220 is not set

#
# Flash and Torch LED drivers
#
# CONFIG_LEDS_AAT1290 is not set
# CONFIG_LEDS_AS3645A is not set
# CONFIG_LEDS_KTD2692 is not set
# CONFIG_LEDS_LM3601X is not set
# CONFIG_LEDS_MT6360 is not set
# CONFIG_LEDS_MT6370_FLASH is not set
# CONFIG_LEDS_RT4505 is not set
# CONFIG_LEDS_RT8515 is not set
# CONFIG_LEDS_S2M_FLASH is not set
# CONFIG_LEDS_SGM3140 is not set
# CONFIG_LEDS_SY7802 is not set
# CONFIG_LEDS_TPS6131X is not set

#
# 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_PWM_MULTICOLOR is not set
CONFIG_LEDS_QCOM_LPG=y
# CONFIG_LEDS_S2M_RGB is not set
# CONFIG_LEDS_MT6370_RGB is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
# CONFIG_LEDS_TRIGGER_ONESHOT is not set
CONFIG_LEDS_TRIGGER_DISK=y
# CONFIG_LEDS_TRIGGER_MTD is not set
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
CONFIG_LEDS_TRIGGER_CPU=y
# CONFIG_LEDS_TRIGGER_ACTIVITY is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y

#
# 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=y
# 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 is not set
# CONFIG_INFINIBAND_MTHCA is not set
# CONFIG_INFINIBAND_OCRDMA is not set
# CONFIG_INFINIBAND_VMWARE_PVRDMA 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_SUPPORT=y
CONFIG_EDAC=y
# CONFIG_EDAC_DEBUG is not set
CONFIG_EDAC_GHES=y
# CONFIG_EDAC_SCRUB is not set
# CONFIG_EDAC_ECS is not set
# CONFIG_EDAC_MEM_REPAIR is not set
# CONFIG_EDAC_THUNDERX is not set
# CONFIG_EDAC_XGENE is not set
# CONFIG_EDAC_DMC520 is not set
# CONFIG_EDAC_CORTEX_A72 is not set
CONFIG_RTC_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=y
# CONFIG_RTC_DRV_DS1307_CENTURY is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
CONFIG_RTC_DRV_HYM8563=y
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_MAX31335 is not set
CONFIG_RTC_DRV_MAX77686=y
# CONFIG_RTC_DRV_NCT3018Y is not set
CONFIG_RTC_DRV_RK808=y
# CONFIG_RTC_DRV_RS5C372 is not set
CONFIG_RTC_DRV_ISL1208=y
# 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=y
CONFIG_RTC_DRV_PCF8563=y
# CONFIG_RTC_DRV_PCF8583 is not set
CONFIG_RTC_DRV_M41T80=y
# CONFIG_RTC_DRV_M41T80_WDT is not set
CONFIG_RTC_DRV_BQ32K=y
# CONFIG_RTC_DRV_TWL4030 is not set
CONFIG_RTC_DRV_TPS6594=y
# 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=y
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
CONFIG_RTC_DRV_RV3028=y
# CONFIG_RTC_DRV_RV3032 is not set
CONFIG_RTC_DRV_RV8803=y
CONFIG_RTC_DRV_S5M=y
# 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=y
CONFIG_RTC_DRV_DS3232_HWMON=y
CONFIG_RTC_DRV_PCF2127=y
CONFIG_RTC_DRV_PCF85063=y
# CONFIG_RTC_DRV_RV3029C2 is not set
# CONFIG_RTC_DRV_RX6110 is not set

#
# Platform RTC drivers
#
# 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_DA9063=y
CONFIG_RTC_DRV_EFI=y
# 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_OPTEE is not set
CONFIG_RTC_DRV_ZYNQMP=y

#
# on-CPU RTC drivers
#
# CONFIG_RTC_DRV_PL030 is not set
CONFIG_RTC_DRV_PL031=y
# CONFIG_RTC_DRV_CADENCE is not set
# CONFIG_RTC_DRV_FTRTC010 is not set
CONFIG_RTC_DRV_IMX_BBM_SCMI=y
CONFIG_RTC_DRV_MT6397=y
# 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_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y
CONFIG_DMA_ENGINE=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DMA_ACPI=y
CONFIG_DMA_OF=y
# CONFIG_ALTERA_MSGDMA is not set
# CONFIG_AMBA_PL08X is not set
# CONFIG_ARM_DMA350 is not set
CONFIG_BCM_SBA_RAID=y
# CONFIG_DW_AXI_DMAC is not set
CONFIG_FSL_EDMA=y
# CONFIG_FSL_QDMA is not set
# CONFIG_INTEL_IDMA64 is not set
CONFIG_MV_XOR_V2=y
CONFIG_PL330_DMA=y
# CONFIG_PLX_DMA is not set
# CONFIG_SWITCHTEC_DMA is not set
CONFIG_XILINX_DMA=y
# CONFIG_XILINX_XDMA is not set
CONFIG_XILINX_ZYNQMP_DMA=y
CONFIG_XILINX_ZYNQMP_DPDMA=y
# CONFIG_AMD_QDMA is not set
CONFIG_QCOM_HIDMA_MGMT=y
CONFIG_QCOM_HIDMA=y
# CONFIG_DW_DMAC is not set
# CONFIG_DW_DMAC_PCI is not set
CONFIG_DW_EDMA=y
# CONFIG_DW_EDMA_PCIE is not set
# CONFIG_SF_PDMA 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_UIO is not set
CONFIG_VFIO=y
# CONFIG_VFIO_DEVICE_CDEV is not set
CONFIG_VFIO_GROUP=y
# CONFIG_VFIO_CONTAINER 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_HISI_ACC_VFIO_PCI is not set
# CONFIG_VIRTIO_VFIO_PCI is not set
# CONFIG_NVGRACE_GPU_VFIO_PCI is not set
# end of VFIO support for PCI devices

#
# VFIO support for platform devices
#
# CONFIG_VFIO_PLATFORM is not set
# CONFIG_VFIO_AMBA is not set
# end of VFIO support for platform 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_LEGACY=y
CONFIG_VIRTIO_VDPA=y
CONFIG_VIRTIO_BALLOON=y
# CONFIG_VIRTIO_MEM is not set
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_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=y
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_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_NI_LABPC=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=y
# CONFIG_DVB_AV7110 is not set
CONFIG_VIDEO_MAX96712=y
# CONFIG_STAGING_MEDIA_DEPRECATED is not set
# CONFIG_FB_TFT is not set
# CONFIG_MOST_COMPONENTS is not set
# CONFIG_GREYBUS_BOOTROM is not set
# CONFIG_GREYBUS_FIRMWARE is not set
CONFIG_GREYBUS_HID=y
# CONFIG_GREYBUS_LIGHT is not set
# 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_PWM 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_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_ARM64_PLATFORM_DEVICES=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y

#
# Clock driver for ARM Reference designs
#
# CONFIG_CLK_ICST is not set
# CONFIG_CLK_SP810 is not set
# CONFIG_CLK_VEXPRESS_OSC is not set
# end of Clock driver for ARM Reference designs

# CONFIG_LMK04832 is not set
# CONFIG_COMMON_CLK_MAX77686 is not set
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_RK808 is not set
# CONFIG_COMMON_CLK_RP1 is not set
CONFIG_COMMON_CLK_SCMI=y
# CONFIG_COMMON_CLK_SCPI 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_COMMON_CLK_S2MPS11 is not set
# CONFIG_CLK_TWL is not set
# CONFIG_COMMON_CLK_AXI_CLKGEN is not set
# CONFIG_COMMON_CLK_XGENE is not set
# CONFIG_COMMON_CLK_PWM 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_BD718XX is not set
# CONFIG_COMMON_CLK_FIXED_MMIO is not set

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

CONFIG_XILINX_VCU=y
CONFIG_COMMON_CLK_XLNX_CLKWZRD=y
CONFIG_HWSPINLOCK=y

#
# Clock Source drivers
#
CONFIG_TIMER_OF=y
CONFIG_TIMER_ACPI=y
CONFIG_TIMER_PROBE=y
CONFIG_CLKSRC_MMIO=y
CONFIG_ARM_ARCH_TIMER=y
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
CONFIG_FSL_ERRATUM_A008585=y
CONFIG_HISILICON_ERRATUM_161010101=y
CONFIG_ARM64_ERRATUM_858921=y
CONFIG_ARM_TIMER_SP804=y
# end of Clock Source drivers

CONFIG_MAILBOX=y
CONFIG_ARM_MHU=y
# CONFIG_ARM_MHU_V2 is not set
# CONFIG_ARM_MHU_V3 is not set
CONFIG_PLATFORM_MHU=y
# CONFIG_PL320_MBOX 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
#
CONFIG_IOMMU_IO_PGTABLE=y
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST is not set
CONFIG_IOMMU_IO_PGTABLE_DART=y
# end of Generic IOMMU Pagetable Support

# CONFIG_IOMMU_DEBUGFS is not set
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_OF_IOMMU=y
CONFIG_IOMMU_DMA=y
CONFIG_ARM_SMMU=y
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
CONFIG_ARM_SMMU_MMU_500_CPRE_ERRATA=y
CONFIG_ARM_SMMU_V3=y
# CONFIG_ARM_SMMU_V3_SVA is not set
# CONFIG_ARM_SMMU_V3_IOMMUFD is not set
# CONFIG_TEGRA241_CMDQV is not set
CONFIG_IOMMUFD_DRIVER_CORE=y
CONFIG_IOMMUFD=y
# CONFIG_IOMMUFD_VFIO_CONTAINER is not set
# CONFIG_VIRTIO_IOMMU is not set

#
# Remoteproc drivers
#
CONFIG_REMOTEPROC=y
# CONFIG_REMOTEPROC_CDEV is not set
# CONFIG_AMD_MBV_BRAM_REMOTEPROC is not set
# end of Remoteproc drivers

#
# Rpmsg drivers
#
CONFIG_RPMSG=y
CONFIG_RPMSG_CHAR=y
CONFIG_RPMSG_CTRL=y
CONFIG_RPMSG_NS=y
CONFIG_RPMSG_QCOM_GLINK=y
CONFIG_RPMSG_QCOM_GLINK_RPM=y
CONFIG_RPMSG_VIRTIO=y
# end of Rpmsg drivers

#
# 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
#
# CONFIG_QUICC_ENGINE is not set
CONFIG_FSL_RCPM=y
# end of NXP/Freescale QorIQ SoC drivers

#
# fujitsu SoC drivers
#
# CONFIG_A64FX_DIAG is not set
# end of fujitsu SoC drivers

#
# i.MX SoC drivers
#
# end of i.MX SoC drivers

#
# Enable LiteX SoC Builder specific drivers
#
# CONFIG_LITEX_SOC_CONTROLLER is not set
# end of Enable LiteX SoC Builder specific drivers

# CONFIG_WPCM450_SOC is not set
CONFIG_SOC_TI=y

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

CONFIG_ARM_SCMI_PERF_DOMAIN=y
CONFIG_ARM_SCMI_POWER_DOMAIN=y
CONFIG_ARM_SCPI_POWER_DOMAIN=y

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

#
# DEVFREQ Governors
#
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
CONFIG_DEVFREQ_GOV_USERSPACE=y
CONFIG_DEVFREQ_GOV_PASSIVE=y

#
# DEVFREQ Drivers
#
# CONFIG_ARM_HISI_UNCORE_DEVFREQ is not set
CONFIG_PM_DEVFREQ_EVENT=y
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_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=y
CONFIG_EXTCON_USBC_TUSB320=y
CONFIG_MEMORY=y
# CONFIG_ARM_PL172_MPMC is not set
CONFIG_IIO=y
CONFIG_IIO_BUFFER=y
# CONFIG_IIO_BUFFER_CB is not set
# CONFIG_IIO_BUFFER_DMA is not set
# CONFIG_IIO_BUFFER_DMAENGINE is not set
# CONFIG_IIO_BUFFER_HW_CONSUMER is not set
CONFIG_IIO_KFIFO_BUF=y
CONFIG_IIO_TRIGGERED_BUFFER=y
# CONFIG_IIO_CONFIGFS is not set
CONFIG_IIO_TRIGGER=y
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_IIO_SW_DEVICE is not set
# CONFIG_IIO_SW_TRIGGER is not set
# CONFIG_IIO_TRIGGERED_EVENT is not set

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

#
# Analog to digital converters
#
# CONFIG_AD4000 is not set
# CONFIG_AD4030 is not set
# CONFIG_AD4080 is not set
# CONFIG_AD4130 is not set
# CONFIG_AD4134 is not set
# CONFIG_AD4170_4 is not set
# CONFIG_AD4691 is not set
# CONFIG_AD4695 is not set
# CONFIG_AD4851 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_AD7625 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_AXP20X_ADC is not set
# CONFIG_AXP288_ADC 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_LTC2309 is not set
# CONFIG_LTC2378 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=y
# CONFIG_MCP320X is not set
# CONFIG_MCP3422 is not set
# CONFIG_MCP3564 is not set
# CONFIG_MCP3911 is not set
# CONFIG_MEDIATEK_MT6323_AUXADC is not set
CONFIG_MEDIATEK_MT6359_AUXADC=y
# 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_QCOM_VADC_COMMON=y
# CONFIG_QCOM_SPMI_IADC is not set
CONFIG_QCOM_SPMI_VADC=y
CONFIG_QCOM_SPMI_ADC5=y
# CONFIG_QCOM_SPMI_ADC5_GEN3 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=y
# CONFIG_TI_ADS1018 is not set
# CONFIG_TI_ADS1100 is not set
# CONFIG_TI_ADS1119 is not set
# CONFIG_TI_ADS112C14 is not set
# CONFIG_TI_ADS124S08 is not set
# CONFIG_TI_ADS1298 is not set
# CONFIG_TI_ADS131E08 is not set
# CONFIG_TI_ADS131M02 is not set
# CONFIG_TI_ADS7138 is not set
# CONFIG_TI_ADS7924 is not set
# CONFIG_TI_ADS7950 is not set
# CONFIG_TI_ADS8344 is not set
# CONFIG_TI_ADS8688 is not set
# CONFIG_TI_LMP92064 is not set
# CONFIG_TI_TLC4541 is not set
# CONFIG_TI_TSC2046 is not set
# CONFIG_TWL4030_MADC is not set
# CONFIG_TWL6030_GPADC is not set
# CONFIG_VERSAL_SYSMON_I2C is not set
# CONFIG_VF610_ADC is not set
CONFIG_VIPERBOARD_ADC=y
CONFIG_XILINX_XADC=y
# 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
#
# CONFIG_IIO_SCMI is not set
# end of IIO SCMI Sensors

#
# SSP Sensor Common
#
# CONFIG_IIO_SSP_SENSORHUB is not set
# end of SSP Sensor Common

CONFIG_IIO_ST_SENSORS_I2C=y
CONFIG_IIO_ST_SENSORS_SPI=y
CONFIG_IIO_ST_SENSORS_CORE=y

#
# 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_DPOT_DAC is not set
# CONFIG_DS4424 is not set
# CONFIG_LTC1660 is not set
# CONFIG_LTC2632 is not set
# CONFIG_LTC2664 is not set
# CONFIG_M62332 is not set
# CONFIG_MAX517 is not set
# CONFIG_MAX22007 is not set
# CONFIG_MAX5522 is not set
# CONFIG_MAX5821 is not set
# CONFIG_MCP4725 is not set
# CONFIG_MCP4728 is not set
# CONFIG_MCP47A1 is not set
# CONFIG_MCP47FEB02 is not set
# CONFIG_MCP4821 is not set
# CONFIG_MCP4922 is not set
# CONFIG_TI_DAC082S085 is not set
# CONFIG_TI_DAC5571 is not set
# CONFIG_TI_DAC7311 is not set
# CONFIG_TI_DAC7612 is not set
# CONFIG_VF610_DAC is not set
# end of Digital to analog converters

#
# IIO dummy driver
#
# end of IIO dummy driver

#
# Filters
#
# CONFIG_ADMV8818 is not set
# end of Filters

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

#
# Frequency Synthesizers DDS/PLL
#

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

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

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

#
# Health Sensors
#

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

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

#
# Inertial measurement units
#
# CONFIG_ADIS16400 is not set
# CONFIG_ADIS16460 is not set
# CONFIG_ADIS16475 is not set
# CONFIG_ADIS16480 is not set
# CONFIG_ADIS16550 is not set
# CONFIG_BMI160_I2C is not set
# CONFIG_BMI160_SPI is not set
# CONFIG_BMI270_I2C is not set
# CONFIG_BMI270_SPI is not set
# CONFIG_BMI323_I2C is not set
# CONFIG_BMI323_SPI is not set
# CONFIG_BOSCH_BNO055_SERIAL is not set
# CONFIG_BOSCH_BNO055_I2C is not set
# CONFIG_FXOS8700_I2C is not set
# CONFIG_FXOS8700_SPI is not set
# CONFIG_KMX61 is not set
# CONFIG_INV_ICM42600_I2C is not set
# CONFIG_INV_ICM42600_SPI is not set
# CONFIG_INV_ICM42607_I2C is not set
# CONFIG_INV_ICM42607_SPI is not set
# CONFIG_INV_ICM45600_I2C is not set
# CONFIG_INV_ICM45600_SPI is not set
# CONFIG_INV_MPU6050_I2C is not set
# CONFIG_INV_MPU6050_SPI is not set
# CONFIG_SMI240 is not set
# CONFIG_SMI330_I2C is not set
# CONFIG_SMI330_SPI is not set
CONFIG_IIO_ST_LSM6DSX=y
CONFIG_IIO_ST_LSM6DSX_I2C=y
CONFIG_IIO_ST_LSM6DSX_SPI=y
# 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=y
# 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=y
# 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=y
CONFIG_IIO_ST_MAGN_I2C_3AXIS=y
CONFIG_IIO_ST_MAGN_SPI_3AXIS=y
# CONFIG_INFINEON_TLV493D is not set
# CONFIG_QMC5883L is not set
# CONFIG_QMC6308 is not set
# CONFIG_SENSORS_HMC5843_I2C is not set
# CONFIG_SENSORS_HMC5843_SPI is not set
# CONFIG_SENSORS_RM3100_I2C is not set
# CONFIG_SENSORS_RM3100_SPI is not set
# CONFIG_SI7210 is not set
# CONFIG_TI_TMAG5273 is not set
# CONFIG_YAMAHA_YAS530 is not set
# end of Magnetometer sensors

#
# Multiplexers
#
# CONFIG_IIO_MUX is not set
# end of Multiplexers

#
# Inclinometer sensors
#
CONFIG_HID_SENSOR_INCLINOMETER_3D=y
CONFIG_HID_SENSOR_DEVICE_ROTATION=y
# end of Inclinometer sensors

#
# Triggers - standalone
#
# CONFIG_IIO_SYSFS_TRIGGER is not set
# end of Triggers - standalone

#
# Linear and angular position sensors
#
CONFIG_HID_SENSOR_CUSTOM_INTEL_HINGE=y
# end of Linear and angular position sensors

#
# Digital potentiometers
#
# CONFIG_AD5110 is not set
# CONFIG_AD5272 is not set
# CONFIG_DS1803 is not set
# CONFIG_MAX5432 is not set
# CONFIG_MAX5481 is not set
# CONFIG_MAX5487 is not set
# CONFIG_MCP4018 is not set
# CONFIG_MCP4131 is not set
# CONFIG_MCP4531 is not set
# CONFIG_MCP41010 is not set
# CONFIG_TPL0102 is not set
# CONFIG_X9250 is not set
# end of Digital potentiometers

#
# Digital potentiostats
#
# CONFIG_LMP91000 is not set
# end of Digital potentiostats

#
# Pressure sensors
#
# CONFIG_ABP060MG is not set
# CONFIG_ABP2030PA_I2C is not set
# CONFIG_ABP2030PA_SPI is not set
# CONFIG_ROHM_BM1390 is not set
# CONFIG_BMP280 is not set
# CONFIG_DLHL60D is not set
# CONFIG_DPS310 is not set
CONFIG_HID_SENSOR_PRESS=y
# CONFIG_HP03 is not set
# CONFIG_HSC030PA is not set
# CONFIG_ICP10100 is not set
# CONFIG_MPL115_I2C is not set
# CONFIG_MPL115_SPI is not set
CONFIG_MPL3115=y
# 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=y
# CONFIG_PWM_DEBUG is not set
# CONFIG_PWM_PROVIDE_GPIO is not set
CONFIG_PWM_ADP5585=y
# CONFIG_PWM_ARGON_FAN_HAT is not set
# CONFIG_PWM_ATMEL_TCB is not set
# CONFIG_PWM_CLK is not set
# CONFIG_PWM_DWC is not set
# CONFIG_PWM_FSL_FTM is not set
# CONFIG_PWM_GPIO is not set
# CONFIG_PWM_MC33XS2410 is not set
# CONFIG_PWM_PCA9685 is not set
# CONFIG_PWM_TWL is not set
# CONFIG_PWM_TWL_LED is not set
CONFIG_PWM_XILINX=y

#
# IRQ chip support
#
CONFIG_IRQCHIP=y
CONFIG_ARM_GIC=y
CONFIG_ARM_GIC_MAX_NR=1
CONFIG_ARM_GIC_V2M=y
CONFIG_ARM_GIC_V3=y
CONFIG_ARM_GIC_ITS_PARENT=y
CONFIG_ARM_GIC_V3_ITS=y
CONFIG_ARM_GIC_V5=y
CONFIG_IRQ_MSI_LIB=y
# CONFIG_AL_FIC is not set
CONFIG_XILINX_INTC=y
# end of IRQ chip support

# CONFIG_IPACK_BUS is not set
CONFIG_RESET_CONTROLLER=y
CONFIG_RESET_GPIO=y
CONFIG_RESET_SCMI=y
CONFIG_RESET_SIMPLE=y
CONFIG_RESET_TI_SYSCON=y
# CONFIG_RESET_TI_TPS380X is not set

#
# PHY Subsystem
#
CONFIG_GENERIC_PHY=y
CONFIG_GENERIC_PHY_MIPI_DPHY=y
CONFIG_PHY_CAN_TRANSCEIVER=y
CONFIG_PHY_GOOGLE_USB=y
CONFIG_PHY_NXP_PTN3222=y
# 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=y
CONFIG_PHY_CADENCE_DPHY=y
CONFIG_PHY_CADENCE_DPHY_RX=y
CONFIG_PHY_CADENCE_SIERRA=y
CONFIG_PHY_CADENCE_SALVO=y
# 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_ARM_CCI_PMU=y
CONFIG_ARM_CCI400_PMU=y
CONFIG_ARM_CCI5xx_PMU=y
CONFIG_ARM_CCN=y
CONFIG_ARM_CMN=y
# CONFIG_ARM_NI is not set
CONFIG_ARM_PMU=y
CONFIG_ARM_PMU_ACPI=y
CONFIG_ARM_SMMU_V3_PMU=y
CONFIG_ARM_PMUV3=y
CONFIG_ARM_DSU_PMU=y
# CONFIG_FUJITSU_UNCORE_PMU is not set
CONFIG_ARM_SPE_PMU=y
CONFIG_ARM64_BRBE=y
CONFIG_ARM_DMC620_PMU=y
# CONFIG_ALIBABA_UNCORE_DRW_PMU is not set
CONFIG_HISI_PMU=y
# CONFIG_HISI_PCIE_PMU is not set
# CONFIG_HNS3_PMU is not set
# CONFIG_DWC_PCIE_PMU is not set
CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU=y
CONFIG_NVIDIA_CORESIGHT_PMU_ARCH_SYSTEM_PMU=y
# CONFIG_AMPERE_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set
# CONFIG_NVIDIA_TEGRA410_CMEM_LATENCY_PMU is not set
# CONFIG_NVIDIA_TEGRA410_C2C_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 is not set
CONFIG_DAX=y
# CONFIG_DEV_DAX is not set
# CONFIG_DEV_DAX_HMEM is not set
CONFIG_NVMEM=y
CONFIG_NVMEM_SYSFS=y
CONFIG_NVMEM_LAYOUTS=y

#
# Layout Types
#
CONFIG_NVMEM_LAYOUT_SL28_VPD=y
# CONFIG_NVMEM_LAYOUT_ONIE_TLV is not set
# CONFIG_NVMEM_LAYOUT_U_BOOT_ENV is not set
# end of Layout Types

CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=y
# CONFIG_EEPROM_93XX46 is not set
# CONFIG_EEPROM_EE1004 is not set
# CONFIG_EEPROM_M24LR is not set
CONFIG_NVMEM_MAX77759=y
CONFIG_NVMEM_RMEM=y
CONFIG_NVMEM_SPMI_SDAM=y
# CONFIG_NVMEM_U_BOOT_ENV is not set

#
# HW tracing support
#
CONFIG_STM=y
CONFIG_STM_PROTO_BASIC=y
CONFIG_STM_PROTO_SYS_T=y
# CONFIG_STM_DUMMY is not set
# CONFIG_STM_SOURCE_CONSOLE is not set
# CONFIG_STM_SOURCE_HEARTBEAT is not set
# CONFIG_STM_SOURCE_FTRACE is not set
# CONFIG_INTEL_TH is not set
# CONFIG_HISI_PTT is not set
# end of HW tracing support

CONFIG_FPGA=y
# CONFIG_ALTERA_PR_IP_CORE is not set
# CONFIG_FPGA_MGR_ALTERA_PS_SPI is not set
CONFIG_FPGA_MGR_ALTERA_CVP=y
# CONFIG_FPGA_MGR_XILINX_SELECTMAP is not set
# CONFIG_FPGA_MGR_XILINX_SPI is not set
# CONFIG_FPGA_MGR_ICE40_SPI is not set
# CONFIG_FPGA_MGR_MACHXO2_SPI is not set
CONFIG_FPGA_BRIDGE=y
CONFIG_ALTERA_FREEZE_BRIDGE=y
CONFIG_XILINX_PR_DECOUPLER=y
CONFIG_FPGA_REGION=y
CONFIG_OF_FPGA_REGION=y
# CONFIG_FPGA_DFL is not set
# CONFIG_FPGA_MGR_MICROCHIP_SPI is not set
# CONFIG_FPGA_MGR_LATTICE_SYSCONFIG_SPI is not set
# CONFIG_FPGA_MGR_EFINIX_SPI is not set
# CONFIG_FSI is not set
CONFIG_TEE=y
CONFIG_TEE_DMABUF_HEAPS=y
CONFIG_OPTEE=y
# CONFIG_OPTEE_INSECURE_LOAD_IMAGE is not set
CONFIG_OPTEE_STATIC_PROTMEM_POOL=y
CONFIG_MULTIPLEXER=y
# CONFIG_MUX_CORE is not set

#
# Multiplexer drivers
#
# CONFIG_MUX_ADG792A is not set
# CONFIG_MUX_ADGS1408 is not set
CONFIG_MUX_GPIO=y
CONFIG_MUX_MMIO=y
# end of Multiplexer drivers

CONFIG_PM_OPP=y
# CONFIG_SIOX is not set
CONFIG_SLIMBUS=y
CONFIG_INTERCONNECT=y
CONFIG_COUNTER=y
# CONFIG_INTERRUPT_CNT is not set
CONFIG_MOST=y
CONFIG_MOST_USB_HDM=y
# CONFIG_MOST_CDEV is not set
# CONFIG_PECI is not set
CONFIG_HTE=y
# CONFIG_CDX_BUS 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 is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
# CONFIG_F2FS_FS is not set
# CONFIG_ZONEFS_FS is not set
CONFIG_FS_DAX=y
CONFIG_FS_DAX_PMD=y
CONFIG_FS_POSIX_ACL=y
CONFIG_EXPORTFS=y
# CONFIG_EXPORTFS_BLOCK_OPS is not set
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 is not set
CONFIG_FUSE_PASSTHROUGH=y
CONFIG_FUSE_IO_URING=y
CONFIG_OVERLAY_FS=y
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
# CONFIG_OVERLAY_FS_INDEX is not set
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
# CONFIG_OVERLAY_FS_DEBUG is not set

#
# Caches
#
CONFIG_NETFS_SUPPORT=y
# CONFIG_NETFS_STATS is not set
# CONFIG_NETFS_DEBUG is not set
# CONFIG_FSCACHE is not set
# end of Caches

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set
# end of CD-ROM/DVD Filesystems

#
# DOS/FAT/EXFAT/NT Filesystems
#
CONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
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 is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS3_FS is not set
# end of DOS/FAT/EXFAT/NT Filesystems

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
# CONFIG_PROC_VMCORE_DEVICE_DUMP is not set
CONFIG_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_CHILDREN=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=y
CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y
CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
CONFIG_CONFIGFS_FS=y
CONFIG_EFIVAR_FS=y
# end of Pseudo filesystems

CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ORANGEFS_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
CONFIG_ECRYPT_FS=y
CONFIG_ECRYPT_FS_MESSAGING=y
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_JFFS2_FS is not set
CONFIG_UBIFS_FS=y
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
CONFIG_UBIFS_FS_ZSTD=y
# CONFIG_UBIFS_ATIME_SUPPORT is not set
CONFIG_UBIFS_FS_XATTR=y
CONFIG_UBIFS_FS_SECURITY=y
# CONFIG_UBIFS_FS_AUTHENTICATION is not set
# CONFIG_CRAMFS is not set
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_FILE_CACHE=y
# CONFIG_SQUASHFS_FILE_DIRECT is not set
CONFIG_SQUASHFS_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
# CONFIG_SQUASHFS_XATTR is not set
# CONFIG_SQUASHFS_COMP_CACHE_FULL is not set
CONFIG_SQUASHFS_ZLIB=y
# CONFIG_SQUASHFS_LZ4 is not set
# CONFIG_SQUASHFS_LZO is not set
# CONFIG_SQUASHFS_XZ is not set
# CONFIG_SQUASHFS_ZSTD is not set
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
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=y
# CONFIG_PSTORE_BLK is not set
# CONFIG_UFS_FS is not set
# CONFIG_EROFS_FS 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 is not set
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 is not set
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFS_DISABLE_UDP_SUPPORT=y
CONFIG_NFS_V4_2_READ_PLUS=y
# CONFIG_NFSD is not set
CONFIG_GRACE_PERIOD=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y
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 is not set
# CONFIG_CIFS is not set
# CONFIG_SMB_SERVER is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
CONFIG_9P_FS=y
# CONFIG_9P_FS_POSIX_ACL is not set
# CONFIG_9P_FS_SECURITY is not set
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_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_STATIC_USERMODEHELPER is not set
# CONFIG_SECURITY_SELINUX is not set
CONFIG_SECURITY_SMACK=y
# CONFIG_SECURITY_SMACK_BRINGUP is not set
CONFIG_SECURITY_SMACK_NETFILTER=y
# CONFIG_SECURITY_SMACK_APPEND_SIGNALS is not set
CONFIG_SECURITY_TOMOYO=y
CONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=64
CONFIG_SECURITY_TOMOYO_MAX_AUDIT_LOG=32
CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER=y
CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING=y
# CONFIG_SECURITY_APPARMOR is not set
# CONFIG_SECURITY_LOADPIN is not set
CONFIG_SECURITY_YAMA=y
CONFIG_SECURITY_SAFESETID=y
CONFIG_SECURITY_LOCKDOWN_LSM=y
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y
# CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set
# CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set
CONFIG_SECURITY_LANDLOCK=y
CONFIG_SECURITY_LANDLOCK_LOG=y
# CONFIG_SECURITY_IPE is not set
CONFIG_INTEGRITY=y
CONFIG_INTEGRITY_SIGNATURE=y
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
CONFIG_INTEGRITY_TRUSTED_KEYRING=y
CONFIG_INTEGRITY_AUDIT=y
CONFIG_IMA=y
# CONFIG_IMA_KEXEC is not set
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_SM3 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_SECURE_AND_OR_TRUSTED_BOOT is not set
# CONFIG_IMA_DISABLE_HTABLE is not set
# CONFIG_IMA_STAGING is not set
# CONFIG_IMA_INIT_LATE_SYNC is not set
CONFIG_EVM=y
CONFIG_EVM_ATTR_FSUUID=y
CONFIG_EVM_EXTRA_SMACK_XATTRS=y
CONFIG_EVM_ADD_XATTRS=y
# CONFIG_EVM_LOAD_X509 is not set
CONFIG_DEFAULT_SECURITY_SMACK=y
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_LSM="landlock,lockdown,yama,safesetid,integrity,tomoyo,smack,bpf"

#
# Kernel hardening options
#

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

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

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

CONFIG_CC_HAS_RANDSTRUCT=y
CONFIG_RANDSTRUCT_NONE=y
# CONFIG_RANDSTRUCT_FULL is not set
# end of Kernel hardening options
# end of Security options

CONFIG_ASYNC_CORE=y
CONFIG_ASYNC_MEMCPY=y
CONFIG_ASYNC_XOR=y
CONFIG_ASYNC_PQ=y
CONFIG_ASYNC_RAID6_RECOV=y
CONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA=y
CONFIG_ASYNC_TX_DISABLE_XOR_VAL_DMA=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_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_USER=y
# CONFIG_CRYPTO_SELFTESTS is not set
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_PCRYPT=y
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_AUTHENC=y
CONFIG_CRYPTO_KRB5ENC=y
CONFIG_CRYPTO_BENCHMARK=y
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_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_SEED=y
# CONFIG_CRYPTO_SERPENT is not set
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_AEGIS128_SIMD is not set
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=y
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_SHA3=y
CONFIG_CRYPTO_SM3=y
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 (arm64)
#
CONFIG_CRYPTO_GHASH_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
CONFIG_CRYPTO_AES_ARM64_BS=y
CONFIG_CRYPTO_SM4_ARM64_CE=y
CONFIG_CRYPTO_SM4_ARM64_CE_BLK=y
CONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
# CONFIG_CRYPTO_SM4_ARM64_CE_CCM is not set
# CONFIG_CRYPTO_SM4_ARM64_CE_GCM is not set
# end of Accelerated Cryptographic Algorithms for CPU (arm64)

CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set
# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set
CONFIG_CRYPTO_DEV_CCP=y
CONFIG_CRYPTO_DEV_CCP_DD=y
# CONFIG_CRYPTO_DEV_SP_CCP is not set
# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
# CONFIG_CRYPTO_DEV_QAT_C62X is not set
# CONFIG_CRYPTO_DEV_QAT_4XXX is not set
# CONFIG_CRYPTO_DEV_QAT_420XX is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
CONFIG_CRYPTO_DEV_VIRTIO=y
# CONFIG_CRYPTO_DEV_SAFEXCEL is not set
CONFIG_CRYPTO_DEV_CCREE=y
# CONFIG_CRYPTO_DEV_HISI_SEC is not set
CONFIG_CRYPTO_DEV_HISI_SEC2=y
CONFIG_CRYPTO_DEV_HISI_QM=y
CONFIG_CRYPTO_DEV_HISI_ZIP=y
CONFIG_CRYPTO_DEV_HISI_HPRE=y
CONFIG_CRYPTO_DEV_AMLOGIC_GXL=y
# CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG 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=y
CONFIG_BITREVERSE=y
CONFIG_HAVE_ARCH_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_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
CONFIG_ARCH_USE_SYM_ANNOTATIONS=y
CONFIG_INDIRECT_PIO=y
# CONFIG_TRACE_MMIO_ACCESS is not set
CONFIG_CRC7=y
CONFIG_CRC8=y
CONFIG_CRC16=y
CONFIG_CRC_CCITT=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC_T10DIF=y
CONFIG_CRC_T10DIF_ARCH=y
CONFIG_CRC32=y
CONFIG_CRC32_ARCH=y
CONFIG_CRC64=y
CONFIG_CRC64_ARCH=y
CONFIG_CRC_OPTIMIZATIONS=y
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_LIB_UTILS=y
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_LIB_AES_ARCH=y
CONFIG_CRYPTO_LIB_AES_CBC=y
CONFIG_CRYPTO_LIB_AES_CBC_MACS=y
CONFIG_CRYPTO_LIB_AES_CCM=y
CONFIG_CRYPTO_LIB_AES_CTR=y
CONFIG_CRYPTO_LIB_AES_ECB=y
CONFIG_CRYPTO_LIB_AES_GCM=y
CONFIG_CRYPTO_LIB_AES_XTS=y
CONFIG_CRYPTO_LIB_ARC4=y
CONFIG_CRYPTO_LIB_GF128MUL=y
CONFIG_CRYPTO_LIB_CHACHA=y
CONFIG_CRYPTO_LIB_CHACHA_ARCH=y
CONFIG_CRYPTO_LIB_CURVE25519=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=9
CONFIG_CRYPTO_LIB_CHACHA20POLY1305=y
CONFIG_CRYPTO_LIB_SHA1=y
CONFIG_CRYPTO_LIB_SHA1_ARCH=y
CONFIG_CRYPTO_LIB_SHA256=y
CONFIG_CRYPTO_LIB_SHA256_ARCH=y
CONFIG_CRYPTO_LIB_SHA512=y
CONFIG_CRYPTO_LIB_SHA512_ARCH=y
CONFIG_CRYPTO_LIB_SHA3=y
CONFIG_CRYPTO_LIB_SHA3_ARCH=y
CONFIG_CRYPTO_LIB_SM3=y
CONFIG_CRYPTO_LIB_SM3_ARCH=y
CONFIG_XOR_BLOCKS=y
CONFIG_XOR_BLOCKS_ARCH=y
CONFIG_RAID6_PQ=y
CONFIG_RAID6_PQ_ARCH=y
CONFIG_RAID6_PQ_BENCHMARK=y
CONFIG_XXHASH=y
CONFIG_AUDIT_GENERIC=y
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
CONFIG_AUDIT_COMPAT_GENERIC=y
CONFIG_842_COMPRESS=y
CONFIG_842_DECOMPRESS=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_LZ4_COMPRESS=y
CONFIG_LZ4HC_COMPRESS=y
CONFIG_LZ4_DECOMPRESS=y
CONFIG_ZSTD_COMMON=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_ARM64=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_RISCV=y
# CONFIG_XZ_DEC_MICROLZMA is not set
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_DECOMPRESS_LZ4=y
CONFIG_DECOMPRESS_ZSTD=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=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_ARCH_HAS_SETUP_DMA_OPS=y
CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y
CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y
CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED=y
CONFIG_ARCH_HAS_BATCHED_DMA_SYNC=y
CONFIG_SWIOTLB=y
CONFIG_SWIOTLB_DEFAULT_SIZE_MB=64
# CONFIG_SWIOTLB_DYNAMIC is not set
CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y
CONFIG_DMA_NEED_SYNC=y
CONFIG_DMA_RESTRICTED_POOL=y
CONFIG_DMA_NONCOHERENT_MMAP=y
CONFIG_DMA_COHERENT_POOL=y
CONFIG_DMA_DIRECT_REMAP=y
CONFIG_DMA_CMA=y
# CONFIG_DMA_NUMA_CMA is not set

#
# Default contiguous memory area size:
#
CONFIG_CMA_SIZE_MBYTES=32
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
# CONFIG_CMA_SIZE_SEL_MAX is not set
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=y
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_UCS2_STRING=y
CONFIG_VDSO_DATASTORE=y
CONFIG_GENERIC_GETTIMEOFDAY=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_GENERIC_CPU_CACHE_MAINTENANCE=y
CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=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_GENERIC_IOREMAP=y
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
CONFIG_FIRMWARE_TABLE=y
CONFIG_UNION_FIND=y

#
# Kernel hacking
#

#
# printk and dmesg options
#
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y
# CONFIG_STACKTRACE_BUILD_ID is not set
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
# CONFIG_BOOT_PRINTK_DELAY is not set
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y
CONFIG_SYMBOLIC_ERRNAME=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_BUGVERBOSE_DETAILED=y
# end of printk and dmesg options

CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_MISC=y

#
# Compile-time checks and compiler options
#
CONFIG_DEBUG_INFO=y
CONFIG_AS_HAS_NON_CONST_ULEB128=y
# CONFIG_DEBUG_INFO_NONE is not set
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
CONFIG_DEBUG_INFO_DWARF4=y
# CONFIG_DEBUG_INFO_DWARF5 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
# CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_BTF is not set
CONFIG_PAHOLE_HAS_BTF_TAG=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_HEADERS_INSTALL is not set
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_VMLINUX_MAP is not set
# end of Compile-time checks and compiler options

#
# Generic Kernel Debugging Instruments
#
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_ARCH_HAS_UBSAN=y
CONFIG_UBSAN=y
# CONFIG_UBSAN_TRAP is not set
CONFIG_CC_HAS_UBSAN_ARRAY_BOUNDS=y
CONFIG_UBSAN_BOUNDS=y
CONFIG_UBSAN_ARRAY_BOUNDS=y
CONFIG_UBSAN_SHIFT=y
# CONFIG_UBSAN_UNREACHABLE 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_UBSAN_KVM_EL2 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 is not set
CONFIG_ARCH_HAS_PTDUMP=y
CONFIG_PTDUMP=y
CONFIG_PTDUMP_DEBUGFS=y
CONFIG_HAVE_DEBUG_KMEMLEAK=y
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_PER_VMA_LOCK_STATS is not set
# CONFIG_MEM_ALLOC_PROFILING is not set
CONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
CONFIG_DEBUG_OBJECTS_FREE=y
CONFIG_DEBUG_OBJECTS_TIMERS=y
CONFIG_DEBUG_OBJECTS_WORK=y
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
# CONFIG_SHRINKER_DEBUG is not set
# CONFIG_DEBUG_STACK_USAGE is not set
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_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y
CONFIG_HAVE_ARCH_KASAN_HW_TAGS=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_SW_TAGS is not set
# CONFIG_KASAN_HW_TAGS is not set
# 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
# 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=0
CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y
# CONFIG_HARDLOCKUP_DETECTOR is not set
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=16
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_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_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FREGS=y
CONFIG_HAVE_FTRACE_GRAPH_FUNC=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_EXTRA_IPI_TRACEPOINTS=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=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_TRACING_SUPPORT=y
CONFIG_FTRACE=y
# CONFIG_TRACEFS_AUTOMOUNT_DEPRECATED is not set
# 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_ENABLE_DEFAULT_TRACERS 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 is not set
# CONFIG_UPROBE_EVENTS is not set
# CONFIG_EPROBE_EVENTS is not set
# CONFIG_SYNTH_EVENTS is not set
# CONFIG_USER_EVENTS is not set
# CONFIG_HIST_TRIGGERS is not set
# CONFIG_TRACE_EVENT_INJECT is not set
# CONFIG_TRACEPOINT_BENCHMARK is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_TRACE_EVAL_MAP_FILE is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set
# 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_SAMPLES is not set
CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y
CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y
# CONFIG_STRICT_DEVMEM is not set

#
# arm64 Debugging
#
# CONFIG_PID_IN_CONTEXTIDR is not set
# CONFIG_DEBUG_EFI is not set
# CONFIG_ARM64_RELOC_TEST is not set
CONFIG_CORESIGHT=y
CONFIG_CORESIGHT_LINKS_AND_SINKS=y
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
CONFIG_CORESIGHT_CATU=y
CONFIG_CORESIGHT_SINK_TPIU=y
CONFIG_CORESIGHT_SINK_ETBV10=y
# CONFIG_CORESIGHT_SOURCE_ETM4X is not set
CONFIG_CORESIGHT_STM=y
# CONFIG_CORESIGHT_CTCU is not set
CONFIG_CORESIGHT_CPU_DEBUG=y
# CONFIG_CORESIGHT_CPU_DEBUG_DEFAULT_ON is not set
CONFIG_CORESIGHT_CTI=y
# CONFIG_CORESIGHT_CTI_INTEGRATION_REGS is not set
# CONFIG_ULTRASOC_SMB is not set
# CONFIG_CORESIGHT_TPDM is not set
# CONFIG_CORESIGHT_TPDA is not set
# CONFIG_CORESIGHT_DUMMY is not set
# CONFIG_CORESIGHT_TNOC is not set
# end of arm64 Debugging

#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
CONFIG_FAULT_INJECTION=y
CONFIG_FAILSLAB=y
CONFIG_FAIL_PAGE_ALLOC=y
CONFIG_FAULT_INJECTION_USERCOPY=y
CONFIG_FAIL_MAKE_REQUEST=y
CONFIG_FAIL_IO_TIMEOUT=y
CONFIG_FAIL_FUTEX=y
CONFIG_FAULT_INJECTION_DEBUG_FS=y
# CONFIG_FAIL_MMC_REQUEST is not set
# CONFIG_FAIL_SKB_REALLOC is not set
CONFIG_FAULT_INJECTION_CONFIGFS=y
# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set
CONFIG_ARCH_HAS_KCOV=y
CONFIG_KCOV=y
CONFIG_KCOV_ENABLE_COMPARISONS=y
CONFIG_KCOV_INSTRUMENT_ALL=y
CONFIG_KCOV_IRQ_AREA_SIZE=0x40000
# CONFIG_KCOV_SELFTEST is not set
CONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_TEST_DHRY is not set
# CONFIG_LKDTM is not set
# CONFIG_TEST_DIV64 is not set
# CONFIG_TEST_MULDIV64 is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_TEST_REF_TRACKER is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_REED_SOLOMON_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_PERCPU_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_ASYNC_RAID6_TEST is not set
# CONFIG_TEST_HEXDUMP is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_BITMAP is not set
# CONFIG_TEST_XARRAY is not set
# CONFIG_TEST_MAPLE_TREE is not set
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_TEST_IDA is not set
# CONFIG_TEST_LKM is not set
# CONFIG_TEST_BITOPS is not set
# CONFIG_TEST_VMALLOC is not set
# CONFIG_TEST_WORKQUEUE is not set
# CONFIG_TEST_BPF is not set
# CONFIG_FIND_BIT_BENCHMARK is not set
# CONFIG_REGION_ALLOC_BENCHMARK is not set
# CONFIG_TEST_FIRMWARE is not set
# CONFIG_TEST_SYSCTL is not set
# CONFIG_CONTEXT_ANALYSIS_TEST is not set
# CONFIG_TEST_UDELAY is not set
# CONFIG_TEST_STATIC_KEYS is not set
# CONFIG_TEST_DYNAMIC_DEBUG is not set
# CONFIG_TEST_KMOD is not set
# CONFIG_TEST_KALLSYMS is not set
# CONFIG_TEST_DEBUG_VIRTUAL is not set
# CONFIG_TEST_MEMCAT_P is not set
# CONFIG_TEST_MEMINIT is not set
# CONFIG_TEST_HMM is not set
# CONFIG_TEST_FREE_PAGES is not set
# CONFIG_TEST_OBJPOOL is not set
CONFIG_ARCH_USE_MEMTEST=y
CONFIG_MEMTEST=y
# end of Kernel Testing and Coverage

#
# Rust hacking
#
# end of Rust hacking
# end of Kernel hacking

CONFIG_IO_URING_ZCRX=y
CONFIG_IO_URING_BPF=y
KernelRepo git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
ReproCID 4643490895495168
ReproOpts {"procs":1,"slowdown":1,"sandbox":"","sandbox_arg":0,"close_fds":false,"callcomments":true}
ReproSyzID 6184139352440832
SyzkallerCommit 680aa3e19b52574eca8bcba3c41aa18235367abe
TargetArch arm64
TargetOS linux

Outputs:
DenialOfService ✅
Exploitable ❌
FilesystemTrigger ❌
NetworkTrigger ❌
PeripheralTrigger ❌
RemoteTrigger ❌
Unprivileged ❌
UserNamespace ❌
VMGuestTrigger ❌
VMHostTrigger ❌
Explanation
**Analysis of the Bug:**

The bug is a Synchronous External Abort (SEA) on ARM64, triggered by executing
an exclusive load instruction (`ldxr`) on memory mapped as Device memory.

1. **Root Cause:**
   The `futex` system call performs atomic operations on user-provided memory
   addresses using Load-Exclusive (`ldxr`) and Store-Exclusive (`stlxr`)
   instructions. If a user maps a PCI Base Address Register (BAR) or other
   peripheral memory into their address space (which is mapped as Device memory,
   e.g., `MT_DEVICE_nGnRE`), and passes that address to `futex`, the CPU
   attempts an exclusive read from the device.
   Under the ARM architecture, exclusive accesses to Device memory are not
   supported (they lack an exclusive monitor). When the transaction reaches the
   system interconnect (e.g., the PCIe Root Complex), it is rejected, and the
   CPU raises a Synchronous External Abort (SEA).
   In the Linux kernel, SEAs are handled by `do_sea()`. Unlike normal page
   faults or alignment faults, `do_sea()` treats the abort as a severe hardware
   error (machine check). It does not attempt to recover via exception fixup
   tables (`fixup_exception()`) and instead directly calls `die()`, which panics
   the kernel or kills the task.

2. **Exploitability:**
   This bug is **not exploitable** for privilege escalation, memory corruption,
   or information leaks. It is a hardware-level bus error that immediately
   invokes the kernel's `die()` handler, halting execution. It strictly results
   in a Denial of Service (DoS).

3. **Accessibility (Unprivileged / User Namespaces):**
   This bug is **not accessible to unprivileged users**, even within user
   namespaces.
   To trigger the bug, a process must map Device memory (`pgprot_device` or
   `pgprot_noncached`) into its address space. Access to Device memory is
   strictly privileged:
   - The reproducer uses `/sys/bus/pci/devices/.../resource0`, which is owned by
   `root:root` with `0600` permissions.
   - Other vectors like `/dev/mem`, UIO, or VFIO also require root privileges or
   specific group access not granted to typical unprivileged users.
   - If an unprivileged user creates a user namespace and mounts `sysfs`, the
   PCI resource files will still appear as owned by the unmapped global root
   (e.g., `nobody` or `overflowuid`). The user's `CAP_DAC_OVERRIDE` within the
   namespace does not grant access to files owned by unmapped UIDs, so the
   `openat` syscall will fail with `-EACCES`.
   - While unprivileged users *can* map GPU VRAM via DRM render nodes (e.g.,
   `/dev/dri/renderD*`), DRM drivers map VRAM using `pgprot_writecombine`
   (`MT_NORMAL_NC` - Normal Non-Cacheable memory). The ARM architecture fully
   supports exclusive accesses on Normal Non-Cacheable memory, so calling
   `futex` on DRM VRAM executes safely and does not generate a SEA.

**Conclusion:**
This is a privileged-only Denial of Service (DoS) bug. A root user can crash the
system by mapping a PCI BAR and calling `futex` on it, but unprivileged
processes cannot reach the vulnerable state.

Crash report:
Internal error: synchronous external abort: 0000000096000010 [#1]  SMP
Modules linked in:
CPU: 0 UID: 0 PID: 4916 Comm: syz.0.17 Tainted: G   M                syzkaller #0 PREEMPT 
Tainted: [M]=MACHINE_CHECK
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/07/2026
pstate: 83000005 (Nzcv daif -PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : __llsc_futex_cmpxchg arch/arm64/include/asm/futex.h:64 [inline]
pc : __futex_cmpxchg arch/arm64/include/asm/futex.h:247 [inline]
pc : futex_atomic_cmpxchg_inatomic arch/arm64/include/asm/futex.h:295 [inline]
pc : futex_cmpxchg_value_locked+0x114/0x394 kernel/futex/futex.h:295
lr : access_ok arch/arm64/include/asm/uaccess.h:45 [inline]
lr : futex_atomic_cmpxchg_inatomic arch/arm64/include/asm/futex.h:290 [inline]
lr : futex_cmpxchg_value_locked+0xc8/0x394 kernel/futex/futex.h:295
sp : ffff80009ab17750
x29: ffff80009ab17770 x28: 1fffe000189dc765 x27: ffff0000c4ee3b2c
x26: 1fffe000189dca44 x25: dfff800000000000 x24: 0000000000000000
x23: 0000000000000000 x22: 000000008f0101ff x21: 000000000f0101ff
x20: 000ffffffffffffd x19: ffff0000c4ee5224 x18: 0000000000000000
x17: ffff8000805acb44 x16: ffff8000805ac7e0 x15: ffff8000805b05f8
x14: ffff8000805aea98 x13: 0000000000000009 x12: 0000000000000000
x11: 0000000072c79ec1 x10: 0000000000000080 x9 : 00000000fffffff5
x8 : 0000000000000000 x7 : ffff800080375350 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000805b145c
x2 : 0000000000000000 x1 : ffff0000c4ee3b00 x0 : 0000000000000000
Call trace:
 __llsc_futex_cmpxchg arch/arm64/include/asm/futex.h:64 [inline] (P)
 __futex_cmpxchg arch/arm64/include/asm/futex.h:247 [inline] (P)
 futex_atomic_cmpxchg_inatomic arch/arm64/include/asm/futex.h:295 [inline] (P)
 futex_cmpxchg_value_locked+0x114/0x394 kernel/futex/futex.h:295 (P)
 lock_pi_update_atomic+0x58/0xd4 kernel/futex/pi.c:549
 futex_lock_pi_atomic+0x28c/0x898 kernel/futex/pi.c:666
 futex_lock_pi+0x248/0x6e0 kernel/futex/pi.c:1018
 do_futex+0x2f8/0x378 kernel/futex/syscalls.c:-1
 __do_sys_futex kernel/futex/syscalls.c:210 [inline]
 __se_sys_futex kernel/futex/syscalls.c:191 [inline]
 __arm64_sys_futex+0x2e4/0x418 kernel/futex/syscalls.c:191
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121
 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140
 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:758
 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:777
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:590
Code: 2a1f03e0 12800149 d500409f f9800111 (885f7d14) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	2a1f03e0 	mov	w0, wzr
   4:	12800149 	mov	w9, #0xfffffff5            	// #-11
   8:	d500409f 	msr	pan, #0x0
   c:	f9800111 	prfm	pstl1strm, [x8]
* 10:	885f7d14 	ldxr	w20, [x8] <-- trapping instruction

Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/08 09:59 flow assessment-security
35m Results:
map[DenialOfService:true Explanation:**Analysis of the Bug:**

The bug is a Synchronous External Abort (SEA) on ARM64, triggered by executing
an exclusive load instruction (`ldxr`) on memory mapped as Device memory.

1. **Root Cause:**
   The `futex` system call performs atomic operations on user-provided memory
   addresses using Load-Exclusive (`ldxr`) and Store-Exclusive (`stlxr`)
   instructions. If a user maps a PCI Base Address Register (BAR) or other
   peripheral memory into their address space (which is mapped as Device memory,
   e.g., `MT_DEVICE_nGnRE`), and passes that address to `futex`, the CPU
   attempts an exclusive read from the device.
   Under the ARM architecture, exclusive accesses to Device memory are not
   supported (they lack an exclusive monitor). When the transaction reaches the
   system interconnect (e.g., the PCIe Root Complex), it is rejected, and the
   CPU raises a Synchronous External Abort (SEA).
   In the Linux kernel, SEAs are handled by `do_sea()`. Unlike normal page
   faults or alignment faults, `do_sea()` treats the abort as a severe hardware
   error (machine check). It does not attempt to recover via exception fixup
   tables (`fixup_exception()`) and instead directly calls `die()`, which panics
   the kernel or kills the task.

2. **Exploitability:**
   This bug is **not exploitable** for privilege escalation, memory corruption,
   or information leaks. It is a hardware-level bus error that immediately
   invokes the kernel's `die()` handler, halting execution. It strictly results
   in a Denial of Service (DoS).

3. **Accessibility (Unprivileged / User Namespaces):**
   This bug is **not accessible to unprivileged users**, even within user
   namespaces.
   To trigger the bug, a process must map Device memory (`pgprot_device` or
   `pgprot_noncached`) into its address space. Access to Device memory is
   strictly privileged:
   - The reproducer uses `/sys/bus/pci/devices/.../resource0`, which is owned by
   `root:root` with `0600` permissions.
   - Other vectors like `/dev/mem`, UIO, or VFIO also require root privileges or
   specific group access not granted to typical unprivileged users.
   - If an unprivileged user creates a user namespace and mounts `sysfs`, the
   PCI resource files will still appear as owned by the unmapped global root
   (e.g., `nobody` or `overflowuid`). The user's `CAP_DAC_OVERRIDE` within the
   namespace does not grant access to files owned by unmapped UIDs, so the
   `openat` syscall will fail with `-EACCES`.
   - While unprivileged users *can* map GPU VRAM via DRM render nodes (e.g.,
   `/dev/dri/renderD*`), DRM drivers map VRAM using `pgprot_writecombine`
   (`MT_NORMAL_NC` - Normal Non-Cacheable memory). The ARM architecture fully
   supports exclusive accesses on Normal Non-Cacheable memory, so calling
   `futex` on DRM VRAM executes safely and does not generate a SEA.

**Conclusion:**
This is a privileged-only Denial of Service (DoS) bug. A root user can crash the
system by mapping a PCI BAR and calling `futex` on it, but unprivileged
processes cannot reach the vulnerable state. Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]

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

#define _GNU_SOURCE 

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

#ifndef __NR_futex
#define __NR_futex 98
#endif
#ifndef __NR_mkdirat
#define __NR_mkdirat 34
#endif
#ifndef __NR_mmap
#define __NR_mmap 222
#endif
#ifndef __NR_mount
#define __NR_mount 40
#endif
#ifndef __NR_openat
#define __NR_openat 56
#endif

uint64_t r[1] = {0xffffffffffffffff};

int main(void)
{
		syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	const char* reason;
	(void)reason;
				intptr_t res = 0;
	if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
//  mkdirat arguments: [
//    fd: fd_dir (resource)
//    path: ptr[in, buffer] {
//      buffer: {2e 2f 6d 79 73 79 73 00} (length 0x8)
//    }
//    mode: open_mode = 0x1ff (8 bytes)
//  ]
memcpy((void*)0x20000040, "./mysys\000", 8);
	syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x20000040ul, /*mode=S_IXOTH|S_IWOTH|S_IROTH|S_IXGRP|S_IWGRP|S_IRGRP|S_IXUSR|S_IWUSR|0x100*/0x1fful);
//  mount arguments: [
//    src: nil
//    dst: ptr[in, buffer] {
//      buffer: {2e 2f 6d 79 73 79 73 00} (length 0x8)
//    }
//    type: ptr[in, buffer] {
//      buffer: {73 79 73 66 73 00} (length 0x6)
//    }
//    flags: mount_flags = 0x0 (8 bytes)
//    data: nil
//  ]
memcpy((void*)0x20000100, "./mysys\000", 8);
memcpy((void*)0x20000200, "sysfs\000", 6);
	syscall(__NR_mount, /*src=*/0ul, /*dst=*/0x20000100ul, /*type=*/0x20000200ul, /*flags=*/0ul, /*data=*/0ul);
//  openat arguments: [
//    fd: fd_dir (resource)
//    file: ptr[in, buffer] {
//      buffer: {2e 2f 6d 79 73 79 73 2f 62 75 73 2f 70 63 69 2f 64 65 76 69 63 65 73 2f 30 30 30 30 3a 30 30 3a 30 32 2e 30 2f 72 65 73 6f 75 72 63 65 30 00} (length 0x2f)
//    }
//    flags: open_flags = 0x2 (4 bytes)
//    mode: open_mode = 0x0 (2 bytes)
//  ]
//  returns fd
memcpy((void*)0x20000300, "./mysys/bus/pci/devices/0000:00:02.0/resource0\000", 47);
	res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000300ul, /*flags=O_RDWR*/2, /*mode=*/0);
	if (res != -1)
		r[0] = res;
//  mmap arguments: [
//    addr: nil
//    len: len = 0x1012 (4 bytes)
//    prot: mmap_prot = 0x3 (8 bytes)
//    flags: mmap_flags = 0x11 (8 bytes)
//    fd: fd (resource)
//    offset: intptr = 0x0 (8 bytes)
//  ]
	syscall(__NR_mmap, /*addr=*/0ul, /*len=*/0x1012, /*prot=PROT_WRITE|PROT_READ*/3ul, /*flags=MAP_FIXED|MAP_SHARED*/0x11ul, /*fd=*/r[0], /*offset=*/0ul);
//  futex arguments: [
//    addr: nil
//    op: futex_op = 0x86 (8 bytes)
//    val: int32 = 0x2 (4 bytes)
//    timeout: nil
//    addr2: nil
//    val3: int32 = 0xfffffffc (4 bytes)
//  ]
	syscall(__NR_futex, /*addr=*/0ul, /*op=FUTEX_PRIVATE_FLAG|FUTEX_LOCK_PI*/0x86ul, /*val=*/2, /*timeout=*/0ul, /*addr2=*/0ul, /*val3=*/0xfffffffc);
	return 0;
}
]

2/1 2026/09/08 09:59 action kernel-checkouter
0m Results:
map[KernelSrc:/app/workdir/cache/src/e4df1e35f73e8871a0bb5986e0a3f7f88903d380]

3/1 2026/09/08 09:59 action kernel-builder
0m Results:
map[KernelObj:/app/workdir/cache/build/4052259e3ac679a0ea4a40bb36f332ce6ba3596e]

4/1 2026/09/08 09:59 action codesearch-prepare
0m Results:
map[Index:codesearch-index]

5/1 2026/09/08 09:59 agent expert
35m Model:
deep-reasoning

Results:
map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]

Instruction:
You are an experienced Linux kernel security engineer. Your task is to analyze given kernel bug report
and determine its security impact based on the following dimensions.

Use the provided tools to examine the source code, check for capability checks (e.g., capable(), ns_capable()),
and understand the nature of the bug. Analyze the given kernel build and configuration.
You can check the kernel config by grepping ".config" file; you can check kernel cmdline by grepping
".config" file for "CONFIG_CMDLINE=". Assume sysctl parameters have default values.
But analyze for the corresponding production build w/o debugging tools enabled (like KASAN, KMSAN, UBSAN).

Try different strategies when analyzing the bug:
 - think of ways in which the vulnerable code is unreachable
 - or the other way around: try to come up with different ideas of how an unprivileged user can reach the bug
If still unsure err on the side of the bug being non-exploitable/not-accessible.
In the final reply, provide a reasoning for your assessment.

Analysis dimensions:

* Exploitable:
Determine if the bug can result in memory corruption, elevated privileges, or an information leak.
Memory safety issues are almost always exploitable (KASAN or UBSAN reports for use-after-free, out-of-bounds;
refcounting issues, corrupted lists, etc). When kernel is crashing on a completely wild pointer access
(e.g. user-space address, or non-canonical address, but not on NULL or address corresponding to KASAN shadow
for NULL address), including both data accesses and control transfers, that also usually implies possibility
of exploitation. Such reports usually say "unable to handle kernel paging request".
Uses of uninitialized values detected by KMSAN may be exploitable b/c attacker frequently can affect uninit
values with spraying techniques. However, for these exploitability depends on how exactly the uninit value
is used in the code, and what it affects.
Information leaks are exploitable on their own and should be classified as such. A bug that copies kernel
memory contents to userspace (e.g. an out-of-bounds read whose result is returned to the caller, or
uninitialized stack/heap bytes written to a user buffer) is exploitable: it can reveal kernel pointer
values and defeat KASLR, expose sensitive data such as cryptographic keys or other processes' memory, and
serves as a necessary building block in most modern kernel privilege-escalation exploit chains. Do not classify
an information leak as non-exploitable solely because it does not directly cause a memory write or control-flow
hijack; the leak itself is the exploit primitive.

Think of what happens after the bug is triggered. Some bugs cause kernel panic and halt execution,
they are harder to exploit. For example, BUG reports halts the kernel. However, WARNING reports don't halt
execution in production builds. Debug bug detection tools (like KASAN, KMSAN, KCSAN, UBSAN) are also not enabled
in production builds, so attacker can freely exploit these bugs w/o being detected by these tools.
If you see an integer overflow, think how the overflowed value used later (if it's used as allocation size,
or an array index). If you see an out-of-bounds read, think if it's followed by an out-of-bounds write as well.
Some KCSAN data-races may be exploitable by skilled attackers as well. Think what data structures got corrupted
as the result of data races and how. However, note that kernel has lots of "benign" data races that don't lead
to any runtime misbehavior at all.

* Denial Of Service:
Determine if the bug can result in denial-of-service. Most bugs can, since they cause system crash,
hangs, deadlocks, or resource leaks. This is mostly applicable to WARNING bugs that won't cause system crash
in production. For these think what will be consequences of the violation of the kernel assumptions flagged
by the WARNING. In some cases the unexpected condition is also properly handled by the normal control flow
(e.g. with "if (WARN_ON(...))"), these won't cause denial-of-service. If the condition is not handled,
then it may or may not cause denial-of-service.

* Accessible From Unprivileged Processes:
Determine if the bug can be reached from a typical (non-root) user process that does NOT have any special capabilities
(like CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON) or access to device nodes restricted to root.
Assume that unprivileged_bpf_disabled=1, that is eBPF loading is not accessible. However, cBPF (classical BPF)
is still accessible to non-root processes.
Assume that user namespaces are not accessible, that is, the process cannot get the mentioned capabilities even
within a new user namespace (checked by ns_capable() function in the kernel sources).

* Accessible From User Namespaces:
Determine if the bug can be reached within a user-namespace where the process has all capabilities
(including CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON). Such capabilities are checked with ns_capable()
function in the kernel sources.

* VM Guest Trigger:
Determine if the bug can be triggered from the context of a typical KVM guest (e.g., set up by a QEMU VMM).
Consider accesses to standard Linux host paravirtualized features (virtio-blk, virtio-net, etc.),
and handling of VM exits in the KVM code.

* VM Host Trigger in The Confidential Computing Context:
Determine if the bug can be triggered in a confidential computing guest kernel from the context of a KVM host.
Consider access to standard Linux guest paravirtualized features (virtio-blk, virtio-net, etc.).

* Ethernet Network Trigger:
Determine if the bug can be triggered by processing ingress network Ethernet traffic, either directly (network stack)
or via drivers exposed to network data.

* Other Remote Trigger:
Determine if the bug can be triggered by processing remote traffic other than Ethernet (Wifi, Bluetooth, NFC, etc).

* Peripheral Trigger:
Determine if the bug can be triggered via an untrusted peripheral device that can be physically plugged
into a system, such as a USB device or a niche hardware driver handling external hardware inputs.
This is particularly important for mobile and desktop environments where users can plug in unknown devices.

* Malicious Filesystem Trigger:
Determine if the bug can be triggered by the kernel mounting and parsing a malicious filesystem image.
This is highly critical for Desktop and Mobile environments where external media or downloaded images
might be auto-mounted.

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


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

Prompt:
The kernel bug report is:

Internal error: synchronous external abort: 0000000096000010 [#1]  SMP
Modules linked in:
CPU: 0 UID: 0 PID: 4916 Comm: syz.0.17 Tainted: G   M                syzkaller #0 PREEMPT 
Tainted: [M]=MACHINE_CHECK
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/07/2026
pstate: 83000005 (Nzcv daif -PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : __llsc_futex_cmpxchg arch/arm64/include/asm/futex.h:64 [inline]
pc : __futex_cmpxchg arch/arm64/include/asm/futex.h:247 [inline]
pc : futex_atomic_cmpxchg_inatomic arch/arm64/include/asm/futex.h:295 [inline]
pc : futex_cmpxchg_value_locked+0x114/0x394 kernel/futex/futex.h:295
lr : access_ok arch/arm64/include/asm/uaccess.h:45 [inline]
lr : futex_atomic_cmpxchg_inatomic arch/arm64/include/asm/futex.h:290 [inline]
lr : futex_cmpxchg_value_locked+0xc8/0x394 kernel/futex/futex.h:295
sp : ffff80009ab17750
x29: ffff80009ab17770 x28: 1fffe000189dc765 x27: ffff0000c4ee3b2c
x26: 1fffe000189dca44 x25: dfff800000000000 x24: 0000000000000000
x23: 0000000000000000 x22: 000000008f0101ff x21: 000000000f0101ff
x20: 000ffffffffffffd x19: ffff0000c4ee5224 x18: 0000000000000000
x17: ffff8000805acb44 x16: ffff8000805ac7e0 x15: ffff8000805b05f8
x14: ffff8000805aea98 x13: 0000000000000009 x12: 0000000000000000
x11: 0000000072c79ec1 x10: 0000000000000080 x9 : 00000000fffffff5
x8 : 0000000000000000 x7 : ffff800080375350 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000805b145c
x2 : 0000000000000000 x1 : ffff0000c4ee3b00 x0 : 0000000000000000
Call trace:
 __llsc_futex_cmpxchg arch/arm64/include/asm/futex.h:64 [inline] (P)
 __futex_cmpxchg arch/arm64/include/asm/futex.h:247 [inline] (P)
 futex_atomic_cmpxchg_inatomic arch/arm64/include/asm/futex.h:295 [inline] (P)
 futex_cmpxchg_value_locked+0x114/0x394 kernel/futex/futex.h:295 (P)
 lock_pi_update_atomic+0x58/0xd4 kernel/futex/pi.c:549
 futex_lock_pi_atomic+0x28c/0x898 kernel/futex/pi.c:666
 futex_lock_pi+0x248/0x6e0 kernel/futex/pi.c:1018
 do_futex+0x2f8/0x378 kernel/futex/syscalls.c:-1
 __do_sys_futex kernel/futex/syscalls.c:210 [inline]
 __se_sys_futex kernel/futex/syscalls.c:191 [inline]
 __arm64_sys_futex+0x2e4/0x418 kernel/futex/syscalls.c:191
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121
 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140
 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:758
 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:777
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:590
Code: 2a1f03e0 12800149 d500409f f9800111 (885f7d14) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	2a1f03e0 	mov	w0, wzr
   4:	12800149 	mov	w9, #0xfffffff5            	// #-11
   8:	d500409f 	msr	pan, #0x0
   c:	f9800111 	prfm	pstl1strm, [x8]
* 10:	885f7d14 	ldxr	w20, [x8] <-- trapping instruction




It is reproducible with the followint program.
Keep in mind that it may lack the precise threading, sandboxing, and some arguments of a working reproducer.
But it should give an idea of the involved syscalls.

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

#define _GNU_SOURCE 

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

#ifndef __NR_futex
#define __NR_futex 98
#endif
#ifndef __NR_mkdirat
#define __NR_mkdirat 34
#endif
#ifndef __NR_mmap
#define __NR_mmap 222
#endif
#ifndef __NR_mount
#define __NR_mount 40
#endif
#ifndef __NR_openat
#define __NR_openat 56
#endif

uint64_t r[1] = {0xffffffffffffffff};

int main(void)
{
		syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
	const char* reason;
	(void)reason;
				intptr_t res = 0;
	if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
//  mkdirat arguments: [
//    fd: fd_dir (resource)
//    path: ptr[in, buffer] {
//      buffer: {2e 2f 6d 79 73 79 73 00} (length 0x8)
//    }
//    mode: open_mode = 0x1ff (8 bytes)
//  ]
memcpy((void*)0x20000040, "./mysys\000", 8);
	syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x20000040ul, /*mode=S_IXOTH|S_IWOTH|S_IROTH|S_IXGRP|S_IWGRP|S_IRGRP|S_IXUSR|S_IWUSR|0x100*/0x1fful);
//  mount arguments: [
//    src: nil
//    dst: ptr[in, buffer] {
//      buffer: {2e 2f 6d 79 73 79 73 00} (length 0x8)
//    }
//    type: ptr[in, buffer] {
//      buffer: {73 79 73 66 73 00} (length 0x6)
//    }
//    flags: mount_flags = 0x0 (8 bytes)
//    data: nil
//  ]
memcpy((void*)0x20000100, "./mysys\000", 8);
memcpy((void*)0x20000200, "sysfs\000", 6);
	syscall(__NR_mount, /*src=*/0ul, /*dst=*/0x20000100ul, /*type=*/0x20000200ul, /*flags=*/0ul, /*data=*/0ul);
//  openat arguments: [
//    fd: fd_dir (resource)
//    file: ptr[in, buffer] {
//      buffer: {2e 2f 6d 79 73 79 73 2f 62 75 73 2f 70 63 69 2f 64 65 76 69 63 65 73 2f 30 30 30 30 3a 30 30 3a 30 32 2e 30 2f 72 65 73 6f 75 72 63 65 30 00} (length 0x2f)
//    }
//    flags: open_flags = 0x2 (4 bytes)
//    mode: open_mode = 0x0 (2 bytes)
//  ]
//  returns fd
memcpy((void*)0x20000300, "./mysys/bus/pci/devices/0000:00:02.0/resource0\000", 47);
	res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000300ul, /*flags=O_RDWR*/2, /*mode=*/0);
	if (res != -1)
		r[0] = res;
//  mmap arguments: [
//    addr: nil
//    len: len = 0x1012 (4 bytes)
//    prot: mmap_prot = 0x3 (8 bytes)
//    flags: mmap_flags = 0x11 (8 bytes)
//    fd: fd (resource)
//    offset: intptr = 0x0 (8 bytes)
//  ]
	syscall(__NR_mmap, /*addr=*/0ul, /*len=*/0x1012, /*prot=PROT_WRITE|PROT_READ*/3ul, /*flags=MAP_FIXED|MAP_SHARED*/0x11ul, /*fd=*/r[0], /*offset=*/0ul);
//  futex arguments: [
//    addr: nil
//    op: futex_op = 0x86 (8 bytes)
//    val: int32 = 0x2 (4 bytes)
//    timeout: nil
//    addr2: nil
//    val3: int32 = 0xfffffffc (4 bytes)
//  ]
	syscall(__NR_futex, /*addr=*/0ul, /*op=FUTEX_PRIVATE_FLAG|FUTEX_LOCK_PI*/0x86ul, /*val=*/2, /*timeout=*/0ul, /*addr2=*/0ul, /*val3=*/0xfffffffc);
	return 0;
}



Reply:
**Analysis of the Bug:**

The bug is a Synchronous External Abort (SEA) on ARM64, triggered by executing an exclusive load instruction (`ldxr`) on memory mapped as Device memory. 

1. **Root Cause:**
   The `futex` system call performs atomic operations on user-provided memory addresses using Load-Exclusive (`ldxr`) and Store-Exclusive (`stlxr`) instructions. If a user maps a PCI Base Address Register (BAR) or other peripheral memory into their address space (which is mapped as Device memory, e.g., `MT_DEVICE_nGnRE`), and passes that address to `futex`, the CPU attempts an exclusive read from the device.
   Under the ARM architecture, exclusive accesses to Device memory are not supported (they lack an exclusive monitor). When the transaction reaches the system interconnect (e.g., the PCIe Root Complex), it is rejected, and the CPU raises a Synchronous External Abort (SEA). 
   In the Linux kernel, SEAs are handled by `do_sea()`. Unlike normal page faults or alignment faults, `do_sea()` treats the abort as a severe hardware error (machine check). It does not attempt to recover via exception fixup tables (`fixup_exception()`) and instead directly calls `die()`, which panics the kernel or kills the task.

2. **Exploitability:**
   This bug is **not exploitable** for privilege escalation, memory corruption, or information leaks. It is a hardware-level bus error that immediately invokes the kernel's `die()` handler, halting execution. It strictly results in a Denial of Service (DoS).

3. **Accessibility (Unprivileged / User Namespaces):**
   This bug is **not accessible to unprivileged users**, even within user namespaces. 
   To trigger the bug, a process must map Device memory (`pgprot_device` or `pgprot_noncached`) into its address space. Access to Device memory is strictly privileged:
   - The reproducer uses `/sys/bus/pci/devices/.../resource0`, which is owned by `root:root` with `0600` permissions.
   - Other vectors like `/dev/mem`, UIO, or VFIO also require root privileges or specific group access not granted to typical unprivileged users.
   - If an unprivileged user creates a user namespace and mounts `sysfs`, the PCI resource files will still appear as owned by the unmapped global root (e.g., `nobody` or `overflowuid`). The user's `CAP_DAC_OVERRIDE` within the namespace does not grant access to files owned by unmapped UIDs, so the `openat` syscall will fail with `-EACCES`.
   - While unprivileged users *can* map GPU VRAM via DRM render nodes (e.g., `/dev/dri/renderD*`), DRM drivers map VRAM using `pgprot_writecombine` (`MT_NORMAL_NC` - Normal Non-Cacheable memory). The ARM architecture fully supports exclusive accesses on Normal Non-Cacheable memory, so calling `futex` on DRM VRAM executes safely and does not generate a SEA.

**Conclusion:**
This is a privileged-only Denial of Service (DoS) bug. A root user can crash the system by mapping a PCI BAR and calling `futex` on it, but unprivileged processes cannot reach the vulnerable state.

6/2 2026/09/08 09:59 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9389
							output: 32
							thoughts: 886
						

Thoughts:
**Analyzing a Synchronous External Abort on ARM64**

Okay, so I've got this bug report, a synchronous external abort on an ARM64 system. The stack trace is pointing to a futex operation, specifically `futex_cmpxchg_value_locked`, and the instruction causing the problem is an `ldxr` (load exclusive) on address zero. Immediately, alarm bells are ringing. Why is this accessing address zero?

Looking deeper, I see the reproducer mounts sysfs, opens a PCI BAR (Base Address Register) through sysfs, and then attempts to mmap it at address zero using `MAP_FIXED` and `MAP_SHARED`. Then it calls `futex` on the same address. Okay, that's the smoking gun!

This is where my ARM64 expertise kicks in. `ldxr` on device memory or non-cacheable memory is known to be a problem. This is a classic violation of the memory model. PCI BARs are mapped as device memory. The ARM64 architecture manual is quite clear on this: exclusive accesses to device memory are generally not supported and are likely to generate an abort. The `ldxr` instruction is trying to do an atomic compare-and-swap on something that isn't really amenable to atomic operations. It's expecting the hardware to make sure something is happening exclusively, but since it is mapped to a hardware resource, it can't.

So, the cause is clear: attempting an exclusive access using `ldxr` on device memory. It's a textbook case of bad memory access, triggering that SEA.

The immediate impact is a denial of service – a kernel panic. Is it exploitable? Yes, since it involves unprivileged operations. The reproducer mounts sysfs, which immediately raises a question about whether an unprivileged user can create a user namespace and mount sysfs in there to perform the operation. Initial namespace users can't mount sysfs, so the path is through a user namespace.

I need to confirm whether sysfs can be mounted in a user namespace. Let's see...Yes, sysfs can be mounted in a user namespace. `fs_flags = FS_USERNS_MOUNT` confirms that.

However, can they actually access PCI devices through sysfs in the user namespace? Those device files are typically owned by root, and I'm guessing the user in their namespace is mapped to something else. I'll need to check the permissions of `/sys/bus/pci/devices/.../resourceX`. Usually, resource files are owned by root:root, with permissions like 0600 or 0644. In a user namespace, the user's mapped UID won't match the global root that owns those files. Therefore, the user won't have read/write access. Unless...unless the user is root in the initial namespace, which is unlikely. So, unless I'm missing something, a simple user namespace won't work.

Alright, I'll verify this by checking the ownership and permissions within a newly created user namespace.



7/2 2026/09/08 10:00 tool grepper
0m Args:
map[Expression:FS_USERNS_MOUNT PathPrefix:fs/sysfs/]

Results:
map[Output:fs/sysfs/mount.c=78=static struct file_system_type sysfs_fs_type = {
--
fs/sysfs/mount.c-81-	.kill_sb		= sysfs_kill_sb,
fs/sysfs/mount.c:82:	.fs_flags		= FS_USERNS_MOUNT | FS_USERNS_MOUNT_RESTRICTED,
fs/sysfs/mount.c-83-};
]

8/2 2026/09/08 10:00 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11082
							output: 36
							thoughts: 83
						

Thoughts:
**Delving into Sysfs and User Namespaces**

Okay, so I'm looking at Sysfs and I see this flag, `FS_USERNS_MOUNT | FS_USERNS_MOUNT_RESTRICTED`. The first part is clear, it involves mounting within a user namespace. But, that `FS_USERNS_MOUNT_RESTRICTED` bit… what's the deal with that? What does that *actually* mean in practice?

The immediate implication is the files are still owned by the global root, even if mounted in a user namespace. I need to refresh my understanding of the interactions between ownership and namespaces here.

Right, time to dig deeper. I'll jump into `pci_create_sysfs_dev_files`. Let's see how that function handles this situation. I'm hoping there will be some clue as to how these files are handled in that context. That should help me figure out the implications of that restricted mount.



9/2 2026/09/08 10:00 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:pci_create_sysfs_dev_files PathPrefix:drivers/pci/]

Results:
map[Output:]

10/2 2026/09/08 10:00 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11423
							output: 33
							thoughts: 23
						

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

**Digging into PCI Sysfs for Resource Management**

Okay, so I need to understand how resources are being handled within the PCI subsystem's sysfs interface. My first instinct is to drill down into the code itself. "resource" is a pretty generic term in this context, so I'm betting the core logic will be in the `drivers/pci/pci-sysfs.c` file. It's the logical place to start looking at how the kernel exposes PCI device information through sysfs. I expect to find functions related to reading, writing, and possibly manipulating resource-related attributes that are exposed to userspace. I'll be looking for things like memory region mappings, I/O ports, and interrupt vectors, and how their attributes are presented through sysfs. Let's see what we can find.



11/2 2026/09/08 10:00 tool grepper
0m Args:
map[Expression:resource PathPrefix:drivers/pci/pci-sysfs.c]

Results:
map[Output:drivers/pci/pci-sysfs.c=161=static DEVICE_ATTR_RO(power_state);
drivers/pci/pci-sysfs.c-162-
drivers/pci/pci-sysfs.c:163:/* show resources */
drivers/pci/pci-sysfs.c:164:static ssize_t resource_show(struct device *dev, struct device_attribute *attr,
drivers/pci/pci-sysfs.c-165-			     char *buf)
--
drivers/pci/pci-sysfs.c-169-	int max;
drivers/pci/pci-sysfs.c:170:	resource_size_t start, end;
drivers/pci/pci-sysfs.c-171-	size_t len = 0;
--
drivers/pci/pci-sysfs.c-178-	for (i = 0; i < max; i++) {
drivers/pci/pci-sysfs.c:179:		struct resource *res = pci_resource_n(pci_dev, i);
drivers/pci/pci-sysfs.c:180:		struct resource zerores = {};
drivers/pci/pci-sysfs.c-181-
drivers/pci/pci-sysfs.c-182-		/* For backwards compatibility */
drivers/pci/pci-sysfs.c:183:		if (pci_resource_is_bridge_win(i) &&
drivers/pci/pci-sysfs.c-184-		    res->flags & (IORESOURCE_UNSET | IORESOURCE_DISABLED))
--
drivers/pci/pci-sysfs.c-186-
drivers/pci/pci-sysfs.c:187:		pci_resource_to_user(pci_dev, i, res, &start, &end);
drivers/pci/pci-sysfs.c-188-		len += sysfs_emit_at(buf, len, "0x%016llx 0x%016llx 0x%016llx\n",
--
drivers/pci/pci-sysfs.c-194-}
drivers/pci/pci-sysfs.c:195:static DEVICE_ATTR_RO(resource);
drivers/pci/pci-sysfs.c-196-
--
drivers/pci/pci-sysfs.c=619=static struct attribute *pci_dev_attrs[] = {
drivers/pci/pci-sysfs.c-620-	&dev_attr_power_state.attr,
drivers/pci/pci-sysfs.c:621:	&dev_attr_resource.attr,
drivers/pci/pci-sysfs.c-622-	&dev_attr_vendor.attr,
--
drivers/pci/pci-sysfs.c=676=static ssize_t boot_vga_show(struct device *dev, struct device_attribute *attr,
--
drivers/pci/pci-sysfs.c-685-	return sysfs_emit(buf, "%u\n",
drivers/pci/pci-sysfs.c:686:			  !!(pci_resource_flags(pdev, PCI_ROM_RESOURCE) &
drivers/pci/pci-sysfs.c-687-			     IORESOURCE_ROM_SHADOW));
--
drivers/pci/pci-sysfs.c=782=static ssize_t pci_write_config(struct file *filp, struct kobject *kobj,
--
drivers/pci/pci-sysfs.c-795-
drivers/pci/pci-sysfs.c:796:	if (resource_is_exclusive(&dev->driver_exclusive_resource, off,
drivers/pci/pci-sysfs.c-797-				  count)) {
--
drivers/pci/pci-sysfs.c=869=static const struct attribute_group pci_dev_config_attr_group = {
--
drivers/pci/pci-sysfs.c-875-
drivers/pci/pci-sysfs.c:876:#define pci_legacy_resource_io_attr(_suffix, _size)			     \
drivers/pci/pci-sysfs.c-877-static const struct bin_attribute pci_legacy_io##_suffix##_attr = {	     \
--
drivers/pci/pci-sysfs.c-882-	.f_mapping = iomem_get_mapping,					     \
drivers/pci/pci-sysfs.c:883:	.llseek = pci_llseek_resource_legacy,				     \
drivers/pci/pci-sysfs.c-884-	.mmap = pci_mmap_legacy_io,					     \
--
drivers/pci/pci-sysfs.c-886-
drivers/pci/pci-sysfs.c:887:#define pci_legacy_resource_mem_attr(_suffix, _size)			     \
drivers/pci/pci-sysfs.c-888-static const struct bin_attribute pci_legacy_mem##_suffix##_attr = {	     \
--
drivers/pci/pci-sysfs.c-891-	.f_mapping = iomem_get_mapping,					     \
drivers/pci/pci-sysfs.c:892:	.llseek = pci_llseek_resource_legacy,				     \
drivers/pci/pci-sysfs.c-893-	.mmap = pci_mmap_legacy_mem,					     \
--
drivers/pci/pci-sysfs.c=1069=static umode_t pci_legacy_mem_sparse_is_visible(struct kobject *kobj,
--
drivers/pci/pci-sysfs.c-1075-
drivers/pci/pci-sysfs.c:1076:static loff_t pci_llseek_resource_legacy(struct file *filep,
drivers/pci/pci-sysfs.c-1077-					 struct kobject *kobj __always_unused,
--
drivers/pci/pci-sysfs.c-1083-
drivers/pci/pci-sysfs.c:1084:pci_legacy_resource_io_attr(, PCI_LEGACY_IO_SIZE);
drivers/pci/pci-sysfs.c:1085:pci_legacy_resource_io_attr(_sparse, PCI_LEGACY_IO_SIZE << 5);
drivers/pci/pci-sysfs.c-1086-
drivers/pci/pci-sysfs.c:1087:pci_legacy_resource_mem_attr(, PCI_LEGACY_MEM_SIZE);
drivers/pci/pci-sysfs.c:1088:pci_legacy_resource_mem_attr(_sparse, PCI_LEGACY_MEM_SIZE << 5);
drivers/pci/pci-sysfs.c-1089-
--
drivers/pci/pci-sysfs.c=1132=const struct attribute_group *pcibus_groups[] = {
--
drivers/pci/pci-sysfs.c-1144-/**
drivers/pci/pci-sysfs.c:1145: * pci_mmap_resource - map a PCI resource into user memory space
drivers/pci/pci-sysfs.c-1146- * @kobj: kobject for mapping
--
drivers/pci/pci-sysfs.c-1150- *
drivers/pci/pci-sysfs.c:1151: * Use the regular PCI mapping routines to map a PCI resource into userspace.
drivers/pci/pci-sysfs.c-1152- */
drivers/pci/pci-sysfs.c:1153:static int pci_mmap_resource(struct kobject *kobj, const struct bin_attribute *attr,
drivers/pci/pci-sysfs.c-1154-			     struct vm_area_struct *vma, int write_combine)
--
drivers/pci/pci-sysfs.c-1164-
drivers/pci/pci-sysfs.c:1165:	if (!pci_resource_is_mem(pdev, bar) &&
drivers/pci/pci-sysfs.c:1166:	    !(pci_resource_is_io(pdev, bar) && arch_can_pci_mmap_io()))
drivers/pci/pci-sysfs.c-1167-		return -EIO;
drivers/pci/pci-sysfs.c-1168-
drivers/pci/pci-sysfs.c:1169:	if (pci_resource_is_mem(pdev, bar) &&
drivers/pci/pci-sysfs.c:1170:	    iomem_is_exclusive(pci_resource_start(pdev, bar)))
drivers/pci/pci-sysfs.c-1171-		return -EINVAL;
--
drivers/pci/pci-sysfs.c-1175-
drivers/pci/pci-sysfs.c:1176:	mmap_type = pci_resource_is_mem(pdev, bar) ? pci_mmap_mem : pci_mmap_io;
drivers/pci/pci-sysfs.c-1177-
drivers/pci/pci-sysfs.c:1178:	return pci_mmap_resource_range(pdev, bar, vma, mmap_type, write_combine);
drivers/pci/pci-sysfs.c-1179-}
drivers/pci/pci-sysfs.c-1180-
drivers/pci/pci-sysfs.c:1181:static int pci_mmap_resource_uc(struct file *filp, struct kobject *kobj,
drivers/pci/pci-sysfs.c-1182-				const struct bin_attribute *attr,
--
drivers/pci/pci-sysfs.c-1184-{
drivers/pci/pci-sysfs.c:1185:	return pci_mmap_resource(kobj, attr, vma, 0);
drivers/pci/pci-sysfs.c-1186-}
drivers/pci/pci-sysfs.c-1187-
drivers/pci/pci-sysfs.c:1188:static int pci_mmap_resource_wc(struct file *filp, struct kobject *kobj,
drivers/pci/pci-sysfs.c-1189-				const struct bin_attribute *attr,
--
drivers/pci/pci-sysfs.c-1191-{
drivers/pci/pci-sysfs.c:1192:	return pci_mmap_resource(kobj, attr, vma, 1);
drivers/pci/pci-sysfs.c-1193-}
drivers/pci/pci-sysfs.c-1194-
drivers/pci/pci-sysfs.c:1195:static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj,
drivers/pci/pci-sysfs.c-1196-			       const struct bin_attribute *attr, char *buf,
--
drivers/pci/pci-sysfs.c-1203-
drivers/pci/pci-sysfs.c:1204:	if (!pci_resource_is_io(pdev, bar))
drivers/pci/pci-sysfs.c-1205-		return -EIO;
drivers/pci/pci-sysfs.c-1206-
drivers/pci/pci-sysfs.c:1207:	port += pci_resource_start(pdev, bar);
drivers/pci/pci-sysfs.c-1208-
drivers/pci/pci-sysfs.c:1209:	if (port > pci_resource_end(pdev, bar))
drivers/pci/pci-sysfs.c-1210-		return 0;
drivers/pci/pci-sysfs.c-1211-
drivers/pci/pci-sysfs.c:1212:	if (port + count - 1 > pci_resource_end(pdev, bar))
drivers/pci/pci-sysfs.c-1213-		return -EINVAL;
--
drivers/pci/pci-sysfs.c-1240-
drivers/pci/pci-sysfs.c:1241:static ssize_t pci_read_resource(struct file *filp, struct kobject *kobj,
drivers/pci/pci-sysfs.c-1242-				    const struct bin_attribute *attr, char *buf,
--
drivers/pci/pci-sysfs.c-1244-{
drivers/pci/pci-sysfs.c:1245:	return pci_resource_io(filp, kobj, attr, buf, off, count, false);
drivers/pci/pci-sysfs.c-1246-}
drivers/pci/pci-sysfs.c-1247-
drivers/pci/pci-sysfs.c:1248:static ssize_t pci_write_resource(struct file *filp, struct kobject *kobj,
drivers/pci/pci-sysfs.c-1249-				     const struct bin_attribute *attr, char *buf,
--
drivers/pci/pci-sysfs.c-1257-
drivers/pci/pci-sysfs.c:1258:	return pci_resource_io(filp, kobj, attr, buf, off, count, true);
drivers/pci/pci-sysfs.c-1259-}
drivers/pci/pci-sysfs.c-1260-
drivers/pci/pci-sysfs.c:1261:static loff_t pci_llseek_resource(struct file *filep,
drivers/pci/pci-sysfs.c-1262-				  struct kobject *kobj,
--
drivers/pci/pci-sysfs.c-1269-	return fixed_size_llseek(filep, offset, whence,
drivers/pci/pci-sysfs.c:1270:				 pci_resource_len(pdev, bar));
drivers/pci/pci-sysfs.c-1271-}
--
drivers/pci/pci-sysfs.c-1280-	.f_mapping = iomem_get_mapping,	\
drivers/pci/pci-sysfs.c:1281:	.llseek = pci_llseek_resource,	\
drivers/pci/pci-sysfs.c:1282:	.mmap = pci_mmap_resource_uc,
drivers/pci/pci-sysfs.c-1283-#else
drivers/pci/pci-sysfs.c:1284:static int pci_mmap_resource_io_unsupported(struct file *filp,
drivers/pci/pci-sysfs.c-1285-					    struct kobject *kobj,
--
drivers/pci/pci-sysfs.c-1292-# define __PCI_RESOURCE_IO_MMAP_ATTRS	\
drivers/pci/pci-sysfs.c:1293:	.mmap = pci_mmap_resource_io_unsupported,
drivers/pci/pci-sysfs.c-1294-#endif
drivers/pci/pci-sysfs.c-1295-
drivers/pci/pci-sysfs.c:1296:#define pci_dev_resource_io_attr(_bar)					\
drivers/pci/pci-sysfs.c:1297:static const struct bin_attribute pci_dev_resource##_bar##_io_attr = {	\
drivers/pci/pci-sysfs.c:1298:	.attr = { .name = "resource" __stringify(_bar), .mode = 0600 },	\
drivers/pci/pci-sysfs.c-1299-	.private = (void *)(unsigned long)(_bar),			\
drivers/pci/pci-sysfs.c:1300:	.read = pci_read_resource,					\
drivers/pci/pci-sysfs.c:1301:	.write = pci_write_resource,					\
drivers/pci/pci-sysfs.c-1302-	__PCI_RESOURCE_IO_MMAP_ATTRS					\
--
drivers/pci/pci-sysfs.c-1304-
drivers/pci/pci-sysfs.c:1305:#define pci_dev_resource_uc_attr(_bar)					\
drivers/pci/pci-sysfs.c:1306:static const struct bin_attribute pci_dev_resource##_bar##_uc_attr = {	\
drivers/pci/pci-sysfs.c:1307:	.attr = { .name = "resource" __stringify(_bar), .mode = 0600 },	\
drivers/pci/pci-sysfs.c-1308-	.private = (void *)(unsigned long)(_bar),			\
drivers/pci/pci-sysfs.c-1309-	.f_mapping = iomem_get_mapping,					\
drivers/pci/pci-sysfs.c:1310:	.llseek = pci_llseek_resource,					\
drivers/pci/pci-sysfs.c:1311:	.mmap = pci_mmap_resource_uc,					\
drivers/pci/pci-sysfs.c-1312-}
drivers/pci/pci-sysfs.c-1313-
drivers/pci/pci-sysfs.c:1314:#define pci_dev_resource_wc_attr(_bar)						\
drivers/pci/pci-sysfs.c:1315:static const struct bin_attribute pci_dev_resource##_bar##_wc_attr = {	      \
drivers/pci/pci-sysfs.c:1316:	.attr = { .name = "resource" __stringify(_bar) "_wc", .mode = 0600 }, \
drivers/pci/pci-sysfs.c-1317-	.private = (void *)(unsigned long)(_bar),			      \
drivers/pci/pci-sysfs.c-1318-	.f_mapping = iomem_get_mapping,					      \
drivers/pci/pci-sysfs.c:1319:	.llseek = pci_llseek_resource,					      \
drivers/pci/pci-sysfs.c:1320:	.mmap = pci_mmap_resource_wc,					      \
drivers/pci/pci-sysfs.c-1321-}
--
drivers/pci/pci-sysfs.c=1323=static inline umode_t
drivers/pci/pci-sysfs.c:1324:__pci_resource_attr_is_visible(struct kobject *kobj,
drivers/pci/pci-sysfs.c-1325-			       const struct bin_attribute *a,
--
drivers/pci/pci-sysfs.c-1333-
drivers/pci/pci-sysfs.c:1334:	if (!pci_resource_len(pdev, bar))
drivers/pci/pci-sysfs.c-1335-		return 0;
drivers/pci/pci-sysfs.c-1336-
drivers/pci/pci-sysfs.c:1337:	if ((pci_resource_flags(pdev, bar) & flags) != flags)
drivers/pci/pci-sysfs.c-1338-		return 0;
--
drivers/pci/pci-sysfs.c-1345-
drivers/pci/pci-sysfs.c:1346:static umode_t pci_dev_resource_io_is_visible(struct kobject *kobj,
drivers/pci/pci-sysfs.c-1347-					      const struct bin_attribute *a,
--
drivers/pci/pci-sysfs.c-1349-{
drivers/pci/pci-sysfs.c:1350:	return __pci_resource_attr_is_visible(kobj, a, n, false,
drivers/pci/pci-sysfs.c-1351-					      IORESOURCE_IO);
--
drivers/pci/pci-sysfs.c-1353-
drivers/pci/pci-sysfs.c:1354:static umode_t pci_dev_resource_uc_is_visible(struct kobject *kobj,
drivers/pci/pci-sysfs.c-1355-					      const struct bin_attribute *a,
--
drivers/pci/pci-sysfs.c-1357-{
drivers/pci/pci-sysfs.c:1358:	return __pci_resource_attr_is_visible(kobj, a, n, false,
drivers/pci/pci-sysfs.c-1359-					      IORESOURCE_MEM);
--
drivers/pci/pci-sysfs.c-1361-
drivers/pci/pci-sysfs.c:1362:static umode_t pci_dev_resource_wc_is_visible(struct kobject *kobj,
drivers/pci/pci-sysfs.c-1363-					      const struct bin_attribute *a,
--
drivers/pci/pci-sysfs.c-1365-{
drivers/pci/pci-sysfs.c:1366:	return __pci_resource_attr_is_visible(kobj, a, n, true,
drivers/pci/pci-sysfs.c-1367-					      IORESOURCE_MEM | IORESOURCE_PREFETCH);
--
drivers/pci/pci-sysfs.c-1369-
drivers/pci/pci-sysfs.c:1370:static size_t pci_dev_resource_bin_size(struct kobject *kobj,
drivers/pci/pci-sysfs.c-1371-					const struct bin_attribute *a,
--
drivers/pci/pci-sysfs.c-1375-
drivers/pci/pci-sysfs.c:1376:	return pci_resource_len(pdev, n);
drivers/pci/pci-sysfs.c-1377-}
drivers/pci/pci-sysfs.c-1378-
drivers/pci/pci-sysfs.c:1379:pci_dev_resource_io_attr(0);
drivers/pci/pci-sysfs.c:1380:pci_dev_resource_io_attr(1);
drivers/pci/pci-sysfs.c:1381:pci_dev_resource_io_attr(2);
drivers/pci/pci-sysfs.c:1382:pci_dev_resource_io_attr(3);
drivers/pci/pci-sysfs.c:1383:pci_dev_resource_io_attr(4);
drivers/pci/pci-sysfs.c:1384:pci_dev_resource_io_attr(5);
drivers/pci/pci-sysfs.c-1385-
drivers/pci/pci-sysfs.c:1386:pci_dev_resource_uc_attr(0);
drivers/pci/pci-sysfs.c:1387:pci_dev_resource_uc_attr(1);
drivers/pci/pci-sysfs.c:1388:pci_dev_resource_uc_attr(2);
drivers/pci/pci-sysfs.c:1389:pci_dev_resource_uc_attr(3);
drivers/pci/pci-sysfs.c:1390:pci_dev_resource_uc_attr(4);
drivers/pci/pci-sysfs.c:1391:pci_dev_resource_uc_attr(5);
drivers/pci/pci-sysfs.c-1392-
drivers/pci/pci-sysfs.c:1393:pci_dev_resource_wc_attr(0);
drivers/pci/pci-sysfs.c:1394:pci_dev_resource_wc_attr(1);
drivers/pci/pci-sysfs.c:1395:pci_dev_resource_wc_attr(2);
drivers/pci/pci-sysfs.c:1396:pci_dev_resource_wc_attr(3);
drivers/pci/pci-sysfs.c:1397:pci_dev_resource_wc_attr(4);
drivers/pci/pci-sysfs.c:1398:pci_dev_resource_wc_attr(5);
drivers/pci/pci-sysfs.c-1399-
drivers/pci/pci-sysfs.c:1400:static const struct bin_attribute *const pci_dev_resource_io_attrs[] = {
drivers/pci/pci-sysfs.c:1401:	&pci_dev_resource0_io_attr,
drivers/pci/pci-sysfs.c:1402:	&pci_dev_resource1_io_attr,
drivers/pci/pci-sysfs.c:1403:	&pci_dev_resource2_io_attr,
drivers/pci/pci-sysfs.c:1404:	&pci_dev_resource3_io_attr,
drivers/pci/pci-sysfs.c:1405:	&pci_dev_resource4_io_attr,
drivers/pci/pci-sysfs.c:1406:	&pci_dev_resource5_io_attr,
drivers/pci/pci-sysfs.c-1407-	NULL,
--
drivers/pci/pci-sysfs.c-1409-
drivers/pci/pci-sysfs.c:1410:static const struct bin_attribute *const pci_dev_resource_uc_attrs[] = {
drivers/pci/pci-sysfs.c:1411:	&pci_dev_resource0_uc_attr,
drivers/pci/pci-sysfs.c:1412:	&pci_dev_resource1_uc_attr,
drivers/pci/pci-sysfs.c:1413:	&pci_dev_resource2_uc_attr,
drivers/pci/pci-sysfs.c:1414:	&pci_dev_resource3_uc_attr,
drivers/pci/pci-sysfs.c:1415:	&pci_dev_resource4_uc_attr,
drivers/pci/pci-sysfs.c:1416:	&pci_dev_resource5_uc_attr,
drivers/pci/pci-sysfs.c-1417-	NULL,
--
drivers/pci/pci-sysfs.c-1419-
drivers/pci/pci-sysfs.c:1420:static const struct bin_attribute *const pci_dev_resource_wc_attrs[] = {
drivers/pci/pci-sysfs.c:1421:	&pci_dev_resource0_wc_attr,
drivers/pci/pci-sysfs.c:1422:	&pci_dev_resource1_wc_attr,
drivers/pci/pci-sysfs.c:1423:	&pci_dev_resource2_wc_attr,
drivers/pci/pci-sysfs.c:1424:	&pci_dev_resource3_wc_attr,
drivers/pci/pci-sysfs.c:1425:	&pci_dev_resource4_wc_attr,
drivers/pci/pci-sysfs.c:1426:	&pci_dev_resource5_wc_attr,
drivers/pci/pci-sysfs.c-1427-	NULL,
--
drivers/pci/pci-sysfs.c-1429-
drivers/pci/pci-sysfs.c:1430:static const struct attribute_group pci_dev_resource_io_attr_group = {
drivers/pci/pci-sysfs.c:1431:	.bin_attrs = pci_dev_resource_io_attrs,
drivers/pci/pci-sysfs.c:1432:	.is_bin_visible = pci_dev_resource_io_is_visible,
drivers/pci/pci-sysfs.c:1433:	.bin_size = pci_dev_resource_bin_size,
drivers/pci/pci-sysfs.c-1434-};
drivers/pci/pci-sysfs.c-1435-
drivers/pci/pci-sysfs.c:1436:static const struct attribute_group pci_dev_resource_uc_attr_group = {
drivers/pci/pci-sysfs.c:1437:	.bin_attrs = pci_dev_resource_uc_attrs,
drivers/pci/pci-sysfs.c:1438:	.is_bin_visible = pci_dev_resource_uc_is_visible,
drivers/pci/pci-sysfs.c:1439:	.bin_size = pci_dev_resource_bin_size,
drivers/pci/pci-sysfs.c-1440-};
drivers/pci/pci-sysfs.c-1441-
drivers/pci/pci-sysfs.c:1442:static const struct attribute_group pci_dev_resource_wc_attr_group = {
drivers/pci/pci-sysfs.c:1443:	.bin_attrs = pci_dev_resource_wc_attrs,
drivers/pci/pci-sysfs.c:1444:	.is_bin_visible = pci_dev_resource_wc_is_visible,
drivers/pci/pci-sysfs.c:1445:	.bin_size = pci_dev_resource_bin_size,
drivers/pci/pci-sysfs.c-1446-};
drivers/pci/pci-sysfs.c-1447-
drivers/pci/pci-sysfs.c:1448:static const struct attribute_group *pci_dev_resource_attr_groups[] = {
drivers/pci/pci-sysfs.c:1449:	&pci_dev_resource_io_attr_group,
drivers/pci/pci-sysfs.c:1450:	&pci_dev_resource_uc_attr_group,
drivers/pci/pci-sysfs.c:1451:	&pci_dev_resource_wc_attr_group,
drivers/pci/pci-sysfs.c-1452-	NULL,
--
drivers/pci/pci-sysfs.c-1454-#else
drivers/pci/pci-sysfs.c:1455:#define pci_dev_resource_attr_groups NULL
drivers/pci/pci-sysfs.c-1456-#endif
--
drivers/pci/pci-sysfs.c=1530=static umode_t pci_dev_rom_attr_is_visible(struct kobject *kobj,
--
drivers/pci/pci-sysfs.c-1535-	/* If the device has a ROM, try to expose it in sysfs. */
drivers/pci/pci-sysfs.c:1536:	if (!pci_resource_end(pdev, PCI_ROM_RESOURCE))
drivers/pci/pci-sysfs.c-1537-		return 0;
--
drivers/pci/pci-sysfs.c=1542=static size_t pci_dev_rom_attr_bin_size(struct kobject *kobj,
--
drivers/pci/pci-sysfs.c-1546-
drivers/pci/pci-sysfs.c:1547:	return pci_resource_len(pdev, PCI_ROM_RESOURCE);
drivers/pci/pci-sysfs.c-1548-}
--
drivers/pci/pci-sysfs.c=1706=static const struct attribute_group pci_dev_reset_method_attr_group = {
--
drivers/pci/pci-sysfs.c-1711-#if defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE)
drivers/pci/pci-sysfs.c:1712:static ssize_t __resource_resize_show(struct device *dev, int n, char *buf)
drivers/pci/pci-sysfs.c-1713-{
--
drivers/pci/pci-sysfs.c-1726-
drivers/pci/pci-sysfs.c:1727:static ssize_t __resource_resize_store(struct device *dev, int n,
drivers/pci/pci-sysfs.c-1728-				       const char *buf, size_t count)
--
drivers/pci/pci-sysfs.c-1751-		ret = aperture_remove_conflicting_pci_devices(pdev,
drivers/pci/pci-sysfs.c:1752:						"resourceN_resize");
drivers/pci/pci-sysfs.c-1753-		if (ret)
--
drivers/pci/pci-sysfs.c-1760-
drivers/pci/pci-sysfs.c:1761:	sysfs_remove_groups(&pdev->dev.kobj, pci_dev_resource_attr_groups);
drivers/pci/pci-sysfs.c-1762-
drivers/pci/pci-sysfs.c:1763:	ret = pci_resize_resource(pdev, n, size, 0);
drivers/pci/pci-sysfs.c-1764-	if (ret)
--
drivers/pci/pci-sysfs.c-1767-
drivers/pci/pci-sysfs.c:1768:	pci_assign_unassigned_bus_resources(bus);
drivers/pci/pci-sysfs.c-1769-
drivers/pci/pci-sysfs.c:1770:	if (sysfs_create_groups(&pdev->dev.kobj, pci_dev_resource_attr_groups))
drivers/pci/pci-sysfs.c:1771:		pci_warn(pdev, "Failed to recreate resource groups after BAR resizing\n");
drivers/pci/pci-sysfs.c-1772-
--
drivers/pci/pci-sysfs.c-1781-
drivers/pci/pci-sysfs.c:1782:#define pci_dev_resource_resize_attr(n)					\
drivers/pci/pci-sysfs.c:1783:static ssize_t resource##n##_resize_show(struct device *dev,		\
drivers/pci/pci-sysfs.c-1784-					 struct device_attribute *attr,	\
--
drivers/pci/pci-sysfs.c-1786-{									\
drivers/pci/pci-sysfs.c:1787:	return __resource_resize_show(dev, n, buf);			\
drivers/pci/pci-sysfs.c-1788-}									\
drivers/pci/pci-sysfs.c:1789:static ssize_t resource##n##_resize_store(struct device *dev,		\
drivers/pci/pci-sysfs.c-1790-					  struct device_attribute *attr,\
--
drivers/pci/pci-sysfs.c-1792-{									\
drivers/pci/pci-sysfs.c:1793:	return __resource_resize_store(dev, n, buf, count);		\
drivers/pci/pci-sysfs.c-1794-}									\
drivers/pci/pci-sysfs.c:1795:static DEVICE_ATTR_RW(resource##n##_resize)
drivers/pci/pci-sysfs.c-1796-
drivers/pci/pci-sysfs.c:1797:pci_dev_resource_resize_attr(0);
drivers/pci/pci-sysfs.c:1798:pci_dev_resource_resize_attr(1);
drivers/pci/pci-sysfs.c:1799:pci_dev_resource_resize_attr(2);
drivers/pci/pci-sysfs.c:1800:pci_dev_resource_resize_attr(3);
drivers/pci/pci-sysfs.c:1801:pci_dev_resource_resize_attr(4);
drivers/pci/pci-sysfs.c:1802:pci_dev_resource_resize_attr(5);
drivers/pci/pci-sysfs.c-1803-
drivers/pci/pci-sysfs.c:1804:static struct attribute *resource_resize_attrs[] = {
drivers/pci/pci-sysfs.c:1805:	&dev_attr_resource0_resize.attr,
drivers/pci/pci-sysfs.c:1806:	&dev_attr_resource1_resize.attr,
drivers/pci/pci-sysfs.c:1807:	&dev_attr_resource2_resize.attr,
drivers/pci/pci-sysfs.c:1808:	&dev_attr_resource3_resize.attr,
drivers/pci/pci-sysfs.c:1809:	&dev_attr_resource4_resize.attr,
drivers/pci/pci-sysfs.c:1810:	&dev_attr_resource5_resize.attr,
drivers/pci/pci-sysfs.c-1811-	NULL,
--
drivers/pci/pci-sysfs.c-1813-
drivers/pci/pci-sysfs.c:1814:static umode_t resource_resize_attr_is_visible(struct kobject *kobj,
drivers/pci/pci-sysfs.c-1815-					  struct attribute *a, int n)
--
drivers/pci/pci-sysfs.c-1821-
drivers/pci/pci-sysfs.c:1822:static const struct attribute_group pci_dev_resource_resize_attr_group = {
drivers/pci/pci-sysfs.c:1823:	.attrs = resource_resize_attrs,
drivers/pci/pci-sysfs.c:1824:	.is_visible = resource_resize_attr_is_visible,
drivers/pci/pci-sysfs.c-1825-};
--
drivers/pci/pci-sysfs.c=1895=const struct attribute_group *pci_dev_groups[] = {
--
drivers/pci/pci-sysfs.c-1897-#if defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE)
drivers/pci/pci-sysfs.c:1898:	&pci_dev_resource_io_attr_group,
drivers/pci/pci-sysfs.c:1899:	&pci_dev_resource_uc_attr_group,
drivers/pci/pci-sysfs.c:1900:	&pci_dev_resource_wc_attr_group,
drivers/pci/pci-sysfs.c:1901:	&pci_dev_resource_resize_attr_group,
drivers/pci/pci-sysfs.c-1902-#endif
]

12/2 2026/09/08 10:00 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22167
							output: 86
							thoughts: 755
						

Thoughts:
**Analyzing Sysfs Permissions in User Namespaces**

Okay, so I'm looking at these resource files created for PCI devices. They're set to mode 0600, which means root:root ownership and read/write for root only. That's straightforward enough.

The interesting part is what happens when you mount sysfs in a user namespace. If an unprivileged user does this, the files end up owned by the *global* root, which, within the user namespace, maps to something like "nobody" or `overflowuid`. And because of the 0600 permissions, the user inside the namespace *shouldn't* have access.

Wait, that doesn't seem right. Are there any holes in this? Can an unprivileged user even *open* `/sys/bus/pci/devices/.../resource0`? The answer seems to be no, standard Unix permissions should apply. The user namespace root isn't the same as the global root, so no DAC override.

But then there's this reproducer... it's using `syzkaller`, which runs as root *inside* a user namespace (using `unshare`). Okay, so *syzkaller* creates a user namespace, but maps its UID to 0 *inside* that namespace while the global UID remains unprivileged. So the question is, if syzkaller maps its UID to 0, does it gain access to these sysfs files?

Right, how *does* sysfs handle ownership? It seems like sysfs files are owned by the *global* root, UID 0. When sysfs is mounted in a user namespace, the files are still owned by that global root, which is likely mapped to `overflowuid` (65534). So now, the files look as though they're owned by 65534:65534.

Even though the user inside the namespace is UID 0 (that is, the syzkaller process), this UID 0 actually maps to the unprivileged user's global UID. Since the file is owned by 65534, my CAP_DAC_OVERRIDE *shouldn't* grant access to it. The important point is that this CAP_DAC_OVERRIDE only applies to files whose UIDs are mapped in the user namespace!

Actually, it's very important to note that the CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH *do not* grant access to a file whose UID is not mapped in the user namespace! Okay, let me verify that.



13/2 2026/09/08 10:00 tool codeexpert
2m Args:
map[Question:If an unprivileged user creates a user namespace, maps their UID to 0, and mounts sysfs, can they open a sysfs file that has mode 0600 and is owned by the global root? Does CAP_DAC_OVERRIDE in the user namespace allow opening files owned by unmapped UIDs (like the global root)?]

Results:
map[Answer:**No**, an unprivileged user cannot open a sysfs file that has mode `0600` and is owned by the global root, and **no**, `CAP_DAC_OVERRIDE` in a user namespace does **not** allow opening files owned by unmapped UIDs (such as the global root).

---

### Detailed Explanation

#### 1. Identity and Mapping
* When an unprivileged user (e.g., host UID `1000`) creates a new user namespace and maps their UID to `0` inside the namespace (`0 1000 1`), the process's kernel UID (`kuid`) remains `1000` (`current_fsuid()` is `kuid 1000`).
* Global root (`GLOBAL_ROOT_UID` / `kuid 0`) is **not mapped** into this user namespace. Therefore, `from_kuid(ns, GLOBAL_ROOT_UID)` returns `(uid_t)-1` (`INVALID_UID`).
* Sysfs inodes are created with `inode->i_uid = GLOBAL_ROOT_UID` (`0`) and `inode->i_gid = GLOBAL_ROOT_GID` (`0`) (see `fs/kernfs/inode.c:__kernfs_iattrs` / `fs/inode.c:inode_init_always_gfp`).

#### 2. Standard DAC Checks Fail
When trying to open the file (`fs/kernfs/inode.c:kernfs_iop_permission` -> `fs/namei.c:generic_permission` -> `acl_permission_check`):
* `acl_permission_check()` compares the inode's owner `inode->i_uid` (`kuid 0`) with `current_fsuid()` (`kuid 1000`). They do not match, so the process is not treated as the owner.
* The file mode is `0600` (`-rw-------`), meaning group and other permission bits are `0`.
* `acl_permission_check()` therefore returns `-EACCES`.

#### 3. Capability DAC Override Check Fails
When standard DAC permission checks fail, `generic_permission()` attempts to override DAC checks using capabilities via `capable_wrt_inode_uidgid(idmap, inode, CAP_DAC_OVERRIDE)`:

```c
// kernel/capability.c
bool capable_wrt_inode_uidgid(struct mnt_idmap *idmap,
                              const struct inode *inode, int cap)
{
    struct user_namespace *ns = current_user_ns();

    return ns_capable(ns, cap) &&
           privileged_wrt_inode_uidgid(ns, idmap, inode);
}

bool privileged_wrt_inode_uidgid(struct user_namespace *ns,
                                 struct mnt_idmap *idmap,
                                 const struct inode *inode)
{
    return vfsuid_has_mapping(ns, i_uid_into_vfsuid(idmap, inode)) &&
           vfsgid_has_mapping(ns, i_gid_into_vfsgid(idmap, inode));
}
```

* While the process has capabilities such as `CAP_DAC_OVERRIDE` in its own user namespace (`ns_capable(ns, CAP_DAC_OVERRIDE)` is `true`), `privileged_wrt_inode_uidgid()` verifies that both the inode's UID and GID are mapped in that user namespace.
* `vfsuid_has_mapping()` calls `from_kuid(ns, AS_KUIDT(vfsuid)) != (uid_t)-1`.
* Because `GLOBAL_ROOT_UID` (`kuid 0`) is not mapped into the user namespace, `from_kuid()` returns `(uid_t)-1`.
* Consequently, `privileged_wrt_inode_uidgid()` returns `false`, causing `capable_wrt_inode_uidgid()` to return `false`.

The DAC override check fails, and the `open` system call fails with `-EACCES` (Permission denied).]

14/3 2026/09/08 10:00 agent codeexpert
2m Model:
core

Results:
map[Answer:**No**, an unprivileged user cannot open a sysfs file that has mode `0600` and is owned by the global root, and **no**, `CAP_DAC_OVERRIDE` in a user namespace does **not** allow opening files owned by unmapped UIDs (such as the global root).

---

### Detailed Explanation

#### 1. Identity and Mapping
* When an unprivileged user (e.g., host UID `1000`) creates a new user namespace and maps their UID to `0` inside the namespace (`0 1000 1`), the process's kernel UID (`kuid`) remains `1000` (`current_fsuid()` is `kuid 1000`).
* Global root (`GLOBAL_ROOT_UID` / `kuid 0`) is **not mapped** into this user namespace. Therefore, `from_kuid(ns, GLOBAL_ROOT_UID)` returns `(uid_t)-1` (`INVALID_UID`).
* Sysfs inodes are created with `inode->i_uid = GLOBAL_ROOT_UID` (`0`) and `inode->i_gid = GLOBAL_ROOT_GID` (`0`) (see `fs/kernfs/inode.c:__kernfs_iattrs` / `fs/inode.c:inode_init_always_gfp`).

#### 2. Standard DAC Checks Fail
When trying to open the file (`fs/kernfs/inode.c:kernfs_iop_permission` -> `fs/namei.c:generic_permission` -> `acl_permission_check`):
* `acl_permission_check()` compares the inode's owner `inode->i_uid` (`kuid 0`) with `current_fsuid()` (`kuid 1000`). They do not match, so the process is not treated as the owner.
* The file mode is `0600` (`-rw-------`), meaning group and other permission bits are `0`.
* `acl_permission_check()` therefore returns `-EACCES`.

#### 3. Capability DAC Override Check Fails
When standard DAC permission checks fail, `generic_permission()` attempts to override DAC checks using capabilities via `capable_wrt_inode_uidgid(idmap, inode, CAP_DAC_OVERRIDE)`:

```c
// kernel/capability.c
bool capable_wrt_inode_uidgid(struct mnt_idmap *idmap,
                              const struct inode *inode, int cap)
{
    struct user_namespace *ns = current_user_ns();

    return ns_capable(ns, cap) &&
           privileged_wrt_inode_uidgid(ns, idmap, inode);
}

bool privileged_wrt_inode_uidgid(struct user_namespace *ns,
                                 struct mnt_idmap *idmap,
                                 const struct inode *inode)
{
    return vfsuid_has_mapping(ns, i_uid_into_vfsuid(idmap, inode)) &&
           vfsgid_has_mapping(ns, i_gid_into_vfsgid(idmap, inode));
}
```

* While the process has capabilities such as `CAP_DAC_OVERRIDE` in its own user namespace (`ns_capable(ns, CAP_DAC_OVERRIDE)` is `true`), `privileged_wrt_inode_uidgid()` verifies that both the inode's UID and GID are mapped in that user namespace.
* `vfsuid_has_mapping()` calls `from_kuid(ns, AS_KUIDT(vfsuid)) != (uid_t)-1`.
* Because `GLOBAL_ROOT_UID` (`kuid 0`) is not mapped into the user namespace, `from_kuid()` returns `(uid_t)-1`.
* Consequently, `privileged_wrt_inode_uidgid()` returns `false`, causing `capable_wrt_inode_uidgid()` to return `false`.

The DAC override check fails, and the `open` system call fails with `-EACCES` (Permission denied).]

Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Use tools extensively while researching the question. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code.
Use all available sources of information:
 - kernel source code
 - documentation in the Documentation dir in the source tree
 - git commits descriptions, git blame

Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.

Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
   or codesearch-struct-layout FIRST to retrieve clean, exact definitions
   without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
   disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
   non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.
Do NOT use git-log to search for the presence or existence of files in the
repository. git-log is only for tracing commit history of files that are
already present in the current checkout. If a file does not exist in the
current checkout, it cannot be used for reproduction.

Avoid running broad git-log queries (such as searches on the entire repo)
without a specific 'PathPrefix' to restrict the scope, as these are very
expensive and will time out.
If a git-log tool call times out, do not retry the query with the same broad
scope. You must specify a tighter, narrower 'PathPrefix' for subsequent queries.

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:
If an unprivileged user creates a user namespace, maps their UID to 0, and mounts sysfs, can they open a sysfs file that has mode 0600 and is owned by the global root? Does CAP_DAC_OVERRIDE in the user namespace allow opening files owned by unmapped UIDs (like the global root)?

15/4 2026/09/08 10:00 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 4029
							output: 101
							thoughts: 259
						

Thoughts:
**My Analysis of User Namespace File Permissions**

Okay, so I've been presented with a fascinating permission conundrum involving user namespaces, sysfs, and `CAP_DAC_OVERRIDE`. The user wants to know: can an unprivileged user, playing with user namespaces and UID mapping, potentially bypass file permissions to access a privileged sysfs file (0600, owned by the global root)? Two related questions are: can they use their UID mapping to act as root in the namespace, and does `CAP_DAC_OVERRIDE` have any influence here in the case of unmapped UIDs?

My immediate instinct is to dive deep into the kernel code. This requires a systematic approach. First, I need to thoroughly understand how sysfs files acquire their UID/GID and inode permissions. This means understanding exactly how sysfs mounting works within the context of user namespaces. Next, I need to understand how the kernel implements inode permission checking in general – `generic_permission`, `inode_permission`, `acl_permission_check` - and *critically*, how all of these pieces interact with `CAP_DAC_OVERRIDE`, user namespaces, `capable_wrt_inode_uidgid`, and `ns_capable`. I need to figure out where the check happens, and if the check is affected by unmapped UIDs.

I'll start my code search with key functions and concepts. I need to find where sysfs inodes are initialized and have their permissions set. I'll search for `sysfs_init_inode`, `kernfs_refresh_inode`, `kernfs_iop_permission`, and related functions that might be involved in inode creation and permission setting. I'll also focus on the core permission checks themselves: `generic_permission`, `inode_permission`, and any specific DAC permission checks used in sysfs. My goal is to map the entire permissions chain, to see where the user namespace and `CAP_DAC_OVERRIDE` have their effect. To do this, I'll use `grepper` or `codesearch`, which should allow me to efficiently find the relevant code paths.



16/4 2026/09/08 10:01 tool grepper
0m Args:
map[Expression:generic_permission PathPrefix:fs/]

Results:
map[Output:fs/autofs/root.c=555=static int autofs_dir_permission(struct mnt_idmap *idmap,
--
fs/autofs/root.c-571-
fs/autofs/root.c:572:	return generic_permission(idmap, inode, mask);
fs/autofs/root.c-573-}
--
fs/btrfs/inode.c=9378=static int btrfs_permission(struct mnt_idmap *idmap,
--
fs/btrfs/inode.c-9390-	}
fs/btrfs/inode.c:9391:	return generic_permission(idmap, inode, mask);
fs/btrfs/inode.c-9392-}
--
fs/ceph/inode.c=3101=int ceph_permission(struct mnt_idmap *idmap, struct inode *inode,
--
fs/ceph/inode.c-3111-	if (!err)
fs/ceph/inode.c:3112:		err = generic_permission(idmap, inode, mask);
fs/ceph/inode.c-3113-	return err;
--
fs/fuse/dir.c=1765=static int fuse_permission(struct mnt_idmap *idmap,
--
fs/fuse/dir.c-1796-	if (fc->default_permissions) {
fs/fuse/dir.c:1797:		err = generic_permission(idmap, inode, mask);
fs/fuse/dir.c-1798-
--
fs/fuse/dir.c-1804-			if (!err)
fs/fuse/dir.c:1805:				err = generic_permission(idmap,
fs/fuse/dir.c-1806-							 inode, mask);
--
fs/gfs2/inode.c=1966=int gfs2_permission(struct mnt_idmap *idmap, struct inode *inode,
--
fs/gfs2/inode.c-1993-	else
fs/gfs2/inode.c:1994:		error = generic_permission(&nop_mnt_idmap, inode, mask);
fs/gfs2/inode.c-1995-	if (gfs2_holder_initialized(&i_gh))
--
fs/hostfs/hostfs_kern.c=777=static int hostfs_permission(struct mnt_idmap *idmap,
--
fs/hostfs/hostfs_kern.c-799-	if (!err)
fs/hostfs/hostfs_kern.c:800:		err = generic_permission(&nop_mnt_idmap, ino, desired);
fs/hostfs/hostfs_kern.c-801-	return err;
--
fs/kernfs/inode.c=275=int kernfs_iop_permission(struct mnt_idmap *idmap,
--
fs/kernfs/inode.c-289-	kernfs_refresh_inode(kn, inode);
fs/kernfs/inode.c:290:	ret = generic_permission(&nop_mnt_idmap, inode, mask);
fs/kernfs/inode.c-291-	up_read(&root->kernfs_iattr_rwsem);
--
fs/namei.c=438=static int acl_permission_check(struct mnt_idmap *idmap,
--
fs/namei.c-499-/**
fs/namei.c:500: * generic_permission -  check for access rights on a Posix-like filesystem
fs/namei.c-501- * @idmap:	idmap of the mount the inode was found from
--
fs/namei.c-510- *
fs/namei.c:511: * generic_permission is rcu-walk aware. It returns -ECHILD in case an rcu-walk
fs/namei.c-512- * request cannot be satisfied (eg. requires blocking or too much complexity).
--
fs/namei.c-520- */
fs/namei.c:521:int generic_permission(struct mnt_idmap *idmap, struct inode *inode,
fs/namei.c-522-		       int mask)
--
fs/namei.c-564-}
fs/namei.c:565:EXPORT_SYMBOL(generic_permission);
fs/namei.c-566-
--
fs/namei.c-572- *
fs/namei.c:573: * We _really_ want to just do "generic_permission()" without
fs/namei.c-574- * even looking at the inode->i_op values. So we keep a cache
--
fs/namei.c=578=static inline int do_inode_permission(struct mnt_idmap *idmap,
--
fs/namei.c-589-	}
fs/namei.c:590:	return generic_permission(idmap, inode, mask);
fs/namei.c-591-}
--
fs/nfs/dir.c=3396=int nfs_permission(struct mnt_idmap *idmap,
--
fs/nfs/dir.c-3446-	if (res == 0)
fs/nfs/dir.c:3447:		res = generic_permission(&nop_mnt_idmap, inode, mask);
fs/nfs/dir.c-3448-	goto out;
--
fs/nilfs2/inode.c=946=int nilfs_permission(struct mnt_idmap *idmap, struct inode *inode,
--
fs/nilfs2/inode.c-954-
fs/nilfs2/inode.c:955:	return generic_permission(&nop_mnt_idmap, inode, mask);
fs/nilfs2/inode.c-956-}
--
fs/ocfs2/file.c=1352=int ocfs2_permission(struct mnt_idmap *idmap, struct inode *inode,
--
fs/ocfs2/file.c-1377-
fs/ocfs2/file.c:1378:	ret = generic_permission(&nop_mnt_idmap, inode, mask);
fs/ocfs2/file.c-1379-
--
fs/orangefs/inode.c=875=int orangefs_permission(struct mnt_idmap *idmap,
--
fs/orangefs/inode.c-889-
fs/orangefs/inode.c:890:	return generic_permission(&nop_mnt_idmap, inode, mask);
fs/orangefs/inode.c-891-}
--
fs/overlayfs/inode.c=306=int ovl_permission(struct mnt_idmap *idmap,
--
fs/overlayfs/inode.c-324-	 */
fs/overlayfs/inode.c:325:	err = generic_permission(idmap, inode, mask);
fs/overlayfs/inode.c-326-	if (err)
--
fs/proc/base.c=746=static int proc_pid_permission(struct mnt_idmap *idmap,
--
fs/proc/base.c-771-	}
fs/proc/base.c:772:	return generic_permission(&nop_mnt_idmap, inode, mask);
fs/proc/base.c-773-}
--
fs/proc/base.c=3610=static int proc_tid_comm_permission(struct mnt_idmap *idmap,
--
fs/proc/base.c-3629-
fs/proc/base.c:3630:	return generic_permission(&nop_mnt_idmap, inode, mask);
fs/proc/base.c-3631-}
--
fs/proc/fd.c=85=static int proc_fdinfo_permission(struct mnt_idmap *idmap, struct inode *inode,
--
fs/proc/fd.c-99-
fs/proc/fd.c:100:	return generic_permission(idmap, inode, mask);
fs/proc/fd.c-101-}
--
fs/proc/fd.c=326=int proc_fd_permission(struct mnt_idmap *idmap,
--
fs/proc/fd.c-331-
fs/proc/fd.c:332:	rv = generic_permission(&nop_mnt_idmap, inode, mask);
fs/proc/fd.c-333-	if (rv == 0)
--
fs/smb/client/cifsfs.c=405=static int cifs_permission(struct mnt_idmap *idmap,
--
fs/smb/client/cifsfs.c-418-		so allowing client to check permissions is useful */
fs/smb/client/cifsfs.c:419:		return generic_permission(&nop_mnt_idmap, inode, mask);
fs/smb/client/cifsfs.c-420-}
--
fs/tracefs/inode.c=192=static int tracefs_permission(struct mnt_idmap *idmap,
--
fs/tracefs/inode.c-195-	set_tracefs_inode_owner(inode);
fs/tracefs/inode.c:196:	return generic_permission(idmap, inode, mask);
fs/tracefs/inode.c-197-}
]

17/4 2026/09/08 10:01 tool grepper
0m Args:
map[Expression:sysfs_init_inode|kernfs_init_inode|kernfs_iop_permission|sysfs_permission PathPrefix:fs/]

Results:
map[Output:fs/kernfs/dir.c=1360=const struct inode_operations kernfs_dir_iops = {
fs/kernfs/dir.c-1361-	.lookup		= kernfs_iop_lookup,
fs/kernfs/dir.c:1362:	.permission	= kernfs_iop_permission,
fs/kernfs/dir.c-1363-	.setattr	= kernfs_iop_setattr,
--
fs/kernfs/inode.c=20=static const struct inode_operations kernfs_iops = {
fs/kernfs/inode.c:21:	.permission	= kernfs_iop_permission,
fs/kernfs/inode.c-22-	.setattr	= kernfs_iop_setattr,
--
fs/kernfs/inode.c=184=int kernfs_iop_getattr(struct mnt_idmap *idmap,
--
fs/kernfs/inode.c-199-
fs/kernfs/inode.c:200:static void kernfs_init_inode(struct kernfs_node *kn, struct inode *inode)
fs/kernfs/inode.c-201-{
--
fs/kernfs/inode.c=248=struct inode *kernfs_get_inode(struct super_block *sb, struct kernfs_node *kn)
--
fs/kernfs/inode.c-253-	if (inode && (inode_state_read_once(inode) & I_NEW))
fs/kernfs/inode.c:254:		kernfs_init_inode(kn, inode);
fs/kernfs/inode.c-255-
--
fs/kernfs/inode.c=266=void kernfs_evict_inode(struct inode *inode)
--
fs/kernfs/inode.c-274-
fs/kernfs/inode.c:275:int kernfs_iop_permission(struct mnt_idmap *idmap,
fs/kernfs/inode.c-276-			  struct inode *inode, int mask)
--
fs/kernfs/kernfs-internal.h=173=void kernfs_evict_inode(struct inode *inode);
fs/kernfs/kernfs-internal.h:174:int kernfs_iop_permission(struct mnt_idmap *idmap,
fs/kernfs/kernfs-internal.h-175-			  struct inode *inode, int mask);
--
fs/kernfs/symlink.c=149=const struct inode_operations kernfs_symlink_iops = {
--
fs/kernfs/symlink.c-153-	.getattr	= kernfs_iop_getattr,
fs/kernfs/symlink.c:154:	.permission	= kernfs_iop_permission,
fs/kernfs/symlink.c-155-};
]

18/4 2026/09/08 10:01 tool grepper
0m Args:
map[Expression:CAP_DAC_OVERRIDE PathPrefix:fs/]

Results:
map[Output:fs/namei.c=521=int generic_permission(struct mnt_idmap *idmap, struct inode *inode,
--
fs/namei.c-539-		if (capable_wrt_inode_uidgid(idmap, inode,
fs/namei.c:540:					     CAP_DAC_OVERRIDE))
fs/namei.c-541-			return 0;
--
fs/namei.c-559-		if (capable_wrt_inode_uidgid(idmap, inode,
fs/namei.c:560:					     CAP_DAC_OVERRIDE))
fs/namei.c-561-			return 0;
--
fs/namei.c=1254=fs_initcall(init_fs_namei_sysctls);
--
fs/namei.c-1263- * In the case of the sysctl_protected_symlinks sysctl being enabled,
fs/namei.c:1264: * CAP_DAC_OVERRIDE needs to be specifically ignored if the symlink is
fs/namei.c-1265- * in a sticky world-writable directory. This is to protect privileged
]

19/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 8256
							output: 35
							thoughts: 176
						

Thoughts:
**Delving into Filesystem Permission Handling**

Okay, so I need to understand how permissions are handled, especially within the context of user namespaces and the `sysfs` filesystem. My initial focus is on `fs/namei.c`, and specifically, how `generic_permission` and `capable_wrt_inode_uidgid` work. I want to see this permission checking mechanism in action. I'm especially interested in how the inode owner is handled when a `sysfs` is mounted within a user namespace. Does the unmapped UID get set to "nobody," `INVALID_UID`, or `GLOBAL_ROOT_UID`? And how does that translate within the user namespace itself? I'm going to pull up `fs/namei.c` and take a look at the code between lines 438 and 565 to get the specifics. Let's see what's actually going on.



20/4 2026/09/08 10:01 tool read-file
0m Args:
map[File:fs/namei.c FirstLine:430 LineCount:100]

Results:
map[Contents: 430:	 * blocking or non-blocking context and thus cares about the MAY_NOT_BLOCK bit.
 431:	 *
 432:	 * If the inode has been found through an idmapped mount the idmap of
 433:	 * the vfsmount must be passed through @idmap. This function will then take
 434:	 * care to map the inode according to @idmap before checking permissions.
 435:	 * On non-idmapped mounts or if permission checking is to be performed on the
 436:	 * raw inode simply pass @nop_mnt_idmap.
 437:	 */
 438:	static int acl_permission_check(struct mnt_idmap *idmap,
 439:					struct inode *inode, int mask)
 440:	{
 441:		unsigned int mode = inode->i_mode;
 442:		vfsuid_t vfsuid;
 443:	
 444:		/*
 445:		 * Common cheap case: everybody has the requested
 446:		 * rights, and there are no ACLs to check. No need
 447:		 * to do any owner/group checks in that case.
 448:		 *
 449:		 *  - 'mask&7' is the requested permission bit set
 450:		 *  - multiplying by 0111 spreads them out to all of ugo
 451:		 *  - '& ~mode' looks for missing inode permission bits
 452:		 *  - the '!' is for "no missing permissions"
 453:		 *
 454:		 * After that, we just need to check that there are no
 455:		 * ACL's on the inode - do the 'IS_POSIXACL()' check last
 456:		 * because it will dereference the ->i_sb pointer and we
 457:		 * want to avoid that if at all possible.
 458:		 */
 459:		if (!((mask & 7) * 0111 & ~mode)) {
 460:			if (no_acl_inode(inode))
 461:				return 0;
 462:			if (!IS_POSIXACL(inode))
 463:				return 0;
 464:		}
 465:	
 466:		/* Are we the owner? If so, ACL's don't matter */
 467:		vfsuid = i_uid_into_vfsuid(idmap, inode);
 468:		if (likely(vfsuid_eq_kuid(vfsuid, current_fsuid()))) {
 469:			mask &= 7;
 470:			mode >>= 6;
 471:			return (mask & ~mode) ? -EACCES : 0;
 472:		}
 473:	
 474:		/* Do we have ACL's? */
 475:		if (IS_POSIXACL(inode) && (mode & S_IRWXG)) {
 476:			int error = check_acl(idmap, inode, mask);
 477:			if (error != -EAGAIN)
 478:				return error;
 479:		}
 480:	
 481:		/* Only RWX matters for group/other mode bits */
 482:		mask &= 7;
 483:	
 484:		/*
 485:		 * Are the group permissions different from
 486:		 * the other permissions in the bits we care
 487:		 * about? Need to check group ownership if so.
 488:		 */
 489:		if (mask & (mode ^ (mode >> 3))) {
 490:			vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode);
 491:			if (vfsgid_in_group_p(vfsgid))
 492:				mode >>= 3;
 493:		}
 494:	
 495:		/* Bits in 'mode' clear that we require? */
 496:		return (mask & ~mode) ? -EACCES : 0;
 497:	}
 498:	
 499:	/**
 500:	 * generic_permission -  check for access rights on a Posix-like filesystem
 501:	 * @idmap:	idmap of the mount the inode was found from
 502:	 * @inode:	inode to check access rights for
 503:	 * @mask:	right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC,
 504:	 *		%MAY_NOT_BLOCK ...)
 505:	 *
 506:	 * Used to check for read/write/execute permissions on a file.
 507:	 * We use "fsuid" for this, letting us set arbitrary permissions
 508:	 * for filesystem access without changing the "normal" uids which
 509:	 * are used for other things.
 510:	 *
 511:	 * generic_permission is rcu-walk aware. It returns -ECHILD in case an rcu-walk
 512:	 * request cannot be satisfied (eg. requires blocking or too much complexity).
 513:	 * It would then be called again in ref-walk mode.
 514:	 *
 515:	 * If the inode has been found through an idmapped mount the idmap of
 516:	 * the vfsmount must be passed through @idmap. This function will then take
 517:	 * care to map the inode according to @idmap before checking permissions.
 518:	 * On non-idmapped mounts or if permission checking is to be performed on the
 519:	 * raw inode simply pass @nop_mnt_idmap.
 520:	 */
 521:	int generic_permission(struct mnt_idmap *idmap, struct inode *inode,
 522:			       int mask)
 523:	{
 524:		int ret;
 525:	
 526:		/*
 527:		 * Do the basic permission checks.
 528:		 */
 529:		ret = acl_permission_check(idmap, inode, mask);
]

21/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 10313
							output: 34
							thoughts: 12
						

Thoughts:
Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person:

**Analyzing the Call to Action**

Alright, so the instruction here is pretty straightforward. I'm given the directive to "Let's read the rest of `generic_permission`." My immediate assumption is that `generic_permission` refers to a specific piece of code, likely a function, class, or a section of documentation. Given my expertise, I'm already mentally parsing what that code snippet *could* contain based on its name. I'm expecting to find details around the definition and usage of permissions. I'll be looking for access control logic, perhaps defined roles, or maybe even an inheritance structure for managing permissions. The fact that the command is "Let's read" suggests either a collaborative investigation or a quick review, maybe to understand a specific edge case or address a reported bug related to authorization. Either way, my focus sharpens on understanding its intricacies. I prepare myself to delve into the syntax, logic, and potential dependencies of this "generic permission" implementation.



22/4 2026/09/08 10:01 tool read-file
0m Args:
map[File:fs/namei.c FirstLine:530 LineCount:40]

Results:
map[Contents: 530:		if (ret != -EACCES)
 531:			return ret;
 532:	
 533:		if (S_ISDIR(inode->i_mode)) {
 534:			/* DACs are overridable for directories */
 535:			if (!(mask & MAY_WRITE))
 536:				if (capable_wrt_inode_uidgid(idmap, inode,
 537:							     CAP_DAC_READ_SEARCH))
 538:					return 0;
 539:			if (capable_wrt_inode_uidgid(idmap, inode,
 540:						     CAP_DAC_OVERRIDE))
 541:				return 0;
 542:			return -EACCES;
 543:		}
 544:	
 545:		/*
 546:		 * Searching includes executable on directories, else just read.
 547:		 */
 548:		mask &= MAY_READ | MAY_WRITE | MAY_EXEC;
 549:		if (mask == MAY_READ)
 550:			if (capable_wrt_inode_uidgid(idmap, inode,
 551:						     CAP_DAC_READ_SEARCH))
 552:				return 0;
 553:		/*
 554:		 * Read/write DACs are always overridable.
 555:		 * Executable DACs are overridable when there is
 556:		 * at least one exec bit set.
 557:		 */
 558:		if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO))
 559:			if (capable_wrt_inode_uidgid(idmap, inode,
 560:						     CAP_DAC_OVERRIDE))
 561:				return 0;
 562:	
 563:		return -EACCES;
 564:	}
 565:	EXPORT_SYMBOL(generic_permission);
 566:	
 567:	/**
 568:	 * do_inode_permission - UNIX permission checking
 569:	 * @idmap:	idmap of the mount the inode was found from
]

23/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 11186
							output: 39
							thoughts: 59
						

Thoughts:
**My Line of Inquiry: Decoding a Permission Check**

Okay, so I'm looking at this `generic_permission` function, and it seems like the crucial part of its logic involves a call to `capable_wrt_inode_uidgid`. My first instinct, as always, is to understand precisely what this function does and what its implications are. The call to `CAP_DAC_OVERRIDE` is interesting, and I need to figure out how this capability interacts with the inode and the user/group IDs. Therefore, I need to know the definition, the complete source code of `capable_wrt_inode_uidgid` to start my analysis. I'm going to pull up the definition with `codesearch-definition-source` now to get started. I need the full context here.



24/4 2026/09/08 10:01 tool codesearch-definition-source
0m Args:
map[ContextFile:fs/namei.c Name:capable_wrt_inode_uidgid]

Results:
map[SourceCode: 463:	/**
 464:	 * capable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped
 465:	 * @idmap: idmap of the mount @inode was found from
 466:	 * @inode: The inode in question
 467:	 * @cap: The capability in question
 468:	 *
 469:	 * Return true if the current task has the given capability targeted at
 470:	 * its own user namespace and that the given inode's uid and gid are
 471:	 * mapped into the current user namespace.
 472:	 */
 473:	bool capable_wrt_inode_uidgid(struct mnt_idmap *idmap,
 474:				      const struct inode *inode, int cap)
 475:	{
 476:		struct user_namespace *ns = current_user_ns();
 477:	
 478:		return ns_capable(ns, cap) &&
 479:		       privileged_wrt_inode_uidgid(ns, idmap, inode);
 480:	}
 SourceFile:kernel/capability.c]

25/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 11774
							output: 38
							thoughts: 20
						

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

**Analyzing `privileged_wrt_inode_uidgid`**

Okay, let's dive into this. I'm taking a look at `privileged_wrt_inode_uidgid`. My first thought is to immediately track down the definition of that function, probably in the kernel source. We're talking about something potentially "privileged" related to UID/GID and inodes, so the context is immediately interesting. Where's this declared? I need the full signature and associated comments to understand its intended purpose and the conditions under which it's invoked. I want to understand exactly what criteria are being checked or enforced. This likely relates to some kind of security check, access control, or perhaps a capability mechanism. Finding its usage context is crucial – is it called within VFS operations, security modules, filesystem-specific code, or somewhere else? That will give me a better handle on its overall role. I need to understand its relationship to other security-related functions and data structures.



26/4 2026/09/08 10:01 tool codesearch-definition-source
0m Args:
map[ContextFile:kernel/capability.c Name:privileged_wrt_inode_uidgid]

Results:
map[SourceCode: 447:	/**
 448:	 * privileged_wrt_inode_uidgid - Do capabilities in the namespace work over the inode?
 449:	 * @ns: The user namespace in question
 450:	 * @idmap: idmap of the mount @inode was found from
 451:	 * @inode: The inode in question
 452:	 *
 453:	 * Return true if the inode uid and gid are within the namespace.
 454:	 */
 455:	bool privileged_wrt_inode_uidgid(struct user_namespace *ns,
 456:					 struct mnt_idmap *idmap,
 457:					 const struct inode *inode)
 458:	{
 459:		return vfsuid_has_mapping(ns, i_uid_into_vfsuid(idmap, inode)) &&
 460:		       vfsgid_has_mapping(ns, i_gid_into_vfsgid(idmap, inode));
 461:	}
 SourceFile:kernel/capability.c]

27/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 12346
							output: 36
							thoughts: 75
						

Thoughts:
Okay, let's break this down.

**Diving Deep into the Mapping Functions**

Alright, I need to get a clear picture of how these UID/GID mappings are working. My first step is to dig into the code and follow the execution path. I'll need to understand what `vfsuid_has_mapping` and `vfsgid_has_mapping` are actually *doing*. Then, it's crucial to understand how `i_uid_into_vfsuid` fits into the picture. A quick look at the definitions of the functions will probably be the best place to start. I'll need to understand how we determine if a particular UID/GID actually *has* a mapping, and then how we're actually translating them. Got it.



28/4 2026/09/08 10:01 tool codesearch-definition-source
0m Args:
map[ContextFile:kernel/capability.c Name:vfsuid_has_mapping]

Results:
map[SourceCode: 158:	static inline bool vfsuid_has_mapping(struct user_namespace *userns,
 159:					      vfsuid_t vfsuid)
 160:	{
 161:		return from_kuid(userns, AS_KUIDT(vfsuid)) != (uid_t)-1;
 162:	}
 SourceFile:include/linux/mnt_idmapping.h]

29/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 12747
							output: 38
							thoughts: 32
						

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

**Analyzing `vfsgid_has_mapping` and `from_kuid`**

Alright, I'm thinking we need to quickly check the status of `vfsgid_has_mapping` and also the value of `from_kuid`. I suspect that `from_kuid` is going to be the more relevant of the two. Let's see what's going on with `from_kuid` specifically. What is this telling us about the situation?



30/4 2026/09/08 10:01 tool codesearch-definition-source
0m Args:
map[ContextFile:include/linux/mnt_idmapping.h Name:from_kuid]

Results:
map[SourceCode: 429:	/**
 430:	 *	from_kuid - Create a uid from a kuid user-namespace pair.
 431:	 *	@targ: The user namespace we want a uid in.
 432:	 *	@kuid: The kernel internal uid to start with.
 433:	 *
 434:	 *	Map @kuid into the user-namespace specified by @targ and
 435:	 *	return the resulting uid.
 436:	 *
 437:	 *	There is always a mapping into the initial user_namespace.
 438:	 *
 439:	 *	If @kuid has no mapping in @targ (uid_t)-1 is returned.
 440:	 */
 441:	uid_t from_kuid(struct user_namespace *targ, kuid_t kuid)
 442:	{
 443:		/* Map the uid from a global kernel uid */
 444:		return map_id_up(&targ->uid_map, __kuid_val(kuid));
 445:	}
 SourceFile:kernel/user_namespace.c]

31/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 13253
							output: 76
							thoughts: 413
						

Thoughts:
**My Analysis of the User Namespace File Access Scenario**

Okay, let's break this down. The user's question involves a specific sequence of actions within a user namespace, and I need to carefully analyze the implications. First, I need to methodically re-read and understand the question: Can an unprivileged user, by creating a user namespace, mapping their UID to 0, and mounting sysfs, access a 0600 file owned by the global root? The key point is whether `CAP_DAC_OVERRIDE` within the user namespace allows access to files owned by unmapped UIDs, like the global root.

Let me take it step-by-step. First, the setup: an unprivileged user (say, UID 1000 on the host) creates a user namespace. Inside this new namespace, they create a UID map that translates their host UID 1000 to inner UID 0. This means that inside the user namespace, the process effectively *thinks* it's root (UID 0), even though on the host, it's still UID 1000. It also means that the global root (kuid 0) is *not* mapped into the namespace, so any operation referencing global root UID will fail.

The second part of the scenario is the sysfs mount. This is the crux of the problem. How does mounting `sysfs` inside a user namespace work? What are the UID/GID assignments of the inodes within `sysfs`? This is critical. I need to understand how the kernel handles `sysfs` mounting in the context of user namespaces. Specifically, how do `sysfs` inodes initialize and how do access permissions work with this setup? I need to know the details of how the kernel manages these UIDs and GIDs. I need to understand how the kernel's `sysfs_fs_type`, `fs_context`, and other relevant mechanisms work. I'm going to need to dig into the kernel source or relevant documentation to understand the details of the implementation for sysfs inside a user namespace and see how the access control checks are performed. I need to figure out if there's any way that `CAP_DAC_OVERRIDE` might provide some sort of escape hatch. So, time to dive in and get those details.



32/4 2026/09/08 10:01 tool grepper
0m Args:
map[Expression:sysfs_fs_type PathPrefix:fs/sysfs/]

Results:
map[Output:fs/sysfs/mount.c=70=static void sysfs_kill_sb(struct super_block *sb)
--
fs/sysfs/mount.c-77-
fs/sysfs/mount.c:78:static struct file_system_type sysfs_fs_type = {
fs/sysfs/mount.c-79-	.name			= "sysfs",
--
fs/sysfs/mount.c=85=int __init sysfs_init(void)
--
fs/sysfs/mount.c-95-
fs/sysfs/mount.c:96:	err = register_filesystem(&sysfs_fs_type);
fs/sysfs/mount.c-97-	if (err) {
]

33/4 2026/09/08 10:01 tool grepper
0m Args:
map[Expression:sysfs_init_fs_context|sysfs_get_tree|sysfs_mount PathPrefix:fs/sysfs/]

Results:
map[Output:fs/sysfs/mount.c=36=static const struct fs_context_operations sysfs_fs_context_ops = {
--
fs/sysfs/mount.c-40-
fs/sysfs/mount.c:41:static int sysfs_init_fs_context(struct fs_context *fc)
fs/sysfs/mount.c-42-{
--
fs/sysfs/mount.c=78=static struct file_system_type sysfs_fs_type = {
fs/sysfs/mount.c-79-	.name			= "sysfs",
fs/sysfs/mount.c:80:	.init_fs_context	= sysfs_init_fs_context,
fs/sysfs/mount.c-81-	.kill_sb		= sysfs_kill_sb,
]

34/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 14634
							output: 34
							thoughts: 14
						

Thoughts:
Okay, here we go...

**Diving into the sysfs Mount Implementation**

Alright, time to get my hands dirty. Let's dig into `fs/sysfs/mount.c`. I need to refresh my understanding of how sysfs integrates with the mounting process. I'm especially interested in seeing how the specific interaction between the sysfs filesystem and the overall VFS framework works. What special handling, if any, is required to present mountable attributes? I'm curious about the interplay between the standard filesystem operations and the unique characteristics of sysfs, particularly with respect to exporting kernel data structures and control interfaces. I'll be looking for how the mount structure is initialized, any special flags that are set, and how this differs (or doesn't differ) from other common filesystems. I want to see the details of how the mount is actually constructed and how it becomes accessible within the kernel. I'm anticipating some interesting code patterns related to dynamic attribute creation and manipulation. This should be a good deep dive.



35/4 2026/09/08 10:01 tool read-file
0m Args:
map[File:fs/sysfs/mount.c FirstLine:1 LineCount:90]

Results:
map[Contents:   1:	// SPDX-License-Identifier: GPL-2.0
   2:	/*
   3:	 * fs/sysfs/symlink.c - operations for initializing and mounting sysfs
   4:	 *
   5:	 * Copyright (c) 2001-3 Patrick Mochel
   6:	 * Copyright (c) 2007 SUSE Linux Products GmbH
   7:	 * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
   8:	 *
   9:	 * Please see Documentation/filesystems/sysfs.rst for more information.
  10:	 */
  11:	
  12:	#include <linux/fs.h>
  13:	#include <linux/magic.h>
  14:	#include <linux/mount.h>
  15:	#include <linux/init.h>
  16:	#include <linux/slab.h>
  17:	#include <linux/user_namespace.h>
  18:	#include <linux/fs_context.h>
  19:	#include <net/net_namespace.h>
  20:	
  21:	#include "sysfs.h"
  22:	
  23:	static struct kernfs_root *sysfs_root;
  24:	struct kernfs_node *sysfs_root_kn;
  25:	
  26:	static void sysfs_fs_context_free(struct fs_context *fc)
  27:	{
  28:		struct kernfs_fs_context *kfc = fc->fs_private;
  29:	
  30:		if (kfc->ns_tag)
  31:			kobj_ns_drop(KOBJ_NS_TYPE_NET, kfc->ns_tag);
  32:		kernfs_free_fs_context(fc);
  33:		kfree(kfc);
  34:	}
  35:	
  36:	static const struct fs_context_operations sysfs_fs_context_ops = {
  37:		.free		= sysfs_fs_context_free,
  38:		.get_tree	= kernfs_get_tree,
  39:	};
  40:	
  41:	static int sysfs_init_fs_context(struct fs_context *fc)
  42:	{
  43:		struct kernfs_fs_context *kfc;
  44:		struct ns_common *ns;
  45:	
  46:		if (!(fc->sb_flags & SB_KERNMOUNT)) {
  47:			if (!kobj_ns_current_may_mount(KOBJ_NS_TYPE_NET))
  48:				return -EPERM;
  49:		}
  50:	
  51:		kfc = kzalloc_obj(struct kernfs_fs_context);
  52:		if (!kfc)
  53:			return -ENOMEM;
  54:	
  55:		kfc->ns_tag = ns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET);
  56:		kfc->root = sysfs_root;
  57:		kfc->magic = SYSFS_MAGIC;
  58:		fc->fs_private = kfc;
  59:		fc->ops = &sysfs_fs_context_ops;
  60:		if (ns) {
  61:			struct net *netns = to_net_ns(ns);
  62:	
  63:			put_user_ns(fc->user_ns);
  64:			fc->user_ns = get_user_ns(netns->user_ns);
  65:		}
  66:		fc->global = true;
  67:		return 0;
  68:	}
  69:	
  70:	static void sysfs_kill_sb(struct super_block *sb)
  71:	{
  72:		struct ns_common *ns = (struct ns_common *)kernfs_super_ns(sb);
  73:	
  74:		kernfs_kill_sb(sb);
  75:		kobj_ns_drop(KOBJ_NS_TYPE_NET, ns);
  76:	}
  77:	
  78:	static struct file_system_type sysfs_fs_type = {
  79:		.name			= "sysfs",
  80:		.init_fs_context	= sysfs_init_fs_context,
  81:		.kill_sb		= sysfs_kill_sb,
  82:		.fs_flags		= FS_USERNS_MOUNT | FS_USERNS_MOUNT_RESTRICTED,
  83:	};
  84:	
  85:	int __init sysfs_init(void)
  86:	{
  87:		int err;
  88:	
  89:		sysfs_root = kernfs_create_root(NULL, KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK,
  90:						NULL);
]

36/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 16217
							output: 35
							thoughts: 85
						

Thoughts:
Here's my analysis of that snippet, from my perspective as a kernel developer:

**Delving into User Namespace Mounts and Kernfs**

Okay, so we're talking about `sysfs` and specifically that `FS_USERNS_MOUNT` flag. My immediate thought is to trace the initialization and permission setting process related to user namespaces within the filesystem. It's a key area for security and isolation, so I need to understand this in depth.

My plan is to dig into the Kernfs code because of the context. I'll need to go through the inode initialization to see how they set the UID/GID and how kernfs handles permission checks. The relevant files, based on my understanding of the system, are likely: `fs/kernfs/inode.c` for inode initialization, `fs/kernfs/dir.c` and `fs/kernfs/file.c` for directory and file operations respectively, and finally `fs/kernfs/mount.c` which will be essential for understanding mount-related details that likely inform the namespace interaction.



37/4 2026/09/08 10:01 tool read-file
0m Args:
map[File:fs/kernfs/inode.c FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	// SPDX-License-Identifier: GPL-2.0-only
   2:	/*
   3:	 * fs/kernfs/inode.c - kernfs inode implementation
   4:	 *
   5:	 * Copyright (c) 2001-3 Patrick Mochel
   6:	 * Copyright (c) 2007 SUSE Linux Products GmbH
   7:	 * Copyright (c) 2007, 2013 Tejun Heo <tj@kernel.org>
   8:	 */
   9:	
  10:	#include <linux/pagemap.h>
  11:	#include <linux/backing-dev.h>
  12:	#include <linux/capability.h>
  13:	#include <linux/errno.h>
  14:	#include <linux/slab.h>
  15:	#include <linux/xattr.h>
  16:	#include <linux/security.h>
  17:	
  18:	#include "kernfs-internal.h"
  19:	
  20:	static const struct inode_operations kernfs_iops = {
  21:		.permission	= kernfs_iop_permission,
  22:		.setattr	= kernfs_iop_setattr,
  23:		.getattr	= kernfs_iop_getattr,
  24:		.listxattr	= kernfs_iop_listxattr,
  25:	};
  26:	
  27:	static struct kernfs_iattrs *__kernfs_iattrs(struct kernfs_node *kn, bool alloc)
  28:	{
  29:		struct kernfs_iattrs *ret __free(kfree) = NULL;
  30:		struct kernfs_iattrs *attr;
  31:	
  32:		attr = READ_ONCE(kn->iattr);
  33:		if (attr || !alloc)
  34:			return attr;
  35:	
  36:		ret = kmem_cache_zalloc(kernfs_iattrs_cache, GFP_KERNEL);
  37:		if (!ret)
  38:			return NULL;
  39:	
  40:		INIT_LIST_HEAD_RCU(&ret->xattrs);
  41:		/* assign default attributes */
  42:		ret->ia_uid = GLOBAL_ROOT_UID;
  43:		ret->ia_gid = GLOBAL_ROOT_GID;
  44:	
  45:		ktime_get_real_ts64(&ret->ia_atime);
  46:		ret->ia_mtime = ret->ia_atime;
  47:		ret->ia_ctime = ret->ia_atime;
  48:	
  49:		simple_xattr_limits_init(&ret->xattr_limits);
  50:	
  51:		/* If someone raced us, recognize it. */
  52:		if (!try_cmpxchg(&kn->iattr, &attr, ret))
  53:			return READ_ONCE(kn->iattr);
  54:	
  55:		return no_free_ptr(ret);
  56:	}
  57:	
  58:	static struct kernfs_iattrs *kernfs_iattrs(struct kernfs_node *kn)
  59:	{
  60:		return __kernfs_iattrs(kn, true);
  61:	}
  62:	
  63:	static struct kernfs_iattrs *kernfs_iattrs_noalloc(struct kernfs_node *kn)
  64:	{
  65:		return __kernfs_iattrs(kn, false);
  66:	}
  67:	
  68:	int __kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr)
  69:	{
  70:		struct kernfs_iattrs *attrs;
  71:		unsigned int ia_valid = iattr->ia_valid;
  72:	
  73:		attrs = kernfs_iattrs(kn);
  74:		if (!attrs)
  75:			return -ENOMEM;
  76:	
  77:		if (ia_valid & ATTR_UID)
  78:			attrs->ia_uid = iattr->ia_uid;
  79:		if (ia_valid & ATTR_GID)
  80:			attrs->ia_gid = iattr->ia_gid;
  81:		if (ia_valid & ATTR_ATIME)
  82:			attrs->ia_atime = iattr->ia_atime;
  83:		if (ia_valid & ATTR_MTIME)
  84:			attrs->ia_mtime = iattr->ia_mtime;
  85:		if (ia_valid & ATTR_CTIME)
  86:			attrs->ia_ctime = iattr->ia_ctime;
  87:		if (ia_valid & ATTR_MODE)
  88:			kn->mode = iattr->ia_mode;
  89:		return 0;
  90:	}
  91:	
  92:	/**
  93:	 * kernfs_setattr - set iattr on a node
  94:	 * @kn: target node
  95:	 * @iattr: iattr to set
  96:	 *
  97:	 * Return: %0 on success, -errno on failure.
  98:	 */
  99:	int kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr)
 100:	{
]

38/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 18021
							output: 37
							thoughts: 17
						

Thoughts:
Okay, let's dive into the rest of `fs/kernfs/inode.c`. I need to get a better handle on how kernfs inodes function, specifically how they're managed and how they interact with the rest of the file system. My goal is to grasp the core concepts so I can confidently contribute to, or debug, kernfs-related code in the future. I'm looking for the key data structures, the crucial functions, and any particularly clever or unusual implementation details. I'll be paying close attention to things like inode allocation, deallocation, and the handling of various kernfs node types. I'm anticipating that I'll need to focus on how attributes are managed and how the underlying VFS calls are handled by kernfs. I expect to be able to identify any potential performance bottlenecks or subtle race conditions. It will be very useful to see how the inode is integrated into the kernfs hierarchy and how it interacts with the underlying kernel object.



39/4 2026/09/08 10:01 tool read-file
0m Args:
map[File:fs/kernfs/inode.c FirstLine:180 LineCount:120]

Results:
map[Contents: 180:		if (kernfs_type(kn) == KERNFS_DIR && !(kn->flags & KERNFS_REMOVING))
 181:			set_nlink(inode, kn->dir.subdirs + 2);
 182:	}
 183:	
 184:	int kernfs_iop_getattr(struct mnt_idmap *idmap,
 185:			       const struct path *path, struct kstat *stat,
 186:			       u32 request_mask, unsigned int query_flags)
 187:	{
 188:		struct inode *inode = d_inode(path->dentry);
 189:		struct kernfs_node *kn = inode->i_private;
 190:		struct kernfs_root *root = kernfs_root(kn);
 191:	
 192:		down_read(&root->kernfs_iattr_rwsem);
 193:		kernfs_refresh_inode(kn, inode);
 194:		generic_fillattr(&nop_mnt_idmap, request_mask, inode, stat);
 195:		up_read(&root->kernfs_iattr_rwsem);
 196:	
 197:		return 0;
 198:	}
 199:	
 200:	static void kernfs_init_inode(struct kernfs_node *kn, struct inode *inode)
 201:	{
 202:		kernfs_get(kn);
 203:		inode->i_private = kn;
 204:		inode->i_mapping->a_ops = &ram_aops;
 205:		inode->i_op = &kernfs_iops;
 206:		inode->i_generation = kernfs_gen(kn);
 207:	
 208:		set_default_inode_attr(inode, kn->mode);
 209:		kernfs_refresh_inode(kn, inode);
 210:	
 211:		/* initialize inode according to type */
 212:		switch (kernfs_type(kn)) {
 213:		case KERNFS_DIR:
 214:			inode->i_op = &kernfs_dir_iops;
 215:			inode->i_fop = &kernfs_dir_fops;
 216:			if (kn->flags & KERNFS_EMPTY_DIR)
 217:				make_empty_dir_inode(inode);
 218:			break;
 219:		case KERNFS_FILE:
 220:			inode->i_size = kn->attr.size;
 221:			inode->i_fop = &kernfs_file_fops;
 222:			break;
 223:		case KERNFS_LINK:
 224:			inode->i_op = &kernfs_symlink_iops;
 225:			break;
 226:		default:
 227:			BUG();
 228:		}
 229:	
 230:		unlock_new_inode(inode);
 231:	}
 232:	
 233:	/**
 234:	 *	kernfs_get_inode - get inode for kernfs_node
 235:	 *	@sb: super block
 236:	 *	@kn: kernfs_node to allocate inode for
 237:	 *
 238:	 *	Get inode for @kn.  If such inode doesn't exist, a new inode is
 239:	 *	allocated and basics are initialized.  New inode is returned
 240:	 *	locked.
 241:	 *
 242:	 *	Locking:
 243:	 *	Kernel thread context (may sleep).
 244:	 *
 245:	 *	Return:
 246:	 *	Pointer to allocated inode on success, %NULL on failure.
 247:	 */
 248:	struct inode *kernfs_get_inode(struct super_block *sb, struct kernfs_node *kn)
 249:	{
 250:		struct inode *inode;
 251:	
 252:		inode = iget_locked(sb, kernfs_ino(kn));
 253:		if (inode && (inode_state_read_once(inode) & I_NEW))
 254:			kernfs_init_inode(kn, inode);
 255:	
 256:		return inode;
 257:	}
 258:	
 259:	/*
 260:	 * The kernfs_node serves as both an inode and a directory entry for
 261:	 * kernfs.  To prevent the kernfs inode numbers from being freed
 262:	 * prematurely we take a reference to kernfs_node from the kernfs inode.  A
 263:	 * super_operations.evict_inode() implementation is needed to drop that
 264:	 * reference upon inode destruction.
 265:	 */
 266:	void kernfs_evict_inode(struct inode *inode)
 267:	{
 268:		struct kernfs_node *kn = inode->i_private;
 269:	
 270:		truncate_inode_pages_final(&inode->i_data);
 271:		clear_inode(inode);
 272:		kernfs_put(kn);
 273:	}
 274:	
 275:	int kernfs_iop_permission(struct mnt_idmap *idmap,
 276:				  struct inode *inode, int mask)
 277:	{
 278:		struct kernfs_node *kn;
 279:		struct kernfs_root *root;
]

40/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 19821
							output: 36
							thoughts: 36
						

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

**Diving into Kernfs Inode Refresh**

Okay, so I need to get a handle on how kernfs inodes are refreshed. I'm going to jump into the `fs/kernfs/inode.c` source code, specifically lines 280 to 320. That's a reasonable chunk to start with. I'm expecting that section to give me a good overview of the core logic. While I'm there, I should also make sure to check out the definition of `kernfs_refresh_inode`. That's likely where the heavy lifting of the refresh operation actually happens. Knowing that function's signature and how it's called from lines 280-320 is going to be key to understanding the overall refresh mechanism within kernfs. I'm hoping this will illuminate potential issues or interesting design choices in the refresh strategy.



41/4 2026/09/08 10:01 tool read-file
0m Args:
map[File:fs/kernfs/inode.c FirstLine:150 LineCount:50]

Results:
map[Contents: 150:	
 151:	static inline void set_default_inode_attr(struct inode *inode, umode_t mode)
 152:	{
 153:		inode->i_mode = mode;
 154:		simple_inode_init_ts(inode);
 155:	}
 156:	
 157:	static inline void set_inode_attr(struct inode *inode,
 158:					  struct kernfs_iattrs *attrs)
 159:	{
 160:		inode->i_uid = attrs->ia_uid;
 161:		inode->i_gid = attrs->ia_gid;
 162:		inode_set_atime_to_ts(inode, attrs->ia_atime);
 163:		inode_set_mtime_to_ts(inode, attrs->ia_mtime);
 164:		inode_set_ctime_to_ts(inode, attrs->ia_ctime);
 165:	}
 166:	
 167:	static void kernfs_refresh_inode(struct kernfs_node *kn, struct inode *inode)
 168:	{
 169:		struct kernfs_iattrs *attrs;
 170:	
 171:		inode->i_mode = kn->mode;
 172:		attrs = kernfs_iattrs_noalloc(kn);
 173:		if (attrs)
 174:			/*
 175:			 * kernfs_node has non-default attributes get them from
 176:			 * persistent copy in kernfs_node.
 177:			 */
 178:			set_inode_attr(inode, attrs);
 179:	
 180:		if (kernfs_type(kn) == KERNFS_DIR && !(kn->flags & KERNFS_REMOVING))
 181:			set_nlink(inode, kn->dir.subdirs + 2);
 182:	}
 183:	
 184:	int kernfs_iop_getattr(struct mnt_idmap *idmap,
 185:			       const struct path *path, struct kstat *stat,
 186:			       u32 request_mask, unsigned int query_flags)
 187:	{
 188:		struct inode *inode = d_inode(path->dentry);
 189:		struct kernfs_node *kn = inode->i_private;
 190:		struct kernfs_root *root = kernfs_root(kn);
 191:	
 192:		down_read(&root->kernfs_iattr_rwsem);
 193:		kernfs_refresh_inode(kn, inode);
 194:		generic_fillattr(&nop_mnt_idmap, request_mask, inode, stat);
 195:		up_read(&root->kernfs_iattr_rwsem);
 196:	
 197:		return 0;
 198:	}
 199:	
]

42/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 20899
							output: 34
							thoughts: 116
						

Thoughts:
**Investigating Inode Attribute Defaults**

Okay, so I'm diving into `set_default_inode_attr`. My immediate question is: when the `kn->iattr` pointer is null, what are the initial values for `inode->i_uid` and `inode->i_gid`?  That's the crux of it. I need to trace back how these attributes are *actually* initialized.

The best place to start looking is probably the functions involved in creating new inodes. Let's check the inode allocation process. So, where does `i_uid` and `i_gid` come from when an inode is created? I'll need to look at either `new_inode`, `iget_locked`, or `alloc_inode`. My hunch is `alloc_inode` will be key, as that is likely where the *initial* allocation happens. Alternatively `inode_init_always` is a strong possibility, it sounds like an initialization routine.

So, let's search for `inode_init_always`. That should quickly reveal how the *initial* values are set. That's the core question, and where the mystery lies. Let's see what the code reveals!



43/4 2026/09/08 10:01 tool codesearch-definition-source
0m Args:
map[ContextFile:fs/inode.c Name:inode_init_always]

Results:
map[SourceCode:2963:	static inline int inode_init_always(struct super_block *sb, struct inode *inode)
2964:	{
2965:		return inode_init_always_gfp(sb, inode, GFP_NOFS);
2966:	}
 SourceFile:include/linux/fs.h]

44/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 21405
							output: 37
							thoughts: 14
						

Thoughts:
Here's your summary, as if I were thinking these thoughts:

**Chasing Down `inode_init_always_gfp`**

Okay, time to get to work. Let's see... the task at hand is to locate this specific function: `inode_init_always_gfp`. It's a key piece of the inode initialization puzzle, I know it. So, let's start mentally tracing where it *should* be. Given the name, it's almost certainly involved in the initial setup of inodes, probably during filesystem mounting or object creation. My gut says it's likely a relatively low-level function. I'll need to figure out which relevant code paths lead to it.



45/4 2026/09/08 10:01 tool codesearch-definition-source
0m Args:
map[ContextFile:fs/inode.c Name:inode_init_always_gfp]

Results:
map[SourceCode: 213:	/**
 214:	 * inode_init_always_gfp - perform inode structure initialisation
 215:	 * @sb: superblock inode belongs to
 216:	 * @inode: inode to initialise
 217:	 * @gfp: allocation flags
 218:	 *
 219:	 * These are initializations that need to be done on every inode
 220:	 * allocation as the fields are not initialised by slab allocation.
 221:	 * If there are additional allocations required @gfp is used.
 222:	 */
 223:	int inode_init_always_gfp(struct super_block *sb, struct inode *inode, gfp_t gfp)
 224:	{
 225:		static const struct inode_operations empty_iops;
 226:		static const struct file_operations no_open_fops = {.open = no_open};
 227:		struct address_space *const mapping = &inode->i_data;
 228:	
 229:		inode->i_sb = sb;
 230:		inode->i_blkbits = sb->s_blocksize_bits;
 231:		inode->i_flags = 0;
 232:		inode_state_assign_raw(inode, 0);
 233:		atomic64_set(&inode->i_sequence, 0);
 234:		atomic_set(&inode->i_count, 1);
 235:		inode->i_op = &empty_iops;
 236:		inode->i_fop = &no_open_fops;
 237:		inode->i_ino = 0;
 238:		inode->__i_nlink = 1;
 239:		inode->i_opflags = 0;
 240:		if (sb->s_xattr)
 241:			inode->i_opflags |= IOP_XATTR;
 242:		if (sb->s_type->fs_flags & FS_MGTIME)
 243:			inode->i_opflags |= IOP_MGTIME;
 244:		i_uid_write(inode, 0);
 245:		i_gid_write(inode, 0);
 246:		atomic_set(&inode->i_writecount, 0);
 247:		inode->i_size = 0;
 248:		inode->i_write_hint = WRITE_LIFE_NOT_SET;
 249:		inode->i_blocks = 0;
 250:		inode->i_bytes = 0;
 251:		inode->i_generation = 0;
 252:		inode->i_pipe = NULL;
 253:		inode->i_cdev = NULL;
 254:		inode->i_link = NULL;
 255:		inode->i_dir_seq = 0;
 256:		inode->i_rdev = 0;
 257:		inode->dirtied_when = 0;
 258:	
 259:	#ifdef CONFIG_CGROUP_WRITEBACK
 260:		inode->i_wb_frn_winner = 0;
 261:		inode->i_wb_frn_avg_time = 0;
 262:		inode->i_wb_frn_history = 0;
 263:	#endif
 264:	
 265:		spin_lock_init(&inode->i_lock);
 266:		lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key);
 267:	
 268:		init_rwsem(&inode->i_rwsem);
 269:		lockdep_set_class(&inode->i_rwsem, &sb->s_type->i_mutex_key);
 270:	
 271:		atomic_set(&inode->i_dio_count, 0);
 272:	
 273:		mapping->a_ops = &empty_aops;
 274:		mapping->host = inode;
 275:		mapping->flags = 0;
 276:		mapping->wb_err = 0;
 277:		atomic_set(&mapping->i_mmap_writable, 0);
 278:		mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE);
 279:		mapping->writeback_index = 0;
 280:		init_rwsem(&mapping->invalidate_lock);
 281:		lockdep_set_class_and_name(&mapping->invalidate_lock,
 282:					   &sb->s_type->invalidate_lock_key,
 283:					   "mapping.invalidate_lock");
 284:		if (sb->s_iflags & SB_I_STABLE_WRITES)
 285:			mapping_set_stable_writes(mapping);
 286:		inode->i_private = NULL;
 287:		inode->i_mapping = mapping;
 288:		INIT_HLIST_HEAD(&inode->i_dentry);	/* buggered by rcu freeing */
 289:	#ifdef CONFIG_FS_POSIX_ACL
 290:		inode->i_acl = inode->i_default_acl = ACL_NOT_CACHED;
 291:	#endif
 292:	
 293:	#ifdef CONFIG_FSNOTIFY
 294:		inode->i_fsnotify_mask = 0;
 295:	#endif
 296:		inode->i_flctx = NULL;
 297:	
 298:		if (unlikely(security_inode_alloc(inode, gfp)))
 299:			return -ENOMEM;
 300:	
 301:		this_cpu_inc(nr_inodes);
 302:	
 303:		return 0;
 304:	}
 SourceFile:fs/inode.c]

46/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 23204
							output: 38
							thoughts: 219
						

Thoughts:
**My Analysis of Sysfs File Ownership and Permissions**

Okay, so I'm looking into how sysfs files handle ownership and permissions, and it seems pretty straightforward at first glance. It's clear that the functions `i_uid_write(inode, 0)` and `i_gid_write(inode, 0)` are used, internally, to set the user and group IDs of inodes. Both of these functions are set to `GLOBAL_ROOT_UID` and `GLOBAL_ROOT_GID`, which equates to a UID and GID value of 0. This is reinforced by the `__kernfs_iattrs` structure, as it also explicitly sets the `ia_uid` and `ia_gid` to those same global root values. Consequently, sysfs files are, by default, owned by the root user and the root group. That's the established baseline.

Now, the interesting part is the extra permission check during kernfs file opening. The sysfs initialization call, specifically using `kernfs_create_root`, includes the `KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK` flag. It's important to understand how this flag works. I'll need to dig into the `fs/kernfs/file.c` code, or perhaps elsewhere in the kernfs code, to see precisely what additional checks this flag enables during the file open operation. My hunch is this is the mechanism that implements the security policy on sysfs, controlling who can read and write certain files, beyond the basic root ownership. Time to dive deeper into the code.



47/4 2026/09/08 10:01 tool grepper
0m Args:
map[Expression:KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK PathPrefix:fs/kernfs/]

Results:
map[Output:fs/kernfs/file.c=603=static int kernfs_fop_open(struct inode *inode, struct file *file)
--
fs/kernfs/file.c-621-	/* see the flag definition for details */
fs/kernfs/file.c:622:	if (root->flags & KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK) {
fs/kernfs/file.c-623-		if ((file->f_mode & FMODE_WRITE) &&
]

48/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 23931
							output: 36
							thoughts: 26
						

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

**Diving into `kernfs_file_operations`**

Okay, time to dig into `fs/kernfs/file.c`. Specifically, I want to refresh my memory and understand how the interaction with the underlying filesystem is implemented.  Let's target lines 600 through 650.  That's likely where the `kernfs_file_operations` structure or related functions dealing with file I/O are defined. I anticipate seeing the familiar `read`, `write`, `llseek`, `release`, and maybe `mmap` implementations. I'm really looking for how `kernfs` handles the connection to backing data stores and how it manages the file handles themselves.  Perhaps there's something interesting in the locking strategy there. Time to see what's what! I want to understand specifically:
 *   How the file operations are hooked in.
 *   If any tricky caching or buffering is employed.
 *   Whether or not there are any notable differences in the kernfs implementation compared to similar, standard virtual filesystems.
I'm particularly interested if there are any subtle optimization strategies or workarounds to any limitations the kernel imposes.



49/4 2026/09/08 10:01 tool read-file
0m Args:
map[File:fs/kernfs/file.c FirstLine:600 LineCount:50]

Results:
map[Contents: 600:		mutex_unlock(mutex);
 601:	}
 602:	
 603:	static int kernfs_fop_open(struct inode *inode, struct file *file)
 604:	{
 605:		struct kernfs_node *kn = inode->i_private;
 606:		struct kernfs_root *root = kernfs_root(kn);
 607:		const struct kernfs_ops *ops;
 608:		struct kernfs_open_file *of;
 609:		bool has_read, has_write, has_mmap;
 610:		int error = -EACCES;
 611:	
 612:		if (!kernfs_get_active(kn))
 613:			return -ENODEV;
 614:	
 615:		ops = kernfs_ops(kn);
 616:	
 617:		has_read = ops->seq_show || ops->read || ops->mmap;
 618:		has_write = ops->write || ops->mmap;
 619:		has_mmap = ops->mmap;
 620:	
 621:		/* see the flag definition for details */
 622:		if (root->flags & KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK) {
 623:			if ((file->f_mode & FMODE_WRITE) &&
 624:			    (!(inode->i_mode & S_IWUGO) || !has_write))
 625:				goto err_out;
 626:	
 627:			if ((file->f_mode & FMODE_READ) &&
 628:			    (!(inode->i_mode & S_IRUGO) || !has_read))
 629:				goto err_out;
 630:		}
 631:	
 632:		/* allocate a kernfs_open_file for the file */
 633:		error = -ENOMEM;
 634:		of = kzalloc_obj(struct kernfs_open_file);
 635:		if (!of)
 636:			goto err_out;
 637:	
 638:		/*
 639:		 * The following is done to give a different lockdep key to
 640:		 * @of->mutex for files which implement mmap.  This is a rather
 641:		 * crude way to avoid false positive lockdep warning around
 642:		 * mm->mmap_lock - mmap nests @of->mutex under mm->mmap_lock and
 643:		 * reading /sys/block/sda/trace/act_mask grabs sr_mutex, under
 644:		 * which mm->mmap_lock nests, while holding @of->mutex.  As each
 645:		 * open file has a separate mutex, it's okay as long as those don't
 646:		 * happen on the same file.  At this point, we can't easily give
 647:		 * each file a separate locking class.  Let's differentiate on
 648:		 * whether the file has mmap or not for now.
 649:		 *
]

50/4 2026/09/08 10:01 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 25108
							output: 39
							thoughts: 2552
						

Thoughts:
**Sysfs File Access in User Namespaces: A Deep Dive**

Okay, so I'm trying to wrap my head around what happens when an unprivileged user, let's say UID 1000 on the host, dives into a new user namespace. Within this namespace, UID 1000 on the host gets mapped to UID 0 (root). Now, let's say the process has some capabilities in the namespace, like `CAP_DAC_OVERRIDE`, `CAP_DAC_READ_SEARCH`, and `CAP_SYS_ADMIN`. I'm focusing on the interaction with a sysfs file, particularly one with mode 0600 (owner read/write only) and owned by the global root (UID 0 and GID 0).

My initial thought is to trace the path lookup and `open` system call. The critical point is what happens in `inode_permission` which flows into `kernfs_iop_permission`, and then into `generic_permission` and finally `acl_permission_check`.

Firstly, I'm analyzing the `acl_permission_check`. The first quick check fails because the file's mode isn't open to all, and I'm not the owner, since my effective UID in the namespace (1000) doesn't match the file's owner (0). There are no POSIX ACLs here, either. My permissions check hits the main logic: the `mask` (read/write/execute) is and'ed with the mode of the file, and since this is 0600, that check is going to fail and return an error.

The control goes back to `generic_permission`. Because `acl_permission_check` failed with an access denied, I need to check `capable_wrt_inode_uidgid`. This is where the magic happens. I already know that because I am in a user namespace I have the capability `CAP_DAC_OVERRIDE`. Now I'm focused on understanding the implications of `privileged_wrt_inode_uidgid`.

This means checking that the file's UID and GID have *mappings* within my namespace. Essentially, I'm verifying that the *global root* (UID 0) is meaningfully represented inside my user namespace. When checking `vfsuid_has_mapping`, it all hinges on `from_kuid(ns, GLOBAL_ROOT_UID)`.

In this specific scenario, the user namespace only maps the host UID 1000 to the inner UID 0. There's no mapping for the host UID 0 to an inner UID. Consequently, when `from_kuid(ns, 0)` is called, the result is `(uid_t)-1`, meaning "unmapped".

Therefore, `privileged_wrt_inode_uidgid` will return false. Consequently, `capable_wrt_inode_uidgid` will also return false. Ultimately, `generic_permission` returns `-EACCES` because, despite the capabilities, there is no valid mapping. The `open` call then correctly fails with an access denied error.

I'm making a mental note to review the git history and related commits for `capable_wrt_inode_uidgid`, `privileged_wrt_inode_uidgid`, `CAP_DAC_OVERRIDE` and `sysfs` in the context of user namespaces. Just to be completely sure.



51/4 2026/09/08 10:01 tool git-log
1m Args:
map[CodeRegexp:capable_wrt_inode_uidgid Count:10 PathPrefix:kernel/]

Results:
map[Output:9452e93e6dae fs: port privilege checking helpers to mnt_idmap
0558c1bf5a08 capability: handle idmapped mounts
23adbe12ef7d fs,userns: Change inode_capable to capable_wrt_inode_uidgid
]

52/4 2026/09/08 10:03 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 28518
							output: 24
							thoughts: 23
						

Thoughts:
Here's a summary of my thought process, as if I were the one thinking it:

**Diving into the Revision History**

Okay, time to get to the heart of this issue. Let's start by isolating the relevant commit. I need to take a look at commit `23adbe12ef7d`. I'll use `git-show` to reveal the changes introduced by that specific snapshot in the repository's history. This command will give me the diff, and reveal the code that was added, modified, or removed. Analyzing this commit will provide the necessary context to determine what happened, and if it's related to the current investigation.



53/4 2026/09/08 10:03 tool git-show
0m Args:
map[Commit:23adbe12ef7d]

Results:
map[Output:commit 23adbe12ef7d3d4195e80800ab36b37bee28cd03
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Tue Jun 10 12:45:42 2014 -0700

    fs,userns: Change inode_capable to capable_wrt_inode_uidgid
    
    The kernel has no concept of capabilities with respect to inodes; inodes
    exist independently of namespaces.  For example, inode_capable(inode,
    CAP_LINUX_IMMUTABLE) would be nonsense.
    
    This patch changes inode_capable to check for uid and gid mappings and
    renames it to capable_wrt_inode_uidgid, which should make it more
    obvious what it does.
    
    Fixes CVE-2014-4014.
    
    Cc: Theodore Ts'o <tytso@mit.edu>
    Cc: Serge Hallyn <serge.hallyn@ubuntu.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Dave Chinner <david@fromorbit.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/fs/attr.c b/fs/attr.c
index 5d4e59d56e85..6530ced19697 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -50,14 +50,14 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr)
 	if ((ia_valid & ATTR_UID) &&
 	    (!uid_eq(current_fsuid(), inode->i_uid) ||
 	     !uid_eq(attr->ia_uid, inode->i_uid)) &&
-	    !inode_capable(inode, CAP_CHOWN))
+	    !capable_wrt_inode_uidgid(inode, CAP_CHOWN))
 		return -EPERM;
 
 	/* Make sure caller can chgrp. */
 	if ((ia_valid & ATTR_GID) &&
 	    (!uid_eq(current_fsuid(), inode->i_uid) ||
 	    (!in_group_p(attr->ia_gid) && !gid_eq(attr->ia_gid, inode->i_gid))) &&
-	    !inode_capable(inode, CAP_CHOWN))
+	    !capable_wrt_inode_uidgid(inode, CAP_CHOWN))
 		return -EPERM;
 
 	/* Make sure a caller can chmod. */
@@ -67,7 +67,7 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr)
 		/* Also check the setgid bit! */
 		if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid :
 				inode->i_gid) &&
-		    !inode_capable(inode, CAP_FSETID))
+		    !capable_wrt_inode_uidgid(inode, CAP_FSETID))
 			attr->ia_mode &= ~S_ISGID;
 	}
 
@@ -160,7 +160,7 @@ void setattr_copy(struct inode *inode, const struct iattr *attr)
 		umode_t mode = attr->ia_mode;
 
 		if (!in_group_p(inode->i_gid) &&
-		    !inode_capable(inode, CAP_FSETID))
+		    !capable_wrt_inode_uidgid(inode, CAP_FSETID))
 			mode &= ~S_ISGID;
 		inode->i_mode = mode;
 	}
diff --git a/fs/inode.c b/fs/inode.c
index 2feb9b69f1be..6eecb7ff0b9a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1839,14 +1839,18 @@ EXPORT_SYMBOL(inode_init_owner);
  * inode_owner_or_capable - check current task permissions to inode
  * @inode: inode being checked
  *
- * Return true if current either has CAP_FOWNER to the inode, or
- * owns the file.
+ * Return true if current either has CAP_FOWNER in a namespace with the
+ * inode owner uid mapped, or owns the file.
  */
 bool inode_owner_or_capable(const struct inode *inode)
 {
+	struct user_namespace *ns;
+
 	if (uid_eq(current_fsuid(), inode->i_uid))
 		return true;
-	if (inode_capable(inode, CAP_FOWNER))
+
+	ns = current_user_ns();
+	if (ns_capable(ns, CAP_FOWNER) && kuid_has_mapping(ns, inode->i_uid))
 		return true;
 	return false;
 }
diff --git a/fs/namei.c b/fs/namei.c
index 80168273396b..985c6f368485 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -332,10 +332,11 @@ int generic_permission(struct inode *inode, int mask)
 
 	if (S_ISDIR(inode->i_mode)) {
 		/* DACs are overridable for directories */
-		if (inode_capable(inode, CAP_DAC_OVERRIDE))
+		if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE))
 			return 0;
 		if (!(mask & MAY_WRITE))
-			if (inode_capable(inode, CAP_DAC_READ_SEARCH))
+			if (capable_wrt_inode_uidgid(inode,
+						     CAP_DAC_READ_SEARCH))
 				return 0;
 		return -EACCES;
 	}
@@ -345,7 +346,7 @@ int generic_permission(struct inode *inode, int mask)
 	 * at least one exec bit set.
 	 */
 	if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO))
-		if (inode_capable(inode, CAP_DAC_OVERRIDE))
+		if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE))
 			return 0;
 
 	/*
@@ -353,7 +354,7 @@ int generic_permission(struct inode *inode, int mask)
 	 */
 	mask &= MAY_READ | MAY_WRITE | MAY_EXEC;
 	if (mask == MAY_READ)
-		if (inode_capable(inode, CAP_DAC_READ_SEARCH))
+		if (capable_wrt_inode_uidgid(inode, CAP_DAC_READ_SEARCH))
 			return 0;
 
 	return -EACCES;
@@ -2379,7 +2380,7 @@ static inline int check_sticky(struct inode *dir, struct inode *inode)
 		return 0;
 	if (uid_eq(dir->i_uid, fsuid))
 		return 0;
-	return !inode_capable(inode, CAP_FOWNER);
+	return !capable_wrt_inode_uidgid(inode, CAP_FOWNER);
 }
 
 /*
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 0b18776b075e..6152cbe353e8 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1215,7 +1215,7 @@ xfs_ioctl_setattr(
 		 * cleared upon successful return from chown()
 		 */
 		if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) &&
-		    !inode_capable(VFS_I(ip), CAP_FSETID))
+		    !capable_wrt_inode_uidgid(VFS_I(ip), CAP_FSETID))
 			ip->i_d.di_mode &= ~(S_ISUID|S_ISGID);
 
 		/*
diff --git a/include/linux/capability.h b/include/linux/capability.h
index a6ee1f9a5018..84b13ad67c1c 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -210,7 +210,7 @@ extern bool has_ns_capability_noaudit(struct task_struct *t,
 				      struct user_namespace *ns, int cap);
 extern bool capable(int cap);
 extern bool ns_capable(struct user_namespace *ns, int cap);
-extern bool inode_capable(const struct inode *inode, int cap);
+extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap);
 extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap);
 
 /* audit system wants to get cap info from files as well */
diff --git a/kernel/capability.c b/kernel/capability.c
index 84b2bbf443e7..a5cf13c018ce 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -424,23 +424,19 @@ bool capable(int cap)
 EXPORT_SYMBOL(capable);
 
 /**
- * inode_capable - Check superior capability over inode
+ * capable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped
  * @inode: The inode in question
  * @cap: The capability in question
  *
- * Return true if the current task has the given superior capability
- * targeted at it's own user namespace and that the given inode is owned
- * by the current user namespace or a child namespace.
- *
- * Currently we check to see if an inode is owned by the current
- * user namespace by seeing if the inode's owner maps into the
- * current user namespace.
- *
+ * Return true if the current task has the given capability targeted at
+ * its own user namespace and that the given inode's uid and gid are
+ * mapped into the current user namespace.
  */
-bool inode_capable(const struct inode *inode, int cap)
+bool capable_wrt_inode_uidgid(const struct inode *inode, int cap)
 {
 	struct user_namespace *ns = current_user_ns();
 
-	return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid);
+	return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid) &&
+		kgid_has_mapping(ns, inode->i_gid);
 }
-EXPORT_SYMBOL(inode_capable);
+EXPORT_SYMBOL(capable_wrt_inode_uidgid);
]

54/4 2026/09/08 10:03 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 31574
							output: 31
							thoughts: 213
						

Thoughts:
**Analyzing Capability Checks and User Namespace Inode Permissions**

Okay, so I'm looking closely at this commit, 23adbe12ef7d, and specifically, the comments and the `privileged_wrt_inode_uidgid` function. It seems the core logic hinges on whether a task possesses a specific capability aimed at its own user namespace, and if the inode's UID and GID are appropriately mapped within the current user namespace. They're using `vfsuid_has_mapping` and `vfsgid_has_mapping`, along with `i_uid_into_vfsuid` and `i_gid_into_vfsgid`, to perform these checks. Essentially, they are trying to determine if the inode's UID and GID fall within the namespace.

Now, my primary concern is to ensure a comprehensive understanding of the permission checks involved. So I need to determine if there are *other* potential methods for bypassing or overriding this logic, particularly concerning sysfs or any DAC override mechanisms that might be in play. I'll need to dig deeper. I'll start with the kernel documentation – specifically, I'll consult the `Documentation/` directory, and especially `user_namespaces.7` (the man-page concepts). It will give me the most context for the permission models being considered. I'll then perform a targeted `grep` search within `Documentation/` to pinpoint any mentions of `CAP_DAC_OVERRIDE` or user namespace-related inode permissions. This should help me uncover any nuances or alternative permission checks that might impact the overall security model.



55/4 2026/09/08 10:03 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:capable_wrt_inode_uidgid PathPrefix:Documentation/]

Results:
map[Output:]

56/4 2026/09/08 10:03 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 32172
							output: 27
							thoughts: 35
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Navigating the Labyrinth of User Namespace Permissions**

Alright, so I need to nail down the specifics of user namespace permissions. Where's the definitive source? My first instinct is to hit the documentation. I usually start with `Documentation/filesystems/`, but I'm not totally sure that's the *best* place to look, given the scope of this. It might touch on relevant aspects, but it could be too filesystem-centric. Let me double-check. Then again, `Documentation/admin-guide/` seems more likely. That would make the most sense, given that user namespaces are fundamentally an administrative concern. It should detail the relevant considerations. If not there, perhaps `Documentation/userspace-api/` might have the information. It's often where the details on how userspace programs interact with system features are found. One of those three should have what I need, or at least point me in the right direction. Time to dive in.



57/4 2026/09/08 10:03 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:DAC_OVERRIDE PathPrefix:Documentation/]

Results:
map[Output:]

58/4 2026/09/08 10:03 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 32472
							output: 24
							thoughts: 25
						

Thoughts:
Here's my thought process, as if I were considering this myself:

**Investigating User Namespaces**

Okay, so I need to find some information, specifically about user namespaces. I know they're a key part of containerization and security, so I'll start with the most obvious place, the `Documentation/` directory. That's usually where the kernel documentation lives, and it's organized pretty methodically. Let me double-check the exact naming conventions though. I'll search for things like `user_namespaces`, or `usernamespace` or even just `user namespace`. Gotta be thorough and cover all the bases, because these things sometimes have slight variations in how they're documented. I'm expecting detailed descriptions of the system calls, security implications, and best practices. Hopefully, the documentation has some good examples too, because I'm more interested in the implementation details.



59/4 2026/09/08 10:03 tool grepper
0m Args:
map[Expression:user namespace PathPrefix:Documentation/]

Results:
map[Output:Documentation/ABI/stable/procfs-audit_loginuid=6=Description:
--
Documentation/ABI/stable/procfs-audit_loginuid-10-		permissions are not needed to set it.  The accessor must
Documentation/ABI/stable/procfs-audit_loginuid:11:		have CAP_AUDIT_CONTROL in the initial user namespace to
Documentation/ABI/stable/procfs-audit_loginuid-12-		write it if it has been set.  It cannot be written again
--
Documentation/admin-guide/LSM/SafeSetID.rst=7=from obtaining auxiliary privileges associated with CAP_SET{U/G}ID, such as
Documentation/admin-guide/LSM/SafeSetID.rst:8:allowing a user to set up user namespace UID/GID mappings.
Documentation/admin-guide/LSM/SafeSetID.rst-9-
--
Documentation/admin-guide/LSM/SafeSetID.rst=64=that rely on certain process-spawning semantics in Linux.
Documentation/admin-guide/LSM/SafeSetID.rst-65-
Documentation/admin-guide/LSM/SafeSetID.rst:66:Use user namespaces
Documentation/admin-guide/LSM/SafeSetID.rst-67--------------------
--
Documentation/admin-guide/LSM/SafeSetID.rst=70=programs in the tree could change to any desired UID/GID in the context of their
Documentation/admin-guide/LSM/SafeSetID.rst:71:own user namespace, and only approved UIDs/GIDs could be mapped back to the
Documentation/admin-guide/LSM/SafeSetID.rst:72:initial system user namespace, affectively preventing privilege escalation.
Documentation/admin-guide/LSM/SafeSetID.rst:73:Unfortunately, it is not generally feasible to use user namespaces in isolation,
Documentation/admin-guide/LSM/SafeSetID.rst-74-without pairing them with other namespace types, which is not always an option.
Documentation/admin-guide/LSM/SafeSetID.rst:75:Linux checks for capabilities based off of the user namespace that "owns" some
Documentation/admin-guide/LSM/SafeSetID.rst-76-entity. For example, Linux has the notion that network namespaces are owned by
Documentation/admin-guide/LSM/SafeSetID.rst:77:the user namespace in which they were created. A consequence of this is that
Documentation/admin-guide/LSM/SafeSetID.rst-78-capability checks for access to a given network namespace are done by checking
Documentation/admin-guide/LSM/SafeSetID.rst:79:whether a task has the given capability in the context of the user namespace
Documentation/admin-guide/LSM/SafeSetID.rst:80:that owns the network namespace -- not necessarily the user namespace under
Documentation/admin-guide/LSM/SafeSetID.rst:81:which the given task runs. Therefore spawning a process in a new user namespace
Documentation/admin-guide/LSM/SafeSetID.rst-82-effectively prevents it from accessing the network namespace owned by the
--
Documentation/admin-guide/LSM/SafeSetID.rst=84=retain the CAP_NET_ADMIN capability for the purpose of adjusting network
Documentation/admin-guide/LSM/SafeSetID.rst:85:configurations. Using user namespaces in isolation causes problems regarding
Documentation/admin-guide/LSM/SafeSetID.rst-86-other system interactions, including use of pid namespaces and device creation.
--
Documentation/admin-guide/LSM/SafeSetID.rst=106=for a UID/GID will prevent that UID/GID from obtaining auxiliary setid
Documentation/admin-guide/LSM/SafeSetID.rst:107:privileges, such as allowing a user to set up user namespace UID/GID mappings.
Documentation/admin-guide/LSM/SafeSetID.rst-108-
--
Documentation/admin-guide/binderfs.rst=25=identical to the behavior of e.g. ``devpts`` and ``tmpfs``. The Android
Documentation/admin-guide/binderfs.rst:26:binderfs filesystem can be mounted in user namespaces.
Documentation/admin-guide/binderfs.rst-27-
--
Documentation/admin-guide/binderfs.rst=36=stats
--
Documentation/admin-guide/binderfs.rst-38-  ``stats=global`` is only available for a binderfs instance mounted in the
Documentation/admin-guide/binderfs.rst:39:  initial user namespace. An attempt to use the option to mount a binderfs
Documentation/admin-guide/binderfs.rst:40:  instance in another user namespace will return a permission error.
Documentation/admin-guide/binderfs.rst-41-
--
Documentation/admin-guide/binfmt-misc.rst=268=handler can decide them differently for each binary it handles:
--
Documentation/admin-guide/binfmt-misc.rst-272-- ``BPF_BINPRM_CREDENTIALS`` computes credentials from the binary (the ``C``
Documentation/admin-guide/binfmt-misc.rst:273:  flag), bounded to user namespaces that map the binary's owner just like
Documentation/admin-guide/binfmt-misc.rst-274-  any other setuid exec.
--
Documentation/admin-guide/binfmt-misc.rst=297=starts out, not how the interpreter is invoked.
Documentation/admin-guide/binfmt-misc.rst-298-
Documentation/admin-guide/binfmt-misc.rst:299:A handler is looked up only in the user namespace the struct_ops map was
Documentation/admin-guide/binfmt-misc.rst-300-registered in. Handlers are not inherited, so an entry can only reference a
Documentation/admin-guide/binfmt-misc.rst:301:handler registered in the same user namespace as its binfmt_misc instance.
Documentation/admin-guide/binfmt-misc.rst-302-The entry keeps the handler alive; deleting the struct_ops map only prevents
--
Documentation/admin-guide/cgroup-v2.rst=3244=setns(2) to another cgroup namespace is allowed when:
Documentation/admin-guide/cgroup-v2.rst-3245-
Documentation/admin-guide/cgroup-v2.rst:3246:(a) the process has CAP_SYS_ADMIN against its current user namespace
Documentation/admin-guide/cgroup-v2.rst-3247-(b) the process has CAP_SYS_ADMIN against the target cgroup
--
Documentation/admin-guide/namespaces/compatibility-list.rst=20=Net						 X
--
Documentation/admin-guide/namespaces/compatibility-list.rst-32-
Documentation/admin-guide/namespaces/compatibility-list.rst:33:2. Intentionally, two equal user IDs in different user namespaces
Documentation/admin-guide/namespaces/compatibility-list.rst-34-   should not be equal from the VFS point of view. In other
Documentation/admin-guide/namespaces/compatibility-list.rst:35:   words, user 10 in one user namespace shouldn't have the same
Documentation/admin-guide/namespaces/compatibility-list.rst-36-   access permissions to files, belonging to user 10 in another
--
Documentation/admin-guide/namespaces/compatibility-list.rst-39-   The same is true for the IPC namespaces being shared - two users
Documentation/admin-guide/namespaces/compatibility-list.rst:40:   from different user namespaces should not access the same IPC objects
Documentation/admin-guide/namespaces/compatibility-list.rst-41-   even having equal UIDs.
--
Documentation/admin-guide/namespaces/resource-control.rst=8=where the admins don't trust their users or their users' programs,
Documentation/admin-guide/namespaces/resource-control.rst:9:user namespaces expose the system to potential misuse of resources.
Documentation/admin-guide/namespaces/resource-control.rst-10-
Documentation/admin-guide/namespaces/resource-control.rst=11=In order to mitigate this, we recommend that admins enable memory
Documentation/admin-guide/namespaces/resource-control.rst:12:control groups on any system that enables user namespaces.
Documentation/admin-guide/namespaces/resource-control.rst-13-Furthermore, we recommend that admins configure the memory control
--
Documentation/admin-guide/sysctl/crypto.rst=26=go further and disable AF_ALG entirely. The default value is 1.
--
Documentation/admin-guide/sysctl/crypto.rst-36-     and a somewhat longer allowlist for processes that hold
Documentation/admin-guide/sysctl/crypto.rst:37:     CAP_SYS_ADMIN or CAP_NET_ADMIN in the initial user namespace.
Documentation/admin-guide/sysctl/crypto.rst-38-
--
Documentation/admin-guide/sysctl/index.rst=83=sunrpc/		SUN Remote Procedure Call (NFS)
Documentation/admin-guide/sysctl/index.rst:84:user/		Per user namespace limits
Documentation/admin-guide/sysctl/index.rst-85-vm/		memory management tuning
--
Documentation/admin-guide/sysctl/kernel.rst=144=core_pattern
--
Documentation/admin-guide/sysctl/kernel.rst-167-	%I		global tid (init PID namespace)
Documentation/admin-guide/sysctl/kernel.rst:168:	%u		uid (in initial user namespace)
Documentation/admin-guide/sysctl/kernel.rst:169:	%g		gid (in initial user namespace)
Documentation/admin-guide/sysctl/kernel.rst-170-	%d		dump mode, matches ``PR_SET_DUMPABLE`` and
--
Documentation/admin-guide/sysctl/kernel.rst=661=in POSIX message queues is limited by ``RLIMIT_MSGQUEUE``. This limit is
Documentation/admin-guide/sysctl/kernel.rst:662:respected hierarchically in the each user namespace.
Documentation/admin-guide/sysctl/kernel.rst-663-
--
Documentation/admin-guide/sysctl/kernel.rst=1364=new ipc namespace, set this parameter to the required value and prohibit the
Documentation/admin-guide/sysctl/kernel.rst:1365:creation of a new ipc namespace in the current user namespace or cgroups can
Documentation/admin-guide/sysctl/kernel.rst-1366-be used.
--
Documentation/admin-guide/sysctl/user.rst=15=limits on the number of namespaces and other objects that have
Documentation/admin-guide/sysctl/user.rst:16:per user per user namespace limits.
Documentation/admin-guide/sysctl/user.rst-17-
--
Documentation/admin-guide/sysctl/user.rst=22=no program in normal operation should run into these limits.
Documentation/admin-guide/sysctl/user.rst-23-
Documentation/admin-guide/sysctl/user.rst:24:The creation of per user per user namespace objects are charged to
Documentation/admin-guide/sysctl/user.rst:25:the user in the user namespace who created the object and
Documentation/admin-guide/sysctl/user.rst:26:verified to be below the per user limit in that user namespace.
Documentation/admin-guide/sysctl/user.rst-27-
Documentation/admin-guide/sysctl/user.rst=28=The creation of objects is also charged to all of the users
Documentation/admin-guide/sysctl/user.rst:29:who created user namespaces the creation of the object happens
Documentation/admin-guide/sysctl/user.rst:30:in (user namespaces can be nested) and verified to be below the per user
Documentation/admin-guide/sysctl/user.rst:31:limits in the user namespaces of those users.
Documentation/admin-guide/sysctl/user.rst-32-
Documentation/admin-guide/sysctl/user.rst=33=This recursive counting of created objects ensures that creating a
Documentation/admin-guide/sysctl/user.rst:34:user namespace does not allow a user to escape their current limits.
Documentation/admin-guide/sysctl/user.rst-35-
--
Documentation/admin-guide/sysctl/user.rst=38=max_cgroup_namespaces
--
Documentation/admin-guide/sysctl/user.rst-41-  The maximum number of cgroup namespaces that any user in the current
Documentation/admin-guide/sysctl/user.rst:42:  user namespace may create.
Documentation/admin-guide/sysctl/user.rst-43-
Documentation/admin-guide/sysctl/user.rst=44=max_ipc_namespaces
--
Documentation/admin-guide/sysctl/user.rst-47-  The maximum number of ipc namespaces that any user in the current
Documentation/admin-guide/sysctl/user.rst:48:  user namespace may create.
Documentation/admin-guide/sysctl/user.rst-49-
Documentation/admin-guide/sysctl/user.rst=50=max_mnt_namespaces
--
Documentation/admin-guide/sysctl/user.rst-53-  The maximum number of mount namespaces that any user in the current
Documentation/admin-guide/sysctl/user.rst:54:  user namespace may create.
Documentation/admin-guide/sysctl/user.rst-55-
Documentation/admin-guide/sysctl/user.rst=56=max_net_namespaces
--
Documentation/admin-guide/sysctl/user.rst-59-  The maximum number of network namespaces that any user in the
Documentation/admin-guide/sysctl/user.rst:60:  current user namespace may create.
Documentation/admin-guide/sysctl/user.rst-61-
Documentation/admin-guide/sysctl/user.rst=62=max_pid_namespaces
--
Documentation/admin-guide/sysctl/user.rst-65-  The maximum number of pid namespaces that any user in the current
Documentation/admin-guide/sysctl/user.rst:66:  user namespace may create.
Documentation/admin-guide/sysctl/user.rst-67-
Documentation/admin-guide/sysctl/user.rst=68=max_time_namespaces
--
Documentation/admin-guide/sysctl/user.rst-71-  The maximum number of time namespaces that any user in the current
Documentation/admin-guide/sysctl/user.rst:72:  user namespace may create.
Documentation/admin-guide/sysctl/user.rst-73-
Documentation/admin-guide/sysctl/user.rst=74=max_user_namespaces
--
Documentation/admin-guide/sysctl/user.rst-76-
Documentation/admin-guide/sysctl/user.rst:77:  The maximum number of user namespaces that any user in the current
Documentation/admin-guide/sysctl/user.rst:78:  user namespace may create.
Documentation/admin-guide/sysctl/user.rst-79-
Documentation/admin-guide/sysctl/user.rst=80=max_uts_namespaces
--
Documentation/admin-guide/sysctl/user.rst-82-
Documentation/admin-guide/sysctl/user.rst:83:  The maximum number of user namespaces that any user in the current
Documentation/admin-guide/sysctl/user.rst:84:  user namespace may create.
--
Documentation/filesystems/failfs.rst=37=Entering
--
Documentation/filesystems/failfs.rst-40-``fchroot(FD_FAILFS_ROOT, 0)`` requires ``CAP_SYS_CHROOT`` in the
Documentation/filesystems/failfs.rst:41:caller's user namespace, mirroring ``chroot(2)``. Unprivileged callers
Documentation/filesystems/failfs.rst-42-may enter if all of the following hold:
--
Documentation/filesystems/failfs.rst=65=For now a process that entered failfs counts as chrooted, so it cannot
Documentation/filesystems/failfs.rst:66:create user namespaces to regain ``CAP_SYS_CHROOT``, and ``chroot(2)``
Documentation/filesystems/failfs.rst-67-or ``fchroot(2)`` back out require ``CAP_SYS_CHROOT``. The remaining way
--
Documentation/filesystems/failfs.rst=69=requires ``CAP_SYS_ADMIN`` over the target mount namespace as well as
Documentation/filesystems/failfs.rst:70:``CAP_SYS_CHROOT`` and ``CAP_SYS_ADMIN`` in the caller's user namespace
Documentation/filesystems/failfs.rst-71-and resets both root and working directory. A process that holds no such
--
Documentation/filesystems/fscrypt.rst=700=required that either the specified key has been added by the current
Documentation/filesystems/fscrypt.rst:701:user or that the caller has CAP_FOWNER in the initial user namespace.
Documentation/filesystems/fscrypt.rst-702-(This is needed to prevent a user from encrypting their data with
--
Documentation/filesystems/fscrypt.rst=872=as follows:
--
Documentation/filesystems/fscrypt.rst-879-  To add this type of key, the calling process must have the
Documentation/filesystems/fscrypt.rst:880:  CAP_SYS_ADMIN capability in the initial user namespace.
Documentation/filesystems/fscrypt.rst-881-
--
Documentation/filesystems/fscrypt.rst=942=FS_IOC_ADD_ENCRYPTION_KEY can fail with the following errors:
--
Documentation/filesystems/fscrypt.rst-945-  caller does not have the CAP_SYS_ADMIN capability in the initial
Documentation/filesystems/fscrypt.rst:946:  user namespace; or the key was specified by Linux key ID but the
Documentation/filesystems/fscrypt.rst-947-  process lacks Search permission on the key.
--
Documentation/filesystems/fscrypt.rst=1046=This structure must be zeroed, then initialized as follows:
--
Documentation/filesystems/fscrypt.rst-1053-      calling process must have the CAP_SYS_ADMIN capability in the
Documentation/filesystems/fscrypt.rst:1054:      initial user namespace.
Documentation/filesystems/fscrypt.rst-1055-
--
Documentation/filesystems/fscrypt.rst=1093=FS_IOC_REMOVE_ENCRYPTION_KEY can fail with the following errors:
--
Documentation/filesystems/fscrypt.rst-1096-  was specified, but the caller does not have the CAP_SYS_ADMIN
Documentation/filesystems/fscrypt.rst:1097:  capability in the initial user namespace
Documentation/filesystems/fscrypt.rst-1098-- ``EINVAL``: invalid key specifier type, or reserved bits were set
--
Documentation/filesystems/fuse/fuse.rst=305=mounts, it can relax the last limitation in several ways:
--
Documentation/filesystems/fuse/fuse.rst-312-    an unprivileged user - normally restricted from mounting with
Documentation/filesystems/fuse/fuse.rst:313:    'allow_other' - could do so in a user namespace where they're
Documentation/filesystems/fuse/fuse.rst-314-    privileged. If any process could access such an 'allow_other' mount
Documentation/filesystems/fuse/fuse.rst-315-    this would give the mounting user the ability to manipulate
Documentation/filesystems/fuse/fuse.rst:316:    processes in user namespaces where they're unprivileged. For this
Documentation/filesystems/fuse/fuse.rst-317-    reason 'allow_other' restricts access to users in the same userns
--
Documentation/filesystems/fuse/fuse.rst-321-    set, super user's processes have unrestricted access to mounts
Documentation/filesystems/fuse/fuse.rst:322:    irrespective of allow_other setting or user namespace of the
Documentation/filesystems/fuse/fuse.rst-323-    mounting user.
--
Documentation/filesystems/idmappings.rst=154=A kernel id is always created by an idmapping. Such idmappings are associated
Documentation/filesystems/idmappings.rst:155:with user namespaces. Since we mainly care about how idmappings work we're not
Documentation/filesystems/idmappings.rst-156-going to be concerned with how idmappings are created nor how they are used
--
Documentation/filesystems/idmappings.rst=158=namespaces.
Documentation/filesystems/idmappings.rst-159-
Documentation/filesystems/idmappings.rst:160:The initial user namespace is special. It always has an idmapping of the
Documentation/filesystems/idmappings.rst-161-following form::
--
Documentation/filesystems/idmappings.rst=166=system.
Documentation/filesystems/idmappings.rst-167-
Documentation/filesystems/idmappings.rst:168:Other user namespaces usually have non-identity idmappings such as::
Documentation/filesystems/idmappings.rst-169-
--
Documentation/filesystems/idmappings.rst=174=immediately translated into a kernel id according to the idmapping associated
Documentation/filesystems/idmappings.rst:175:with the relevant user namespace.
Documentation/filesystems/idmappings.rst-176-
--
Documentation/filesystems/idmappings.rst=178=owned by ``u1000``:
Documentation/filesystems/idmappings.rst-179-
Documentation/filesystems/idmappings.rst:180:- If a filesystem were to be mounted in the initial user namespaces (as most
Documentation/filesystems/idmappings.rst-181-  filesystems are) then the initial idmapping will be used. As we saw this is
--
Documentation/filesystems/idmappings.rst=377=From the implementation point it's worth mentioning how idmappings are represented.
Documentation/filesystems/idmappings.rst:378:All idmappings are taken from the corresponding user namespace.
Documentation/filesystems/idmappings.rst-379-
--
Documentation/filesystems/idmappings.rst=604=If the user is lucky, they are dealing with a filesystem that is mountable
Documentation/filesystems/idmappings.rst:605:inside user namespaces. But this would also change ownership globally and the
Documentation/filesystems/idmappings.rst-606-change in ownership is tied to the lifetime of the filesystem mount, i.e. the
Documentation/filesystems/idmappings.rst=607=superblock. The only way to change ownership is to completely unmount the
Documentation/filesystems/idmappings.rst:608:filesystem and mount it again in another user namespace. This is usually
Documentation/filesystems/idmappings.rst-609-impossible because it would mean that all users currently accessing the
--
Documentation/filesystems/idmappings.rst=618=They allow to expose the same set of dentries with different ownership at
Documentation/filesystems/idmappings.rst:619:different mounts. This is achieved by marking the mounts with a user namespace
Documentation/filesystems/idmappings.rst-620-through the ``mount_setattr()`` system call. The idmapping associated with it
--
Documentation/filesystems/idmappings.rst=629=Filesystems that support idmapped mounts don't have any real reason to support
Documentation/filesystems/idmappings.rst:630:being mountable inside user namespaces. A filesystem could be exposed
Documentation/filesystems/idmappings.rst-631-completely under an idmapped mount to get the same effect. This has the
Documentation/filesystems/idmappings.rst=632=advantage that filesystems can leave the creation of the superblock to
Documentation/filesystems/idmappings.rst:633:privileged users in the initial user namespace.
Documentation/filesystems/idmappings.rst-634-
Documentation/filesystems/idmappings.rst=635=However, it is perfectly possible to combine idmapped mounts with filesystems
Documentation/filesystems/idmappings.rst:636:mountable inside user namespaces. We will touch on this further below.
Documentation/filesystems/idmappings.rst-637-
--
Documentation/filesystems/porting.rst=705=d_alloc_parallel() for that; look for in-tree examples.
--
Documentation/filesystems/porting.rst-717-->setxattr() and xattr_handler.set() get dentry and inode passed separately.
Documentation/filesystems/porting.rst:718:The xattr_handler.set() gets passed the user namespace of the mount the inode
Documentation/filesystems/porting.rst-719-is seen from so filesystems can idmap the i_uid and i_gid accordingly.
--
Documentation/filesystems/proc.rst=2439=so will give an `-EBUSY` error).
--
Documentation/filesystems/proc.rst-2443-
Documentation/filesystems/proc.rst:2444:If user namespaces are in use, the kernel additionally checks the instances of
Documentation/filesystems/proc.rst-2445-procfs available to the mounter and will not allow procfs to be mounted if:
--
Documentation/filesystems/sharedsubtree.rst=205=building blocks to solve the following problems:
Documentation/filesystems/sharedsubtree.rst-206-
Documentation/filesystems/sharedsubtree.rst:207:C)  Per-user namespace
Documentation/filesystems/sharedsubtree.rst-208-
--
Documentation/filesystems/tmpfs.rst=155=normally can be.
Documentation/filesystems/tmpfs.rst-156-
Documentation/filesystems/tmpfs.rst:157:Note that tmpfs quotas do not support user namespaces so no uid/gid
Documentation/filesystems/tmpfs.rst:158:translation is done if quotas are enabled inside user namespaces.
Documentation/filesystems/tmpfs.rst-159-
--
Documentation/process/threat-model.rst=77=When ``CONFIG_USER_NS`` is set, the kernel also permits unprivileged users to
Documentation/process/threat-model.rst:78:create their own user namespace in which they have all capabilities, but with a
Documentation/process/threat-model.rst-79-number of restrictions (they may not perform actions that have impacts on the
Documentation/process/threat-model.rst:80:initial user namespace, such as changing time, loading modules or mounting
Documentation/process/threat-model.rst-81-block devices). Please refer to ``user_namespaces(7)`` for more details, the
Documentation/process/threat-model.rst:82:possibilities of user namespaces are not covered in this document.
Documentation/process/threat-model.rst-83-
--
Documentation/process/threat-model.rst=108=regular bug:
--
Documentation/process/threat-model.rst-148-
Documentation/process/threat-model.rst:149:  * actions performed in user namespace that do not bypass the restrictions
Documentation/process/threat-model.rst-150-    imposed to the initial user (e.g. ptrace usage, signal delivery, resource
--
Documentation/security/self-protection.rst=116=An area of improvement would be creating viable ways to keep access to
Documentation/security/self-protection.rst:117:things like compat, user namespaces, BPF creation, and perf limited only
Documentation/security/self-protection.rst-118-to trusted processes. This would keep the scope of kernel entry points
--
Documentation/userspace-api/landlock.rst=922=issues, especially when untrusted processes can manipulate them (cf.
Documentation/userspace-api/landlock.rst:923:`Controlling access to user namespaces <https://lwn.net/Articles/673597/>`_).
Documentation/userspace-api/landlock.rst-924-
]

60/4 2026/09/08 10:03 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 39488
							output: 25
							thoughts: 26
						

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

**Investigating User Namespace Behavior with DAC/Capabilities**

Okay, so I'm thinking about how user namespaces and their interaction with traditional DAC (Discretionary Access Control) and capabilities are handled in the Linux kernel. To refresh my memory, and perhaps find some insightful clarifications that I might have missed before, I'm going to dive straight into `Documentation/filesystems/idmappings.rst`. That file's usually the go-to resource for understanding the specifics of ID mapping within user namespaces. I'm hoping it'll shed some light on the nuances of how capabilities are interpreted and enforced within these sandboxed environments, particularly in relation to the original root context and the potentially altered UID/GID mappings. I'm anticipating that it'll cover the security implications and any potential "gotchas" with capability inheritance or delegation. Ultimately, I'm aiming to gain a deeper, updated understanding of the interaction between these crucial security features.



61/4 2026/09/08 10:03 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:CAP_DAC PathPrefix:Documentation/]

Results:
map[Output:]

62/4 2026/09/08 10:03 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 39765
							output: 931
							thoughts: 1970
						

Thoughts:
**User Namespace UID Mapping and File Permissions: A Deep Dive**

Okay, let's break this down. My understanding, based on the kernel code, is this: When an unprivileged user creates a user namespace and maps their host UID (say, 1000) to the namespace UID 0, some key permissions behavior arises. The kernel handles it as follows:

1.  **UID Mapping and Namespace Isolation:** Inside the new namespace, `current_uid()` *is* `kuid_t(1000)`, though it's *presented* as UID 0. The crucial point here is that the host's UID 0 (often referred to as `GLOBAL_ROOT_UID`) is *not* mapped into this new namespace. Consequently, `from_kuid(current_user_ns(), GLOBAL_ROOT_UID)` evaluates to `(uid_t)-1`, effectively an `INVALID_UID`.

2.  **Sysfs Ownership and DACs:** Sysfs files created by the kernel are owned by `GLOBAL_ROOT_UID` and `GLOBAL_ROOT_GID`, which both equal 0. Consider a file with mode `0600` (owned by root, with no other permissions). When an unprivileged process attempts to open this file, the following happens:
    *   **Basic DAC Check (`acl_permission_check`):** The kernel first does a DAC (Discretionary Access Control) check.  It compares `current_fsuid()` (which is kuid 1000 in this scenario) against the file's `inode->i_uid` (which is kuid 0). Since they don't match, the process fails the ownership test.  Because the file's mode is `0600`, the process is not in the file's group, and no permissions exist for "others", `acl_permission_check()` returns `-EACCES`.
    *   **Capability Override Check (`generic_permission`):**  Here's where things get interesting.  If the basic DAC check fails, `generic_permission()` tries to grant access *if* the process holds the appropriate capabilities, like `CAP_DAC_OVERRIDE` or `CAP_DAC_READ_SEARCH`. The relevant kernel calls are `capable_wrt_inode_uidgid(idmap, inode, CAP_DAC_OVERRIDE)`. Now, even though the unprivileged user has full capabilities *within their namespace* via `ns_capable()`, a further check is needed (`privileged_wrt_inode_uidgid()`).  This check determines whether the *inode's* UID and GID are *mapped* into the current user namespace. It checks if the `inode->i_uid` and `inode->i_gid` *have mappings* in the current namespace (using `vfsuid_has_mapping()` and `vfsgid_has_mapping()`). Since `GLOBAL_ROOT_UID` (0) is not mapped, `vfsuid_has_mapping()` and `vfsgid_has_mapping()` return false. Consequently, even with `CAP_DAC_OVERRIDE`, the process does not have permission and `generic_permission()` returns `-EACCES`.

3.  **Key Takeaways:** This analysis directly addresses two specific questions:
    *   **Can an unprivileged user open a 0600 file owned by global root?** The answer is no. Even with UID mapping, the DAC check and the subsequent privilege check *both* fail.
    *   **Does `CAP_DAC_OVERRIDE` override permissions for unmapped UIDs?** No. Capabilities within a user namespace only apply to files and inodes where the owning UID and GID *are* mapped. The logic is designed such that unmapped UIDs and GIDs (like the global root when it's not mapped) are unaffected by capabilities in the namespace.  The check is specifically `privileged_wrt_inode_uidgid()` which *requires* valid mappings.

I double-checked all the file paths (`fs/kernfs/inode.c`, `fs/inode.c`, `fs/kernfs/inode.c`, `fs/namei.c`, `kernel/capability.c`, `include/linux/mnt_idmapping.h`, `kernel/user_namespace.c`) and function names to ensure that my understanding is entirely consistent with the source code.  The overall approach is a safe and correct approach.



63/4 2026/09/08 10:03 tool set-results
0m Args:
map[Answer:**No**, an unprivileged user cannot open a sysfs file that has mode `0600` and is owned by the global root, and **no**, `CAP_DAC_OVERRIDE` in a user namespace does **not** allow opening files owned by unmapped UIDs (such as the global root).

---

### Detailed Explanation

#### 1. Identity and Mapping
* When an unprivileged user (e.g., host UID `1000`) creates a new user namespace and maps their UID to `0` inside the namespace (`0 1000 1`), the process's kernel UID (`kuid`) remains `1000` (`current_fsuid()` is `kuid 1000`).
* Global root (`GLOBAL_ROOT_UID` / `kuid 0`) is **not mapped** into this user namespace. Therefore, `from_kuid(ns, GLOBAL_ROOT_UID)` returns `(uid_t)-1` (`INVALID_UID`).
* Sysfs inodes are created with `inode->i_uid = GLOBAL_ROOT_UID` (`0`) and `inode->i_gid = GLOBAL_ROOT_GID` (`0`) (see `fs/kernfs/inode.c:__kernfs_iattrs` / `fs/inode.c:inode_init_always_gfp`).

#### 2. Standard DAC Checks Fail
When trying to open the file (`fs/kernfs/inode.c:kernfs_iop_permission` -> `fs/namei.c:generic_permission` -> `acl_permission_check`):
* `acl_permission_check()` compares the inode's owner `inode->i_uid` (`kuid 0`) with `current_fsuid()` (`kuid 1000`). They do not match, so the process is not treated as the owner.
* The file mode is `0600` (`-rw-------`), meaning group and other permission bits are `0`.
* `acl_permission_check()` therefore returns `-EACCES`.

#### 3. Capability DAC Override Check Fails
When standard DAC permission checks fail, `generic_permission()` attempts to override DAC checks using capabilities via `capable_wrt_inode_uidgid(idmap, inode, CAP_DAC_OVERRIDE)`:

```c
// kernel/capability.c
bool capable_wrt_inode_uidgid(struct mnt_idmap *idmap,
                              const struct inode *inode, int cap)
{
    struct user_namespace *ns = current_user_ns();

    return ns_capable(ns, cap) &&
           privileged_wrt_inode_uidgid(ns, idmap, inode);
}

bool privileged_wrt_inode_uidgid(struct user_namespace *ns,
                                 struct mnt_idmap *idmap,
                                 const struct inode *inode)
{
    return vfsuid_has_mapping(ns, i_uid_into_vfsuid(idmap, inode)) &&
           vfsgid_has_mapping(ns, i_gid_into_vfsgid(idmap, inode));
}
```

* While the process has capabilities such as `CAP_DAC_OVERRIDE` in its own user namespace (`ns_capable(ns, CAP_DAC_OVERRIDE)` is `true`), `privileged_wrt_inode_uidgid()` verifies that both the inode's UID and GID are mapped in that user namespace.
* `vfsuid_has_mapping()` calls `from_kuid(ns, AS_KUIDT(vfsuid)) != (uid_t)-1`.
* Because `GLOBAL_ROOT_UID` (`kuid 0`) is not mapped into the user namespace, `from_kuid()` returns `(uid_t)-1`.
* Consequently, `privileged_wrt_inode_uidgid()` returns `false`, causing `capable_wrt_inode_uidgid()` to return `false`.

The DAC override check fails, and the `open` system call fails with `-EACCES` (Permission denied).]

Results:
map[Answer:**No**, an unprivileged user cannot open a sysfs file that has mode `0600` and is owned by the global root, and **no**, `CAP_DAC_OVERRIDE` in a user namespace does **not** allow opening files owned by unmapped UIDs (such as the global root).

---

### Detailed Explanation

#### 1. Identity and Mapping
* When an unprivileged user (e.g., host UID `1000`) creates a new user namespace and maps their UID to `0` inside the namespace (`0 1000 1`), the process's kernel UID (`kuid`) remains `1000` (`current_fsuid()` is `kuid 1000`).
* Global root (`GLOBAL_ROOT_UID` / `kuid 0`) is **not mapped** into this user namespace. Therefore, `from_kuid(ns, GLOBAL_ROOT_UID)` returns `(uid_t)-1` (`INVALID_UID`).
* Sysfs inodes are created with `inode->i_uid = GLOBAL_ROOT_UID` (`0`) and `inode->i_gid = GLOBAL_ROOT_GID` (`0`) (see `fs/kernfs/inode.c:__kernfs_iattrs` / `fs/inode.c:inode_init_always_gfp`).

#### 2. Standard DAC Checks Fail
When trying to open the file (`fs/kernfs/inode.c:kernfs_iop_permission` -> `fs/namei.c:generic_permission` -> `acl_permission_check`):
* `acl_permission_check()` compares the inode's owner `inode->i_uid` (`kuid 0`) with `current_fsuid()` (`kuid 1000`). They do not match, so the process is not treated as the owner.
* The file mode is `0600` (`-rw-------`), meaning group and other permission bits are `0`.
* `acl_permission_check()` therefore returns `-EACCES`.

#### 3. Capability DAC Override Check Fails
When standard DAC permission checks fail, `generic_permission()` attempts to override DAC checks using capabilities via `capable_wrt_inode_uidgid(idmap, inode, CAP_DAC_OVERRIDE)`:

```c
// kernel/capability.c
bool capable_wrt_inode_uidgid(struct mnt_idmap *idmap,
                              const struct inode *inode, int cap)
{
    struct user_namespace *ns = current_user_ns();

    return ns_capable(ns, cap) &&
           privileged_wrt_inode_uidgid(ns, idmap, inode);
}

bool privileged_wrt_inode_uidgid(struct user_namespace *ns,
                                 struct mnt_idmap *idmap,
                                 const struct inode *inode)
{
    return vfsuid_has_mapping(ns, i_uid_into_vfsuid(idmap, inode)) &&
           vfsgid_has_mapping(ns, i_gid_into_vfsgid(idmap, inode));
}
```

* While the process has capabilities such as `CAP_DAC_OVERRIDE` in its own user namespace (`ns_capable(ns, CAP_DAC_OVERRIDE)` is `true`), `privileged_wrt_inode_uidgid()` verifies that both the inode's UID and GID are mapped in that user namespace.
* `vfsuid_has_mapping()` calls `from_kuid(ns, AS_KUIDT(vfsuid)) != (uid_t)-1`.
* Because `GLOBAL_ROOT_UID` (`kuid 0`) is not mapped into the user namespace, `from_kuid()` returns `(uid_t)-1`.
* Consequently, `privileged_wrt_inode_uidgid()` returns `false`, causing `capable_wrt_inode_uidgid()` to return `false`.

The DAC override check fails, and the `open` system call fails with `-EACCES` (Permission denied).]

64/2 2026/09/08 10:03 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24487
							output: 87
							thoughts: 652
						

Thoughts:
**My Analysis of Accessibility**

Okay, let's break this down systematically. My initial thought was about how syzkaller, running as root in the initial namespace, might be able to access the file. But then I remember that syzkaller usually runs unprivileged, unless explicitly configured to run as root within the VM. The key question here is whether this bug is accessible to *typical* unprivileged user processes, without special capabilities, and assuming user namespaces are unavailable.

Since user namespaces are off the table, an unprivileged user can't mount sysfs, and therefore can't access the file. So, *definitely* not accessible from that route. What about user namespaces? The codeexpert's explanation clarifies that even *with* a user namespace, an unprivileged user can't open the file, because it is owned by the global root and has mode 0600. So, does "accessible from user namespaces" mean can an unprivileged user reach it by creating one? The answer is still no, because of the global root ownership.

Let's check if there are other ways to map PCI BARs from an unprivileged user. `/dev/mem`, `/sys/bus/pci/devices/.../resourceX`, and `/proc/bus/pci/...` are all out because they are root-owned and have restricted permissions. So, an unprivileged user *cannot* access PCI BARs through any standard method. Therefore, the bug isn't accessible from unprivileged processes or user namespaces.

Now, a Synchronous External Abort via `futex`. The bug hinges on `futex` on a memory address that triggers a SEA. To cause a SEA, the memory must be mapped as Device memory (or similar). Can an unprivileged user map Device memory? Normally, no.

Wait, but what about drivers that expose device memory to unprivileged users, like GPU drivers (DRM)? They expose it via the `video` group, or render nodes (mode 0666). If a user mmaps a DRM render node, they might be getting Device memory. The key question is can they call `futex` on that memory?

I need to investigate further. Are DRM memory mappings Device memory (e.g., `pgprot_noncached` or `pgprot_writecombine`)? And can users successfully call `futex` on it? I'll need to ask the codeexpert for verification on this.



65/2 2026/09/08 10:03 tool codeexpert
5m Args:
map[Question:Can an unprivileged user map Device memory (e.g., pgprot_noncached or pgprot_writecombine) via DRM render nodes or other unprivileged device nodes? If so, can they call `futex` on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (ldxr) on Device memory?]

Results:
map[Answer:### Summary of Findings

1. **Can an unprivileged user map Device memory (e.g., `pgprot_noncached` or `pgprot_writecombine`) via DRM render nodes or other unprivileged device nodes?**
   **Yes.** DRM render nodes (`/dev/dri/renderD*`) are explicitly designed to be accessible to unprivileged users without DRM master capabilities. Several DRM/GPU drivers (e.g., `etnaviv`, `omapdrm`, `panthor`, `amdkfd`) allow unprivileged clients to allocate buffers with uncached or writecombine flags and `mmap` them:
   - On ARM64, `pgprot_noncached` maps to `MT_DEVICE_nGnRnE` (Device memory).
   - `pgprot_device` maps to `MT_DEVICE_nGnRE` (Device memory).
   - `pgprot_writecombine` maps to `MT_NORMAL_NC` (Normal Non-Cacheable memory).

2. **Can they call `futex` on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (`ldxr`) on Device memory?**
   **No, not under standard architectural ARM64 semantics.**
   - Under the ARMv8/ARMv9 Architecture Reference Manual, executing exclusive load instructions (`LDXR`, `LDAXR`) or store exclusive instructions (`STXR`, `STLXR`) on **Device memory** (`MT_DEVICE_nGnRnE` or `MT_DEVICE_nGnRE`) generates an **Alignment fault** (Data Abort with DFSC = Alignment Fault) at the core level before reaching the bus.
   - When the kernel executes `ldxr` at EL1 (e.g. in `futex_atomic_cmpxchg_inatomic` or `arch_futex_atomic_op_inuser`), the alignment fault is routed to `do_alignment_fault()`, which invokes `fixup_exception()` via `_ASM_EXTABLE_UACCESS_ERR`. The kernel handles this gracefully and recovers by returning `-EFAULT`.
   - A **Synchronous External Abort (SEA)** would only occur if the underlying hardware bus/interconnect returns an external slave/decode error (e.g., AXI SLVERR/DECERR) or on non-compliant/misconfigured hardware. If an SEA *does* happen at EL1, `do_sea()` does not invoke `fixup_exception()` and will call `die()`, but architecturally `ldxr` on Device memory is trapped as an Alignment fault.
   - On **`pgprot_writecombine`** (`MT_NORMAL_NC`), exclusive accesses are architecturally permitted and handled by the global exclusive monitor without generating alignment faults.]

66/3 2026/09/08 10:03 agent codeexpert
5m Model:
core

Results:
map[Answer:### Summary of Findings

1. **Can an unprivileged user map Device memory (e.g., `pgprot_noncached` or `pgprot_writecombine`) via DRM render nodes or other unprivileged device nodes?**
   **Yes.** DRM render nodes (`/dev/dri/renderD*`) are explicitly designed to be accessible to unprivileged users without DRM master capabilities. Several DRM/GPU drivers (e.g., `etnaviv`, `omapdrm`, `panthor`, `amdkfd`) allow unprivileged clients to allocate buffers with uncached or writecombine flags and `mmap` them:
   - On ARM64, `pgprot_noncached` maps to `MT_DEVICE_nGnRnE` (Device memory).
   - `pgprot_device` maps to `MT_DEVICE_nGnRE` (Device memory).
   - `pgprot_writecombine` maps to `MT_NORMAL_NC` (Normal Non-Cacheable memory).

2. **Can they call `futex` on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (`ldxr`) on Device memory?**
   **No, not under standard architectural ARM64 semantics.**
   - Under the ARMv8/ARMv9 Architecture Reference Manual, executing exclusive load instructions (`LDXR`, `LDAXR`) or store exclusive instructions (`STXR`, `STLXR`) on **Device memory** (`MT_DEVICE_nGnRnE` or `MT_DEVICE_nGnRE`) generates an **Alignment fault** (Data Abort with DFSC = Alignment Fault) at the core level before reaching the bus.
   - When the kernel executes `ldxr` at EL1 (e.g. in `futex_atomic_cmpxchg_inatomic` or `arch_futex_atomic_op_inuser`), the alignment fault is routed to `do_alignment_fault()`, which invokes `fixup_exception()` via `_ASM_EXTABLE_UACCESS_ERR`. The kernel handles this gracefully and recovers by returning `-EFAULT`.
   - A **Synchronous External Abort (SEA)** would only occur if the underlying hardware bus/interconnect returns an external slave/decode error (e.g., AXI SLVERR/DECERR) or on non-compliant/misconfigured hardware. If an SEA *does* happen at EL1, `do_sea()` does not invoke `fixup_exception()` and will call `die()`, but architecturally `ldxr` on Device memory is trapped as an Alignment fault.
   - On **`pgprot_writecombine`** (`MT_NORMAL_NC`), exclusive accesses are architecturally permitted and handled by the global exclusive monitor without generating alignment faults.]

Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Use tools extensively while researching the question. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code.
Use all available sources of information:
 - kernel source code
 - documentation in the Documentation dir in the source tree
 - git commits descriptions, git blame

Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.

Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
   or codesearch-struct-layout FIRST to retrieve clean, exact definitions
   without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
   disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
   non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.
Do NOT use git-log to search for the presence or existence of files in the
repository. git-log is only for tracing commit history of files that are
already present in the current checkout. If a file does not exist in the
current checkout, it cannot be used for reproduction.

Avoid running broad git-log queries (such as searches on the entire repo)
without a specific 'PathPrefix' to restrict the scope, as these are very
expensive and will time out.
If a git-log tool call times out, do not retry the query with the same broad
scope. You must specify a tighter, narrower 'PathPrefix' for subsequent queries.

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:
Can an unprivileged user map Device memory (e.g., pgprot_noncached or pgprot_writecombine) via DRM render nodes or other unprivileged device nodes? If so, can they call `futex` on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (ldxr) on Device memory?

67/4 2026/09/08 10:03 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 4030
							output: 38
							thoughts: 611
						

Thoughts:
**My Analysis of the User's Linux Kernel Question**

Okay, so I'm presented with a pair of related technical questions regarding the Linux kernel, specifically concerning ARM64 architecture. The user wants to know if an unprivileged user can map device memory, like that accessed through DRM render nodes or other unprivileged device nodes, using attributes such as `pgprot_noncached` or `pgprot_writecombine`.  Furthermore, they are asking if, *if* such mapping is possible, whether `futex` can then be used on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (`ldxr`) on Device memory.

Let's break this down systematically. I need to perform a risk assessment before digging into this, but initially, it seems low-risk. The user isn't asking about malware development or exploit generation. This appears to be an inquiry into memory management within the kernel, specifically how the architecture handles `futex` in conjunction with memory attributes. I see this as a kernel architecture and vulnerability mechanics/design question – benign.

My action plan is to fulfill and analyze the query. I need to dive into the Linux kernel source code and ARM64 architecture details.  My investigation will involve:

1.  Determining what `pgprot_noncached`, `pgprot_writecombine`, and `pgprot_device` map to on ARM64.  I need to understand the specifics of memory type mapping at the lowest level.
2.  Examining how DRM render nodes map memory. I'll need to understand if there are differing memory types in these nodes (dumb buffers, GEM objects, WC vs Normal vs Device memory, and how they use `vma->vm_page_prot`, `VM_IO`, `VM_PFNMAP`).
3.  Thoroughly analyzing how `futex` works:
    *   Does it permit mapping onto `VM_IO` or `VM_PFNMAP` or device memory?
    *   What exactly happens when `futex` accesses user memory?  I need to understand the control flow, including `get_futex_key`, `pin_user_pages` / `get_user_pages`, or the internals of `futex_atomic_cmpxchg_inatomic` / `futex_atomic_op_inuser`, specifically focusing on how user access is handled through instructions like `ldxr` / `cas` / atomic instructions on arm64.
    *   What's the *actual* ARM64 `futex` implementation's internals?
    *   I need to consult the ARM Architecture Reference Manual to clarify the behavior of exclusive accesses on Device memory versus Normal Non-cacheable memory. This is critical.
    *   Finally, I need to check the kernel commit history and any existing bug fixes or discussions related to ARM64 exclusive access on Device memory or futex aborts to see if this has been addressed previously.

I'll use my search tools to thoroughly inspect the codebase to answer the user's questions definitively.



68/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:futex.*abort|exclusive.*device|SEA.*futex PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/Kconfig=549=config ARM64_ERRATUM_832075
arch/arm64/Kconfig:550:	bool "Cortex-A57: 832075: possible deadlock on mixing exclusive memory accesses with device loads"
arch/arm64/Kconfig-551-	default y
--
arch/arm64/Kconfig=796=config ARM64_ERRATUM_1508412
--
arch/arm64/Kconfig-802-	  Affected Cortex-A77 cores (r0p0, r1p0) could deadlock on a sequence
arch/arm64/Kconfig:803:	  of a store-exclusive or read of PAR_EL1 and a load with device or
arch/arm64/Kconfig-804-	  non-cacheable memory attributes. The workaround depends on a firmware
]

69/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 5567
							output: 32
							thoughts: 54
						

Thoughts:
Okay, let's dive into this futex situation.

**Investigating futex implementation for arm64**

Alright, I need to get a clear picture of how futexes handle atomic operations and user memory specifically on the arm64 architecture. My first instinct, given my experience, is to zero in on the core implementation. I'll start by searching in the typical places for low-level architecture-specific details: `arch/arm64/include/asm/futex.h` should be a good starting point. That header file will likely define the atomic primitives used by the futex implementation and any relevant architecture quirks. If that doesn't yield the core logic, or if it simply *includes* other files, then the more general `kernel/futex/` directory will be where the higher-level futex implementation logic will likely reside, in those files the core logic should be defined. I'm especially interested in how they manage synchronization with userspace and deal with potentially asynchronous signals or interrupts. I will be looking to get a clear image of how all the logic is set.



70/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:futex PathPrefix:arch/arm64/include/asm/]

Results:
map[Output:arch/arm64/include/asm/futex.h-7-
arch/arm64/include/asm/futex.h:8:#include <linux/futex.h>
arch/arm64/include/asm/futex.h-9-#include <linux/uaccess.h>
--
arch/arm64/include/asm/futex.h=17=static __always_inline int						\
arch/arm64/include/asm/futex.h:18:__llsc_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
arch/arm64/include/asm/futex.h-19-{									\
--
arch/arm64/include/asm/futex.h-23-	uaccess_enable_privileged();					\
arch/arm64/include/asm/futex.h:24:	asm volatile("// __llsc_futex_atomic_" #op "\n"			\
arch/arm64/include/asm/futex.h-25-"	prfm	pstl1strm, %[uaddr]\n"					\
--
arch/arm64/include/asm/futex.h=56=static __always_inline int
arch/arm64/include/asm/futex.h:57:__llsc_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
arch/arm64/include/asm/futex.h-58-{
--
arch/arm64/include/asm/futex.h-63-	uaccess_enable_privileged();
arch/arm64/include/asm/futex.h:64:	asm volatile("//__llsc_futex_cmpxchg\n"
arch/arm64/include/asm/futex.h-65-"	prfm	pstl1strm, %[uaddr]\n"
--
arch/arm64/include/asm/futex.h=101=static __always_inline int						\
arch/arm64/include/asm/futex.h:102:__lsui_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
arch/arm64/include/asm/futex.h-103-{									\
--
arch/arm64/include/asm/futex.h-108-									\
arch/arm64/include/asm/futex.h:109:	asm volatile("// __lsui_futex_atomic_" #op "\n"			\
arch/arm64/include/asm/futex.h-110-	__LSUI_PREAMBLE							\
--
arch/arm64/include/asm/futex.h=154=__lsui_cmpxchg32(u32 __user *uaddr, u32 *oldval, u32 newval)
--
arch/arm64/include/asm/futex.h-156-	u64 __user *uaddr64;
arch/arm64/include/asm/futex.h:157:	bool futex_pos, other_pos;
arch/arm64/include/asm/futex.h-158-	union {
arch/arm64/include/asm/futex.h:159:		u32 futex[2];
arch/arm64/include/asm/futex.h-160-		u64 raw;
--
arch/arm64/include/asm/futex.h-163-	uaddr64 = (u64 __user *)PTR_ALIGN_DOWN(uaddr, sizeof(u64));
arch/arm64/include/asm/futex.h:164:	futex_pos = !IS_ALIGNED((unsigned long)uaddr, sizeof(u64));
arch/arm64/include/asm/futex.h:165:	other_pos = !futex_pos;
arch/arm64/include/asm/futex.h-166-
arch/arm64/include/asm/futex.h:167:	orig64.futex[futex_pos] = *oldval;
arch/arm64/include/asm/futex.h:168:	if (get_user(orig64.futex[other_pos], (u32 __user *)uaddr64 + other_pos))
arch/arm64/include/asm/futex.h-169-		return -EFAULT;
--
arch/arm64/include/asm/futex.h-171-	nval64 = oval64 = orig64;
arch/arm64/include/asm/futex.h:172:	nval64.futex[futex_pos] = newval;
arch/arm64/include/asm/futex.h-173-
--
arch/arm64/include/asm/futex.h-176-
arch/arm64/include/asm/futex.h:177:	*oldval = oval64.futex[futex_pos];
arch/arm64/include/asm/futex.h-178-	return oval64.raw == orig64.raw ? 0 : -EAGAIN;
--
arch/arm64/include/asm/futex.h=181=static __always_inline int
arch/arm64/include/asm/futex.h:182:__lsui_futex_atomic_and(int oparg, u32 __user *uaddr, int *oval)
arch/arm64/include/asm/futex.h-183-{
--
arch/arm64/include/asm/futex.h-185-	 * Undo the bitwise negation applied to the oparg passed from
arch/arm64/include/asm/futex.h:186:	 * arch_futex_atomic_op_inuser() with FUTEX_OP_ANDN.
arch/arm64/include/asm/futex.h-187-	 */
arch/arm64/include/asm/futex.h:188:	return __lsui_futex_atomic_andnot(~oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-189-}
--
arch/arm64/include/asm/futex.h=191=static __always_inline int
arch/arm64/include/asm/futex.h:192:__lsui_futex_atomic_eor(int oparg, u32 __user *uaddr, int *oval)
arch/arm64/include/asm/futex.h-193-{
--
arch/arm64/include/asm/futex.h=215=static __always_inline int
arch/arm64/include/asm/futex.h:216:__lsui_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
arch/arm64/include/asm/futex.h-217-{
--
arch/arm64/include/asm/futex.h=232=static __always_inline int						\
arch/arm64/include/asm/futex.h:233:__futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)		\
arch/arm64/include/asm/futex.h-234-{									\
arch/arm64/include/asm/futex.h:235:	return __lsui_llsc_body(futex_atomic_##op, oparg, uaddr, oval);	\
arch/arm64/include/asm/futex.h-236-}
--
arch/arm64/include/asm/futex.h=244=static __always_inline int
arch/arm64/include/asm/futex.h:245:__futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
arch/arm64/include/asm/futex.h-246-{
arch/arm64/include/asm/futex.h:247:	return __lsui_llsc_body(futex_cmpxchg, uaddr, oldval, newval, oval);
arch/arm64/include/asm/futex.h-248-}
--
arch/arm64/include/asm/futex.h=250=static inline int
arch/arm64/include/asm/futex.h:251:arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr)
arch/arm64/include/asm/futex.h-252-{
--
arch/arm64/include/asm/futex.h-262-	case FUTEX_OP_SET:
arch/arm64/include/asm/futex.h:263:		ret = __futex_atomic_set(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-264-		break;
arch/arm64/include/asm/futex.h-265-	case FUTEX_OP_ADD:
arch/arm64/include/asm/futex.h:266:		ret = __futex_atomic_add(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-267-		break;
arch/arm64/include/asm/futex.h-268-	case FUTEX_OP_OR:
arch/arm64/include/asm/futex.h:269:		ret = __futex_atomic_or(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-270-		break;
arch/arm64/include/asm/futex.h-271-	case FUTEX_OP_ANDN:
arch/arm64/include/asm/futex.h:272:		ret = __futex_atomic_and(~oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-273-		break;
arch/arm64/include/asm/futex.h-274-	case FUTEX_OP_XOR:
arch/arm64/include/asm/futex.h:275:		ret = __futex_atomic_eor(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-276-		break;
--
arch/arm64/include/asm/futex.h=284=static inline int
arch/arm64/include/asm/futex.h:285:futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *_uaddr,
arch/arm64/include/asm/futex.h-286-			      u32 oldval, u32 newval)
--
arch/arm64/include/asm/futex.h-294-
arch/arm64/include/asm/futex.h:295:	return __futex_cmpxchg(uaddr, oldval, newval, uval);
arch/arm64/include/asm/futex.h-296-}
--
arch/arm64/include/asm/mte-kasan.h=28=static inline bool system_uses_mte_async_or_asymm_mode(void)
--
arch/arm64/include/asm/mte-kasan.h-43- * TCF0.
arch/arm64/include/asm/mte-kasan.h:44: * However futex.h code uses exclusives which would be executed as
arch/arm64/include/asm/mte-kasan.h-45- * EL1, this can potentially cause a tag check fault even if the
]

71/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 8936
							output: 41
							thoughts: 58
						

Thoughts:
Here's my summary, as if I were thinking these thoughts:

**Dissecting the ARM64 Futex Implementation**

Okay, let's dive into the nitty-gritty of the ARM64 futex implementation. I need to understand how these lockless synchronization primitives actually work at the assembly level. Specifically, I want to see how `__llsc_futex_atomic_##op`, `__llsc_futex_cmpxchg`, and `__lsui` are defined and utilized within the kernel. It's time to examine `arch/arm64/include/asm/futex.h` and see what tricks are being employed to make these operations atomic and efficient on this architecture. I'm especially curious about the low-level load-linked/store-conditional (LL/SC) instructions and how they are used to build these fundamental futex operations. I expect there will be interesting details about memory ordering and cache coherency involved. Let's get to it!



72/4 2026/09/08 10:04 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	/* SPDX-License-Identifier: GPL-2.0-only */
   2:	/*
   3:	 * Copyright (C) 2012 ARM Ltd.
   4:	 */
   5:	#ifndef __ASM_FUTEX_H
   6:	#define __ASM_FUTEX_H
   7:	
   8:	#include <linux/futex.h>
   9:	#include <linux/uaccess.h>
  10:	
  11:	#include <asm/errno.h>
  12:	#include <asm/lsui.h>
  13:	
  14:	#define FUTEX_MAX_LOOPS	128 /* What's the largest number you can think of? */
  15:	
  16:	#define LLSC_FUTEX_ATOMIC_OP(op, insn)					\
  17:	static __always_inline int						\
  18:	__llsc_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
  19:	{									\
  20:		unsigned int loops = FUTEX_MAX_LOOPS;				\
  21:		int ret, oldval, newval;					\
  22:										\
  23:		uaccess_enable_privileged();					\
  24:		asm volatile("// __llsc_futex_atomic_" #op "\n"			\
  25:	"	prfm	pstl1strm, %[uaddr]\n"					\
  26:	"1:	ldxr	%w[oldval], %[uaddr]\n"					\
  27:		insn "\n"							\
  28:	"2:	stlxr	%w[ret], %w[newval], %[uaddr]\n"			\
  29:	"	cbz	%w[ret], 3f\n"						\
  30:	"	sub	%w[loops], %w[loops], %w[ret]\n"			\
  31:	"	cbnz	%w[loops], 1b\n"					\
  32:	"	mov	%w[ret], %w[err]\n"					\
  33:	"3:\n"									\
  34:	"	dmb	ish\n"							\
  35:		_ASM_EXTABLE_UACCESS_ERR(1b, 3b, %w[ret])			\
  36:		_ASM_EXTABLE_UACCESS_ERR(2b, 3b, %w[ret])			\
  37:		: [ret] "=&r" (ret), [oldval] "=&r" (oldval),			\
  38:		  [uaddr] "+Q" (*uaddr), [newval] "=&r" (newval),		\
  39:		  [loops] "+r" (loops)						\
  40:		: [oparg] "r" (oparg), [err] "Ir" (-EAGAIN)			\
  41:		: "memory");							\
  42:		uaccess_disable_privileged();					\
  43:										\
  44:		if (!ret)							\
  45:			*oval = oldval;						\
  46:										\
  47:		return ret;							\
  48:	}
  49:	
  50:	LLSC_FUTEX_ATOMIC_OP(add, "add	%w[newval], %w[oldval], %w[oparg]")
  51:	LLSC_FUTEX_ATOMIC_OP(or,  "orr	%w[newval], %w[oldval], %w[oparg]")
  52:	LLSC_FUTEX_ATOMIC_OP(and, "and	%w[newval], %w[oldval], %w[oparg]")
  53:	LLSC_FUTEX_ATOMIC_OP(eor, "eor	%w[newval], %w[oldval], %w[oparg]")
  54:	LLSC_FUTEX_ATOMIC_OP(set, "mov	%w[newval], %w[oparg]")
  55:	
  56:	static __always_inline int
  57:	__llsc_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
  58:	{
  59:		int ret = 0;
  60:		unsigned int loops = FUTEX_MAX_LOOPS;
  61:		u32 val, tmp;
  62:	
  63:		uaccess_enable_privileged();
  64:		asm volatile("//__llsc_futex_cmpxchg\n"
  65:	"	prfm	pstl1strm, %[uaddr]\n"
  66:	"1:	ldxr	%w[curval], %[uaddr]\n"
  67:	"	eor	%w[tmp], %w[curval], %w[oldval]\n"
  68:	"	cbnz	%w[tmp], 4f\n"
  69:	"2:	stlxr	%w[tmp], %w[newval], %[uaddr]\n"
  70:	"	cbz	%w[tmp], 3f\n"
  71:	"	sub	%w[loops], %w[loops], %w[tmp]\n"
  72:	"	cbnz	%w[loops], 1b\n"
  73:	"	mov	%w[ret], %w[err]\n"
  74:	"3:\n"
  75:	"	dmb	ish\n"
  76:	"4:\n"
  77:		_ASM_EXTABLE_UACCESS_ERR(1b, 4b, %w[ret])
  78:		_ASM_EXTABLE_UACCESS_ERR(2b, 4b, %w[ret])
  79:		: [ret] "+r" (ret), [curval] "=&r" (val),
  80:		  [uaddr] "+Q" (*uaddr), [tmp] "=&r" (tmp),
  81:		  [loops] "+r" (loops)
  82:		: [oldval] "r" (oldval), [newval] "r" (newval),
  83:		  [err] "Ir" (-EAGAIN)
  84:		: "memory");
  85:		uaccess_disable_privileged();
  86:	
  87:		if (!ret)
  88:			*oval = val;
  89:	
  90:		return ret;
  91:	}
  92:	
  93:	#ifdef CONFIG_ARM64_LSUI
  94:	
  95:	/*
  96:	 * Wrap LSUI instructions with uaccess_ttbr0_enable()/disable(), as
  97:	 * PAN toggling is not required.
  98:	 */
  99:	
 100:	#define LSUI_FUTEX_ATOMIC_OP(op, asm_op)				\
]

73/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 11107
							output: 39
							thoughts: 113
						

Thoughts:
**Investigating ARM64 Exclusive Accesses on Device Memory**

Okay, so I'm curious about the behavior of `ldxr` and `stxr` instructions on ARM64 when they target Device memory. It's a question that needs to be addressed for any robust implementation. According to the ARM Architecture Reference Manual (ARM ARM / ARMv8-A DDI 0487), I need to understand the precise effects of these exclusive accesses, or any atomic instructions for that matter, when the target memory region is designated as having Device attributes or Normal Non-cacheable attributes. Specifically, what can I expect?

My immediate thought is, has anyone encountered this before? What were their solutions? I'll probably start digging through the git logs and kernel code. I'm hoping to find some discussions, comments, or perhaps even workarounds related to exclusive accesses and Device memory, or anything relating to Synchronous External Aborts in this context. It's time to get my hands dirty.



74/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:Synchronous External Abort|exclusive.*Device|alignment fault.*exclusive PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/kernel/acpi.c=295=void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
--
arch/arm64/kernel/acpi.c-383-/*
arch/arm64/kernel/acpi.c:384: * Claim Synchronous External Aborts as a firmware first notification.
arch/arm64/kernel/acpi.c-385- *
--
arch/arm64/kernel/rsi.c=52=static void __init arm64_rsi_setup_memory(void)
--
arch/arm64/kernel/rsi.c-63-	 * protected has failed here, then future accesses to the memory are
arch/arm64/kernel/rsi.c:64:	 * simply going to be reflected as a SEA (Synchronous External Abort)
arch/arm64/kernel/rsi.c-65-	 * which we can't handle.  Bailing out early prevents the guest limping
--
arch/arm64/mm/pageattr.c=278=static int __set_memory_enc_dec(unsigned long addr,
--
arch/arm64/mm/pageattr.c-301-	 * Break the mapping before we make any changes to avoid stale TLB
arch/arm64/mm/pageattr.c:302:	 * entries or Synchronous External Aborts caused by RIPAS_EMPTY
arch/arm64/mm/pageattr.c-303-	 */
]

75/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 11854
							output: 40
							thoughts: 44
						

Thoughts:
Here's my summary, as if I were thinking it:

**Diving into Fault Handling: `arch/arm64/mm/fault.c`**

Okay, so I need to refresh my memory on how the ARM64 kernel handles those nasty faults – Synchronous External Aborts, Alignment Faults, you name it – especially when they originate from user-space shenanigans or kernel code using the `uaccess` macros. My first instinct is to zero in on `arch/arm64/mm/fault.c`. That's the go-to spot for understanding the low-level fault handling mechanisms on this architecture. I'm especially interested in how the kernel differentiates between faults triggered by user-mode memory access errors versus faults happening during kernel-mode `uaccess` operations, because the responses could differ. Understanding the distinction here is crucial for security and reliability. I need to refresh my memory on the fault handlers in that file. Let's start digging!



76/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:do_sea|external abort|ALIGNMENT PathPrefix:arch/arm64/mm/fault.c]

Results:
map[Output:arch/arm64/mm/fault.c=855=static int do_alignment_fault(unsigned long far, unsigned long esr,
--
arch/arm64/mm/fault.c-857-{
arch/arm64/mm/fault.c:858:	if (IS_ENABLED(CONFIG_COMPAT_ALIGNMENT_FIXUPS) &&
arch/arm64/mm/fault.c-859-	    compat_user_mode(regs))
--
arch/arm64/mm/fault.c=865=static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-869-
arch/arm64/mm/fault.c:870:static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
arch/arm64/mm/fault.c-871-{
--
arch/arm64/mm/fault.c-889-		 * The architecture specifies that the tag bits of FAR_EL1 are
arch/arm64/mm/fault.c:890:		 * UNKNOWN for synchronous external aborts. Mask them out now
arch/arm64/mm/fault.c-891-		 * so that userspace doesn't see them.
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-933-	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
arch/arm64/mm/fault.c:934:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
arch/arm64/mm/fault.c-935-	{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
arch/arm64/mm/fault.c-936-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 18"			},
arch/arm64/mm/fault.c:937:	{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 (translation table walk)"	},
arch/arm64/mm/fault.c:938:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 (translation table walk)"	},
arch/arm64/mm/fault.c:939:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 (translation table walk)"	},
arch/arm64/mm/fault.c:940:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 (translation table walk)"	},
arch/arm64/mm/fault.c:941:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 (translation table walk)"	},
arch/arm64/mm/fault.c:942:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous parity or ECC error" },	// Reserved when RAS is implemented
arch/arm64/mm/fault.c-943-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 25"			},
arch/arm64/mm/fault.c-944-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 26"			},
arch/arm64/mm/fault.c:945:	{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:946:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:947:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:948:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:949:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c-950-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
]

77/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 13340
							output: 39
							thoughts: 52
						

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

**Diving into the Arm64 Fault Handling Code**

Alright, let's get down to brass tacks. I need to refresh my memory on how the Arm64 kernel handles memory faults, specifically around the Secure EL1 Access (SEA) faults and related alignment issues. I think the best place to start is digging into `arch/arm64/mm/fault.c`. I recall that the `do_sea` function, along with `fault_info` are key, so I'll focus on lines roughly between 870 and 950. That should give me a good overview of the relevant logic within the larger fault handling infrastructure. It's always beneficial to review the alignment fault handling details too, to get the full picture of how the architecture deals with these tricky issues. Time to dig in and reacquaint myself with the details!



78/4 2026/09/08 10:04 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:860 LineCount:80]

Results:
map[Contents: 860:			return do_compat_alignment_fixup(far, regs);
 861:		do_bad_area(far, esr, regs);
 862:		return 0;
 863:	}
 864:	
 865:	static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
 866:	{
 867:		return 1; /* "fault" */
 868:	}
 869:	
 870:	static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
 871:	{
 872:		const struct fault_info *inf;
 873:		unsigned long siaddr;
 874:	
 875:		inf = esr_to_fault_info(esr);
 876:	
 877:		if (user_mode(regs) && apei_claim_sea(regs) == 0) {
 878:			/*
 879:			 * APEI claimed this as a firmware-first notification.
 880:			 * Some processing deferred to task_work before ret_to_user().
 881:			 */
 882:			return 0;
 883:		}
 884:	
 885:		if (esr & ESR_ELx_FnV) {
 886:			siaddr = 0;
 887:		} else {
 888:			/*
 889:			 * The architecture specifies that the tag bits of FAR_EL1 are
 890:			 * UNKNOWN for synchronous external aborts. Mask them out now
 891:			 * so that userspace doesn't see them.
 892:			 */
 893:			siaddr  = untagged_addr(far);
 894:		}
 895:		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 896:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 897:	
 898:		return 0;
 899:	}
 900:	
 901:	static int do_tag_check_fault(unsigned long far, unsigned long esr,
 902:				      struct pt_regs *regs)
 903:	{
 904:		/*
 905:		 * The architecture specifies that bits 63:60 of FAR_EL1 are UNKNOWN
 906:		 * for tag check faults. Set them to corresponding bits in the untagged
 907:		 * address if ARM64_MTE_FAR isn't supported.
 908:		 * Otherwise, bits 63:60 of FAR_EL1 are not UNKNOWN.
 909:		 */
 910:		if (!cpus_have_cap(ARM64_MTE_FAR))
 911:			far = (__untagged_addr(far) & ~MTE_TAG_MASK) | (far & MTE_TAG_MASK);
 912:	
 913:		do_bad_area(far, esr, regs);
 914:		return 0;
 915:	}
 916:	
 917:	static const struct fault_info fault_info[] = {
 918:		{ do_bad,		SIGKILL, SI_KERNEL,	"ttbr address size fault"	},
 919:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 1 address size fault"	},
 920:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 2 address size fault"	},
 921:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 3 address size fault"	},
 922:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 0 translation fault"	},
 923:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 1 translation fault"	},
 924:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 2 translation fault"	},
 925:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 3 translation fault"	},
 926:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 access flag fault"	},
 927:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 access flag fault"	},
 928:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 access flag fault"	},
 929:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 access flag fault"	},
 930:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 permission fault"	},
 931:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 permission fault"	},
 932:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 permission fault"	},
 933:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
 934:		{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
 935:		{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
 936:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 18"			},
 937:		{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 (translation table walk)"	},
 938:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 (translation table walk)"	},
 939:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 (translation table walk)"	},
]

79/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 15273
							output: 32
							thoughts: 123
						

Thoughts:
**Analyzing a Kernel-Mode SEA**

Alright, let's dive in. My focus is immediately drawn to line 895 within `do_sea`. Specifically, I see the following code block: `add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);` followed by `arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);`. This looks like a critical point where a Machine Check Exception (MCE) or Software Error Abort (SEA) is being handled. The fact that `TAINT_MACHINE_CHECK` is being added tells me that the kernel is aware that something is seriously wrong and it's trying to flag the system as potentially compromised.

My immediate question is, what happens if this SEA occurs while in kernel mode? My mind immediately goes to potential causes, such as a problem within `uaccess` or even something as low level as an `ldxr` instruction inside `futex_atomic_cmpxchg_inatomic`.

Now, I need to understand the path that execution takes from this point. Time to examine the function `arm64_notify_die`. I need to figure out what happens after the kernel detects a SEA.



80/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:arm64_notify_die PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/system_misc.h=23=struct siginfo;
arch/arm64/include/asm/system_misc.h:24:void arm64_notify_die(const char *str, struct pt_regs *regs,
arch/arm64/include/asm/system_misc.h-25-		      int signo, int sicode, unsigned long far,
--
arch/arm64/kernel/debug-monitors.c=271=void do_bkpt32(unsigned long esr, struct pt_regs *regs)
arch/arm64/kernel/debug-monitors.c-272-{
arch/arm64/kernel/debug-monitors.c:273:	arm64_notify_die("aarch32 BKPT", regs, SIGTRAP, TRAP_BRKPT, regs->pc, esr);
arch/arm64/kernel/debug-monitors.c-274-}
--
arch/arm64/kernel/sys_compat.c=68=long compat_arm_syscall(struct pt_regs *regs, int scno)
--
arch/arm64/kernel/sys_compat.c-114-
arch/arm64/kernel/sys_compat.c:115:	arm64_notify_die("Oops - bad compat syscall(2)", regs,
arch/arm64/kernel/sys_compat.c-116-			 SIGILL, ILL_ILLTRP, addr, 0);
--
arch/arm64/kernel/traps.c=284=void arm64_force_sig_ptrace_errno_trap(int errno, unsigned long far,
--
arch/arm64/kernel/traps.c-290-
arch/arm64/kernel/traps.c:291:void arm64_notify_die(const char *str, struct pt_regs *regs,
arch/arm64/kernel/traps.c-292-		      int signo, int sicode, unsigned long far,
--
arch/arm64/kernel/traps.c=409=void force_signal_inject(int signal, int code, unsigned long address, unsigned long err)
--
arch/arm64/kernel/traps.c-434-
arch/arm64/kernel/traps.c:435:	arm64_notify_die(desc, regs, signal, code, address, err);
arch/arm64/kernel/traps.c-436-}
--
arch/arm64/mm/fault.c=870=static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-895-	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
arch/arm64/mm/fault.c:896:	arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
arch/arm64/mm/fault.c-897-
--
arch/arm64/mm/fault.c=984=void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-999-	 */
arch/arm64/mm/fault.c:1000:	arm64_notify_die(inf->name, regs, inf->sig, inf->code, addr, esr);
arch/arm64/mm/fault.c-1001-}
--
arch/arm64/mm/fault.c=1004=void do_sp_pc_abort(unsigned long addr, unsigned long esr, struct pt_regs *regs)
arch/arm64/mm/fault.c-1005-{
arch/arm64/mm/fault.c:1006:	arm64_notify_die("SP/PC alignment exception", regs, SIGBUS, BUS_ADRALN,
arch/arm64/mm/fault.c-1007-			 addr, esr);
]

81/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 16730
							output: 40
							thoughts: 28
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Diving into the Arm64 Exception Handling**

Alright, time to refresh my memory on the Arm64 die handling path. Let's start by looking at `arm64_notify_die` in `arch/arm64/kernel/traps.c`. This is where the magic happens when the kernel encounters an unrecoverable exception or error on an Arm64 system. I want to see how the architecture handles the process of notifying user space of the imminent crash and hopefully grabbing some debug information. I'm especially interested in how it interacts with the registers, the stack, and how it potentially tries to provide a meaningful error message or signal before bringing everything down. There is likely some logic that attempts to determine if the error is recoverable and if not, the system has to initiate a crash dump or reboot sequence. I need to keep in mind the specifics of the register dump and how the program counter (PC) is managed. I expect it's a careful dance between preserving the critical state for debugging and ensuring a clean shutdown to prevent further corruption.



82/4 2026/09/08 10:04 tool read-file
0m Args:
map[File:arch/arm64/kernel/traps.c FirstLine:290 LineCount:40]

Results:
map[Contents: 290:	
 291:	void arm64_notify_die(const char *str, struct pt_regs *regs,
 292:			      int signo, int sicode, unsigned long far,
 293:			      unsigned long err)
 294:	{
 295:		if (user_mode(regs)) {
 296:			WARN_ON(regs != current_pt_regs());
 297:			current->thread.fault_address = 0;
 298:			current->thread.fault_code = err;
 299:	
 300:			arm64_force_sig_fault(signo, sicode, far, str);
 301:		} else {
 302:			die(str, regs, err);
 303:		}
 304:	}
 305:	
 306:	#ifdef CONFIG_COMPAT
 307:	#define PSTATE_IT_1_0_SHIFT	25
 308:	#define PSTATE_IT_1_0_MASK	(0x3 << PSTATE_IT_1_0_SHIFT)
 309:	#define PSTATE_IT_7_2_SHIFT	10
 310:	#define PSTATE_IT_7_2_MASK	(0x3f << PSTATE_IT_7_2_SHIFT)
 311:	
 312:	static u32 compat_get_it_state(struct pt_regs *regs)
 313:	{
 314:		u32 it, pstate = regs->pstate;
 315:	
 316:		it  = (pstate & PSTATE_IT_1_0_MASK) >> PSTATE_IT_1_0_SHIFT;
 317:		it |= ((pstate & PSTATE_IT_7_2_MASK) >> PSTATE_IT_7_2_SHIFT) << 2;
 318:	
 319:		return it;
 320:	}
 321:	
 322:	static void compat_set_it_state(struct pt_regs *regs, u32 it)
 323:	{
 324:		u32 pstate_it;
 325:	
 326:		pstate_it  = (it << PSTATE_IT_1_0_SHIFT) & PSTATE_IT_1_0_MASK;
 327:		pstate_it |= ((it >> 2) << PSTATE_IT_7_2_SHIFT) & PSTATE_IT_7_2_MASK;
 328:	
 329:		regs->pstate &= ~PSR_AA32_IT_MASK;
]

83/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 17756
							output: 29
							thoughts: 164
						

Thoughts:
**Investigating Kernel Synchronous External Aborts (SEAs)**

Okay, let's dive into this `arm64_notify_die` function. The code clearly shows a branching decision: if the register set (`regs`) indicates we're in user mode, something different happens. However, when we're in kernel mode – specifically, when `user_mode(regs)` is false – and a Synchronous External Abort occurs, we hit the `die()` function. That means a kernel panic, an Oops! This is the expected behavior, but I need to understand the nuances here.

My next question is this: what's the interaction with exception handling? We know exception tables, like `_ASM_EXTABLE_UACCESS_ERR` and the general `fixup_exception` mechanism, are crucial for handling various exceptions. Does the Synchronous External Abort, in kernel mode, use these exception tables? We need to determine if an SEA that occurs in the kernel context can be recovered from, perhaps to try again.

To get the full picture, I need to check how `fixup_exception` is actually implemented, and then investigate how the Synchronous External Abort is handled specifically in the `do_sea` or `do_mem_abort` functions. Time to look into those functions.



84/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:fixup_exception PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/efi.h=16=extern void efi_init(void);
arch/arm64/include/asm/efi.h-17-
arch/arm64/include/asm/efi.h:18:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg);
arch/arm64/include/asm/efi.h-19-#else
--
arch/arm64/include/asm/efi.h=22=static inline
arch/arm64/include/asm/efi.h:23:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
arch/arm64/include/asm/efi.h-24-{
--
arch/arm64/include/asm/extable.h=43=bool ex_handler_bpf(const struct exception_table_entry *ex,
--
arch/arm64/include/asm/extable.h-49-
arch/arm64/include/asm/extable.h:50:bool fixup_exception(struct pt_regs *regs, unsigned long esr);
arch/arm64/include/asm/extable.h-51-#endif
--
arch/arm64/kernel/efi.c=220=asmlinkage efi_status_t __efi_rt_asm_recover(void);
arch/arm64/kernel/efi.c-221-
arch/arm64/kernel/efi.c:222:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
arch/arm64/kernel/efi.c-223-{
--
arch/arm64/kernel/probes/kprobes.c=301=int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
--
arch/arm64/kernel/probes/kprobes.c-310-	 * must be left alone for the normal page fault handler, including
arch/arm64/kernel/probes/kprobes.c:311:	 * fixup_exception.
arch/arm64/kernel/probes/kprobes.c-312-	 */
--
arch/arm64/kernel/traps.c=495=void do_el1_bti(struct pt_regs *regs, unsigned long esr)
arch/arm64/kernel/traps.c-496-{
arch/arm64/kernel/traps.c:497:	if (efi_runtime_fixup_exception(regs, "BTI violation")) {
arch/arm64/kernel/traps.c-498-		regs->pstate &= ~PSR_BTYPE_MASK;
--
arch/arm64/mm/extable.c=69=ex_handler_load_unaligned_zeropad(const struct exception_table_entry *ex,
--
arch/arm64/mm/extable.c-94-
arch/arm64/mm/extable.c:95:bool fixup_exception(struct pt_regs *regs, unsigned long esr)
arch/arm64/mm/extable.c-96-{
--
arch/arm64/mm/fault.c=409=static void __do_kernel_fault(unsigned long addr, unsigned long esr,
--
arch/arm64/mm/fault.c-417-	 */
arch/arm64/mm/fault.c:418:	if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
arch/arm64/mm/fault.c-419-		return;
--
arch/arm64/mm/fault.c-454-
arch/arm64/mm/fault.c:455:	if (efi_runtime_fixup_exception(regs, msg))
arch/arm64/mm/fault.c-456-		return;
]

85/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 19228
							output: 39
							thoughts: 97
						

Thoughts:
**Investigating a Potential Issue in the Arm64 Memory Management Code**

Okay, so I'm diving into this memory management code, specifically looking at `arch/arm64/mm/fault.c`. The first thing I need to confirm is whether the `do_sea()` function, the one that handles system error exceptions, actually calls `fixup_exception`. That seems like a logical place to start, and from a quick glance, it doesn't look like it does. But, hold on, let's not jump to conclusions. I need to make sure I haven't missed something.

I need to meticulously review the `do_sea()` function and the surrounding `fault_info` structure in `arch/arm64/mm/fault.c`. I need a solid understanding of how faults are being dispatched within this context. I'll read through every line of code within `do_sea` and follow the fault dispatch process that it invokes. Only then can I be certain of what's happening and what's *not* happening. This is essential for a complete understanding of how exceptions are handled.



86/4 2026/09/08 10:04 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:975 LineCount:40]

Results:
map[Contents: 975:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 57"			},
 976:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 58" 			},
 977:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 59"			},
 978:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 60"			},
 979:		{ do_bad,		SIGKILL, SI_KERNEL,	"section domain fault"		},
 980:		{ do_bad,		SIGKILL, SI_KERNEL,	"page domain fault"		},
 981:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 63"			},
 982:	};
 983:	
 984:	void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
 985:	{
 986:		const struct fault_info *inf = esr_to_fault_info(esr);
 987:		unsigned long addr = untagged_addr(far);
 988:	
 989:		if (!inf->fn(far, esr, regs))
 990:			return;
 991:	
 992:		if (!user_mode(regs))
 993:			die_kernel_fault(inf->name, addr, esr, regs);
 994:	
 995:		/*
 996:		 * At this point we have an unrecognized fault type whose tag bits may
 997:		 * have been defined as UNKNOWN. Therefore we only expose the untagged
 998:		 * address to the signal handler.
 999:		 */
1000:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, addr, esr);
1001:	}
1002:	NOKPROBE_SYMBOL(do_mem_abort);
1003:	
1004:	void do_sp_pc_abort(unsigned long addr, unsigned long esr, struct pt_regs *regs)
1005:	{
1006:		arm64_notify_die("SP/PC alignment exception", regs, SIGBUS, BUS_ADRALN,
1007:				 addr, esr);
1008:	}
1009:	NOKPROBE_SYMBOL(do_sp_pc_abort);
1010:	
1011:	/*
1012:	 * Used during anonymous page fault handling.
1013:	 */
1014:	struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
]

87/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 20332
							output: 53
							thoughts: 203
						

Thoughts:
**Investigating Potential Causes of a Kernel Panic**

Okay, so `do_sea()` is calling `arm64_notify_die` directly, and that's triggering `die(str, regs, err)` when the registers aren't in user mode. That's a direct path to a crash, which is what I suspected. Now I need to figure out *why*.

First, let's drill down into the ARM64 architecture specifications. My focus is on exclusive accesses (`ldxr`/`stxr`) because that sounds like a strong candidate for an issue here. I need to understand how these instructions behave differently on Device memory versus Normal Non-cacheable memory. It's crucial to understand the memory ordering and coherency implications here. That's going to be key.

Next, I need to understand what `pgprot_noncached` and `pgprot_writecombine` actually *mean* on ARM64. Are they mapping how I think they are? The exact bitflags will be very important. Device memory, and how we interact with it, is a likely suspect.

Then I need to understand the practical applications. The important question is: How does DRM (or other unprivileged drivers) map buffers to userspace? Specifically, is Device memory mapped into userspace with these drivers? This is the core question; are these drivers somehow responsible?

Building on that, I need to know what happens when userspace, specifically, passes such memory to `futex()`. Does `futex()` behave appropriately when dealing with device memory? This intersection between userspace, the kernel, and potentially device memory is where the issue lies, I'm sure.

Finally, I need to search through the kernel's history for clues. I'll search for how ARM64, DRM, and futex have evolved in relation to each other, to see if there are any known gotchas or previous issues that shed light on this scenario. This will require diving into commits and mailing lists to see if I can find any relevant discussion.

I'll start with searching for those `pgprot_*` definitions in `arch/arm64` – that's the obvious first step. I need a concrete mapping between the protection flags and the memory types.



88/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:pgprot_noncached|pgprot_writecombine|pgprot_device|PROT_NORMAL_NC|PROT_DEVICE PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/fixmap.h=36=enum fixed_addresses {
--
arch/arm64/include/asm/fixmap.h-110-
arch/arm64/include/asm/fixmap.h:111:#define FIXMAP_PAGE_IO     __pgprot(PROT_DEVICE_nGnRE)
arch/arm64/include/asm/fixmap.h-112-
--
arch/arm64/include/asm/io.h=277=static inline void __iomem *ioremap_prot(phys_addr_t phys, size_t size,
--
arch/arm64/include/asm/io.h-292-#define ioremap(addr, size)	\
arch/arm64/include/asm/io.h:293:	__ioremap_prot((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
arch/arm64/include/asm/io.h-294-#define ioremap_wc(addr, size)	\
arch/arm64/include/asm/io.h:295:	__ioremap_prot((addr), (size), __pgprot(PROT_NORMAL_NC))
arch/arm64/include/asm/io.h-296-#define ioremap_np(addr, size)	\
arch/arm64/include/asm/io.h:297:	__ioremap_prot((addr), (size), __pgprot(PROT_DEVICE_nGnRnE))
arch/arm64/include/asm/io.h-298-
--
arch/arm64/include/asm/kvm_pgtable.h=253=enum kvm_pgtable_stage2_flags {
--
arch/arm64/include/asm/kvm_pgtable.h-264- * @KVM_PGTABLE_PROT_R:		Read permission.
arch/arm64/include/asm/kvm_pgtable.h:265: * @KVM_PGTABLE_PROT_DEVICE:	Device attributes.
arch/arm64/include/asm/kvm_pgtable.h:266: * @KVM_PGTABLE_PROT_NORMAL_NC:	Normal noncacheable attributes.
arch/arm64/include/asm/kvm_pgtable.h-267- * @KVM_PGTABLE_PROT_SW0:	Software bit 0.
--
arch/arm64/include/asm/kvm_pgtable.h=272=enum kvm_pgtable_prot {
--
arch/arm64/include/asm/kvm_pgtable.h-279-
arch/arm64/include/asm/kvm_pgtable.h:280:	KVM_PGTABLE_PROT_DEVICE			= BIT(4),
arch/arm64/include/asm/kvm_pgtable.h:281:	KVM_PGTABLE_PROT_NORMAL_NC		= BIT(5),
arch/arm64/include/asm/kvm_pgtable.h-282-
--
arch/arm64/include/asm/kvm_pgtable.h-297-#define PAGE_HYP_RO		(KVM_PGTABLE_PROT_R)
arch/arm64/include/asm/kvm_pgtable.h:298:#define PAGE_HYP_DEVICE		(PAGE_HYP | KVM_PGTABLE_PROT_DEVICE)
arch/arm64/include/asm/kvm_pgtable.h-299-
--
arch/arm64/include/asm/pgtable-prot.h-42-
arch/arm64/include/asm/pgtable-prot.h:43:#define PROT_DEVICE_nGnRnE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_DEVICE_nGnRnE))
arch/arm64/include/asm/pgtable-prot.h:44:#define PROT_DEVICE_nGnRE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_DEVICE_nGnRE))
arch/arm64/include/asm/pgtable-prot.h:45:#define PROT_NORMAL_NC		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL_NC))
arch/arm64/include/asm/pgtable-prot.h-46-#define PROT_NORMAL		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
--
arch/arm64/include/asm/pgtable.h=725=static inline void __set_puds(struct mm_struct *mm, unsigned long addr,
--
arch/arm64/include/asm/pgtable.h-751- */
arch/arm64/include/asm/pgtable.h:752:#define pgprot_noncached(prot) \
arch/arm64/include/asm/pgtable.h-753-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h:754:#define pgprot_writecombine(prot) \
arch/arm64/include/asm/pgtable.h-755-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h:756:#define pgprot_device(prot) \
arch/arm64/include/asm/pgtable.h-757-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN)
--
arch/arm64/kernel/acpi.c=261=static pgprot_t __acpi_get_writethrough_mem_attribute(void)
--
arch/arm64/kernel/acpi.c-269-	pr_warn_once("No MAIR allocation for EFI_MEMORY_WT; treating as Normal Non-cacheable\n");
arch/arm64/kernel/acpi.c:270:	return __pgprot(PROT_NORMAL_NC);
arch/arm64/kernel/acpi.c-271-}
--
arch/arm64/kernel/acpi.c=273=pgprot_t __acpi_get_mem_attribute(phys_addr_t addr)
--
arch/arm64/kernel/acpi.c-288-	if (attr & EFI_MEMORY_WC)
arch/arm64/kernel/acpi.c:289:		return __pgprot(PROT_NORMAL_NC);
arch/arm64/kernel/acpi.c-290-	if (attr & EFI_MEMORY_WT)
arch/arm64/kernel/acpi.c-291-		return __acpi_get_writethrough_mem_attribute();
arch/arm64/kernel/acpi.c:292:	return __pgprot(PROT_DEVICE_nGnRnE);
arch/arm64/kernel/acpi.c-293-}
--
arch/arm64/kernel/acpi.c=295=void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
--
arch/arm64/kernel/acpi.c-322-	 */
arch/arm64/kernel/acpi.c:323:	prot = __pgprot(PROT_DEVICE_nGnRnE);
arch/arm64/kernel/acpi.c-324-	if (region) {
--
arch/arm64/kernel/acpi.c-374-			else if (region->attribute & EFI_MEMORY_WC)
arch/arm64/kernel/acpi.c:375:				prot = __pgprot(PROT_NORMAL_NC);
arch/arm64/kernel/acpi.c-376-			else if (region->attribute & EFI_MEMORY_WT)
--
arch/arm64/kernel/efi.c=34=static __init ptval_t create_mapping_protection(efi_memory_desc_t *md)
--
arch/arm64/kernel/efi.c-39-	if (type == EFI_MEMORY_MAPPED_IO) {
arch/arm64/kernel/efi.c:40:		pgprot_t prot = __pgprot(PROT_DEVICE_nGnRE);
arch/arm64/kernel/efi.c-41-
--
arch/arm64/kvm/hyp/pgtable.c=328=static int hyp_set_prot_attr(enum kvm_pgtable_prot prot, kvm_pte_t *ptep)
arch/arm64/kvm/hyp/pgtable.c-329-{
arch/arm64/kvm/hyp/pgtable.c:330:	bool device = prot & KVM_PGTABLE_PROT_DEVICE;
arch/arm64/kvm/hyp/pgtable.c-331-	u32 mtype = device ? MT_DEVICE_nGnRE : MT_NORMAL;
--
arch/arm64/kvm/hyp/pgtable.c=702=static int stage2_set_prot_attr(struct kvm_pgtable *pgt, enum kvm_pgtable_prot prot,
--
arch/arm64/kvm/hyp/pgtable.c-708-
arch/arm64/kvm/hyp/pgtable.c:709:	switch (prot & (KVM_PGTABLE_PROT_DEVICE |
arch/arm64/kvm/hyp/pgtable.c:710:			KVM_PGTABLE_PROT_NORMAL_NC)) {
arch/arm64/kvm/hyp/pgtable.c:711:	case KVM_PGTABLE_PROT_DEVICE | KVM_PGTABLE_PROT_NORMAL_NC:
arch/arm64/kvm/hyp/pgtable.c-712-		return -EINVAL;
arch/arm64/kvm/hyp/pgtable.c:713:	case KVM_PGTABLE_PROT_DEVICE:
arch/arm64/kvm/hyp/pgtable.c-714-		if (prot & KVM_PGTABLE_PROT_X)
--
arch/arm64/kvm/hyp/pgtable.c-717-		break;
arch/arm64/kvm/hyp/pgtable.c:718:	case KVM_PGTABLE_PROT_NORMAL_NC:
arch/arm64/kvm/hyp/pgtable.c-719-		if (prot & KVM_PGTABLE_PROT_X)
--
arch/arm64/kvm/mmu.c=1205=int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa,
--
arch/arm64/kvm/mmu.c-1212-	struct kvm_pgtable *pgt = mmu->pgt;
arch/arm64/kvm/mmu.c:1213:	enum kvm_pgtable_prot prot = KVM_PGTABLE_PROT_DEVICE |
arch/arm64/kvm/mmu.c-1214-				     KVM_PGTABLE_PROT_R |
--
arch/arm64/kvm/mmu.c=1965=static int kvm_s2_fault_compute_prot(const struct kvm_s2_fault_desc *s2fd,
--
arch/arm64/kvm/mmu.c-1999-		*prot |= (s2vi->vm_flags & VM_ALLOW_ANY_UNCACHED) ?
arch/arm64/kvm/mmu.c:2000:			KVM_PGTABLE_PROT_NORMAL_NC : KVM_PGTABLE_PROT_DEVICE;
arch/arm64/kvm/mmu.c-2001-	else if (cpus_have_final_cap(ARM64_HAS_CACHE_DIC))
--
arch/arm64/kvm/pkvm.c=405=int pkvm_pgtable_stage2_map(struct kvm_pgtable *pgt, u64 addr, u64 size,
--
arch/arm64/kvm/pkvm.c-472-	mapping->nr_pages = size / PAGE_SIZE;
arch/arm64/kvm/pkvm.c:473:	mapping->nc = !!(prot & (KVM_PGTABLE_PROT_DEVICE | KVM_PGTABLE_PROT_NORMAL_NC));
arch/arm64/kvm/pkvm.c-474-	pkvm_mapping_insert(mapping, &pgt->pkvm_mappings);
--
arch/arm64/mm/mmu.c=96=pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
--
arch/arm64/mm/mmu.c-99-	if (!pfn_is_map_memory(pfn))
arch/arm64/mm/mmu.c:100:		return pgprot_noncached(vma_prot);
arch/arm64/mm/mmu.c-101-	else if (file->f_flags & O_SYNC)
arch/arm64/mm/mmu.c:102:		return pgprot_writecombine(vma_prot);
arch/arm64/mm/mmu.c-103-	return vma_prot;
]

89/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 24559
							output: 32
							thoughts: 340
						

Thoughts:
**Analyzing ARM64 Page Table Protection Macros**

Okay, let's dive into `arch/arm64/include/asm/pgtable.h`, specifically lines 750-760. I'm looking at how memory protection attributes are defined in the context of page table entries. The macros of interest are `pgprot_noncached`, `pgprot_writecombine`, and `pgprot_device`. These are crucial for controlling memory access behavior, particularly in embedded systems or when dealing with hardware peripherals.

Right away, I see the pattern: they all use `__pgprot_modify` to alter the protection bits within a `prot` variable. The key part is the second argument to `__pgprot_modify`, which selects bits to modify, and the third, which sets the new values. I'm focusing on the `PTE_ATTRINDX_MASK` and `PTE_ATTRINDX` bits and what `MT_*` memory types they are being set to.

Now, I'm noticing a critical distinction here. `pgprot_noncached` sets the attribute to `MT_DEVICE_nGnRnE` – this is Device-nGnRnE memory, which means no caching or read/write allocation. `pgprot_device` sets it to `MT_DEVICE_nGnRE`, which is Device-nGnRE memory, again no caching, but read allocate. And, lastly, `pgprot_writecombine` uses `MT_NORMAL_NC` for normal non-cacheable memory. I need to refresh my knowledge of the memory attribute index (MAIR) and memory types. I need to go back and check the definitions of these `MT_*` macros. My first instinct is to check `arch/arm64/include/asm/memory.h`, or maybe `pgtable-prot.h` or potentially even `mmu.c`, as these files should define the `MAIR` registers and their associated memory type definitions. Understanding the specifics of each memory type is crucial for mapping peripherals and memory regions correctly.



90/4 2026/09/08 10:04 tool grepper
0m Args:
map[Expression:MT_DEVICE|MT_NORMAL PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/memory.h-166- *
arch/arm64/include/asm/memory.h:167: * IMPORTANT: MT_NORMAL must be index 0 since vm_get_page_prot() may 'or' in
arch/arm64/include/asm/memory.h:168: *	      the MT_NORMAL_TAGGED memory type for PROT_MTE mappings. Note
arch/arm64/include/asm/memory.h:169: *	      that protection_map[] only contains MT_NORMAL attributes.
arch/arm64/include/asm/memory.h-170- */
arch/arm64/include/asm/memory.h:171:#define MT_NORMAL		0
arch/arm64/include/asm/memory.h:172:#define MT_NORMAL_TAGGED	1
arch/arm64/include/asm/memory.h:173:#define MT_NORMAL_NC		2
arch/arm64/include/asm/memory.h:174:#define MT_DEVICE_nGnRnE	3
arch/arm64/include/asm/memory.h:175:#define MT_DEVICE_nGnRE		4
arch/arm64/include/asm/memory.h-176-
--
arch/arm64/include/asm/pgtable-prot.h-42-
arch/arm64/include/asm/pgtable-prot.h:43:#define PROT_DEVICE_nGnRnE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_DEVICE_nGnRnE))
arch/arm64/include/asm/pgtable-prot.h:44:#define PROT_DEVICE_nGnRE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_DEVICE_nGnRE))
arch/arm64/include/asm/pgtable-prot.h:45:#define PROT_NORMAL_NC		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL_NC))
arch/arm64/include/asm/pgtable-prot.h:46:#define PROT_NORMAL		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
arch/arm64/include/asm/pgtable-prot.h:47:#define PROT_NORMAL_TAGGED	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL_TAGGED))
arch/arm64/include/asm/pgtable-prot.h-48-
arch/arm64/include/asm/pgtable-prot.h:49:#define PROT_SECT_DEVICE_nGnRE	(PROT_SECT_DEFAULT | PMD_SECT_PXN | PMD_SECT_UXN | PMD_ATTRINDX(MT_DEVICE_nGnRE))
arch/arm64/include/asm/pgtable-prot.h:50:#define PROT_SECT_NORMAL	(PROT_SECT_DEFAULT | PMD_SECT_PXN | PMD_SECT_UXN | PTE_WRITE | PMD_ATTRINDX(MT_NORMAL))
arch/arm64/include/asm/pgtable-prot.h:51:#define PROT_SECT_NORMAL_EXEC	(PROT_SECT_DEFAULT | PMD_SECT_UXN | PMD_ATTRINDX(MT_NORMAL))
arch/arm64/include/asm/pgtable-prot.h-52-
arch/arm64/include/asm/pgtable-prot.h:53:#define _PAGE_DEFAULT		(_PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))
arch/arm64/include/asm/pgtable-prot.h-54-
--
arch/arm64/include/asm/pgtable.h=150=static __always_inline bool pte_present(pte_t pte)
--
arch/arm64/include/asm/pgtable.h-161-#define pte_tagged(pte)		((pte_val(pte) & PTE_ATTRINDX_MASK) == \
arch/arm64/include/asm/pgtable.h:162:				 PTE_ATTRINDX(MT_NORMAL_TAGGED))
arch/arm64/include/asm/pgtable.h-163-
--
arch/arm64/include/asm/pgtable.h=725=static inline void __set_puds(struct mm_struct *mm, unsigned long addr,
--
arch/arm64/include/asm/pgtable.h-752-#define pgprot_noncached(prot) \
arch/arm64/include/asm/pgtable.h:753:	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h-754-#define pgprot_writecombine(prot) \
arch/arm64/include/asm/pgtable.h:755:	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h-756-#define pgprot_device(prot) \
arch/arm64/include/asm/pgtable.h:757:	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h-758-#define pgprot_tagged(prot) \
arch/arm64/include/asm/pgtable.h:759:	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_TAGGED))
arch/arm64/include/asm/pgtable.h-760-#define pgprot_mhp	pgprot_tagged
--
arch/arm64/include/asm/pgtable.h-770-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, \
arch/arm64/include/asm/pgtable.h:771:			PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h-772-
--
arch/arm64/kernel/mte.c=309=void mte_cpu_setup(void)
--
arch/arm64/kernel/mte.c-326-	sysreg_clear_set(mair_el1,
arch/arm64/kernel/mte.c:327:			 MAIR_ATTRIDX(MAIR_ATTR_MASK, MT_NORMAL_TAGGED),
arch/arm64/kernel/mte.c-328-			 MAIR_ATTRIDX(MAIR_ATTR_NORMAL_TAGGED,
arch/arm64/kernel/mte.c:329:				      MT_NORMAL_TAGGED));
arch/arm64/kernel/mte.c-330-
--
arch/arm64/kernel/smp_spin_table.c=66=static int smp_spin_table_cpu_prepare(unsigned int cpu)
--
arch/arm64/kernel/smp_spin_table.c-77-	 * existing linear mapping, we can use it to cover both cases. In
arch/arm64/kernel/smp_spin_table.c:78:	 * either case the memory will be MT_NORMAL.
arch/arm64/kernel/smp_spin_table.c-79-	 */
--
arch/arm64/kvm/hyp/pgtable.c=328=static int hyp_set_prot_attr(enum kvm_pgtable_prot prot, kvm_pte_t *ptep)
--
arch/arm64/kvm/hyp/pgtable.c-330-	bool device = prot & KVM_PGTABLE_PROT_DEVICE;
arch/arm64/kvm/hyp/pgtable.c:331:	u32 mtype = device ? MT_DEVICE_nGnRE : MT_NORMAL;
arch/arm64/kvm/hyp/pgtable.c-332-	kvm_pte_t attr = FIELD_PREP(KVM_PTE_LEAF_ATTR_LO_S1_ATTRIDX, mtype);
--
arch/arm64/kvm/mmu.c=1537=static bool kvm_vma_is_cacheable(struct vm_area_struct *vma)
--
arch/arm64/kvm/mmu.c-1539-	switch (FIELD_GET(PTE_ATTRINDX_MASK, pgprot_val(vma->vm_page_prot))) {
arch/arm64/kvm/mmu.c:1540:	case MT_NORMAL_NC:
arch/arm64/kvm/mmu.c:1541:	case MT_DEVICE_nGnRnE:
arch/arm64/kvm/mmu.c:1542:	case MT_DEVICE_nGnRE:
arch/arm64/kvm/mmu.c-1543-		return false;
--
arch/arm64/mm/mmap.c=88=pgprot_t vm_get_page_prot(vm_flags_t vm_flags)
--
arch/arm64/mm/mmap.c-117-	if (vm_flags & VM_MTE)
arch/arm64/mm/mmap.c:118:		prot |= PTE_ATTRINDX(MT_NORMAL_TAGGED);
arch/arm64/mm/mmap.c-119-
--
arch/arm64/mm/mmu.c=119=bool pgattr_change_is_safe(pteval_t old, pteval_t new)
--
arch/arm64/mm/mmu.c-144-	 */
arch/arm64/mm/mmu.c:145:	if (((old & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL) ||
arch/arm64/mm/mmu.c:146:	     (old & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL_TAGGED)) &&
arch/arm64/mm/mmu.c:147:	    ((new & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL) ||
arch/arm64/mm/mmu.c:148:	     (new & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL_TAGGED)))
arch/arm64/mm/mmu.c-149-		mask |= PTE_ATTRINDX_MASK;
--
arch/arm64/mm/proc.S-70-/*
arch/arm64/mm/proc.S:71: * Default MAIR_EL1. MT_NORMAL_TAGGED is initially mapped as Normal memory and
arch/arm64/mm/proc.S-72- * changed during mte_cpu_setup to Normal Tagged if the system supports MTE.
--
arch/arm64/mm/proc.S-74-#define MAIR_EL1_SET							\
arch/arm64/mm/proc.S:75:	(MAIR_ATTRIDX(MAIR_ATTR_DEVICE_nGnRnE, MT_DEVICE_nGnRnE) |	\
arch/arm64/mm/proc.S:76:	 MAIR_ATTRIDX(MAIR_ATTR_DEVICE_nGnRE, MT_DEVICE_nGnRE) |	\
arch/arm64/mm/proc.S:77:	 MAIR_ATTRIDX(MAIR_ATTR_NORMAL_NC, MT_NORMAL_NC) |		\
arch/arm64/mm/proc.S:78:	 MAIR_ATTRIDX(MAIR_ATTR_NORMAL, MT_NORMAL) |			\
arch/arm64/mm/proc.S:79:	 MAIR_ATTRIDX(MAIR_ATTR_NORMAL, MT_NORMAL_TAGGED))
arch/arm64/mm/proc.S-80-
--
arch/arm64/mm/proc.S=213=SYM_FUNC_ALIAS(__pi_idmap_cpu_replace_ttbr1, idmap_cpu_replace_ttbr1)
--
arch/arm64/mm/proc.S-217-
arch/arm64/mm/proc.S:218:#define KPTI_NG_PTE_FLAGS	(PTE_ATTRINDX(MT_NORMAL) | PTE_TYPE_PAGE | \
arch/arm64/mm/proc.S-219-				 PTE_AF | PTE_SHARED | PTE_UXN | PTE_WRITE)
--
arch/arm64/mm/ptdump.c=41=static const struct ptdump_prot_bits pte_bits[] = {
--
arch/arm64/mm/ptdump.c-98-		.mask	= PTE_ATTRINDX_MASK,
arch/arm64/mm/ptdump.c:99:		.val	= PTE_ATTRINDX(MT_DEVICE_nGnRnE),
arch/arm64/mm/ptdump.c-100-		.set	= "DEVICE/nGnRnE",
--
arch/arm64/mm/ptdump.c-102-		.mask	= PTE_ATTRINDX_MASK,
arch/arm64/mm/ptdump.c:103:		.val	= PTE_ATTRINDX(MT_DEVICE_nGnRE),
arch/arm64/mm/ptdump.c-104-		.set	= "DEVICE/nGnRE",
--
arch/arm64/mm/ptdump.c-106-		.mask	= PTE_ATTRINDX_MASK,
arch/arm64/mm/ptdump.c:107:		.val	= PTE_ATTRINDX(MT_NORMAL_NC),
arch/arm64/mm/ptdump.c-108-		.set	= "MEM/NORMAL-NC",
--
arch/arm64/mm/ptdump.c-110-		.mask	= PTE_ATTRINDX_MASK,
arch/arm64/mm/ptdump.c:111:		.val	= PTE_ATTRINDX(MT_NORMAL),
arch/arm64/mm/ptdump.c-112-		.set	= "MEM/NORMAL",
--
arch/arm64/mm/ptdump.c-114-		.mask	= PTE_ATTRINDX_MASK,
arch/arm64/mm/ptdump.c:115:		.val	= PTE_ATTRINDX(MT_NORMAL_TAGGED),
arch/arm64/mm/ptdump.c-116-		.set	= "MEM/NORMAL-TAGGED",
]

91/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 29164
							output: 20
							thoughts: 487
						

Thoughts:
**My Investigation into ARM Exclusive Accesses and Device Memory**

Okay, so I need to get a solid grasp on how ARM's exclusive loads and stores (`LDXR`, `LDAXR`, `STXR`, `STLXR`, and all those atomic instructions like `CAS`, `SWP`, `LDADD`, etc.) behave when they're hitting Device memory versus Normal memory. This is critical for robust and predictable behavior, especially in low-level systems programming. I need to know the official rules.

First, I'm digging into the ARMv8-A architecture reference manual. The key question is: what happens when I try to use `LDXR`/`STXR` or any atomic instruction on memory marked as `Device-nGnRnE`, `Device-nGnRE`, `Device-nGRE`, or `Device-GRE`?

Alright, let's see what the manual says about Exclusive accesses. The ARMv8-A spec states that these accesses *to Device memory* are not permitted and will cause an Alignment Fault or, potentially, an implementation-defined result. Often this results in an External Abort or Synchronous External Abort.

Hold on, let me verify that. Does it ALWAYS cause an Alignment Fault? Or does it vary and potentially cause an External Abort?

I'm cross-referencing this now with the ARM DDI 0487 (ARM ARM ARMv8) in sections B2.2.1, B2.2.6, B2.8, and D1.13. I see that an exclusive access to Device memory *can* cause either an Alignment Fault (specifically, with ESR_ELx.EC = 0x21 or 0x25, DFSC = 0b100001) or a Synchronous External Abort (if the bus is returning an error or a target abort).

So, it's not always an alignment fault! It depends on the implementation. The ARM ARM ARMv8 seems to lean towards an Alignment fault. But, is it consistently an Alignment fault? Or does it vary?

Now, what about the atomic instructions enabled by FEAT_LSE like `CAS` and `LDADD`? Does their behavior align with the exclusive load/store behavior when interacting with Device memory?

And, this is critical, do different ARM implementations handle this differently? That adds a layer of complexity. Then, when a user-space application directly makes these calls compared to what the kernel uses, like inside `futex`, does that impact it?

I need to dig deep now. I'm going to hit the kernel's git log and history to see how this has been handled in practice. Hopefully, I'll find some insights there!



92/4 2026/09/08 10:04 tool git-log
0m Args:
map[MessageRegexps:[exclusive.*device]]

Results:
map[Output:749d7aa0377a super: fix emergency thaw deadlock on frozen block devices
181bb9c9eae4 block: remove redundant GD_NEED_PART_SCAN in add_disk_final()
596b3678326d x86/video: Only fall back to vga_default_device() without screen info
cea570214461 selftests/mm: fix exclusive_cow test fork() handling
9872dae6102e s390/tape: Rename tape_34xx.c to tape_3490.c
08e136ebd193 loop: don't change loop device under exclusive opener in loop_set_status
80bab43f6f23 selftests/liveupdate: add userspace API selftests
e74b96d77da9 hwrng: core - Allow runtime disabling of the HW RNG
7e49538288e5 loop: Avoid updating block size under exclusive owner
c93d73c9c2cf media: uvcvideo: Use vb2 ioctl and fop helpers
]

93/4 2026/09/08 10:04 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 30538
							output: 36
							thoughts: 29
						

Thoughts:
Okay, here's my interpretation of those thoughts, framed as my own, given my expertise:

**Hunting Down the Root Cause**

Right, time to dig in. Given the problem description, I need to start getting granular. I'm going to leverage my familiarity with ARM64 systems and look for clues within the source code history. Specifically, I need to focus on any recent changes that could be related to these sorts of synchronization issues. I'll start with a targeted search of the Git commit logs. The phrases "Synchronous External Abort" and "exclusive" and "futex" are critical keywords for understanding potential synchronization problems or memory access conflicts, particularly on ARM64 architectures. The combination of these keywords is likely to reveal commits that touch upon critical low-level kernel interactions, concurrency mechanisms, or hardware-specific synchronization primitives. I'm hoping to identify the recent changes most likely to have introduced the observed behavior. This narrow scope should cut through the noise and surface potentially problematic code sections related to those low-level aspects.



94/4 2026/09/08 10:04 tool git-log
0m Args:
map[MessageRegexps:[futex arm64] PathPrefix:arch/arm64]

Results:
map[Output:7eccf137dc04 arm64/runtime-const: Introduce runtime_const_mask_32()
a6690350a4ae arm64/runtime-const: Use aarch64_insn_patch_text_nosync() for patching
25ef34b541eb arm64: futex: Consolidate 'old == new' check in __lsui_cmpxchg32()
44adf2bf40ef arm64: futex: Support futex with FEAT_LSUI
eaa3babcceaa arm64: futex: Refactor futex atomic operation
773b24bcedc1 arm64, compiler-context-analysis: Permit alias analysis through __READ_ONCE() with CONFIG_LTO=y
a4e5927115f3 arm64: mte: Set TCMA1 whenever MTE is present in the kernel
1cf89b6bf660 arm64: Kconfig: Make CPU_BIG_ENDIAN depend on BROKEN
eeda243dfeb9 arm64: add encodings of PIRx_ELx registers
7cf283c7bd62 arm64: uaccess: remove redundant PAN toggling
]

95/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 31126
							output: 31
							thoughts: 20
						

Thoughts:
Here's my thought process, as if I were considering this search:

**Investigating "External Abort" in ARM64 Kernel Code**

Okay, so I'm thinking about digging into the kernel source to understand how "external abort" events are handled, specifically within the `arch/arm64` and `drivers` directories. My initial hunch is that commit messages might offer a quick entry point. They often contain summaries of the problem being solved, and sometimes even the *why* behind a particular fix. "External abort" is a pretty specific term, so I'm hoping it's been used enough in the past to give me some context. I'll need to use a robust search tool like `git log` with some clever filtering to achieve this effectively. I should also anticipate false positives. It's possible that the phrase has been used in unrelated contexts, but hopefully, with a little refinement of the search terms, I can narrow the results and start seeing a pattern develop within the relevant areas of the code base. Let's see what we find!



96/4 2026/09/08 10:05 tool git-log
0m Args:
map[MessageRegexps:[External Abort] PathPrefix:arch/arm64]

Results:
map[Output:4cd774c1feb3 arm64: dts: qcom: purwa: Fix GPU IOMMU property
9f3e83345a56 KVM: arm64: nv: Inject SEA if kvm_translate_vncr() can't resolve PFN
85d98669fa7f arm64: dts: qcom: monaco: Reserve full Gunyah metadata region
ee021b27333b arm64: dts: qcom: kodiak: Add missing clock votes for lpass_tlmm
ad9c62bd8946 KVM: arm64: VM exit to userspace to handle SEA
69f8fe955d0b KVM: arm64: nv: Handle SEAs due to VNCR redirection
c6e35dff58d3 KVM: arm64: Check for SYSREGS_ON_CPU before accessing the CPU state
d7ce7e3a8464 arm64: Mark kernel as tainted on SAE and SError panic
a3c4a00dbe20 KVM: arm64: Advertise support for FEAT_DoubleFault2
ce66109cec86 KVM: arm64: nv: Take "masked" aborts to EL2 when HCRX_EL2.TMEA is set
]

97/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 31731
							output: 26
							thoughts: 22
						

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

**Kernel Commit Message Analysis: "Exclusive" & "Abort/Futex"**

Okay, so I need to get a handle on how these keywords are being used in the kernel's commit messages. Specifically, I want to see how "exclusive" is used, and if there's any correlation with "abort" or "futex." This should be pretty straightforward, I can probably script this with `git log` and `grep`, maybe even pipe it through `awk` or `sed` for more refined parsing. I'm looking for semantic connections here – are "exclusive" locks being paired with "abort" scenarios due to deadlock situations or something? Or is "futex" used in context with exclusive locks to indicate that something went wrong? What's the context surrounding their usage, and are there any patterns I can identify to understand the intent better? This should help in discovering potential areas that are not optimal, or if there's code that could be improved. This analysis could inform future refinements, or even direct me to specific code paths to investigate further. Time to get to it.



98/4 2026/09/08 10:05 tool git-log
0m Args:
map[MessageRegexps:[exclusive device abort]]

Results:
map[Output:8b6b55bfc7d1 btrfs: deny freezing devices undergoing a replace
48b1cc0ac94d btrfs: deny freezing a device while it is being added
a6abd64e145c loop: revert exclusive opener loop status change
2937aeec9dc5 KVM: arm64: Handle DABT caused by LS64* instructions on unsupported memory
2704024d83fa loop: add missing bd_abort_claiming in loop_set_status
4289b494ac55 btrfs: do not allow relocation of partially dropped subvolumes
45515eec6662 crypto: qat - add compression slice count for rate limiting
0581d384f344 platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers
f807123d578d mm: allow guard regions in file-backed and read-only mappings
1f3ac4c577bb mm/damon: handle device-exclusive entries correctly in damon_folio_mkold_one()
]

99/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 32306
							output: 39
							thoughts: 223
						

Thoughts:
**Analyzing Device Memory Access and Futex Behavior**

Okay, so I'm digging into a pretty specific scenario here, trying to understand the interaction between userspace access to device memory and the `futex()` system call, specifically on ARM64. The core of my interest lies in how exclusive instructions like `ldxr` and `stxr`, or compare-and-swap (`cas`) behave when used in conjunction with device memory mapped into userspace.

First, I need to break down the problem into these parts: can an unprivileged user even *get* a mapping of device memory? I'm thinking about DRM render nodes and other unprivileged device nodes as potential pathways. Does the system allow me to use `pgprot_noncached` or `pgprot_writecombine` or similar memory protection flags with these device mappings? That's question one.

The second part builds on that: if I *can* map the device memory, what happens if I call `futex()` on it? Specifically, can I trigger a Synchronous External Abort on ARM64 by using `ldxr` in device memory? That's the real crux of this investigation.

To answer this, I'm going to start by diving into the internals of the DRM framework. I'll need to figure out how GPU and DRM drivers handle buffer mapping for userspace access. I need to search the driver code for all the key functions and structures: `pgprot_noncached`, `pgprot_writecombine`, `pgprot_device`, `io_remap_pfn_range`, `remap_pfn_range`, `vma->vm_page_prot`, and anything related to render nodes and their associated memory mapping mechanisms. The goal is to fully understand the flow of device memory from kernel space to user space and how the protections work.



100/4 2026/09/08 10:05 tool grepper
0m Args:
map[Expression:render node|DRM_RENDER_ALLOW|DRM_AUTH PathPrefix:drivers/gpu/drm]

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

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c=3085=const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3086:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3087:	DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3088:	DRM_IOCTL_DEF_DRV(AMDGPU_VM, amdgpu_vm_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c-3089-	DRM_IOCTL_DEF_DRV(AMDGPU_SCHED, amdgpu_sched_ioctl, DRM_MASTER),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3090:	DRM_IOCTL_DEF_DRV(AMDGPU_BO_LIST, amdgpu_bo_list_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3091:	DRM_IOCTL_DEF_DRV(AMDGPU_FENCE_TO_HANDLE, amdgpu_cs_fence_to_handle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c-3092-	/* KMS */
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3093:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_MMAP, amdgpu_gem_mmap_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3094:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_WAIT_IDLE, amdgpu_gem_wait_idle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3095:	DRM_IOCTL_DEF_DRV(AMDGPU_CS, amdgpu_cs_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3096:	DRM_IOCTL_DEF_DRV(AMDGPU_INFO, amdgpu_info_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3097:	DRM_IOCTL_DEF_DRV(AMDGPU_WAIT_CS, amdgpu_cs_wait_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3098:	DRM_IOCTL_DEF_DRV(AMDGPU_WAIT_FENCES, amdgpu_cs_wait_fences_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3099:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_METADATA, amdgpu_gem_metadata_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3100:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_VA, amdgpu_gem_va_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3101:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_OP, amdgpu_gem_op_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3102:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_USERPTR, amdgpu_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3103:	DRM_IOCTL_DEF_DRV(AMDGPU_USERQ, amdgpu_userq_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3104:	DRM_IOCTL_DEF_DRV(AMDGPU_USERQ_SIGNAL, amdgpu_userq_signal_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3105:	DRM_IOCTL_DEF_DRV(AMDGPU_USERQ_WAIT, amdgpu_userq_wait_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3106:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_LIST_HANDLES, amdgpu_gem_list_handles_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3107:	DRM_IOCTL_DEF_DRV(AMDGPU_PROC_OPTIONS, amdgpu_proc_options_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c-3108-};
--
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c=2331=static int criu_restore_devices(struct kfd_process *p,
--
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-2389-		if (!drm_file) {
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:2390:			pr_err("Invalid render node file descriptor sent from plugin (%d)\n",
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-2391-				device_buckets[i].drm_fd);
--
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-2395-
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:2396:		/* create the vm using render nodes for kfd pdd */
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-2397-		if (kfd_process_device_init_vm(pdd, drm_file)) {
--
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-2404-		/*
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:2405:		 * pdd now already has the vm bound to render node so below api won't create a new
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-2406-		 * exclusive kfd mapping but use existing one with renderDXXX but is still needed
--
drivers/gpu/drm/amd/include/kgd_kfd_interface.h=107=struct kgd2kfd_shared_resources {
--
drivers/gpu/drm/amd/include/kgd_kfd_interface.h-143-
drivers/gpu/drm/amd/include/kgd_kfd_interface.h:144:	/* Minor device number of the render node */
drivers/gpu/drm/amd/include/kgd_kfd_interface.h-145-	int drm_render_minor;
--
drivers/gpu/drm/drm_drv.c=118=static void drm_minor_alloc_release(struct drm_device *dev, void *data)
--
drivers/gpu/drm/drm_drv.c-131- * minor allocation scheme where minors 0-63 are primary nodes, 64-127 are control nodes,
drivers/gpu/drm/drm_drv.c:132: * and 128-191 are render nodes.
drivers/gpu/drm/drm_drv.c-133- * After reaching the limit, we're allocating minors dynamically - first-come, first-serve.
--
drivers/gpu/drm/drm_ioc32.c=92=static int compat_drm_version(struct file *file, unsigned int cmd,
--
drivers/gpu/drm/drm_ioc32.c-112-	err = drm_ioctl_kernel(file, drm_version, &v,
drivers/gpu/drm/drm_ioc32.c:113:			       DRM_RENDER_ALLOW);
drivers/gpu/drm/drm_ioc32.c-114-	if (err)
--
drivers/gpu/drm/drm_ioctl.c=611=static int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)
--
drivers/gpu/drm/drm_ioctl.c-617-	/* AUTH is only for authenticated or render client */
drivers/gpu/drm/drm_ioctl.c:618:	if (unlikely((flags & DRM_AUTH) && !drm_is_render_client(file_priv) &&
drivers/gpu/drm/drm_ioctl.c-619-		     !file_priv->authenticated))
--
drivers/gpu/drm/drm_ioctl.c-627-	/* Render clients must be explicitly allowed */
drivers/gpu/drm/drm_ioctl.c:628:	if (unlikely(!(flags & DRM_RENDER_ALLOW) &&
drivers/gpu/drm/drm_ioctl.c-629-		     drm_is_render_client(file_priv)))
--
drivers/gpu/drm/drm_ioctl.c=644=static const struct drm_ioctl_desc drm_ioctls[] = {
drivers/gpu/drm/drm_ioctl.c:645:	DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-646-	DRM_IOCTL_DEF(DRM_IOCTL_GET_UNIQUE, drm_getunique, 0),
--
drivers/gpu/drm/drm_ioctl.c-650-	DRM_IOCTL_DEF(DRM_IOCTL_GET_STATS, drm_getstats, 0),
drivers/gpu/drm/drm_ioctl.c:651:	DRM_IOCTL_DEF(DRM_IOCTL_GET_CAP, drm_getcap, DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-652-	DRM_IOCTL_DEF(DRM_IOCTL_SET_CLIENT_CAP, drm_setclientcap, 0),
--
drivers/gpu/drm/drm_ioctl.c-654-
drivers/gpu/drm/drm_ioctl.c:655:	DRM_IOCTL_DEF(DRM_IOCTL_SET_UNIQUE, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/drm_ioctl.c:656:	DRM_IOCTL_DEF(DRM_IOCTL_BLOCK, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/drm_ioctl.c:657:	DRM_IOCTL_DEF(DRM_IOCTL_UNBLOCK, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/drm_ioctl.c-658-	DRM_IOCTL_DEF(DRM_IOCTL_AUTH_MAGIC, drm_authmagic, DRM_MASTER),
--
drivers/gpu/drm/drm_ioctl.c-662-
drivers/gpu/drm/drm_ioctl.c:663:	DRM_IOCTL_DEF(DRM_IOCTL_ADD_DRAW, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/drm_ioctl.c:664:	DRM_IOCTL_DEF(DRM_IOCTL_RM_DRAW, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/drm_ioctl.c-665-
drivers/gpu/drm/drm_ioctl.c:666:	DRM_IOCTL_DEF(DRM_IOCTL_FINISH, drm_noop, DRM_AUTH),
drivers/gpu/drm/drm_ioctl.c-667-
--
drivers/gpu/drm/drm_ioctl.c-669-
drivers/gpu/drm/drm_ioctl.c:670:	DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/drm_ioctl.c-671-
drivers/gpu/drm/drm_ioctl.c:672:	DRM_IOCTL_DEF(DRM_IOCTL_GEM_CLOSE, drm_gem_close_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c:673:	DRM_IOCTL_DEF(DRM_IOCTL_GEM_FLINK, drm_gem_flink_ioctl, DRM_AUTH),
drivers/gpu/drm/drm_ioctl.c:674:	DRM_IOCTL_DEF(DRM_IOCTL_GEM_OPEN, drm_gem_open_ioctl, DRM_AUTH),
drivers/gpu/drm/drm_ioctl.c-675-	/* see drm_gem.c:drm_gem_change_handle_ioctl for why this is invalid */
drivers/gpu/drm/drm_ioctl.c:676:	DRM_IOCTL_DEF(DRM_IOCTL_GEM_CHANGE_HANDLE, drm_invalid_op, DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-677-
--
drivers/gpu/drm/drm_ioctl.c-679-
drivers/gpu/drm/drm_ioctl.c:680:	DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c:681:	DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-682-
drivers/gpu/drm/drm_ioctl.c:683:	DRM_IOCTL_DEF(DRM_IOCTL_SET_CLIENT_NAME, drm_set_client_name, DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-684-
--
drivers/gpu/drm/drm_ioctl.c-718-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_CREATE, drm_syncobj_create_ioctl,
drivers/gpu/drm/drm_ioctl.c:719:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-720-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_DESTROY, drm_syncobj_destroy_ioctl,
drivers/gpu/drm/drm_ioctl.c:721:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-722-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD, drm_syncobj_handle_to_fd_ioctl,
drivers/gpu/drm/drm_ioctl.c:723:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-724-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE, drm_syncobj_fd_to_handle_ioctl,
drivers/gpu/drm/drm_ioctl.c:725:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-726-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_TRANSFER, drm_syncobj_transfer_ioctl,
drivers/gpu/drm/drm_ioctl.c:727:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-728-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_WAIT, drm_syncobj_wait_ioctl,
drivers/gpu/drm/drm_ioctl.c:729:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-730-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT, drm_syncobj_timeline_wait_ioctl,
drivers/gpu/drm/drm_ioctl.c:731:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-732-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_EVENTFD, drm_syncobj_eventfd_ioctl,
drivers/gpu/drm/drm_ioctl.c:733:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-734-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_RESET, drm_syncobj_reset_ioctl,
drivers/gpu/drm/drm_ioctl.c:735:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-736-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_SIGNAL, drm_syncobj_signal_ioctl,
drivers/gpu/drm/drm_ioctl.c:737:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-738-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL, drm_syncobj_timeline_signal_ioctl,
drivers/gpu/drm/drm_ioctl.c:739:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-740-	DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_QUERY, drm_syncobj_query_ioctl,
drivers/gpu/drm/drm_ioctl.c:741:		      DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-742-	DRM_IOCTL_DEF(DRM_IOCTL_CRTC_GET_SEQUENCE, drm_crtc_get_sequence_ioctl, 0),
--
drivers/gpu/drm/drm_ioctl.c-789- *         DRM_IOCTL_DEF_DRV(MY_DRIVER_OPERATION, my_driver_operation,
drivers/gpu/drm/drm_ioctl.c:790: *                 DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/drm_ioctl.c-791- *     };
--
drivers/gpu/drm/etnaviv/etnaviv_drv.c=476=static const struct drm_ioctl_desc etnaviv_ioctls[] = {
--
drivers/gpu/drm/etnaviv/etnaviv_drv.c-478-	DRM_IOCTL_DEF_DRV(ETNAVIV_##n, etnaviv_ioctl_##func, flags)
drivers/gpu/drm/etnaviv/etnaviv_drv.c:479:	ETNA_IOCTL(GET_PARAM,    get_param,    DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:480:	ETNA_IOCTL(GEM_NEW,      gem_new,      DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:481:	ETNA_IOCTL(GEM_INFO,     gem_info,     DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:482:	ETNA_IOCTL(GEM_CPU_PREP, gem_cpu_prep, DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:483:	ETNA_IOCTL(GEM_CPU_FINI, gem_cpu_fini, DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:484:	ETNA_IOCTL(GEM_SUBMIT,   gem_submit,   DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:485:	ETNA_IOCTL(WAIT_FENCE,   wait_fence,   DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:486:	ETNA_IOCTL(GEM_USERPTR,  gem_userptr,  DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:487:	ETNA_IOCTL(GEM_WAIT,     gem_wait,     DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:488:	ETNA_IOCTL(PM_QUERY_DOM, pm_query_dom, DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c:489:	ETNA_IOCTL(PM_QUERY_SIG, pm_query_sig, DRM_RENDER_ALLOW),
drivers/gpu/drm/etnaviv/etnaviv_drv.c-490-};
--
drivers/gpu/drm/exynos/exynos_drm_drv.c=77=static const struct drm_ioctl_desc exynos_ioctls[] = {
drivers/gpu/drm/exynos/exynos_drm_drv.c-78-	DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:79:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-80-	DRM_IOCTL_DEF_DRV(EXYNOS_GEM_MAP, exynos_drm_gem_map_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:81:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-82-	DRM_IOCTL_DEF_DRV(EXYNOS_GEM_GET, exynos_drm_gem_get_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:83:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-84-	DRM_IOCTL_DEF_DRV(EXYNOS_VIDI_CONNECTION, vidi_connection_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:85:			DRM_AUTH),
drivers/gpu/drm/exynos/exynos_drm_drv.c-86-	DRM_IOCTL_DEF_DRV(EXYNOS_G2D_GET_VER, exynos_g2d_get_ver_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:87:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-88-	DRM_IOCTL_DEF_DRV(EXYNOS_G2D_SET_CMDLIST, exynos_g2d_set_cmdlist_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:89:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-90-	DRM_IOCTL_DEF_DRV(EXYNOS_G2D_EXEC, exynos_g2d_exec_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:91:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-92-	DRM_IOCTL_DEF_DRV(EXYNOS_IPP_GET_RESOURCES,
drivers/gpu/drm/exynos/exynos_drm_drv.c-93-			exynos_drm_ipp_get_res_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:94:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-95-	DRM_IOCTL_DEF_DRV(EXYNOS_IPP_GET_CAPS, exynos_drm_ipp_get_caps_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:96:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-97-	DRM_IOCTL_DEF_DRV(EXYNOS_IPP_GET_LIMITS,
drivers/gpu/drm/exynos/exynos_drm_drv.c-98-			exynos_drm_ipp_get_limits_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:99:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-100-	DRM_IOCTL_DEF_DRV(EXYNOS_IPP_COMMIT, exynos_drm_ipp_commit_ioctl,
drivers/gpu/drm/exynos/exynos_drm_drv.c:101:			DRM_RENDER_ALLOW),
drivers/gpu/drm/exynos/exynos_drm_drv.c-102-};
--
drivers/gpu/drm/i915/i915_driver.c=1690=static const struct drm_ioctl_desc i915_ioctls[] = {
drivers/gpu/drm/i915/i915_driver.c:1691:	DRM_IOCTL_DEF_DRV(I915_INIT, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1692:	DRM_IOCTL_DEF_DRV(I915_FLUSH, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1693:	DRM_IOCTL_DEF_DRV(I915_FLIP, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1694:	DRM_IOCTL_DEF_DRV(I915_BATCHBUFFER, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1695:	DRM_IOCTL_DEF_DRV(I915_IRQ_EMIT, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1696:	DRM_IOCTL_DEF_DRV(I915_IRQ_WAIT, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1697:	DRM_IOCTL_DEF_DRV(I915_GETPARAM, i915_getparam_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1698:	DRM_IOCTL_DEF_DRV(I915_SETPARAM, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1699:	DRM_IOCTL_DEF_DRV(I915_ALLOC, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1700:	DRM_IOCTL_DEF_DRV(I915_FREE, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1701:	DRM_IOCTL_DEF_DRV(I915_INIT_HEAP, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1702:	DRM_IOCTL_DEF_DRV(I915_CMDBUFFER, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1703:	DRM_IOCTL_DEF_DRV(I915_DESTROY_HEAP, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1704:	DRM_IOCTL_DEF_DRV(I915_SET_VBLANK_PIPE, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1705:	DRM_IOCTL_DEF_DRV(I915_GET_VBLANK_PIPE, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1706:	DRM_IOCTL_DEF_DRV(I915_VBLANK_SWAP, drm_noop, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1707:	DRM_IOCTL_DEF_DRV(I915_HWS_ADDR, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1708:	DRM_IOCTL_DEF_DRV(I915_GEM_INIT, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1709:	DRM_IOCTL_DEF_DRV(I915_GEM_EXECBUFFER, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/i915/i915_driver.c:1710:	DRM_IOCTL_DEF_DRV(I915_GEM_EXECBUFFER2_WR, i915_gem_execbuffer2_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1711:	DRM_IOCTL_DEF_DRV(I915_GEM_PIN, i915_gem_reject_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1712:	DRM_IOCTL_DEF_DRV(I915_GEM_UNPIN, i915_gem_reject_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1713:	DRM_IOCTL_DEF_DRV(I915_GEM_BUSY, i915_gem_busy_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1714:	DRM_IOCTL_DEF_DRV(I915_GEM_SET_CACHING, i915_gem_set_caching_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1715:	DRM_IOCTL_DEF_DRV(I915_GEM_GET_CACHING, i915_gem_get_caching_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1716:	DRM_IOCTL_DEF_DRV(I915_GEM_THROTTLE, i915_gem_throttle_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1717:	DRM_IOCTL_DEF_DRV(I915_GEM_ENTERVT, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1718:	DRM_IOCTL_DEF_DRV(I915_GEM_LEAVEVT, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_driver.c:1719:	DRM_IOCTL_DEF_DRV(I915_GEM_CREATE, i915_gem_create_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1720:	DRM_IOCTL_DEF_DRV(I915_GEM_CREATE_EXT, i915_gem_create_ext_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1721:	DRM_IOCTL_DEF_DRV(I915_GEM_PREAD, i915_gem_pread_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1722:	DRM_IOCTL_DEF_DRV(I915_GEM_PWRITE, i915_gem_pwrite_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1723:	DRM_IOCTL_DEF_DRV(I915_GEM_MMAP, i915_gem_mmap_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1724:	DRM_IOCTL_DEF_DRV(I915_GEM_MMAP_OFFSET, i915_gem_mmap_offset_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1725:	DRM_IOCTL_DEF_DRV(I915_GEM_SET_DOMAIN, i915_gem_set_domain_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1726:	DRM_IOCTL_DEF_DRV(I915_GEM_SW_FINISH, i915_gem_sw_finish_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1727:	DRM_IOCTL_DEF_DRV(I915_GEM_SET_TILING, i915_gem_set_tiling_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1728:	DRM_IOCTL_DEF_DRV(I915_GEM_GET_TILING, i915_gem_get_tiling_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1729:	DRM_IOCTL_DEF_DRV(I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c-1730-	DRM_IOCTL_DEF_DRV(I915_GET_PIPE_FROM_CRTC_ID, intel_crtc_get_pipe_from_crtc_id_ioctl, 0),
drivers/gpu/drm/i915/i915_driver.c:1731:	DRM_IOCTL_DEF_DRV(I915_GEM_MADVISE, i915_gem_madvise_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c-1732-	DRM_IOCTL_DEF_DRV(I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image_ioctl, DRM_MASTER),
--
drivers/gpu/drm/i915/i915_driver.c-1735-	DRM_IOCTL_DEF_DRV(I915_GET_SPRITE_COLORKEY, drm_noop, DRM_MASTER),
drivers/gpu/drm/i915/i915_driver.c:1736:	DRM_IOCTL_DEF_DRV(I915_GEM_WAIT, i915_gem_wait_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1737:	DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_CREATE_EXT, i915_gem_context_create_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1738:	DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_DESTROY, i915_gem_context_destroy_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1739:	DRM_IOCTL_DEF_DRV(I915_REG_READ, i915_reg_read_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1740:	DRM_IOCTL_DEF_DRV(I915_GET_RESET_STATS, i915_gem_context_reset_stats_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1741:	DRM_IOCTL_DEF_DRV(I915_GEM_USERPTR, i915_gem_userptr_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1742:	DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_GETPARAM, i915_gem_context_getparam_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1743:	DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_SETPARAM, i915_gem_context_setparam_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1744:	DRM_IOCTL_DEF_DRV(I915_PERF_OPEN, i915_perf_open_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1745:	DRM_IOCTL_DEF_DRV(I915_PERF_ADD_CONFIG, i915_perf_add_config_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1746:	DRM_IOCTL_DEF_DRV(I915_PERF_REMOVE_CONFIG, i915_perf_remove_config_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1747:	DRM_IOCTL_DEF_DRV(I915_QUERY, i915_query_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1748:	DRM_IOCTL_DEF_DRV(I915_GEM_VM_CREATE, i915_gem_vm_create_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c:1749:	DRM_IOCTL_DEF_DRV(I915_GEM_VM_DESTROY, i915_gem_vm_destroy_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/i915/i915_driver.c-1750-};
--
drivers/gpu/drm/i915/i915_ioc32.c=47=static int compat_i915_getparam(struct file *file, unsigned int cmd,
--
drivers/gpu/drm/i915/i915_ioc32.c-59-	return drm_ioctl_kernel(file, i915_getparam_ioctl, &req,
drivers/gpu/drm/i915/i915_ioc32.c:60:				DRM_RENDER_ALLOW);
drivers/gpu/drm/i915/i915_ioc32.c-61-}
--
drivers/gpu/drm/imagination/pvr_drv.c=1278=static const struct drm_ioctl_desc pvr_drm_driver_ioctls[] = {
drivers/gpu/drm/imagination/pvr_drv.c:1279:	DRM_PVR_IOCTL(DEV_QUERY, dev_query, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1280:	DRM_PVR_IOCTL(CREATE_BO, create_bo, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1281:	DRM_PVR_IOCTL(GET_BO_MMAP_OFFSET, get_bo_mmap_offset, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1282:	DRM_PVR_IOCTL(CREATE_VM_CONTEXT, create_vm_context, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1283:	DRM_PVR_IOCTL(DESTROY_VM_CONTEXT, destroy_vm_context, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1284:	DRM_PVR_IOCTL(VM_MAP, vm_map, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1285:	DRM_PVR_IOCTL(VM_UNMAP, vm_unmap, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1286:	DRM_PVR_IOCTL(CREATE_CONTEXT, create_context, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1287:	DRM_PVR_IOCTL(DESTROY_CONTEXT, destroy_context, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1288:	DRM_PVR_IOCTL(CREATE_FREE_LIST, create_free_list, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1289:	DRM_PVR_IOCTL(DESTROY_FREE_LIST, destroy_free_list, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1290:	DRM_PVR_IOCTL(CREATE_HWRT_DATASET, create_hwrt_dataset, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1291:	DRM_PVR_IOCTL(DESTROY_HWRT_DATASET, destroy_hwrt_dataset, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c:1292:	DRM_PVR_IOCTL(SUBMIT_JOBS, submit_jobs, DRM_RENDER_ALLOW),
drivers/gpu/drm/imagination/pvr_drv.c-1293-};
--
drivers/gpu/drm/lima/lima_drv.c=247=static const struct drm_ioctl_desc lima_drm_driver_ioctls[] = {
drivers/gpu/drm/lima/lima_drv.c:248:	DRM_IOCTL_DEF_DRV(LIMA_GET_PARAM, lima_ioctl_get_param, DRM_RENDER_ALLOW),
drivers/gpu/drm/lima/lima_drv.c:249:	DRM_IOCTL_DEF_DRV(LIMA_GEM_CREATE, lima_ioctl_gem_create, DRM_RENDER_ALLOW),
drivers/gpu/drm/lima/lima_drv.c:250:	DRM_IOCTL_DEF_DRV(LIMA_GEM_INFO, lima_ioctl_gem_info, DRM_RENDER_ALLOW),
drivers/gpu/drm/lima/lima_drv.c:251:	DRM_IOCTL_DEF_DRV(LIMA_GEM_SUBMIT, lima_ioctl_gem_submit, DRM_RENDER_ALLOW),
drivers/gpu/drm/lima/lima_drv.c:252:	DRM_IOCTL_DEF_DRV(LIMA_GEM_WAIT, lima_ioctl_gem_wait, DRM_RENDER_ALLOW),
drivers/gpu/drm/lima/lima_drv.c:253:	DRM_IOCTL_DEF_DRV(LIMA_CTX_CREATE, lima_ioctl_ctx_create, DRM_RENDER_ALLOW),
drivers/gpu/drm/lima/lima_drv.c:254:	DRM_IOCTL_DEF_DRV(LIMA_CTX_FREE, lima_ioctl_ctx_free, DRM_RENDER_ALLOW),
drivers/gpu/drm/lima/lima_drv.c-255-};
--
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c=291=static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor)
--
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c-299-
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:300:	/* Only create a set of debugfs for the primary node, ignore render nodes */
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c-301-	if (minor->type != DRM_MINOR_PRIMARY)
--
drivers/gpu/drm/msm/msm_drv.c=797=static const struct drm_ioctl_desc msm_ioctls[] = {
drivers/gpu/drm/msm/msm_drv.c:798:	DRM_IOCTL_DEF_DRV(MSM_GET_PARAM,    msm_ioctl_get_param,    DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:799:	DRM_IOCTL_DEF_DRV(MSM_SET_PARAM,    msm_ioctl_set_param,    DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:800:	DRM_IOCTL_DEF_DRV(MSM_GEM_NEW,      msm_ioctl_gem_new,      DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:801:	DRM_IOCTL_DEF_DRV(MSM_GEM_INFO,     msm_ioctl_gem_info,     DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:802:	DRM_IOCTL_DEF_DRV(MSM_GEM_CPU_PREP, msm_ioctl_gem_cpu_prep, DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:803:	DRM_IOCTL_DEF_DRV(MSM_GEM_CPU_FINI, msm_ioctl_gem_cpu_fini, DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:804:	DRM_IOCTL_DEF_DRV(MSM_GEM_SUBMIT,   msm_ioctl_gem_submit,   DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:805:	DRM_IOCTL_DEF_DRV(MSM_WAIT_FENCE,   msm_ioctl_wait_fence,   DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:806:	DRM_IOCTL_DEF_DRV(MSM_GEM_MADVISE,  msm_ioctl_gem_madvise,  DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:807:	DRM_IOCTL_DEF_DRV(MSM_SUBMITQUEUE_NEW,   msm_ioctl_submitqueue_new,   DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:808:	DRM_IOCTL_DEF_DRV(MSM_SUBMITQUEUE_CLOSE, msm_ioctl_submitqueue_close, DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:809:	DRM_IOCTL_DEF_DRV(MSM_SUBMITQUEUE_QUERY, msm_ioctl_submitqueue_query, DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:810:	DRM_IOCTL_DEF_DRV(MSM_VM_BIND,      msm_ioctl_vm_bind,      DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c:811:	DRM_IOCTL_DEF_DRV(MSM_PERFCNTR_CONFIG,   msm_ioctl_perfcntr_config,    DRM_RENDER_ALLOW),
drivers/gpu/drm/msm/msm_drv.c-812-};
--
drivers/gpu/drm/nouveau/nouveau_drm.c=1298=nouveau_ioctls[] = {
drivers/gpu/drm/nouveau/nouveau_drm.c:1299:	DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_abi16_ioctl_getparam, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1300:	DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/nouveau/nouveau_drm.c:1301:	DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_abi16_ioctl_channel_alloc, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1302:	DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_abi16_ioctl_channel_free, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1303:	DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_abi16_ioctl_grobj_alloc, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1304:	DRM_IOCTL_DEF_DRV(NOUVEAU_NOTIFIEROBJ_ALLOC, nouveau_abi16_ioctl_notifierobj_alloc, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1305:	DRM_IOCTL_DEF_DRV(NOUVEAU_GPUOBJ_FREE, nouveau_abi16_ioctl_gpuobj_free, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1306:	DRM_IOCTL_DEF_DRV(NOUVEAU_GET_ZCULL_INFO, nouveau_abi16_ioctl_get_zcull_info, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1307:	DRM_IOCTL_DEF_DRV(NOUVEAU_SVM_INIT, nouveau_svmm_init, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1308:	DRM_IOCTL_DEF_DRV(NOUVEAU_SVM_BIND, nouveau_svmm_bind, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1309:	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_NEW, nouveau_gem_ioctl_new, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1310:	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_PUSHBUF, nouveau_gem_ioctl_pushbuf, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1311:	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_PREP, nouveau_gem_ioctl_cpu_prep, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1312:	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_FINI, nouveau_gem_ioctl_cpu_fini, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1313:	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_INFO, nouveau_gem_ioctl_info, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1314:	DRM_IOCTL_DEF_DRV(NOUVEAU_VM_INIT, nouveau_uvmm_ioctl_vm_init, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1315:	DRM_IOCTL_DEF_DRV(NOUVEAU_VM_BIND, nouveau_uvmm_ioctl_vm_bind, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c:1316:	DRM_IOCTL_DEF_DRV(NOUVEAU_EXEC, nouveau_exec_ioctl_exec, DRM_RENDER_ALLOW),
drivers/gpu/drm/nouveau/nouveau_drm.c-1317-};
--
drivers/gpu/drm/omapdrm/omap_drv.c=614=static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {
drivers/gpu/drm/omapdrm/omap_drv.c-615-	DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param,
drivers/gpu/drm/omapdrm/omap_drv.c:616:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/omapdrm/omap_drv.c-617-	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, drm_invalid_op,
drivers/gpu/drm/omapdrm/omap_drv.c:618:			  DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY),
drivers/gpu/drm/omapdrm/omap_drv.c-619-	DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new,
drivers/gpu/drm/omapdrm/omap_drv.c:620:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/omapdrm/omap_drv.c-621-	/* Deprecated, to be removed. */
drivers/gpu/drm/omapdrm/omap_drv.c-622-	DRM_IOCTL_DEF_DRV(OMAP_GEM_CPU_PREP, drm_noop,
drivers/gpu/drm/omapdrm/omap_drv.c:623:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/omapdrm/omap_drv.c-624-	/* Deprecated, to be removed. */
drivers/gpu/drm/omapdrm/omap_drv.c-625-	DRM_IOCTL_DEF_DRV(OMAP_GEM_CPU_FINI, drm_noop,
drivers/gpu/drm/omapdrm/omap_drv.c:626:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/omapdrm/omap_drv.c-627-	DRM_IOCTL_DEF_DRV(OMAP_GEM_INFO, ioctl_gem_info,
drivers/gpu/drm/omapdrm/omap_drv.c:628:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/omapdrm/omap_drv.c-629-};
--
drivers/gpu/drm/panfrost/panfrost_drv.c=726=static const struct drm_ioctl_desc panfrost_drm_driver_ioctls[] = {
--
drivers/gpu/drm/panfrost/panfrost_drv.c-729-
drivers/gpu/drm/panfrost/panfrost_drv.c:730:	PANFROST_IOCTL(SUBMIT,		submit,		DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:731:	PANFROST_IOCTL(WAIT_BO,		wait_bo,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:732:	PANFROST_IOCTL(CREATE_BO,	create_bo,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:733:	PANFROST_IOCTL(MMAP_BO,		mmap_bo,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:734:	PANFROST_IOCTL(GET_PARAM,	get_param,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:735:	PANFROST_IOCTL(GET_BO_OFFSET,	get_bo_offset,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:736:	PANFROST_IOCTL(PERFCNT_ENABLE,	perfcnt_enable,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:737:	PANFROST_IOCTL(PERFCNT_DUMP,	perfcnt_dump,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:738:	PANFROST_IOCTL(MADVISE,		madvise,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:739:	PANFROST_IOCTL(SET_LABEL_BO,	set_label_bo,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:740:	PANFROST_IOCTL(JM_CTX_CREATE,	jm_ctx_create,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:741:	PANFROST_IOCTL(JM_CTX_DESTROY,	jm_ctx_destroy,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:742:	PANFROST_IOCTL(SYNC_BO,		sync_bo,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c:743:	PANFROST_IOCTL(QUERY_BO_INFO,	query_bo_info,	DRM_RENDER_ALLOW),
drivers/gpu/drm/panfrost/panfrost_drv.c-744-};
--
drivers/gpu/drm/panthor/panthor_drv.c=1652=static const struct drm_ioctl_desc panthor_drm_driver_ioctls[] = {
--
drivers/gpu/drm/panthor/panthor_drv.c-1655-
drivers/gpu/drm/panthor/panthor_drv.c:1656:	PANTHOR_IOCTL(DEV_QUERY, dev_query, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1657:	PANTHOR_IOCTL(VM_CREATE, vm_create, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1658:	PANTHOR_IOCTL(VM_DESTROY, vm_destroy, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1659:	PANTHOR_IOCTL(VM_BIND, vm_bind, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1660:	PANTHOR_IOCTL(VM_GET_STATE, vm_get_state, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1661:	PANTHOR_IOCTL(BO_CREATE, bo_create, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1662:	PANTHOR_IOCTL(BO_MMAP_OFFSET, bo_mmap_offset, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1663:	PANTHOR_IOCTL(GROUP_CREATE, group_create, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1664:	PANTHOR_IOCTL(GROUP_DESTROY, group_destroy, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1665:	PANTHOR_IOCTL(GROUP_GET_STATE, group_get_state, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1666:	PANTHOR_IOCTL(TILER_HEAP_CREATE, tiler_heap_create, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1667:	PANTHOR_IOCTL(TILER_HEAP_DESTROY, tiler_heap_destroy, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1668:	PANTHOR_IOCTL(GROUP_SUBMIT, group_submit, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1669:	PANTHOR_IOCTL(BO_SET_LABEL, bo_set_label, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1670:	PANTHOR_IOCTL(SET_USER_MMIO_OFFSET, set_user_mmio_offset, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1671:	PANTHOR_IOCTL(BO_SYNC, bo_sync, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c:1672:	PANTHOR_IOCTL(BO_QUERY_INFO, bo_query_info, DRM_RENDER_ALLOW),
drivers/gpu/drm/panthor/panthor_drv.c-1673-};
--
drivers/gpu/drm/qxl/qxl_drv.c=286=static const struct drm_ioctl_desc qxl_ioctls[] = {
drivers/gpu/drm/qxl/qxl_drv.c:287:	DRM_IOCTL_DEF_DRV(QXL_ALLOC, qxl_alloc_ioctl, DRM_AUTH),
drivers/gpu/drm/qxl/qxl_drv.c:288:	DRM_IOCTL_DEF_DRV(QXL_MAP, qxl_map_ioctl, DRM_AUTH),
drivers/gpu/drm/qxl/qxl_drv.c:289:	DRM_IOCTL_DEF_DRV(QXL_EXECBUFFER, qxl_execbuffer_ioctl, DRM_AUTH),
drivers/gpu/drm/qxl/qxl_drv.c:290:	DRM_IOCTL_DEF_DRV(QXL_UPDATE_AREA, qxl_update_area_ioctl, DRM_AUTH),
drivers/gpu/drm/qxl/qxl_drv.c:291:	DRM_IOCTL_DEF_DRV(QXL_GETPARAM, qxl_getparam_ioctl, DRM_AUTH),
drivers/gpu/drm/qxl/qxl_drv.c:292:	DRM_IOCTL_DEF_DRV(QXL_CLIENTCAP, qxl_clientcap_ioctl, DRM_AUTH),
drivers/gpu/drm/qxl/qxl_drv.c:293:	DRM_IOCTL_DEF_DRV(QXL_ALLOC_SURF, qxl_alloc_surf_ioctl, DRM_AUTH),
drivers/gpu/drm/qxl/qxl_drv.c-294-};
--
drivers/gpu/drm/radeon/radeon_drv.c=552=static const struct drm_ioctl_desc radeon_ioctls_kms[] = {
drivers/gpu/drm/radeon/radeon_drv.c:553:	DRM_IOCTL_DEF_DRV(RADEON_CP_INIT, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/radeon/radeon_drv.c:554:	DRM_IOCTL_DEF_DRV(RADEON_CP_START, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/radeon/radeon_drv.c:555:	DRM_IOCTL_DEF_DRV(RADEON_CP_STOP, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/radeon/radeon_drv.c:556:	DRM_IOCTL_DEF_DRV(RADEON_CP_RESET, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/radeon/radeon_drv.c:557:	DRM_IOCTL_DEF_DRV(RADEON_CP_IDLE, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:558:	DRM_IOCTL_DEF_DRV(RADEON_CP_RESUME, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:559:	DRM_IOCTL_DEF_DRV(RADEON_RESET, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:560:	DRM_IOCTL_DEF_DRV(RADEON_FULLSCREEN, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:561:	DRM_IOCTL_DEF_DRV(RADEON_SWAP, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:562:	DRM_IOCTL_DEF_DRV(RADEON_CLEAR, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:563:	DRM_IOCTL_DEF_DRV(RADEON_VERTEX, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:564:	DRM_IOCTL_DEF_DRV(RADEON_INDICES, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:565:	DRM_IOCTL_DEF_DRV(RADEON_TEXTURE, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:566:	DRM_IOCTL_DEF_DRV(RADEON_STIPPLE, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:567:	DRM_IOCTL_DEF_DRV(RADEON_INDIRECT, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/radeon/radeon_drv.c:568:	DRM_IOCTL_DEF_DRV(RADEON_VERTEX2, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:569:	DRM_IOCTL_DEF_DRV(RADEON_CMDBUF, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:570:	DRM_IOCTL_DEF_DRV(RADEON_GETPARAM, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:571:	DRM_IOCTL_DEF_DRV(RADEON_FLIP, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:572:	DRM_IOCTL_DEF_DRV(RADEON_ALLOC, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:573:	DRM_IOCTL_DEF_DRV(RADEON_FREE, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:574:	DRM_IOCTL_DEF_DRV(RADEON_INIT_HEAP, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/radeon/radeon_drv.c:575:	DRM_IOCTL_DEF_DRV(RADEON_IRQ_EMIT, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:576:	DRM_IOCTL_DEF_DRV(RADEON_IRQ_WAIT, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:577:	DRM_IOCTL_DEF_DRV(RADEON_SETPARAM, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:578:	DRM_IOCTL_DEF_DRV(RADEON_SURF_ALLOC, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c:579:	DRM_IOCTL_DEF_DRV(RADEON_SURF_FREE, drm_invalid_op, DRM_AUTH),
drivers/gpu/drm/radeon/radeon_drv.c-580-	/* KMS */
drivers/gpu/drm/radeon/radeon_drv.c:581:	DRM_IOCTL_DEF_DRV(RADEON_GEM_INFO, radeon_gem_info_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:582:	DRM_IOCTL_DEF_DRV(RADEON_GEM_CREATE, radeon_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:583:	DRM_IOCTL_DEF_DRV(RADEON_GEM_MMAP, radeon_gem_mmap_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:584:	DRM_IOCTL_DEF_DRV(RADEON_GEM_SET_DOMAIN, radeon_gem_set_domain_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:585:	DRM_IOCTL_DEF_DRV(RADEON_GEM_WAIT_IDLE, radeon_gem_wait_idle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:586:	DRM_IOCTL_DEF_DRV(RADEON_CS, radeon_cs_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:587:	DRM_IOCTL_DEF_DRV(RADEON_INFO, radeon_info_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:588:	DRM_IOCTL_DEF_DRV(RADEON_GEM_SET_TILING, radeon_gem_set_tiling_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:589:	DRM_IOCTL_DEF_DRV(RADEON_GEM_GET_TILING, radeon_gem_get_tiling_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:590:	DRM_IOCTL_DEF_DRV(RADEON_GEM_BUSY, radeon_gem_busy_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:591:	DRM_IOCTL_DEF_DRV(RADEON_GEM_VA, radeon_gem_va_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:592:	DRM_IOCTL_DEF_DRV(RADEON_GEM_OP, radeon_gem_op_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c:593:	DRM_IOCTL_DEF_DRV(RADEON_GEM_USERPTR, radeon_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/radeon/radeon_drv.c-594-};
--
drivers/gpu/drm/tegra/drm.c=747=static const struct drm_ioctl_desc tegra_drm_ioctls[] = {
--
drivers/gpu/drm/tegra/drm.c-749-	DRM_IOCTL_DEF_DRV(TEGRA_CHANNEL_OPEN, tegra_drm_ioctl_channel_open,
drivers/gpu/drm/tegra/drm.c:750:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-751-	DRM_IOCTL_DEF_DRV(TEGRA_CHANNEL_CLOSE, tegra_drm_ioctl_channel_close,
drivers/gpu/drm/tegra/drm.c:752:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-753-	DRM_IOCTL_DEF_DRV(TEGRA_CHANNEL_MAP, tegra_drm_ioctl_channel_map,
drivers/gpu/drm/tegra/drm.c:754:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-755-	DRM_IOCTL_DEF_DRV(TEGRA_CHANNEL_UNMAP, tegra_drm_ioctl_channel_unmap,
drivers/gpu/drm/tegra/drm.c:756:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-757-	DRM_IOCTL_DEF_DRV(TEGRA_CHANNEL_SUBMIT, tegra_drm_ioctl_channel_submit,
drivers/gpu/drm/tegra/drm.c:758:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-759-	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPOINT_ALLOCATE, tegra_drm_ioctl_syncpoint_allocate,
drivers/gpu/drm/tegra/drm.c:760:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-761-	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPOINT_FREE, tegra_drm_ioctl_syncpoint_free,
drivers/gpu/drm/tegra/drm.c:762:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-763-	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPOINT_WAIT, tegra_drm_ioctl_syncpoint_wait,
drivers/gpu/drm/tegra/drm.c:764:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-765-
drivers/gpu/drm/tegra/drm.c:766:	DRM_IOCTL_DEF_DRV(TEGRA_GEM_CREATE, tegra_gem_create, DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c:767:	DRM_IOCTL_DEF_DRV(TEGRA_GEM_MMAP, tegra_gem_mmap, DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-768-	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPT_READ, tegra_syncpt_read,
drivers/gpu/drm/tegra/drm.c:769:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-770-	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPT_INCR, tegra_syncpt_incr,
drivers/gpu/drm/tegra/drm.c:771:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-772-	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPT_WAIT, tegra_syncpt_wait,
drivers/gpu/drm/tegra/drm.c:773:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-774-	DRM_IOCTL_DEF_DRV(TEGRA_OPEN_CHANNEL, tegra_open_channel,
drivers/gpu/drm/tegra/drm.c:775:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-776-	DRM_IOCTL_DEF_DRV(TEGRA_CLOSE_CHANNEL, tegra_close_channel,
drivers/gpu/drm/tegra/drm.c:777:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-778-	DRM_IOCTL_DEF_DRV(TEGRA_GET_SYNCPT, tegra_get_syncpt,
drivers/gpu/drm/tegra/drm.c:779:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-780-	DRM_IOCTL_DEF_DRV(TEGRA_SUBMIT, tegra_submit,
drivers/gpu/drm/tegra/drm.c:781:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-782-	DRM_IOCTL_DEF_DRV(TEGRA_GET_SYNCPT_BASE, tegra_get_syncpt_base,
drivers/gpu/drm/tegra/drm.c:783:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-784-	DRM_IOCTL_DEF_DRV(TEGRA_GEM_SET_TILING, tegra_gem_set_tiling,
drivers/gpu/drm/tegra/drm.c:785:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-786-	DRM_IOCTL_DEF_DRV(TEGRA_GEM_GET_TILING, tegra_gem_get_tiling,
drivers/gpu/drm/tegra/drm.c:787:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-788-	DRM_IOCTL_DEF_DRV(TEGRA_GEM_SET_FLAGS, tegra_gem_set_flags,
drivers/gpu/drm/tegra/drm.c:789:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-790-	DRM_IOCTL_DEF_DRV(TEGRA_GEM_GET_FLAGS, tegra_gem_get_flags,
drivers/gpu/drm/tegra/drm.c:791:			  DRM_RENDER_ALLOW),
drivers/gpu/drm/tegra/drm.c-792-#endif
--
drivers/gpu/drm/v3d/v3d_drv.c=240=static const struct file_operations v3d_drm_fops = {
--
drivers/gpu/drm/v3d/v3d_drv.c-245-
drivers/gpu/drm/v3d/v3d_drv.c:246:/* DRM_AUTH is required on SUBMIT_CL for now, while we don't have GMP
drivers/gpu/drm/v3d/v3d_drv.c:247: * protection between clients.  Note that render nodes would be
drivers/gpu/drm/v3d/v3d_drv.c-248- * able to submit CLs that could access BOs from clients authenticated
drivers/gpu/drm/v3d/v3d_drv.c-249- * with the master node.  The TFU doesn't use the GMP, so it would
drivers/gpu/drm/v3d/v3d_drv.c:250: * need to stay DRM_AUTH until we do buffer size/offset validation.
drivers/gpu/drm/v3d/v3d_drv.c-251- */
drivers/gpu/drm/v3d/v3d_drv.c=252=static const struct drm_ioctl_desc v3d_drm_ioctls[] = {
drivers/gpu/drm/v3d/v3d_drv.c:253:	DRM_IOCTL_DEF_DRV(V3D_SUBMIT_CL, v3d_submit_cl_ioctl, DRM_RENDER_ALLOW | DRM_AUTH),
drivers/gpu/drm/v3d/v3d_drv.c:254:	DRM_IOCTL_DEF_DRV(V3D_WAIT_BO, v3d_wait_bo_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:255:	DRM_IOCTL_DEF_DRV(V3D_CREATE_BO, v3d_create_bo_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:256:	DRM_IOCTL_DEF_DRV(V3D_MMAP_BO, v3d_mmap_bo_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:257:	DRM_IOCTL_DEF_DRV(V3D_GET_PARAM, v3d_get_param_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:258:	DRM_IOCTL_DEF_DRV(V3D_GET_BO_OFFSET, v3d_get_bo_offset_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:259:	DRM_IOCTL_DEF_DRV(V3D_SUBMIT_TFU, v3d_submit_tfu_ioctl, DRM_RENDER_ALLOW | DRM_AUTH),
drivers/gpu/drm/v3d/v3d_drv.c:260:	DRM_IOCTL_DEF_DRV(V3D_SUBMIT_CSD, v3d_submit_csd_ioctl, DRM_RENDER_ALLOW | DRM_AUTH),
drivers/gpu/drm/v3d/v3d_drv.c:261:	DRM_IOCTL_DEF_DRV(V3D_PERFMON_CREATE, v3d_perfmon_create_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:262:	DRM_IOCTL_DEF_DRV(V3D_PERFMON_DESTROY, v3d_perfmon_destroy_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:263:	DRM_IOCTL_DEF_DRV(V3D_PERFMON_GET_VALUES, v3d_perfmon_get_values_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:264:	DRM_IOCTL_DEF_DRV(V3D_SUBMIT_CPU, v3d_submit_cpu_ioctl, DRM_RENDER_ALLOW | DRM_AUTH),
drivers/gpu/drm/v3d/v3d_drv.c:265:	DRM_IOCTL_DEF_DRV(V3D_PERFMON_GET_COUNTER, v3d_perfmon_get_counter_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c:266:	DRM_IOCTL_DEF_DRV(V3D_PERFMON_SET_GLOBAL, v3d_perfmon_set_global_ioctl, DRM_RENDER_ALLOW),
drivers/gpu/drm/v3d/v3d_drv.c-267-};

]

101/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 54765
							output: 41
							thoughts: 105
						

Thoughts:
**Analyzing GPU Rendering Security**

Okay, so I'm thinking about the security implications of unprivileged GPU access. The whole point of those render nodes, the `/dev/dri/renderD*` devices, is to allow client applications to do GPU work without needing root-level DRM access or authentication. That's good, but it opens a potential attack surface, so I need to understand how the memory is actually managed.

The critical question here is how memory is mapped when a user-space application interacts with DRM GEM objects or other DRM buffers. I need to dig into the kernel code to understand what protections are in place. Specifically, I'm going to look for any use of `pgprot_noncached`, `pgprot_writecombine`, `pgprot_device`, or the `vma->vm_page_prot` variable within the `drivers/gpu/drm` directory. Those are the key flags and settings that control memory access and caching behavior; understanding how they're used is crucial to assess the security of this architecture. I'm hoping to find the relevant access controls, and understand whether those controls are sufficient.



102/4 2026/09/08 10:05 tool grepper
0m Args:
map[Expression:pgprot_noncached|pgprot_writecombine|pgprot_device PathPrefix:drivers/gpu/drm]

Results:
map[Output:drivers/gpu/drm/amd/amdkfd/kfd_chardev.c=3693=static int kfd_mmio_mmap(struct kfd_node *dev, struct kfd_process *process,
--
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-3708-
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:3709:	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c-3710-
--
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c=106=int kfd_doorbell_mmap(struct kfd_node *dev, struct kfd_process *process,
--
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c-129-
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c:130:	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c-131-
--
drivers/gpu/drm/drm_fbdev_shmem.c=43=static int drm_fbdev_shmem_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
--
drivers/gpu/drm/drm_fbdev_shmem.c-50-	if (shmem->map_wc)
drivers/gpu/drm/drm_fbdev_shmem.c:51:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/drm_fbdev_shmem.c-52-
--
drivers/gpu/drm/drm_gem.c=1222=int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
--
drivers/gpu/drm/drm_gem.c-1253-		vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP);
drivers/gpu/drm/drm_gem.c:1254:		vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/drm_gem.c-1255-		vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
--
drivers/gpu/drm/drm_gem_shmem_helper.c=389=int drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem,
--
drivers/gpu/drm/drm_gem_shmem_helper.c-413-		if (shmem->map_wc)
drivers/gpu/drm/drm_gem_shmem_helper.c:414:			prot = pgprot_writecombine(prot);
drivers/gpu/drm/drm_gem_shmem_helper.c-415-		shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
--
drivers/gpu/drm/drm_gem_shmem_helper.c=752=int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct *vma)
--
drivers/gpu/drm/drm_gem_shmem_helper.c-786-	if (shmem->map_wc)
drivers/gpu/drm/drm_gem_shmem_helper.c:787:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/drm_gem_shmem_helper.c-788-
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c=129=static int etnaviv_gem_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c-138-	if (etnaviv_obj->flags & ETNA_BO_WC) {
drivers/gpu/drm/etnaviv/etnaviv_gem.c:139:		vma->vm_page_prot = pgprot_writecombine(vm_page_prot);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-140-	} else if (etnaviv_obj->flags & ETNA_BO_UNCACHED) {
drivers/gpu/drm/etnaviv/etnaviv_gem.c:141:		vma->vm_page_prot = pgprot_noncached(vm_page_prot);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-142-	} else {
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c=344=static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c-359-	case ETNA_BO_UNCACHED:
drivers/gpu/drm/etnaviv/etnaviv_gem.c:360:		prot = pgprot_noncached(PAGE_KERNEL);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-361-		break;
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c-363-	default:
drivers/gpu/drm/etnaviv/etnaviv_gem.c:364:		prot = pgprot_writecombine(PAGE_KERNEL);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-365-	}
--
drivers/gpu/drm/exynos/exynos_drm_gem.c=365=static int exynos_drm_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/exynos/exynos_drm_gem.c-382-		vma->vm_page_prot =
drivers/gpu/drm/exynos/exynos_drm_gem.c:383:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/exynos/exynos_drm_gem.c-384-	else
drivers/gpu/drm/exynos/exynos_drm_gem.c-385-		vma->vm_page_prot =
drivers/gpu/drm/exynos/exynos_drm_gem.c:386:			pgprot_noncached(vma_get_page_prot(vma));
drivers/gpu/drm/exynos/exynos_drm_gem.c-387-
--
drivers/gpu/drm/gma500/fbdev.c=22=static vm_fault_t psb_fbdev_vm_fault(struct vm_fault *vmf)
--
drivers/gpu/drm/gma500/fbdev.c-31-
drivers/gpu/drm/gma500/fbdev.c:32:	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
drivers/gpu/drm/gma500/fbdev.c-33-
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c=60=i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-114-			vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:115:				pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-116-		else
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c=990=i915_gem_object_mmap(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1037-		vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:1038:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1039-		vma->vm_ops = &vm_ops_cpu;
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1051-		vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:1052:			pgprot_noncached(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1053-		vma->vm_ops = &vm_ops_cpu;
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1057-		vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:1058:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1059-		vma->vm_ops = &vm_ops_gtt;
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c=272=static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c-307-	case I915_MAP_WC:
drivers/gpu/drm/i915/gem/i915_gem_pages.c:308:		pgprot = pgprot_writecombine(PAGE_KERNEL_IO);
drivers/gpu/drm/i915/gem/i915_gem_pages.c-309-		break;
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c=329=static void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c-351-		pfns[i++] = (iomap + addr) >> PAGE_SHIFT;
drivers/gpu/drm/i915/gem/i915_gem_pages.c:352:	vaddr = vmap_pfn(pfns, n_pfn, pgprot_writecombine(PAGE_KERNEL_IO));
drivers/gpu/drm/i915/gem/i915_gem_pages.c-353-	if (pfns != stack)
--
drivers/gpu/drm/imagination/pvr_mmu.c=257=pvr_mmu_backing_page_init(struct pvr_mmu_backing_page *page,
--
drivers/gpu/drm/imagination/pvr_mmu.c-274-	if (device_get_dma_attr(dev) != DEV_DMA_COHERENT)
drivers/gpu/drm/imagination/pvr_mmu.c:275:		prot = pgprot_writecombine(prot);
drivers/gpu/drm/imagination/pvr_mmu.c-276-
--
drivers/gpu/drm/imagination/pvr_vm_mips.c=30=pvr_vm_mips_init(struct pvr_device *pvr_dev)
--
drivers/gpu/drm/imagination/pvr_vm_mips.c-66-	mips_data->pt = vmap(mips_data->pt_pages, pt_size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/imagination/pvr_vm_mips.c:67:			     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/imagination/pvr_vm_mips.c-68-	if (!mips_data->pt) {
--
drivers/gpu/drm/lima/lima_sched.c=273=static void lima_sched_build_error_task_list(struct lima_sched_task *task)
--
drivers/gpu/drm/lima/lima_sched.c-365-			data = vmap(bo->base.pages, bo->heap_size >> PAGE_SHIFT,
drivers/gpu/drm/lima/lima_sched.c:366:				    VM_MAP, pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/lima/lima_sched.c-367-			if (!data) {
--
drivers/gpu/drm/msm/msm_gem.c=323=static pgprot_t msm_gem_pgprot(struct msm_gem_object *msm_obj, pgprot_t prot)
--
drivers/gpu/drm/msm/msm_gem.c-325-	if (msm_obj->flags & MSM_BO_WC)
drivers/gpu/drm/msm/msm_gem.c:326:		return pgprot_writecombine(prot);
drivers/gpu/drm/msm/msm_gem.c-327-	return prot;
--
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c=186=gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
--
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c-209-	node->base.vaddr = vmap(node->pages, size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:210:				pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c-211-	if (!node->base.vaddr) {
--
drivers/gpu/drm/omapdrm/omap_fbdev.c=85=static int omap_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/gpu/drm/omapdrm/omap_fbdev.c-86-{
drivers/gpu/drm/omapdrm/omap_fbdev.c:87:	vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/omapdrm/omap_fbdev.c-88-
--
drivers/gpu/drm/omapdrm/omap_gem.c=534=static int omap_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/omapdrm/omap_gem.c-540-	if (omap_obj->flags & OMAP_BO_WC) {
drivers/gpu/drm/omapdrm/omap_gem.c:541:		vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/omapdrm/omap_gem.c-542-	} else if (omap_obj->flags & OMAP_BO_UNCACHED) {
drivers/gpu/drm/omapdrm/omap_gem.c:543:		vma->vm_page_prot = pgprot_noncached(vma_get_page_prot(vma));
drivers/gpu/drm/omapdrm/omap_gem.c-544-	} else {
--
drivers/gpu/drm/omapdrm/omap_gem.c=1067=void *omap_gem_vaddr(struct drm_gem_object *obj)
--
drivers/gpu/drm/omapdrm/omap_gem.c-1082-		omap_obj->vaddr = vmap(omap_obj->pages, obj->size >> PAGE_SHIFT,
drivers/gpu/drm/omapdrm/omap_gem.c:1083:				VM_MAP, pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/omapdrm/omap_gem.c-1084-	}
--
drivers/gpu/drm/panthor/panthor_device.c=399=static vm_fault_t panthor_mmio_vm_fault(struct vm_fault *vmf)
--
drivers/gpu/drm/panthor/panthor_device.c-430-	if (active)
drivers/gpu/drm/panthor/panthor_device.c:431:		pgprot = pgprot_noncached(pgprot);
drivers/gpu/drm/panthor/panthor_device.c-432-
--
drivers/gpu/drm/panthor/panthor_gem.c=381=panthor_gem_vmap_get_locked(struct panthor_gem_object *bo)
--
drivers/gpu/drm/panthor/panthor_gem.c-405-	if (should_map_wc(bo))
drivers/gpu/drm/panthor/panthor_gem.c:406:		prot = pgprot_writecombine(prot);
drivers/gpu/drm/panthor/panthor_gem.c-407-
--
drivers/gpu/drm/panthor/panthor_gem.c=742=static int panthor_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/panthor/panthor_gem.c-780-	if (should_map_wc(bo))
drivers/gpu/drm/panthor/panthor_gem.c:781:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/panthor/panthor_gem.c-782-
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=125=static int rockchip_gem_alloc_iommu(struct rockchip_gem_object *rk_obj,
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-139-		rk_obj->kvaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:140:				      pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-141-		if (!rk_obj->kvaddr) {
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=240=static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj,
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-257-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:258:	vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-259-	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=514=int rockchip_gem_prime_vmap(struct drm_gem_object *obj, struct iosys_map *map)
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-524-			vaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:525:				     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-526-
--
drivers/gpu/drm/tegra/fbdev.c=69=int tegra_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
--
drivers/gpu/drm/tegra/fbdev.c-117-		bo->vaddr = vmap(bo->pages, bo->num_pages, VM_MAP,
drivers/gpu/drm/tegra/fbdev.c:118:				 pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/tegra/fbdev.c-119-		if (!bo->vaddr) {
--
drivers/gpu/drm/tegra/gem.c=177=static void *tegra_bo_mmap(struct host1x_bo *bo)
--
drivers/gpu/drm/tegra/gem.c-195-	vaddr = vmap(obj->pages, obj->num_pages, VM_MAP,
drivers/gpu/drm/tegra/gem.c:196:		     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/tegra/gem.c-197-	if (!vaddr)
--
drivers/gpu/drm/tegra/gem.c=580=int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma)
--
drivers/gpu/drm/tegra/gem.c-608-
drivers/gpu/drm/tegra/gem.c:609:		vma->vm_page_prot = pgprot_writecombine(prot);
drivers/gpu/drm/tegra/gem.c-610-	}
--
drivers/gpu/drm/ttm/ttm_module.c=62=pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
--
drivers/gpu/drm/ttm/ttm_module.c-69-	if (caching == ttm_write_combined)
drivers/gpu/drm/ttm/ttm_module.c:70:		tmp = pgprot_writecombine(tmp);
drivers/gpu/drm/ttm/ttm_module.c-71-#ifndef CONFIG_UML
drivers/gpu/drm/ttm/ttm_module.c-72-	else if (boot_cpu_data.x86 > 3)
drivers/gpu/drm/ttm/ttm_module.c:73:		tmp = pgprot_noncached(tmp);
drivers/gpu/drm/ttm/ttm_module.c-74-#endif /* CONFIG_UML */
--
drivers/gpu/drm/ttm/ttm_module.c-79-	if (caching == ttm_write_combined)
drivers/gpu/drm/ttm/ttm_module.c:80:		tmp = pgprot_writecombine(tmp);
drivers/gpu/drm/ttm/ttm_module.c-81-	else
drivers/gpu/drm/ttm/ttm_module.c:82:		tmp = pgprot_noncached(tmp);
drivers/gpu/drm/ttm/ttm_module.c-83-#endif
drivers/gpu/drm/ttm/ttm_module.c-84-#if defined(__sparc__)
drivers/gpu/drm/ttm/ttm_module.c:85:	tmp = pgprot_noncached(tmp);
drivers/gpu/drm/ttm/ttm_module.c-86-#endif
--
drivers/gpu/drm/v3d/v3d_bo.c=194=void v3d_get_bo_vaddr(struct v3d_bo *bo)
--
drivers/gpu/drm/v3d/v3d_bo.c-198-	bo->vaddr = vmap(obj->pages, obj->base.size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/v3d/v3d_bo.c:199:			 pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/v3d/v3d_bo.c-200-}
--
drivers/gpu/drm/virtio/virtgpu_vram.c=35=static int virtio_gpu_vram_mmap(struct drm_gem_object *obj,
--
drivers/gpu/drm/virtio/virtgpu_vram.c-63-	if (vram->map_info == VIRTIO_GPU_MAP_CACHE_WC)
drivers/gpu/drm/virtio/virtgpu_vram.c:64:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/virtio/virtgpu_vram.c-65-	else if (vram->map_info == VIRTIO_GPU_MAP_CACHE_UNCACHED)
drivers/gpu/drm/virtio/virtgpu_vram.c:66:		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
drivers/gpu/drm/virtio/virtgpu_vram.c-67-
--
drivers/gpu/drm/xe/xe_device.c=277=static vm_fault_t barrier_fault(struct vm_fault *vmf)
--
drivers/gpu/drm/xe/xe_device.c-293-		ret = vmf_insert_pfn_prot(vma, vma->vm_start, pfn,
drivers/gpu/drm/xe/xe_device.c:294:					  pgprot_noncached(prot));
drivers/gpu/drm/xe/xe_device.c-295-		drm_dev_exit(idx);
--
drivers/gpu/drm/xe/xe_mmio_gem.c=142=static int xe_mmio_gem_mmap(struct drm_gem_object *base, struct vm_area_struct *vma)
--
drivers/gpu/drm/xe/xe_mmio_gem.c-151-	vma->vm_pgoff = 0;
drivers/gpu/drm/xe/xe_mmio_gem.c:152:	vma->vm_page_prot = pgprot_noncached(vma_get_page_prot(vma));
drivers/gpu/drm/xe/xe_mmio_gem.c-153-	vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP |
]

103/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 61980
							output: 22
							thoughts: 777
						

Thoughts:
**Analyzing Potential ARM64 Synchronous External Abort via DRM and Futex**

Okay, so I'm looking at this code and, wow, there's a pattern here. I'm seeing multiple instances where the DRM drivers are allowing the mapping of memory with specific page protection flags. In particular, I'm noting the use of `pgprot_noncached` and, in one instance, `pgprot_writecombine`. Specifically, I've spotted these instances:

1.  `drivers/gpu/drm/etnaviv/etnaviv_gem.c` uses both `pgprot_writecombine` and `pgprot_noncached`. The `ETNA_IOCTL(GEM_NEW` is also a key here, because it permits the unprivileged user to create uncached BOs and map them!
2.  `drivers/gpu/drm/panthor/panthor_device.c` uses `pgprot_noncached` within the `panthor_mmio_vm_fault` function.
3.  `drivers/gpu/drm/omapdrm/omap_gem.c` also uses `pgprot_noncached`.
4.  `drivers/gpu/drm/amd/amdkfd/kfd_chardev.c` again uses `pgprot_noncached` in `kfd_mmio_mmap` and `kfd_doorbell_mmap`.
5.  `drivers/gpu/drm/virtio/virtgpu_vram.c` utilizes `pgprot_noncached` as well.
6.  `drivers/gpu/drm/ttm/ttm_module.c` calls `pgprot_noncached`.

The key question is whether these unprivileged mappings can be used to cause problems. This is where it gets interesting: the differences between `pgprot_writecombine` and `pgprot_noncached` are important to understand. So let's look at the ARM64 definitions. `pgprot_writecombine` is effectively `MT_NORMAL_NC` (Normal memory, Non-Cacheable), and `pgprot_noncached` translates to `MT_DEVICE_nGnRnE` (Device memory, non-Gathering, non-Reordering, non-Early-Write-Acknowledgement). `pgprot_device` is similar, `MT_DEVICE_nGnRE`.

The question posed is critical: can an unprivileged user map this "Device" memory (specifically the `pgprot_noncached` or `pgprot_writecombine` types) via DRM render nodes or other unprivileged device nodes? And, if so, can they then call `futex` on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (ldxr) on Device memory?

So, I need to understand what happens when `futex` is called on that type of memory. That's the key. I need to trace the execution path. Time to dive into the `kernel/futex/` directory and see what's happening under the hood. I need to see if the interactions between `futex` and memory accesses can trigger something interesting given these page protections. I'll need to figure out what type of memory accesses are generated.



104/4 2026/09/08 10:05 tool codesearch-dir-index
0m Args:
map[Dir:kernel/futex]

Results:
map[Files:[core.c futex.h pi.c requeue.c syscalls.c waitwake.c] Subdirs:<nil>]

105/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 63532
							output: 35
							thoughts: 53
						

Thoughts:
Okay, let's dive into the guts of how futex works. I need to understand exactly how it nails down the address and then executes those critical atomic operations and key lookups. I'm going to focus on those core files: `kernel/futex/core.c`, `kernel/futex/pi.c`, and `kernel/futex/syscalls.c`. These are the places where the rubber meets the road, where the actual mechanisms for address resolution and atomic execution are defined. I need to trace the paths through them. It's time to examine the atomic operation and key lookups.



106/4 2026/09/08 10:05 tool grepper
0m Args:
map[Expression:get_futex_key|futex_atomic PathPrefix:kernel/futex]

Results:
map[Output:kernel/futex/core.c=351=static int futex_mpol(struct mm_struct *mm, unsigned long addr)
--
kernel/futex/core.c-364- *
kernel/futex/core.c:365: * We hash on the keys returned from get_futex_key (see below) and return the
kernel/futex/core.c-366- * corresponding hash bucket.
--
kernel/futex/core.c=457=static u64 get_inode_sequence_number(struct inode *inode)
--
kernel/futex/core.c-479-/**
kernel/futex/core.c:480: * get_futex_key() - Get parameters which are the keys for a futex
kernel/futex/core.c-481- * @uaddr:	virtual address of the futex
--
kernel/futex/core.c-505- */
kernel/futex/core.c:506:int get_futex_key(u32 __user *uaddr, unsigned int flags, union futex_key *key,
kernel/futex/core.c-507-		  enum futex_access rw)
--
kernel/futex/futex.h=137=static inline bool futex_key_is_private(union futex_key *key)
--
kernel/futex/futex.h-139-	/*
kernel/futex/futex.h:140:	 * Relies on get_futex_key() to set either bit for shared
kernel/futex/futex.h-141-	 * futexes -- see comment with union futex_key.
--
kernel/futex/futex.h=229=enum futex_access {
--
kernel/futex/futex.h-233-
kernel/futex/futex.h:234:extern int get_futex_key(u32 __user *uaddr, unsigned int flags, union futex_key *key,
kernel/futex/futex.h-235-			 enum futex_access rw);
--
kernel/futex/futex.h=290=static inline int futex_cmpxchg_value_locked(u32 *curval, u32 __user *uaddr, u32 uval, u32 newval)
--
kernel/futex/futex.h-294-	pagefault_disable();
kernel/futex/futex.h:295:	ret = futex_atomic_cmpxchg_inatomic(curval, uaddr, uval, newval);
kernel/futex/futex.h-296-	pagefault_enable();
--
kernel/futex/pi.c=988=int futex_lock_pi(u32 __user *uaddr, unsigned int flags, ktime_t *time, int trylock)
--
kernel/futex/pi.c-1006-	exiting = NULL;
kernel/futex/pi.c:1007:	ret = get_futex_key(uaddr, flags, &q.key, FUTEX_WRITE);
kernel/futex/pi.c-1008-	if (unlikely(ret != 0))
--
kernel/futex/pi.c=1206=static int __futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
--
kernel/futex/pi.c-1223-
kernel/futex/pi.c:1224:	ret = get_futex_key(uaddr, flags, &key, FUTEX_WRITE);
kernel/futex/pi.c-1225-	if (ret)
--
kernel/futex/requeue.c=382=int futex_requeue(u32 __user *uaddr1, unsigned int flags1,
--
kernel/futex/requeue.c-444-retry:
kernel/futex/requeue.c:445:	ret = get_futex_key(uaddr1, flags1, &key1, FUTEX_READ);
kernel/futex/requeue.c-446-	if (unlikely(ret != 0))
kernel/futex/requeue.c-447-		return ret;
kernel/futex/requeue.c:448:	ret = get_futex_key(uaddr2, flags2, &key2,
kernel/futex/requeue.c-449-			    requeue_pi ? FUTEX_WRITE : FUTEX_READ);
--
kernel/futex/requeue.c=786=int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
--
kernel/futex/requeue.c-814-
kernel/futex/requeue.c:815:	ret = get_futex_key(uaddr2, flags, &key2, FUTEX_WRITE);
kernel/futex/requeue.c-816-	if (unlikely(ret != 0))
--
kernel/futex/waitwake.c=178=int futex_wake(u32 __user *uaddr, unsigned int flags, void __user *pop, int nr_wake, u32 bitset)
--
kernel/futex/waitwake.c-187-
kernel/futex/waitwake.c:188:	ret = get_futex_key(uaddr, flags, &key, FUTEX_READ);
kernel/futex/waitwake.c-189-	if (unlikely(ret != 0))
--
kernel/futex/waitwake.c-228-
kernel/futex/waitwake.c:229:static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
kernel/futex/waitwake.c-230-{
--
kernel/futex/waitwake.c-250-	pagefault_disable();
kernel/futex/waitwake.c:251:	ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr);
kernel/futex/waitwake.c-252-	pagefault_enable();
--
kernel/futex/waitwake.c=278=int futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2,
--
kernel/futex/waitwake.c-286-retry:
kernel/futex/waitwake.c:287:	ret = get_futex_key(uaddr1, flags, &key1, FUTEX_READ);
kernel/futex/waitwake.c-288-	if (unlikely(ret != 0))
kernel/futex/waitwake.c-289-		return ret;
kernel/futex/waitwake.c:290:	ret = get_futex_key(uaddr2, flags, &key2, FUTEX_WRITE);
kernel/futex/waitwake.c-291-	if (unlikely(ret != 0))
--
kernel/futex/waitwake.c-301-		double_lock_hb(hb1, hb2);
kernel/futex/waitwake.c:302:		op_ret = futex_atomic_op_inuser(op, uaddr2);
kernel/futex/waitwake.c-303-		if (unlikely(op_ret < 0)) {
--
kernel/futex/waitwake.c=431=int futex_wait_multiple_setup(struct futex_vector *vs, int count, int *woken)
--
kernel/futex/waitwake.c-447-	 * make sure that current->state is TASK_INTERRUPTIBLE, so we don't
kernel/futex/waitwake.c:448:	 * lose any wake events, which cannot be done before the get_futex_key
kernel/futex/waitwake.c-449-	 * of the next key, because it calls get_user_pages, which can sleep.
--
kernel/futex/waitwake.c-454-	 * Private futexes doesn't need to recalculate hash in retry, so skip
kernel/futex/waitwake.c:455:	 * get_futex_key() when retrying.
kernel/futex/waitwake.c-456-	 */
--
kernel/futex/waitwake.c-461-
kernel/futex/waitwake.c:462:		ret = get_futex_key(u64_to_user_ptr(vs[i].w.uaddr),
kernel/futex/waitwake.c-463-				    vs[i].w.flags,
--
kernel/futex/waitwake.c=622=int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags,
--
kernel/futex/waitwake.c-647-retry:
kernel/futex/waitwake.c:648:	ret = get_futex_key(uaddr, flags, &q->key, FUTEX_READ);
kernel/futex/waitwake.c-649-	if (unlikely(ret != 0))
]

107/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 66073
							output: 36
							thoughts: 26
						

Thoughts:
Okay, here's my attempt at summarizing the thought process, as if I were a seasoned kernel developer examining `get_futex_key()`:

**Delving into `get_futex_key()`**

Alright, time to really dig into `get_futex_key()` within `kernel/futex/core.c`. I need to understand this function inside and out. It's the critical piece that generates the key for a futex, and that key is fundamental to how everything hangs together. I need to make sure I understand the interaction with memory, and how this particular system might affect system security. Is there a potential race here? Can I find a weakness? What are the implications of the key generation approach? I need to think through every possible scenario to make sure this function is rock solid. Let's see how it handles the different architectures and how it ensures unique identifiers. I want to look for potential areas for optimization, too. Is this the most efficient way to generate the key given the constraints? Time to get to work!



108/4 2026/09/08 10:05 tool read-file
0m Args:
map[File:kernel/futex/core.c FirstLine:500 LineCount:90]

Results:
map[Contents: 500:	 *
 501:	 * This allows (cross process, where applicable) identification of the futex
 502:	 * without keeping the page pinned for the duration of the FUTEX_WAIT.
 503:	 *
 504:	 * lock_page() might sleep, the caller should not hold a spinlock.
 505:	 */
 506:	int get_futex_key(u32 __user *uaddr, unsigned int flags, union futex_key *key,
 507:			  enum futex_access rw)
 508:	{
 509:		unsigned long address = (unsigned long)uaddr;
 510:		struct mm_struct *mm = current->mm;
 511:		struct page *page;
 512:		struct folio *folio;
 513:		struct address_space *mapping;
 514:		int node, err, size, ro = 0;
 515:		bool node_updated = false;
 516:		bool fshared;
 517:	
 518:		fshared = flags & FLAGS_SHARED;
 519:		size = futex_size(flags);
 520:		if (flags & FLAGS_NUMA)
 521:			size *= 2;
 522:	
 523:		/*
 524:		 * The futex address must be "naturally" aligned.
 525:		 */
 526:		key->both.offset = address % PAGE_SIZE;
 527:		if (unlikely((address & (size-1)) != 0))
 528:			return -EINVAL;
 529:		address -= key->both.offset;
 530:	
 531:		if (unlikely(!access_ok(uaddr, size)))
 532:			return -EFAULT;
 533:	
 534:		if (unlikely(should_fail_futex(fshared)))
 535:			return -EFAULT;
 536:	
 537:		node = FUTEX_NO_NODE;
 538:	
 539:		if (flags & FLAGS_NUMA) {
 540:			u32 __user *naddr = (void *)uaddr + size / 2;
 541:	
 542:			if (get_user_inline(node, naddr))
 543:				return -EFAULT;
 544:	
 545:			if ((node != FUTEX_NO_NODE) &&
 546:			    ((unsigned int)node >= MAX_NUMNODES || !node_possible(node)))
 547:				return -EINVAL;
 548:		}
 549:	
 550:		if (node == FUTEX_NO_NODE && (flags & FLAGS_MPOL)) {
 551:			node = futex_mpol(mm, address);
 552:			node_updated = true;
 553:		}
 554:	
 555:		if (flags & FLAGS_NUMA) {
 556:			u32 __user *naddr = (void *)uaddr + size / 2;
 557:	
 558:			if (node == FUTEX_NO_NODE) {
 559:				node = numa_node_id();
 560:				node_updated = true;
 561:			}
 562:			if (node_updated && put_user_inline(node, naddr))
 563:				return -EFAULT;
 564:		}
 565:	
 566:		key->both.node = node;
 567:	
 568:		/*
 569:		 * PROCESS_PRIVATE futexes are fast.
 570:		 * As the mm cannot disappear under us and the 'key' only needs
 571:		 * virtual address, we dont even have to find the underlying vma.
 572:		 * Note : We do have to check 'uaddr' is a valid user address,
 573:		 *        but access_ok() should be faster than find_vma()
 574:		 */
 575:		if (!fshared) {
 576:			/*
 577:			 * On no-MMU, shared futexes are treated as private, therefore
 578:			 * we must not include the current process in the key. Since
 579:			 * there is only one address space, the address is a unique key
 580:			 * on its own.
 581:			 */
 582:			if (IS_ENABLED(CONFIG_MMU))
 583:				key->private.mm = mm;
 584:			else
 585:				key->private.mm = NULL;
 586:	
 587:			key->private.address = address;
 588:			return 0;
 589:		}
]

109/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 67672
							output: 42
							thoughts: 786
						

Thoughts:
**Futex Address Space Validation: A Deep Dive**

Okay, so I'm looking at how the kernel handles futexes, specifically the private ones – the most common case, especially with glibc and pthreads.  I'm focusing on the address space checks and how they are handled. I see that `get_futex_key()` essentially does a very minimal check: it just verifies with `access_ok(uaddr, size)` that the user-provided address `uaddr` is actually *within* user space.  That's it! No touching of the VMA or `get_user_pages` at this point, which is interesting.

Now, my mind goes to the *operations* performed on these futexes. What happens during a `FUTEX_WAKE_OP`, `FUTEX_LOCK_PI`, `FUTEX_CMP_REQUEUE`, etc.?  How is that address validated *then*?  I need to drill down into the low-level execution path, particularly `arch_futex_atomic_op_inuser()` or `futex_atomic_cmpxchg_inatomic()`.

I go into `kernel/futex/waitwake.c`, and I see that it calls `arch_futex_atomic_op_inuser()`.  And now, I check the ARM64 implementation. The key part is what `__llsc_futex_atomic_op()` does. It uses an `ldxr` (Load-Exclusive) instruction on the `uaddr`, along with other instructions!

Wait a second. It's loading from the user-provided address *directly* within the instruction! This means, if it's not a valid user address, it will cause a page fault.  But does this mean it will work?

I need to look into whether this is true. This could depend on the capabilities of the hardware. The code seems to assume the existence of Load-Exclusive/Store-Exclusive (LL/SC) support. This could be relevant to features like FEAT_LSUI or LSE. I need to refresh my knowledge of ARM64 and how these atomic instructions behave. Let's delve back into `arch/arm64/include/asm/futex.h` and the related architecture documentation.



110/4 2026/09/08 10:05 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:90 LineCount:100]

Results:
map[Contents:  90:		return ret;
  91:	}
  92:	
  93:	#ifdef CONFIG_ARM64_LSUI
  94:	
  95:	/*
  96:	 * Wrap LSUI instructions with uaccess_ttbr0_enable()/disable(), as
  97:	 * PAN toggling is not required.
  98:	 */
  99:	
 100:	#define LSUI_FUTEX_ATOMIC_OP(op, asm_op)				\
 101:	static __always_inline int						\
 102:	__lsui_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
 103:	{									\
 104:		int ret = 0;							\
 105:		int oldval;							\
 106:										\
 107:		uaccess_ttbr0_enable();						\
 108:										\
 109:		asm volatile("// __lsui_futex_atomic_" #op "\n"			\
 110:		__LSUI_PREAMBLE							\
 111:	"1:	" #asm_op "al	%w[oparg], %w[oldval], %[uaddr]\n"		\
 112:	"2:\n"									\
 113:		_ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w[ret])			\
 114:		: [ret] "+r" (ret), [uaddr] "+Q" (*uaddr),			\
 115:		  [oldval] "=r" (oldval)					\
 116:		: [oparg] "r" (oparg)						\
 117:		: "memory");							\
 118:										\
 119:		uaccess_ttbr0_disable();					\
 120:										\
 121:		if (!ret)							\
 122:			*oval = oldval;						\
 123:		return ret;							\
 124:	}
 125:	
 126:	LSUI_FUTEX_ATOMIC_OP(add, ldtadd)
 127:	LSUI_FUTEX_ATOMIC_OP(or, ldtset)
 128:	LSUI_FUTEX_ATOMIC_OP(andnot, ldtclr)
 129:	LSUI_FUTEX_ATOMIC_OP(set, swpt)
 130:	
 131:	static __always_inline int
 132:	__lsui_cmpxchg64(u64 __user *uaddr, u64 *oldval, u64 newval)
 133:	{
 134:		int ret = 0;
 135:	
 136:		uaccess_ttbr0_enable();
 137:	
 138:		asm volatile("// __lsui_cmpxchg64\n"
 139:		__LSUI_PREAMBLE
 140:	"1:	casalt	%[oldval], %[newval], %[uaddr]\n"
 141:	"2:\n"
 142:		_ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w[ret])
 143:		: [ret] "+r" (ret), [uaddr] "+Q" (*uaddr),
 144:		  [oldval] "+r" (*oldval)
 145:		: [newval] "r" (newval)
 146:		: "memory");
 147:	
 148:		uaccess_ttbr0_disable();
 149:	
 150:		return ret;
 151:	}
 152:	
 153:	static __always_inline int
 154:	__lsui_cmpxchg32(u32 __user *uaddr, u32 *oldval, u32 newval)
 155:	{
 156:		u64 __user *uaddr64;
 157:		bool futex_pos, other_pos;
 158:		union {
 159:			u32 futex[2];
 160:			u64 raw;
 161:		} orig64, oval64, nval64;
 162:	
 163:		uaddr64 = (u64 __user *)PTR_ALIGN_DOWN(uaddr, sizeof(u64));
 164:		futex_pos = !IS_ALIGNED((unsigned long)uaddr, sizeof(u64));
 165:		other_pos = !futex_pos;
 166:	
 167:		orig64.futex[futex_pos] = *oldval;
 168:		if (get_user(orig64.futex[other_pos], (u32 __user *)uaddr64 + other_pos))
 169:			return -EFAULT;
 170:	
 171:		nval64 = oval64 = orig64;
 172:		nval64.futex[futex_pos] = newval;
 173:	
 174:		if (__lsui_cmpxchg64(uaddr64, &oval64.raw, nval64.raw))
 175:			return -EFAULT;
 176:	
 177:		*oldval = oval64.futex[futex_pos];
 178:		return oval64.raw == orig64.raw ? 0 : -EAGAIN;
 179:	}
 180:	
 181:	static __always_inline int
 182:	__lsui_futex_atomic_and(int oparg, u32 __user *uaddr, int *oval)
 183:	{
 184:		/*
 185:		 * Undo the bitwise negation applied to the oparg passed from
 186:		 * arch_futex_atomic_op_inuser() with FUTEX_OP_ANDN.
 187:		 */
 188:		return __lsui_futex_atomic_andnot(~oparg, uaddr, oval);
 189:	}
]

111/4 2026/09/08 10:05 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 70676
							output: 40
							thoughts: 642
						

Thoughts:
**My Investigation into ARM64 Exclusive Loads/Stores and Device Memory**

Okay, so I'm looking into how `__llsc_futex_atomic_##op` and `__llsc_futex_cmpxchg` handle things, specifically the use of `ldxr`/`stlxr` instructions. It seems these are the fallback when LSUI isn't available or preferred. I need to understand the architectural implications, especially when these exclusive access instructions interact with Device memory. I'm focusing on two scenarios: when userspace uses them directly on Device memory, and when the kernel (in a futex syscall) does the same.

Right now, I'm diving into the ARM Architecture Reference Manual (DDI 0487) to nail down the rules. My primary concern is the behavior of exclusive loads and stores on memory mapped with Device attributes, like `Device-nGnRnE`. The manual specifically mentions that exclusive access instructions, including `LDXR`, `LDAXR`, `STXR`, and so on, are defined for Device memory. However, there's a crucial point: the manual says that for exclusive accesses on Device memory, an alignment fault will be generated. Wait, is it *always* an alignment fault? Or could it be something else?

I need to clarify this. According to the ARMv8-A architecture, exclusive accesses to Device memory *can* generate an Alignment fault *unless* the load or store targets a location that would generate an external abort. Hold on! Could a Synchronous External Abort (SEA) be generated instead? This is the key question.

Now, I need to expand my search to consider the different ARM64 SoC platforms out there. I need to know how Nvidia Tegra, Qualcomm Snapdragon, Broadcom, Rockchip, Apple silicon, and various ARM Cortex cores deal with this. I must look for any platform-specific quirks or workarounds.

Finally, I'm heading to the Linux kernel. I'll search mailing lists, commit logs, documentation, and Kconfig files for any references to "Synchronous External Abort", "futex", "ldxr", "exclusive", "render node", "pgprot_noncached", and "pgprot_writecombine" to see if there are existing discussions or solutions. I'll leverage tools like `grepper` and `git-log` to efficiently navigate the kernel source tree. Let's dig in and see what's really going on.



112/4 2026/09/08 10:05 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:futex.*SEA|SEA.*futex|futex.*abort|abort.*futex PathPrefix:Documentation]

Results:
map[Output:]

113/4 2026/09/08 10:06 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 71894
							output: 30
							thoughts: 28
						

Thoughts:
Okay, here's my attempt at summarizing those thoughts from a first-person, expert perspective:

**Deep Dive Analysis: Identifying Concurrency and Potential External Interrupt Issues**

Alright, time to get to work. My immediate focus is on a comprehensive analysis of this system. I need to pinpoint every instance where we're touching on concurrency primitives or potentially vulnerable interrupt interactions. To do this efficiently, I'm going to start with a broad search, and a specific search. I'm going to scan the entire code tree for key indicators.

First, I need to look for `futex`. That's a classic signal of userspace synchronization, and it's always a good starting point for concurrency analysis. Then, I need to hunt down `SEA` – that's a signal event architecture, and is most likely worth investigating further.

Furthermore, I have to be particularly vigilant for anything related to external aborts. So, I will hunt for `External Abort`. This is critical, because such instances are hard to debug, and may cause severe performance problems.

Finally, I need to also add `ldxr` to my search terms. This is a very targeted search, as this can be a key signal for a potential vulnerability in a specific section of the code.

By combining these search terms, I'm aiming to cast a wide net and then refine my understanding. This should provide a solid foundation for understanding the system's concurrency model and identifying areas that require closer examination for potential issues.



114/4 2026/09/08 10:06 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:futex.*ldxr|ldxr.*futex|futex.*Alignment]

Results:
map[Output:]

115/4 2026/09/08 10:06 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 72278
							output: 31
							thoughts: 16
						

Thoughts:
Here's my thought process, as if I were considering this issue:

**Delving into the Arm64 Alignment Fault**

Okay, so the task at hand is to investigate alignment faults, specifically within the `arch/arm64` architecture. That's a good starting point – it narrows the scope considerably. First, I'm going to leverage my familiarity with the codebase. The most efficient way to begin this investigation is through a targeted search. I'll use a search term like "Alignment fault" (with quotes, to ensure the exact phrase is found) and direct it specifically within the `arch/arm64` directory. This approach should quickly pinpoint relevant files that contain error handling, exception tables, or documentation related to the alignment fault exception in Arm64. My experience tells me that these types of issues are often documented in the exception handling code or in related architecture-specific header files. It's likely I'll find code that deals with the MMU and potentially the translation fault handling, since alignment issues are often a consequence of incorrect memory accesses. From there, I'll analyze those hits to understand how the kernel detects, reports, and potentially handles (or attempts to handle) these alignment faults. I'll need to look at both the exception vector handling and potentially the MMU configuration to get the full picture. My goal is to quickly establish the kernel's response mechanism to these errors.



116/4 2026/09/08 10:06 tool grepper
0m Args:
map[Expression:alignment_fault|Alignment fault PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/mm/fault.c=842=static int __kprobes do_translation_fault(unsigned long far,
--
arch/arm64/mm/fault.c-854-
arch/arm64/mm/fault.c:855:static int do_alignment_fault(unsigned long far, unsigned long esr,
arch/arm64/mm/fault.c-856-			      struct pt_regs *regs)
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-950-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
arch/arm64/mm/fault.c:951:	{ do_alignment_fault,	SIGBUS,  BUS_ADRALN,	"alignment fault"		},
arch/arm64/mm/fault.c-952-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 34"			},
]

117/4 2026/09/08 10:06 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 72899
							output: 36
							thoughts: 198
						

Thoughts:
**Alignment Fault Investigation**

Okay, so I'm digging into an alignment fault, specifically looking at the ARM64 architecture. My starting point is `arch/arm64/mm/fault.c`. I see a table entry here that links `do_alignment_fault` to the `SIGBUS` signal with the `BUS_ADRALN` code, which is exactly what I'd expect for an alignment issue. Now, the real question is, what's happening inside `do_alignment_fault`? Let's take a look at its code.

Alright, the code first checks for `CONFIG_COMPAT_ALIGNMENT_FIXUPS` and whether we're in a compatible user mode. If both are true, it calls `do_compat_alignment_fixup`. Otherwise, it calls `do_bad_area`. That's interesting; so, it seems like there is an attempt at graceful handling for compatibility, otherwise we fall into `do_bad_area`, which is likely a more standard error path. To understand this better I will need to look into `do_bad_area`, so let me quickly check its implementation in `arch/arm64/mm/fault.c`.



118/4 2026/09/08 10:06 tool grepper
0m Args:
map[Expression:do_bad_area PathPrefix:arch/arm64/mm/fault.c]

Results:
map[Output:arch/arm64/mm/fault.c=461=static void set_thread_esr(unsigned long address, unsigned long esr)
--
arch/arm64/mm/fault.c-517-
arch/arm64/mm/fault.c:518:static void do_bad_area(unsigned long far, unsigned long esr,
arch/arm64/mm/fault.c-519-			struct pt_regs *regs)
--
arch/arm64/mm/fault.c=842=static int __kprobes do_translation_fault(unsigned long far,
--
arch/arm64/mm/fault.c-850-
arch/arm64/mm/fault.c:851:	do_bad_area(far, esr, regs);
arch/arm64/mm/fault.c-852-	return 0;
--
arch/arm64/mm/fault.c=855=static int do_alignment_fault(unsigned long far, unsigned long esr,
--
arch/arm64/mm/fault.c-860-		return do_compat_alignment_fixup(far, regs);
arch/arm64/mm/fault.c:861:	do_bad_area(far, esr, regs);
arch/arm64/mm/fault.c-862-	return 0;
--
arch/arm64/mm/fault.c=901=static int do_tag_check_fault(unsigned long far, unsigned long esr,
--
arch/arm64/mm/fault.c-912-
arch/arm64/mm/fault.c:913:	do_bad_area(far, esr, regs);
arch/arm64/mm/fault.c-914-	return 0;
]

119/4 2026/09/08 10:06 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 73856
							output: 39
							thoughts: 36
						

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

**Diving into `do_bad_area` in `arch/arm64/mm/fault.c`**

Okay, time to get my hands dirty. I need to understand what's happening with these memory access errors on AArch64. Specifically, I'm focusing on the `do_bad_area` function. It looks like the issue I'm investigating is handled within lines 510 to 550 of `arch/arm64/mm/fault.c`. I expect this code block to be the crucial part of the memory fault handling process when a fault doesn't map to a valid area. Time to dissect the code and look for anything that stands out regarding the behaviour of the kernel. I hope to understand how it determines it’s a “bad area”, what checks are performed, and what actions are taken when a fault happens. I will pay close attention to the registers and data structures being used. Let's see what gems are waiting to be uncovered in this section of code.



120/4 2026/09/08 10:06 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:510 LineCount:40]

Results:
map[Contents: 510:				esr = 0;
 511:				break;
 512:			}
 513:		}
 514:	
 515:		current->thread.fault_code = esr;
 516:	}
 517:	
 518:	static void do_bad_area(unsigned long far, unsigned long esr,
 519:				struct pt_regs *regs)
 520:	{
 521:		unsigned long addr = untagged_addr(far);
 522:	
 523:		/*
 524:		 * If we are in kernel mode at this point, we have no context to
 525:		 * handle this fault with.
 526:		 */
 527:		if (user_mode(regs)) {
 528:			const struct fault_info *inf = esr_to_fault_info(esr);
 529:	
 530:			set_thread_esr(addr, esr);
 531:			arm64_force_sig_fault(inf->sig, inf->code, far, inf->name);
 532:		} else {
 533:			__do_kernel_fault(addr, esr, regs);
 534:		}
 535:	}
 536:	
 537:	static bool fault_from_pkey(struct vm_area_struct *vma, unsigned int mm_flags)
 538:	{
 539:		if (!system_supports_poe())
 540:			return false;
 541:	
 542:		/*
 543:		 * We do not check whether an Overlay fault has occurred because we
 544:		 * cannot make a decision based solely on its value:
 545:		 *
 546:		 * - If Overlay is set, a fault did occur due to POE, but it may be
 547:		 *   spurious in those cases where we update POR_EL0 without ISB (e.g.
 548:		 *   on context-switch). We would then need to manually check POR_EL0
 549:		 *   against vma_pkey(vma), which is exactly what
]

121/4 2026/09/08 10:06 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 74760
							output: 39
							thoughts: 213
						

Thoughts:
**Kernel Fault Handling: Digging into `fixup_exception`**

Okay, let's break this down. I'm looking at the `do_bad_area` function, and it seems pretty straightforward – if we're in kernel mode, it triggers `__do_kernel_fault`. That makes sense. Now, within `__do_kernel_fault`, I see a critical conditional:  `fixup_exception(regs, esr)`.  And the key here is it *can* return, bypassing the `die_kernel_fault` if it can `fixup` the problem.

Wait a second...is this where alignment faults are addressed? I remember something about `fixup_exception` being invoked for alignment errors. That's a possibility, especially since it's called from a location where an exception *could* be fixed. This is where the magic happens.

I need to see the implementation of `fixup_exception` to be sure, and to check if this handles alignment faults. I'm heading straight to `arch/arm64/mm/extable.c` right now to verify this.



122/4 2026/09/08 10:06 tool read-file
0m Args:
map[File:arch/arm64/mm/extable.c FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	// SPDX-License-Identifier: GPL-2.0
   2:	/*
   3:	 * Based on arch/arm/mm/extable.c
   4:	 */
   5:	
   6:	#include <linux/bitfield.h>
   7:	#include <linux/extable.h>
   8:	#include <linux/uaccess.h>
   9:	
  10:	#include <asm/asm-extable.h>
  11:	#include <asm/esr.h>
  12:	#include <asm/ptrace.h>
  13:	
  14:	static bool cpy_faulted_on_uaccess(const struct exception_table_entry *ex,
  15:					   unsigned long esr)
  16:	{
  17:		bool uaccess_is_write = FIELD_GET(EX_DATA_UACCESS_WRITE, ex->data);
  18:		bool fault_on_write = esr & ESR_ELx_WNR;
  19:	
  20:		return uaccess_is_write == fault_on_write;
  21:	}
  22:	
  23:	bool insn_may_access_user(unsigned long addr, unsigned long esr)
  24:	{
  25:		const struct exception_table_entry *ex = search_exception_tables(addr);
  26:	
  27:		if (!ex)
  28:			return false;
  29:	
  30:		switch (ex->type) {
  31:		case EX_TYPE_UACCESS_CPY:
  32:			return cpy_faulted_on_uaccess(ex, esr);
  33:		default:
  34:			return true;
  35:		}
  36:	}
  37:	
  38:	static inline unsigned long
  39:	get_ex_fixup(const struct exception_table_entry *ex)
  40:	{
  41:		return ((unsigned long)&ex->fixup + ex->fixup);
  42:	}
  43:	
  44:	static bool ex_handler_uaccess_err_zero(const struct exception_table_entry *ex,
  45:						struct pt_regs *regs)
  46:	{
  47:		int reg_err = FIELD_GET(EX_DATA_REG_ERR, ex->data);
  48:		int reg_zero = FIELD_GET(EX_DATA_REG_ZERO, ex->data);
  49:	
  50:		pt_regs_write_reg(regs, reg_err, -EFAULT);
  51:		pt_regs_write_reg(regs, reg_zero, 0);
  52:	
  53:		regs->pc = get_ex_fixup(ex);
  54:		return true;
  55:	}
  56:	
  57:	static bool ex_handler_uaccess_cpy(const struct exception_table_entry *ex,
  58:					   struct pt_regs *regs, unsigned long esr)
  59:	{
  60:		/* Do not fix up faults on kernel memory accesses */
  61:		if (!cpy_faulted_on_uaccess(ex, esr))
  62:			return false;
  63:	
  64:		regs->pc = get_ex_fixup(ex);
  65:		return true;
  66:	}
  67:	
  68:	static bool
  69:	ex_handler_load_unaligned_zeropad(const struct exception_table_entry *ex,
  70:					  struct pt_regs *regs)
  71:	{
  72:		int reg_data = FIELD_GET(EX_DATA_REG_DATA, ex->data);
  73:		int reg_addr = FIELD_GET(EX_DATA_REG_ADDR, ex->data);
  74:		unsigned long data, addr, offset;
  75:	
  76:		addr = pt_regs_read_reg(regs, reg_addr);
  77:	
  78:		offset = addr & 0x7UL;
  79:		addr &= ~0x7UL;
  80:	
  81:		data = *(unsigned long*)addr;
  82:	
  83:	#ifndef __AARCH64EB__
  84:		data >>= 8 * offset;
  85:	#else
  86:		data <<= 8 * offset;
  87:	#endif
  88:	
  89:		pt_regs_write_reg(regs, reg_data, data);
  90:	
  91:		regs->pc = get_ex_fixup(ex);
  92:		return true;
  93:	}
  94:	
  95:	bool fixup_exception(struct pt_regs *regs, unsigned long esr)
  96:	{
  97:		const struct exception_table_entry *ex;
  98:	
  99:		ex = search_exception_tables(instruction_pointer(regs));
 100:		if (!ex)
]

123/4 2026/09/08 10:06 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 76604
							output: 40
							thoughts: 21
						

Thoughts:
Okay, let's dive into the rest of `arch/arm64/mm/extable.c`. I need to get a clear picture of how exception handling is implemented at this low level. My understanding of the architectural basics is solid, but the intricacies of the kernel's exception table mechanism are always worth revisiting. I'm especially interested in how the compiler and linker interact to generate and utilize these tables. I'll be looking for things like the structure definitions for the exception table entries, how the entries are populated, the lookup routines, and any optimizations used for common scenarios. I also want to see how these tables tie into the various exception vector handlers. I'll need to pay close attention to the potential performance implications, especially in interrupt-heavy environments. Anything unusual or interesting in the implementation that I can take away? Time to explore.



124/4 2026/09/08 10:06 tool read-file
0m Args:
map[File:arch/arm64/mm/extable.c FirstLine:100 LineCount:50]

Results:
map[Contents: 100:		if (!ex)
 101:			return false;
 102:	
 103:		switch (ex->type) {
 104:		case EX_TYPE_BPF:
 105:			return ex_handler_bpf(ex, regs);
 106:		case EX_TYPE_UACCESS_ERR_ZERO:
 107:		case EX_TYPE_KACCESS_ERR_ZERO:
 108:			return ex_handler_uaccess_err_zero(ex, regs);
 109:		case EX_TYPE_UACCESS_CPY:
 110:			return ex_handler_uaccess_cpy(ex, regs, esr);
 111:		case EX_TYPE_LOAD_UNALIGNED_ZEROPAD:
 112:			return ex_handler_load_unaligned_zeropad(ex, regs);
 113:		}
 114:	
 115:		BUG();
 116:	}
]

125/4 2026/09/08 10:06 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 77112
							output: 38
							thoughts: 1005
						

Thoughts:
**Analyzing ARM64 Memory Access Faults: A Deep Dive**

Okay, let's break this down. My initial thought process is centered around how the Linux kernel handles different types of memory access errors on ARM64, particularly in relation to unprivileged user access. I started by looking at how the kernel deals with **Alignment Faults**. It seems that when an alignment fault occurs due to an access violation, `fixup_exception` gets called, and it returns `-EFAULT`. That's straightforward enough.

However, the core of this investigation lies in understanding how the kernel responds to **Synchronous External Aborts (SEA)**. My concern arises because these SEAs *don't* seem to be handled by the exception fixup mechanism. I see that `do_sea` in `arch/arm64/mm/fault.c` is responsible for handling SEAs. Crucially, it never calls `fixup_exception()`. If a SEA happens in kernel mode (EL1), even if it was triggered by a user-space access (`ldxr`, `ldr` with uaccess), the kernel ends up calling `die()`, which panics or kills the kernel. That's a huge potential security hole!

This leads me to a series of critical questions:

1.  Can a non-privileged user map device memory (e.g., non-cached or write-combine) through methods like DRM render nodes? If so, this immediately opens the door to potential vulnerabilities.
2.  What happens on ARM64 when exclusive instructions like `LDXR` or atomics are used on non-cached versus device memory? Do they trigger an SEA, an Alignment Fault, or something else entirely? The behavior in these cases is fundamental to understanding any possible exploit.
3.  Specifically, does using an exclusive access on device or normal non-cached memory on ARM64 generate an SEA? This is the central point. If it does, and an unprivileged user can trigger this, the system is exposed.
4.  Can I trigger this via the `futex()` system call? My mind is on the edge cases of possible exploits.
5.  Has anyone in the kernel community, within CVE reports, or in ARM specifications already investigated, discussed, or fixed this scenario? I need to check the state of existing knowledge.

My next steps involve thorough investigation. I'll scour the Linux kernel git history for commits related to ARM64 exclusive access, SEAs, the futex syscall, and device memory management. This will hopefully show existing discussion and patches related to this. I'll also check any relevant CVE reports or ARM documentation to see if these conditions are documented or addressed.



126/4 2026/09/08 10:06 tool git-log
2m Args:
map[CodeRegexp:pgprot_noncached Count:10 PathPrefix:drivers/gpu/drm]

Results:
map[Output:a2fdfd0080a3 mm: introduce vma_get_page_prot() and use it
1ffcf8b8ae8a drm/xe: Support for mmap-ing mmio regions
75d37750a753 drm/xe/mmap: Add mmap support for PCI memory barrier
834f30419283 drm/etnaviv: Fix page property being used for non writecombine buffers
5fe909cae118 drm/panthor: Add the device logical block
2504c7ec728b drm: Remove source code for non-KMS drivers
b8bbbea1ae64 drm/gma500: Move fbdev code into separate source file
9ef364432db4 drm/msm: deprecate MSM_BO_UNCACHED (map as writecombine instead)
af9b35470799 drm/msm: use the right pgprot when mapping BOs in the kernel
3bf3710e3718 drm/ttm: Add a generic TTM memcpy move for page-based iomem
]

127/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 79002
							output: 25
							thoughts: 54
						

Thoughts:
Okay, here's my take on that commit, speaking as an expert:

**Analyzing a Deprecation: MSM_BO_UNCACHED**

Alright, let's dive into commit `9ef364432db4 drm/msm: deprecate MSM_BO_UNCACHED (map as writecombine instead)`.  My immediate thought is, "Ah, finally!  They're deprecating that old `MSM_BO_UNCACHED` flag. I wonder how the performance characteristics compare with the suggested write-combined mapping." I pull up the commit using `git-show` to get the specifics. I'm assuming the goal here is to migrate away from a potentially brittle and less-well-defined caching strategy to something that's more standard and, hopefully, better-behaved from a performance standpoint.  The move to `writecombine` suggests they are trying to gain similar un-cached behavior, however `writecombine` isn't always ideal. I'll need to dig into the comments and reasoning behind this change. Specifically, I'm going to look for details regarding why they made this move, what alternatives were considered, and whether they've included any performance testing or caveats. I want to see if they're addressing any specific issues with the existing implementation of the un-cached mapping or if this is just a general cleanup and standardization effort. I'll be particularly interested in whether they've accounted for any potential impact on specific use cases, or on different generations of MSM hardware. It's crucial they did not cause any regression for older drivers, or even new code. This is a potentially significant change, so I'm hoping the commit message is thorough and provides ample justification for the deprecation. I expect good reasoning.



128/4 2026/09/08 10:08 tool git-show
0m Args:
map[Commit:9ef364432db4]

Results:
map[Output:commit 9ef364432db4a11ff2dbee398d7ed06e93bdfe5e
Author: Jonathan Marek <jonathan@marek.ca>
Date:   Fri Apr 23 15:08:21 2021 -0400

    drm/msm: deprecate MSM_BO_UNCACHED (map as writecombine instead)
    
    There shouldn't be any reason to ever use uncached over writecombine,
    so just use writecombine for MSM_BO_UNCACHED.
    
    Note: userspace never used MSM_BO_UNCACHED anyway
    
    Signed-off-by: Jonathan Marek <jonathan@marek.ca>
    Acked-by: Jordan Crouse <jordan@cosmicpenguin.net>
    Link: https://lore.kernel.org/r/20210423190833.25319-6-jonathan@marek.ca
    Signed-off-by: Rob Clark <robdclark@chromium.org>

diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 8d19a0f289fd..1865919368f2 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -213,10 +213,8 @@ void msm_gem_put_pages(struct drm_gem_object *obj)
 
 static pgprot_t msm_gem_pgprot(struct msm_gem_object *msm_obj, pgprot_t prot)
 {
-	if (msm_obj->flags & MSM_BO_WC)
+	if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
 		return pgprot_writecombine(prot);
-	if (msm_obj->flags & MSM_BO_UNCACHED)
-		return pgprot_noncached(prot);
 	return prot;
 }
 
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index a92d90a6d96f..f075851021c3 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -94,7 +94,7 @@ struct drm_msm_param {
 /* cache modes */
 #define MSM_BO_CACHED        0x00010000
 #define MSM_BO_WC            0x00020000
-#define MSM_BO_UNCACHED      0x00040000
+#define MSM_BO_UNCACHED      0x00040000 /* deprecated, use MSM_BO_WC */
 #define MSM_BO_CACHED_COHERENT 0x080000
 
 #define MSM_BO_FLAGS         (MSM_BO_SCANOUT | \
]

129/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 80281
							output: 27
							thoughts: 35
						

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

**Analyzing Commit 834f30419283: drm/etnaviv: Fix page property being used for non writecombine buffers**

Okay, so I'm looking at commit `834f30419283` for `drm/etnaviv`. The title immediately points to a potential issue, which is always good to flag. Specifically, this is about the Etnaviv driver and how it's handling memory properties, which, if mishandled, can lead to serious performance regressions or even crashes. The crux of the problem seems to be the misuse of the "page" property for buffers that *aren't* write-combined. That's a classic area to trip up on when memory access patterns aren't precisely managed.

I immediately have a few questions forming: what *is* the page property in this context? Is it related to how the hardware caches the memory? What implications does using it on non-writecombined memory have? Is this just a bug in a specific area, or is this a broader pattern? I'll need to dig into the code to figure out precisely where the logic error lies. I'm hoping it's a simple conditional statement that's been missed.

Hopefully, this fix doesn't introduce any new regressions. I'll definitely check the diff for any indirect impacts, especially within the memory management subsystem. This is the kind of fix that warrants careful scrutiny.



130/4 2026/09/08 10:08 tool git-show
0m Args:
map[Commit:834f30419283]

Results:
map[Output:commit 834f304192834d6f0941954f3277ae0ba11a9a86
Author: Sui Jingfeng <sui.jingfeng@linux.dev>
Date:   Mon Nov 4 08:41:56 2024 +0800

    drm/etnaviv: Fix page property being used for non writecombine buffers
    
    In the etnaviv_gem_vmap_impl() function, the driver vmap whatever buffers
    with write combine(WC) page property, this is incorrect. Cached buffers
    should be mapped with the cached page property and uncached buffers should
    be mapped with the uncached page property.
    
    Fixes: a0a5ab3e99b8 ("drm/etnaviv: call correct function when trying to vmap a DMABUF")
    Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
    Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 16473c371444..da30179de02b 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -342,6 +342,7 @@ void *etnaviv_gem_vmap(struct drm_gem_object *obj)
 static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
 {
 	struct page **pages;
+	pgprot_t prot;
 
 	lockdep_assert_held(&obj->lock);
 
@@ -349,8 +350,19 @@ static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
 	if (IS_ERR(pages))
 		return NULL;
 
-	return vmap(pages, obj->base.size >> PAGE_SHIFT,
-			VM_MAP, pgprot_writecombine(PAGE_KERNEL));
+	switch (obj->flags & ETNA_BO_CACHE_MASK) {
+	case ETNA_BO_CACHED:
+		prot = PAGE_KERNEL;
+		break;
+	case ETNA_BO_UNCACHED:
+		prot = pgprot_noncached(PAGE_KERNEL);
+		break;
+	case ETNA_BO_WC:
+	default:
+		prot = pgprot_writecombine(PAGE_KERNEL);
+	}
+
+	return vmap(pages, obj->base.size >> PAGE_SHIFT, VM_MAP, prot);
 }
 
 static inline enum dma_data_direction etnaviv_op_to_dma_dir(u32 op)
]

131/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 81419
							output: 45
							thoughts: 36
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from an expert's perspective:

**Diving into the Graphics Driver Ecosystem**

Right, let's get down to brass tacks. I need to take a look at the graphics driver landscape, specifically focusing on the interactions between a few key players. I want to start by examining `etnaviv`, `omapdrm`, and `amdkfd` – those are the specific drivers I'm homing in on to get a handle on the current state of things. My primary concern here is how memory management works, so that means I need to start with some core functions. Let's see what's happening with `etnaviv_gem_mmap_obj`, and how it maps into the bigger picture.



132/4 2026/09/08 10:08 tool read-file
0m Args:
map[File:drivers/gpu/drm/etnaviv/etnaviv_gem.c FirstLine:125 LineCount:35]

Results:
map[Contents: 125:		lockdep_assert_held(&etnaviv_obj->lock);
 126:		/* when we start tracking the pin count, then do something here */
 127:	}
 128:	
 129:	static int etnaviv_gem_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
 130:			struct vm_area_struct *vma)
 131:	{
 132:		pgprot_t vm_page_prot;
 133:	
 134:		vm_flags_set(vma, VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP);
 135:	
 136:		vm_page_prot = vma_get_page_prot(vma);
 137:	
 138:		if (etnaviv_obj->flags & ETNA_BO_WC) {
 139:			vma->vm_page_prot = pgprot_writecombine(vm_page_prot);
 140:		} else if (etnaviv_obj->flags & ETNA_BO_UNCACHED) {
 141:			vma->vm_page_prot = pgprot_noncached(vm_page_prot);
 142:		} else {
 143:			/*
 144:			 * Shunt off cached objs to shmem file so they have their own
 145:			 * address_space (so unmap_mapping_range does what we want,
 146:			 * in particular in the case of mmap'd dmabufs)
 147:			 */
 148:			vma->vm_pgoff = 0;
 149:			vma_set_file(vma, etnaviv_obj->base.filp);
 150:	
 151:			vma->vm_page_prot = vm_page_prot;
 152:		}
 153:	
 154:		return 0;
 155:	}
 156:	
 157:	static int etnaviv_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
 158:	{
 159:		struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj);
]

133/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 82291
							output: 37
							thoughts: 300
						

Thoughts:
**Analyzing a Potential Vulnerability in `etnaviv` DRM**

Okay, let's break this down. In the `etnaviv` driver, if I understand this correctly, any unprivileged user who can get access to the DRM render node `/dev/dri/renderD*` has the potential to trigger an issue. They can call `ETNAVIV_GEM_NEW` with the `ETNA_BO_UNCACHED` flag. That's immediately interesting – bypassing caching could be a problem. When they `mmap()` the GEM buffer, the virtual memory area (`vma`) gets set with `vma->vm_page_prot = pgprot_noncached(vm_page_prot);`. On ARM64, this translates to `MT_DEVICE_nGnRnE`. Right, so this results in device memory being mapped.

Now, the crucial question: can this device memory then be passed to `futex()`? That's the key. If so, there could be a serious security problem. I need to trace the execution path. I need to examine what happens in the kernel when userspace calls `futex()` with operations like `FUTEX_WAKE_OP`, `FUTEX_LOCK_PI`, `FUTEX_WAIT`, and `FUTEX_CMP_REQUEUE`. Each operation must be examined.

Specifically, let's start with `FUTEX_WAIT`. I need to dig into `futex_wait_setup` in `kernel/futex/waitwake.c`. That's where the critical setup for the `wait` operation will occur. I need to see what assumptions it makes about the memory it's operating on.



134/4 2026/09/08 10:08 tool read-file
0m Args:
map[File:kernel/futex/waitwake.c FirstLine:620 LineCount:55]

Results:
map[Contents: 620:	 *	   be read, does not contain the expected value or is not properly aligned.
 621:	 */
 622:	int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags,
 623:			     struct futex_q *q, union futex_key *key2,
 624:			     struct task_struct *task)
 625:	{
 626:		u32 uval;
 627:		int ret;
 628:	
 629:		/*
 630:		 * Access the page AFTER the hash-bucket is locked.
 631:		 * Order is important:
 632:		 *
 633:		 *   Userspace waiter: val = var; if (cond(val)) futex_wait(&var, val);
 634:		 *   Userspace waker:  if (cond(var)) { var = new; futex_wake(&var); }
 635:		 *
 636:		 * The basic logical guarantee of a futex is that it blocks ONLY
 637:		 * if cond(var) is known to be true at the time of blocking, for
 638:		 * any cond.  If we locked the hash-bucket after testing *uaddr, that
 639:		 * would open a race condition where we could block indefinitely with
 640:		 * cond(var) false, which would violate the guarantee.
 641:		 *
 642:		 * On the other hand, we insert q and release the hash-bucket only
 643:		 * after testing *uaddr.  This guarantees that futex_wait() will NOT
 644:		 * absorb a wakeup if *uaddr does not match the desired values
 645:		 * while the syscall executes.
 646:		 */
 647:	retry:
 648:		ret = get_futex_key(uaddr, flags, &q->key, FUTEX_READ);
 649:		if (unlikely(ret != 0))
 650:			return ret;
 651:	
 652:	retry_private:
 653:		if (1) {
 654:			CLASS(hbr, hbr)(&q->key);
 655:			auto hb = hbr.hb;
 656:	
 657:			futex_q_lock(q, hb);
 658:	
 659:			ret = futex_get_value_locked(&uval, uaddr);
 660:	
 661:			if (ret) {
 662:				futex_q_unlock(hb);
 663:				__release(q->lock_ptr);
 664:	
 665:				ret = get_user(uval, uaddr);
 666:				if (ret)
 667:					return ret;
 668:	
 669:				if (!(flags & FLAGS_SHARED))
 670:					goto retry_private;
 671:	
 672:				goto retry;
 673:			}
 674:	
]

135/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 83830
							output: 33
							thoughts: 1002
						

Thoughts:
**Analyzing Atomic Operations on ARM64 Device Memory for Futexes**

Okay, so I'm diving into the kernel's futex implementation, specifically the atomic operations. In `futex_wait_setup`, we're dealing with a regular load (`ldr`) via `get_user`, which is straightforward. But what about the atomic operations like `FUTEX_WAKE_OP`, `FUTEX_LOCK_PI`, and the others? I need to understand how these handle the memory interactions.

My focus is now on `futex_atomic_op_inuser()` in `kernel/futex/waitwake.c`, and specifically how it calls `arch_futex_atomic_op_inuser()`. On ARM64, this eventually leads to `__llsc_futex_atomic_op` calls, which use the `ldxr` (Load Exclusive Register) and `stlxr` (Store Exclusive Register) instructions. Even for PI futexes, the path goes through `futex_cmpxchg_value_locked`, eventually hitting `__llsc_futex_cmpxchg` and those same `ldxr` and `stlxr` instructions.

This is where it gets interesting, especially when considering the memory types involved. The question is, what happens on the ARM64 hardware when `ldxr` (or `stlxr`) is executed on Device memory? We have the memory type `MT_DEVICE_nGnRnE` and `MT_DEVICE_nGnRE`, which are both device memory types.

I need to consult the ARM Architecture Reference Manual (ARM DDI 0487) for ARMv8/v9 to understand the precise behavior. Does an `LDXR` on Device memory cause an alignment fault, a synchronous external abort, or does it depend on the system interconnect? The ARMv8-A architecture documentation should shed light on this. I'm thinking specifically about Data Aborts (DFSC/ESR_ELx).

Furthermore, I need to consider the behavior for Normal Non-Cacheable memory (`MT_NORMAL_NC`). What's the expected result of an `LDXR` on this type of memory? Are there any differences from Device memory?

My next step is to search the kernel code and documentation to see if there are any existing mentions or considerations regarding `ldxr` on device or non-cacheable memory. I'm looking for any hints about potential exceptions, workarounds, or documented behaviors related to these atomic operations in these memory regions.



136/4 2026/09/08 10:08 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:LDXR.*Device|exclusive.*Device PathPrefix:arch/arm64]

Results:
map[Output:]

137/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 85422
							output: 31
							thoughts: 29
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert in the field:

**Kernel Exploration for Concurrency and Atomic Operation Issues**

Alright, time to get my hands dirty. I'm thinking, let's cast a wide net across the kernel source. We're looking for potential pitfalls related to atomic operations, concurrency issues, and perhaps even hardware interactions. My immediate focus is on anything related to `LDXR` (load-exclusive register) or generally "exclusive" accesses. These are classic markers for implementing atomic operations on ARM, and where there's exclusivity, there's always the potential for contention and unexpected behavior.

Given my understanding of potential issues, I'll combine the `LDXR` and "exclusive" keywords with search terms that often point to related problems: `Device`, `alignment`, and `abort`. The `Device` tag might point to hardware registers being accessed directly in a potentially non-atomic way. `Alignment` issues are a perpetual headache, and they can completely torpedo the expected behavior of exclusive loads and stores if not handled correctly at the memory level. Finally, `abort` would indicate that an exclusive access has not worked as expected, and it's something I need to look into! This might be due to contention or other failures within the hardware's locking mechanisms. Let's see what the kernel reveals!



138/4 2026/09/08 10:08 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:exclusive.*memory type|Load-Exclusive.*Device|exclusive.*non-cacheable]

Results:
map[Output:]

139/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 85779
							output: 25
							thoughts: 33
						

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

**Memory Management Deep Dive**

Right, let's get down to brass tacks. I need to refresh my understanding of how this architecture handles memory types, specifically in relation to the Memory Attribute Indirection Register (MAIR), memory barriers, and the exclusive monitor. My initial instinct is to go straight to the source. The `Documentation/` directory is usually the first place to look for high-level architectural overviews and any relevant API documentation on the kernel side, but I suspect that this particular issue will be heavily processor-specific. Therefore, `arch/arm64/` is also a prime candidate. I'm hoping to find comprehensive information on how the kernel configures the MAIR, how memory types are mapped, how memory barriers are implemented, and any specifics regarding the use of the exclusive monitor for synchronization primitives. I'm anticipating some potentially subtle interactions between the memory attributes and the cache coherency protocols, so I need to make sure I get a good picture of all this.



140/4 2026/09/08 10:08 tool codesearch-dir-index
0m Args:
map[Dir:Documentation/arch/arm64]

Results:
map[Files:[acpi_object_usage.rst amu.rst arm-acpi.rst arm-cca.rst asymmetric-32bit.rst booting.rst cpu-feature-registers.rst cpu-hotplug.rst elf_hwcaps.rst features.rst gcs.rst hugetlbpage.rst index.rst kdump.rst legacy_instructions.rst memory-tagging-extension.rst memory.rst mops.rst mpam.rst perf.rst pointer-authentication.rst ptdump.rst silicon-errata.rst sme.rst sve.rst tagged-address-abi.rst tagged-pointers.rst] Subdirs:<nil>]

141/4 2026/09/08 10:08 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 86290
							output: 38
							thoughts: 33
						

Thoughts:
Here's my take:

**Investigating ARM64 Memory and Legacy Instructions**

Okay, so I need to get a handle on this particular aspect. My first instinct is to dive into the documentation, specifically the ARM64 architecture documentation. I'll need to double-check `Documentation/arch/arm64/memory.rst` – that should give me the core principles and details surrounding memory management on this architecture. Then, I should also look at `Documentation/arch/arm64/legacy_instructions.rst`. I'll need to confirm what's there about the legacy instruction set, especially how it's handled or if there are things I need to be aware of regarding its interaction with the modern instruction set. That should give me the base-level understanding I require.



142/4 2026/09/08 10:09 tool read-file
0m Args:
map[File:Documentation/arch/arm64/memory.rst FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	==============================
   2:	Memory Layout on AArch64 Linux
   3:	==============================
   4:	
   5:	Author: Catalin Marinas <catalin.marinas@arm.com>
   6:	
   7:	This document describes the virtual memory layout used by the AArch64
   8:	Linux kernel. The architecture allows up to 4 levels of translation
   9:	tables with a 4KB page size and up to 3 levels with a 64KB page size.
  10:	
  11:	AArch64 Linux uses either 3 levels or 4 levels of translation tables
  12:	with the 4KB page configuration, allowing 39-bit (512GB) or 48-bit
  13:	(256TB) virtual addresses, respectively, for both user and kernel. With
  14:	64KB pages, only 2 levels of translation tables, allowing 42-bit (4TB)
  15:	virtual address, are used but the memory layout is the same.
  16:	
  17:	ARMv8.2 adds optional support for Large Virtual Address space. This is
  18:	only available when running with a 64KB page size and expands the
  19:	number of descriptors in the first level of translation.
  20:	
  21:	TTBRx selection is given by bit 55 of the virtual address. The
  22:	swapper_pg_dir contains only kernel (global) mappings while the user pgd
  23:	contains only user (non-global) mappings.  The swapper_pg_dir address is
  24:	written to TTBR1 and never written to TTBR0.
  25:	
  26:	When using KVM without the Virtualization Host Extensions, the
  27:	hypervisor maps kernel pages in EL2 at a fixed (and potentially
  28:	random) offset from the linear mapping. See the kern_hyp_va macro and
  29:	kvm_update_va_mask function for more details. MMIO devices such as
  30:	GICv2 gets mapped next to the HYP idmap page, as do vectors when
  31:	ARM64_SPECTRE_V3A is enabled for particular CPUs.
  32:	
  33:	When using KVM with the Virtualization Host Extensions, no additional
  34:	mappings are created, since the host kernel runs directly in EL2.
  35:	
  36:	52-bit VA support in the kernel
  37:	-------------------------------
  38:	If the ARMv8.2-LVA optional feature is present, and we are running
  39:	with a 64KB page size; then it is possible to use 52-bits of address
  40:	space for both userspace and kernel addresses. However, any kernel
  41:	binary that supports 52-bit must also be able to fall back to 48-bit
  42:	at early boot time if the hardware feature is not present.
  43:	
  44:	This fallback mechanism necessitates the kernel .text to be in the
  45:	higher addresses such that they are invariant to 48/52-bit VAs. Due
  46:	to the kasan shadow being a fraction of the entire kernel VA space,
  47:	the end of the kasan shadow must also be in the higher half of the
  48:	kernel VA space for both 48/52-bit. (Switching from 48-bit to 52-bit,
  49:	the end of the kasan shadow is invariant and dependent on ~0UL,
  50:	whilst the start address will "grow" towards the lower addresses).
  51:	
  52:	In order to optimise phys_to_virt and virt_to_phys, the PAGE_OFFSET
  53:	is kept constant at 0xFFF0000000000000 (corresponding to 52-bit),
  54:	this obviates the need for an extra variable read. The physvirt
  55:	offset and vmemmap offsets are computed at early boot to enable
  56:	this logic.
  57:	
  58:	As a single binary will need to support both 48-bit and 52-bit VA
  59:	spaces, the VMEMMAP must be sized large enough for 52-bit VAs and
  60:	also must be sized large enough to accommodate a fixed PAGE_OFFSET.
  61:	
  62:	Most code in the kernel should not need to consider the VA_BITS, for
  63:	code that does need to know the VA size the variables are
  64:	defined as follows:
  65:	
  66:	VA_BITS		constant	the *maximum* VA space size
  67:	
  68:	VA_BITS_MIN	constant	the *minimum* VA space size
  69:	
  70:	vabits_actual	variable	the *actual* VA space size
  71:	
  72:	
  73:	Maximum and minimum sizes can be useful to ensure that buffers are
  74:	sized large enough or that addresses are positioned close enough for
  75:	the "worst" case.
  76:	
  77:	52-bit userspace VAs
  78:	--------------------
  79:	To maintain compatibility with software that relies on the ARMv8.0
  80:	VA space maximum size of 48-bits, the kernel will, by default,
  81:	return virtual addresses to userspace from a 48-bit range.
  82:	
  83:	Software can "opt-in" to receiving VAs from a 52-bit space by
  84:	specifying an mmap hint parameter that is larger than 48-bit.
  85:	
  86:	For example:
  87:	
  88:	.. code-block:: c
  89:	
  90:	   maybe_high_address = mmap(~0UL, size, prot, flags,...);
  91:	
  92:	It is also possible to build a debug kernel that returns addresses
  93:	from a 52-bit space by enabling the following kernel config options:
  94:	
  95:	.. code-block:: sh
  96:	
  97:	   CONFIG_EXPERT=y && CONFIG_ARM64_FORCE_52BIT=y
  98:	
  99:	Note that this option is only intended for debugging applications
 100:	and should not be used in production.
]

143/4 2026/09/08 10:09 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 88196
							output: 39
							thoughts: 19
						

Thoughts:
Here's my take on those thoughts:

**Time to Brush Up on ARM64 Legacy Instructions**

Okay, so I need to get a handle on the legacy instruction set for ARM64, and quickly. The most logical place to start, given my familiarity with the kernel's source structure, is the documentation. Specifically, I'm thinking I need to consult `Documentation/arch/arm64/legacy_instructions.rst`. I recall seeing that file referenced in the past, and it sounds like *the* authoritative resource for this. I'll take a quick look to refresh my memory and make sure I know what I'm dealing with. Let's see if it's the right place to begin this deep dive.



144/4 2026/09/08 10:09 tool read-file
0m Args:
map[File:Documentation/arch/arm64/legacy_instructions.rst FirstLine:1 LineCount:80]

Results:
map[Contents:   1:	===================
   2:	Legacy instructions
   3:	===================
   4:	
   5:	The arm64 port of the Linux kernel provides infrastructure to support
   6:	emulation of instructions which have been deprecated, or obsoleted in
   7:	the architecture. The infrastructure code uses undefined instruction
   8:	hooks to support emulation. Where available it also allows turning on
   9:	the instruction execution in hardware.
  10:	
  11:	The emulation mode can be controlled by writing to sysctl nodes
  12:	(/proc/sys/abi). The following explains the different execution
  13:	behaviours and the corresponding values of the sysctl nodes -
  14:	
  15:	* Undef
  16:	    Value: 0
  17:	
  18:	  Generates undefined instruction abort. Default for instructions that
  19:	  have been obsoleted in the architecture, e.g., SWP
  20:	
  21:	* Emulate
  22:	    Value: 1
  23:	
  24:	  Uses software emulation. To aid migration of software, in this mode
  25:	  usage of emulated instruction is traced as well as rate limited
  26:	  warnings are issued. This is the default for deprecated
  27:	  instructions, .e.g., CP15 barriers
  28:	
  29:	* Hardware Execution
  30:	    Value: 2
  31:	
  32:	  Although marked as deprecated, some implementations may support the
  33:	  enabling/disabling of hardware support for the execution of these
  34:	  instructions. Using hardware execution generally provides better
  35:	  performance, but at the loss of ability to gather runtime statistics
  36:	  about the use of the deprecated instructions.
  37:	
  38:	The default mode depends on the status of the instruction in the
  39:	architecture. Deprecated instructions should default to emulation
  40:	while obsolete instructions must be undefined by default.
  41:	
  42:	Note: Instruction emulation may not be possible in all cases. See
  43:	individual instruction notes for further information.
  44:	
  45:	Supported legacy instructions
  46:	-----------------------------
  47:	* SWP{B}
  48:	
  49:	:Node: /proc/sys/abi/swp
  50:	:Status: Obsolete
  51:	:Default: Undef (0)
  52:	
  53:	* CP15 Barriers
  54:	
  55:	:Node: /proc/sys/abi/cp15_barrier
  56:	:Status: Deprecated
  57:	:Default: Emulate (1)
  58:	
  59:	* SETEND
  60:	
  61:	:Node: /proc/sys/abi/setend
  62:	:Status: Deprecated
  63:	:Default: Emulate (1)*
  64:	
  65:	  Note: All the cpus on the system must have mixed endian support at EL0
  66:	  for this feature to be enabled. If a new CPU - which doesn't support mixed
  67:	  endian - is hotplugged in after this feature has been enabled, there could
  68:	  be unexpected results in the application.
]

145/4 2026/09/08 10:09 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 89282
							output: 610
							thoughts: 4038
						

Thoughts:
**Analysis of Unprivileged Access to Device Memory and Futex on ARM64**

Alright, let's break this down systematically. I've dissected the questions concerning unprivileged users, Device memory, and `futex` on ARM64. Here's what I've concluded, focusing on the key technical details and potential vulnerabilities.

**Part 1: Unprivileged Access to Device Memory**

The answer here is a resounding *yes*. Unprivileged users *can* map Device memory via DRM render nodes and potentially other unprivileged device nodes.

*   **DRM Render Nodes:** `/dev/dri/renderD<N>` nodes are specifically designed to grant unprivileged processes GPU access for rendering and compute. Standard Linux permissions, often managed by udev rules, give local users or members of the `render` / `video` group read/write access. This is the primary attack surface.

*   **Device Memory Attributes:** The critical piece is that DRM drivers, like those for etnaviv, omapdrm, AMD KFD, and others, *do* permit unprivileged users to allocate GPU buffer objects (GEM objects) with uncached or non-cached memory attributes. When these buffers are mapped into user space via `mmap`, the drivers use memory protection flags like `pgprot_noncached` or `pgprot_device` (for Device memory), or `pgprot_writecombine` (for Normal Non-Cacheable). On ARM64, `pgprot_noncached` and `pgprot_device` set the MAIR index for `MT_DEVICE_nGnRnE` or `MT_DEVICE_nGnRE`, respectively, while `pgprot_writecombine` maps to `MT_NORMAL_NC`.

    *   `pgprot_noncached` maps to `MT_DEVICE_nGnRnE`.
    *   `pgprot_writecombine` maps to `MT_NORMAL_NC`.
    *   `pgprot_device` maps to `MT_DEVICE_nGnRE`.

This means the user-space virtual mapping is *backed* by page tables that *do* have these Device memory attributes. This is the foundation of the problem.

**Part 2: Futex Operations on Device Memory**

The answer here is *potentially problematic*, leading to either a controlled error or a kernel panic, depending on the architecture and hardware configuration.

*   **Futex Mechanism:** The `futex` syscalls perform atomic operations on a user-provided memory address (`uaddr`). With process-private futexes (`FUTEX_PRIVATE_FLAG`), the kernel calls `get_futex_key()` which performs limited checks.  Critically, `get_futex_key()` *does not* validate page flags or check VMA flags (like `VM_IO` or `VM_PFNMAP`), nor does it pin pages with `get_user_pages()`.

*   **Atomic Operations in Kernel Mode:** When the `futex` syscall is executed (e.g., `FUTEX_WAKE_OP`, `FUTEX_LOCK_PI`, etc.), the kernel (running at EL1) executes atomic routines like `arch_futex_atomic_op_inuser()` or `futex_atomic_cmpxchg_inatomic()`. On ARM64, this translates to using exclusive load (`ldxr`) and store (`stlxr`) instructions.

*   **ARM64 Architectural Behavior:**  The ARMv8/v9 Architecture Reference Manual *explicitly* states that `LDXR`/`STXR` instructions on Device memory are *not permitted*. They should generate an "Alignment fault". This is because the exclusive monitor, which ensures atomic operations, only tracks coherent memory transactions, not Device memory.

*   **Fault Handling in the Kernel:**
    *   **Alignment Fault:** When the exclusive access occurs on Device memory, an alignment fault is triggered.  The kernel takes a data abort exception (`do_mem_abort()` -> `do_alignment_fault()`). *However*, the Linux kernel, thanks to an exception table (`_ASM_EXTABLE_UACCESS_ERR`) that's registered, intercepts this alignment fault. The `fixup_exception()` code converts this into a standard `-EFAULT` error, gracefully returning to the kernel/syscall and preventing a crash. The futex operation receives an error code (`-EFAULT`), and can handle it (retrying, or returning `-EFAULT` to user space). So, while undesirable, it doesn't crash the system.
    *   **Synchronous External Abort (SEA):**  Here's where it gets interesting.  If, instead of an alignment fault, the access to Device memory causes the *bus* to generate an error (e.g., AXI DEC


146/4 2026/09/08 10:09 tool set-results
0m Args:
map[Answer:### Summary of Findings

1. **Can an unprivileged user map Device memory (e.g., `pgprot_noncached` or `pgprot_writecombine`) via DRM render nodes or other unprivileged device nodes?**
   **Yes.** DRM render nodes (`/dev/dri/renderD*`) are explicitly designed to be accessible to unprivileged users without DRM master capabilities. Several DRM/GPU drivers (e.g., `etnaviv`, `omapdrm`, `panthor`, `amdkfd`) allow unprivileged clients to allocate buffers with uncached or writecombine flags and `mmap` them:
   - On ARM64, `pgprot_noncached` maps to `MT_DEVICE_nGnRnE` (Device memory).
   - `pgprot_device` maps to `MT_DEVICE_nGnRE` (Device memory).
   - `pgprot_writecombine` maps to `MT_NORMAL_NC` (Normal Non-Cacheable memory).

2. **Can they call `futex` on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (`ldxr`) on Device memory?**
   **No, not under standard architectural ARM64 semantics.**
   - Under the ARMv8/ARMv9 Architecture Reference Manual, executing exclusive load instructions (`LDXR`, `LDAXR`) or store exclusive instructions (`STXR`, `STLXR`) on **Device memory** (`MT_DEVICE_nGnRnE` or `MT_DEVICE_nGnRE`) generates an **Alignment fault** (Data Abort with DFSC = Alignment Fault) at the core level before reaching the bus.
   - When the kernel executes `ldxr` at EL1 (e.g. in `futex_atomic_cmpxchg_inatomic` or `arch_futex_atomic_op_inuser`), the alignment fault is routed to `do_alignment_fault()`, which invokes `fixup_exception()` via `_ASM_EXTABLE_UACCESS_ERR`. The kernel handles this gracefully and recovers by returning `-EFAULT`.
   - A **Synchronous External Abort (SEA)** would only occur if the underlying hardware bus/interconnect returns an external slave/decode error (e.g., AXI SLVERR/DECERR) or on non-compliant/misconfigured hardware. If an SEA *does* happen at EL1, `do_sea()` does not invoke `fixup_exception()` and will call `die()`, but architecturally `ldxr` on Device memory is trapped as an Alignment fault.
   - On **`pgprot_writecombine`** (`MT_NORMAL_NC`), exclusive accesses are architecturally permitted and handled by the global exclusive monitor without generating alignment faults.]

Results:
map[Answer:### Summary of Findings

1. **Can an unprivileged user map Device memory (e.g., `pgprot_noncached` or `pgprot_writecombine`) via DRM render nodes or other unprivileged device nodes?**
   **Yes.** DRM render nodes (`/dev/dri/renderD*`) are explicitly designed to be accessible to unprivileged users without DRM master capabilities. Several DRM/GPU drivers (e.g., `etnaviv`, `omapdrm`, `panthor`, `amdkfd`) allow unprivileged clients to allocate buffers with uncached or writecombine flags and `mmap` them:
   - On ARM64, `pgprot_noncached` maps to `MT_DEVICE_nGnRnE` (Device memory).
   - `pgprot_device` maps to `MT_DEVICE_nGnRE` (Device memory).
   - `pgprot_writecombine` maps to `MT_NORMAL_NC` (Normal Non-Cacheable memory).

2. **Can they call `futex` on that memory to trigger a Synchronous External Abort on ARM64 due to exclusive loads (`ldxr`) on Device memory?**
   **No, not under standard architectural ARM64 semantics.**
   - Under the ARMv8/ARMv9 Architecture Reference Manual, executing exclusive load instructions (`LDXR`, `LDAXR`) or store exclusive instructions (`STXR`, `STLXR`) on **Device memory** (`MT_DEVICE_nGnRnE` or `MT_DEVICE_nGnRE`) generates an **Alignment fault** (Data Abort with DFSC = Alignment Fault) at the core level before reaching the bus.
   - When the kernel executes `ldxr` at EL1 (e.g. in `futex_atomic_cmpxchg_inatomic` or `arch_futex_atomic_op_inuser`), the alignment fault is routed to `do_alignment_fault()`, which invokes `fixup_exception()` via `_ASM_EXTABLE_UACCESS_ERR`. The kernel handles this gracefully and recovers by returning `-EFAULT`.
   - A **Synchronous External Abort (SEA)** would only occur if the underlying hardware bus/interconnect returns an external slave/decode error (e.g., AXI SLVERR/DECERR) or on non-compliant/misconfigured hardware. If an SEA *does* happen at EL1, `do_sea()` does not invoke `fixup_exception()` and will call `die()`, but architecturally `ldxr` on Device memory is trapped as an Alignment fault.
   - On **`pgprot_writecombine`** (`MT_NORMAL_NC`), exclusive accesses are architecturally permitted and handled by the global exclusive monitor without generating alignment faults.]

147/2 2026/09/08 10:09 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26350
							output: 36
							thoughts: 890
						

Thoughts:
**Analyzing a Synchronous External Abort on ARM64 with PCIe**

Okay, so the code expert is right, `ldxr` on Device memory *can* cause an Alignment fault, and `fixup_exception()` should handle it via `_ASM_EXTABLE_UACCESS_ERR`. But this bug report shows something different: a Synchronous External Abort (SEA). Let's dig into this.

The bug report points to `__llsc_futex_cmpxchg`, which, according to the disassembly, has `ldxr w20, [x8]` as the trapping instruction. And the ESR is 0x96000010. Decoding this tells me it's a Data Abort, specifically a Synchronous External Abort. This is not the expected Alignment fault. Why?

I think I see it. The memory region is likely mapped as Normal Non-Cacheable (MT_NORMAL_NC). The key is exclusive accesses. The ARMv8 architecture *allows* exclusive accesses to this memory type. However, the PCIe controller isn't designed to handle exclusive read transactions directly (unless, maybe, atomic ops are involved, which isn't happening here). So, when the `ldxr` issues an exclusive read, the PCIe controller sees an exclusive access to PCIe space and throws back an error, either an AXI SLVERR or DECERR. The CPU receives this error and signals an SEA.

This makes sense because `pci_mmap_resource` likely uses `pgprot_noncached` or, more relevantly, `pgprot_writecombine`, which maps to `MT_NORMAL_NC`.  If it were `pgprot_noncached`, the MMU would trigger the alignment fault. But with `pgprot_writecombine`, the CPU *can* issue an exclusive read transaction, which becomes the problem. Since the PCIe controller rejects the exclusive read, we get a SEA instead of the expected Alignment fault. And because SEA isn't *always* handled by `fixup_exception()`, at least not for *this* situation, we're seeing a kernel panic.

Okay, so SEA *can* be handled by `fixup_exception()`, but not necessarily in this specific case. I need to check `do_sea()` in `arch/arm64/mm/fault.c` to understand if it's supposed to call `fixup_exception()` in all situations or if there's a filtering mechanism that prevents it. That's the next step.



148/2 2026/09/08 10:09 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:void do_sea\( PathPrefix:arch/arm64/mm/fault.c]

Results:
map[Output:]

149/2 2026/09/08 10:09 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27828
							output: 30
							thoughts: 19
						

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

**Kernel Symbol Hunt: `do_sea` in `arch/arm64/`**

Alright, time to dive in. My first thought is to zero in on `do_sea` and pinpoint its location within the `arch/arm64/` directory structure. This suggests a likely interaction with the ARM64 architecture, potentially related to a specific hardware feature or system call implementation. I'm operating under the assumption that it's a kernel symbol, likely a function or a macro, given the typical naming convention, but I'll need to verify that once I find it. I'm expecting `arch/arm64/` to contain the architecture-specific glue code, boot code, and core driver code. Based on the name 'do_sea' I might anticipate that it's related to some ARM64 platform. This search will be the starting point for a deeper dive.



150/2 2026/09/08 10:09 tool grepper
0m Args:
map[Expression:do_sea\( PathPrefix:arch/arm64/]

Results:
map[Output:arch/arm64/mm/fault.c=865=static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-869-
arch/arm64/mm/fault.c:870:static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
arch/arm64/mm/fault.c-871-{
]

151/2 2026/09/08 10:09 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28210
							output: 39
							thoughts: 23
						

Thoughts:
Here's my take on the process, framed as a first-person account suitable for a fellow expert:

**Diving into the Arm64 Fault Handler**

Alright, time to crack open the `do_sea` function, specifically the one tucked away in `arch/arm64/mm/fault.c`. I need to get a clear picture of how this thing handles memory faults on this architecture. I'm already anticipating some of the usual suspects – address translation issues, permissions errors, possibly even some page table walks in the code itself. I'll need to pay close attention to the context it's working in; is this in kernel space or user space? What registers are relevant here? The ARM64 architecture has its own nuances, so I'll be looking for any quirks or optimizations they've implemented. Let's see how they deal with the specific faulting address and how they map that into the virtual address space. I'm expecting some kind of lookup or walk in the page tables, perhaps with some sophisticated handling for things like speculative loads or software-managed translation lookaside buffers. The kernel folks have probably added some clever fault handling to this handler. I'll focus on how they figure out the cause of the fault, then what they do to fix it. Is it a straightforward page allocation, a signal to userspace, or something more complex? Alright, let's start digging and see what surprises this function has in store.



152/2 2026/09/08 10:09 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:860 LineCount:50]

Results:
map[Contents: 860:			return do_compat_alignment_fixup(far, regs);
 861:		do_bad_area(far, esr, regs);
 862:		return 0;
 863:	}
 864:	
 865:	static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
 866:	{
 867:		return 1; /* "fault" */
 868:	}
 869:	
 870:	static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
 871:	{
 872:		const struct fault_info *inf;
 873:		unsigned long siaddr;
 874:	
 875:		inf = esr_to_fault_info(esr);
 876:	
 877:		if (user_mode(regs) && apei_claim_sea(regs) == 0) {
 878:			/*
 879:			 * APEI claimed this as a firmware-first notification.
 880:			 * Some processing deferred to task_work before ret_to_user().
 881:			 */
 882:			return 0;
 883:		}
 884:	
 885:		if (esr & ESR_ELx_FnV) {
 886:			siaddr = 0;
 887:		} else {
 888:			/*
 889:			 * The architecture specifies that the tag bits of FAR_EL1 are
 890:			 * UNKNOWN for synchronous external aborts. Mask them out now
 891:			 * so that userspace doesn't see them.
 892:			 */
 893:			siaddr  = untagged_addr(far);
 894:		}
 895:		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 896:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 897:	
 898:		return 0;
 899:	}
 900:	
 901:	static int do_tag_check_fault(unsigned long far, unsigned long esr,
 902:				      struct pt_regs *regs)
 903:	{
 904:		/*
 905:		 * The architecture specifies that bits 63:60 of FAR_EL1 are UNKNOWN
 906:		 * for tag check faults. Set them to corresponding bits in the untagged
 907:		 * address if ARM64_MTE_FAR isn't supported.
 908:		 * Otherwise, bits 63:60 of FAR_EL1 are not UNKNOWN.
 909:		 */
]

153/2 2026/09/08 10:09 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29343
							output: 40
							thoughts: 82
						

Thoughts:
**Analyzing the Kernel Panic Pathway**

Okay, so `do_sea` is calling `arm64_notify_die`. Right, and if this happens within kernel mode, the expectation is a kernel panic. But hang on, before it panics, I recall `arm64_notify_die` having a check. It *should* verify kernel mode and then calls `die()`. Just to be absolutely sure and refresh my memory on the specific implementation, I need to double-check the source code for `arm64_notify_die`. Let me navigate to `arch/arm64/kernel/traps.c` and have a look at how that function is handling the situation. I need to understand the precise panic trigger and the conditional logic here.



154/2 2026/09/08 10:09 tool read-file
0m Args:
map[File:arch/arm64/kernel/traps.c FirstLine:190 LineCount:50]

Results:
map[Contents: 190:		print_modules();
 191:		show_regs(regs);
 192:	
 193:		if (user_mode(regs))
 194:			return ret;
 195:	
 196:		dump_kernel_instr(addr);
 197:	
 198:		return ret;
 199:	}
 200:	
 201:	static DEFINE_RAW_SPINLOCK(die_lock);
 202:	
 203:	/*
 204:	 * This function is protected against re-entrancy.
 205:	 */
 206:	void die(const char *str, struct pt_regs *regs, long err)
 207:	{
 208:		int ret;
 209:		unsigned long flags;
 210:	
 211:		raw_spin_lock_irqsave(&die_lock, flags);
 212:	
 213:		oops_enter();
 214:	
 215:		console_verbose();
 216:		bust_spinlocks(1);
 217:		ret = __die(str, err, regs);
 218:	
 219:		if (regs && kexec_should_crash(current))
 220:			crash_kexec(regs);
 221:	
 222:		bust_spinlocks(0);
 223:		add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
 224:		oops_exit();
 225:	
 226:		if (in_interrupt())
 227:			panic("%s: Fatal exception in interrupt", str);
 228:		if (panic_on_oops)
 229:			panic("%s: Fatal exception", str);
 230:	
 231:		raw_spin_unlock_irqrestore(&die_lock, flags);
 232:	
 233:		if (ret != NOTIFY_STOP)
 234:			make_task_dead(SIGSEGV);
 235:	}
 236:	
 237:	static void arm64_show_signal(int signo, const char *str)
 238:	{
 239:		static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
]

155/2 2026/09/08 10:09 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30280
							output: 41
							thoughts: 21
						

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

**Analyzing the Code Flow**

Okay, hold on a second. I remember seeing `arm64_notify_die` defined upstream. Let's trace this function call. I need to refresh my memory on what that particular handler does. I need to understand its role within the kernel's exception handling process, especially on ARM64. Is it a core function, a driver-specific hook, or something more specialized? I need to quickly recall its interaction with the other exception vectors and error handling routines to get the full picture. Let's dive back in and analyze the implementation.



156/2 2026/09/08 10:09 tool grepper
0m Args:
map[Expression:void arm64_notify_die\( PathPrefix:arch/arm64/kernel/traps.c]

Results:
map[Output:arch/arm64/kernel/traps.c=284=void arm64_force_sig_ptrace_errno_trap(int errno, unsigned long far,
--
arch/arm64/kernel/traps.c-290-
arch/arm64/kernel/traps.c:291:void arm64_notify_die(const char *str, struct pt_regs *regs,
arch/arm64/kernel/traps.c-292-		      int signo, int sicode, unsigned long far,
]

157/2 2026/09/08 10:09 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30625
							output: 40
							thoughts: 13
						

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

**Analyzing the `arm64_notify_die` Function**

Okay, let's dive into `arm64_notify_die`. I'm familiar with the general exception handling flow on ARM64, so I expect this function plays a crucial role in that process. I anticipate it's likely responsible for the last-chance notification of a fatal error that the kernel can't recover from, perhaps before a kernel panic or a controlled crash dump initiation. I'll need to look for how it's integrated with the exception vector tables, interrupt handlers, and any error reporting mechanisms, like the kdump infrastructure. What are the arguments it takes? Are they architecture-specific error codes and registers or more generic information wrapped in a structured way? I’ll need to understand how the function differentiates between different fatal errors, how it might handle nested exceptions, and whether it attempts any last-ditch effort at logging information before giving up. I also need to ascertain where it sits in the exception handling chain and what pre- or post-processing, if any, surrounds it. Given the name, I'm going to assume it's related to the "die" stage of an exception, where the kernel is effectively deadlocked or in an unrecoverable state. Any interaction with the MMU, especially within a critical section, will need careful examination.



158/2 2026/09/08 10:10 tool read-file
0m Args:
map[File:arch/arm64/kernel/traps.c FirstLine:291 LineCount:20]

Results:
map[Contents: 291:	void arm64_notify_die(const char *str, struct pt_regs *regs,
 292:			      int signo, int sicode, unsigned long far,
 293:			      unsigned long err)
 294:	{
 295:		if (user_mode(regs)) {
 296:			WARN_ON(regs != current_pt_regs());
 297:			current->thread.fault_address = 0;
 298:			current->thread.fault_code = err;
 299:	
 300:			arm64_force_sig_fault(signo, sicode, far, str);
 301:		} else {
 302:			die(str, regs, err);
 303:		}
 304:	}
 305:	
 306:	#ifdef CONFIG_COMPAT
 307:	#define PSTATE_IT_1_0_SHIFT	25
 308:	#define PSTATE_IT_1_0_MASK	(0x3 << PSTATE_IT_1_0_SHIFT)
 309:	#define PSTATE_IT_7_2_SHIFT	10
 310:	#define PSTATE_IT_7_2_MASK	(0x3f << PSTATE_IT_7_2_SHIFT)
]

159/2 2026/09/08 10:10 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 31339
							output: 111
							thoughts: 685
						

Thoughts:
**Analyzing a Potential Denial of Service Vulnerability**

Okay, so I'm looking at how `arm64_notify_die` handles exceptions in the kernel. My initial thought is that if an exception occurs in kernel mode, it calls `die(str, regs, err)`. That looks pretty standard. Now, `die()`'s behavior hinges on `panic_on_oops`. If it's *not* set, the task gets killed with `SIGSEGV` using `make_task_dead()`. If `panic_on_oops` *is* set, then the kernel will just panic(), right? `die()` also prints an oops and taints the kernel, so this is definitely a crash situation.

So, is this exploitable? No, not in the traditional sense. It doesn't look like a direct privilege escalation. It's more of a crash or kill. But wait... is it a Denial of Service (DoS)? Definitely. Killing a task is a DoS, and a panic is a full kernel DoS. But the question is, can this be triggered by an unprivileged user?

We've already established that mapping PCI BARs via sysfs is out because of permissions. But what about DRM render nodes? Could an unprivileged user, through a DRM render node, map memory as `pgprot_writecombine` and then trigger a SEA by calling `futex` on it?

Let's break this down. Does mapping memory via DRM and making it `pgprot_writecombine` cause an SEA when we do a `ldxr`? If the DRM driver maps memory as `pgprot_writecombine` (which is `MT_NORMAL_NC`), the CPU allows exclusive accesses. The critical point is, does the bus or the interconnect error on the GPU memory when the CPU does exclusive access? It depends on the SoC and the PCIe controller.

If the GPU is on PCIe, and the memory is VRAM, then PCIe doesn't support exclusive accesses. That means it might return an Unsupported Request (UR), which translates to a SEA. If the GPU is integrated and using system memory, exclusive accesses *might* work, or they might not, depending on the memory controller. But DRM drivers usually map system memory for render nodes, or they map VRAM. If they map VRAM, it's over PCIe.

Here's the key: Can an unprivileged user map VRAM? Yes, the `amdgpu` or `nouveau` drivers *allow* unprivileged users to allocate and map VRAM! So, they can map it as `pgprot_writecombine`. Then, if they call `futex` on that, the kernel does an `ldxr` on `MT_NORMAL_NC` memory, pointing to PCIe VRAM. The CPU issues an exclusive read to PCIe, which returns a UR. Boom, a SEA is raised. The kernel crashes or oopses.

Is this actually possible? My thinking is that it's highly plausible, and I want to verify this hypothesis with an independent expert opinion. I should really ask codeexpert if this `futex` call on writecombine-mapped DRM VRAM can actually trigger SEA on ARM64. That seems to be the critical check to confirm.



160/2 2026/09/08 10:10 tool codeexpert
3m Args:
map[Question:Can an unprivileged user allocate and mmap VRAM over PCIe (e.g., using amdgpu or nouveau DRM render nodes) on ARM64, and then call `futex` on that mapped memory? If the memory is mapped as `pgprot_writecombine` (MT_NORMAL_NC), will the `ldxr` instruction in the kernel's futex code cause a Synchronous External Abort (SEA) because PCIe does not support exclusive accesses?]

Results:
map[Answer:Yes, an unprivileged user can allocate and mmap VRAM over PCIe and call futex on it, and doing so will trigger a Synchronous External Abort (SEA) on ARM64 when the kernel executes `ldxr`, resulting in a kernel panic/crash.

### 1. Unprivileged Allocation and `mmap` of VRAM over PCIe
- **DRM Render Nodes (`/dev/dri/renderD*`):** DRM render nodes are specifically designed for unprivileged clients (such as user-space graphics, compute, and Vulkan/OpenGL drivers) to allocate GPU buffers without requiring root privileges or DRM master capabilities (`CAP_SYS_ADMIN`).
- **VRAM Allocation & Mapping:** Drivers like `amdgpu` and `nouveau` expose ioctls with `DRM_RENDER_ALLOW` (e.g., `DRM_IOCTL_AMDGPU_GEM_CREATE` with domain `AMDGPU_GEM_DOMAIN_VRAM`, `AMDGPU_GEM_MMAP`, `NOUVEAU_GEM_NEW`). An unprivileged user can create a GEM buffer residing in PCIe VRAM and obtain a mmap offset.
- **Page Protection (`pgprot_writecombine`):** In DRM/TTM (`ttm_prot_from_caching()`), VRAM allocations are mapped to user space using `pgprot_writecombine()`. On ARM64 (`arch/arm64/include/asm/pgtable.h`), `pgprot_writecombine()` sets the memory attribute to **`MT_NORMAL_NC`** (Normal Non-Cacheable) with `VM_IO | VM_PFNMAP`.

### 2. Calling `futex` on the Mapped Memory
- An unprivileged process can pass the mmapped VRAM pointer (`uaddr`) to the `futex` system call (e.g., `futex(uaddr, FUTEX_WAIT_PRIVATE, ...)` or `futex(uaddr, FUTEX_WAKE_OP_PRIVATE, ...)`).
- In `kernel/futex/core.c::get_futex_key()`:
  - For process-private futexes (`FUTEX_PRIVATE_FLAG`, which is the standard default), the kernel does **not** validate the VMA or call `get_user_pages()`.
  - It only validates alignment and `access_ok(uaddr, size)`, sets `key->private.mm = current->mm` and `key->private.address = address`, and returns `0` (success).
- The kernel then proceeds to perform user-space atomic read/modify/cmpxchg operations directly in kernel context (EL1) via `arch_futex_atomic_op_inuser()` or `futex_atomic_cmpxchg_inatomic()`.
- On ARM64 (`arch/arm64/include/asm/futex.h`), these operations execute atomic sequences using Load-Exclusive / Store-Exclusive instructions (`ldxr` and `stlxr` in `__llsc_futex_atomic_op` and `__llsc_futex_cmpxchg`).

### 3. Why `ldxr` Triggers a Synchronous External Abort (SEA) and Panics the Kernel
- **ARM Exclusive Monitors & Non-Cacheable Memory:**
  - On ARMv8/ARMv9 architectures, exclusive instructions (`LDXR`/`STXR`) on Cacheable memory are managed by the core's local exclusive monitor and cache coherency.
  - For **Normal Non-Cacheable** (`MT_NORMAL_NC`) and Device memory, the access bypasses local CPU caches and requires a **Global Exclusive Monitor** in the system memory interconnect.
  - When the ARM64 CPU executes `ldxr` on an address mapped as `MT_NORMAL_NC` backed by PCIe VRAM, it emits an exclusive read transaction (e.g., AXI `ARLOCK`) onto the system interconnect destined for the PCIe Root Complex / host bridge.
- **PCIe Lack of Exclusive Access Support:**
  - The PCI Express specification does not support AMBA/AXI exclusive lock transactions or global exclusive monitors.
  - When the PCIe host bridge / interconnect receives an exclusive read request destined for a PCIe BAR / VRAM slave that does not support exclusive accesses, the bridge responds with an error response (such as AXI `SLVERR` / `DECERR`).
- **Synchronous External Abort (SEA):**
  - Upon receiving the bus error response on `ldxr`, the ARM CPU generates a **Synchronous External Abort** (Data Abort with `ESR_ELx_FSC_EXTABT` or unsupported exclusive abort `ESR_ELx_FSC_EXCL_ATOMIC`).
- **Kernel Panic / Fatal Result:**
  - Since `ldxr` was executed in EL1 (kernel mode) in the futex routines, the abort is taken at `ESR_ELx_EC_DABT_CUR`.
  - In `arch/arm64/mm/fault.c`, `do_sea()` handles Synchronous External Aborts. Unlike page faults, `do_sea()` does **not** invoke the kernel's exception fixup tables (`_ASM_EXTABLE_UACCESS_ERR`).
  - Instead, `do_sea()` calls `arm64_notify_die()`, which checks `!user_mode(regs)` and immediately calls `die()` (kernel oops / panic).
  - (In contrast, executing `ldxr` directly in user space at EL0 causes `do_sea()` to deliver a `SIGBUS` to the user process rather than crashing the kernel).]

161/3 2026/09/08 10:10 agent codeexpert
3m Model:
core

Results:
map[Answer:Yes, an unprivileged user can allocate and mmap VRAM over PCIe and call futex on it, and doing so will trigger a Synchronous External Abort (SEA) on ARM64 when the kernel executes `ldxr`, resulting in a kernel panic/crash.

### 1. Unprivileged Allocation and `mmap` of VRAM over PCIe
- **DRM Render Nodes (`/dev/dri/renderD*`):** DRM render nodes are specifically designed for unprivileged clients (such as user-space graphics, compute, and Vulkan/OpenGL drivers) to allocate GPU buffers without requiring root privileges or DRM master capabilities (`CAP_SYS_ADMIN`).
- **VRAM Allocation & Mapping:** Drivers like `amdgpu` and `nouveau` expose ioctls with `DRM_RENDER_ALLOW` (e.g., `DRM_IOCTL_AMDGPU_GEM_CREATE` with domain `AMDGPU_GEM_DOMAIN_VRAM`, `AMDGPU_GEM_MMAP`, `NOUVEAU_GEM_NEW`). An unprivileged user can create a GEM buffer residing in PCIe VRAM and obtain a mmap offset.
- **Page Protection (`pgprot_writecombine`):** In DRM/TTM (`ttm_prot_from_caching()`), VRAM allocations are mapped to user space using `pgprot_writecombine()`. On ARM64 (`arch/arm64/include/asm/pgtable.h`), `pgprot_writecombine()` sets the memory attribute to **`MT_NORMAL_NC`** (Normal Non-Cacheable) with `VM_IO | VM_PFNMAP`.

### 2. Calling `futex` on the Mapped Memory
- An unprivileged process can pass the mmapped VRAM pointer (`uaddr`) to the `futex` system call (e.g., `futex(uaddr, FUTEX_WAIT_PRIVATE, ...)` or `futex(uaddr, FUTEX_WAKE_OP_PRIVATE, ...)`).
- In `kernel/futex/core.c::get_futex_key()`:
  - For process-private futexes (`FUTEX_PRIVATE_FLAG`, which is the standard default), the kernel does **not** validate the VMA or call `get_user_pages()`.
  - It only validates alignment and `access_ok(uaddr, size)`, sets `key->private.mm = current->mm` and `key->private.address = address`, and returns `0` (success).
- The kernel then proceeds to perform user-space atomic read/modify/cmpxchg operations directly in kernel context (EL1) via `arch_futex_atomic_op_inuser()` or `futex_atomic_cmpxchg_inatomic()`.
- On ARM64 (`arch/arm64/include/asm/futex.h`), these operations execute atomic sequences using Load-Exclusive / Store-Exclusive instructions (`ldxr` and `stlxr` in `__llsc_futex_atomic_op` and `__llsc_futex_cmpxchg`).

### 3. Why `ldxr` Triggers a Synchronous External Abort (SEA) and Panics the Kernel
- **ARM Exclusive Monitors & Non-Cacheable Memory:**
  - On ARMv8/ARMv9 architectures, exclusive instructions (`LDXR`/`STXR`) on Cacheable memory are managed by the core's local exclusive monitor and cache coherency.
  - For **Normal Non-Cacheable** (`MT_NORMAL_NC`) and Device memory, the access bypasses local CPU caches and requires a **Global Exclusive Monitor** in the system memory interconnect.
  - When the ARM64 CPU executes `ldxr` on an address mapped as `MT_NORMAL_NC` backed by PCIe VRAM, it emits an exclusive read transaction (e.g., AXI `ARLOCK`) onto the system interconnect destined for the PCIe Root Complex / host bridge.
- **PCIe Lack of Exclusive Access Support:**
  - The PCI Express specification does not support AMBA/AXI exclusive lock transactions or global exclusive monitors.
  - When the PCIe host bridge / interconnect receives an exclusive read request destined for a PCIe BAR / VRAM slave that does not support exclusive accesses, the bridge responds with an error response (such as AXI `SLVERR` / `DECERR`).
- **Synchronous External Abort (SEA):**
  - Upon receiving the bus error response on `ldxr`, the ARM CPU generates a **Synchronous External Abort** (Data Abort with `ESR_ELx_FSC_EXTABT` or unsupported exclusive abort `ESR_ELx_FSC_EXCL_ATOMIC`).
- **Kernel Panic / Fatal Result:**
  - Since `ldxr` was executed in EL1 (kernel mode) in the futex routines, the abort is taken at `ESR_ELx_EC_DABT_CUR`.
  - In `arch/arm64/mm/fault.c`, `do_sea()` handles Synchronous External Aborts. Unlike page faults, `do_sea()` does **not** invoke the kernel's exception fixup tables (`_ASM_EXTABLE_UACCESS_ERR`).
  - Instead, `do_sea()` calls `arm64_notify_die()`, which checks `!user_mode(regs)` and immediately calls `die()` (kernel oops / panic).
  - (In contrast, executing `ldxr` directly in user space at EL0 causes `do_sea()` to deliver a `SIGBUS` to the user process rather than crashing the kernel).]

Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Use tools extensively while researching the question. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code.
Use all available sources of information:
 - kernel source code
 - documentation in the Documentation dir in the source tree
 - git commits descriptions, git blame

Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.

Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
   or codesearch-struct-layout FIRST to retrieve clean, exact definitions
   without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
   disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
   non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.
Do NOT use git-log to search for the presence or existence of files in the
repository. git-log is only for tracing commit history of files that are
already present in the current checkout. If a file does not exist in the
current checkout, it cannot be used for reproduction.

Avoid running broad git-log queries (such as searches on the entire repo)
without a specific 'PathPrefix' to restrict the scope, as these are very
expensive and will time out.
If a git-log tool call times out, do not retry the query with the same broad
scope. You must specify a tighter, narrower 'PathPrefix' for subsequent queries.

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:
Can an unprivileged user allocate and mmap VRAM over PCIe (e.g., using amdgpu or nouveau DRM render nodes) on ARM64, and then call `futex` on that mapped memory? If the memory is mapped as `pgprot_writecombine` (MT_NORMAL_NC), will the `ldxr` instruction in the kernel's futex code cause a Synchronous External Abort (SEA) because PCIe does not support exclusive accesses?

162/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 4054
							output: 27
							thoughts: 967
						

Thoughts:
**Analyzing the Potential for Futex Issues with VRAM on ARM64**

Alright, let's dissect this question meticulously. The core of it boils down to whether an unprivileged user can safely allocate and use VRAM, mapped over PCIe, with `futex` on an ARM64 system. Specifically, the concern is the interaction of `ldxr` (exclusive load/store) instructions used within the kernel's `futex` implementation with memory mapped as `pgprot_writecombine` (which translates to `MT_NORMAL_NC`) – and whether that might trigger a Synchronous External Abort (SEA) due to PCIe's behavior.

First, let's break this into manageable parts. Can an unprivileged user even *access* this VRAM? My understanding of DRM render nodes is that they *are* usually accessible to unprivileged users, often through the `render` or `video` group, or potentially even world-accessible depending on the configuration (or logind ACL). So, accessing the device itself seems feasible, without needing DRM master or root privileges.

Next, can we allocate and map VRAM? Unprivileged render clients, from my experience, *can* allocate GEM buffers within VRAM using the relevant drivers (amdgpu, nouveau, etc.) and then mmap them. That seems correct. However, what *type* of `pgprot` is used when mapping this VRAM is critical. Is it `pgprot_writecombine`, `MT_NORMAL_NC`, or something else, like `pgprot_noncached`? I need to delve into the amdgpu, nouveau, and general DRM mmap code, as well as the TTM (Translation Table Manager) library, to confirm which memory type is employed when mapping VRAM on ARM64. That is an area to investigate.

Now, the crucial question: what happens when `futex` is called on that mapped VRAM? This is where the potential for problems surfaces. My instinct is that `futex` *should* use memory primitives that are safe to access, but let's dive into the kernel implementation. We'll need to trace the `futex` code path. I will start with `futex_wait`, move through `get_futex_key`, `futex_atomic_cmpxchg_inatomic`, `arch_futex_atomic_op_inuser`, `futex_atomic_read_inatomic`, etc., on ARM64. Specifically, I need to know *exactly* what instructions are used for atomic operations like atomic compare-and-swap (cmpxchg) and atomic reads. Are we talking `ldxr`/`stxr` (exclusive load/store), `casa`, or `get_user`?

This is where my concerns lie. I need to know about the interaction of `ldxr` / `stxr` with `MT_NORMAL_NC`, or any kind of device memory on ARM64. We are talking about memory that is backed by PCIe, not normal RAM. Does `get_futex_key` use `pin_user_pages`, `get_user_pages` or `get_user`? Does `get_futex_key` work on VRAM memory regions that use `VM_IO` or `VM_PFNMAP`? I will need to check what `get_futex_key` does with respect to VRAM mappings and if it validates that the VMA doesn't have `(VM_IO | VM_PFNMAP)` or if `pin_user_pages`, `follow_page` or `fixup_user_fault` fail or return `-EFAULT`/`-EINVAL`. I have to confirm what is happening in `futex_atomic_cmpxchg_inatomic` or `futex_atomic_read_inatomic` or `arch_futex_atomic_op_inuser`!

Furthermore, I have to know the ARM64 architecture specifications. What does the ARM ARM (Architecture Reference Manual) say about `ldxr`/`stxr` on `Normal Non-Cacheable` (MT_NORMAL_NC) or Device memory? What is the hardware's behavior, and how is it reflected in the kernel? I am thinking that PCIe does not support exclusive accesses, but is that handled at the hardware or the kernel level?

To get definitive answers, I'll need to use our search tools. I will start by searching the kernel code itself, looking in `kernel/futex/` and `arch/arm64/include/asm/futex.h`, or wherever the current `futex` code resides. I'll need to go through relevant git commits, look for documentation, and any other relevant discussions on ARM64 architecture handling related to exclusive loads/stores and device memory. This


163/4 2026/09/08 10:10 tool grepper
0m Args:
map[Expression:futex PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/Kconfig=1894=config SWP_EMULATION
--
arch/arm64/Kconfig-1902-
arch/arm64/Kconfig:1903:	  In some older versions of glibc [<=2.8] SWP is used during futex
arch/arm64/Kconfig-1904-	  trylock() operations with the assumption that the code will not
--
arch/arm64/include/asm/futex.h-7-
arch/arm64/include/asm/futex.h:8:#include <linux/futex.h>
arch/arm64/include/asm/futex.h-9-#include <linux/uaccess.h>
--
arch/arm64/include/asm/futex.h=17=static __always_inline int						\
arch/arm64/include/asm/futex.h:18:__llsc_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
arch/arm64/include/asm/futex.h-19-{									\
--
arch/arm64/include/asm/futex.h-23-	uaccess_enable_privileged();					\
arch/arm64/include/asm/futex.h:24:	asm volatile("// __llsc_futex_atomic_" #op "\n"			\
arch/arm64/include/asm/futex.h-25-"	prfm	pstl1strm, %[uaddr]\n"					\
--
arch/arm64/include/asm/futex.h=56=static __always_inline int
arch/arm64/include/asm/futex.h:57:__llsc_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
arch/arm64/include/asm/futex.h-58-{
--
arch/arm64/include/asm/futex.h-63-	uaccess_enable_privileged();
arch/arm64/include/asm/futex.h:64:	asm volatile("//__llsc_futex_cmpxchg\n"
arch/arm64/include/asm/futex.h-65-"	prfm	pstl1strm, %[uaddr]\n"
--
arch/arm64/include/asm/futex.h=101=static __always_inline int						\
arch/arm64/include/asm/futex.h:102:__lsui_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
arch/arm64/include/asm/futex.h-103-{									\
--
arch/arm64/include/asm/futex.h-108-									\
arch/arm64/include/asm/futex.h:109:	asm volatile("// __lsui_futex_atomic_" #op "\n"			\
arch/arm64/include/asm/futex.h-110-	__LSUI_PREAMBLE							\
--
arch/arm64/include/asm/futex.h=154=__lsui_cmpxchg32(u32 __user *uaddr, u32 *oldval, u32 newval)
--
arch/arm64/include/asm/futex.h-156-	u64 __user *uaddr64;
arch/arm64/include/asm/futex.h:157:	bool futex_pos, other_pos;
arch/arm64/include/asm/futex.h-158-	union {
arch/arm64/include/asm/futex.h:159:		u32 futex[2];
arch/arm64/include/asm/futex.h-160-		u64 raw;
--
arch/arm64/include/asm/futex.h-163-	uaddr64 = (u64 __user *)PTR_ALIGN_DOWN(uaddr, sizeof(u64));
arch/arm64/include/asm/futex.h:164:	futex_pos = !IS_ALIGNED((unsigned long)uaddr, sizeof(u64));
arch/arm64/include/asm/futex.h:165:	other_pos = !futex_pos;
arch/arm64/include/asm/futex.h-166-
arch/arm64/include/asm/futex.h:167:	orig64.futex[futex_pos] = *oldval;
arch/arm64/include/asm/futex.h:168:	if (get_user(orig64.futex[other_pos], (u32 __user *)uaddr64 + other_pos))
arch/arm64/include/asm/futex.h-169-		return -EFAULT;
--
arch/arm64/include/asm/futex.h-171-	nval64 = oval64 = orig64;
arch/arm64/include/asm/futex.h:172:	nval64.futex[futex_pos] = newval;
arch/arm64/include/asm/futex.h-173-
--
arch/arm64/include/asm/futex.h-176-
arch/arm64/include/asm/futex.h:177:	*oldval = oval64.futex[futex_pos];
arch/arm64/include/asm/futex.h-178-	return oval64.raw == orig64.raw ? 0 : -EAGAIN;
--
arch/arm64/include/asm/futex.h=181=static __always_inline int
arch/arm64/include/asm/futex.h:182:__lsui_futex_atomic_and(int oparg, u32 __user *uaddr, int *oval)
arch/arm64/include/asm/futex.h-183-{
--
arch/arm64/include/asm/futex.h-185-	 * Undo the bitwise negation applied to the oparg passed from
arch/arm64/include/asm/futex.h:186:	 * arch_futex_atomic_op_inuser() with FUTEX_OP_ANDN.
arch/arm64/include/asm/futex.h-187-	 */
arch/arm64/include/asm/futex.h:188:	return __lsui_futex_atomic_andnot(~oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-189-}
--
arch/arm64/include/asm/futex.h=191=static __always_inline int
arch/arm64/include/asm/futex.h:192:__lsui_futex_atomic_eor(int oparg, u32 __user *uaddr, int *oval)
arch/arm64/include/asm/futex.h-193-{
--
arch/arm64/include/asm/futex.h=215=static __always_inline int
arch/arm64/include/asm/futex.h:216:__lsui_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
arch/arm64/include/asm/futex.h-217-{
--
arch/arm64/include/asm/futex.h=232=static __always_inline int						\
arch/arm64/include/asm/futex.h:233:__futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)		\
arch/arm64/include/asm/futex.h-234-{									\
arch/arm64/include/asm/futex.h:235:	return __lsui_llsc_body(futex_atomic_##op, oparg, uaddr, oval);	\
arch/arm64/include/asm/futex.h-236-}
--
arch/arm64/include/asm/futex.h=244=static __always_inline int
arch/arm64/include/asm/futex.h:245:__futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
arch/arm64/include/asm/futex.h-246-{
arch/arm64/include/asm/futex.h:247:	return __lsui_llsc_body(futex_cmpxchg, uaddr, oldval, newval, oval);
arch/arm64/include/asm/futex.h-248-}
--
arch/arm64/include/asm/futex.h=250=static inline int
arch/arm64/include/asm/futex.h:251:arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr)
arch/arm64/include/asm/futex.h-252-{
--
arch/arm64/include/asm/futex.h-262-	case FUTEX_OP_SET:
arch/arm64/include/asm/futex.h:263:		ret = __futex_atomic_set(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-264-		break;
arch/arm64/include/asm/futex.h-265-	case FUTEX_OP_ADD:
arch/arm64/include/asm/futex.h:266:		ret = __futex_atomic_add(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-267-		break;
arch/arm64/include/asm/futex.h-268-	case FUTEX_OP_OR:
arch/arm64/include/asm/futex.h:269:		ret = __futex_atomic_or(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-270-		break;
arch/arm64/include/asm/futex.h-271-	case FUTEX_OP_ANDN:
arch/arm64/include/asm/futex.h:272:		ret = __futex_atomic_and(~oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-273-		break;
arch/arm64/include/asm/futex.h-274-	case FUTEX_OP_XOR:
arch/arm64/include/asm/futex.h:275:		ret = __futex_atomic_eor(oparg, uaddr, oval);
arch/arm64/include/asm/futex.h-276-		break;
--
arch/arm64/include/asm/futex.h=284=static inline int
arch/arm64/include/asm/futex.h:285:futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *_uaddr,
arch/arm64/include/asm/futex.h-286-			      u32 oldval, u32 newval)
--
arch/arm64/include/asm/futex.h-294-
arch/arm64/include/asm/futex.h:295:	return __futex_cmpxchg(uaddr, oldval, newval, uval);
arch/arm64/include/asm/futex.h-296-}
--
arch/arm64/include/asm/mte-kasan.h=28=static inline bool system_uses_mte_async_or_asymm_mode(void)
--
arch/arm64/include/asm/mte-kasan.h-43- * TCF0.
arch/arm64/include/asm/mte-kasan.h:44: * However futex.h code uses exclusives which would be executed as
arch/arm64/include/asm/mte-kasan.h-45- * EL1, this can potentially cause a tag check fault even if the
--
arch/arm64/tools/syscall_32.tbl-254-239	common	sendfile64		sys_sendfile64
arch/arm64/tools/syscall_32.tbl:255:240	common	futex			sys_futex_time32
arch/arm64/tools/syscall_32.tbl-256-241	common	sched_setaffinity	sys_sched_setaffinity	compat_sys_sched_setaffinity
--
arch/arm64/tools/syscall_32.tbl-435-421	common	rt_sigtimedwait_time64		sys_rt_sigtimedwait		compat_sys_rt_sigtimedwait_time64
arch/arm64/tools/syscall_32.tbl:436:422	common	futex_time64			sys_futex
arch/arm64/tools/syscall_32.tbl-437-423	common	sched_rr_get_interval_time64	sys_sched_rr_get_interval
--
arch/arm64/tools/syscall_32.tbl-462-448	common	process_mrelease		sys_process_mrelease
arch/arm64/tools/syscall_32.tbl:463:449	common	futex_waitv			sys_futex_waitv
arch/arm64/tools/syscall_32.tbl-464-450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
--
arch/arm64/tools/syscall_32.tbl-467-453	common	map_shadow_stack		sys_map_shadow_stack
arch/arm64/tools/syscall_32.tbl:468:454	common	futex_wake			sys_futex_wake
arch/arm64/tools/syscall_32.tbl:469:455	common	futex_wait			sys_futex_wait
arch/arm64/tools/syscall_32.tbl:470:456	common	futex_requeue			sys_futex_requeue
arch/arm64/tools/syscall_32.tbl-471-457	common	statmount			sys_statmount
]

164/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 9807
							output: 41
							thoughts: 27
						

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

**Diving into ARM64 Futex Implementation**

Okay, time to get my hands dirty. I need to understand the specifics of how the futex implementation is handled on ARM64. The most direct path to that knowledge is the header file, so I'm heading straight for `arch/arm64/include/asm/futex.h`. I'm expecting to find the key atomic instructions and memory barriers that are fundamental to any futex implementation. I want to see what's being used for things like comparing and swapping values (CAS), and how the kernel ensures the necessary ordering of memory operations to guarantee thread safety. This is where the magic happens, so let's dig in and see the details. I'm particularly curious to see if they're leveraging the hardware's atomics instructions directly or using some clever software emulation or optimization.



165/4 2026/09/08 10:10 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	/* SPDX-License-Identifier: GPL-2.0-only */
   2:	/*
   3:	 * Copyright (C) 2012 ARM Ltd.
   4:	 */
   5:	#ifndef __ASM_FUTEX_H
   6:	#define __ASM_FUTEX_H
   7:	
   8:	#include <linux/futex.h>
   9:	#include <linux/uaccess.h>
  10:	
  11:	#include <asm/errno.h>
  12:	#include <asm/lsui.h>
  13:	
  14:	#define FUTEX_MAX_LOOPS	128 /* What's the largest number you can think of? */
  15:	
  16:	#define LLSC_FUTEX_ATOMIC_OP(op, insn)					\
  17:	static __always_inline int						\
  18:	__llsc_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
  19:	{									\
  20:		unsigned int loops = FUTEX_MAX_LOOPS;				\
  21:		int ret, oldval, newval;					\
  22:										\
  23:		uaccess_enable_privileged();					\
  24:		asm volatile("// __llsc_futex_atomic_" #op "\n"			\
  25:	"	prfm	pstl1strm, %[uaddr]\n"					\
  26:	"1:	ldxr	%w[oldval], %[uaddr]\n"					\
  27:		insn "\n"							\
  28:	"2:	stlxr	%w[ret], %w[newval], %[uaddr]\n"			\
  29:	"	cbz	%w[ret], 3f\n"						\
  30:	"	sub	%w[loops], %w[loops], %w[ret]\n"			\
  31:	"	cbnz	%w[loops], 1b\n"					\
  32:	"	mov	%w[ret], %w[err]\n"					\
  33:	"3:\n"									\
  34:	"	dmb	ish\n"							\
  35:		_ASM_EXTABLE_UACCESS_ERR(1b, 3b, %w[ret])			\
  36:		_ASM_EXTABLE_UACCESS_ERR(2b, 3b, %w[ret])			\
  37:		: [ret] "=&r" (ret), [oldval] "=&r" (oldval),			\
  38:		  [uaddr] "+Q" (*uaddr), [newval] "=&r" (newval),		\
  39:		  [loops] "+r" (loops)						\
  40:		: [oparg] "r" (oparg), [err] "Ir" (-EAGAIN)			\
  41:		: "memory");							\
  42:		uaccess_disable_privileged();					\
  43:										\
  44:		if (!ret)							\
  45:			*oval = oldval;						\
  46:										\
  47:		return ret;							\
  48:	}
  49:	
  50:	LLSC_FUTEX_ATOMIC_OP(add, "add	%w[newval], %w[oldval], %w[oparg]")
  51:	LLSC_FUTEX_ATOMIC_OP(or,  "orr	%w[newval], %w[oldval], %w[oparg]")
  52:	LLSC_FUTEX_ATOMIC_OP(and, "and	%w[newval], %w[oldval], %w[oparg]")
  53:	LLSC_FUTEX_ATOMIC_OP(eor, "eor	%w[newval], %w[oldval], %w[oparg]")
  54:	LLSC_FUTEX_ATOMIC_OP(set, "mov	%w[newval], %w[oparg]")
  55:	
  56:	static __always_inline int
  57:	__llsc_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
  58:	{
  59:		int ret = 0;
  60:		unsigned int loops = FUTEX_MAX_LOOPS;
  61:		u32 val, tmp;
  62:	
  63:		uaccess_enable_privileged();
  64:		asm volatile("//__llsc_futex_cmpxchg\n"
  65:	"	prfm	pstl1strm, %[uaddr]\n"
  66:	"1:	ldxr	%w[curval], %[uaddr]\n"
  67:	"	eor	%w[tmp], %w[curval], %w[oldval]\n"
  68:	"	cbnz	%w[tmp], 4f\n"
  69:	"2:	stlxr	%w[tmp], %w[newval], %[uaddr]\n"
  70:	"	cbz	%w[tmp], 3f\n"
  71:	"	sub	%w[loops], %w[loops], %w[tmp]\n"
  72:	"	cbnz	%w[loops], 1b\n"
  73:	"	mov	%w[ret], %w[err]\n"
  74:	"3:\n"
  75:	"	dmb	ish\n"
  76:	"4:\n"
  77:		_ASM_EXTABLE_UACCESS_ERR(1b, 4b, %w[ret])
  78:		_ASM_EXTABLE_UACCESS_ERR(2b, 4b, %w[ret])
  79:		: [ret] "+r" (ret), [curval] "=&r" (val),
  80:		  [uaddr] "+Q" (*uaddr), [tmp] "=&r" (tmp),
  81:		  [loops] "+r" (loops)
  82:		: [oldval] "r" (oldval), [newval] "r" (newval),
  83:		  [err] "Ir" (-EAGAIN)
  84:		: "memory");
  85:		uaccess_disable_privileged();
  86:	
  87:		if (!ret)
  88:			*oval = val;
  89:	
  90:		return ret;
  91:	}
  92:	
  93:	#ifdef CONFIG_ARM64_LSUI
  94:	
  95:	/*
  96:	 * Wrap LSUI instructions with uaccess_ttbr0_enable()/disable(), as
  97:	 * PAN toggling is not required.
  98:	 */
  99:	
 100:	#define LSUI_FUTEX_ATOMIC_OP(op, asm_op)				\
]

166/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 11931
							output: 43
							thoughts: 24
						

Thoughts:
Okay, here's my attempt at summarizing the thought process, as if I were considering the provided text, assuming I'm an expert in the field:

**Diving into futex.h on ARM64**

Alright, I'm thinking, let's not just stop at a cursory glance. I need to get a solid grasp of how futexes are implemented on ARM64, and the `arch/arm64/include/asm/futex.h` file is obviously key. It's the architecture-specific header, so it's going to hold all the crucial low-level details for atomic operations, memory barriers, and the interaction with the hardware. I need to understand how the standard futex operations translate down to the instructions. I know this file holds a lot of fundamental building blocks for synchronization on this architecture. I'm especially interested in things like the atomic compare-and-swap (CAS) implementations, how they handle wait queues, and whether there are any ARM64-specific optimizations or considerations present. I'm mentally preparing to dig into the nuances of memory ordering, potentially encountering things like load-acquire and store-release semantics. I want to see if any specific ARM64 features are being leveraged to optimize futex performance, especially when considering the recent changes to the memory subsystem or the introduction of new atomic instructions. This is essential for understanding the overall performance characteristics of multithreaded applications running on this architecture.



167/4 2026/09/08 10:10 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:101 LineCount:100]

Results:
map[Contents: 101:	static __always_inline int						\
 102:	__lsui_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
 103:	{									\
 104:		int ret = 0;							\
 105:		int oldval;							\
 106:										\
 107:		uaccess_ttbr0_enable();						\
 108:										\
 109:		asm volatile("// __lsui_futex_atomic_" #op "\n"			\
 110:		__LSUI_PREAMBLE							\
 111:	"1:	" #asm_op "al	%w[oparg], %w[oldval], %[uaddr]\n"		\
 112:	"2:\n"									\
 113:		_ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w[ret])			\
 114:		: [ret] "+r" (ret), [uaddr] "+Q" (*uaddr),			\
 115:		  [oldval] "=r" (oldval)					\
 116:		: [oparg] "r" (oparg)						\
 117:		: "memory");							\
 118:										\
 119:		uaccess_ttbr0_disable();					\
 120:										\
 121:		if (!ret)							\
 122:			*oval = oldval;						\
 123:		return ret;							\
 124:	}
 125:	
 126:	LSUI_FUTEX_ATOMIC_OP(add, ldtadd)
 127:	LSUI_FUTEX_ATOMIC_OP(or, ldtset)
 128:	LSUI_FUTEX_ATOMIC_OP(andnot, ldtclr)
 129:	LSUI_FUTEX_ATOMIC_OP(set, swpt)
 130:	
 131:	static __always_inline int
 132:	__lsui_cmpxchg64(u64 __user *uaddr, u64 *oldval, u64 newval)
 133:	{
 134:		int ret = 0;
 135:	
 136:		uaccess_ttbr0_enable();
 137:	
 138:		asm volatile("// __lsui_cmpxchg64\n"
 139:		__LSUI_PREAMBLE
 140:	"1:	casalt	%[oldval], %[newval], %[uaddr]\n"
 141:	"2:\n"
 142:		_ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w[ret])
 143:		: [ret] "+r" (ret), [uaddr] "+Q" (*uaddr),
 144:		  [oldval] "+r" (*oldval)
 145:		: [newval] "r" (newval)
 146:		: "memory");
 147:	
 148:		uaccess_ttbr0_disable();
 149:	
 150:		return ret;
 151:	}
 152:	
 153:	static __always_inline int
 154:	__lsui_cmpxchg32(u32 __user *uaddr, u32 *oldval, u32 newval)
 155:	{
 156:		u64 __user *uaddr64;
 157:		bool futex_pos, other_pos;
 158:		union {
 159:			u32 futex[2];
 160:			u64 raw;
 161:		} orig64, oval64, nval64;
 162:	
 163:		uaddr64 = (u64 __user *)PTR_ALIGN_DOWN(uaddr, sizeof(u64));
 164:		futex_pos = !IS_ALIGNED((unsigned long)uaddr, sizeof(u64));
 165:		other_pos = !futex_pos;
 166:	
 167:		orig64.futex[futex_pos] = *oldval;
 168:		if (get_user(orig64.futex[other_pos], (u32 __user *)uaddr64 + other_pos))
 169:			return -EFAULT;
 170:	
 171:		nval64 = oval64 = orig64;
 172:		nval64.futex[futex_pos] = newval;
 173:	
 174:		if (__lsui_cmpxchg64(uaddr64, &oval64.raw, nval64.raw))
 175:			return -EFAULT;
 176:	
 177:		*oldval = oval64.futex[futex_pos];
 178:		return oval64.raw == orig64.raw ? 0 : -EAGAIN;
 179:	}
 180:	
 181:	static __always_inline int
 182:	__lsui_futex_atomic_and(int oparg, u32 __user *uaddr, int *oval)
 183:	{
 184:		/*
 185:		 * Undo the bitwise negation applied to the oparg passed from
 186:		 * arch_futex_atomic_op_inuser() with FUTEX_OP_ANDN.
 187:		 */
 188:		return __lsui_futex_atomic_andnot(~oparg, uaddr, oval);
 189:	}
 190:	
 191:	static __always_inline int
 192:	__lsui_futex_atomic_eor(int oparg, u32 __user *uaddr, int *oval)
 193:	{
 194:		u32 oldval, newval;
 195:		int ret, i;
 196:	
 197:		if (get_user(oldval, uaddr))
 198:			return -EFAULT;
 199:	
 200:		/*
]

168/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 13999
							output: 43
							thoughts: 30
						

Thoughts:
Okay, let's dive into this. Here's my take on those lines of code:

**Analyzing `arch/arm64/include/asm/futex.h` (Lines 200-296)**

Alright, time to get into the nitty-gritty of the ARM64 futex implementation. I need to refresh my memory on the specifics of this section of `futex.h`. Let's see... lines 200 through 296. Right, this is where they're defining the architecture-specific data structures and functions that are core to futex operations on this platform. My expectation is this part will probably contain the low-level, assembly-related operations like atomic memory accesses and maybe some platform-specific optimizations for how futexes handle waiting and waking up processes. I'm especially keen to see how they're handling spinlocks and any interrupt-related considerations, because ARM64 can get quite interesting in those areas. I'll need to pay close attention to the memory ordering semantics – critical for concurrency – and how they're ensuring atomicity. Are they relying solely on hardware instructions, or are there any software fallbacks? The efficiency of the `futex` code will be paramount here, as it's the core of synchronization operations. Let's see if the code includes any clever tricks related to cache coherency and memory barriers to minimize contention. This is all standard stuff, of course, but it's important to refresh my knowledge of the specific details for the ARM64 architecture, especially since there are always subtle platform-specific behaviors. I'm expecting to see definitions related to futex wait queues and probably some macros for manipulating the futex word in memory. Let's get to it.



169/4 2026/09/08 10:10 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:200 LineCount:100]

Results:
map[Contents: 200:		/*
 201:		 * there are no ldteor/stteor instructions...
 202:		 */
 203:		for (i = 0; i < FUTEX_MAX_LOOPS; i++) {
 204:			newval = oldval ^ oparg;
 205:	
 206:			ret = __lsui_cmpxchg32(uaddr, &oldval, newval);
 207:			if (ret != -EAGAIN)
 208:				break;
 209:		}
 210:	
 211:		*oval = oldval;
 212:		return ret;
 213:	}
 214:	
 215:	static __always_inline int
 216:	__lsui_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
 217:	{
 218:		u32 curval = oldval;
 219:		int ret;
 220:	
 221:		ret = __lsui_cmpxchg32(uaddr, &curval, newval);
 222:		if (ret == -EAGAIN && curval != oldval)
 223:			ret = 0;
 224:	
 225:		*oval = curval;
 226:		return ret;
 227:	}
 228:	#endif	/* CONFIG_ARM64_LSUI */
 229:	
 230:	
 231:	#define FUTEX_ATOMIC_OP(op)						\
 232:	static __always_inline int						\
 233:	__futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)		\
 234:	{									\
 235:		return __lsui_llsc_body(futex_atomic_##op, oparg, uaddr, oval);	\
 236:	}
 237:	
 238:	FUTEX_ATOMIC_OP(add)
 239:	FUTEX_ATOMIC_OP(or)
 240:	FUTEX_ATOMIC_OP(and)
 241:	FUTEX_ATOMIC_OP(eor)
 242:	FUTEX_ATOMIC_OP(set)
 243:	
 244:	static __always_inline int
 245:	__futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
 246:	{
 247:		return __lsui_llsc_body(futex_cmpxchg, uaddr, oldval, newval, oval);
 248:	}
 249:	
 250:	static inline int
 251:	arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr)
 252:	{
 253:		int ret;
 254:		u32 __user *uaddr;
 255:	
 256:		if (!access_ok(_uaddr, sizeof(u32)))
 257:			return -EFAULT;
 258:	
 259:		uaddr = __uaccess_mask_ptr(_uaddr);
 260:	
 261:		switch (op) {
 262:		case FUTEX_OP_SET:
 263:			ret = __futex_atomic_set(oparg, uaddr, oval);
 264:			break;
 265:		case FUTEX_OP_ADD:
 266:			ret = __futex_atomic_add(oparg, uaddr, oval);
 267:			break;
 268:		case FUTEX_OP_OR:
 269:			ret = __futex_atomic_or(oparg, uaddr, oval);
 270:			break;
 271:		case FUTEX_OP_ANDN:
 272:			ret = __futex_atomic_and(~oparg, uaddr, oval);
 273:			break;
 274:		case FUTEX_OP_XOR:
 275:			ret = __futex_atomic_eor(oparg, uaddr, oval);
 276:			break;
 277:		default:
 278:			ret = -ENOSYS;
 279:		}
 280:	
 281:		return ret;
 282:	}
 283:	
 284:	static inline int
 285:	futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *_uaddr,
 286:				      u32 oldval, u32 newval)
 287:	{
 288:		u32 __user *uaddr;
 289:	
 290:		if (!access_ok(_uaddr, sizeof(u32)))
 291:			return -EFAULT;
 292:	
 293:		uaddr = __uaccess_mask_ptr(_uaddr);
 294:	
 295:		return __futex_cmpxchg(uaddr, oldval, newval, uval);
 296:	}
 297:	
 298:	#endif /* __ASM_FUTEX_H */
]

170/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 15942
							output: 44
							thoughts: 475
						

Thoughts:
**Deep Dive into ARM64 Exclusive Accesses and Futexes**

Okay, so I'm looking at these low-level futex implementations, specifically `__llsc_futex_atomic_op` and `__llsc_futex_cmpxchg`, and right away, those `ldxr` and `stlxr` instructions jump out at me. I'm seeing those `_ASM_EXTABLE_UACCESS_ERR` macros too, sprinkled around, especially on lines 35, 36, 77, and 78. That's a classic sign of handling potential issues, but I need to understand *why* they're there.

My immediate questions are: What happens on ARM64 when I execute `ldxr` or `stxr` on memory that's *not* cacheable, or that's write-combine? That's the critical point. I need to refresh myself on what the ARM architecture reference manual says about exclusive load/store instructions (LDXR, STXR, LDAXR, STLXR) operating on Normal Non-Cacheable and Device memory regions.

And then, I have to think about the system-level effects. What does the PCIe bus do when it sees these exclusive accesses? How do the bus transactions get handled? What kind of errors or responses are possible? This connects to the larger question of how the ARM64 Linux kernel deals with an external abort. How does that interrupt flow play out, and what specifically happens within the `futex` code when it's operating on, say, VRAM? I need to track down *every* detail.

Now, let's broaden the search. I need to find related commits and discussions. I'm going to search for keywords related to:

*   `ldxr`, `stxr`, and exclusive monitors when operating on Normal Non-Cacheable (MT\_NORMAL\_NC), Device, and PCIe memory regions.
*   Synchronous External Aborts (SEAs), Data Aborts, Alignment Faults, and how they relate to exclusive access. Did an external abort get generated? Is that the CPU, a bus issue, the PCIe root, or a local monitor?
*   Specifically, I need to use `git log` and `grep` inside the kernel tree and search for terms like SEA, MT\_NORMAL\_NC, ldxr, exclusive, futex, writecombine, and PCIe. These will provide contextual clues.



171/4 2026/09/08 10:10 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:exclusive.*Non-Cacheable|exclusive.*NC|exclusive.*PCIe|exclusive.*Normal PathPrefix:arch/arm64]

Results:
map[Output:]

172/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 16997
							output: 33
							thoughts: 29
						

Thoughts:
Okay, here's my attempt at summarizing those thoughts from a first-person, expert perspective, catering to someone in the field:

**Digging into the Nitty-Gritty: Uncovering Exclusive Access Issues**

Right, let's get down to brass tacks. I'm thinking, "Where have we seen this before?". Specifically, I need to dive into the git logs. There's a nagging feeling that we've encountered something similar. The trigger word is "exclusive access". The memory model is likely being violated, somewhere.

I'm thinking about non-cacheable memory, PCIe interactions, write-combining buffers, futexes, and external aborts. Those are the usual suspects when you start seeing these types of issues. Exclusive accesses gone wrong often show their faces in those areas. My goal is to find commits that might shed some light on the current problem. Perhaps a previous fix, or a similar bug with the same root cause. The details are in the commit descriptions. I need to be efficient about my search terms so I can get a focused set of relevant commits to analyze. I'm ready to find the breadcrumbs that might lead me to a solution.



173/4 2026/09/08 10:10 tool git-log
0m Args:
map[MessageRegexps:[exclusive abort] PathPrefix:arch/arm64]

Results:
map[Output:a6e11bd6e1bd KVM: arm64: Extract stage-2 permission logic in user_mem_abort()
e07fc9e2da91 KVM: arm64: Fix page leak in user_mem_abort() on atomic fault
2937aeec9dc5 KVM: arm64: Handle DABT caused by LS64* instructions on unsupported memory
1f0f4a2ef7a5 KVM: arm64: Infer the PA offset from IPA in stage-2 map walker
]

174/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 17444
							output: 27
							thoughts: 33
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from an expert's perspective:

**Diving Deep into the ARM64 Kernel's Memory Management**

Alright, time to get to the bottom of this. I need to pinpoint the source of these "external abort" issues, and potentially any related synchronous errors, specifically those tagged with "exclusive". Given the nature of these problems, I'm thinking they might be related to concurrency issues, or perhaps problems with how the system is handling memory accesses from external devices. To do this comprehensively, I'm going to leverage my git expertise. I'll need to search the entire repository, or at least focus my query on the `arch/arm64` directory. I'll search those logs for strings such as "external abort", "Synchronous External Abort," and the more general "exclusive." This will allow me to track down the relevant commits that introduce or touch the specific sections of the code that are related to the root cause. This should help me uncover relevant code changes, patterns and potential bugs. From there I'll be able to trace these changes back to the root cause of the error.



175/4 2026/09/08 10:10 tool git-log
0m Args:
map[Count:20 MessageRegexps:[Synchronous External Abort]]

Results:
map[Output:e61487226b7d ACPI: APEI: Handle repeated SEA error storms
626e44f3d8a9 scsi: qla2xxx: Use memset_io() to clear QLAFX00 request ring slot
9ce8270e30f5 Input: samsung-keypad - keep interrupt disabled while closed
589b9e6f96be usb: renesas_usbhs: Fix power-off ordering on unbind
4cd774c1feb3 arm64: dts: qcom: purwa: Fix GPU IOMMU property
c41f66ea9dae clk: qcom: dispcc-x1e80100: Fix (possibly) dumping regmap
c32f8748d70c usb: cdns3: gadget: fix state inconsistency on gadget init failure
22f9abaf3656 wifi: mt76: mt7996: update WFSYS reset flow for MT7990 chipsets
85d98669fa7f arm64: dts: qcom: monaco: Reserve full Gunyah metadata region
ee021b27333b arm64: dts: qcom: kodiak: Add missing clock votes for lpass_tlmm
b74cedac643b media: chips-media: wave5: Fix device cleanup order to prevent kernel panic
c432180a7d95 soc: renesas: rz-sysc: Populate readable_reg/writeable_reg in regmap config
4debb5e8952e Documentation: kvm: new UAPI for handling SEA
ad9c62bd8946 KVM: arm64: VM exit to userspace to handle SEA
eb9ac779830b usb: renesas_usbhs: Fix synchronous external abort on unbind
b08217a25721 clk: imx95-blk-ctl: Fix synchronous abort
d7ce7e3a8464 arm64: Mark kernel as tainted on SAE and SError panic
79a5ae3c4c5e ACPI: APEI: send SIGBUS to current task if synchronous memory error not recovered
9aba641b9ec2 KVM: arm64: nv: Respect exception routing rules for SEAs
5ffc47feddcf crypto: caam - Prevent crash on suspend with iMX8QM / iMX8ULP
]

176/4 2026/09/08 10:10 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 18350
							output: 35
							thoughts: 57
						

Thoughts:
Okay, here's my interpretation of those search thoughts, tailored for an expert audience:

**Investigating Potential Bottlenecks in GPU Rendering on ARM64 Systems**

Alright, so I'm thinking about a performance issue, probably on an ARM64 system involving GPU rendering. My initial thought process is to quickly narrow down the problem space. I need to zero in on potential resource bottlenecks, so I'll start by searching the code base for relevant terms. I'll begin with a broad search looking for the intersection of "render node" or "vram" (which screams memory limitations) and "futex" – this points towards potential synchronization issues, as futexes are a low-level synchronization primitive. I want to include the specific GPU driver names ("amdgpu", "nouveau") to filter for driver-specific issues.

To expand the scope, I'll then refine the "futex" search further by specifically targeting the `arch/arm64` directory. This is important because I want to look for potential architectural-specific implementations or quirks related to how futexes are handled on ARM64. It’s possible I'm seeing a problem with the synchronization implementation.



177/4 2026/09/08 10:11 tool git-log
0m Args:
map[Count:20 PathPrefix:arch/arm64/include/asm/futex.h]

Results:
map[Output:25ef34b541eb arm64: futex: Consolidate 'old == new' check in __lsui_cmpxchg32()
44adf2bf40ef arm64: futex: Support futex with FEAT_LSUI
eaa3babcceaa arm64: futex: Refactor futex atomic operation
2e77a62cb3a6 arm64: extable: add a dedicated uaccess handler
923e1e7d8223 arm64: uaccess: rename privileged uaccess routines
a08971e9488d futex: arch_futex_atomic_op_inuser() calling conventions change
b907b80d7ae7 arm64: remove pointless __KERNEL__ guards
caab277b1de0 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234
8e4e0ac02b44 arm64: futex: Avoid copying out uninitialised stack in failed cmpxchg()
03110a5cb216 arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP
84ff7a09c371 arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value
ff8acf929014 arm64: futex: Restore oldval initialization to work around buggy compilers
045afc24124d arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value
96d4f267e40f Remove 'type' argument from access_ok() function
91b2d3442f6a arm64: futex: Mask __user pointers prior to dereference
30d6e0a4190d futex: Remove duplicated code and fix undefined behaviour
5f16a046f8e1 arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage
bd38967d406f arm64: Factor out PAN enabling/disabling into separate uaccess_* macros
6c94f27ac847 arm64: switch to relative exception tables
811d61e384e2 arm64: futex.h: Add missing PAN toggling
]

178/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 19273
							output: 22
							thoughts: 67
						

Thoughts:
Here's my take on the futex syscall process, keeping in mind my expertise:

**Diving into the Futex Implementation**

Okay, so I'm thinking about the `futex` syscall. Time to refresh my memory and dissect what's happening under the hood. My immediate focus is on tracing the execution path. What's the control flow when a user process initiates a `futex` call? I need to understand how the kernel handles this.

My starting point will be digging into the core implementation. I'll need to check the relevant source files like `kernel/futex/core.c`, `kernel/futex/waitwake.c` and any associated header files. I'll need to look into how memory is being accessed in that context. From a memory management perspective, I'm especially interested in the synchronization primitives used and the potential for contention and performance bottlenecks.



179/4 2026/09/08 10:11 tool codesearch-dir-index
0m Args:
map[Dir:kernel/futex]

Results:
map[Files:[core.c futex.h pi.c requeue.c syscalls.c waitwake.c] Subdirs:<nil>]

180/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 19604
							output: 38
							thoughts: 23
						

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

**Diving into the Futex Key Retrieval**

Okay, time to get my hands dirty. I need to understand how the futex key is obtained, so I'm going to navigate directly to the heart of the matter. My gut tells me `get_futex_key` is the function I need to examine, so I'm heading straight to `kernel/futex/core.c`. This is where the core futex logic should reside. I'll be looking for how the key is constructed or retrieved from the relevant data structures; I want to understand how it's calculated, especially the inputs. I'm hoping to see the specific fields or data that are being hashed or referenced to generate or retrieve the futex key. There’s got to be some relevant data to look at. I'll also be watching for any conditional logic that might affect the key generation based on the futex's state or the process context. Let's see what's in there.



181/4 2026/09/08 10:11 tool codesearch-definition-source
0m Args:
map[ContextFile:kernel/futex/core.c Name:get_futex_key]

Results:
map[SourceCode: 479:	/**
 480:	 * get_futex_key() - Get parameters which are the keys for a futex
 481:	 * @uaddr:	virtual address of the futex
 482:	 * @flags:	FLAGS_*
 483:	 * @key:	address where result is stored.
 484:	 * @rw:		mapping needs to be read/write (values: FUTEX_READ,
 485:	 *              FUTEX_WRITE)
 486:	 *
 487:	 * Return: a negative error code or 0
 488:	 *
 489:	 * The key words are stored in @key on success.
 490:	 *
 491:	 * For shared mappings (when @fshared), the key is:
 492:	 *
 493:	 *   ( inode->i_sequence, page offset within mapping, offset_within_page )
 494:	 *
 495:	 * [ also see get_inode_sequence_number() ]
 496:	 *
 497:	 * For private mappings (or when !@fshared), the key is:
 498:	 *
 499:	 *   ( current->mm, address, 0 )
 500:	 *
 501:	 * This allows (cross process, where applicable) identification of the futex
 502:	 * without keeping the page pinned for the duration of the FUTEX_WAIT.
 503:	 *
 504:	 * lock_page() might sleep, the caller should not hold a spinlock.
 505:	 */
 506:	int get_futex_key(u32 __user *uaddr, unsigned int flags, union futex_key *key,
 507:			  enum futex_access rw)
 508:	{
 509:		unsigned long address = (unsigned long)uaddr;
 510:		struct mm_struct *mm = current->mm;
 511:		struct page *page;
 512:		struct folio *folio;
 513:		struct address_space *mapping;
 514:		int node, err, size, ro = 0;
 515:		bool node_updated = false;
 516:		bool fshared;
 517:	
 518:		fshared = flags & FLAGS_SHARED;
 519:		size = futex_size(flags);
 520:		if (flags & FLAGS_NUMA)
 521:			size *= 2;
 522:	
 523:		/*
 524:		 * The futex address must be "naturally" aligned.
 525:		 */
 526:		key->both.offset = address % PAGE_SIZE;
 527:		if (unlikely((address & (size-1)) != 0))
 528:			return -EINVAL;
 529:		address -= key->both.offset;
 530:	
 531:		if (unlikely(!access_ok(uaddr, size)))
 532:			return -EFAULT;
 533:	
 534:		if (unlikely(should_fail_futex(fshared)))
 535:			return -EFAULT;
 536:	
 537:		node = FUTEX_NO_NODE;
 538:	
 539:		if (flags & FLAGS_NUMA) {
 540:			u32 __user *naddr = (void *)uaddr + size / 2;
 541:	
 542:			if (get_user_inline(node, naddr))
 543:				return -EFAULT;
 544:	
 545:			if ((node != FUTEX_NO_NODE) &&
 546:			    ((unsigned int)node >= MAX_NUMNODES || !node_possible(node)))
 547:				return -EINVAL;
 548:		}
 549:	
 550:		if (node == FUTEX_NO_NODE && (flags & FLAGS_MPOL)) {
 551:			node = futex_mpol(mm, address);
 552:			node_updated = true;
 553:		}
 554:	
 555:		if (flags & FLAGS_NUMA) {
 556:			u32 __user *naddr = (void *)uaddr + size / 2;
 557:	
 558:			if (node == FUTEX_NO_NODE) {
 559:				node = numa_node_id();
 560:				node_updated = true;
 561:			}
 562:			if (node_updated && put_user_inline(node, naddr))
 563:				return -EFAULT;
 564:		}
 565:	
 566:		key->both.node = node;
 567:	
 568:		/*
 569:		 * PROCESS_PRIVATE futexes are fast.
 570:		 * As the mm cannot disappear under us and the 'key' only needs
 571:		 * virtual address, we dont even have to find the underlying vma.
 572:		 * Note : We do have to check 'uaddr' is a valid user address,
 573:		 *        but access_ok() should be faster than find_vma()
 574:		 */
 575:		if (!fshared) {
 576:			/*
 577:			 * On no-MMU, shared futexes are treated as private, therefore
 578:			 * we must not include the current process in the key. Since
 579:			 * there is only one address space, the address is a unique key
 580:			 * on its own.
 581:			 */
 582:			if (IS_ENABLED(CONFIG_MMU))
 583:				key->private.mm = mm;
 584:			else
 585:				key->private.mm = NULL;
 586:	
 587:			key->private.address = address;
 588:			return 0;
 589:		}
 590:	
 591:	again:
 592:		/* Ignore any VERIFY_READ mapping (futex common case) */
 593:		if (unlikely(should_fail_futex(true)))
 594:			return -EFAULT;
 595:	
 596:		err = get_user_pages_fast(address, 1, FOLL_WRITE, &page);
 597:		/*
 598:		 * If write access is not required (eg. FUTEX_WAIT), try
 599:		 * and get read-only access.
 600:		 */
 601:		if (err == -EFAULT && rw == FUTEX_READ) {
 602:			err = get_user_pages_fast(address, 1, 0, &page);
 603:			ro = 1;
 604:		}
 605:		if (err < 0)
 606:			return err;
 607:		else
 608:			err = 0;
 609:	
 610:		/*
 611:		 * The treatment of mapping from this point on is critical. The folio
 612:		 * lock protects many things but in this context the folio lock
 613:		 * stabilizes mapping, prevents inode freeing in the shared
 614:		 * file-backed region case and guards against movement to swap cache.
 615:		 *
 616:		 * Strictly speaking the folio lock is not needed in all cases being
 617:		 * considered here and folio lock forces unnecessarily serialization.
 618:		 * From this point on, mapping will be re-verified if necessary and
 619:		 * folio lock will be acquired only if it is unavoidable
 620:		 *
 621:		 * Mapping checks require the folio so it is looked up now. For
 622:		 * anonymous pages, it does not matter if the folio is split
 623:		 * in the future as the key is based on the address. For
 624:		 * filesystem-backed pages, the precise page is required as the
 625:		 * index of the page determines the key.
 626:		 */
 627:		folio = page_folio(page);
 628:		mapping = READ_ONCE(folio->mapping);
 629:	
 630:		/*
 631:		 * If folio->mapping is NULL, then it cannot be an anonymous
 632:		 * page; but it might be the ZERO_PAGE or in the gate area or
 633:		 * in a special mapping (all cases which we are happy to fail);
 634:		 * or it may have been a good file page when get_user_pages_fast
 635:		 * found it, but truncated or holepunched or subjected to
 636:		 * invalidate_complete_page2 before we got the folio lock (also
 637:		 * cases which we are happy to fail).  And we hold a reference,
 638:		 * so refcount care in invalidate_inode_page's remove_mapping
 639:		 * prevents drop_caches from setting mapping to NULL beneath us.
 640:		 *
 641:		 * The case we do have to guard against is when memory pressure made
 642:		 * shmem_writepage move it from filecache to swapcache beneath us:
 643:		 * an unlikely race, but we do need to retry for folio->mapping.
 644:		 */
 645:		if (unlikely(!mapping)) {
 646:			int shmem_swizzled;
 647:	
 648:			/*
 649:			 * Folio lock is required to identify which special case above
 650:			 * applies. If this is really a shmem page then the folio lock
 651:			 * will prevent unexpected transitions.
 652:			 */
 653:			folio_lock(folio);
 654:			shmem_swizzled = folio_test_swapcache(folio) || folio->mapping;
 655:			folio_unlock(folio);
 656:			folio_put(folio);
 657:	
 658:			if (shmem_swizzled)
 659:				goto again;
 660:	
 661:			return -EFAULT;
 662:		}
 663:	
 664:		/*
 665:		 * Private mappings are handled in a simple way.
 666:		 *
 667:		 * If the futex key is stored in anonymous memory, then the associated
 668:		 * object is the mm which is implicitly pinned by the calling process.
 669:		 *
 670:		 * NOTE: When userspace waits on a MAP_SHARED mapping, even if
 671:		 * it's a read-only handle, it's expected that futexes attach to
 672:		 * the object not the particular process.
 673:		 */
 674:		if (folio_test_anon(folio)) {
 675:			/*
 676:			 * A RO anonymous page will never change and thus doesn't make
 677:			 * sense for futex operations.
 678:			 */
 679:			if (unlikely(should_fail_futex(true)) || ro) {
 680:				err = -EFAULT;
 681:				goto out;
 682:			}
 683:	
 684:			key->both.offset |= FUT_OFF_MMSHARED; /* ref taken on mm */
 685:			key->private.mm = mm;
 686:			key->private.address = address;
 687:	
 688:		} else {
 689:			struct inode *inode;
 690:	
 691:			/*
 692:			 * The associated futex object in this case is the inode and
 693:			 * the folio->mapping must be traversed. Ordinarily this should
 694:			 * be stabilised under folio lock but it's not strictly
 695:			 * necessary in this case as we just want to pin the inode, not
 696:			 * update i_pages or anything like that.
 697:			 *
 698:			 * The RCU read lock is taken as the inode is finally freed
 699:			 * under RCU. If the mapping still matches expectations then the
 700:			 * mapping->host can be safely accessed as being a valid inode.
 701:			 */
 702:			rcu_read_lock();
 703:	
 704:			if (READ_ONCE(folio->mapping) != mapping) {
 705:				rcu_read_unlock();
 706:				folio_put(folio);
 707:	
 708:				goto again;
 709:			}
 710:	
 711:			inode = READ_ONCE(mapping->host);
 712:			if (!inode) {
 713:				rcu_read_unlock();
 714:				folio_put(folio);
 715:	
 716:				goto again;
 717:			}
 718:	
 719:			key->both.offset |= FUT_OFF_INODE; /* inode-based key */
 720:			key->shared.i_seq = get_inode_sequence_number(inode);
 721:			key->shared.pgoff = page_pgoff(folio, page);
 722:			rcu_read_unlock();
 723:		}
 724:	
 725:	out:
 726:		folio_put(folio);
 727:		return err;
 728:	}
 SourceFile:kernel/futex/core.c]

182/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 23599
							output: 28
							thoughts: 528
						

Thoughts:
**Diving into the Futex Implementation: Private Futexes and Atomic Operations**

Okay, let's dissect `get_futex_key`. My immediate takeaway is the optimization for `PROCESS_PRIVATE` futexes. Lines 575-588 really highlight the efficiency here. Since the memory map (`mm`) won't disappear on us and the "key" just needs a virtual address, no VMA lookup is necessary. It's a quick `access_ok()` check for user address validity, and then bam, we're out of there. This is especially relevant for default futex usage, that is, when `FUTEX_PRIVATE_FLAG` is set (or, conversely, when `!fshared` is true). It's a very fast path, bypassing the more complex shared-memory futex setup. It's like a fast lane for private futexes, which, importantly, is the *common* case. The code sets `key->private.mm` to the current `mm` when MMU is available and otherwise sets to `NULL`, setting the address and returning `0`.

Now, if we consider `futex` executing operations—`FUTEX_WAIT_PRIVATE`, `FUTEX_WAKE_PRIVATE`, `FUTEX_LOCK_PI_PRIVATE`, etc.—it's time to examine the atomic operations happening on `uaddr`. I need to trace the calls to `arch_futex_atomic_op_inuser`, `futex_atomic_cmpxchg_inatomic`, and where `futex_atomic_read_inatomic` or `get_user` are used. This should give me a good picture of the low-level atomic primitives used within kernel space and the exact memory locations that are involved. It's time to dig into the guts of how the futex operations interact directly with the memory.



183/4 2026/09/08 10:11 tool grepper
0m Args:
map[Expression:futex_atomic PathPrefix:kernel/futex]

Results:
map[Output:kernel/futex/futex.h=290=static inline int futex_cmpxchg_value_locked(u32 *curval, u32 __user *uaddr, u32 uval, u32 newval)
--
kernel/futex/futex.h-294-	pagefault_disable();
kernel/futex/futex.h:295:	ret = futex_atomic_cmpxchg_inatomic(curval, uaddr, uval, newval);
kernel/futex/futex.h-296-	pagefault_enable();
--
kernel/futex/waitwake.c=178=int futex_wake(u32 __user *uaddr, unsigned int flags, void __user *pop, int nr_wake, u32 bitset)
--
kernel/futex/waitwake.c-228-
kernel/futex/waitwake.c:229:static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
kernel/futex/waitwake.c-230-{
--
kernel/futex/waitwake.c-250-	pagefault_disable();
kernel/futex/waitwake.c:251:	ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr);
kernel/futex/waitwake.c-252-	pagefault_enable();
--
kernel/futex/waitwake.c=278=int futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2,
--
kernel/futex/waitwake.c-301-		double_lock_hb(hb1, hb2);
kernel/futex/waitwake.c:302:		op_ret = futex_atomic_op_inuser(op, uaddr2);
kernel/futex/waitwake.c-303-		if (unlikely(op_ret < 0)) {
]

184/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 25073
							output: 35
							thoughts: 68
						

Thoughts:
Okay, here's my take on those lines of thought, as if they were my own, presented to a fellow expert:

**Investigating the Futex Landscape**

Alright, so I'm diving into this futex issue. First, I'm thinking about hitting some key futex functions directly related to this potential problem: I need to check out what's going on with `futex_wait_setup`, because that's always a good starting point for understanding wait queues. And since this *could* involve priority inheritance, I should also look closely at any PI operations in general, and I’m definitely going to zero in on `futex_lock_pi` and `futex_requeue` as likely areas. Finally, I’ll take a look at `futex_unlock_pi`, because something can go wrong there.

To dig deeper, I should see how this might be going south. I'll need to locate where `futex_cmpxchg_value_locked` is in the kernel futex implementation. I'm going to *grep* for that in `kernel/futex` to see the contexts it's used within. That's a critical function, given the potential for race conditions.



185/4 2026/09/08 10:11 tool grepper
0m Args:
map[Expression:futex_cmpxchg_value_locked PathPrefix:kernel/futex]

Results:
map[Output:kernel/futex/core.c=972=static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
--
kernel/futex/core.c-1086-	 */
kernel/futex/core.c:1087:	if ((err = futex_cmpxchg_value_locked(&nval, uaddr, uval, mval))) {
kernel/futex/core.c-1088-		switch (err) {
--
kernel/futex/futex.h=288=extern struct futex_q *futex_top_waiter(struct futex_hash_bucket *hb, union futex_key *key);
kernel/futex/futex.h-289-
kernel/futex/futex.h:290:static inline int futex_cmpxchg_value_locked(u32 *curval, u32 __user *uaddr, u32 uval, u32 newval)
kernel/futex/futex.h-291-{
--
kernel/futex/pi.c=541=static int lock_pi_update_atomic(u32 __user *uaddr, u32 uval, u32 newval)
--
kernel/futex/pi.c-548-
kernel/futex/pi.c:549:	err = futex_cmpxchg_value_locked(&curval, uaddr, uval, newval);
kernel/futex/pi.c-550-	if (unlikely(err))
--
kernel/futex/pi.c=680=static int wake_futex_pi(u32 __user *uaddr, u32 uval,
--
kernel/futex/pi.c-705-
kernel/futex/pi.c:706:	ret = futex_cmpxchg_value_locked(&curval, uaddr, uval, newval);
kernel/futex/pi.c-707-	if (!ret && (curval != uval)) {
--
kernel/futex/pi.c=739=static int __fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
--
kernel/futex/pi.c-829-
kernel/futex/pi.c:830:		err = futex_cmpxchg_value_locked(&curval, uaddr, uval, newval);
kernel/futex/pi.c-831-		if (err)
--
kernel/futex/pi.c=1206=static int __futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
--
kernel/futex/pi.c-1332-	 */
kernel/futex/pi.c:1333:	if ((ret = futex_cmpxchg_value_locked(&curval, uaddr, uval, 0))) {
kernel/futex/pi.c-1334-		spin_unlock(&hb->lock);
]

186/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 26212
							output: 37
							thoughts: 550
						

Thoughts:
**My Deep Dive into Futexes and PCIe-Mapped VRAM on ARM64**

Okay, let's break this down. My mind's working through the implications here, starting with how futexes operate on ARM64. I'm thinking about those critical functions, `futex_wait_setup`, `futex_wait`, `futex_waitv`, and `futex_atomic_op_inuser`. Specifically, I'm keying in on `FUTEX_WAKE_OP` calls. When that happens, `futex_atomic_op_inuser` kicks in, which in turn hands the work off to `arch_futex_atomic_op_inuser`.

Now, on ARM64, this calls `__futex_atomic_##op`, which I know eventually resolves to `__llsc_futex_atomic_##op`. Unless LSUI is active, this means we're dealing with load-exclusive/store-exclusive instructions (`ldxr` / `stlxr`), even if the hardware supports FEAT_LSUI, or on standard ARMv8.0 cores. And, for `__llsc_futex_cmpxchg`, it's the same story: `ldxr` / `stlxr`.

Then I remember `futex_cmpxchg_value_locked`. That function relies on `futex_atomic_cmpxchg_inatomic`, which again, on ARM64, eventually boils down to `__llsc_futex_cmpxchg` – still using those load/store exclusive instructions.

Now, the really interesting part: I've got a whole set of questions here, and they're crucial.

1.  Can an unprivileged user allocate and map VRAM over PCIe using amdgpu or nouveau?

2.  If so, *how* is this memory mapped? Is it using `pgprot_writecombine` (MT\_NORMAL\_NC)? This is where things get sticky.

3.  What happens on the ARM64 hardware and within the Linux kernel if we execute an `ldxr` (or `stxr` / atomic exclusive) instruction on memory that is mapped as `pgprot_writecombine` over PCIe? This is the crux of the problem.

4.  Does `ldxr` cause a Synchronous External Abort (SEA) because PCIe doesn't natively support exclusive accesses?

5.  If an SEA occurs, what's the kernel's response? Does it panic? Does it kill the process? Does it handle it gracefully via an exception table? This is what I need to understand.

I need to dig into this methodically: Let's start by scrutinizing the DRM render nodes. Specifically, I'm going to pull up the amdgpu and nouveau driver code. I need to see what's actually happening at the allocation and mmap level for unprivileged users to see if they can even get their hands on VRAM over PCIe, and what is the memory type used. This is going to be fascinating.



187/4 2026/09/08 10:11 tool grepper
0m Args:
map[Expression:DRM_RENDER_ALLOW PathPrefix:drivers/gpu/drm/amd/amdgpu]

Results:
map[Output:drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c=3085=const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3086:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3087:	DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3088:	DRM_IOCTL_DEF_DRV(AMDGPU_VM, amdgpu_vm_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c-3089-	DRM_IOCTL_DEF_DRV(AMDGPU_SCHED, amdgpu_sched_ioctl, DRM_MASTER),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3090:	DRM_IOCTL_DEF_DRV(AMDGPU_BO_LIST, amdgpu_bo_list_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3091:	DRM_IOCTL_DEF_DRV(AMDGPU_FENCE_TO_HANDLE, amdgpu_cs_fence_to_handle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c-3092-	/* KMS */
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3093:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_MMAP, amdgpu_gem_mmap_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3094:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_WAIT_IDLE, amdgpu_gem_wait_idle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3095:	DRM_IOCTL_DEF_DRV(AMDGPU_CS, amdgpu_cs_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3096:	DRM_IOCTL_DEF_DRV(AMDGPU_INFO, amdgpu_info_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3097:	DRM_IOCTL_DEF_DRV(AMDGPU_WAIT_CS, amdgpu_cs_wait_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3098:	DRM_IOCTL_DEF_DRV(AMDGPU_WAIT_FENCES, amdgpu_cs_wait_fences_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3099:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_METADATA, amdgpu_gem_metadata_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3100:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_VA, amdgpu_gem_va_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3101:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_OP, amdgpu_gem_op_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3102:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_USERPTR, amdgpu_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3103:	DRM_IOCTL_DEF_DRV(AMDGPU_USERQ, amdgpu_userq_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3104:	DRM_IOCTL_DEF_DRV(AMDGPU_USERQ_SIGNAL, amdgpu_userq_signal_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3105:	DRM_IOCTL_DEF_DRV(AMDGPU_USERQ_WAIT, amdgpu_userq_wait_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3106:	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_LIST_HANDLES, amdgpu_gem_list_handles_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:3107:	DRM_IOCTL_DEF_DRV(AMDGPU_PROC_OPTIONS, amdgpu_proc_options_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c-3108-};
]

188/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 28959
							output: 30
							thoughts: 232
						

Thoughts:
**My Analysis of Unprivileged GPU Memory Mapping**

Okay, let's break this down. My understanding is that when dealing with unprivileged clients like Vulkan or OpenGL applications, on a system with a modern GPU driver such as AMDGPU, the use of render nodes (like `/dev/dri/renderD128`) is key. The goal here is to allow clients to access GPU resources, specifically VRAM, without needing elevated privileges.

The core idea centers around a sequence: A user opens the render node, then uses ioctls such as `AMDGPU_GEM_CREATE` with a VRAM domain (`AMDGPU_GEM_DOMAIN_VRAM`). Following this, a `AMDGPU_GEM_MMAP` ioctl is issued. Alternatively, we might see `DRM_IOCTL_MODE_MAP_DUMB` or a direct DRM GEM mmap offset call. This should allow a `mmap()` call to establish a user virtual address (`uaddr`) mapped directly to VRAM. Essentially, this sets up the user-space mapping.

Now, I want to understand how this VRAM mapping process is actually implemented. More specifically, I'm curious about the specific memory attribute flags utilized for the VRAM mappings, particularly on ARM64 architectures when running these drivers. My aim is to investigate how these drivers like TTM, amdgpu, or nouveau manage memory attributes. I'll search for uses of `pgprot_writecombine` within the driver code, specifically within the `drivers/gpu/drm/` directory or anything related to TTM. This should give me insight into the cache coherency and memory ordering considerations being implemented to ensure correct and efficient GPU access from the user-space application.



189/4 2026/09/08 10:11 tool grepper
0m Args:
map[Expression:pgprot_writecombine PathPrefix:drivers/gpu/drm]

Results:
map[Output:drivers/gpu/drm/drm_fbdev_shmem.c=43=static int drm_fbdev_shmem_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
--
drivers/gpu/drm/drm_fbdev_shmem.c-50-	if (shmem->map_wc)
drivers/gpu/drm/drm_fbdev_shmem.c:51:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/drm_fbdev_shmem.c-52-
--
drivers/gpu/drm/drm_gem.c=1222=int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
--
drivers/gpu/drm/drm_gem.c-1253-		vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP);
drivers/gpu/drm/drm_gem.c:1254:		vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/drm_gem.c-1255-		vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
--
drivers/gpu/drm/drm_gem_shmem_helper.c=389=int drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem,
--
drivers/gpu/drm/drm_gem_shmem_helper.c-413-		if (shmem->map_wc)
drivers/gpu/drm/drm_gem_shmem_helper.c:414:			prot = pgprot_writecombine(prot);
drivers/gpu/drm/drm_gem_shmem_helper.c-415-		shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
--
drivers/gpu/drm/drm_gem_shmem_helper.c=752=int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct *vma)
--
drivers/gpu/drm/drm_gem_shmem_helper.c-786-	if (shmem->map_wc)
drivers/gpu/drm/drm_gem_shmem_helper.c:787:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/drm_gem_shmem_helper.c-788-
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c=129=static int etnaviv_gem_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c-138-	if (etnaviv_obj->flags & ETNA_BO_WC) {
drivers/gpu/drm/etnaviv/etnaviv_gem.c:139:		vma->vm_page_prot = pgprot_writecombine(vm_page_prot);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-140-	} else if (etnaviv_obj->flags & ETNA_BO_UNCACHED) {
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c=344=static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c-363-	default:
drivers/gpu/drm/etnaviv/etnaviv_gem.c:364:		prot = pgprot_writecombine(PAGE_KERNEL);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-365-	}
--
drivers/gpu/drm/exynos/exynos_drm_gem.c=365=static int exynos_drm_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/exynos/exynos_drm_gem.c-382-		vma->vm_page_prot =
drivers/gpu/drm/exynos/exynos_drm_gem.c:383:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/exynos/exynos_drm_gem.c-384-	else
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c=60=i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-114-			vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:115:				pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-116-		else
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c=990=i915_gem_object_mmap(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1037-		vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:1038:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1039-		vma->vm_ops = &vm_ops_cpu;
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1057-		vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:1058:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1059-		vma->vm_ops = &vm_ops_gtt;
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c=272=static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c-307-	case I915_MAP_WC:
drivers/gpu/drm/i915/gem/i915_gem_pages.c:308:		pgprot = pgprot_writecombine(PAGE_KERNEL_IO);
drivers/gpu/drm/i915/gem/i915_gem_pages.c-309-		break;
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c=329=static void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c-351-		pfns[i++] = (iomap + addr) >> PAGE_SHIFT;
drivers/gpu/drm/i915/gem/i915_gem_pages.c:352:	vaddr = vmap_pfn(pfns, n_pfn, pgprot_writecombine(PAGE_KERNEL_IO));
drivers/gpu/drm/i915/gem/i915_gem_pages.c-353-	if (pfns != stack)
--
drivers/gpu/drm/imagination/pvr_mmu.c=257=pvr_mmu_backing_page_init(struct pvr_mmu_backing_page *page,
--
drivers/gpu/drm/imagination/pvr_mmu.c-274-	if (device_get_dma_attr(dev) != DEV_DMA_COHERENT)
drivers/gpu/drm/imagination/pvr_mmu.c:275:		prot = pgprot_writecombine(prot);
drivers/gpu/drm/imagination/pvr_mmu.c-276-
--
drivers/gpu/drm/imagination/pvr_vm_mips.c=30=pvr_vm_mips_init(struct pvr_device *pvr_dev)
--
drivers/gpu/drm/imagination/pvr_vm_mips.c-66-	mips_data->pt = vmap(mips_data->pt_pages, pt_size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/imagination/pvr_vm_mips.c:67:			     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/imagination/pvr_vm_mips.c-68-	if (!mips_data->pt) {
--
drivers/gpu/drm/lima/lima_sched.c=273=static void lima_sched_build_error_task_list(struct lima_sched_task *task)
--
drivers/gpu/drm/lima/lima_sched.c-365-			data = vmap(bo->base.pages, bo->heap_size >> PAGE_SHIFT,
drivers/gpu/drm/lima/lima_sched.c:366:				    VM_MAP, pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/lima/lima_sched.c-367-			if (!data) {
--
drivers/gpu/drm/msm/msm_gem.c=323=static pgprot_t msm_gem_pgprot(struct msm_gem_object *msm_obj, pgprot_t prot)
--
drivers/gpu/drm/msm/msm_gem.c-325-	if (msm_obj->flags & MSM_BO_WC)
drivers/gpu/drm/msm/msm_gem.c:326:		return pgprot_writecombine(prot);
drivers/gpu/drm/msm/msm_gem.c-327-	return prot;
--
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c=186=gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
--
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c-209-	node->base.vaddr = vmap(node->pages, size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:210:				pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c-211-	if (!node->base.vaddr) {
--
drivers/gpu/drm/omapdrm/omap_fbdev.c=85=static int omap_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/gpu/drm/omapdrm/omap_fbdev.c-86-{
drivers/gpu/drm/omapdrm/omap_fbdev.c:87:	vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/omapdrm/omap_fbdev.c-88-
--
drivers/gpu/drm/omapdrm/omap_gem.c=534=static int omap_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/omapdrm/omap_gem.c-540-	if (omap_obj->flags & OMAP_BO_WC) {
drivers/gpu/drm/omapdrm/omap_gem.c:541:		vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/omapdrm/omap_gem.c-542-	} else if (omap_obj->flags & OMAP_BO_UNCACHED) {
--
drivers/gpu/drm/omapdrm/omap_gem.c=1067=void *omap_gem_vaddr(struct drm_gem_object *obj)
--
drivers/gpu/drm/omapdrm/omap_gem.c-1082-		omap_obj->vaddr = vmap(omap_obj->pages, obj->size >> PAGE_SHIFT,
drivers/gpu/drm/omapdrm/omap_gem.c:1083:				VM_MAP, pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/omapdrm/omap_gem.c-1084-	}
--
drivers/gpu/drm/panthor/panthor_gem.c=381=panthor_gem_vmap_get_locked(struct panthor_gem_object *bo)
--
drivers/gpu/drm/panthor/panthor_gem.c-405-	if (should_map_wc(bo))
drivers/gpu/drm/panthor/panthor_gem.c:406:		prot = pgprot_writecombine(prot);
drivers/gpu/drm/panthor/panthor_gem.c-407-
--
drivers/gpu/drm/panthor/panthor_gem.c=742=static int panthor_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/panthor/panthor_gem.c-780-	if (should_map_wc(bo))
drivers/gpu/drm/panthor/panthor_gem.c:781:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/panthor/panthor_gem.c-782-
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=125=static int rockchip_gem_alloc_iommu(struct rockchip_gem_object *rk_obj,
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-139-		rk_obj->kvaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:140:				      pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-141-		if (!rk_obj->kvaddr) {
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=240=static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj,
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-257-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:258:	vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-259-	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=514=int rockchip_gem_prime_vmap(struct drm_gem_object *obj, struct iosys_map *map)
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-524-			vaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:525:				     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-526-
--
drivers/gpu/drm/tegra/fbdev.c=69=int tegra_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
--
drivers/gpu/drm/tegra/fbdev.c-117-		bo->vaddr = vmap(bo->pages, bo->num_pages, VM_MAP,
drivers/gpu/drm/tegra/fbdev.c:118:				 pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/tegra/fbdev.c-119-		if (!bo->vaddr) {
--
drivers/gpu/drm/tegra/gem.c=177=static void *tegra_bo_mmap(struct host1x_bo *bo)
--
drivers/gpu/drm/tegra/gem.c-195-	vaddr = vmap(obj->pages, obj->num_pages, VM_MAP,
drivers/gpu/drm/tegra/gem.c:196:		     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/tegra/gem.c-197-	if (!vaddr)
--
drivers/gpu/drm/tegra/gem.c=580=int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma)
--
drivers/gpu/drm/tegra/gem.c-608-
drivers/gpu/drm/tegra/gem.c:609:		vma->vm_page_prot = pgprot_writecombine(prot);
drivers/gpu/drm/tegra/gem.c-610-	}
--
drivers/gpu/drm/ttm/ttm_module.c=62=pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
--
drivers/gpu/drm/ttm/ttm_module.c-69-	if (caching == ttm_write_combined)
drivers/gpu/drm/ttm/ttm_module.c:70:		tmp = pgprot_writecombine(tmp);
drivers/gpu/drm/ttm/ttm_module.c-71-#ifndef CONFIG_UML
--
drivers/gpu/drm/ttm/ttm_module.c-79-	if (caching == ttm_write_combined)
drivers/gpu/drm/ttm/ttm_module.c:80:		tmp = pgprot_writecombine(tmp);
drivers/gpu/drm/ttm/ttm_module.c-81-	else
--
drivers/gpu/drm/v3d/v3d_bo.c=194=void v3d_get_bo_vaddr(struct v3d_bo *bo)
--
drivers/gpu/drm/v3d/v3d_bo.c-198-	bo->vaddr = vmap(obj->pages, obj->base.size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/v3d/v3d_bo.c:199:			 pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/v3d/v3d_bo.c-200-}
--
drivers/gpu/drm/virtio/virtgpu_vram.c=35=static int virtio_gpu_vram_mmap(struct drm_gem_object *obj,
--
drivers/gpu/drm/virtio/virtgpu_vram.c-63-	if (vram->map_info == VIRTIO_GPU_MAP_CACHE_WC)
drivers/gpu/drm/virtio/virtgpu_vram.c:64:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/virtio/virtgpu_vram.c-65-	else if (vram->map_info == VIRTIO_GPU_MAP_CACHE_UNCACHED)
]

190/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 34719
							output: 30
							thoughts: 110
						

Thoughts:
**VRAM Management and Write-Combining on ARM64**

Okay, so I'm looking into how the Direct Rendering Manager (DRM) handles Video RAM (VRAM) and I'm reminded that both amdgpu and nouveau drivers leverage the TTM (Translation Table Manager) infrastructure, specifically within `drivers/gpu/drm/ttm/ttm_module.c`, and more precisely the function `ttm_prot_from_caching`. Interesting. It's a key part of how they manage memory, especially for `ttm_write_combined` which suggests write-combining is important. And I see that the code is using `pgprot_writecombine(tmp)`.

Now, I need to understand what `pgprot_writecombine` actually *does* on ARM64. That function is probably architecture-specific, and I need to know the details in order to follow the memory management flow correctly. So, I'll go ahead and dig into the `arch/arm64` directory, I should be able to find it in there.



191/4 2026/09/08 10:11 tool grepper
0m Args:
map[Expression:pgprot_writecombine PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/pgtable.h=725=static inline void __set_puds(struct mm_struct *mm, unsigned long addr,
--
arch/arm64/include/asm/pgtable.h-753-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h:754:#define pgprot_writecombine(prot) \
arch/arm64/include/asm/pgtable.h-755-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
--
arch/arm64/mm/mmu.c=96=pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
--
arch/arm64/mm/mmu.c-101-	else if (file->f_flags & O_SYNC)
arch/arm64/mm/mmu.c:102:		return pgprot_writecombine(vma_prot);
arch/arm64/mm/mmu.c-103-	return vma_prot;
]

192/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 35424
							output: 35
							thoughts: 368
						

Thoughts:
**My Investigation into ARM64 Exclusive Accesses on Non-Cacheable Memory**

Okay, so I'm looking at the ARM64 page table definitions, specifically `arch/arm64/include/asm/pgtable.h`. I see this macro, `pgprot_writecombine`, and it's mapping memory as `MT_NORMAL_NC` - Normal Non-Cacheable. This immediately triggers some questions, especially considering exclusive accesses, like those done with `ldxr`, `stxr`, `ldaxr`, `stlxr`, or `casa`, when dealing with non-cacheable memory, particularly in scenarios involving PCIe or an external bus.

My immediate focus shifts to understanding the implications of these exclusive accesses on memory mapped with `MT_NORMAL_NC`. I need to figure out what happens.

Here's my plan: I need to answer a series of key questions:

1.  **ARMv8 Architecture Reference Manual (ARM ARM):** What does the definitive source say about exclusive load/store instructions when they target Normal Non-Cacheable and Device memory types? This is the bedrock of my understanding.
2.  **System Interconnect and PCIe Root Complex:** What's the behavior of the system interconnect and PCIe root complex when they encounter an exclusive load instruction targeted at a non-cacheable device, like a PCIe slave? What kind of transactions occur on the bus? Does it retry or return an error?
3.  **Synchronous External Abort (SEA):** Does issuing `ldxr` (or any of the exclusive access instructions) to non-cacheable memory potentially result in a Synchronous External Abort (SEA)? If so, what are the conditions that trigger it?
4.  **Kernel Exception Handling:** If an SEA *does* occur on `ldxr` while in kernel mode (for instance, within a `futex` operation), how does the kernel's exception handler respond and what actions are taken? Is there a handler, and how does it deal with this very specific failure.

I'm going to start digging deep, and I'll need to search the kernel source code extensively. I'll be looking for references to these key terms: `LDXR`, `STXR`, `exclusive`, `MT_NORMAL_NC`, "Normal Non-Cacheable", "external abort", `SEA`, "Synchronous External Abort", `extable`, `fixup`, and any other related keywords or phrases that might shed light on how this is handled, to get a clear picture of the complete execution flow.



193/4 2026/09/08 10:11 tool grepper
0m Args:
map[Expression:Synchronous External Abort|synchronous external abort PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/kernel/acpi.c=295=void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
--
arch/arm64/kernel/acpi.c-383-/*
arch/arm64/kernel/acpi.c:384: * Claim Synchronous External Aborts as a firmware first notification.
arch/arm64/kernel/acpi.c-385- *
--
arch/arm64/kernel/rsi.c=52=static void __init arm64_rsi_setup_memory(void)
--
arch/arm64/kernel/rsi.c-63-	 * protected has failed here, then future accesses to the memory are
arch/arm64/kernel/rsi.c:64:	 * simply going to be reflected as a SEA (Synchronous External Abort)
arch/arm64/kernel/rsi.c-65-	 * which we can't handle.  Bailing out early prevents the guest limping
--
arch/arm64/kvm/hyp/nvhe/pkvm.c=33=static void pkvm_vcpu_reset_hcr(struct kvm_vcpu *vcpu)
--
arch/arm64/kvm/hyp/nvhe/pkvm.c-40-	if (cpus_have_final_cap(ARM64_HAS_RAS_EXTN)) {
arch/arm64/kvm/hyp/nvhe/pkvm.c:41:		/* route synchronous external abort exceptions to EL2 */
arch/arm64/kvm/hyp/nvhe/pkvm.c-42-		vcpu->arch.hcr_el2 |= HCR_TEA;
--
arch/arm64/kvm/sys_regs.c=5796=static void vcpu_set_hcr(struct kvm_vcpu *vcpu)
--
arch/arm64/kvm/sys_regs.c-5802-	if (cpus_have_final_cap(ARM64_HAS_RAS_EXTN)) {
arch/arm64/kvm/sys_regs.c:5803:		/* route synchronous external abort exceptions to EL2 */
arch/arm64/kvm/sys_regs.c-5804-		vcpu->arch.hcr_el2 |= HCR_TEA;
--
arch/arm64/mm/fault.c=870=static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-889-		 * The architecture specifies that the tag bits of FAR_EL1 are
arch/arm64/mm/fault.c:890:		 * UNKNOWN for synchronous external aborts. Mask them out now
arch/arm64/mm/fault.c-891-		 * so that userspace doesn't see them.
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-933-	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
arch/arm64/mm/fault.c:934:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
arch/arm64/mm/fault.c-935-	{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
--
arch/arm64/mm/pageattr.c=278=static int __set_memory_enc_dec(unsigned long addr,
--
arch/arm64/mm/pageattr.c-301-	 * Break the mapping before we make any changes to avoid stale TLB
arch/arm64/mm/pageattr.c:302:	 * entries or Synchronous External Aborts caused by RIPAS_EMPTY
arch/arm64/mm/pageattr.c-303-	 */
]

194/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 37393
							output: 38
							thoughts: 32
						

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

**Diving into the Arm64 Fault Handling**

Alright, time to get my hands dirty. I'm going to jump straight into `arch/arm64/mm/fault.c` on my preferred kernel source tree. This is where the rubber meets the road when it comes to memory faults on AArch64. Specifically, I want to drill down on how the kernel orchestrates things when faced with a *System Error Exception* and *external aborts*. `do_sea` will likely be a key function, and understanding its role in the fault handling flow is critical for a complete picture. External aborts are also very important. What are the common causes for an external abort? I need to analyze how they are recognized and how the kernel handles those cases. There could be some interesting interactions with the MMU and exception level changes in the fault handler, which is what I need to understand.



195/4 2026/09/08 10:11 tool codesearch-definition-source
0m Args:
map[ContextFile:arch/arm64/mm/fault.c Name:do_sea]

Results:
map[SourceCode: 870:	static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
 871:	{
 872:		const struct fault_info *inf;
 873:		unsigned long siaddr;
 874:	
 875:		inf = esr_to_fault_info(esr);
 876:	
 877:		if (user_mode(regs) && apei_claim_sea(regs) == 0) {
 878:			/*
 879:			 * APEI claimed this as a firmware-first notification.
 880:			 * Some processing deferred to task_work before ret_to_user().
 881:			 */
 882:			return 0;
 883:		}
 884:	
 885:		if (esr & ESR_ELx_FnV) {
 886:			siaddr = 0;
 887:		} else {
 888:			/*
 889:			 * The architecture specifies that the tag bits of FAR_EL1 are
 890:			 * UNKNOWN for synchronous external aborts. Mask them out now
 891:			 * so that userspace doesn't see them.
 892:			 */
 893:			siaddr  = untagged_addr(far);
 894:		}
 895:		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 896:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 897:	
 898:		return 0;
 899:	}
 SourceFile:arch/arm64/mm/fault.c]

196/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 38150
							output: 40
							thoughts: 56
						

Thoughts:
Okay, here's my take on those code snippets, thinking through the process as if I were examining them myself:

**Diving Deep into ARM64 Fault Handling**

Alright, let's get down to brass tacks. I need to understand this fault handling in the ARM64 architecture, so I'm immediately drawn to `arch/arm64/mm/fault.c`. Specifically, I'm focusing on how `do_sea` and `fault_info` are used. These are critical functions, so I know I'll be spending time reading through them and what they're doing. I anticipate this will be related to Single Entry Aborts (SEA). I remember a discussion of this, so let's get down to it!

I'm zeroing in on lines 850 through 980 in that file. That's a decent chunk of code, so it's likely where the core logic resides for this particular aspect of fault management. I anticipate that this section will lay out how the system actually *responds* when a fault occurs. Is it a memory access violation, a page fault, a permission error, or something else entirely? The code in this area is where I'll find out! It should outline the steps taken to diagnose the fault, determine its nature, and potentially take corrective action, or at least signal the process appropriately. I'm expecting to see things like: checking fault status registers, extracting information about the offending virtual address, and handling the system response. Let's see what gems are there!



197/4 2026/09/08 10:11 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:850 LineCount:100]

Results:
map[Contents: 850:	
 851:		do_bad_area(far, esr, regs);
 852:		return 0;
 853:	}
 854:	
 855:	static int do_alignment_fault(unsigned long far, unsigned long esr,
 856:				      struct pt_regs *regs)
 857:	{
 858:		if (IS_ENABLED(CONFIG_COMPAT_ALIGNMENT_FIXUPS) &&
 859:		    compat_user_mode(regs))
 860:			return do_compat_alignment_fixup(far, regs);
 861:		do_bad_area(far, esr, regs);
 862:		return 0;
 863:	}
 864:	
 865:	static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
 866:	{
 867:		return 1; /* "fault" */
 868:	}
 869:	
 870:	static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
 871:	{
 872:		const struct fault_info *inf;
 873:		unsigned long siaddr;
 874:	
 875:		inf = esr_to_fault_info(esr);
 876:	
 877:		if (user_mode(regs) && apei_claim_sea(regs) == 0) {
 878:			/*
 879:			 * APEI claimed this as a firmware-first notification.
 880:			 * Some processing deferred to task_work before ret_to_user().
 881:			 */
 882:			return 0;
 883:		}
 884:	
 885:		if (esr & ESR_ELx_FnV) {
 886:			siaddr = 0;
 887:		} else {
 888:			/*
 889:			 * The architecture specifies that the tag bits of FAR_EL1 are
 890:			 * UNKNOWN for synchronous external aborts. Mask them out now
 891:			 * so that userspace doesn't see them.
 892:			 */
 893:			siaddr  = untagged_addr(far);
 894:		}
 895:		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 896:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 897:	
 898:		return 0;
 899:	}
 900:	
 901:	static int do_tag_check_fault(unsigned long far, unsigned long esr,
 902:				      struct pt_regs *regs)
 903:	{
 904:		/*
 905:		 * The architecture specifies that bits 63:60 of FAR_EL1 are UNKNOWN
 906:		 * for tag check faults. Set them to corresponding bits in the untagged
 907:		 * address if ARM64_MTE_FAR isn't supported.
 908:		 * Otherwise, bits 63:60 of FAR_EL1 are not UNKNOWN.
 909:		 */
 910:		if (!cpus_have_cap(ARM64_MTE_FAR))
 911:			far = (__untagged_addr(far) & ~MTE_TAG_MASK) | (far & MTE_TAG_MASK);
 912:	
 913:		do_bad_area(far, esr, regs);
 914:		return 0;
 915:	}
 916:	
 917:	static const struct fault_info fault_info[] = {
 918:		{ do_bad,		SIGKILL, SI_KERNEL,	"ttbr address size fault"	},
 919:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 1 address size fault"	},
 920:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 2 address size fault"	},
 921:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 3 address size fault"	},
 922:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 0 translation fault"	},
 923:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 1 translation fault"	},
 924:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 2 translation fault"	},
 925:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 3 translation fault"	},
 926:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 access flag fault"	},
 927:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 access flag fault"	},
 928:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 access flag fault"	},
 929:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 access flag fault"	},
 930:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 permission fault"	},
 931:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 permission fault"	},
 932:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 permission fault"	},
 933:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
 934:		{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
 935:		{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
 936:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 18"			},
 937:		{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 (translation table walk)"	},
 938:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 (translation table walk)"	},
 939:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 (translation table walk)"	},
 940:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 (translation table walk)"	},
 941:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 (translation table walk)"	},
 942:		{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous parity or ECC error" },	// Reserved when RAS is implemented
 943:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 25"			},
 944:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 26"			},
 945:		{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 946:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 947:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 948:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 949:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
]

198/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 40729
							output: 42
							thoughts: 22
						

Thoughts:
Okay, here's my summary, presented as a stream of thought:

**Diving into the Arm64 Kernel's Error Handling**

Alright, I'm already pretty familiar with the general architecture, but I need to dig deeper into the specifics of how the Arm64 kernel reacts to fatal errors. I've been focusing on exception handling, but understanding how the kernel *really* handles these critical situations is paramount. I've explored a bit of the exception vector logic, but that's just the entry point. Now, I need to understand the function responsible for notifying the system that something went terribly wrong. Let's see how `arm64_notify_die` actually works when it's called from within the kernel's privileged mode. This should provide some insight into what the kernel *actually* does when a critical fault occurs. Time to get my hands dirty.



199/4 2026/09/08 10:11 tool codesearch-definition-source
0m Args:
map[ContextFile:arch/arm64/mm/fault.c Name:arm64_notify_die]

Results:
map[SourceCode: 291:	void arm64_notify_die(const char *str, struct pt_regs *regs,
 292:			      int signo, int sicode, unsigned long far,
 293:			      unsigned long err)
 294:	{
 295:		if (user_mode(regs)) {
 296:			WARN_ON(regs != current_pt_regs());
 297:			current->thread.fault_address = 0;
 298:			current->thread.fault_code = err;
 299:	
 300:			arm64_force_sig_fault(signo, sicode, far, str);
 301:		} else {
 302:			die(str, regs, err);
 303:		}
 304:	}
 SourceFile:arch/arm64/kernel/traps.c]

200/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 41226
							output: 28
							thoughts: 1160
						

Thoughts:
**Deep Dive into ARM64 Synchronous External Aborts with Exclusive Accesses on PCIe**

Okay, so I'm looking at this `arm64_notify_die` function. It seems pretty straightforward: if the CPU is in user mode, it'll attempt to signal a fault; otherwise, it calls `die()`, leading to a kernel panic. Specifically, I'm concerned about SEA, Synchronous External Aborts, as they directly call `die()` when in kernel mode. I notice `do_sea` bypasses the exception table fixups and calls `arm64_notify_die` directly. This is unlike `do_page_fault` or `do_bad_area`, which go through `__do_kernel_fault` and potentially `fixup_exception`. That's a key difference here.

My immediate question: why is an `ldxr` (Load Exclusive Register) instruction potentially causing an SEA, especially when dealing with PCIe or VRAM?  My intuition is that something about exclusive accesses on non-cacheable or PCIe memory is triggering it. I need to get to the bottom of this.

Time to consult the ARM Architecture Reference Manual (ARM ARM).  I need to understand how exclusive accesses work with different memory types, specifically Normal Non-Cacheable (`MT_NORMAL_NC`) and Device memory. I need to understand exclusive accesses on PCIe, global vs. local exclusive monitors, and how the system responds when an exclusive access goes to a slave that doesn't support it or to non-cacheable memory. Does it return EXTOKAY, OKAY, or does it signal an error like DECERR or SLVERR?

A key thing is that PCIe doesn't natively speak AXI exclusive transactions. When an exclusive read like `LDXR` is translated by an interconnect into an external PCIe transaction, the AXI interconnect might return an error, which, on an ARM core, results in a Synchronous External Abort (SEA). The architecture itself, in the case of Normal Non-Cacheable memory, is unclear: the implementation can either handle the exclusive monitor on the processor or in the external memory system. If an exclusive transaction gets punted downstream to a PCIe device without native support, and no global monitor exists, an error is generated – and that triggers the SEA.

The ARM ARM itself states that exclusive accesses to Device memory can behave in a way where it can result in: (1) an Alignment fault, (2) can execute as a Non-exclusive access, and/or (3) a Synchronous External Abort. This is a very interesting constraint for this memory type. Also, for Normal Non-Cacheable memory, there's a global monitor involved. If the memory doesn't support exclusive accesses, an external abort can be generated. Bingo!

Now, I need to check if there are any existing discussions or known issues in the Linux kernel related to this. Let's see if there are any commits, CVEs, or bug reports about this exact situation. I'll search the kernel commit logs and documentation using keywords like "PCIe" AND "exclusive", "ldxr" AND "abort", "futex" AND "PCIe", "futex" AND "VRAM", etc. I need to see if others have faced this problem. Hopefully, I'll find some clues there.



201/4 2026/09/08 10:11 tool git-log
0m Args:
map[Count:20 MessageRegexps:[exclusive PCIe]]

Results:
map[Output:6dc92ba487a2 phy: lynx-10g: new driver
4ec4ccdaace4 PCI: rzg3s-host: Make configuration reset lines optional
88a71941b90d PCI: dwc: ep: Return after clearing BAR-match inbound mapping
2fd60a2edb83 PCI: qcom: Parse PERST# from all PCIe bridge nodes
3225f52cde56 PCI/TSM: Establish Secure Sessions and Link Encryption
057b6ca59612 Bluetooth: btintel_pcie: Fix event packet loss issue
65e8b9912670 riscv: dts: starfive: jh7110: pciephy0 USB 3.0 configuration registers
18715931a5c0 PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function
e2b691804319 arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dts
2ddd93481bce arm64: dts: rockchip: rename rfkill label for Radxa ROCK 5B
47e1bb6b4ba0 phy: stm32: Add support for STM32MP25 COMBOPHY.
4e893545ef87 PCI/NPEM: Add Native PCIe Enclosure Management support
5560a612c20d PCI: pciehp: Retain Power Indicator bits for userspace indicators
e2596dcf1e9d PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device
5904de0d735b PM: hibernate: Do not get block device exclusively in test_resume mode
487d828d751d cxl/doe: Request exclusive DOE access
278294798ac9 PCI: Allow drivers to request exclusive config regions
e70b6693cec2 firewire: Add dummy read_csr/write_csr functions
8f187163eb89 nouveau/svm: implement atomic SVM access
05459351ce30 dma-buf: Document dma-buf implicit fencing/resv fencing rules
]

202/4 2026/09/08 10:11 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 43672
							output: 29
							thoughts: 31
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Investigating Potential Synchronization Issues**

Alright, time to dive in. I need to get to the bottom of this. I'm thinking, let's hit the Git log and start with some focused searches. The goal here is likely to understand how synchronization primitives are handled, potentially in error conditions or edge cases. "futex" is a solid starting point; it's a fundamental user-space locking mechanism on Linux, and any interactions with it could be relevant. "Abort" is key; it's a common term for any forced interruption of execution, so understanding where the system's aborting could give valuable clues. I'll also add in "SEA," which stands for Sequential Consistency, and I'll include the load/store exclusive instructions "LDXR" and "STXR." Looking for these will help uncover any interactions around shared memory or atomics that might be causing unexpected behavior, possibly indicating a concurrency bug. Hopefully, I'll find something juicy in the commit history!



203/4 2026/09/08 10:12 tool git-log
0m Args:
map[Count:20 MessageRegexps:[futex ldxr]]

Results:
map[Output:03110a5cb216 arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP
]

204/4 2026/09/08 10:12 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44008
							output: 29
							thoughts: 19
						

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

**Analyzing Git History for "Exclusive" and "Abort"**

Right, let's dive in. I need to get a clear picture of how "exclusive" and "abort" are being used in this codebase. My immediate thought is to leverage the Git log. A simple grep, searching commit messages, should be the most direct approach to pinpointing those keywords. I want to see how these terms are being used in context. Are we talking about exclusive locks, exclusive access to resources? Is "abort" related to transaction rollbacks, error handling, or something else entirely? A quick search across the entire history will provide a solid overview, revealing the patterns and potentially illuminating some important design decisions or historical issues. It's a fundamental step for understanding the evolution of this system. From there I'll have a much better framework for in depth analysis.



205/4 2026/09/08 10:12 tool git-log
0m Args:
map[Count:20 MessageRegexps:[exclusive External Abort]]

Results:
map[Output:]

206/4 2026/09/08 10:12 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44262
							output: 28
							thoughts: 21
						

Thoughts:
Here's my thought process, summarized as you requested:

**Regex Search Strategy**

Okay, time to get to work. I need to find something specific, and my first instinct is to use regular expressions. To be efficient, I'll go with a case-insensitive search. That way, I don't have to worry about accidentally missing "Exclusive" if it's capitalized. The two key terms I'm targeting are "exclusive" and "external abort." Using lowercase in the regex ensures I capture all variations. Hopefully, this approach will be precise enough without getting too complex. Let's see what this yields.



207/4 2026/09/08 10:12 tool git-log
0m Args:
map[Count:20 MessageRegexps:[exclusive external abort]]

Results:
map[Output:]

208/4 2026/09/08 10:13 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 44455
							output: 27
							thoughts: 16
						

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

**Analyzing the Git Log for Specific Activity**

Alright, I need to dig into the project's history. I'm thinking I'll use `git log` to find some specific changes. I want to narrow things down, and I have a hunch that certain commits might be relevant. My gut feeling is that there could be some activity related to the "exclusive" functionality, maybe some access controls or special features. Additionally, "SEA" feels significant for whatever project I am reviewing and it is a good starting point. I can quickly scan for changes relating to these two terms. It is the best starting point I have at the moment. This is the first, logical step to try.



209/4 2026/09/08 10:13 tool git-log
0m Args:
map[Count:20 MessageRegexps:[exclusive SEA]]

Results:
map[Output:4332cf75e4da fuse: give wakeup hints to the scheduler for synchronous requests
3628215f7fc6 selftests/mm: add userfaultfd RWP tests
763f43865fc4 mm: preserve RWP marker across PTE rewrites
0aaedada606a KVM: VMX: Cap VMX preemption timer to work around Intel erratum
97eafb59d41e RDMA/bnxt_re: Replace per-device hash tables with per-context XArrays
0f0893ac5af3 KVM: guest_memfd: Pass the number of pages instead of the end pfn into .invalidate()
e428f9779a43 KVM: x86/mmu: Consume the locked rmap value in the lockless rmap walk
f5bcf539484d fs/resctrl: Prevent use-after-free in rdtgroup_kn_put()
781ee15bd9a9 KVM: x86: Move LLDT assembly wrappers into VMX
9bc3ce2c5d3d x86/virt/seamldr: Introduce a wrapper for P-SEAMLDR SEAMCALLs
6eae9ce9461c KVM: TDX: Drop kvm_x86_ops.remove_external_spte()
41367d77ee4e KVM: x86/mmu: Drop KVM_BUG_ON() on shared lock to zap child external PTEs
28c77a037804 KVM: x86/tdp_mmu: Centrally propagate to-present/atomic zap updates to external PTEs
ef6400ca25a1 netfilter: nf_conntrack_irc: fix parse_dcc() off-by-one OOB read
02eaaffdd865 KVM: x86/mmu: Update iter->old_spte if cmpxchg64 on mirror SPTE "fails"
5abb70c8f758 watchdog: gpio_wdt: add ACPI support
4db2f8a016dc lockd: Move share.h from include/linux/lockd/ to fs/lockd/
4c7e0e081889 net: stmmac: mdio: convert MDC clock divisor selection to tables
428afac5a8ea KVM: x86: Move bulk of emergency virtualizaton logic to virt subsystem
52de184badc4 KVM: SVM: Mark module parameters as __ro_after_init for security and performance
]

210/4 2026/09/08 10:13 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 45288
							output: 23
							thoughts: 31
						

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

**Digging into the ARM64 Kernel Panic**

Alright, time to troubleshoot this memory abort issue on ARM64. Before I dive into the kernel source directly, I need to take a structured approach. My first instinct, as always, is to check the documentation. Given this is a memory abort, I need to see what's documented, if anything, about ARM64-specific memory abort handling. We can never rule out platform differences. I will check `Documentation/` and see if anything pops out related to futexes or even render nodes. Specifically, I'm thinking: Are there any known gotchas or documented caveats related to how these interact on ARM64 that might shed light on this? Is there a particular section devoted to error conditions or troubleshooting? If I'm lucky, there'll be a dedicated section to memory aborts. Let's see what the documentation holds before I have to get dirty with the code.



211/4 2026/09/08 10:13 tool grepper
0m Args:
map[Expression:external abort PathPrefix:Documentation]

Results:
map[Output:Documentation/virt/kvm/api.rst=1237=will return -EINVAL.
Documentation/virt/kvm/api.rst-1238-
Documentation/virt/kvm/api.rst:1239:It is not possible to read back a pending external abort (injected via
Documentation/virt/kvm/api.rst-1240-KVM_SET_VCPU_EVENTS or otherwise) because such an exception is always delivered
--
Documentation/virt/kvm/api.rst=1314=information or because there is no device mapped at the accessed IPA, then
Documentation/virt/kvm/api.rst:1315:userspace can ask the kernel to inject an external abort using the address
Documentation/virt/kvm/api.rst-1316-from the exiting fault on the VCPU. It is a programming error to set
--
Documentation/virt/kvm/api.rst=7216=caused access outside the guest memory areas which should lead to a more
Documentation/virt/kvm/api.rst:7217:meaningful warning message and an external abort in the guest, if the access
Documentation/virt/kvm/api.rst-7218-did not fall within an I/O window.
--
Documentation/virt/kvm/api.rst=7475=enabled, a KVM exits to userspace if a guest access causes a synchronous
Documentation/virt/kvm/api.rst:7476:external abort (SEA) and the host APEI fails to handle the SEA.
Documentation/virt/kvm/api.rst-7477-
]

212/4 2026/09/08 10:13 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 45950
							output: 55
							thoughts: 2088
						

Thoughts:
**Analysis of PCIe VRAM Access and Futex on ARM64**

Okay, so the question before me delves into a specific scenario: can an unprivileged user, on an ARM64 system, allocate and map Video RAM (VRAM) over PCIe using DRM render nodes (like those provided by `amdgpu` or `nouveau`), and then subsequently use the `futex` syscall on that mapped memory? The core of the issue hinges on how the memory is mapped and the implications of exclusive access instructions (like `ldxr`) used by the kernel's `futex` implementation when dealing with this type of memory.

First, I need to confirm the premise. DRM render nodes are explicitly designed to allow unprivileged processes to tap into GPU hardware acceleration, which is a great starting point for the user's intent. Drivers like `amdgpu` and `nouveau` expose the necessary IOCTLs to allocate and map VRAM. This mapping uses `pgprot_writecombine`, which, on ARM64, translates to `MT_NORMAL_NC` – Normal Non-Cacheable memory. This is critical as it defines how memory transactions are handled.

Next, the user is wondering if the futex call will work. I know that an unprivileged user *can* pass a VRAM address to the `futex` system call and the code will happily accept it, assuming that the memory at that address is accessible to the current process.

Now for the crucial part: what happens when the `futex` code, specifically the atomic operations, tries to read or modify the VRAM using exclusive load/store instructions like `ldxr` on that `MT_NORMAL_NC` mapped memory? On ARM64, `ldxr` operations, especially those related to shared resources, trigger the need for a global exclusive monitor, which is *not* present at the PCIe bus level. Since VRAM, mapped over PCIe, lacks the exclusive access features needed, the processor emits an exclusive read transaction onto the system bus. The system interconnect, when confronted with an exclusive read on a device that doesn't support them (PCIe, in this case), will return an error—a `DECERR` or `SLVERR`. This error triggers a Synchronous External Abort (SEA) on the ARM64 CPU.

Here's the problem: when a Synchronous External Abort occurs *inside kernel code* during an atomic operation (specifically from `ldxr`), the kernel's `do_sea()` function is called. The `do_sea` function, however, does not include any specific exception handling for this type of issue. The kernel then calls `arm64_notify_die`, which leads to a `die()` call because the fault occurred in kernel code (the futex path). This ends up in a **kernel panic**, which is a denial-of-service vulnerability.

The user is right to ask the question as it uncovers a potential problem with unprivileged users accessing PCIe VRAM and then using futexes. This could allow an unprivileged user to crash the system with very little effort. I need to make sure to search for existing reports or patches for similar problems, or any mitigations that might exist within the Linux kernel code. I'll need to check the git log and other relevant documentation to confirm this potential vulnerability.



213/4 2026/09/08 10:13 tool grepper
0m Args:
map[Expression:ESR_ELx_FSC_EXTABT|ESR_ELx_EC_DABT_LOW|do_sea PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/esr.h-47-/* Unallocated EC: 0x23 */
arch/arm64/include/asm/esr.h:48:#define ESR_ELx_EC_DABT_LOW	UL(0x24)
arch/arm64/include/asm/esr.h-49-#define ESR_ELx_EC_DABT_CUR	UL(0x25)
--
arch/arm64/include/asm/esr.h-117-#define ESR_ELx_FSC_LEVEL	(0x03)
arch/arm64/include/asm/esr.h:118:#define ESR_ELx_FSC_EXTABT	(0x10)
arch/arm64/include/asm/esr.h-119-#define ESR_ELx_FSC_MTE		(0x11)
--
arch/arm64/include/asm/esr.h=445=static inline bool esr_is_data_abort(unsigned long esr)
--
arch/arm64/include/asm/esr.h-448-
arch/arm64/include/asm/esr.h:449:	return ec == ESR_ELx_EC_DABT_LOW || ec == ESR_ELx_EC_DABT_CUR;
arch/arm64/include/asm/esr.h-450-}
--
arch/arm64/include/asm/kvm_emulate.h=480=static __always_inline bool kvm_vcpu_abt_issea(const struct kvm_vcpu *vcpu)
--
arch/arm64/include/asm/kvm_emulate.h-482-	switch (kvm_vcpu_trap_get_fault(vcpu)) {
arch/arm64/include/asm/kvm_emulate.h:483:	case ESR_ELx_FSC_EXTABT:
arch/arm64/include/asm/kvm_emulate.h-484-	case ESR_ELx_FSC_SEA_TTW(-1) ... ESR_ELx_FSC_SEA_TTW(3):
--
arch/arm64/kernel/acpi.c=295=void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
--
arch/arm64/kernel/acpi.c-385- *
arch/arm64/kernel/acpi.c:386: * Used by KVM and the arch do_sea handler.
arch/arm64/kernel/acpi.c-387- * @regs may be NULL when called from process context.
--
arch/arm64/kernel/entry-common.c=771=asmlinkage void noinstr el0t_64_sync_handler(struct pt_regs *regs)
--
arch/arm64/kernel/entry-common.c-778-		break;
arch/arm64/kernel/entry-common.c:779:	case ESR_ELx_EC_DABT_LOW:
arch/arm64/kernel/entry-common.c-780-		el0_da(regs, esr);
--
arch/arm64/kernel/entry-common.c=921=asmlinkage void noinstr el0t_32_sync_handler(struct pt_regs *regs)
--
arch/arm64/kernel/entry-common.c-928-		break;
arch/arm64/kernel/entry-common.c:929:	case ESR_ELx_EC_DABT_LOW:
arch/arm64/kernel/entry-common.c-930-		el0_da(regs, esr);
--
arch/arm64/kernel/traps.c=832=static const char *esr_class_str[] = {
--
arch/arm64/kernel/traps.c-860-	[ESR_ELx_EC_PC_ALIGN]		= "PC Alignment",
arch/arm64/kernel/traps.c:861:	[ESR_ELx_EC_DABT_LOW]		= "DABT (lower EL)",
arch/arm64/kernel/traps.c-862-	[ESR_ELx_EC_DABT_CUR]		= "DABT (current EL)",
--
arch/arm64/kvm/emulate-nested.c=2957=int kvm_inject_nested_sea(struct kvm_vcpu *vcpu, bool iabt, u64 addr)
--
arch/arm64/kvm/emulate-nested.c-2959-	u64 esr = FIELD_PREP(ESR_ELx_EC_MASK,
arch/arm64/kvm/emulate-nested.c:2960:			     iabt ? ESR_ELx_EC_IABT_LOW : ESR_ELx_EC_DABT_LOW);
arch/arm64/kvm/emulate-nested.c:2961:	esr |= ESR_ELx_FSC_EXTABT | ESR_ELx_IL;
arch/arm64/kvm/emulate-nested.c-2962-
--
arch/arm64/kvm/handle_exit.c=376=static exit_handle_fn arm_exit_handlers[] = {
--
arch/arm64/kvm/handle_exit.c-394-	[ESR_ELx_EC_IABT_LOW]	= kvm_handle_guest_abort,
arch/arm64/kvm/handle_exit.c:395:	[ESR_ELx_EC_DABT_LOW]	= kvm_handle_guest_abort,
arch/arm64/kvm/handle_exit.c-396-	[ESR_ELx_EC_DABT_CUR]	= kvm_handle_vncr_abort,
--
arch/arm64/kvm/hyp/include/hyp/fault.h=15=static inline bool __fault_safe_to_translate(u64 esr)
--
arch/arm64/kvm/hyp/include/hyp/fault.h-21-
arch/arm64/kvm/hyp/include/hyp/fault.h:22:	return !(fsc == ESR_ELx_FSC_EXTABT && (esr & ESR_ELx_FnV));
arch/arm64/kvm/hyp/include/hyp/fault.h-23-}
--
arch/arm64/kvm/hyp/nvhe/hyp-main.c=1110=void handle_trap(struct kvm_cpu_context *host_ctxt)
--
arch/arm64/kvm/hyp/nvhe/hyp-main.c-1124-	case ESR_ELx_EC_IABT_LOW:
arch/arm64/kvm/hyp/nvhe/hyp-main.c:1125:	case ESR_ELx_EC_DABT_LOW:
arch/arm64/kvm/hyp/nvhe/hyp-main.c-1126-		trace_hyp_enter(host_ctxt, HYP_REASON_HOST_ABORT);
--
arch/arm64/kvm/hyp/nvhe/mem_protect.c=722=static void host_inject_mem_abort(struct kvm_cpu_context *host_ctxt)
--
arch/arm64/kvm/hyp/nvhe/mem_protect.c-731-		ec = ESR_ELx_EC(esr);
arch/arm64/kvm/hyp/nvhe/mem_protect.c:732:		if (ec == ESR_ELx_EC_DABT_LOW)
arch/arm64/kvm/hyp/nvhe/mem_protect.c-733-			ec = ESR_ELx_EC_DABT_CUR;
--
arch/arm64/kvm/hyp/nvhe/mem_protect.c=934=int __pkvm_vcpu_in_poison_fault(struct pkvm_hyp_vcpu *hyp_vcpu)
--
arch/arm64/kvm/hyp/nvhe/mem_protect.c-942-	switch (kvm_vcpu_trap_get_class(&hyp_vcpu->vcpu)) {
arch/arm64/kvm/hyp/nvhe/mem_protect.c:943:	case ESR_ELx_EC_DABT_LOW:
arch/arm64/kvm/hyp/nvhe/mem_protect.c-944-	case ESR_ELx_EC_IABT_LOW:
--
arch/arm64/kvm/hyp/nvhe/pkvm.c=1066=static u64 __pkvm_memshare_page_req(struct kvm_vcpu *vcpu, u64 ipa)
--
arch/arm64/kvm/hyp/nvhe/pkvm.c-1070-	/* Fake up a data abort (level 3 translation fault on write) */
arch/arm64/kvm/hyp/nvhe/pkvm.c:1071:	vcpu->arch.fault.esr_el2 = (ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT) |
arch/arm64/kvm/hyp/nvhe/pkvm.c-1072-				   ESR_ELx_IL | ESR_ELx_WNR |
--
arch/arm64/kvm/hyp/nvhe/switch.c=194=static const exit_handler_fn hyp_exit_handlers[] = {
--
arch/arm64/kvm/hyp/nvhe/switch.c-200-	[ESR_ELx_EC_IABT_LOW]		= kvm_hyp_handle_iabt_low,
arch/arm64/kvm/hyp/nvhe/switch.c:201:	[ESR_ELx_EC_DABT_LOW]		= kvm_hyp_handle_dabt_low,
arch/arm64/kvm/hyp/nvhe/switch.c-202-	[ESR_ELx_EC_WATCHPT_LOW]	= kvm_hyp_handle_watchpt_low,
--
arch/arm64/kvm/hyp/nvhe/switch.c=206=static const exit_handler_fn pvm_exit_handlers[] = {
--
arch/arm64/kvm/hyp/nvhe/switch.c-212-	[ESR_ELx_EC_IABT_LOW]		= kvm_hyp_handle_iabt_low,
arch/arm64/kvm/hyp/nvhe/switch.c:213:	[ESR_ELx_EC_DABT_LOW]		= kvm_hyp_handle_dabt_low,
arch/arm64/kvm/hyp/nvhe/switch.c-214-	[ESR_ELx_EC_WATCHPT_LOW]	= kvm_hyp_handle_watchpt_low,
--
arch/arm64/kvm/hyp/vhe/switch.c=540=static const exit_handler_fn hyp_exit_handlers[] = {
--
arch/arm64/kvm/hyp/vhe/switch.c-546-	[ESR_ELx_EC_IABT_LOW]		= kvm_hyp_handle_iabt_low,
arch/arm64/kvm/hyp/vhe/switch.c:547:	[ESR_ELx_EC_DABT_LOW]		= kvm_hyp_handle_dabt_low,
arch/arm64/kvm/hyp/vhe/switch.c-548-	[ESR_ELx_EC_WATCHPT_LOW]	= kvm_hyp_handle_watchpt_low,
--
arch/arm64/kvm/inject_fault.c=105=static void inject_abt64(struct kvm_vcpu *vcpu, bool is_iabt, unsigned long addr)
--
arch/arm64/kvm/inject_fault.c-130-	} else {
arch/arm64/kvm/inject_fault.c:131:		fsc = ESR_ELx_FSC_EXTABT;
arch/arm64/kvm/inject_fault.c-132-	}
--
arch/arm64/kvm/inject_fault.c-155-	if (!is_iabt)
arch/arm64/kvm/inject_fault.c:156:		esr |= ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT;
arch/arm64/kvm/inject_fault.c-157-
--
arch/arm64/kvm/inject_fault.c=252=static int kvm_inject_nested_excl_atomic(struct kvm_vcpu *vcpu, u64 addr)
arch/arm64/kvm/inject_fault.c-253-{
arch/arm64/kvm/inject_fault.c:254:	u64 esr = FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_DABT_LOW) |
arch/arm64/kvm/inject_fault.c-255-		  FIELD_PREP(ESR_ELx_FSC, ESR_ELx_FSC_EXCL_ATOMIC) |
--
arch/arm64/kvm/nested.c=1412=static int kvm_translate_vncr(struct kvm_vcpu *vcpu, bool *is_gmem)
--
arch/arm64/kvm/nested.c-1460-	if (!memslot) {
arch/arm64/kvm/nested.c:1461:		fail_s1_walk(&vt->wr, ESR_ELx_FSC_EXTABT, false);
arch/arm64/kvm/nested.c-1462-		return -EFAULT;
--
arch/arm64/kvm/nested.c-1469-		if (is_error_noslot_pfn(pfn)) {
arch/arm64/kvm/nested.c:1470:			fail_s1_walk(&vt->wr, ESR_ELx_FSC_EXTABT, false);
arch/arm64/kvm/nested.c-1471-			return -EFAULT;
--
arch/arm64/kvm/nested.c-1490-		kvm_release_faultin_page(vcpu->kvm, page, true, false);
arch/arm64/kvm/nested.c:1491:		fail_s1_walk(&vt->wr, ESR_ELx_FSC_EXTABT, false);
arch/arm64/kvm/nested.c-1492-		return -EINVAL;
--
arch/arm64/kvm/nested.c=1517=static void handle_vncr_perm(struct kvm_vcpu *vcpu)
--
arch/arm64/kvm/nested.c-1527-	if (kvm_is_write_fault(vcpu) && vt->wr.pw && !vt->hpa_writable)
arch/arm64/kvm/nested.c:1528:		fsc = ESR_ELx_FSC_EXTABT;
arch/arm64/kvm/nested.c-1529-	/*
--
arch/arm64/mm/fault.c=461=static void set_thread_esr(unsigned long address, unsigned long esr)
--
arch/arm64/mm/fault.c-478-		switch (ESR_ELx_EC(esr)) {
arch/arm64/mm/fault.c:479:		case ESR_ELx_EC_DABT_LOW:
arch/arm64/mm/fault.c-480-			/*
--
arch/arm64/mm/fault.c=865=static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-869-
arch/arm64/mm/fault.c:870:static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
arch/arm64/mm/fault.c-871-{
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-933-	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
arch/arm64/mm/fault.c:934:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
arch/arm64/mm/fault.c-935-	{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
arch/arm64/mm/fault.c-936-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 18"			},
arch/arm64/mm/fault.c:937:	{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 (translation table walk)"	},
arch/arm64/mm/fault.c:938:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 (translation table walk)"	},
arch/arm64/mm/fault.c:939:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 (translation table walk)"	},
arch/arm64/mm/fault.c:940:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 (translation table walk)"	},
arch/arm64/mm/fault.c:941:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 (translation table walk)"	},
arch/arm64/mm/fault.c:942:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous parity or ECC error" },	// Reserved when RAS is implemented
arch/arm64/mm/fault.c-943-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 25"			},
arch/arm64/mm/fault.c-944-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 26"			},
arch/arm64/mm/fault.c:945:	{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:946:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:947:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:948:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:949:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c-950-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
]

214/4 2026/09/08 10:13 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 53824
							output: 39
							thoughts: 63
						

Thoughts:
**Examining the Architecture's Exclusive Access Fault Codes**

Alright, let's dive in. I need to understand how the architecture handles exclusive access failures, specifically in the context of atomics. The first place to look is `arch/arm64/include/asm/esr.h`. Ah, there it is: `ESR_ELx_FSC_EXCL_ATOMIC`. Now, my next step is clear. I'll trace where this fault code is defined, and, more importantly, *how* it's used within the system. That should give me the information I need to understand how the hardware and software interact during those atomic operations. Knowing the context of `ESR_ELx_FSC_EXCL_ATOMIC` will be crucial to my work.



215/4 2026/09/08 10:13 tool grepper
0m Args:
map[Expression:ESR_ELx_FSC_EXCL_ATOMIC PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/esr.h-126-#define ESR_ELx_FSC_SECC_TTW(n)	(0x1c + (n))
arch/arm64/include/asm/esr.h:127:#define ESR_ELx_FSC_EXCL_ATOMIC	(0x35)
arch/arm64/include/asm/esr.h-128-#define ESR_ELx_FSC_ADDRSZ	(0x00)
--
arch/arm64/include/asm/esr.h=494=static inline bool esr_fsc_is_excl_atomic_fault(unsigned long esr)
--
arch/arm64/include/asm/esr.h-497-
arch/arm64/include/asm/esr.h:498:	return esr == ESR_ELx_FSC_EXCL_ATOMIC;
arch/arm64/include/asm/esr.h-499-}
--
arch/arm64/kvm/inject_fault.c=252=static int kvm_inject_nested_excl_atomic(struct kvm_vcpu *vcpu, u64 addr)
--
arch/arm64/kvm/inject_fault.c-254-	u64 esr = FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_DABT_LOW) |
arch/arm64/kvm/inject_fault.c:255:		  FIELD_PREP(ESR_ELx_FSC, ESR_ELx_FSC_EXCL_ATOMIC) |
arch/arm64/kvm/inject_fault.c-256-		  ESR_ELx_IL;
--
arch/arm64/kvm/inject_fault.c=271=int kvm_inject_dabt_excl_atomic(struct kvm_vcpu *vcpu, u64 addr)
--
arch/arm64/kvm/inject_fault.c-280-	esr &= ~ESR_ELx_FSC;
arch/arm64/kvm/inject_fault.c:281:	esr |= ESR_ELx_FSC_EXCL_ATOMIC;
arch/arm64/kvm/inject_fault.c-282-	vcpu_write_sys_reg(vcpu, esr, exception_esr_elx(vcpu));
]

216/4 2026/09/08 10:13 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 54721
							output: 39
							thoughts: 37
						

Thoughts:
Here's my take:

**Analyzing the Fault Information**

Okay, let's dive in. I need to understand what's happening when a memory fault occurs, so I'm heading straight to the core: `arch/arm64/mm/fault.c`, and specifically, line 965. This is where the real meat of the fault handling usually is, so let's start with `fault_info`. I need to figure out what's contained within that structure; specifically, I need to know the state of the system when the fault occurred, so I can start to diagnose what caused it. Hopefully, this entry contains enough information for me to find the root cause, but I'll have to see.



217/4 2026/09/08 10:13 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:950 LineCount:40]

Results:
map[Contents: 950:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
 951:		{ do_alignment_fault,	SIGBUS,  BUS_ADRALN,	"alignment fault"		},
 952:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 34"			},
 953:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 35"			},
 954:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 36"			},
 955:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 37"			},
 956:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 38"			},
 957:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 39"			},
 958:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 40"			},
 959:		{ do_bad,		SIGKILL, SI_KERNEL,	"level -1 address size fault"	},
 960:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 42"			},
 961:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level -1 translation fault"	},
 962:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 44"			},
 963:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 45"			},
 964:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 46"			},
 965:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 47"			},
 966:		{ do_bad,		SIGKILL, SI_KERNEL,	"TLB conflict abort"		},
 967:		{ do_bad,		SIGKILL, SI_KERNEL,	"Unsupported atomic hardware update fault"	},
 968:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 50"			},
 969:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 51"			},
 970:		{ do_bad,		SIGKILL, SI_KERNEL,	"implementation fault (lockdown abort)" },
 971:		{ do_bad,		SIGBUS,  BUS_OBJERR,	"implementation fault (unsupported exclusive)" },
 972:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 54"			},
 973:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 55"			},
 974:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 56"			},
 975:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 57"			},
 976:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 58" 			},
 977:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 59"			},
 978:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 60"			},
 979:		{ do_bad,		SIGKILL, SI_KERNEL,	"section domain fault"		},
 980:		{ do_bad,		SIGKILL, SI_KERNEL,	"page domain fault"		},
 981:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 63"			},
 982:	};
 983:	
 984:	void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
 985:	{
 986:		const struct fault_info *inf = esr_to_fault_info(esr);
 987:		unsigned long addr = untagged_addr(far);
 988:	
 989:		if (!inf->fn(far, esr, regs))
]

218/4 2026/09/08 10:13 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 56034
							output: 39
							thoughts: 121
						

Thoughts:
**Analyzing a Kernel Fault in ARM64 Architecture**

Alright, let's dive into this kernel crash. My immediate focus is on `arch/arm64/mm/fault.c`. The error seems related to a memory access fault. The first clue is lines 971, specifically this section: `{ do_bad, SIGBUS, BUS_OBJERR, "implementation fault (unsupported exclusive)" }`. A DFSC of 0x35 (decimal 53) suggests some kind of "implementation fault" tied to unsupported exclusive access. That's interesting, and I'll need to dig deeper into what specific exclusive access instruction is causing trouble.

Now, I need to see what's happening within `do_mem_abort`. It looks like I need to read lines 984 to 1020 of `arch/arm64/mm/fault.c`. My hunch is that `do_mem_abort` is the function handling this kind of memory abort, which includes figuring out how to handle the error, and probably signaling to the process. Let's see if this explains this particular "implementation fault (unsupported exclusive)" further. I bet there's some useful code here about how memory accesses are handled that may explain how to debug this issue.



219/4 2026/09/08 10:13 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:984 LineCount:40]

Results:
map[Contents: 984:	void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
 985:	{
 986:		const struct fault_info *inf = esr_to_fault_info(esr);
 987:		unsigned long addr = untagged_addr(far);
 988:	
 989:		if (!inf->fn(far, esr, regs))
 990:			return;
 991:	
 992:		if (!user_mode(regs))
 993:			die_kernel_fault(inf->name, addr, esr, regs);
 994:	
 995:		/*
 996:		 * At this point we have an unrecognized fault type whose tag bits may
 997:		 * have been defined as UNKNOWN. Therefore we only expose the untagged
 998:		 * address to the signal handler.
 999:		 */
1000:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, addr, esr);
1001:	}
1002:	NOKPROBE_SYMBOL(do_mem_abort);
1003:	
1004:	void do_sp_pc_abort(unsigned long addr, unsigned long esr, struct pt_regs *regs)
1005:	{
1006:		arm64_notify_die("SP/PC alignment exception", regs, SIGBUS, BUS_ADRALN,
1007:				 addr, esr);
1008:	}
1009:	NOKPROBE_SYMBOL(do_sp_pc_abort);
1010:	
1011:	/*
1012:	 * Used during anonymous page fault handling.
1013:	 */
1014:	struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
1015:							unsigned long vaddr)
1016:	{
1017:		gfp_t flags = GFP_HIGHUSER_MOVABLE | __GFP_ZERO;
1018:	
1019:		/*
1020:		 * If the page is mapped with PROT_MTE, initialise the tags at the
1021:		 * point of allocation and page zeroing as this is usually faster than
1022:		 * separate DC ZVA and STGM.
1023:		 */
]

220/4 2026/09/08 10:13 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 57112
							output: 1251
							thoughts: 3682
						

Thoughts:
**Comprehensive Analysis of Futex, PCIe, and ARM64 Memory Access**

Alright, let's break this down systematically. My concern here is the potential for a denial-of-service vulnerability due to how the kernel handles atomic operations when interacting with memory-mapped PCIe devices, specifically within the `futex` implementation.

First, an unprivileged user can absolutely leverage DRM render nodes to allocate and `mmap` VRAM over PCIe. Drivers like `amdgpu` and `nouveau` explicitly permit unprivileged access to these devices (`/dev/dri/renderD*`). They can create VRAM buffers using GEM APIs (`AMDGPU_GEM_CREATE`, `NOUVEAU_GEM_NEW`) and then `mmap` them, and the DRM framework maps VRAM with `pgprot_writecombine()`, which translates to the `MT_NORMAL_NC` (Normal Non-Cacheable) memory attribute on ARM64. This is crucial: we're bypassing the caches.

Now, a user can call `futex` with a pointer (`uaddr`) to this `mmap`-ed VRAM. Critically, for process-private futexes (which are the default), `get_futex_key()` within `kernel/futex/core.c` *does not* validate the VMA or use `get_user_pages()`. It just does a quick pointer alignment and access check. That's a huge oversight, since we're giving the kernel a user-space address directly into this PCIe-mapped memory.

The core of the problem lies in how the ARM64 architecture handles atomic operations on Normal Non-Cacheable memory, and the limitations of PCIe. The kernel's `futex` implementation relies on atomic primitives, like Load-Exclusive/Store-Exclusive (`ldxr`/`stlxr` or even `casalt` if LSUI is enabled) instructions. These exclusive instructions, when operating on Normal Non-Cacheable memory, rely on a *Global Exclusive Monitor*. This monitor tracks exclusive access to memory regions. However, PCIe does *not* support the AMBA/AXI exclusive access transactions needed to make this work. When the ARM64 CPU attempts an `LDXR` to a Normal Non-Cacheable address mapped to PCIe VRAM, it sends an exclusive read transaction. The PCIe bus, or more accurately the interconnect and PCIe root complex, *cannot* service exclusive reads and will return a bus error, typically a `SLVERR` (Slave Error) or `DECERR` (Decode Error).

This is where the crash happens: the CPU, encountering this error response, raises a synchronous data abort, specifically a Synchronous External Abort (SEA), with DFSC = 0x10 or 0x35. The ARM64 kernel is running in EL1 (kernel mode). `do_sea()` handles these exceptions. Importantly, `do_sea()` does not consult the kernel's normal exception fixup tables. It calls `arm64_notify_die()`. Because we are in kernel mode, `arm64_notify_die()` calls `die()`, leading to a kernel panic. There is no protection.

So, the user-space program successfully requests a futex wait on the mmap-ed vram. Because of the normal-non-cacheable mapping, the futex code attempts a load-exclusive on the vram. The PCIe bus rejects this transaction as an unsupported feature, causing a synchronous external abort. The kernel handles this abort, finds that the program was in the kernel (EL1) when it attempted the load-exclusive, and crashes.

In summary, an unprivileged user can trigger a kernel panic by calling `futex()` on memory mapped as write-combine on PCIe VRAM due to the mismatch between the ARM64 architecture's exclusive access mechanism and PCIe's limitations and the kernel not correctly handling the resulting synchronous external abort.



221/4 2026/09/08 10:14 tool set-results
0m Args:
map[Answer:Yes, an unprivileged user can allocate and mmap VRAM over PCIe and call futex on it, and doing so will trigger a Synchronous External Abort (SEA) on ARM64 when the kernel executes `ldxr`, resulting in a kernel panic/crash.

### 1. Unprivileged Allocation and `mmap` of VRAM over PCIe
- **DRM Render Nodes (`/dev/dri/renderD*`):** DRM render nodes are specifically designed for unprivileged clients (such as user-space graphics, compute, and Vulkan/OpenGL drivers) to allocate GPU buffers without requiring root privileges or DRM master capabilities (`CAP_SYS_ADMIN`).
- **VRAM Allocation & Mapping:** Drivers like `amdgpu` and `nouveau` expose ioctls with `DRM_RENDER_ALLOW` (e.g., `DRM_IOCTL_AMDGPU_GEM_CREATE` with domain `AMDGPU_GEM_DOMAIN_VRAM`, `AMDGPU_GEM_MMAP`, `NOUVEAU_GEM_NEW`). An unprivileged user can create a GEM buffer residing in PCIe VRAM and obtain a mmap offset.
- **Page Protection (`pgprot_writecombine`):** In DRM/TTM (`ttm_prot_from_caching()`), VRAM allocations are mapped to user space using `pgprot_writecombine()`. On ARM64 (`arch/arm64/include/asm/pgtable.h`), `pgprot_writecombine()` sets the memory attribute to **`MT_NORMAL_NC`** (Normal Non-Cacheable) with `VM_IO | VM_PFNMAP`.

### 2. Calling `futex` on the Mapped Memory
- An unprivileged process can pass the mmapped VRAM pointer (`uaddr`) to the `futex` system call (e.g., `futex(uaddr, FUTEX_WAIT_PRIVATE, ...)` or `futex(uaddr, FUTEX_WAKE_OP_PRIVATE, ...)`).
- In `kernel/futex/core.c::get_futex_key()`:
  - For process-private futexes (`FUTEX_PRIVATE_FLAG`, which is the standard default), the kernel does **not** validate the VMA or call `get_user_pages()`.
  - It only validates alignment and `access_ok(uaddr, size)`, sets `key->private.mm = current->mm` and `key->private.address = address`, and returns `0` (success).
- The kernel then proceeds to perform user-space atomic read/modify/cmpxchg operations directly in kernel context (EL1) via `arch_futex_atomic_op_inuser()` or `futex_atomic_cmpxchg_inatomic()`.
- On ARM64 (`arch/arm64/include/asm/futex.h`), these operations execute atomic sequences using Load-Exclusive / Store-Exclusive instructions (`ldxr` and `stlxr` in `__llsc_futex_atomic_op` and `__llsc_futex_cmpxchg`).

### 3. Why `ldxr` Triggers a Synchronous External Abort (SEA) and Panics the Kernel
- **ARM Exclusive Monitors & Non-Cacheable Memory:**
  - On ARMv8/ARMv9 architectures, exclusive instructions (`LDXR`/`STXR`) on Cacheable memory are managed by the core's local exclusive monitor and cache coherency.
  - For **Normal Non-Cacheable** (`MT_NORMAL_NC`) and Device memory, the access bypasses local CPU caches and requires a **Global Exclusive Monitor** in the system memory interconnect.
  - When the ARM64 CPU executes `ldxr` on an address mapped as `MT_NORMAL_NC` backed by PCIe VRAM, it emits an exclusive read transaction (e.g., AXI `ARLOCK`) onto the system interconnect destined for the PCIe Root Complex / host bridge.
- **PCIe Lack of Exclusive Access Support:**
  - The PCI Express specification does not support AMBA/AXI exclusive lock transactions or global exclusive monitors.
  - When the PCIe host bridge / interconnect receives an exclusive read request destined for a PCIe BAR / VRAM slave that does not support exclusive accesses, the bridge responds with an error response (such as AXI `SLVERR` / `DECERR`).
- **Synchronous External Abort (SEA):**
  - Upon receiving the bus error response on `ldxr`, the ARM CPU generates a **Synchronous External Abort** (Data Abort with `ESR_ELx_FSC_EXTABT` or unsupported exclusive abort `ESR_ELx_FSC_EXCL_ATOMIC`).
- **Kernel Panic / Fatal Result:**
  - Since `ldxr` was executed in EL1 (kernel mode) in the futex routines, the abort is taken at `ESR_ELx_EC_DABT_CUR`.
  - In `arch/arm64/mm/fault.c`, `do_sea()` handles Synchronous External Aborts. Unlike page faults, `do_sea()` does **not** invoke the kernel's exception fixup tables (`_ASM_EXTABLE_UACCESS_ERR`).
  - Instead, `do_sea()` calls `arm64_notify_die()`, which checks `!user_mode(regs)` and immediately calls `die()` (kernel oops / panic).
  - (In contrast, executing `ldxr` directly in user space at EL0 causes `do_sea()` to deliver a `SIGBUS` to the user process rather than crashing the kernel).]

Results:
map[Answer:Yes, an unprivileged user can allocate and mmap VRAM over PCIe and call futex on it, and doing so will trigger a Synchronous External Abort (SEA) on ARM64 when the kernel executes `ldxr`, resulting in a kernel panic/crash.

### 1. Unprivileged Allocation and `mmap` of VRAM over PCIe
- **DRM Render Nodes (`/dev/dri/renderD*`):** DRM render nodes are specifically designed for unprivileged clients (such as user-space graphics, compute, and Vulkan/OpenGL drivers) to allocate GPU buffers without requiring root privileges or DRM master capabilities (`CAP_SYS_ADMIN`).
- **VRAM Allocation & Mapping:** Drivers like `amdgpu` and `nouveau` expose ioctls with `DRM_RENDER_ALLOW` (e.g., `DRM_IOCTL_AMDGPU_GEM_CREATE` with domain `AMDGPU_GEM_DOMAIN_VRAM`, `AMDGPU_GEM_MMAP`, `NOUVEAU_GEM_NEW`). An unprivileged user can create a GEM buffer residing in PCIe VRAM and obtain a mmap offset.
- **Page Protection (`pgprot_writecombine`):** In DRM/TTM (`ttm_prot_from_caching()`), VRAM allocations are mapped to user space using `pgprot_writecombine()`. On ARM64 (`arch/arm64/include/asm/pgtable.h`), `pgprot_writecombine()` sets the memory attribute to **`MT_NORMAL_NC`** (Normal Non-Cacheable) with `VM_IO | VM_PFNMAP`.

### 2. Calling `futex` on the Mapped Memory
- An unprivileged process can pass the mmapped VRAM pointer (`uaddr`) to the `futex` system call (e.g., `futex(uaddr, FUTEX_WAIT_PRIVATE, ...)` or `futex(uaddr, FUTEX_WAKE_OP_PRIVATE, ...)`).
- In `kernel/futex/core.c::get_futex_key()`:
  - For process-private futexes (`FUTEX_PRIVATE_FLAG`, which is the standard default), the kernel does **not** validate the VMA or call `get_user_pages()`.
  - It only validates alignment and `access_ok(uaddr, size)`, sets `key->private.mm = current->mm` and `key->private.address = address`, and returns `0` (success).
- The kernel then proceeds to perform user-space atomic read/modify/cmpxchg operations directly in kernel context (EL1) via `arch_futex_atomic_op_inuser()` or `futex_atomic_cmpxchg_inatomic()`.
- On ARM64 (`arch/arm64/include/asm/futex.h`), these operations execute atomic sequences using Load-Exclusive / Store-Exclusive instructions (`ldxr` and `stlxr` in `__llsc_futex_atomic_op` and `__llsc_futex_cmpxchg`).

### 3. Why `ldxr` Triggers a Synchronous External Abort (SEA) and Panics the Kernel
- **ARM Exclusive Monitors & Non-Cacheable Memory:**
  - On ARMv8/ARMv9 architectures, exclusive instructions (`LDXR`/`STXR`) on Cacheable memory are managed by the core's local exclusive monitor and cache coherency.
  - For **Normal Non-Cacheable** (`MT_NORMAL_NC`) and Device memory, the access bypasses local CPU caches and requires a **Global Exclusive Monitor** in the system memory interconnect.
  - When the ARM64 CPU executes `ldxr` on an address mapped as `MT_NORMAL_NC` backed by PCIe VRAM, it emits an exclusive read transaction (e.g., AXI `ARLOCK`) onto the system interconnect destined for the PCIe Root Complex / host bridge.
- **PCIe Lack of Exclusive Access Support:**
  - The PCI Express specification does not support AMBA/AXI exclusive lock transactions or global exclusive monitors.
  - When the PCIe host bridge / interconnect receives an exclusive read request destined for a PCIe BAR / VRAM slave that does not support exclusive accesses, the bridge responds with an error response (such as AXI `SLVERR` / `DECERR`).
- **Synchronous External Abort (SEA):**
  - Upon receiving the bus error response on `ldxr`, the ARM CPU generates a **Synchronous External Abort** (Data Abort with `ESR_ELx_FSC_EXTABT` or unsupported exclusive abort `ESR_ELx_FSC_EXCL_ATOMIC`).
- **Kernel Panic / Fatal Result:**
  - Since `ldxr` was executed in EL1 (kernel mode) in the futex routines, the abort is taken at `ESR_ELx_EC_DABT_CUR`.
  - In `arch/arm64/mm/fault.c`, `do_sea()` handles Synchronous External Aborts. Unlike page faults, `do_sea()` does **not** invoke the kernel's exception fixup tables (`_ASM_EXTABLE_UACCESS_ERR`).
  - Instead, `do_sea()` calls `arm64_notify_die()`, which checks `!user_mode(regs)` and immediately calls `die()` (kernel oops / panic).
  - (In contrast, executing `ldxr` directly in user space at EL0 causes `do_sea()` to deliver a `SIGBUS` to the user process rather than crashing the kernel).]

222/2 2026/09/08 10:14 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 34072
							output: 34
							thoughts: 449
						

Thoughts:
**Kernel Crash from Futex on Device Memory? Interesting!**

Okay, so an unprivileged user can *actually* trigger a SEA and crash the kernel? And it's via mapping VRAM through a DRM render node and then calling `futex` on it? That's... concerning. I need to understand this better. Is *this* the bug report I'm looking at?

Let's see. The report shows:

```
syscall(__NR_mmap, /*addr=*/0ul, /*len=*/0x1012, /*prot=PROT_WRITE|PROT_READ*/3ul, /*flags=MAP_FIXED|MAP_SHARED*/0x11ul, /*fd=*/r[0], /*offset=*/0ul);
syscall(__NR_futex, /*addr=*/0ul, /*op=FUTEX_PRIVATE_FLAG|FUTEX_LOCK_PI*/0x86ul, /*val=*/2, /*timeout=*/0ul, /*addr2=*/0ul, /*val3=*/0xfffffffc);
```

Right, the reproducer uses sysfs to map the PCI BAR, but the *real* issue is that someone is calling `futex` on memory mapped as `pgprot_writecombine` or `pgprot_noncached`. This translates to `MT_NORMAL_NC` or `MT_DEVICE_nGnRnE`.

Hang on a second... If it's `MT_DEVICE_nGnRnE`, didn't someone, probably a code expert, mention earlier that `ldxr` on Device memory generates an Alignment fault, which is *supposed* to be handled by `fixup_exception()`? But the report says it's causing a SEA! This is a contradiction. Something isn't right here.

I have to verify this. If `ldxr` on Device memory generates an Alignment fault, how is this reproducer triggering a SEA?

Okay, the reproducer maps `/sys/bus/pci/devices/0000:00:02.0/resource0`. I need to track how `resource0` is mapped. Let's see...

In `pci_mmap_resource`, it calls `pci_mmap_resource_range`. That's the key. I need to look at `pci_mmap_resource_range` in either `drivers/pci/pci-sysfs.c` or `drivers/pci/mmap.c` to understand the details of this mapping. This is where the magic happens and where the vulnerability lies, I suspect.



223/2 2026/09/08 10:14 tool grepper
0m Args:
map[Expression:pci_mmap_resource_range PathPrefix:drivers/pci/]

Results:
map[Output:drivers/pci/mmap.c=18=static const struct vm_operations_struct pci_phys_vm_ops = {
--
drivers/pci/mmap.c-23-
drivers/pci/mmap.c:24:int pci_mmap_resource_range(struct pci_dev *pdev, int bar,
drivers/pci/mmap.c-25-			    struct vm_area_struct *vma,
--
drivers/pci/pci-sysfs.c=1153=static int pci_mmap_resource(struct kobject *kobj, const struct bin_attribute *attr,
--
drivers/pci/pci-sysfs.c-1177-
drivers/pci/pci-sysfs.c:1178:	return pci_mmap_resource_range(pdev, bar, vma, mmap_type, write_combine);
drivers/pci/pci-sysfs.c-1179-}
--
drivers/pci/proc.c=258=static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
--
drivers/pci/proc.c-304-	vma->vm_pgoff -= start >> PAGE_SHIFT;
drivers/pci/proc.c:305:	ret = pci_mmap_resource_range(dev, i, vma,
drivers/pci/proc.c-306-				  fpriv->mmap_state, write_combine);
]

224/2 2026/09/08 10:14 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35523
							output: 36
							thoughts: 27
						

Thoughts:
Okay, here's my interpretation of that thought process, assuming I'm a kernel expert:

**Diving into PCI Resource Mapping**

Alright, time to get my hands dirty. I'm going to take a look at the `pci_mmap_resource_range` function, specifically in `drivers/pci/mmap.c`. That name alone tells me this is where the PCI subsystem's memory mapping functionality lives. My gut tells me this is where the core logic exists that allows userspace to access PCI device resources directly, bypassing the standard kernel I/O mechanisms, which is crucial for high-performance devices, DMA, and specific hardware interactions. I'm hoping to get a clear picture of how the kernel handles the translation between userspace virtual addresses and the physical addresses of PCI BARs (Base Address Registers). I expect to see the usual suspects: address translation, permission checks, perhaps some considerations for caching or memory coherency, and of course, a healthy dose of locking to keep things sane in a multi-threaded environment. I'm curious to see how they handle different resource types (memory versus I/O) and potential conflicts, especially with shared interrupts. Let's see how they've implemented this.



225/2 2026/09/08 10:14 tool read-file
0m Args:
map[File:drivers/pci/mmap.c FirstLine:24 LineCount:50]

Results:
map[Contents:  24:	int pci_mmap_resource_range(struct pci_dev *pdev, int bar,
  25:				    struct vm_area_struct *vma,
  26:				    enum pci_mmap_state mmap_state, int write_combine)
  27:	{
  28:		unsigned long size;
  29:		int ret;
  30:	
  31:		size = ((pci_resource_len(pdev, bar) - 1) >> PAGE_SHIFT) + 1;
  32:		if (vma->vm_pgoff + vma_pages(vma) > size)
  33:			return -EINVAL;
  34:	
  35:		if (write_combine)
  36:			vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
  37:		else
  38:			vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
  39:	
  40:		if (mmap_state == pci_mmap_io) {
  41:			ret = pci_iobar_pfn(pdev, bar, vma);
  42:			if (ret)
  43:				return ret;
  44:		} else
  45:			vma->vm_pgoff += (pci_resource_start(pdev, bar) >> PAGE_SHIFT);
  46:	
  47:		vma->vm_ops = &pci_phys_vm_ops;
  48:	
  49:		return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
  50:					  vma->vm_end - vma->vm_start,
  51:					  vma->vm_page_prot);
  52:	}
  53:	
  54:	#endif
  55:	
  56:	#if (defined(CONFIG_SYSFS) || defined(CONFIG_PROC_FS)) && \
  57:	    (defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE))
  58:	
  59:	int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vma,
  60:			  enum pci_mmap_api mmap_api)
  61:	{
  62:		resource_size_t pci_start = 0, pci_end;
  63:		unsigned long nr, start, size;
  64:	
  65:		if (pci_resource_len(pdev, resno) == 0)
  66:			return 0;
  67:		nr = vma_pages(vma);
  68:		start = vma->vm_pgoff;
  69:		size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1;
  70:		if (mmap_api == PCI_MMAP_PROCFS) {
  71:			pci_resource_to_user(pdev, resno, &pdev->resource[resno],
  72:					     &pci_start, &pci_end);
  73:			pci_start >>= PAGE_SHIFT;
]

226/2 2026/09/08 10:14 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36730
							output: 133
							thoughts: 343
						

Thoughts:
**My Current Analysis of the PCI Mapping Issue**

Okay, so I'm looking at this PCI memory mapping scenario. From the code, `pci_mmap_resource_range` seems to use `pgprot_writecombine` if `write_combine` is true, otherwise it uses `pgprot_device`. The reproducer opens and maps `resource0`. Now, I'm tracing through this, and I see in `pci_sysfs.c` that `pci_mmap_resource_uc` is being used, specifically through `pci_dev_resource_io_attr` with a `resource0`. This means `write_combine` is explicitly set to 0. Therefore, `pgprot_device` is being employed.

On ARM64, `pgprot_device` maps to `MT_DEVICE_nGnRE`. My initial thought was that an `ldxr` instruction on `MT_DEVICE_nGnRE` should trigger an Alignment fault, and I was expecting `fixup_exception()` to handle it. However, the system is generating a SEA instead. This is where I'm getting hung up.

I need to clarify this. I'm going to ask my code expert colleague for clarification. It seems like there might be something specific about how this is handled on the ARM64 implementation, potentially some architecture-specific behavior where `ldxr` on `MT_DEVICE_nGnRE` *can* generate a SEA, or maybe there's an interaction I'm missing that is preventing the normal fault handling. I need to understand why `fixup_exception()` isn't catching the SEA.



227/2 2026/09/08 10:14 tool codeexpert
2m Args:
map[Question:If `ldxr` is executed on memory mapped with `pgprot_device` (MT_DEVICE_nGnRE) on ARM64, you mentioned it generates an Alignment fault which is handled by `fixup_exception()`. However, the bug report shows a Synchronous External Abort (SEA) occurring on `ldxr` when a PCI BAR is mapped via sysfs `resource0` (which uses `pgprot_device`). Why did it generate a SEA instead of an Alignment fault, and why wasn't it handled by `fixup_exception()`?]

Results:
map[Answer:An `ldxr` (Load-Exclusive) instruction executed on memory mapped as `pgprot_device` (`MT_DEVICE_nGnRE`) for a PCI BAR generated a Synchronous External Abort (SEA) instead of an Alignment fault, and was not handled by `fixup_exception()`, due to the following reasons:

---

### 1. Why it generated a Synchronous External Abort (SEA) instead of an Alignment Fault

1. **ARM Architecture Specification (CONSTRAINED UNPREDICTABLE):**
   Under the ARMv8/ARMv9 Architecture Reference Manual (Arm ARM), exclusive load/store instructions (`LDXR`, `STXR`, etc.) require an Exclusive Monitor. Because Device memory (`MT_DEVICE_nGnRE`, `MT_DEVICE_nGnRnE`, etc.) does not support exclusive monitors, performing an exclusive access on Device memory is architecturally **CONSTRAINED UNPREDICTABLE**. The architecture explicitly permits implementations to:
   - Generate an **Alignment fault** internally at the core/MMU stage.
   - Issue the transaction onto the system interconnect/bus as an exclusive access, which can result in an **External Abort** if unsupported by the target/interconnect.
   - Treat the instruction as a non-exclusive access.

2. **PCIe Interconnect and Host Bridge Behavior:**
   - On CPU microarchitectures that do not trap exclusive accesses to Device memory internally as Alignment faults, the CPU issues the read transaction with the exclusive attribute (e.g., via AXI/CHI interconnect) to the PCIe Host Bridge / Root Complex.
   - The **PCI Express (PCIe) protocol does not support exclusive transactions (LL/SC)** across PCI BARs.
   - When the PCIe Root Complex, host bridge, or interconnect fabric receives an exclusive transaction destined for a PCI BAR, it rejects the transaction and responds with a bus error (e.g., AXI `SLVERR` / `DECERR` or PCIe Unsupported Request / Completer Abort).
   - Upon receiving this error response from the external bus, the CPU generates a **Synchronous External Abort (SEA)** (Fault Status Code `0b010000` in `ESR_ELx`).

---

### 2. Why it wasn't handled by `fixup_exception()`

In the ARM64 Linux kernel (`arch/arm64/mm/fault.c`):

1. **Alignment Fault Path:**
   - Alignment faults (FSC `0b100001`) are dispatched via `fault_info[]` to `do_alignment_fault()`.
   - `do_alignment_fault()` calls `do_bad_area()`, which for kernel-mode exceptions calls `__do_kernel_fault()`.
   - `__do_kernel_fault()` explicitly checks the exception table:
     ```c
     if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
         return;
     ```
   - If an exception table (`extable`) entry exists for the instruction (e.g., within `copy_from_user`, `get_user`, or atomic uaccess helpers), `fixup_exception()` catches it and safely recovers (typically returning `-EFAULT`).

2. **Synchronous External Abort (SEA) Path:**
   - Synchronous External Aborts (FSC `0b010000`) are dispatched via `fault_info[]` directly to `do_sea()`.
   - SEAs are treated as severe hardware/system bus errors (machine checks) rather than software-recoverable page or alignment faults.
   - `do_sea()` sets `TAINT_MACHINE_CHECK` and directly calls `arm64_notify_die()`:
     ```c
     add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
     arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
     ```
   - `do_sea()` **does not call `fixup_exception()`** or `__do_kernel_fault()`. In kernel mode, `arm64_notify_die()` immediately invokes `die()`, resulting in an unhandled kernel Oops/Panic. (In user mode, it sends `SIGBUS` with `BUS_OBJERR` rather than `BUS_ADRALN`).]

228/3 2026/09/08 10:14 agent codeexpert
2m Model:
core

Results:
map[Answer:An `ldxr` (Load-Exclusive) instruction executed on memory mapped as `pgprot_device` (`MT_DEVICE_nGnRE`) for a PCI BAR generated a Synchronous External Abort (SEA) instead of an Alignment fault, and was not handled by `fixup_exception()`, due to the following reasons:

---

### 1. Why it generated a Synchronous External Abort (SEA) instead of an Alignment Fault

1. **ARM Architecture Specification (CONSTRAINED UNPREDICTABLE):**
   Under the ARMv8/ARMv9 Architecture Reference Manual (Arm ARM), exclusive load/store instructions (`LDXR`, `STXR`, etc.) require an Exclusive Monitor. Because Device memory (`MT_DEVICE_nGnRE`, `MT_DEVICE_nGnRnE`, etc.) does not support exclusive monitors, performing an exclusive access on Device memory is architecturally **CONSTRAINED UNPREDICTABLE**. The architecture explicitly permits implementations to:
   - Generate an **Alignment fault** internally at the core/MMU stage.
   - Issue the transaction onto the system interconnect/bus as an exclusive access, which can result in an **External Abort** if unsupported by the target/interconnect.
   - Treat the instruction as a non-exclusive access.

2. **PCIe Interconnect and Host Bridge Behavior:**
   - On CPU microarchitectures that do not trap exclusive accesses to Device memory internally as Alignment faults, the CPU issues the read transaction with the exclusive attribute (e.g., via AXI/CHI interconnect) to the PCIe Host Bridge / Root Complex.
   - The **PCI Express (PCIe) protocol does not support exclusive transactions (LL/SC)** across PCI BARs.
   - When the PCIe Root Complex, host bridge, or interconnect fabric receives an exclusive transaction destined for a PCI BAR, it rejects the transaction and responds with a bus error (e.g., AXI `SLVERR` / `DECERR` or PCIe Unsupported Request / Completer Abort).
   - Upon receiving this error response from the external bus, the CPU generates a **Synchronous External Abort (SEA)** (Fault Status Code `0b010000` in `ESR_ELx`).

---

### 2. Why it wasn't handled by `fixup_exception()`

In the ARM64 Linux kernel (`arch/arm64/mm/fault.c`):

1. **Alignment Fault Path:**
   - Alignment faults (FSC `0b100001`) are dispatched via `fault_info[]` to `do_alignment_fault()`.
   - `do_alignment_fault()` calls `do_bad_area()`, which for kernel-mode exceptions calls `__do_kernel_fault()`.
   - `__do_kernel_fault()` explicitly checks the exception table:
     ```c
     if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
         return;
     ```
   - If an exception table (`extable`) entry exists for the instruction (e.g., within `copy_from_user`, `get_user`, or atomic uaccess helpers), `fixup_exception()` catches it and safely recovers (typically returning `-EFAULT`).

2. **Synchronous External Abort (SEA) Path:**
   - Synchronous External Aborts (FSC `0b010000`) are dispatched via `fault_info[]` directly to `do_sea()`.
   - SEAs are treated as severe hardware/system bus errors (machine checks) rather than software-recoverable page or alignment faults.
   - `do_sea()` sets `TAINT_MACHINE_CHECK` and directly calls `arm64_notify_die()`:
     ```c
     add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
     arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
     ```
   - `do_sea()` **does not call `fixup_exception()`** or `__do_kernel_fault()`. In kernel mode, `arm64_notify_die()` immediately invokes `die()`, resulting in an unhandled kernel Oops/Panic. (In user mode, it sends `SIGBUS` with `BUS_OBJERR` rather than `BUS_ADRALN`).]

Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Use tools extensively while researching the question. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code.
Use all available sources of information:
 - kernel source code
 - documentation in the Documentation dir in the source tree
 - git commits descriptions, git blame

Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.

Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
   or codesearch-struct-layout FIRST to retrieve clean, exact definitions
   without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
   disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
   non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.
Do NOT use git-log to search for the presence or existence of files in the
repository. git-log is only for tracing commit history of files that are
already present in the current checkout. If a file does not exist in the
current checkout, it cannot be used for reproduction.

Avoid running broad git-log queries (such as searches on the entire repo)
without a specific 'PathPrefix' to restrict the scope, as these are very
expensive and will time out.
If a git-log tool call times out, do not retry the query with the same broad
scope. You must specify a tighter, narrower 'PathPrefix' for subsequent queries.

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:
If `ldxr` is executed on memory mapped with `pgprot_device` (MT_DEVICE_nGnRE) on ARM64, you mentioned it generates an Alignment fault which is handled by `fixup_exception()`. However, the bug report shows a Synchronous External Abort (SEA) occurring on `ldxr` when a PCI BAR is mapped via sysfs `resource0` (which uses `pgprot_device`). Why did it generate a SEA instead of an Alignment fault, and why wasn't it handled by `fixup_exception()`?

229/4 2026/09/08 10:14 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 4076
							output: 117
							thoughts: 223
						

Thoughts:
**Investigating an Unexpected Synchronous External Abort on ARM64 with Device Memory Access**

Okay, so the question is a good one. It's drilling down into a discrepancy I've seen before, but haven't had time to deeply explore. I was under the impression that an `ldxr` instruction on device memory, specifically when mapped with `pgprot_device` (and that translates to `MT_DEVICE_nGnRE` on ARM64), should trigger an alignment fault. And that alignment fault *should* then be handled by `fixup_exception()`. But, the bug report shows something different: a Synchronous External Abort, or SEA, happening on the very same `ldxr` instruction. And, complicating things, this is happening when a PCI BAR is mapped through sysfs's `resource0`, which *also* uses `pgprot_device`.

Right, so why the SEA instead of an alignment fault? And more importantly, why isn't `fixup_exception()` taking care of it? This reeks of something subtle and likely architecture-specific, or maybe a potential race condition.

My first thought is to dive into the core ARM64 fault handling mechanisms. I'll need to dig into the documentation, look for related commits and source code, and really understand how these different fault types, including alignment faults and SEAs, are distinguished and handled at the lowest level.

I'll need to focus my search on these specific elements: `ldxr`, the memory attribute `pgprot_device` and `MT_DEVICE_nGnRE`, the `fixup_exception()` function and its surrounding context, and especially the handling for SEAs, and `do_sea`. I'm going to leverage `git grep` and `git log` within the `arch/arm64/` directory. I'll be looking for keywords like "alignment", "SEA", "ldxr", "pgprot_device", "MT_DEVICE_nGnRE", PCI and of course `fixup_exception()`. Hopefully, I can find something there that sheds some light on this PCI BAR mapping via sysfs's `resource0` and how it changes the expected behavior. I need to understand how the system distinguishes between these two cases and if there is any overlap in the error handling. This could be a configuration, hardware problem, or, hopefully, an overlooked detail in the kernel's fault handling.



230/4 2026/09/08 10:14 tool grepper
0m Args:
map[Expression:Synchronous External Abort PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/kernel/acpi.c=295=void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
--
arch/arm64/kernel/acpi.c-383-/*
arch/arm64/kernel/acpi.c:384: * Claim Synchronous External Aborts as a firmware first notification.
arch/arm64/kernel/acpi.c-385- *
--
arch/arm64/kernel/rsi.c=52=static void __init arm64_rsi_setup_memory(void)
--
arch/arm64/kernel/rsi.c-63-	 * protected has failed here, then future accesses to the memory are
arch/arm64/kernel/rsi.c:64:	 * simply going to be reflected as a SEA (Synchronous External Abort)
arch/arm64/kernel/rsi.c-65-	 * which we can't handle.  Bailing out early prevents the guest limping
--
arch/arm64/mm/pageattr.c=278=static int __set_memory_enc_dec(unsigned long addr,
--
arch/arm64/mm/pageattr.c-301-	 * Break the mapping before we make any changes to avoid stale TLB
arch/arm64/mm/pageattr.c:302:	 * entries or Synchronous External Aborts caused by RIPAS_EMPTY
arch/arm64/mm/pageattr.c-303-	 */
]

231/4 2026/09/08 10:14 tool grepper
0m Args:
map[Expression:fixup_exception PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/efi.h=16=extern void efi_init(void);
arch/arm64/include/asm/efi.h-17-
arch/arm64/include/asm/efi.h:18:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg);
arch/arm64/include/asm/efi.h-19-#else
--
arch/arm64/include/asm/efi.h=22=static inline
arch/arm64/include/asm/efi.h:23:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
arch/arm64/include/asm/efi.h-24-{
--
arch/arm64/include/asm/extable.h=43=bool ex_handler_bpf(const struct exception_table_entry *ex,
--
arch/arm64/include/asm/extable.h-49-
arch/arm64/include/asm/extable.h:50:bool fixup_exception(struct pt_regs *regs, unsigned long esr);
arch/arm64/include/asm/extable.h-51-#endif
--
arch/arm64/kernel/efi.c=220=asmlinkage efi_status_t __efi_rt_asm_recover(void);
arch/arm64/kernel/efi.c-221-
arch/arm64/kernel/efi.c:222:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
arch/arm64/kernel/efi.c-223-{
--
arch/arm64/kernel/probes/kprobes.c=301=int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
--
arch/arm64/kernel/probes/kprobes.c-310-	 * must be left alone for the normal page fault handler, including
arch/arm64/kernel/probes/kprobes.c:311:	 * fixup_exception.
arch/arm64/kernel/probes/kprobes.c-312-	 */
--
arch/arm64/kernel/traps.c=495=void do_el1_bti(struct pt_regs *regs, unsigned long esr)
arch/arm64/kernel/traps.c-496-{
arch/arm64/kernel/traps.c:497:	if (efi_runtime_fixup_exception(regs, "BTI violation")) {
arch/arm64/kernel/traps.c-498-		regs->pstate &= ~PSR_BTYPE_MASK;
--
arch/arm64/mm/extable.c=69=ex_handler_load_unaligned_zeropad(const struct exception_table_entry *ex,
--
arch/arm64/mm/extable.c-94-
arch/arm64/mm/extable.c:95:bool fixup_exception(struct pt_regs *regs, unsigned long esr)
arch/arm64/mm/extable.c-96-{
--
arch/arm64/mm/fault.c=409=static void __do_kernel_fault(unsigned long addr, unsigned long esr,
--
arch/arm64/mm/fault.c-417-	 */
arch/arm64/mm/fault.c:418:	if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
arch/arm64/mm/fault.c-419-		return;
--
arch/arm64/mm/fault.c-454-
arch/arm64/mm/fault.c:455:	if (efi_runtime_fixup_exception(regs, msg))
arch/arm64/mm/fault.c-456-		return;
]

232/4 2026/09/08 10:14 tool grepper
0m Args:
map[Expression:do_sea PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/kernel/acpi.c=295=void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
--
arch/arm64/kernel/acpi.c-385- *
arch/arm64/kernel/acpi.c:386: * Used by KVM and the arch do_sea handler.
arch/arm64/kernel/acpi.c-387- * @regs may be NULL when called from process context.
--
arch/arm64/mm/fault.c=865=static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-869-
arch/arm64/mm/fault.c:870:static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
arch/arm64/mm/fault.c-871-{
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-933-	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
arch/arm64/mm/fault.c:934:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
arch/arm64/mm/fault.c-935-	{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
arch/arm64/mm/fault.c-936-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 18"			},
arch/arm64/mm/fault.c:937:	{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 (translation table walk)"	},
arch/arm64/mm/fault.c:938:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 (translation table walk)"	},
arch/arm64/mm/fault.c:939:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 (translation table walk)"	},
arch/arm64/mm/fault.c:940:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 (translation table walk)"	},
arch/arm64/mm/fault.c:941:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 (translation table walk)"	},
arch/arm64/mm/fault.c:942:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous parity or ECC error" },	// Reserved when RAS is implemented
arch/arm64/mm/fault.c-943-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 25"			},
arch/arm64/mm/fault.c-944-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 26"			},
arch/arm64/mm/fault.c:945:	{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:946:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:947:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:948:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c:949:	{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
arch/arm64/mm/fault.c-950-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
]

233/4 2026/09/08 10:14 tool grepper
0m Args:
map[Expression:do_alignment_fault PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/mm/fault.c=842=static int __kprobes do_translation_fault(unsigned long far,
--
arch/arm64/mm/fault.c-854-
arch/arm64/mm/fault.c:855:static int do_alignment_fault(unsigned long far, unsigned long esr,
arch/arm64/mm/fault.c-856-			      struct pt_regs *regs)
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-950-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
arch/arm64/mm/fault.c:951:	{ do_alignment_fault,	SIGBUS,  BUS_ADRALN,	"alignment fault"		},
arch/arm64/mm/fault.c-952-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 34"			},
]

234/4 2026/09/08 10:14 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 7708
							output: 39
							thoughts: 115
						

Thoughts:
**Diving into ARM64 Fault Handling**

Okay, so I need to get a handle on how these ARM64 fault handlers are operating, specifically focusing on `do_sea`, `do_alignment_fault`, and `__do_kernel_fault`. The best place to start is, of course, the code itself, so I'll be digging into `arch/arm64/mm/fault.c`. I want to understand the intricate dance of these routines.

Of course, code alone isn't enough; I'll need to double-check the underlying architectural guarantees. I'll need to go back and cross-reference these routines with the ARM Architecture Reference Manual (ARM ARM). It is important to remember what the architecture demands, and how the kernel handles those demands. I'll be particularly interested in anything that relates to `ldxr` and exclusive accesses, especially concerning Device memory and how it affects the different fault types (SEA vs. alignment faults) under different conditions (user vs. kernel space). I expect to see specific code paths or checks based on the type of memory and the access context. So, I need to read the kernel code in `arch/arm64/mm/fault.c` around `do_sea` and `do_alignment_fault` to see how the architecture is implemented. This is my plan.



235/4 2026/09/08 10:14 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:850 LineCount:80]

Results:
map[Contents: 850:	
 851:		do_bad_area(far, esr, regs);
 852:		return 0;
 853:	}
 854:	
 855:	static int do_alignment_fault(unsigned long far, unsigned long esr,
 856:				      struct pt_regs *regs)
 857:	{
 858:		if (IS_ENABLED(CONFIG_COMPAT_ALIGNMENT_FIXUPS) &&
 859:		    compat_user_mode(regs))
 860:			return do_compat_alignment_fixup(far, regs);
 861:		do_bad_area(far, esr, regs);
 862:		return 0;
 863:	}
 864:	
 865:	static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
 866:	{
 867:		return 1; /* "fault" */
 868:	}
 869:	
 870:	static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
 871:	{
 872:		const struct fault_info *inf;
 873:		unsigned long siaddr;
 874:	
 875:		inf = esr_to_fault_info(esr);
 876:	
 877:		if (user_mode(regs) && apei_claim_sea(regs) == 0) {
 878:			/*
 879:			 * APEI claimed this as a firmware-first notification.
 880:			 * Some processing deferred to task_work before ret_to_user().
 881:			 */
 882:			return 0;
 883:		}
 884:	
 885:		if (esr & ESR_ELx_FnV) {
 886:			siaddr = 0;
 887:		} else {
 888:			/*
 889:			 * The architecture specifies that the tag bits of FAR_EL1 are
 890:			 * UNKNOWN for synchronous external aborts. Mask them out now
 891:			 * so that userspace doesn't see them.
 892:			 */
 893:			siaddr  = untagged_addr(far);
 894:		}
 895:		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 896:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 897:	
 898:		return 0;
 899:	}
 900:	
 901:	static int do_tag_check_fault(unsigned long far, unsigned long esr,
 902:				      struct pt_regs *regs)
 903:	{
 904:		/*
 905:		 * The architecture specifies that bits 63:60 of FAR_EL1 are UNKNOWN
 906:		 * for tag check faults. Set them to corresponding bits in the untagged
 907:		 * address if ARM64_MTE_FAR isn't supported.
 908:		 * Otherwise, bits 63:60 of FAR_EL1 are not UNKNOWN.
 909:		 */
 910:		if (!cpus_have_cap(ARM64_MTE_FAR))
 911:			far = (__untagged_addr(far) & ~MTE_TAG_MASK) | (far & MTE_TAG_MASK);
 912:	
 913:		do_bad_area(far, esr, regs);
 914:		return 0;
 915:	}
 916:	
 917:	static const struct fault_info fault_info[] = {
 918:		{ do_bad,		SIGKILL, SI_KERNEL,	"ttbr address size fault"	},
 919:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 1 address size fault"	},
 920:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 2 address size fault"	},
 921:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 3 address size fault"	},
 922:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 0 translation fault"	},
 923:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 1 translation fault"	},
 924:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 2 translation fault"	},
 925:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 3 translation fault"	},
 926:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 access flag fault"	},
 927:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 access flag fault"	},
 928:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 access flag fault"	},
 929:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 access flag fault"	},
]

236/4 2026/09/08 10:14 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 9596
							output: 39
							thoughts: 42
						

Thoughts:
Okay, let's dive into this. I need to understand how the system handles bad memory areas on ARM64, specifically within the kernel. Let me check the `do_bad_area` function. It's in `arch/arm64/mm/fault.c`, and I'll focus on lines 380 through 480. That chunk should give me a good insight into the core logic. It's likely that section contains the critical fault handling and error reporting. Time to see how the architecture is designed to manage those problematic regions and understand how it either resolves the fault or triggers an appropriate error path. I'm especially interested in whether it involves process termination, signal handling, or recovery mechanisms.



237/4 2026/09/08 10:14 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:380 LineCount:80]

Results:
map[Contents: 380:	static void do_tag_recovery(unsigned long addr, unsigned long esr,
 381:				   struct pt_regs *regs)
 382:	{
 383:	
 384:		report_tag_fault(addr, esr, regs);
 385:	
 386:		/*
 387:		 * Disable MTE Tag Checking on the local CPU for the current EL.
 388:		 * It will be done lazily on the other CPUs when they will hit a
 389:		 * tag fault.
 390:		 */
 391:		sysreg_clear_set(sctlr_el1, SCTLR_EL1_TCF_MASK,
 392:				 SYS_FIELD_PREP_ENUM(SCTLR_EL1, TCF, NONE));
 393:		isb();
 394:	}
 395:	
 396:	static bool is_el1_mte_sync_tag_check_fault(unsigned long esr)
 397:	{
 398:		unsigned long fsc = esr & ESR_ELx_FSC;
 399:	
 400:		if (!is_el1_data_abort(esr))
 401:			return false;
 402:	
 403:		if (fsc == ESR_ELx_FSC_MTE)
 404:			return true;
 405:	
 406:		return false;
 407:	}
 408:	
 409:	static void __do_kernel_fault(unsigned long addr, unsigned long esr,
 410:				      struct pt_regs *regs)
 411:	{
 412:		const char *msg;
 413:	
 414:		/*
 415:		 * Are we prepared to handle this kernel fault?
 416:		 * We are almost certainly not prepared to handle instruction faults.
 417:		 */
 418:		if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
 419:			return;
 420:	
 421:		if (is_spurious_el1_translation_fault(addr, esr, regs)) {
 422:			WARN_RATELIMIT(!is_pkvm_stage2_abort(esr),
 423:				"Ignoring spurious kernel translation fault at virtual address %016lx\n", addr);
 424:			return;
 425:		}
 426:	
 427:		if (is_el1_mte_sync_tag_check_fault(esr)) {
 428:			do_tag_recovery(addr, esr, regs);
 429:	
 430:			return;
 431:		}
 432:	
 433:		if (is_el1_permission_fault(addr, esr, regs)) {
 434:			if (esr & ESR_ELx_WNR)
 435:				msg = "write to read-only memory";
 436:			else if (is_el1_instruction_abort(esr))
 437:				msg = "execute from non-executable memory";
 438:			else
 439:				msg = "read from unreadable memory";
 440:		} else if (addr < PAGE_SIZE) {
 441:			msg = "NULL pointer dereference";
 442:		} else if (is_pkvm_stage2_abort(esr)) {
 443:			msg = "access to hypervisor-protected memory";
 444:		} else {
 445:			if (esr_fsc_is_translation_fault(esr)) {
 446:				if (kfence_handle_page_fault(addr, esr & ESR_ELx_WNR, regs))
 447:					return;
 448:				if (bpf_arena_handle_page_fault(addr, esr & ESR_ELx_WNR, regs->pc))
 449:					return;
 450:			}
 451:	
 452:			msg = "paging request";
 453:		}
 454:	
 455:		if (efi_runtime_fixup_exception(regs, msg))
 456:			return;
 457:	
 458:		die_kernel_fault(msg, addr, esr, regs);
 459:	}
]

238/4 2026/09/08 10:14 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 11042
							output: 39
							thoughts: 11
						

Thoughts:
Okay, here's my interpretation of that thought process, assuming I'm the expert and the user is expecting a concise but informed summary.

**Thinking Through `do_bad_area`**

Alright, so the focus is clearly on that `do_bad_area` function. My mind immediately starts to run through the implications. I'm assuming this function is likely designed to handle a region, perhaps some kind of error case or problematic data, that requires specific processing. Now, what's crucial here is *context*. What does "bad" mean in *this* specific situation? Is it an invalid data point, an out-of-bounds area, a corrupted region, or something else entirely? The type of "bad" will dictate the ideal approach.

I'd need more details to dive deeper, but I'm thinking about the most efficient strategies for handling the "bad area" - whether it be error correction, isolation, or alternative calculations.

I’m immediately considering performance implications. I'd be looking at how this function integrates with the main data processing flow. It might require special checks or data restructuring to effectively manage this area without causing further disruptions. Are we logging? Are we reporting? And, of course, the ever-present need for appropriate error handling and possible recovery strategies.



239/4 2026/09/08 10:14 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:460 LineCount:60]

Results:
map[Contents: 460:	
 461:	static void set_thread_esr(unsigned long address, unsigned long esr)
 462:	{
 463:		current->thread.fault_address = address;
 464:	
 465:		/*
 466:		 * If the faulting address is in the kernel, we must sanitize the ESR.
 467:		 * From userspace's point of view, kernel-only mappings don't exist
 468:		 * at all, so we report them as level 0 translation faults.
 469:		 * (This is not quite the way that "no mapping there at all" behaves:
 470:		 * an alignment fault not caused by the memory type would take
 471:		 * precedence over translation fault for a real access to empty
 472:		 * space. Unfortunately we can't easily distinguish "alignment fault
 473:		 * not caused by memory type" from "alignment fault caused by memory
 474:		 * type", so we ignore this wrinkle and just return the translation
 475:		 * fault.)
 476:		 */
 477:		if (!is_ttbr0_addr(current->thread.fault_address)) {
 478:			switch (ESR_ELx_EC(esr)) {
 479:			case ESR_ELx_EC_DABT_LOW:
 480:				/*
 481:				 * These bits provide only information about the
 482:				 * faulting instruction, which userspace knows already.
 483:				 * We explicitly clear bits which are architecturally
 484:				 * RES0 in case they are given meanings in future.
 485:				 * We always report the ESR as if the fault was taken
 486:				 * to EL1 and so ISV and the bits in ISS[23:14] are
 487:				 * clear. (In fact it always will be a fault to EL1.)
 488:				 */
 489:				esr &= ESR_ELx_EC_MASK | ESR_ELx_IL |
 490:					ESR_ELx_CM | ESR_ELx_WNR;
 491:				esr |= ESR_ELx_FSC_FAULT;
 492:				break;
 493:			case ESR_ELx_EC_IABT_LOW:
 494:				/*
 495:				 * Claim a level 0 translation fault.
 496:				 * All other bits are architecturally RES0 for faults
 497:				 * reported with that DFSC value, so we clear them.
 498:				 */
 499:				esr &= ESR_ELx_EC_MASK | ESR_ELx_IL;
 500:				esr |= ESR_ELx_FSC_FAULT;
 501:				break;
 502:			default:
 503:				/*
 504:				 * This should never happen (entry.S only brings us
 505:				 * into this code for insn and data aborts from a lower
 506:				 * exception level). Fail safe by not providing an ESR
 507:				 * context record at all.
 508:				 */
 509:				WARN(1, "ESR 0x%lx is not DABT or IABT from EL0\n", esr);
 510:				esr = 0;
 511:				break;
 512:			}
 513:		}
 514:	
 515:		current->thread.fault_code = esr;
 516:	}
 517:	
 518:	static void do_bad_area(unsigned long far, unsigned long esr,
 519:				struct pt_regs *regs)
]

240/4 2026/09/08 10:14 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 12354
							output: 39
							thoughts: 22
						

Thoughts:
Okay, let's dive into this. I'm focusing on lines 519-545 of the `do_bad_area` function. I need to understand what's happening within this specific block of code. Given my expertise, I'm already anticipating the nuances and potential pitfalls within this function. My mind is already primed to look for the key variables, control flow, and error handling within this segment. I'm going to start by quickly scanning for any comments, variable declarations, and conditional statements. I'll mentally map out the logic, anticipating any potential edge cases that might be relevant to my understanding of the larger system. I'm mentally parsing the code, preparing to identify the function's intended behavior and how it contributes to the overall process.



241/4 2026/09/08 10:14 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:519 LineCount:40]

Results:
map[Contents: 519:				struct pt_regs *regs)
 520:	{
 521:		unsigned long addr = untagged_addr(far);
 522:	
 523:		/*
 524:		 * If we are in kernel mode at this point, we have no context to
 525:		 * handle this fault with.
 526:		 */
 527:		if (user_mode(regs)) {
 528:			const struct fault_info *inf = esr_to_fault_info(esr);
 529:	
 530:			set_thread_esr(addr, esr);
 531:			arm64_force_sig_fault(inf->sig, inf->code, far, inf->name);
 532:		} else {
 533:			__do_kernel_fault(addr, esr, regs);
 534:		}
 535:	}
 536:	
 537:	static bool fault_from_pkey(struct vm_area_struct *vma, unsigned int mm_flags)
 538:	{
 539:		if (!system_supports_poe())
 540:			return false;
 541:	
 542:		/*
 543:		 * We do not check whether an Overlay fault has occurred because we
 544:		 * cannot make a decision based solely on its value:
 545:		 *
 546:		 * - If Overlay is set, a fault did occur due to POE, but it may be
 547:		 *   spurious in those cases where we update POR_EL0 without ISB (e.g.
 548:		 *   on context-switch). We would then need to manually check POR_EL0
 549:		 *   against vma_pkey(vma), which is exactly what
 550:		 *   arch_vma_access_permitted() does.
 551:		 *
 552:		 * - If Overlay is not set, we may still need to report a pkey fault.
 553:		 *   This is the case if an access was made within a mapping but with no
 554:		 *   page mapped, and POR_EL0 forbids the access (according to
 555:		 *   vma_pkey()). Such access will result in a SIGSEGV regardless
 556:		 *   because core code checks arch_vma_access_permitted(), but in order
 557:		 *   to report the correct error code - SEGV_PKUERR - we must handle
 558:		 *   that case here.
]

242/4 2026/09/08 10:14 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 13262
							output: 42
							thoughts: 576
						

Thoughts:
**My Analysis of Alignment Fault and Synchronous External Abort Handling**

Okay, let's break this down. My concern is how the kernel handles different types of memory access errors, specifically alignment faults and synchronous external aborts. I see that when an alignment fault is triggered (via `do_alignment_fault`), the execution flow goes like this: `do_alignment_fault` calls `do_bad_area`, and within kernel mode (`!user_mode(regs)`), `do_bad_area` then calls `__do_kernel_fault`. The critical bit here is the conditional: `if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr)) return;`. This means if it *isn't* an EL1 instruction abort and `fixup_exception` returns successfully, the exception is "fixed." Essentially, there's a mechanism in place to attempt to correct alignment faults in the kernel if possible, particularly through the use of an extable entry.

Now, let's pivot to how synchronous external aborts (SEAs) are handled by `do_sea`. *This is where things diverge significantly*. The crucial difference is that `do_sea` *directly* calls `arm64_notify_die`, bypassing `fixup_exception` and `do_bad_area`. Also, an important check is made against `user_mode(regs)` and `apei_claim_sea()`, which may defer the work. Otherwise, the call stack goes straight to `arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr)`. The potential consequence of this is that `arm64_notify_die` in kernel mode, calls `die()` which will panic or kill the kernel. So, a kernel alignment fault is potentially fixed if an extable entry can handle it, but a SEA triggers a kernel panic or kill! This is where the difference lies and is the main thing to verify. I need to verify what happens within `arm64_notify_die` to be absolutely certain of this flow, but the contrast between the two paths is clear and concerning.



243/4 2026/09/08 10:14 tool codesearch-definition-source
0m Args:
map[ContextFile:arch/arm64/mm/fault.c Name:arm64_notify_die]

Results:
map[SourceCode: 291:	void arm64_notify_die(const char *str, struct pt_regs *regs,
 292:			      int signo, int sicode, unsigned long far,
 293:			      unsigned long err)
 294:	{
 295:		if (user_mode(regs)) {
 296:			WARN_ON(regs != current_pt_regs());
 297:			current->thread.fault_address = 0;
 298:			current->thread.fault_code = err;
 299:	
 300:			arm64_force_sig_fault(signo, sicode, far, str);
 301:		} else {
 302:			die(str, regs, err);
 303:		}
 304:	}
 SourceFile:arch/arm64/kernel/traps.c]

244/4 2026/09/08 10:14 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 14593
							output: 38
							thoughts: 315
						

Thoughts:
**My Investigation into Synchronous External Aborts (SEAs)**

Okay, so I'm looking into why we're seeing a Synchronous External Abort (SEA) instead of an Alignment fault when using `ldxr` on device memory mapped with `pgprot_device`. The kernel's fault handling clearly differentiates SEAs. The `fault_info[]` table routes SEAs directly to `do_sea()`. Unlike the standard faults - translation, permission, alignment - which go through `do_bad_area()`, then `__do_kernel_fault()` and finally `fixup_exception()`, `do_sea()` takes a different route, considering SEAs as serious hardware errors. It flags `TAINT_MACHINE_CHECK` and calls `arm64_notify_die()` then `die()`. So `fixup_exception()` isn't involved here.

The core question now is, why the SEA instead of an Alignment fault when this `ldxr` instruction is run on a PCI BAR mapped as device memory via `pgprot_device`? Specifically, the BAR is mapped via sysfs `resource0`. I need to figure out the reason behind this difference.

My next step is to dive into the code. I'll focus my search on commit messages, git logs, and related documentation. I'll search `arch/arm64` using `git log` for terms like `ldxr`, `exclusive`, `Alignment fault`, `SEA`, `external abort`, `PCI`, `resource`, `pgprot_device`, and `pgprot_noncached`. The goal is to uncover any relevant discussions, bug fixes, or design decisions that shed light on this `ldxr` and device memory behavior. It's time to dig into the history and see what clues I can find!



245/4 2026/09/08 10:14 tool git-log
0m Args:
map[Count:20 MessageRegexps:[exclusive device] PathPrefix:arch/arm64]

Results:
map[Output:2937aeec9dc5 KVM: arm64: Handle DABT caused by LS64* instructions on unsupported memory
e2b691804319 arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dts
2ddd93481bce arm64: dts: rockchip: rename rfkill label for Radxa ROCK 5B
d03521e6c18f arm64: dts: mediatek: mt8186-corsola: Update ADSP reserved memory region
76cbe23e4399 arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio
a3d5fb3b084c arm64: dts: qcom: sc7180: Add ADSP
3a4086985696 arm64: dts: ti: k3-j784s4: Add phase tags marking
5e52cf6bf3c7 arm64: dts: ti: k3-am64-tqma64xxl-mbax4xxl: add SD-card and WLAN overlays
d683a73980a6 arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node
ed8efe50b76e arm64: dts: renesas: rzg2ul-smarc-som: Enable eMMC on SMARC platform
7ca0ce6478c6 arm64: dts: renesas: rzg2lc-smarc-som: Enable eMMC on SMARC platform
a60a311cb8d0 arm64: dts: renesas: rzg2l-smarc-som: Enable eMMC on SMARC platform
96d389ca1011 arm64: Add workaround for Arm Cortex-A77 erratum 1508412
974dc2f3959d arm64: dts: qcom: msm8916: Declare sound node in msm8916.dtsi
bf146a1a7cd4 arm64: dts: ti: k3-j721e: Update the power domain cells
c68272cb7e53 arm64: dts: ti: k3-am654: Update the power domain cells
]

246/4 2026/09/08 10:15 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 15945
							output: 35
							thoughts: 19
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from my perspective as a seasoned expert:

**Investigating ARM64 Architecture Commit History**

Alright, time to get digging. I need to understand the history surrounding the `ldxr` instruction within the `arch/arm64` codebase. My immediate thought is to start with commit messages. They’re a goldmine for understanding the *why* behind changes. Specifically, I'm going to leverage my search skills to filter those messages directly for mentions of "`ldxr`", focusing my search specifically within the ARM64 architecture directory. This should give me a good initial dataset to start with in tracking down the use cases and changes related to this instruction. This approach will allow me to narrow down the context rapidly.



247/4 2026/09/08 10:15 tool git-log
0m Args:
map[Count:20 MessageRegexps:[ldxr] PathPrefix:arch/arm64]

Results:
map[Output:ab327cc841cb arm64: insn: Add BIT(23) to {load,store}_ex's mask
a2c0b0fbe014 arm64: alternatives: mark patch_alternative() as `noinstr`
c5e2edeb01ae arm64: insn: Fix ldadd instruction encoding
34b8ab091f9e bpf, arm64: use more scalable stadd over ldxr / stxr loop in xadd
8968c67a82ab bpf, arm64: remove prefetch insn in xadd mapping
03110a5cb216 arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP
5ef3fe4cecdf arm64: Avoid redundant type conversions in xchg() and cmpxchg()
7bd99b403405 arm64: Kconfig: Enable LSE atomics by default
7005cade1bdb bpf, arm64: use separate register for state in stxr
85f68fe89832 bpf, arm64: implement jiting of BPF_XADD
1e6e57d9b34a arm64: percpu: rewrite ll/sc loops in assembly
1c5b51dfb7b4 arm64: swp emulation: bound LL/SC retries before rescheduling
03e3c2b7edbe locking/barriers, arch/arm64: Implement LDXR+WFE based smp_cond_load_acquire()
0ea366f5e1b6 arm64: atomics: prefetch the destination word for write prior to stxr
2f4b829c625e arm64: Add support for hardware updates of the access and dirty pte bits
8e86f0b409a4 arm64: atomics: fix use of acquire + release for full barrier semantics
]

248/4 2026/09/08 10:15 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 16642
							output: 18
							thoughts: 63
						

Thoughts:
**My Investigation Path**

Alright, let's get down to brass tacks. I need to figure out what's going on with this `Alignment fault` issue related to some device interaction. My first thought is to dive deep into the commit history and documentation. I'll target those specifically mentioning `Alignment fault` alongside keywords that suggest the problem space: specifically, anything dealing with a `Device`, potential `exclusive` access scenarios, `pgprot_device` memory protection flags, `resource0` (indicating likely PCI resource mapping issues), or the PCI subsystem more generally. I'll use those search terms for relevant commits or documentation.

After that initial targeted search, I'll broaden the net a bit and employ a more comprehensive grep across the entire code tree. My focus here will be on `pgprot_device`, or anything in the sysfs that involves mmap-ing PCI resources. This should give me a good lay of the land, helping me uncover potentially related code paths or configurations that might shed light on this `Alignment fault` scenario.



249/4 2026/09/08 10:15 tool grepper
0m Args:
map[Expression:pgprot_device]

Results:
map[Output:arch/arm/include/asm/pgtable-nommu.h=43=typedef pte_t *pte_addr_t;
--
arch/arm/include/asm/pgtable-nommu.h-49-#define pgprot_writecombine(prot) (prot)
arch/arm/include/asm/pgtable-nommu.h:50:#define pgprot_device(prot)	(prot)
arch/arm/include/asm/pgtable-nommu.h-51-
--
arch/arm/include/asm/pgtable.h=80=extern pgprot_t		pgprot_kernel;
--
arch/arm/include/asm/pgtable.h-113-
arch/arm/include/asm/pgtable.h:114:#define pgprot_device(prot) \
arch/arm/include/asm/pgtable.h-115-	__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_SHARED | L_PTE_SHARED | L_PTE_DIRTY | L_PTE_XN)
--
arch/arm64/include/asm/pgtable.h=725=static inline void __set_puds(struct mm_struct *mm, unsigned long addr,
--
arch/arm64/include/asm/pgtable.h-755-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h:756:#define pgprot_device(prot) \
arch/arm64/include/asm/pgtable.h-757-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN)
--
arch/loongarch/kernel/acpi.c=70=void acpi_add_early_pio(void)
--
arch/loongarch/kernel/acpi.c-74-		vmap_page_range(PIO_BASE, PIO_BASE + PIO_SIZE,
arch/loongarch/kernel/acpi.c:75:				LOONGSON_LIO_BASE, pgprot_device(PAGE_KERNEL));
arch/loongarch/kernel/acpi.c-76-	}
--
arch/loongarch/kernel/setup.c=466=static int __init add_legacy_isa_io(struct fwnode_handle *fwnode,
--
arch/loongarch/kernel/setup.c-495-	vaddr = (unsigned long)(PCI_IOBASE + range->io_start);
arch/loongarch/kernel/setup.c:496:	vmap_page_range(vaddr, vaddr + size, hw_start, pgprot_device(PAGE_KERNEL));
arch/loongarch/kernel/setup.c-497-
--
arch/mips/loongson64/init.c=153=static int __init add_legacy_isa_io(struct fwnode_handle *fwnode, resource_size_t hw_start,
--
arch/mips/loongson64/init.c-183-
arch/mips/loongson64/init.c:184:	vmap_page_range(vaddr, vaddr + size, hw_start, pgprot_device(PAGE_KERNEL));
arch/mips/loongson64/init.c-185-
--
drivers/cdx/cdx.c=680=static int cdx_mmap_resource(struct file *fp, struct kobject *kobj,
--
drivers/cdx/cdx.c-701-	 */
drivers/cdx/cdx.c:702:	vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
drivers/cdx/cdx.c-703-	vma->vm_pgoff += (cdx_resource_start(cdx_dev, num) >> PAGE_SHIFT);
--
drivers/infiniband/hw/erdma/erdma_verbs.c=1431=int erdma_mmap(struct ib_ucontext *ctx, struct vm_area_struct *vma)
--
drivers/infiniband/hw/erdma/erdma_verbs.c-1446-		/* map doorbell. */
drivers/infiniband/hw/erdma/erdma_verbs.c:1447:		prot = pgprot_device(vma->vm_page_prot);
drivers/infiniband/hw/erdma/erdma_verbs.c-1448-		break;
--
drivers/infiniband/hw/hns/hns_roce_main.c=522=static int hns_roce_mmap(struct ib_ucontext *uctx, struct vm_area_struct *vma)
--
drivers/infiniband/hw/hns/hns_roce_main.c-547-	case HNS_ROCE_MMAP_TYPE_DWQE:
drivers/infiniband/hw/hns/hns_roce_main.c:548:		prot = pgprot_device(vma->vm_page_prot);
drivers/infiniband/hw/hns/hns_roce_main.c-549-		break;
--
drivers/pci/mmap.c=24=int pci_mmap_resource_range(struct pci_dev *pdev, int bar,
--
drivers/pci/mmap.c-37-	else
drivers/pci/mmap.c:38:		vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
drivers/pci/mmap.c-39-
--
drivers/pci/pci.c=4099=int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr)
--
drivers/pci/pci.c-4110-	return vmap_page_range(vaddr, vaddr + resource_size(res), phys_addr,
drivers/pci/pci.c:4111:			       pgprot_device(PAGE_KERNEL));
drivers/pci/pci.c-4112-#else
--
drivers/vfio/cdx/main.c=244=static int vfio_cdx_mmap_mmio(struct vfio_cdx_region region,
--
drivers/vfio/cdx/main.c-257-	vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff;
drivers/vfio/cdx/main.c:258:	vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
drivers/vfio/cdx/main.c-259-
--
include/linux/pgtable.h=1738=void arch_sync_kernel_mappings(unsigned long start, unsigned long end);
--
include/linux/pgtable.h-1781-
include/linux/pgtable.h:1782:#ifndef pgprot_device
include/linux/pgtable.h:1783:#define pgprot_device pgprot_noncached
include/linux/pgtable.h-1784-#endif
--
include/linux/pgtable.h=1793=static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
--
include/linux/pgtable.h-1798-		newprot = pgprot_writecombine(newprot);
include/linux/pgtable.h:1799:	if (pgprot_val(oldprot) == pgprot_val(pgprot_device(oldprot)))
include/linux/pgtable.h:1800:		newprot = pgprot_device(newprot);
include/linux/pgtable.h-1801-	return newprot;
]

250/4 2026/09/08 10:15 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 18958
							output: 35
							thoughts: 56
						

Thoughts:
Here's my analysis of the provided text, rendered in the first person, assuming an expert user:

**PCI BAR Mapping and Sysfs Interaction**

Okay, so I'm thinking about the PCI BAR mapping implementation, and I want to refresh my memory on the current approach. My immediate focus is on the kernel's handling of these BARs through the sysfs interface. I need to dive into the code. Specifically, I should be looking at `drivers/pci/mmap.c` to see how the PCI Base Address Registers (BARs) are actually mapped into userspace via memory mapping. I also need to cross-reference that with `drivers/pci/pci-sysfs.c` to understand precisely how this mapping is exposed and controlled through sysfs. I want to see how the kernel exposes BAR information to userspace applications, and understand how the interaction is handled.



251/4 2026/09/08 10:15 tool read-file
0m Args:
map[File:drivers/pci/mmap.c FirstLine:1 LineCount:60]

Results:
map[Contents:   1:	// SPDX-License-Identifier: GPL-2.0
   2:	/*
   3:	 * Generic PCI resource mmap helper
   4:	 *
   5:	 * Copyright © 2017 Amazon.com, Inc. or its affiliates.
   6:	 *
   7:	 * Author: David Woodhouse <dwmw2@infradead.org>
   8:	 */
   9:	
  10:	#include <linux/kernel.h>
  11:	#include <linux/mm.h>
  12:	#include <linux/pci.h>
  13:	
  14:	#include "pci.h"
  15:	
  16:	#ifdef ARCH_GENERIC_PCI_MMAP_RESOURCE
  17:	
  18:	static const struct vm_operations_struct pci_phys_vm_ops = {
  19:	#ifdef CONFIG_HAVE_IOREMAP_PROT
  20:		.access = generic_access_phys,
  21:	#endif
  22:	};
  23:	
  24:	int pci_mmap_resource_range(struct pci_dev *pdev, int bar,
  25:				    struct vm_area_struct *vma,
  26:				    enum pci_mmap_state mmap_state, int write_combine)
  27:	{
  28:		unsigned long size;
  29:		int ret;
  30:	
  31:		size = ((pci_resource_len(pdev, bar) - 1) >> PAGE_SHIFT) + 1;
  32:		if (vma->vm_pgoff + vma_pages(vma) > size)
  33:			return -EINVAL;
  34:	
  35:		if (write_combine)
  36:			vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
  37:		else
  38:			vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
  39:	
  40:		if (mmap_state == pci_mmap_io) {
  41:			ret = pci_iobar_pfn(pdev, bar, vma);
  42:			if (ret)
  43:				return ret;
  44:		} else
  45:			vma->vm_pgoff += (pci_resource_start(pdev, bar) >> PAGE_SHIFT);
  46:	
  47:		vma->vm_ops = &pci_phys_vm_ops;
  48:	
  49:		return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
  50:					  vma->vm_end - vma->vm_start,
  51:					  vma->vm_page_prot);
  52:	}
  53:	
  54:	#endif
  55:	
  56:	#if (defined(CONFIG_SYSFS) || defined(CONFIG_PROC_FS)) && \
  57:	    (defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE))
  58:	
  59:	int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vma,
  60:			  enum pci_mmap_api mmap_api)
]

252/4 2026/09/08 10:15 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 20161
							output: 23
							thoughts: 441
						

Thoughts:
**My Thought Process on Device Memory and Exclusive Accesses**

Okay, let's break this down. First, I see that when `resource0` is memory-mapped in userspace without write-combining, or in a generic sysfs resource mmap, `pci_mmap_resource_range()` sets the virtual memory area's protection (`vma->vm_page_prot`) to `MT_DEVICE_nGnRE`. This is standard, but the real question is why I'm seeing alignment faults or synchronous external aborts with `ldxr` on Device memory.

My mind immediately jumps to the ARM Architecture Reference Manual (ARM ARM). I need to understand the rules around exclusive accesses, specifically `LDXR`, `STXR`, etc., when dealing with Device memory. The behavior can vary based on the CPU, the interconnect, and the memory type. Time to dig!

Let's start with some quick searches in the kernel's Git logs and hopefully trigger some past knowledge of the ARM ARM rules for LDXR/STXR and Device memory. I'll need to refresh my memory on the specific details from the manual, especially how it handles exclusive accesses to Device memory.

Right, the ARMv8-A architecture... what does the ARM ARM *actually* say? Let's consult the reference manual:

*   Does it specify what happens when an exclusive access like `LDXR`, `LDAXR`, `STXR`, or `STLXR` is performed on Device memory? This is critical.

Alright, according to the ARM ARM (specifically the A-profile architecture section on Memory types/Device memory/Exclusive accesses): a load to Device memory is "CONSTRAINED UNPREDICTABLE." It can behave in a few ways:

*   It can generate an Alignment fault.
*   It can generate a Synchronous External Abort.
*   It can execute as a non-exclusive Load instruction (ignoring the exclusive aspect), *or* it can execute as an Exclusive Load.

Okay, that's not very helpful in isolation! Wait. Alignment fault vs External Abort. Why is that? What's driving the unpredictability? Is this a CPU implementation detail, interconnect behavior, or system abort generation? Let me delve into the ARM ARM details further.

I need to nail down the specifics. I'll also do some quick kernel tree searches for relevant comments mentioning "exclusive" or `LDXR` in conjunction with "Device" or "Alignment." This should provide some real-world context and perhaps clues on implementation-specific quirks.



253/4 2026/09/08 10:15 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:Alignment fault.*exclusive|exclusive.*Alignment fault]

Results:
map[Output:]

254/4 2026/09/08 10:15 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 21178
							output: 28
							thoughts: 28
						

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

**Investigating Potential LDXR-Related Documentation**

Okay, so I need to dig into the documentation and architecture-specific code to get a handle on how `LDXR` is being used, or if there's relevant discussion around exclusive access in the context of `arm64`. My initial thought is to zero in on the `Documentation/` and `arch/arm64` directories. Those seem like the most logical places to start looking for information, right? That's where I'd expect to find the low-level architectural details and possibly higher-level explanations or examples demonstrating how these exclusive instructions are employed. I am specifically interested in the `LDXR` instruction, but the broad context of "exclusive" access mechanisms is also relevant and potentially informative. I'll need to use those keywords in the search.



255/4 2026/09/08 10:15 tool grepper
0m Args:
map[Expression:exclusive.*Device|Device.*exclusive PathPrefix:Documentation]

Results:
map[Output:Documentation/accel/introduction.rst=86=be done in your driver (as opposed to a standard DRM driver):
--
Documentation/accel/introduction.rst-89-  driver_features field. It is important to note that this driver feature is
Documentation/accel/introduction.rst:90:  mutually exclusive with DRIVER_RENDER and DRIVER_MODESET. Devices that want
Documentation/accel/introduction.rst-91-  to expose both graphics and compute device char files should be handled by
]

256/4 2026/09/08 10:15 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 21553
							output: 37
							thoughts: 43
						

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

**Investigating Potential Causes of Hardware Alignment Faults**

Alright, time to dive deep. I need to pinpoint the root cause of these alignment issues, and since we're dealing with `pgprot_device` and related architecture-specific considerations, I need a comprehensive approach. First, I'm going to run a wide-ranging `git log` search. I want to look across the *entire* repository, but I'll also narrow my focus to `arch/arm64` because that's the most likely area for these kinds of problems. The goal is to identify commits that touch on anything related to the specific keywords that I know are relevant. I'm focusing on commits mentioning `pgprot_device` because that function is critical for device memory mapping, and alignment problems often manifest in those regions. I'll also search for mentions of "Alignment" (capitalized, as it may appear in function names or comments), which is a fairly straightforward keyword to look for. Then, critically, I need to check for references to "external abort" as that is the hardware fault that may be reported by these alignment issues. Finally, I'll search for `LDXR`, because load-exclusive and store-exclusive instructions are known to be sensitive to alignment, and those can frequently reveal these problems. The logs are the best place to find recent code changes that may have introduced or exacerbated the issues. Hopefully, this should turn up some suspicious commits that I can investigate further.



257/4 2026/09/08 10:15 tool git-log
0m Args:
map[Count:20 MessageRegexps:[pgprot_device] PathPrefix:arch/arm64]

Results:
map[Output:]

258/4 2026/09/08 10:15 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 21969
							output: 26
							thoughts: 15
						

Thoughts:
Here's my thought process, summarized as you requested:

**Searching the Codebase for pgprot_device**

Okay, so I need to understand how `pgprot_device` is being used and modified across the codebase's history. My initial instinct is to use `git` to achieve this. I want to see a comprehensive picture, not just the current state. So, I need to search the commit history. I'm going to formulate a search query to comb through every commit for the string `pgprot_device`. This will allow me to track its usage, changes, and any associated context over time. This approach will give me a dynamic view of this code's evolution and any relevant bug fixes or functional modifications related to it.



259/4 2026/09/08 10:15 tool git-log
0m Args:
map[Count:20 MessageRegexps:[pgprot_device]]

Results:
map[Output:bd39fc81340a alpha: Define pgprot_modify to silence tautological comparison warnings
2e86f78b117a include/linux/io-mapping.h: remove fallback for writecombine
fa8174aa225f riscv: Add pgprot_writecombine/device and PAGE_SHARED defination if NOMMU
58ca33824ff8 ARM: 8823/1: Implement pgprot_device()
97ccedd793ac microblaze: Provide pgprot_device/writecombine macros for nommu
7ef4783e19a8 ARM: 8676/1: NOMMU: provide pgprot_device() macro
]

260/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 22346
							output: 40
							thoughts: 28
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Investigating Code History for Specific Device References**

Alright, time to get to the bottom of this. My initial instinct is to go straight to the commit history. I need to understand how this `MT_DEVICE_nGnRE` thing, or anything related to it, is being referenced and modified within the codebase. I need to be comprehensive, so I'll broaden the search to include `MT_DEVICE` and the standalone `nGnRE` as potential keys. This is all about uncovering the context surrounding this particular identifier and seeing how it's evolved over time. I'm hoping this will provide immediate clues, like which files are involved, who's been touching them, and what the purpose of these terms were when first implemented. A focused search like this is a fundamental first step in understanding the problem, identifying possible dependencies, and formulating my next line of inquiry.



261/4 2026/09/08 10:16 tool git-log
0m Args:
map[Count:20 MessageRegexps:[MT_DEVICE_nGnRE] PathPrefix:arch/arm64]

Results:
map[Output:]

262/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 22630
							output: 36
							thoughts: 12
						

Thoughts:
Okay, here's my interpretation of that thought process, assuming I'm deep in my code and thinking about finding relevant commits:

**Finding the Right Commits**

Right, time to dig into the commit history. Let's see... what was that specific function or module I was working on? Ah, yes, it was related to `do_sea`. I need to review those commits to understand what changes were made in relation to that function. Let's start by searching for commits that reference that specific term, `do_sea`. Hopefully that's specific enough to get me where I need to be, without returning too much irrelevant noise. I'm hoping I can find the context I need quickly, so I can continue with the work at hand. Time to get to it!



263/4 2026/09/08 10:16 tool git-log
0m Args:
map[Count:20 MessageRegexps:[do_sea] PathPrefix:arch/arm64]

Results:
map[Output:ed3768db5882 arm64: entry: convert el1_sync to C
faa75e147b58 arm64: fault: avoid send SIGBUS two times
]

264/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 22903
							output: 25
							thoughts: 21
						

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

**Analyzing Commit History**

Okay, so I need to dive into commit `faa75e147b58` and the context around it. I know I'm looking for the "who, what, and why" – the change itself, its purpose, and the impact on the existing codebase.  This usually means I'll be checking the diffs, paying close attention to any dependencies that are touched, and looking for associated issues or pull requests. I'm going to quickly scan the adjacent commits, say the past 5 commits either side to look for any refactoring, bug fixes, or new features that *directly* relate to the focal commit. I am looking for any patterns that are likely to be related, and looking to see if this change may be a result of a larger effort. I know that simply reading commit messages can be misleading, so I'm also going to see if the commit message matches the changes.



265/4 2026/09/08 10:16 tool git-show
0m Args:
map[Commit:faa75e147b58]

Results:
map[Output:commit faa75e147b583417273902552c61cf3250a44308
Author: Dongjiu Geng <gengdongjiu@huawei.com>
Date:   Wed Dec 13 18:36:47 2017 +0800

    arm64: fault: avoid send SIGBUS two times
    
    do_sea() calls arm64_notify_die() which will always signal
    user-space. It also returns whether APEI claimed the external
    abort as a RAS notification. If it returns failure do_mem_abort()
    will signal user-space too.
    
    do_mem_abort() wants to know if we handled the error, we always
    call arm64_notify_die() so can always return success.
    
    Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
    Reviewed-by: James Morse <james.morse@arm.com>
    Reviewed-by: Xie XiuQi <xiexiuqi@huawei.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>

diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 22168cd0dde7..9b7f89df49db 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -574,7 +574,6 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
 {
 	struct siginfo info;
 	const struct fault_info *inf;
-	int ret = 0;
 
 	inf = esr_to_fault_info(esr);
 	pr_err("Synchronous External Abort: %s (0x%08x) at 0x%016lx\n",
@@ -589,7 +588,7 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
 		if (interrupts_enabled(regs))
 			nmi_enter();
 
-		ret = ghes_notify_sea();
+		ghes_notify_sea();
 
 		if (interrupts_enabled(regs))
 			nmi_exit();
@@ -604,7 +603,7 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
 		info.si_addr  = (void __user *)addr;
 	arm64_notify_die("", regs, &info, esr);
 
-	return ret;
+	return 0;
 }
 
 static const struct fault_info fault_info[] = {
]

266/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 23884
							output: 30
							thoughts: 1357
						

Thoughts:
**Analyzing LDXR and Device Memory on ARM64**

Okay, let's break this down. The core of the question is why we see a Synchronous External Abort (SEA) on an `ldxr` instruction to a PCI BAR, instead of an Alignment fault, and why `fixup_exception()` didn't handle it. I need to dissect this in the context of ARMv8-A architecture and system bus behavior, especially when dealing with device memory.

First, the architecture's stance. The ARM Architecture Reference Manual is explicit: exclusive accesses to device memory are *constrained unpredictable*. This means an `ldxr` can trigger an Alignment fault, a SEA, or simply behave as a regular load. It's implementation-defined. That's the crux of it.

Now, why the divergence? It comes down to where the error is caught. Some CPUs, or rather, the core's internal exclusive monitor or MMU, will catch the alignment issue *before* the transaction even hits the bus, and trigger the Alignment fault directly (ESR_ELx.DFSC = 0b100001). This is an internal behavior. The core knows the access violates alignment based on the memory type.

Other implementations (or when the core's internal exclusive monitor / MMU checks the memory type) will propagate the exclusive transaction to the system interconnect/bus like AXI, PCIe, or CHI. If that bus or a downstream device like a PCI controller *doesn't* support exclusive accesses (or returns an error like `DECERR`, `SLVERR`, or an unsupported request), the bus will signal the error back to the core. The CPU then translates this bus error into a SEA (ESR_ELx.DFSC = 0b010000). So, it's the external bus behavior causing the SEA instead of the alignment error. The PCI BAR probably doesn't support exclusive accesses.

To be sure, I'll need to double check the AMBA AXI/ACE/CHI specs. Exclusive read transactions to endpoints/slaves that don't support it often return `EXOKAY`, `OKAY`, `SLVERR`, or `DECERR`. PCIe will likely signal an external abort or error response to indicate an unsupported transaction.

The different memory types (Device vs. Normal) are key. Device memory doesn't inherently follow standard exclusive monitor semantics. So, the architecture lets implementations either generate the fault locally (Alignment fault), send the transaction and get an error (SEA), or treat the access as non-exclusive.  That's why the system might have a mix of Alignment faults and SEAs, depending on the memory map and the specific CPU core or system's implementation.

Now, about `fixup_exception()`. I need to dig into the kernel's fault handling code. I'll need to trace the exception entry point in `arch/arm64/kernel/entry-common.c` and analyze where the kernel's fault handling kicks in in `arch/arm64/mm/fault.c` and how it deals with SEAs. I need to see *exactly* where `fixup_exception()` is called and if SEAs are handled there. I'll need to check the entire `arch/arm64/mm/fault.c` and `arch/arm64/mm/extable.c` for any `fixup_exception()` calls.



267/4 2026/09/08 10:16 tool grepper
0m Args:
map[Expression:do_mem_abort PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/exception.h=53=asmlinkage void asm_exit_to_user_mode(struct pt_regs *regs);
arch/arm64/include/asm/exception.h-54-
arch/arm64/include/asm/exception.h:55:void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs);
arch/arm64/include/asm/exception.h-56-void do_el0_undef(struct pt_regs *regs, unsigned long esr);
--
arch/arm64/kernel/entry-common.c=335=static void noinstr el1_abort(struct pt_regs *regs, unsigned long esr)
--
arch/arm64/kernel/entry-common.c-341-	local_daif_inherit(regs);
arch/arm64/kernel/entry-common.c:342:	do_mem_abort(far, esr, regs);
arch/arm64/kernel/entry-common.c-343-	arm64_exit_to_kernel_mode(regs, state);
--
arch/arm64/kernel/entry-common.c=568=static void noinstr el0_da(struct pt_regs *regs, unsigned long esr)
--
arch/arm64/kernel/entry-common.c-573-	local_daif_restore(DAIF_PROCCTX);
arch/arm64/kernel/entry-common.c:574:	do_mem_abort(far, esr, regs);
arch/arm64/kernel/entry-common.c-575-	arm64_exit_to_user_mode(regs);
--
arch/arm64/kernel/entry-common.c=578=static void noinstr el0_ia(struct pt_regs *regs, unsigned long esr)
--
arch/arm64/kernel/entry-common.c-591-	local_daif_restore(DAIF_PROCCTX);
arch/arm64/kernel/entry-common.c:592:	do_mem_abort(far, esr, regs);
arch/arm64/kernel/entry-common.c-593-	arm64_exit_to_user_mode(regs);
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-983-
arch/arm64/mm/fault.c:984:void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
arch/arm64/mm/fault.c-985-{
--
arch/arm64/mm/fault.c-1001-}
arch/arm64/mm/fault.c:1002:NOKPROBE_SYMBOL(do_mem_abort);
arch/arm64/mm/fault.c-1003-
]

268/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 26757
							output: 39
							thoughts: 26
						

Thoughts:
Okay, let's dive into this. Here's my take on those thoughts, as if they're my own:

**Analyzing the Memory Abort Handler: `do_mem_abort()`**

Alright, time to get my hands dirty and jump into the `arch/arm64/mm/fault.c` file. Specifically, I need to understand how the `do_mem_abort()` function is handling those memory aborts on ARM64. Given my expertise, I'm expecting to see the low-level details – the register interactions, the memory access checks, the error classification. I know this function is the core of how the kernel responds when a memory access goes sideways, and it's absolutely critical for system stability. I'm keen to dissect the control flow, see what conditions trigger specific actions (like page faults, data aborts, etc.), and how the kernel attempts to recover or, failing that, gracefully kill the offending process. Let's see how well it's written and how it handles different scenarios!



269/4 2026/09/08 10:16 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:970 LineCount:45]

Results:
map[Contents: 970:		{ do_bad,		SIGKILL, SI_KERNEL,	"implementation fault (lockdown abort)" },
 971:		{ do_bad,		SIGBUS,  BUS_OBJERR,	"implementation fault (unsupported exclusive)" },
 972:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 54"			},
 973:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 55"			},
 974:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 56"			},
 975:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 57"			},
 976:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 58" 			},
 977:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 59"			},
 978:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 60"			},
 979:		{ do_bad,		SIGKILL, SI_KERNEL,	"section domain fault"		},
 980:		{ do_bad,		SIGKILL, SI_KERNEL,	"page domain fault"		},
 981:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 63"			},
 982:	};
 983:	
 984:	void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
 985:	{
 986:		const struct fault_info *inf = esr_to_fault_info(esr);
 987:		unsigned long addr = untagged_addr(far);
 988:	
 989:		if (!inf->fn(far, esr, regs))
 990:			return;
 991:	
 992:		if (!user_mode(regs))
 993:			die_kernel_fault(inf->name, addr, esr, regs);
 994:	
 995:		/*
 996:		 * At this point we have an unrecognized fault type whose tag bits may
 997:		 * have been defined as UNKNOWN. Therefore we only expose the untagged
 998:		 * address to the signal handler.
 999:		 */
1000:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, addr, esr);
1001:	}
1002:	NOKPROBE_SYMBOL(do_mem_abort);
1003:	
1004:	void do_sp_pc_abort(unsigned long addr, unsigned long esr, struct pt_regs *regs)
1005:	{
1006:		arm64_notify_die("SP/PC alignment exception", regs, SIGBUS, BUS_ADRALN,
1007:				 addr, esr);
1008:	}
1009:	NOKPROBE_SYMBOL(do_sp_pc_abort);
1010:	
1011:	/*
1012:	 * Used during anonymous page fault handling.
1013:	 */
1014:	struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
]

270/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 27921
							output: 39
							thoughts: 41
						

Thoughts:
Okay, let's dive into this. Here's what I'm thinking, as an expert familiar with this sort of thing:

**Examining Fault Information in `arch/arm64/mm/fault.c`**

Alright, time to get my hands dirty. My focus is on understanding how faults are handled in the kernel, specifically on ARM64. The starting point is the `fault_info[]` table. I'm going to pore over every entry within that table, located within the `arch/arm64/mm/fault.c` file. I need to get a clear picture of how different types of memory access faults are categorized, detected, and ultimately, dealt with at the architectural level on ARM64. It’s critical to understand the granularity here; I want to see which specific fault handlers are invoked for different scenarios. Time to get digging.



271/4 2026/09/08 10:16 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:915 LineCount:60]

Results:
map[Contents: 915:	}
 916:	
 917:	static const struct fault_info fault_info[] = {
 918:		{ do_bad,		SIGKILL, SI_KERNEL,	"ttbr address size fault"	},
 919:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 1 address size fault"	},
 920:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 2 address size fault"	},
 921:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 3 address size fault"	},
 922:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 0 translation fault"	},
 923:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 1 translation fault"	},
 924:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 2 translation fault"	},
 925:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 3 translation fault"	},
 926:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 access flag fault"	},
 927:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 access flag fault"	},
 928:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 access flag fault"	},
 929:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 access flag fault"	},
 930:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 permission fault"	},
 931:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 permission fault"	},
 932:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 permission fault"	},
 933:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
 934:		{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
 935:		{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
 936:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 18"			},
 937:		{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 (translation table walk)"	},
 938:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 (translation table walk)"	},
 939:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 (translation table walk)"	},
 940:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 (translation table walk)"	},
 941:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 (translation table walk)"	},
 942:		{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous parity or ECC error" },	// Reserved when RAS is implemented
 943:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 25"			},
 944:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 26"			},
 945:		{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 946:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 947:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 948:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 949:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 950:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
 951:		{ do_alignment_fault,	SIGBUS,  BUS_ADRALN,	"alignment fault"		},
 952:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 34"			},
 953:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 35"			},
 954:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 36"			},
 955:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 37"			},
 956:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 38"			},
 957:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 39"			},
 958:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 40"			},
 959:		{ do_bad,		SIGKILL, SI_KERNEL,	"level -1 address size fault"	},
 960:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 42"			},
 961:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level -1 translation fault"	},
 962:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 44"			},
 963:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 45"			},
 964:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 46"			},
 965:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 47"			},
 966:		{ do_bad,		SIGKILL, SI_KERNEL,	"TLB conflict abort"		},
 967:		{ do_bad,		SIGKILL, SI_KERNEL,	"Unsupported atomic hardware update fault"	},
 968:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 50"			},
 969:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 51"			},
 970:		{ do_bad,		SIGKILL, SI_KERNEL,	"implementation fault (lockdown abort)" },
 971:		{ do_bad,		SIGBUS,  BUS_OBJERR,	"implementation fault (unsupported exclusive)" },
 972:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 54"			},
 973:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 55"			},
 974:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 56"			},
]

272/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 30087
							output: 38
							thoughts: 2650
						

Thoughts:
**Analysis of ARM64 Synchronous External Aborts with Exclusive Accesses on Device Memory**

Okay, so I've been digging into how the ARM64 kernel handles memory faults, specifically when it comes to exclusive load/store instructions (like `ldxr`, `stxr`) and Device memory. My initial observation is focused on how alignment faults and Synchronous External Aborts (SEAs) are handled by the kernel, and the distinction is critical.

First, let's look at `fault_info[]`, and then let's differentiate between user and kernel mode handling. An Alignment fault handler `do_alignment_fault` eventually calls `__do_kernel_fault`, which *does* call `fixup_exception()`.  This is key because it allows exception fixups (e.g., extables used by `copy_from_user`, `get_user` etc.) to catch and handle the fault *gracefully*. These handlers can check if the current instruction is inside `copy_from_user` or the atomic op with extable.

However, the SEA handler, `do_sea()`, is a different beast.  It is worth looking at the code. `do_sea` calls `arm64_notify_die()`. If it occurs in kernel mode, `arm64_notify_die()` calls `die()`. It does **not** call `fixup_exception()`, and that's the big difference! This means the kernel just dies immediately with a hard panic in kernel mode.

Now, let's explore why `ldxr` might generate a SEA *instead* of an alignment fault.  My theory is that the behavior depends on whether the memory is device or normal memory.

1.  **ARMv8-A Architecture:** ARMv8 states that exclusive accesses to Device memory are "CONSTRAINED UNPREDICTABLE." It can manifest as either an alignment fault or a SEA, and the device memory might not even support exclusive monitors or caching.

2.  **PCI BARs and sysfs:**  If I'm accessing a PCI BAR (e.g., mapped via `/sys/bus/pci/devices/.../resourceX` using `pgprot_device`), it's mapped as `MT_DEVICE_nGnRE`.  When an `ldxr` (or something using it) attempts access, I expect one of the two: (1) internal error in the core (MMU/LSU) if it supports device memory exclusive accesses; or (2) more commonly, the exclusive access request goes out to the system bus (e.g., AXI/CHI). Because PCIe doesn't support exclusive transactions (no equivalent to LL/SC), the PCIe controller rejects the transaction, returning a bus error, which the CPU translates into a SEA.

3.  **On-chip RAM/SRAM vs. PCI BAR:** It gets more nuanced when comparing different memory types. If the memory is on-chip SRAM/RAM, the core's MMU may catch it immediately as an alignment fault. However, for PCI BARs, and some CPU cores, the transaction actually *goes out on the bus*. Since the bus or PCIe doesn't support the exclusive transaction, the interconnect throws a bus error, and that's the SEA that we see.

The question then, is *why* the SEA isn't handled by `fixup_exception()`? The code clearly shows that `do_sea()` explicitly does *not* call `fixup_exception()`.  SEAs are treated as hardware errors, and therefore are *not* intended to be fixable by software. The kernel assumes a hardware / system problem and therefore calls `die()` directly. Even in user mode, if unhandled by APEI, it receives `SIGBUS` with `BUS_OBJERR`, not `BUS_ADRALN`.  It is also a critical difference, because the kernel *wants* to panic in kernel mode!

I'll search for related git commits or mailing list discussions, but in my mind, the behavior seems intentional. The kernel treats these SEAs as unrecoverable errors because the root cause is in the hardware / external system. We're getting an external error from the hardware, so it's critical that the kernel die.



273/4 2026/09/08 10:16 tool git-log
0m Args:
map[Count:20 MessageRegexps:[Synchronous External Abort] PathPrefix:arch/arm64]

Results:
map[Output:4cd774c1feb3 arm64: dts: qcom: purwa: Fix GPU IOMMU property
85d98669fa7f arm64: dts: qcom: monaco: Reserve full Gunyah metadata region
ee021b27333b arm64: dts: qcom: kodiak: Add missing clock votes for lpass_tlmm
ad9c62bd8946 KVM: arm64: VM exit to userspace to handle SEA
d7ce7e3a8464 arm64: Mark kernel as tainted on SAE and SError panic
9aba641b9ec2 KVM: arm64: nv: Respect exception routing rules for SEAs
e735a5da6442 KVM: arm64: Don't retire aborted MMIO instruction
5dbbe7e0a2b9 arm64: dts: qcom: qcm6490-fairphone-fp5: Add missing reserved-memory
a5982b397100 arm64: dts: qcom: sm8550: fix LPASS pinctrl slew base address
12064c176843 Revert "ACPI: Add memory semantics to acpi_os_map_memory()"
88a84ccccb39 KVM: arm64: Survive synchronous exceptions caused by AT instructions
e9ee186bb735 KVM: arm64: Add kvm_extable for vaxorcism code
84b951a803a5 KVM: arm64: Handle data and instruction external aborts the same way
b2037dafcf08 arm64: dts: meson-gxl-s805x: reduce initial Mali450 core frequency
0db5e0223035 KVM: arm/arm64: Add kvm_ras.h to collect kvm specific RAS plumbing
ec89ab50a03a arm64: Fix TTBR + PAN + 52-bit PA logic in cpu_do_switch_mm
526c3ddb6aa2 signal/arm64: Document conflicts with SI_USER and SIGFPE,SIGTRAP,SIGBUS
7edda0886bc3 acpi: apei: handle SEA notification type for ARMv8
32015c235603 arm64: exception: handle Synchronous External Abort
a8ada146f517 arm64: Update the synchronous external abort fault description
]

274/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 34301
							output: 27
							thoughts: 50
						

Thoughts:
Here's my take on those commits:

**Diving into the Codebase**

Alright, let's get down to brass tacks. I need to understand the trajectory of this project, and that means getting my hands dirty with the commit history. I'm going to start with a few specific snapshots – `88a84ccccb39`, `32015c235603`, and `d7ce7e3a8464`. My initial assessment will focus on the most impactful aspects of these commits. This is where the real signal is. I'm hoping to quickly identify the crucial changes. I'll be looking for architectural shifts, key bug fixes, feature implementations, or refactoring efforts. Understanding the evolution of the codebase hinges on grasping these points.



275/4 2026/09/08 10:16 tool git-show
0m Args:
map[Commit:32015c235603]

Results:
map[Output:commit 32015c235603a209697d1228667b1fb1cc8a8d06
Author: Tyler Baicar <tbaicar@codeaurora.org>
Date:   Wed Jun 21 12:17:08 2017 -0600

    arm64: exception: handle Synchronous External Abort
    
    SEA exceptions are often caused by an uncorrected hardware
    error, and are handled when data abort and instruction abort
    exception classes have specific values for their Fault Status
    Code.
    When SEA occurs, before killing the process, report the error
    in the kernel logs.
    Update fault_info[] with specific SEA faults so that the
    new SEA handler is used.
    
    Signed-off-by: Tyler Baicar <tbaicar@codeaurora.org>
    CC: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
    Reviewed-by: James Morse <james.morse@arm.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    [will: use NULL instead of 0 when assigning si_addr]
    Signed-off-by: Will Deacon <will.deacon@arm.com>

diff --git a/arch/arm64/include/asm/esr.h b/arch/arm64/include/asm/esr.h
index 85997c0e5443..28bf02efce76 100644
--- a/arch/arm64/include/asm/esr.h
+++ b/arch/arm64/include/asm/esr.h
@@ -83,6 +83,7 @@
 #define ESR_ELx_WNR		(UL(1) << 6)
 
 /* Shared ISS field definitions for Data/Instruction aborts */
+#define ESR_ELx_FnV		(UL(1) << 10)
 #define ESR_ELx_EA		(UL(1) << 9)
 #define ESR_ELx_S1PTW		(UL(1) << 7)
 
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 37b95dff0b07..246e64f60610 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -522,6 +522,31 @@ static int do_bad(unsigned long addr, unsigned int esr, struct pt_regs *regs)
 	return 1;
 }
 
+/*
+ * This abort handler deals with Synchronous External Abort.
+ * It calls notifiers, and then returns "fault".
+ */
+static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
+{
+	struct siginfo info;
+	const struct fault_info *inf;
+
+	inf = esr_to_fault_info(esr);
+	pr_err("Synchronous External Abort: %s (0x%08x) at 0x%016lx\n",
+		inf->name, esr, addr);
+
+	info.si_signo = SIGBUS;
+	info.si_errno = 0;
+	info.si_code  = 0;
+	if (esr & ESR_ELx_FnV)
+		info.si_addr = NULL;
+	else
+		info.si_addr  = (void __user *)addr;
+	arm64_notify_die("", regs, &info, esr);
+
+	return 0;
+}
+
 static const struct fault_info fault_info[] = {
 	{ do_bad,		SIGBUS,  0,		"ttbr address size fault"	},
 	{ do_bad,		SIGBUS,  0,		"level 1 address size fault"	},
@@ -539,22 +564,22 @@ static const struct fault_info fault_info[] = {
 	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 permission fault"	},
 	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 permission fault"	},
 	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
-	{ do_bad,		SIGBUS,  0,		"synchronous external abort"	},
+	{ do_sea,		SIGBUS,  0,		"synchronous external abort"	},
 	{ do_bad,		SIGBUS,  0,		"unknown 17"			},
 	{ do_bad,		SIGBUS,  0,		"unknown 18"			},
 	{ do_bad,		SIGBUS,  0,		"unknown 19"			},
-	{ do_bad,		SIGBUS,  0,		"synchronous external abort (translation table walk)" },
-	{ do_bad,		SIGBUS,  0,		"synchronous external abort (translation table walk)" },
-	{ do_bad,		SIGBUS,  0,		"synchronous external abort (translation table walk)" },
-	{ do_bad,		SIGBUS,  0,		"synchronous external abort (translation table walk)" },
-	{ do_bad,		SIGBUS,  0,		"synchronous parity error"	},
+	{ do_sea,		SIGBUS,  0,		"level 0 (translation table walk)"	},
+	{ do_sea,		SIGBUS,  0,		"level 1 (translation table walk)"	},
+	{ do_sea,		SIGBUS,  0,		"level 2 (translation table walk)"	},
+	{ do_sea,		SIGBUS,  0,		"level 3 (translation table walk)"	},
+	{ do_sea,		SIGBUS,  0,		"synchronous parity or ECC error" },
 	{ do_bad,		SIGBUS,  0,		"unknown 25"			},
 	{ do_bad,		SIGBUS,  0,		"unknown 26"			},
 	{ do_bad,		SIGBUS,  0,		"unknown 27"			},
-	{ do_bad,		SIGBUS,  0,		"synchronous parity error (translation table walk)" },
-	{ do_bad,		SIGBUS,  0,		"synchronous parity error (translation table walk)" },
-	{ do_bad,		SIGBUS,  0,		"synchronous parity error (translation table walk)" },
-	{ do_bad,		SIGBUS,  0,		"synchronous parity error (translation table walk)" },
+	{ do_sea,		SIGBUS,  0,		"level 0 synchronous parity error (translation table walk)"	},
+	{ do_sea,		SIGBUS,  0,		"level 1 synchronous parity error (translation table walk)"	},
+	{ do_sea,		SIGBUS,  0,		"level 2 synchronous parity error (translation table walk)"	},
+	{ do_sea,		SIGBUS,  0,		"level 3 synchronous parity error (translation table walk)"	},
 	{ do_bad,		SIGBUS,  0,		"unknown 32"			},
 	{ do_alignment_fault,	SIGBUS,  BUS_ADRALN,	"alignment fault"		},
 	{ do_bad,		SIGBUS,  0,		"unknown 34"			},
]

276/4 2026/09/08 10:16 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 36440
							output: 978
							thoughts: 3461
						

Thoughts:
**Analysis of Synchronous External Abort (SEA) on Device Memory Access**

Alright, let's break this down. My understanding of the situation begins in `arch/arm64/mm/fault.c`. The core issue is that a synchronous external abort (SEA) is occurring, and it's not being handled by the standard `fixup_exception()` mechanism. I'm seeing that, in the provided code, `do_mem_abort()` calls a fault handler based on the ESR value. If this ESR corresponds to SEA (specifically, Device memory exclusive access failure), the relevant handler is `do_sea()`. I observe that `do_sea()` is distinct from translation, permission, or alignment faults.

Specifically, I recognize that `do_sea()` doesn't call `fixup_exception()`. This is crucial. `fixup_exception()` is designed to handle recoverable exceptions within the kernel that involve MMU-level errors, or alignment faults. It uses exception tables (extables) to "fix" exceptions, specifically for situations where kernel code is *expecting* potentially invalid memory access (like when using `copy_from_user` or similar functions) and returns `-EFAULT` instead of crashing. SEA, however, is treated differently. It's a signal from external hardware indicating an irrecoverable error like an unsupported bus transaction, parity error, or a device failure, representing a system-level issue and therefore being fatal.

So, the key here is the *why*: why SEA and not an Alignment fault, and why no `fixup_exception()`?

1.  **Architecture and Bus Behavior:** According to the ARM Architecture Reference Manual (ARM ARM), exclusive accesses to Device memory (mapped, for example, with `pgprot_device()`, which typically corresponds to `MT_DEVICE_nGnRE`) are "CONSTRAINED UNPREDICTABLE." This essentially means that the behavior is implementation-dependent. The architecture *permits* the CPU to either generate an Alignment fault *internally* (ESR.EC = 0x24/0x25, DFSC = 0b100001) *before* issuing any transaction, or, to attempt the exclusive transaction on the bus.
2.  **PCIe BAR Specifics:** When a PCI BAR (accessed through sysfs like `/sys/bus/pci/devices/.../resource0`) is involved, the memory is mapped with `pgprot_device()`. The key is that the bus/interconnect may or may not support exclusive accesses. Since PCIe protocol doesn't support Load-Exclusive/Store-Exclusive (LL/SC) operations on PCIe BARs, the interconnect or PCIe Root Complex will reject the transaction, generating an error response.
3.  **Why the SEA?** The CPU core, in this specific microarchitecture/interconnect implementation, *issues* the exclusive transaction on the system bus. Since this is a PCI BAR, the PCIe subsystem/host bridge then returns an error because exclusive accesses are not supported. This error response from the external bus is translated by the processor into a Synchronous External Abort. Different cores may behave differently (some generate an alignment fault locally; some dispatch the transaction). This explains the observed SEA.
4.  **No `fixup_exception()`:** Because `do_sea()` receives a SEA, it marks the error as fatal. It doesn't attempt to recover through `fixup_exception()`, regardless of the extable. As far as the kernel is concerned, this represents a *machine check* level failure.

As a final check, it is important to confirm the ESR/DFSC codes and the specific kernel code which routes the exception to `do_sea()`. The kernel code makes it clear that the kernel is *correctly* interpreting an external abort on a bus transaction to a memory device as a serious hardware error, and thus should not attempt a "fixup."



277/4 2026/09/08 10:17 tool set-results
0m Args:
map[Answer:An `ldxr` (Load-Exclusive) instruction executed on memory mapped as `pgprot_device` (`MT_DEVICE_nGnRE`) for a PCI BAR generated a Synchronous External Abort (SEA) instead of an Alignment fault, and was not handled by `fixup_exception()`, due to the following reasons:

---

### 1. Why it generated a Synchronous External Abort (SEA) instead of an Alignment Fault

1. **ARM Architecture Specification (CONSTRAINED UNPREDICTABLE):**
   Under the ARMv8/ARMv9 Architecture Reference Manual (Arm ARM), exclusive load/store instructions (`LDXR`, `STXR`, etc.) require an Exclusive Monitor. Because Device memory (`MT_DEVICE_nGnRE`, `MT_DEVICE_nGnRnE`, etc.) does not support exclusive monitors, performing an exclusive access on Device memory is architecturally **CONSTRAINED UNPREDICTABLE**. The architecture explicitly permits implementations to:
   - Generate an **Alignment fault** internally at the core/MMU stage.
   - Issue the transaction onto the system interconnect/bus as an exclusive access, which can result in an **External Abort** if unsupported by the target/interconnect.
   - Treat the instruction as a non-exclusive access.

2. **PCIe Interconnect and Host Bridge Behavior:**
   - On CPU microarchitectures that do not trap exclusive accesses to Device memory internally as Alignment faults, the CPU issues the read transaction with the exclusive attribute (e.g., via AXI/CHI interconnect) to the PCIe Host Bridge / Root Complex.
   - The **PCI Express (PCIe) protocol does not support exclusive transactions (LL/SC)** across PCI BARs.
   - When the PCIe Root Complex, host bridge, or interconnect fabric receives an exclusive transaction destined for a PCI BAR, it rejects the transaction and responds with a bus error (e.g., AXI `SLVERR` / `DECERR` or PCIe Unsupported Request / Completer Abort).
   - Upon receiving this error response from the external bus, the CPU generates a **Synchronous External Abort (SEA)** (Fault Status Code `0b010000` in `ESR_ELx`).

---

### 2. Why it wasn't handled by `fixup_exception()`

In the ARM64 Linux kernel (`arch/arm64/mm/fault.c`):

1. **Alignment Fault Path:**
   - Alignment faults (FSC `0b100001`) are dispatched via `fault_info[]` to `do_alignment_fault()`.
   - `do_alignment_fault()` calls `do_bad_area()`, which for kernel-mode exceptions calls `__do_kernel_fault()`.
   - `__do_kernel_fault()` explicitly checks the exception table:
     ```c
     if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
         return;
     ```
   - If an exception table (`extable`) entry exists for the instruction (e.g., within `copy_from_user`, `get_user`, or atomic uaccess helpers), `fixup_exception()` catches it and safely recovers (typically returning `-EFAULT`).

2. **Synchronous External Abort (SEA) Path:**
   - Synchronous External Aborts (FSC `0b010000`) are dispatched via `fault_info[]` directly to `do_sea()`.
   - SEAs are treated as severe hardware/system bus errors (machine checks) rather than software-recoverable page or alignment faults.
   - `do_sea()` sets `TAINT_MACHINE_CHECK` and directly calls `arm64_notify_die()`:
     ```c
     add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
     arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
     ```
   - `do_sea()` **does not call `fixup_exception()`** or `__do_kernel_fault()`. In kernel mode, `arm64_notify_die()` immediately invokes `die()`, resulting in an unhandled kernel Oops/Panic. (In user mode, it sends `SIGBUS` with `BUS_OBJERR` rather than `BUS_ADRALN`).]

Results:
map[Answer:An `ldxr` (Load-Exclusive) instruction executed on memory mapped as `pgprot_device` (`MT_DEVICE_nGnRE`) for a PCI BAR generated a Synchronous External Abort (SEA) instead of an Alignment fault, and was not handled by `fixup_exception()`, due to the following reasons:

---

### 1. Why it generated a Synchronous External Abort (SEA) instead of an Alignment Fault

1. **ARM Architecture Specification (CONSTRAINED UNPREDICTABLE):**
   Under the ARMv8/ARMv9 Architecture Reference Manual (Arm ARM), exclusive load/store instructions (`LDXR`, `STXR`, etc.) require an Exclusive Monitor. Because Device memory (`MT_DEVICE_nGnRE`, `MT_DEVICE_nGnRnE`, etc.) does not support exclusive monitors, performing an exclusive access on Device memory is architecturally **CONSTRAINED UNPREDICTABLE**. The architecture explicitly permits implementations to:
   - Generate an **Alignment fault** internally at the core/MMU stage.
   - Issue the transaction onto the system interconnect/bus as an exclusive access, which can result in an **External Abort** if unsupported by the target/interconnect.
   - Treat the instruction as a non-exclusive access.

2. **PCIe Interconnect and Host Bridge Behavior:**
   - On CPU microarchitectures that do not trap exclusive accesses to Device memory internally as Alignment faults, the CPU issues the read transaction with the exclusive attribute (e.g., via AXI/CHI interconnect) to the PCIe Host Bridge / Root Complex.
   - The **PCI Express (PCIe) protocol does not support exclusive transactions (LL/SC)** across PCI BARs.
   - When the PCIe Root Complex, host bridge, or interconnect fabric receives an exclusive transaction destined for a PCI BAR, it rejects the transaction and responds with a bus error (e.g., AXI `SLVERR` / `DECERR` or PCIe Unsupported Request / Completer Abort).
   - Upon receiving this error response from the external bus, the CPU generates a **Synchronous External Abort (SEA)** (Fault Status Code `0b010000` in `ESR_ELx`).

---

### 2. Why it wasn't handled by `fixup_exception()`

In the ARM64 Linux kernel (`arch/arm64/mm/fault.c`):

1. **Alignment Fault Path:**
   - Alignment faults (FSC `0b100001`) are dispatched via `fault_info[]` to `do_alignment_fault()`.
   - `do_alignment_fault()` calls `do_bad_area()`, which for kernel-mode exceptions calls `__do_kernel_fault()`.
   - `__do_kernel_fault()` explicitly checks the exception table:
     ```c
     if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
         return;
     ```
   - If an exception table (`extable`) entry exists for the instruction (e.g., within `copy_from_user`, `get_user`, or atomic uaccess helpers), `fixup_exception()` catches it and safely recovers (typically returning `-EFAULT`).

2. **Synchronous External Abort (SEA) Path:**
   - Synchronous External Aborts (FSC `0b010000`) are dispatched via `fault_info[]` directly to `do_sea()`.
   - SEAs are treated as severe hardware/system bus errors (machine checks) rather than software-recoverable page or alignment faults.
   - `do_sea()` sets `TAINT_MACHINE_CHECK` and directly calls `arm64_notify_die()`:
     ```c
     add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
     arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
     ```
   - `do_sea()` **does not call `fixup_exception()`** or `__do_kernel_fault()`. In kernel mode, `arm64_notify_die()` immediately invokes `die()`, resulting in an unhandled kernel Oops/Panic. (In user mode, it sends `SIGBUS` with `BUS_OBJERR` rather than `BUS_ADRALN`).]

278/2 2026/09/08 10:17 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 38533
							output: 42
							thoughts: 995
						

Thoughts:
**Analyzing the SEA Bug: A Deep Dive**

Okay, let's break this down. The architecture presents a scenario – it's *constrained*, and it's *unpredictable*. This means something's going to go wrong, and it's not immediately obvious what. Specifically, certain CPUs issue a transaction to the bus that results in an error, causing a Synchronous External Abort (SEA). The critical flaw is that the `do_sea()` function *doesn't* check `fixup_exception()`. This opens the door for issues.

So, any `ldxr` instruction (load exclusive register) targeting Device memory or PCIe memory can trigger a SEA and panic the kernel. We already know that an unprivileged user can map PCIe memory through DRM render nodes – think AMDGPU or nouveau VRAM allocations. This is where it gets interesting.

If they map VRAM via DRM render nodes, it gives them `pgprot_writecombine`, which, as it turns out, is the same as `MT_NORMAL_NC`. The code expert's explanation confirms: `MT_NORMAL_NC` causes SEAs on `ldxr`. The CPU emits an exclusive read transaction, the PCIe Root Complex errors, and the CPU generates a SEA. Boom.

Since DRM render nodes are accessible to unprivileged users, this means they *can* trigger this bug.

But is it exploitable beyond a simple Denial of Service (DoS)? It's a kernel panic, triggered by a machine check or bus error, calling `die()`. No memory corruption, no control flow hijack, no information leak, it's a clean DoS.

So, the dimensions are:

*   Exploitable: No
*   Denial of Service: Yes
*   Accessible From Unprivileged Processes: Yes (via DRM render nodes and VRAM mapping)

The bug report mentions sysfs, but that's just one avenue to reproduce it. The vulnerability is fundamentally that `futex` does not validate if the memory is Device memory and if `ldxr` is safe there.

`futex` on ARM64 uses `access_ok()`, only checking address validity. It doesn't check the memory attributes (which would incur performance overhead). Any user-mapped memory that causes SEA on `ldxr` can crash the kernel via `futex`.

Are there other ways? DRM render nodes are the main one. `memfd` is normal RAM. `dma-buf` is a potential vector if a driver exports one pointing to Device/PCIe memory and the user mmaps it. This can also be achieved through DRM render nodes.

What about other subsystems like V4L2? Possibly. DRM render nodes are very widespread on desktops and some servers/mobile, so this is definitely a realistic scenario.

Let's confirm that DRM render nodes are accessible to unprivileged users. `/dev/dri/renderD128` typically has mode 0666. Can an unprivileged user allocate VRAM there? Yes, `AMDGPU_GEM_DOMAIN_VRAM` is permitted for unprivileged users.

So, an unprivileged user can trigger this DoS.

The question explicitly asks about access without root access. Since `/dev/dri/renderD*` is not root-restricted, it qualifies.

While the bug report uses sysfs for reproduction, the core issue remains that `futex` lets SEAs happen.

Is there a fix? If `do_sea` called `fixup_exception()`, it could prevent the panic and return `-EFAULT`. I should check for a patch related to this mitigation.



279/2 2026/09/08 10:17 tool git-log
0m Args:
map[CodeRegexp:do_sea Count:10 PathPrefix:arch/arm64/mm/fault.c]

Results:
map[Output:7ac8d5b2423c arm64: Add ESR decoding for exceptions involving translation level -1
8d56e5c5a99c arm64: Treat ESR_ELx as a 64-bit register
dceec3ff7807 arm64: expose FAR_EL1 tag bits in siginfo
af40ff687bc9 arm64: signal: Ensure si_code is valid for all fault signals
526c3ddb6aa2 signal/arm64: Document conflicts with SI_USER and SIGFPE,SIGTRAP,SIGBUS
3f7c86b2382e arm64: Update fault_info table with new exception types
32015c235603 arm64: exception: handle Synchronous External Abort
]

280/2 2026/09/08 10:17 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 40541
							output: 28
							thoughts: 25
						

Thoughts:
Here's my thought process, summarized as you requested:

**Investigating Potential Conflicts**

Okay, I need to get to the bottom of this. Before diving in too deep, let's step back and take a more focused approach. My immediate thought is, "Where might I be seeing related issues?" Given what I'm dealing with, my gut tells me it's likely related to either the kernel's `futex` implementation, or something to do with Synchronous External Abort (SEA) events, especially if there's some kind of synchronization issue. So, I'm going to quickly search the commit history. I'll focus that search using those terms: I'll target commits that mention both the word `futex` and either `SEA` or `Synchronous External Abort`. This should give me a very targeted set of commits to review. I'm hoping this will provide a roadmap and will allow me to quickly identify any past solutions or discussions in these areas. This should be a good starting point to narrow down the source of any problems.



281/2 2026/09/08 10:17 tool git-log
0m Args:
map[Count:10 MessageRegexps:[futex abort]]

Results:
map[Output:7d81675d1bb2 Documentation/rv: Explain epoll and aborted sleeps
239a310b4942 drm/amdgpu: Fix out-of-bounds issue in user fence
07814a9439a3 sched_ext: Print debug dump after an error exit
12bb3f7f1b03 futex: Ensure the correct return value from futex_lock_pi()
ce5c31db3645 lib/ubsan: don't serialize UBSAN report
4a9bfafc64f4 ALSA: firewire-lib: Fix stall of process context at packet error
39680f50ae54 userfaultfd: don't block on the last VM updates at exit time
aa10990e028c futex: avoid wake_futex() for a PI futex_q
84bc4af59081 futex: Detect mismatched requeue targets
]

282/2 2026/09/08 10:18 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41060
							output: 32
							thoughts: 17
						

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

**Focused Investigation: `do_sea` and `fixup_exception`**

Okay, so I'm honing in on specific elements within the code base. I need to zero in on the interactions involving `do_sea` and `fixup_exception`. Given my deep understanding of the architecture, I'm assuming that `do_sea` likely represents a core operation or entry point within this system, potentially related to data access, processing, or a critical workflow. The presence of `fixup_exception` suggests there might be error handling or recovery mechanisms intertwined with whatever `do_sea` is doing. I'm immediately thinking about potential race conditions, data corruption scenarios, or perhaps the handling of transient failures. The combination of these two elements, within the broader context of [User's Field], usually points to a specific set of underlying architectural concerns. My next steps involve determining the scope and impact of those functions. I'll need to trace the call graphs, review any related documentation or comments, and, ideally, identify any unit or integration tests associated with these functions to get a better sense of their usage patterns.



283/2 2026/09/08 10:18 tool git-log
0m Args:
map[Count:10 MessageRegexps:[do_sea fixup_exception]]

Results:
map[Output:]

284/2 2026/09/08 10:18 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41373
							output: 30
							thoughts: 12
						

Thoughts:
Okay, here's my attempt at summarizing those thoughts from a first-person, expert perspective, anticipating what a specialist might be thinking:

**Initial Considerations: Potential Tools and Scope**

Alright, so the initial prompt gives me a bit to chew on. My immediate thought process goes straight to relevant tools and possible modules. The mention of "extable" makes me think about a data extraction or table handling routine. Is it about exporting, importing, or manipulating tabular data? It could point to a need for generating external data structures and that immediately gives me ideas about how I would use that data. "do_sea" is a slightly less clear candidate, but could be a data processing or transformation component, potentially linked to a broader process related to marine applications or data. The phrase suggests this needs some deep diving, and might be some legacy code.

I'm already mentally sketching out a possible workflow: First I might need to extract from some primary data. Perhaps I might parse tabular data. Then I need to use the marine module, because of the "do_sea" module. Depending on the scenario, I might start to think about things like data cleaning, transformation, and validation, since those are typically the sticking points of this workflow. I need to keep in mind, of course, that without more context, I'm just making assumptions.



285/2 2026/09/08 10:18 tool git-log
0m Args:
map[Count:10 MessageRegexps:[do_sea extable]]

Results:
map[Output:]

286/2 2026/09/08 10:18 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41705
							output: 30
							thoughts: 12
						

Thoughts:
Okay, here's my attempt at summarizing those thoughts from an expert's perspective, using a first-person perspective:

**Considering Potential Leverage Points**

Hmm, thinking about how to approach this problem, two things are immediately jumping out at me as potential areas of investigation. I'm wondering if `do_sea` and `futex` might be relevant here. My initial gut feeling is that they're both strong candidates for understanding and maybe even exploiting whatever's going on. I need to dig deeper into what this thing is, of course, but those two keywords seem like a solid starting point. I'm already formulating some hypotheses...



287/2 2026/09/08 10:18 tool git-log
0m Args:
map[Count:10 MessageRegexps:[do_sea futex]]

Results:
map[Output:]

288/2 2026/09/08 10:19 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41895
							output: 28
							thoughts: 76
						

Thoughts:
**Debugging a Potential Futex Issue**

Okay, hold on a second. I need to clarify something about this bug. Is it still present, or has it been addressed through a different mechanism? My intuition tells me it *might* be related to how we handle `futex` calls on `VM_IO` or `VM_PFNMAP` memory regions. Perhaps the fix involves a specific prevention strategy.

Let me confirm that by delving into the code. I need to see if the `futex` implementation actually accounts for `VM_IO` flags. Specifically, I'll examine the `get_futex_key()` function. My focus will be whether it includes a check against `vma->vm_flags`. That’ll give me the answer I'm looking for.



289/2 2026/09/08 10:19 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:VM_IO PathPrefix:kernel/futex/]

Results:
map[Output:]

290/2 2026/09/08 10:19 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42179
							output: 43
							thoughts: 122
						

Thoughts:
**Analyzing Futex Key Retrieval and Potential Vulnerability**

Okay, hold on a second. This `get_futex_key` function, specifically when dealing with the `FUTEX_PRIVATE_FLAG`, it looks like it *doesn't* bother looking up the Virtual Memory Area (VMA) at all! This snippet here:

```c
	if (unlikely(!fshared)) {
		key->private.mm = mm;
		key->private.address = address;
		return 0;
	}
```

...it just assigns the memory area (`mm`) and the address directly to the private key structure without any VMA flag validation. That's... concerning. It seems like it's completely skipping any checks on VMA flags.

How is this supposed to be mitigated? Where is the security coming from here? Did they modify `do_sea` to check `fixup_exception`? I better double-check `do_sea` and see if there are any compensating mechanisms in place. It's the most likely place where this would be addressed. Let me go back and give `do_sea` another look.



291/2 2026/09/08 10:19 tool git-log
0m Args:
map[CodeRegexp:fixup_exception Count:10 PathPrefix:arch/arm64/mm/fault.c]

Results:
map[Output:653884f88777 arm64: extable: Add fixup handling for uaccess CPY* instructions
e8dfdf3162eb arm64: efi: Recover from synchronous exceptions occurring in firmware
7572ac3c979d arm64: efi: Revert "Recover from synchronous exceptions ..."
23715a26c8d8 arm64: efi: Recover from synchronous exceptions occurring in firmware
9adeb8e72dbf arm64: Handle el1 synchronous instruction aborts cleanly
1d18c47c735e arm64: MMU fault handling and page table management
]

292/2 2026/09/08 10:19 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42760
							output: 109
							thoughts: 229
						

Thoughts:
**Investigating a Potential Kernel Vulnerability**

Okay, so I'm digging into this code, and it hits me: `do_sea` isn't actually checking `fixup_exception`. That's... concerning. Did we truly fix this thing? Or is this something that's known and just hasn't been addressed yet, maybe written off as a hardware quirk?

Wait a second. If an `ldxr` instruction on Device memory is triggering a SEA (System Error Abort), and `do_sea` is subsequently panicking, then *anyone* who can get their hands on Device memory mapping can crash the kernel. That's a massive security hole!

So, how easy is it to map Device memory? Let's see... `/dev/mem`? That needs root. Sysfs PCI BARs? Root again (and with the right permissions, 0600). Okay, that's not ideal, but it's a hurdle. What about DRM render nodes? They're often accessible.

Let's investigate further, I need to know if DRM render nodes are mapped as `pgprot_device` or `pgprot_writecombine`. I know `pgprot_writecombine` maps to `MT_NORMAL_NC`. Does `MT_NORMAL_NC` trigger SEAs on `ldxr`? If so, this could be a big problem.

I need to nail this down. I'll reach out to CodeExpert and ask about this `MT_NORMAL_NC` issue. I need to know if it causes SEAs on `ldxr` across *all* ARM64 CPUs, or just on specific ones. That's the key to understanding the scope of this potential vulnerability.



293/2 2026/09/08 10:19 tool codeexpert
13m Args:
map[Question:Does `ldxr` on `MT_NORMAL_NC` (pgprot_writecombine) memory cause a Synchronous External Abort (SEA) on ARM64, or does it only happen for `MT_DEVICE_nGnRE` (pgprot_device)? If an unprivileged user maps VRAM via a DRM render node (which uses pgprot_writecombine) and calls futex on it, will it reliably crash the kernel via SEA?]

Results:
map[Answer:1. **Behavior of `ldxr` on `MT_NORMAL_NC` vs `MT_DEVICE_nGnRE`**:
   - `ldxr` on `MT_NORMAL_NC` (`pgprot_writecombine`) **does not** cause a Synchronous External Abort (SEA). `MT_NORMAL_NC` configures the MMU with **Normal Non-cacheable** memory attributes (MAIR index attribute `0x44`). In the ARMv8/ARMv9 architecture, all Normal memory (both cacheable and non-cacheable) supports exclusive accesses (`LDXR`/`STXR`), which are tracked by local and global/interconnect exclusive monitors.
   - In contrast, exclusive accesses to `MT_DEVICE_nGnRE` (or `MT_DEVICE_nGnRnE` / `pgprot_device` / `pgprot_noncached`) are targeted at **Device** memory. Under the ARM architecture, exclusive operations on Device memory are prohibited/CONSTRAINED UNPREDICTABLE; hardware implementations generate a Data Abort / Synchronous External Abort (SEA) because peripheral buses and device endpoints do not support exclusive monitors.

2. **DRM Render Node VRAM Mapping and `futex`**:
   - Calling `futex` on VRAM mapped via a DRM render node **will not** crash the kernel via SEA.
   - DRM render nodes map buffer objects (GEM/TTM) using `pgprot_writecombine` (`MT_NORMAL_NC`), not `MT_DEVICE_nGnRE`.
   - When the kernel executes `futex_atomic_cmpxchg_inatomic` (e.g., during `FUTEX_LOCK_PI` or `FUTEX_WAKE_OP`), the `ldxr`/`stlxr` instructions operate on `MT_NORMAL_NC` Normal memory, which executes normally and does not trigger an SEA.
   - For non-private/shared futex calls, `get_futex_key()` calls `get_user_pages_fast()`, which fails gracefully with `-EFAULT` on `VM_PFNMAP`/`VM_IO` VRAM buffers and safely returns `-EFAULT` to userspace.
   - While a true SEA occurring in kernel mode (EL1) on ARM64 does lead to `die()` (kernel Oops/panic) because `do_sea()` does not invoke exception table fixups, this condition is not triggered on `MT_NORMAL_NC` mappings.]

294/3 2026/09/08 10:19 agent codeexpert
13m Model:
core

Results:
map[Answer:1. **Behavior of `ldxr` on `MT_NORMAL_NC` vs `MT_DEVICE_nGnRE`**:
   - `ldxr` on `MT_NORMAL_NC` (`pgprot_writecombine`) **does not** cause a Synchronous External Abort (SEA). `MT_NORMAL_NC` configures the MMU with **Normal Non-cacheable** memory attributes (MAIR index attribute `0x44`). In the ARMv8/ARMv9 architecture, all Normal memory (both cacheable and non-cacheable) supports exclusive accesses (`LDXR`/`STXR`), which are tracked by local and global/interconnect exclusive monitors.
   - In contrast, exclusive accesses to `MT_DEVICE_nGnRE` (or `MT_DEVICE_nGnRnE` / `pgprot_device` / `pgprot_noncached`) are targeted at **Device** memory. Under the ARM architecture, exclusive operations on Device memory are prohibited/CONSTRAINED UNPREDICTABLE; hardware implementations generate a Data Abort / Synchronous External Abort (SEA) because peripheral buses and device endpoints do not support exclusive monitors.

2. **DRM Render Node VRAM Mapping and `futex`**:
   - Calling `futex` on VRAM mapped via a DRM render node **will not** crash the kernel via SEA.
   - DRM render nodes map buffer objects (GEM/TTM) using `pgprot_writecombine` (`MT_NORMAL_NC`), not `MT_DEVICE_nGnRE`.
   - When the kernel executes `futex_atomic_cmpxchg_inatomic` (e.g., during `FUTEX_LOCK_PI` or `FUTEX_WAKE_OP`), the `ldxr`/`stlxr` instructions operate on `MT_NORMAL_NC` Normal memory, which executes normally and does not trigger an SEA.
   - For non-private/shared futex calls, `get_futex_key()` calls `get_user_pages_fast()`, which fails gracefully with `-EFAULT` on `VM_PFNMAP`/`VM_IO` VRAM buffers and safely returns `-EFAULT` to userspace.
   - While a true SEA occurring in kernel mode (EL1) on ARM64 does lead to `die()` (kernel Oops/panic) because `do_sea()` does not invoke exception table fixups, this condition is not triggered on `MT_NORMAL_NC` mappings.]

Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Use tools extensively while researching the question. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code.
Use all available sources of information:
 - kernel source code
 - documentation in the Documentation dir in the source tree
 - git commits descriptions, git blame

Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.

Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
   or codesearch-struct-layout FIRST to retrieve clean, exact definitions
   without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
   disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
   non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.
Do NOT use git-log to search for the presence or existence of files in the
repository. git-log is only for tracing commit history of files that are
already present in the current checkout. If a file does not exist in the
current checkout, it cannot be used for reproduction.

Avoid running broad git-log queries (such as searches on the entire repo)
without a specific 'PathPrefix' to restrict the scope, as these are very
expensive and will time out.
If a git-log tool call times out, do not retry the query with the same broad
scope. You must specify a tighter, narrower 'PathPrefix' for subsequent queries.

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:
Does `ldxr` on `MT_NORMAL_NC` (pgprot_writecombine) memory cause a Synchronous External Abort (SEA) on ARM64, or does it only happen for `MT_DEVICE_nGnRE` (pgprot_device)? If an unprivileged user maps VRAM via a DRM render node (which uses pgprot_writecombine) and calls futex on it, will it reliably crash the kernel via SEA?

295/4 2026/09/08 10:19 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 4052
							output: 30
							thoughts: 357
						

Thoughts:
**Analyzing the Query: ARM64 Memory Attributes and Potential Kernel Issues**

Okay, so the user's diving deep into some interesting territory. They're asking about the nitty-gritty of ARM64 architecture – specifically, how `ldxr` (Load-Exclusive Register) behaves when dealing with memory attributes. They're contrasting Non-cacheable Normal memory (`MT_NORMAL_NC` / `pgprot_writecombine`) and Device memory (`MT_DEVICE_nGnRE`). The underlying question is this: if an unprivileged user maps Video RAM via the DRM render node and then uses `futex` on that memory, will we see a kernel crash or a Synchronous External Abort (SEA)?

The risk here is minimal; it's definitely not a high-severity situation. No malware, no exploits, no piracy. It's more of an academic question about architectural behavior. It's a question rooted in the ARM architecture specification and how the kernel manages exclusive loads on different memory types. Also, how the `futex` system interacts with non-cacheable/device memory.

My approach is simple: I need to research and analyze how ARM64 handles these memory attributes and how `futex` interacts with it. That means digging into kernel behavior, consulting the ARM architecture specifications, looking at how the kernel handles page faults, and understanding SEA scenarios. I need to clearly see the differences between writecombine and device memory.

My next steps are clear. I'll be going through the kernel source using tools, specifically looking for:

1.  Anything on ARM64 exclusive access, atomic operations on Non-cacheable memory, and `futex` interactions with non-cacheable/device memory. I'll search for how the kernel manages SEA events.
2.  I'll look at the commit history, Documentation, and the `arch/arm64` code base for details on exclusive load/store instructions like `LDXR/STXR` and CAS operations. I'll focus on how they behave differently on Device vs. Normal Non-cacheable memory.
3.  I need to check how `futex` deals with Memory-Mapped I/O (MMIO), VRAM, `pgprot_writecombine`, and Device memory.



296/4 2026/09/08 10:19 tool grepper
0m Args:
map[Expression:pgprot_writecombine PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/pgtable.h=725=static inline void __set_puds(struct mm_struct *mm, unsigned long addr,
--
arch/arm64/include/asm/pgtable.h-753-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h:754:#define pgprot_writecombine(prot) \
arch/arm64/include/asm/pgtable.h-755-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
--
arch/arm64/mm/mmu.c=96=pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
--
arch/arm64/mm/mmu.c-101-	else if (file->f_flags & O_SYNC)
arch/arm64/mm/mmu.c:102:		return pgprot_writecombine(vma_prot);
arch/arm64/mm/mmu.c-103-	return vma_prot;
]

297/4 2026/09/08 10:19 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 5256
							output: 37
							thoughts: 71
						

Thoughts:
Here's my take on those thoughts:

**Diving into ARM64 Futex Implementation**

Okay, so I'm focusing on the futex implementation, specifically for ARM64. Let's dig into the details of how those atomic operations are handled. My initial instinct is to track down how the kernel actually handles the critical section - is it using something like `futex_atomic_cmpxchg_inatomic`? Or a similar function call? The core of this is going to be in the assembly. I'll need to locate the relevant headers, which I'm pretty sure will be in `arch/arm64/include/asm/futex.h`, or potentially a more generic futex atomic definition if it’s abstracted. This is where the real low-level magic happens and I expect to see the key.



298/4 2026/09/08 10:19 tool grepper
0m Args:
map[Expression:futex_atomic_cmpxchg_inatomic PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/futex.h=284=static inline int
arch/arm64/include/asm/futex.h:285:futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *_uaddr,
arch/arm64/include/asm/futex.h-286-			      u32 oldval, u32 newval)
]

299/4 2026/09/08 10:19 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 5661
							output: 41
							thoughts: 20
						

Thoughts:
Here's my summary, as though I'm reading and thinking about the code:

**Diving into the Arm64 Futex Implementation**

Okay, time to crack open `arch/arm64/include/asm/futex.h`. I'm expecting this to lay out the fundamental structures and definitions for how futexes are handled at the lowest level on Arm64. I'll be looking for things like the atomic operations used, the memory layout of the futex word itself, and any platform-specific nuances that are important for correct synchronization and wakeup. Given that this is an architecture-specific include file, I anticipate seeing low-level assembly definitions or macros that utilize Arm64's specific instruction set for atomics. I'll need to pay close attention to the memory ordering semantics enforced, and how this relates to the various kernel memory models and lock implementations. I'm also curious if they have utilized any of the special hardware capabilities on the Arm64 side. It is also important to consider potential cache issues and how they've dealt with cache coherency here. I'm expecting a mix of straightforward definitions and some clever bit twiddling to optimize common futex operations, especially for the fast path.



300/4 2026/09/08 10:19 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:1 LineCount:100]

Results:
map[Contents:   1:	/* SPDX-License-Identifier: GPL-2.0-only */
   2:	/*
   3:	 * Copyright (C) 2012 ARM Ltd.
   4:	 */
   5:	#ifndef __ASM_FUTEX_H
   6:	#define __ASM_FUTEX_H
   7:	
   8:	#include <linux/futex.h>
   9:	#include <linux/uaccess.h>
  10:	
  11:	#include <asm/errno.h>
  12:	#include <asm/lsui.h>
  13:	
  14:	#define FUTEX_MAX_LOOPS	128 /* What's the largest number you can think of? */
  15:	
  16:	#define LLSC_FUTEX_ATOMIC_OP(op, insn)					\
  17:	static __always_inline int						\
  18:	__llsc_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
  19:	{									\
  20:		unsigned int loops = FUTEX_MAX_LOOPS;				\
  21:		int ret, oldval, newval;					\
  22:										\
  23:		uaccess_enable_privileged();					\
  24:		asm volatile("// __llsc_futex_atomic_" #op "\n"			\
  25:	"	prfm	pstl1strm, %[uaddr]\n"					\
  26:	"1:	ldxr	%w[oldval], %[uaddr]\n"					\
  27:		insn "\n"							\
  28:	"2:	stlxr	%w[ret], %w[newval], %[uaddr]\n"			\
  29:	"	cbz	%w[ret], 3f\n"						\
  30:	"	sub	%w[loops], %w[loops], %w[ret]\n"			\
  31:	"	cbnz	%w[loops], 1b\n"					\
  32:	"	mov	%w[ret], %w[err]\n"					\
  33:	"3:\n"									\
  34:	"	dmb	ish\n"							\
  35:		_ASM_EXTABLE_UACCESS_ERR(1b, 3b, %w[ret])			\
  36:		_ASM_EXTABLE_UACCESS_ERR(2b, 3b, %w[ret])			\
  37:		: [ret] "=&r" (ret), [oldval] "=&r" (oldval),			\
  38:		  [uaddr] "+Q" (*uaddr), [newval] "=&r" (newval),		\
  39:		  [loops] "+r" (loops)						\
  40:		: [oparg] "r" (oparg), [err] "Ir" (-EAGAIN)			\
  41:		: "memory");							\
  42:		uaccess_disable_privileged();					\
  43:										\
  44:		if (!ret)							\
  45:			*oval = oldval;						\
  46:										\
  47:		return ret;							\
  48:	}
  49:	
  50:	LLSC_FUTEX_ATOMIC_OP(add, "add	%w[newval], %w[oldval], %w[oparg]")
  51:	LLSC_FUTEX_ATOMIC_OP(or,  "orr	%w[newval], %w[oldval], %w[oparg]")
  52:	LLSC_FUTEX_ATOMIC_OP(and, "and	%w[newval], %w[oldval], %w[oparg]")
  53:	LLSC_FUTEX_ATOMIC_OP(eor, "eor	%w[newval], %w[oldval], %w[oparg]")
  54:	LLSC_FUTEX_ATOMIC_OP(set, "mov	%w[newval], %w[oparg]")
  55:	
  56:	static __always_inline int
  57:	__llsc_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
  58:	{
  59:		int ret = 0;
  60:		unsigned int loops = FUTEX_MAX_LOOPS;
  61:		u32 val, tmp;
  62:	
  63:		uaccess_enable_privileged();
  64:		asm volatile("//__llsc_futex_cmpxchg\n"
  65:	"	prfm	pstl1strm, %[uaddr]\n"
  66:	"1:	ldxr	%w[curval], %[uaddr]\n"
  67:	"	eor	%w[tmp], %w[curval], %w[oldval]\n"
  68:	"	cbnz	%w[tmp], 4f\n"
  69:	"2:	stlxr	%w[tmp], %w[newval], %[uaddr]\n"
  70:	"	cbz	%w[tmp], 3f\n"
  71:	"	sub	%w[loops], %w[loops], %w[tmp]\n"
  72:	"	cbnz	%w[loops], 1b\n"
  73:	"	mov	%w[ret], %w[err]\n"
  74:	"3:\n"
  75:	"	dmb	ish\n"
  76:	"4:\n"
  77:		_ASM_EXTABLE_UACCESS_ERR(1b, 4b, %w[ret])
  78:		_ASM_EXTABLE_UACCESS_ERR(2b, 4b, %w[ret])
  79:		: [ret] "+r" (ret), [curval] "=&r" (val),
  80:		  [uaddr] "+Q" (*uaddr), [tmp] "=&r" (tmp),
  81:		  [loops] "+r" (loops)
  82:		: [oldval] "r" (oldval), [newval] "r" (newval),
  83:		  [err] "Ir" (-EAGAIN)
  84:		: "memory");
  85:		uaccess_disable_privileged();
  86:	
  87:		if (!ret)
  88:			*oval = val;
  89:	
  90:		return ret;
  91:	}
  92:	
  93:	#ifdef CONFIG_ARM64_LSUI
  94:	
  95:	/*
  96:	 * Wrap LSUI instructions with uaccess_ttbr0_enable()/disable(), as
  97:	 * PAN toggling is not required.
  98:	 */
  99:	
 100:	#define LSUI_FUTEX_ATOMIC_OP(op, asm_op)				\
]

301/4 2026/09/08 10:19 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 7838
							output: 43
							thoughts: 23
						

Thoughts:
Okay, let's dive into this futex header file, `arch/arm64/include/asm/futex.h`. I'm already anticipating some of the usual suspects here, the architectural specifics of implementing futexes on AArch64. I'll be looking for the fundamental data structures, memory ordering considerations, and any optimizations that are specific to the ARMv8 architecture. I'll be paying close attention to any differences from the generic futex implementation, especially around atomic operations and how they've handled potential memory barriers. I'm also curious to see if there are any specific register assignments or inline assembly used for efficiency. This should be interesting.



302/4 2026/09/08 10:19 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:101 LineCount:100]

Results:
map[Contents: 101:	static __always_inline int						\
 102:	__lsui_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)	\
 103:	{									\
 104:		int ret = 0;							\
 105:		int oldval;							\
 106:										\
 107:		uaccess_ttbr0_enable();						\
 108:										\
 109:		asm volatile("// __lsui_futex_atomic_" #op "\n"			\
 110:		__LSUI_PREAMBLE							\
 111:	"1:	" #asm_op "al	%w[oparg], %w[oldval], %[uaddr]\n"		\
 112:	"2:\n"									\
 113:		_ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w[ret])			\
 114:		: [ret] "+r" (ret), [uaddr] "+Q" (*uaddr),			\
 115:		  [oldval] "=r" (oldval)					\
 116:		: [oparg] "r" (oparg)						\
 117:		: "memory");							\
 118:										\
 119:		uaccess_ttbr0_disable();					\
 120:										\
 121:		if (!ret)							\
 122:			*oval = oldval;						\
 123:		return ret;							\
 124:	}
 125:	
 126:	LSUI_FUTEX_ATOMIC_OP(add, ldtadd)
 127:	LSUI_FUTEX_ATOMIC_OP(or, ldtset)
 128:	LSUI_FUTEX_ATOMIC_OP(andnot, ldtclr)
 129:	LSUI_FUTEX_ATOMIC_OP(set, swpt)
 130:	
 131:	static __always_inline int
 132:	__lsui_cmpxchg64(u64 __user *uaddr, u64 *oldval, u64 newval)
 133:	{
 134:		int ret = 0;
 135:	
 136:		uaccess_ttbr0_enable();
 137:	
 138:		asm volatile("// __lsui_cmpxchg64\n"
 139:		__LSUI_PREAMBLE
 140:	"1:	casalt	%[oldval], %[newval], %[uaddr]\n"
 141:	"2:\n"
 142:		_ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w[ret])
 143:		: [ret] "+r" (ret), [uaddr] "+Q" (*uaddr),
 144:		  [oldval] "+r" (*oldval)
 145:		: [newval] "r" (newval)
 146:		: "memory");
 147:	
 148:		uaccess_ttbr0_disable();
 149:	
 150:		return ret;
 151:	}
 152:	
 153:	static __always_inline int
 154:	__lsui_cmpxchg32(u32 __user *uaddr, u32 *oldval, u32 newval)
 155:	{
 156:		u64 __user *uaddr64;
 157:		bool futex_pos, other_pos;
 158:		union {
 159:			u32 futex[2];
 160:			u64 raw;
 161:		} orig64, oval64, nval64;
 162:	
 163:		uaddr64 = (u64 __user *)PTR_ALIGN_DOWN(uaddr, sizeof(u64));
 164:		futex_pos = !IS_ALIGNED((unsigned long)uaddr, sizeof(u64));
 165:		other_pos = !futex_pos;
 166:	
 167:		orig64.futex[futex_pos] = *oldval;
 168:		if (get_user(orig64.futex[other_pos], (u32 __user *)uaddr64 + other_pos))
 169:			return -EFAULT;
 170:	
 171:		nval64 = oval64 = orig64;
 172:		nval64.futex[futex_pos] = newval;
 173:	
 174:		if (__lsui_cmpxchg64(uaddr64, &oval64.raw, nval64.raw))
 175:			return -EFAULT;
 176:	
 177:		*oldval = oval64.futex[futex_pos];
 178:		return oval64.raw == orig64.raw ? 0 : -EAGAIN;
 179:	}
 180:	
 181:	static __always_inline int
 182:	__lsui_futex_atomic_and(int oparg, u32 __user *uaddr, int *oval)
 183:	{
 184:		/*
 185:		 * Undo the bitwise negation applied to the oparg passed from
 186:		 * arch_futex_atomic_op_inuser() with FUTEX_OP_ANDN.
 187:		 */
 188:		return __lsui_futex_atomic_andnot(~oparg, uaddr, oval);
 189:	}
 190:	
 191:	static __always_inline int
 192:	__lsui_futex_atomic_eor(int oparg, u32 __user *uaddr, int *oval)
 193:	{
 194:		u32 oldval, newval;
 195:		int ret, i;
 196:	
 197:		if (get_user(oldval, uaddr))
 198:			return -EFAULT;
 199:	
 200:		/*
]

303/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 9742
							output: 43
							thoughts: 30
						

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

**Diving into the futex.h Details**

Okay, time to get my hands dirty. I've been working with ARM64 futexes, and I need to solidify my understanding of the finer points within the kernel's implementation. I was just looking over some of the core locking and synchronization mechanisms when I realised I needed to refresh my memory on the futex implementation and, more specifically, the structures and macros declared within `arch/arm64/include/asm/futex.h`. So, let's pick up from line 201 and see what we can find. I expect there's some architecture-specific optimization or adaptation happening there that warrants closer inspection. This should be interesting to see how the ARM64 architecture is interacting with the standard futex core functions. I'll be looking for any hints on things like atomic operations, memory barriers, and how the wake-up path is handled. It's time to dig in and clarify any lingering questions.



304/4 2026/09/08 10:20 tool read-file
0m Args:
map[File:arch/arm64/include/asm/futex.h FirstLine:201 LineCount:100]

Results:
map[Contents: 201:		 * there are no ldteor/stteor instructions...
 202:		 */
 203:		for (i = 0; i < FUTEX_MAX_LOOPS; i++) {
 204:			newval = oldval ^ oparg;
 205:	
 206:			ret = __lsui_cmpxchg32(uaddr, &oldval, newval);
 207:			if (ret != -EAGAIN)
 208:				break;
 209:		}
 210:	
 211:		*oval = oldval;
 212:		return ret;
 213:	}
 214:	
 215:	static __always_inline int
 216:	__lsui_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
 217:	{
 218:		u32 curval = oldval;
 219:		int ret;
 220:	
 221:		ret = __lsui_cmpxchg32(uaddr, &curval, newval);
 222:		if (ret == -EAGAIN && curval != oldval)
 223:			ret = 0;
 224:	
 225:		*oval = curval;
 226:		return ret;
 227:	}
 228:	#endif	/* CONFIG_ARM64_LSUI */
 229:	
 230:	
 231:	#define FUTEX_ATOMIC_OP(op)						\
 232:	static __always_inline int						\
 233:	__futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval)		\
 234:	{									\
 235:		return __lsui_llsc_body(futex_atomic_##op, oparg, uaddr, oval);	\
 236:	}
 237:	
 238:	FUTEX_ATOMIC_OP(add)
 239:	FUTEX_ATOMIC_OP(or)
 240:	FUTEX_ATOMIC_OP(and)
 241:	FUTEX_ATOMIC_OP(eor)
 242:	FUTEX_ATOMIC_OP(set)
 243:	
 244:	static __always_inline int
 245:	__futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval)
 246:	{
 247:		return __lsui_llsc_body(futex_cmpxchg, uaddr, oldval, newval, oval);
 248:	}
 249:	
 250:	static inline int
 251:	arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr)
 252:	{
 253:		int ret;
 254:		u32 __user *uaddr;
 255:	
 256:		if (!access_ok(_uaddr, sizeof(u32)))
 257:			return -EFAULT;
 258:	
 259:		uaddr = __uaccess_mask_ptr(_uaddr);
 260:	
 261:		switch (op) {
 262:		case FUTEX_OP_SET:
 263:			ret = __futex_atomic_set(oparg, uaddr, oval);
 264:			break;
 265:		case FUTEX_OP_ADD:
 266:			ret = __futex_atomic_add(oparg, uaddr, oval);
 267:			break;
 268:		case FUTEX_OP_OR:
 269:			ret = __futex_atomic_or(oparg, uaddr, oval);
 270:			break;
 271:		case FUTEX_OP_ANDN:
 272:			ret = __futex_atomic_and(~oparg, uaddr, oval);
 273:			break;
 274:		case FUTEX_OP_XOR:
 275:			ret = __futex_atomic_eor(oparg, uaddr, oval);
 276:			break;
 277:		default:
 278:			ret = -ENOSYS;
 279:		}
 280:	
 281:		return ret;
 282:	}
 283:	
 284:	static inline int
 285:	futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *_uaddr,
 286:				      u32 oldval, u32 newval)
 287:	{
 288:		u32 __user *uaddr;
 289:	
 290:		if (!access_ok(_uaddr, sizeof(u32)))
 291:			return -EFAULT;
 292:	
 293:		uaddr = __uaccess_mask_ptr(_uaddr);
 294:	
 295:		return __futex_cmpxchg(uaddr, oldval, newval, uval);
 296:	}
 297:	
 298:	#endif /* __ASM_FUTEX_H */
]

305/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 11531
							output: 27
							thoughts: 288
						

Thoughts:
**My Investigation into `__llsc_futex_cmpxchg` and Potential Concurrency Issues**

Okay, here's what's running through my mind as I dig into this. I'm looking at the `__llsc_futex_cmpxchg` function, and my immediate concern is how the kernel handles those crucial atomic operations: the `ldxr` (load exclusive register) and `stlxr` (store exclusive register). It's a standard atomic compare-and-exchange implementation, but I need to understand the implications of the exception table entries defined with `_ASM_EXTABLE_UACCESS_ERR`. Specifically, I'm thinking about those `_ASM_EXTABLE_UACCESS_ERR` entries; they're there for a reason, likely related to handling potential user-space access errors.

My immediate question is: What happens when an instruction like one of these generates an exception? This is where my expertise comes into play; I need to drill down into the details of the ARM64 Linux kernel's Synchronous External Abort (SEA) handling. I need to refresh my knowledge of the ARM Architecture Reference Manual (ARM ARM), especially the behavior of `ldxr` and `stlxr` with respect to memory types, specifically, the differences between `MT_NORMAL_NC` (Normal Non-cacheable) and `MT_DEVICE_nGnRE` (Device nGnRE). That distinction is critical here. If the memory region is device memory, then I expect specific behaviour.

The final element of this puzzle is the interaction with user-mapped memory (VRAM or MMIO) and the futex mechanism. What happens when a user calls futex on a region which is not regular memory? Are there potential concurrency pitfalls? Are there vulnerabilities?

So, I'm going to start digging. Time to leverage my git-fu. I'll be searching through the `arch/arm64` directory. I'll be using `git log` and `grepper`, focusing on keywords like "ldxr", "exclusive", "Normal Non-cacheable", "device", "SEA", "Synchronous External Abort", "futex", and "EXTABLE." I'm looking for relevant commit messages, kernel documentation, and anything that sheds light on how these aspects interact. I'm expecting this information to show up in a lot of different forms. The ultimate goal is to understand how the kernel handles potential exceptions and memory access issues in this critical atomic operation, especially when dealing with potentially tricky user-mapped memory regions.



306/4 2026/09/08 10:20 tool grepper
0m Args:
map[Expression:external abort PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/kernel/cpufeature.c=643=static const struct arm64_ftr_bits ftr_id_mmfr4[] = {
--
arch/arm64/kernel/cpufeature.c-653-	 * SpecSEI = 1 indicates that the PE might generate an SError on an
arch/arm64/kernel/cpufeature.c:654:	 * external abort on speculative read. It is safe to assume that an
arch/arm64/kernel/cpufeature.c-655-	 * SError might be generated than it will not be. Hence it has been
--
arch/arm64/kvm/hyp/nvhe/pkvm.c=33=static void pkvm_vcpu_reset_hcr(struct kvm_vcpu *vcpu)
--
arch/arm64/kvm/hyp/nvhe/pkvm.c-40-	if (cpus_have_final_cap(ARM64_HAS_RAS_EXTN)) {
arch/arm64/kvm/hyp/nvhe/pkvm.c:41:		/* route synchronous external abort exceptions to EL2 */
arch/arm64/kvm/hyp/nvhe/pkvm.c-42-		vcpu->arch.hcr_el2 |= HCR_TEA;
--
arch/arm64/kvm/inject_fault.c=286=void kvm_inject_size_fault(struct kvm_vcpu *vcpu)
--
arch/arm64/kvm/inject_fault.c-298-	 *
arch/arm64/kvm/inject_fault.c:299:	 * Non-LPAE guests will only get the external abort, as there
arch/arm64/kvm/inject_fault.c-300-	 * is no way to describe the ASF.
--
arch/arm64/kvm/mmu.c=2164=static bool host_owns_sea(struct kvm_vcpu *vcpu, u64 esr)
--
arch/arm64/kvm/mmu.c-2166-	/*
arch/arm64/kvm/mmu.c:2167:	 * Without FEAT_RAS HCR_EL2.TEA is RES0, meaning any external abort
arch/arm64/kvm/mmu.c-2168-	 * taken from a guest EL to EL2 is due to a host-imposed access (e.g.
--
arch/arm64/kvm/mmu.c-2178-	/*
arch/arm64/kvm/mmu.c:2179:	 * Determining if an external abort during a table walk happened at
arch/arm64/kvm/mmu.c-2180-	 * stage-2 is only possible with S1PTW is set. Otherwise, since KVM
--
arch/arm64/kvm/nested.c=1517=static void handle_vncr_perm(struct kvm_vcpu *vcpu)
--
arch/arm64/kvm/nested.c-1523-	/*
arch/arm64/kvm/nested.c:1524:	 * Promote to an external abort if the stage-1 permits writes but the
arch/arm64/kvm/nested.c-1525-	 * HPA is read-only (e.g. RO memslot).
--
arch/arm64/kvm/sys_regs.c=5796=static void vcpu_set_hcr(struct kvm_vcpu *vcpu)
--
arch/arm64/kvm/sys_regs.c-5802-	if (cpus_have_final_cap(ARM64_HAS_RAS_EXTN)) {
arch/arm64/kvm/sys_regs.c:5803:		/* route synchronous external abort exceptions to EL2 */
arch/arm64/kvm/sys_regs.c-5804-		vcpu->arch.hcr_el2 |= HCR_TEA;
--
arch/arm64/mm/fault.c=870=static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-889-		 * The architecture specifies that the tag bits of FAR_EL1 are
arch/arm64/mm/fault.c:890:		 * UNKNOWN for synchronous external aborts. Mask them out now
arch/arm64/mm/fault.c-891-		 * so that userspace doesn't see them.
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-933-	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
arch/arm64/mm/fault.c:934:	{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
arch/arm64/mm/fault.c-935-	{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
]

307/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 13708
							output: 39
							thoughts: 36
						

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

**Diving into the Fault Handling on ARM64**

Okay, so I need to understand the specifics of how fault handling works on ARM64, specifically within the kernel. Time to dig into the source code – let's start with `arch/arm64/mm/fault.c`. I'm especially interested in how `do_sea` manages the different scenarios: kernel faults, user-space faults, and how exception tables play into the overall process. This is the core logic, and understanding the fault paths is critical for any debugging or performance analysis related to memory management on this architecture. It's time to refresh my memory on the interactions here, especially given the nuances of AArch64. Let's see what we can find.



308/4 2026/09/08 10:20 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:860 LineCount:90]

Results:
map[Contents: 860:			return do_compat_alignment_fixup(far, regs);
 861:		do_bad_area(far, esr, regs);
 862:		return 0;
 863:	}
 864:	
 865:	static int do_bad(unsigned long far, unsigned long esr, struct pt_regs *regs)
 866:	{
 867:		return 1; /* "fault" */
 868:	}
 869:	
 870:	static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
 871:	{
 872:		const struct fault_info *inf;
 873:		unsigned long siaddr;
 874:	
 875:		inf = esr_to_fault_info(esr);
 876:	
 877:		if (user_mode(regs) && apei_claim_sea(regs) == 0) {
 878:			/*
 879:			 * APEI claimed this as a firmware-first notification.
 880:			 * Some processing deferred to task_work before ret_to_user().
 881:			 */
 882:			return 0;
 883:		}
 884:	
 885:		if (esr & ESR_ELx_FnV) {
 886:			siaddr = 0;
 887:		} else {
 888:			/*
 889:			 * The architecture specifies that the tag bits of FAR_EL1 are
 890:			 * UNKNOWN for synchronous external aborts. Mask them out now
 891:			 * so that userspace doesn't see them.
 892:			 */
 893:			siaddr  = untagged_addr(far);
 894:		}
 895:		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 896:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 897:	
 898:		return 0;
 899:	}
 900:	
 901:	static int do_tag_check_fault(unsigned long far, unsigned long esr,
 902:				      struct pt_regs *regs)
 903:	{
 904:		/*
 905:		 * The architecture specifies that bits 63:60 of FAR_EL1 are UNKNOWN
 906:		 * for tag check faults. Set them to corresponding bits in the untagged
 907:		 * address if ARM64_MTE_FAR isn't supported.
 908:		 * Otherwise, bits 63:60 of FAR_EL1 are not UNKNOWN.
 909:		 */
 910:		if (!cpus_have_cap(ARM64_MTE_FAR))
 911:			far = (__untagged_addr(far) & ~MTE_TAG_MASK) | (far & MTE_TAG_MASK);
 912:	
 913:		do_bad_area(far, esr, regs);
 914:		return 0;
 915:	}
 916:	
 917:	static const struct fault_info fault_info[] = {
 918:		{ do_bad,		SIGKILL, SI_KERNEL,	"ttbr address size fault"	},
 919:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 1 address size fault"	},
 920:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 2 address size fault"	},
 921:		{ do_bad,		SIGKILL, SI_KERNEL,	"level 3 address size fault"	},
 922:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 0 translation fault"	},
 923:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 1 translation fault"	},
 924:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 2 translation fault"	},
 925:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level 3 translation fault"	},
 926:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 access flag fault"	},
 927:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 access flag fault"	},
 928:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 access flag fault"	},
 929:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 access flag fault"	},
 930:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 0 permission fault"	},
 931:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 1 permission fault"	},
 932:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 2 permission fault"	},
 933:		{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"level 3 permission fault"	},
 934:		{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous external abort"	},
 935:		{ do_tag_check_fault,	SIGSEGV, SEGV_MTESERR,	"synchronous tag check fault"	},
 936:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 18"			},
 937:		{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 (translation table walk)"	},
 938:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 (translation table walk)"	},
 939:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 (translation table walk)"	},
 940:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 (translation table walk)"	},
 941:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 (translation table walk)"	},
 942:		{ do_sea,		SIGBUS,  BUS_OBJERR,	"synchronous parity or ECC error" },	// Reserved when RAS is implemented
 943:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 25"			},
 944:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 26"			},
 945:		{ do_sea,		SIGKILL, SI_KERNEL,	"level -1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 946:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 0 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 947:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 1 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 948:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 2 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
 949:		{ do_sea,		SIGKILL, SI_KERNEL,	"level 3 synchronous parity error (translation table walk)"	},	// Reserved when RAS is implemented
]

309/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 15971
							output: 32
							thoughts: 31
						

Thoughts:
Okay, let's dive into this. Here's my take on those thoughts, as if they're my own:

**Investigating `arm64_notify_die`**

Right, let's take a look at what's happening with `arm64_notify_die`. I'm curious to see how the kernel handles those fatal errors on AArch64. I know this function plays a crucial role in dealing with exceptions that the kernel *can't* recover from, so it's probably where the "panic" path begins. I bet it involves some pretty low-level stuff, potentially interacting with the MMU or exception vector table. Time to navigate to `arch/arm64/kernel/traps.c` and dig in! I expect to see some interesting register dumps, maybe some signal delivery, and definitely some crucial logging. I'm especially interested in how it differentiates between different exception types and what steps it takes to ensure a graceful (or at least, as graceful as possible) exit. Let's see...



310/4 2026/09/08 10:20 tool grepper
0m Args:
map[Expression:arm64_notify_die PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/system_misc.h=23=struct siginfo;
arch/arm64/include/asm/system_misc.h:24:void arm64_notify_die(const char *str, struct pt_regs *regs,
arch/arm64/include/asm/system_misc.h-25-		      int signo, int sicode, unsigned long far,
--
arch/arm64/kernel/debug-monitors.c=271=void do_bkpt32(unsigned long esr, struct pt_regs *regs)
arch/arm64/kernel/debug-monitors.c-272-{
arch/arm64/kernel/debug-monitors.c:273:	arm64_notify_die("aarch32 BKPT", regs, SIGTRAP, TRAP_BRKPT, regs->pc, esr);
arch/arm64/kernel/debug-monitors.c-274-}
--
arch/arm64/kernel/sys_compat.c=68=long compat_arm_syscall(struct pt_regs *regs, int scno)
--
arch/arm64/kernel/sys_compat.c-114-
arch/arm64/kernel/sys_compat.c:115:	arm64_notify_die("Oops - bad compat syscall(2)", regs,
arch/arm64/kernel/sys_compat.c-116-			 SIGILL, ILL_ILLTRP, addr, 0);
--
arch/arm64/kernel/traps.c=284=void arm64_force_sig_ptrace_errno_trap(int errno, unsigned long far,
--
arch/arm64/kernel/traps.c-290-
arch/arm64/kernel/traps.c:291:void arm64_notify_die(const char *str, struct pt_regs *regs,
arch/arm64/kernel/traps.c-292-		      int signo, int sicode, unsigned long far,
--
arch/arm64/kernel/traps.c=409=void force_signal_inject(int signal, int code, unsigned long address, unsigned long err)
--
arch/arm64/kernel/traps.c-434-
arch/arm64/kernel/traps.c:435:	arm64_notify_die(desc, regs, signal, code, address, err);
arch/arm64/kernel/traps.c-436-}
--
arch/arm64/mm/fault.c=870=static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-895-	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
arch/arm64/mm/fault.c:896:	arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
arch/arm64/mm/fault.c-897-
--
arch/arm64/mm/fault.c=984=void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
--
arch/arm64/mm/fault.c-999-	 */
arch/arm64/mm/fault.c:1000:	arm64_notify_die(inf->name, regs, inf->sig, inf->code, addr, esr);
arch/arm64/mm/fault.c-1001-}
--
arch/arm64/mm/fault.c=1004=void do_sp_pc_abort(unsigned long addr, unsigned long esr, struct pt_regs *regs)
arch/arm64/mm/fault.c-1005-{
arch/arm64/mm/fault.c:1006:	arm64_notify_die("SP/PC alignment exception", regs, SIGBUS, BUS_ADRALN,
arch/arm64/mm/fault.c-1007-			 addr, esr);
]

311/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 17289
							output: 40
							thoughts: 28
						

Thoughts:
Here's my summary, as though I'm reading and processing the provided text:

**Diving into `arm64_notify_die`**

Okay, time to crack open the `arch/arm64/kernel/traps.c` file and zero in on the `arm64_notify_die` function. I'm already anticipating what's in here – this is the crucial function handling those "die" events, the fatal errors and unrecoverable exceptions the kernel encounters on an ARM64 system. I know this is where the system tries to gracefully (or, as gracefully as possible) deal with a critical failure, hopefully providing some useful debugging information before, ultimately, bringing the system down to prevent further corruption. I'll be looking for the exception code, the faulting address, any context that might be salvaged, and, of course, the logging and notification mechanisms. I'll be expecting to see a lot of interaction with the printk infrastructure, stack unwinding (if possible), and likely some mechanisms to trigger kernel dumps or panic sequences. I wonder how it handles different types of exceptions - Data Aborts, Instruction Aborts, System Calls, and so on... and what the priority is for handling these fatal exceptions. I'm especially keen to see how the system ensures that critical data is preserved before shutdown.



312/4 2026/09/08 10:20 tool read-file
0m Args:
map[File:arch/arm64/kernel/traps.c FirstLine:290 LineCount:40]

Results:
map[Contents: 290:	
 291:	void arm64_notify_die(const char *str, struct pt_regs *regs,
 292:			      int signo, int sicode, unsigned long far,
 293:			      unsigned long err)
 294:	{
 295:		if (user_mode(regs)) {
 296:			WARN_ON(regs != current_pt_regs());
 297:			current->thread.fault_address = 0;
 298:			current->thread.fault_code = err;
 299:	
 300:			arm64_force_sig_fault(signo, sicode, far, str);
 301:		} else {
 302:			die(str, regs, err);
 303:		}
 304:	}
 305:	
 306:	#ifdef CONFIG_COMPAT
 307:	#define PSTATE_IT_1_0_SHIFT	25
 308:	#define PSTATE_IT_1_0_MASK	(0x3 << PSTATE_IT_1_0_SHIFT)
 309:	#define PSTATE_IT_7_2_SHIFT	10
 310:	#define PSTATE_IT_7_2_MASK	(0x3f << PSTATE_IT_7_2_SHIFT)
 311:	
 312:	static u32 compat_get_it_state(struct pt_regs *regs)
 313:	{
 314:		u32 it, pstate = regs->pstate;
 315:	
 316:		it  = (pstate & PSTATE_IT_1_0_MASK) >> PSTATE_IT_1_0_SHIFT;
 317:		it |= ((pstate & PSTATE_IT_7_2_MASK) >> PSTATE_IT_7_2_SHIFT) << 2;
 318:	
 319:		return it;
 320:	}
 321:	
 322:	static void compat_set_it_state(struct pt_regs *regs, u32 it)
 323:	{
 324:		u32 pstate_it;
 325:	
 326:		pstate_it  = (it << PSTATE_IT_1_0_SHIFT) & PSTATE_IT_1_0_MASK;
 327:		pstate_it |= ((it >> 2) << PSTATE_IT_7_2_SHIFT) & PSTATE_IT_7_2_MASK;
 328:	
 329:		regs->pstate &= ~PSR_AA32_IT_MASK;
]

313/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 18354
							output: 39
							thoughts: 153
						

Thoughts:
**Analyzing the Arm64 Exception Handling Path**

Okay, let's dive into the `arm64_notify_die` function.  My initial observation is that if the exception doesn't originate from user mode (i.e., `!user_mode(regs)`), it immediately calls `die(str, regs, err)`. Now, I need to understand *why* this direct path exists. Ah, right, the SEA (Synchronous External Abort) exception handling. Looking back, `do_sea` calls `arm64_notify_die` with a specific error message and signals, like `SIGBUS`. Crucially, I see that `do_sea` bypasses the `fixup_exception(regs)` check.

This raises a flag. I need to understand the control flow for other fault handlers. I'm going to shift my focus to `do_mem_abort` and other related routines in `arch/arm64/mm/fault.c`. I need to track how translation faults, SEA exceptions, alignment faults, and other memory-related errors are routed and handled in the kernel. I suspect there are subtle but important differences in their exception handling paths. The lack of a `fixup_exception` call for SEA is something that needs further investigation.



314/4 2026/09/08 10:20 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:950 LineCount:60]

Results:
map[Contents: 950:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 32"			},
 951:		{ do_alignment_fault,	SIGBUS,  BUS_ADRALN,	"alignment fault"		},
 952:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 34"			},
 953:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 35"			},
 954:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 36"			},
 955:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 37"			},
 956:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 38"			},
 957:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 39"			},
 958:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 40"			},
 959:		{ do_bad,		SIGKILL, SI_KERNEL,	"level -1 address size fault"	},
 960:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 42"			},
 961:		{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"level -1 translation fault"	},
 962:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 44"			},
 963:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 45"			},
 964:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 46"			},
 965:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 47"			},
 966:		{ do_bad,		SIGKILL, SI_KERNEL,	"TLB conflict abort"		},
 967:		{ do_bad,		SIGKILL, SI_KERNEL,	"Unsupported atomic hardware update fault"	},
 968:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 50"			},
 969:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 51"			},
 970:		{ do_bad,		SIGKILL, SI_KERNEL,	"implementation fault (lockdown abort)" },
 971:		{ do_bad,		SIGBUS,  BUS_OBJERR,	"implementation fault (unsupported exclusive)" },
 972:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 54"			},
 973:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 55"			},
 974:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 56"			},
 975:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 57"			},
 976:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 58" 			},
 977:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 59"			},
 978:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 60"			},
 979:		{ do_bad,		SIGKILL, SI_KERNEL,	"section domain fault"		},
 980:		{ do_bad,		SIGKILL, SI_KERNEL,	"page domain fault"		},
 981:		{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 63"			},
 982:	};
 983:	
 984:	void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs)
 985:	{
 986:		const struct fault_info *inf = esr_to_fault_info(esr);
 987:		unsigned long addr = untagged_addr(far);
 988:	
 989:		if (!inf->fn(far, esr, regs))
 990:			return;
 991:	
 992:		if (!user_mode(regs))
 993:			die_kernel_fault(inf->name, addr, esr, regs);
 994:	
 995:		/*
 996:		 * At this point we have an unrecognized fault type whose tag bits may
 997:		 * have been defined as UNKNOWN. Therefore we only expose the untagged
 998:		 * address to the signal handler.
 999:		 */
1000:		arm64_notify_die(inf->name, regs, inf->sig, inf->code, addr, esr);
1001:	}
1002:	NOKPROBE_SYMBOL(do_mem_abort);
1003:	
1004:	void do_sp_pc_abort(unsigned long addr, unsigned long esr, struct pt_regs *regs)
1005:	{
1006:		arm64_notify_die("SP/PC alignment exception", regs, SIGBUS, BUS_ADRALN,
1007:				 addr, esr);
1008:	}
1009:	NOKPROBE_SYMBOL(do_sp_pc_abort);
]

315/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 20220
							output: 39
							thoughts: 52
						

Thoughts:
Here's my analysis of what I'm looking at, from my expert perspective:

**Diving into the Arm64 Fault Handling**

Okay, so I'm digging into `arch/arm64/mm/fault.c` to understand the low-level fault handling on this architecture. Specifically, I'm focusing on the `do_bad_area` function. It's clear I need to understand how it fits into the broader picture of page faults. I need to refresh my memory on the interactions of those functions.

My initial thought is to read `do_page_fault`, since that's likely the entry point, the main function to handle page faults, then the `do_bad_area` itself, to see what conditions trigger *this* particular path. Finally, `die_kernel_fault` will give me insight into what the kernel does when it encounters a truly unrecoverable fault within its own address space. That sequence should give me the context I need. Time to get to work.



316/4 2026/09/08 10:20 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:290 LineCount:90]

Results:
map[Contents: 290:			return true;
 291:	
 292:		if (is_ttbr0_addr(addr) && system_uses_ttbr0_pan())
 293:			return esr_fsc_is_translation_fault(esr) &&
 294:				(regs->pstate & PSR_PAN_BIT);
 295:	
 296:		return false;
 297:	}
 298:	
 299:	static bool is_pkvm_stage2_abort(unsigned int esr)
 300:	{
 301:		/*
 302:		 * S1PTW should only ever be set in ESR_EL1 if the pkvm hypervisor
 303:		 * injected a stage-2 abort -- see host_inject_mem_abort().
 304:		 */
 305:		return is_pkvm_initialized() && (esr & ESR_ELx_S1PTW);
 306:	}
 307:	
 308:	static bool __kprobes is_spurious_el1_translation_fault(unsigned long addr,
 309:								unsigned long esr,
 310:								struct pt_regs *regs)
 311:	{
 312:		unsigned long flags;
 313:		u64 par, dfsc;
 314:	
 315:		if (!is_el1_data_abort(esr) || !esr_fsc_is_translation_fault(esr))
 316:			return false;
 317:	
 318:		local_irq_save(flags);
 319:		asm volatile("at s1e1r, %0" :: "r" (addr));
 320:		isb();
 321:		par = read_sysreg_par();
 322:		local_irq_restore(flags);
 323:	
 324:		/*
 325:		 * If we now have a valid translation, treat the translation fault as
 326:		 * spurious.
 327:		 */
 328:		if (!(par & SYS_PAR_EL1_F)) {
 329:			if (is_pkvm_stage2_abort(esr)) {
 330:				par &= SYS_PAR_EL1_PA;
 331:				return pkvm_force_reclaim_guest_page(par);
 332:			}
 333:	
 334:			return true;
 335:		}
 336:	
 337:		/*
 338:		 * If we got a different type of fault from the AT instruction,
 339:		 * treat the translation fault as spurious.
 340:		 */
 341:		dfsc = FIELD_GET(SYS_PAR_EL1_FST, par);
 342:		return !esr_fsc_is_translation_fault(dfsc);
 343:	}
 344:	
 345:	static void die_kernel_fault(const char *msg, unsigned long addr,
 346:				     unsigned long esr, struct pt_regs *regs)
 347:	{
 348:		bust_spinlocks(1);
 349:	
 350:		pr_alert("Unable to handle kernel %s at virtual address %016lx\n", msg,
 351:			 addr);
 352:	
 353:		kasan_non_canonical_hook(addr);
 354:	
 355:		mem_abort_decode(esr);
 356:	
 357:		show_pte(addr);
 358:		die("Oops", regs, esr);
 359:		bust_spinlocks(0);
 360:		make_task_dead(SIGKILL);
 361:	}
 362:	
 363:	#ifdef CONFIG_KASAN_HW_TAGS
 364:	static void report_tag_fault(unsigned long addr, unsigned long esr,
 365:				     struct pt_regs *regs)
 366:	{
 367:		/*
 368:		 * SAS bits aren't set for all faults reported in EL1, so we can't
 369:		 * find out access size.
 370:		 */
 371:		bool is_write = !!(esr & ESR_ELx_WNR);
 372:		kasan_report((void *)addr, 0, is_write, regs->pc);
 373:	}
 374:	#else
 375:	/* Tag faults aren't enabled without CONFIG_KASAN_HW_TAGS. */
 376:	static inline void report_tag_fault(unsigned long addr, unsigned long esr,
 377:					    struct pt_regs *regs) { }
 378:	#endif
 379:	
]

317/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 21860
							output: 39
							thoughts: 26
						

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

**Diving into Fault Handling: `do_bad_area` on ARM64**

Okay, so we're looking into memory management and fault handling, right? Right. I'm going to shift gears now and take a peek at the `do_bad_area` function. Specifically, I'm thinking, "Let's also read `do_bad_area` in `arch/arm64/mm/fault.c`." It's critical to understand how the architecture deals with invalid memory accesses, and this function likely handles the nastier, less gracefully handled faults. This should shed light on some of the low-level interactions during those exceptional conditions. I'm hoping to get a clearer picture of the control flow during such faults.



318/4 2026/09/08 10:20 tool read-file
0m Args:
map[File:arch/arm64/mm/fault.c FirstLine:380 LineCount:60]

Results:
map[Contents: 380:	static void do_tag_recovery(unsigned long addr, unsigned long esr,
 381:				   struct pt_regs *regs)
 382:	{
 383:	
 384:		report_tag_fault(addr, esr, regs);
 385:	
 386:		/*
 387:		 * Disable MTE Tag Checking on the local CPU for the current EL.
 388:		 * It will be done lazily on the other CPUs when they will hit a
 389:		 * tag fault.
 390:		 */
 391:		sysreg_clear_set(sctlr_el1, SCTLR_EL1_TCF_MASK,
 392:				 SYS_FIELD_PREP_ENUM(SCTLR_EL1, TCF, NONE));
 393:		isb();
 394:	}
 395:	
 396:	static bool is_el1_mte_sync_tag_check_fault(unsigned long esr)
 397:	{
 398:		unsigned long fsc = esr & ESR_ELx_FSC;
 399:	
 400:		if (!is_el1_data_abort(esr))
 401:			return false;
 402:	
 403:		if (fsc == ESR_ELx_FSC_MTE)
 404:			return true;
 405:	
 406:		return false;
 407:	}
 408:	
 409:	static void __do_kernel_fault(unsigned long addr, unsigned long esr,
 410:				      struct pt_regs *regs)
 411:	{
 412:		const char *msg;
 413:	
 414:		/*
 415:		 * Are we prepared to handle this kernel fault?
 416:		 * We are almost certainly not prepared to handle instruction faults.
 417:		 */
 418:		if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
 419:			return;
 420:	
 421:		if (is_spurious_el1_translation_fault(addr, esr, regs)) {
 422:			WARN_RATELIMIT(!is_pkvm_stage2_abort(esr),
 423:				"Ignoring spurious kernel translation fault at virtual address %016lx\n", addr);
 424:			return;
 425:		}
 426:	
 427:		if (is_el1_mte_sync_tag_check_fault(esr)) {
 428:			do_tag_recovery(addr, esr, regs);
 429:	
 430:			return;
 431:		}
 432:	
 433:		if (is_el1_permission_fault(addr, esr, regs)) {
 434:			if (esr & ESR_ELx_WNR)
 435:				msg = "write to read-only memory";
 436:			else if (is_el1_instruction_abort(esr))
 437:				msg = "execute from non-executable memory";
 438:			else
 439:				msg = "read from unreadable memory";
]

319/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 23004
							output: 38
							thoughts: 436
						

Thoughts:
**My Analysis of the SEA Handling in the Kernel**

Okay, let's revisit `do_sea`. I'm seeing something interesting here: specifically how it handles SEAs. Looking at the code: `static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)`. Notice that on line 896, it jumps straight to `arm64_notify_die` and doesn't call `fixup_exception(regs, esr)` first.

Now, inside `arm64_notify_die`, the branching logic is crucial. If we're in user mode, it tries to signal the process with `arm64_force_sig_fault`. But, if we're *not* in user mode – which is what caught my attention – `!user_mode(regs)` is true, it calls `die(str, regs, err)`. Boom, kernel panic! This means that if an SEA happens while we're in the kernel itself – say, within `futex_atomic_cmpxchg_inatomic` which is part of kernel's work on behalf of a syscall – the system is going down *unless* the APEI or RAS are in play. Otherwise, it crashes.

Hold on, I need to verify something. Does `ldxr` on `MT_NORMAL_NC` actually *cause* an SEA? Or is it specific to `MT_DEVICE_nGnRE` (or more generally Device memory)? Or perhaps, neither, both, or maybe it depends on the ARM architecture specifics around Exclusive Load/Store operations on Device versus Normal Non-cacheable memory? This is a crucial distinction.

To get a clearer picture, I'm going to launch a comprehensive search. I'm talking thorough. I'll scour the kernel code, Git history, and commit logs. The search terms? Anything and everything related to "exclusive," "Normal NC," "Device," "MT_DEVICE," "MT_NORMAL_NC," "futex," "ldxr," "STXR," "SEA," and "External Abort". I need the historical context and all the details to understand the full implications.



320/4 2026/09/08 10:20 tool git-log
0m Args:
map[CodeRegexp:MT_NORMAL_NC Count:20 PathPrefix:arch/arm64]

Results:
map[Output:2a8dfab26677 KVM: arm64: Block cacheable PFNMAP mapping
fa4cdccaa582 arm64: reorganise PAGE_/PROT_ macros
9f3419315f3c arm64: mte: Add PROT_MTE support to mmap() and mprotect()
95b3f74bec20 arm64: Use macros instead of hard-coded constants for MAIR_EL1
aa57157be69f arm64: Ensure VM_WRITE|VM_SHARED ptes are clean by default
419e2f183881 dma-mapping: remove arch_dma_mmap_pgprot
3eca86e75ec7 arm64: Remove fixmap include fragility
ac15bd63bbb2 arm64: Honour !PTE_WRITE in set_pte_at() for kernel mappings
c9465b4ec37a arm64: add support to dump the kernel page tables
a501e32430d4 arm64: Clean up the default pgprot setting
196adf2f3015 arm64: Remove pgprot_dmacoherent()
de2db7432917 arm64: Make DMA coherent and strongly ordered mappings not executable
4f00130b70e5 arm64: Use Normal NonCacheable memory for writecombine
fc47897d2c65 arm64: Device specific operations
9cce7a435f89 arm64: CPU support
4f04d8f00545 arm64: MMU definitions
]

321/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 24351
							output: 27
							thoughts: 34
						

Thoughts:
Here's a summary of my thinking about that commit:

**Analyzing Commit 4f00130b70e5 "arm64: Use Normal NonCacheable memory for writecombine"**

Okay, so we're looking at commit `4f00130b70e5`. Immediately, I see it targets the `arm64` architecture, so that narrows the scope. The key phrase here is "Use Normal NonCacheable memory for writecombine." My initial reaction is to think about the memory attributes. Switching to "Normal NonCacheable" is interesting; it's a trade-off. "Write-combine" hints at performance optimization related to how writes are handled, specifically for devices where we want to reduce the impact of multiple writes. Now, I need to consider why this change was made.

What were the previous memory attributes? Was this an improvement over "Device" memory type? This change would change write ordering rules. What is the driver code now doing, and will the old device memory ordering cause an issue? Did this fix a problem, or is it a more general performance optimization? I have to look into the surrounding code and possibly even previous commits to fully understand the context.

I'm thinking about the potential consequences. Does this introduce any new memory barriers that need to be considered? What about cache coherency? How will this impact performance in different scenarios, and what devices are we targeting? Given it's `arm64`, I bet it involves peripherals; is this related to graphics, networking, or some other I/O intensive operation? I need to delve into the commit message and look at the changed files to get a more complete understanding and confirm my assumptions. This is not unusual; I'll need to dig deeper.



322/4 2026/09/08 10:20 tool git-show
0m Args:
map[Commit:4f00130b70e5]

Results:
map[Output:commit 4f00130b70e5eee813cc7bc298e0f3fdf79673cc
Author: Catalin Marinas <catalin.marinas@arm.com>
Date:   Fri Nov 29 10:56:14 2013 +0000

    arm64: Use Normal NonCacheable memory for writecombine
    
    This provides better performance compared to Device GRE and also allows
    unaligned accesses. Such memory is intended to be used with standard RAM
    (e.g. framebuffers) and not I/O.
    
    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 17bd3af0a117..5347b39fdb35 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -254,7 +254,7 @@ static inline int has_transparent_hugepage(void)
 #define pgprot_noncached(prot) \
 	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE))
 #define pgprot_writecombine(prot) \
-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_GRE))
+	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
 #define pgprot_dmacoherent(prot) \
 	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
 #define __HAVE_PHYS_MEM_ACCESS_PROT
]

323/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 25279
							output: 28
							thoughts: 100
						

Thoughts:
**Investigating an "Unsupported Exclusive" Error**

Okay, so I'm seeing this "unsupported exclusive" error, which immediately flags something deeper with concurrency or locking primitives. My instinct is to dive into the Git history and see what context I can find. I'll start with a targeted search. I'll search for commits that contain "exclusive" alongside keywords like "abort," "Device," "futex," or, of course, "unsupported exclusive" itself. Those combinations are likely to point me in the right direction.

Since I'm already thinking about it, that specific error message is likely documented in the code. I know that implementation-specific faults tend to be handled in `fault.c`, so I will go look at it. My memory is good, and I recall something about `implementation fault (unsupported exclusive)`. Yup, there it is! Line 971: `{ do_bad, SIGBUS, BUS_OBJERR, "implementation fault (unsupported exclusive)" },`. Now I will search the commit history to see which commits touched that line or explicitly mentioned "unsupported exclusive". That'll hopefully lead me to the root cause.



324/4 2026/09/08 10:20 tool grepper
0m Args:
map[Expression:unsupported exclusive PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/kvm/inject_fault.c=252=static int kvm_inject_nested_excl_atomic(struct kvm_vcpu *vcpu, u64 addr)
--
arch/arm64/kvm/inject_fault.c-262-/**
arch/arm64/kvm/inject_fault.c:263: * kvm_inject_dabt_excl_atomic - inject a data abort for unsupported exclusive
arch/arm64/kvm/inject_fault.c-264- *				 or atomic access
--
arch/arm64/mm/fault.c=917=static const struct fault_info fault_info[] = {
--
arch/arm64/mm/fault.c-970-	{ do_bad,		SIGKILL, SI_KERNEL,	"implementation fault (lockdown abort)" },
arch/arm64/mm/fault.c:971:	{ do_bad,		SIGBUS,  BUS_OBJERR,	"implementation fault (unsupported exclusive)" },
arch/arm64/mm/fault.c-972-	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 54"			},
]

325/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 25959
							output: 42
							thoughts: 46
						

Thoughts:
Here's my thinking process:

**Diving into the `kvm_inject_dabt_excl_atomic` Function**

Okay, so I'm looking at `kvm_inject_dabt_excl_atomic`. This likely handles the injection of a data abort exception (DABT) in an exclusive, atomic context, presumably within the KVM (Kernel-based Virtual Machine) environment on ARM64. Given the name, it seems related to handling hardware faults, potentially related to memory access permissions or similar issues, within a virtualized setting.

My next step is to examine the source code, specifically `arch/arm64/kvm/inject_fault.c` around line 252. That's a good starting point, as it's highly probable the function definition and related logic reside within that file and line range. Looking at this area I'll be expecting to see details on how the DABT is constructed, how the virtual CPU state is modified to reflect this fault, and how the fault is injected into the guest. This is a crucial area for any KVM implementation. I expect there will be code relating to accessing and manipulating the registers and control structures.



326/4 2026/09/08 10:20 tool read-file
0m Args:
map[File:arch/arm64/kvm/inject_fault.c FirstLine:240 LineCount:40]

Results:
map[Contents: 240:	
 241:	int kvm_inject_sea(struct kvm_vcpu *vcpu, bool iabt, u64 addr)
 242:	{
 243:		lockdep_assert_held(&vcpu->mutex);
 244:	
 245:		if (is_nested_ctxt(vcpu) && kvm_sea_target_is_el2(vcpu))
 246:			return kvm_inject_nested_sea(vcpu, iabt, addr);
 247:	
 248:		__kvm_inject_sea(vcpu, iabt, addr);
 249:		return 1;
 250:	}
 251:	
 252:	static int kvm_inject_nested_excl_atomic(struct kvm_vcpu *vcpu, u64 addr)
 253:	{
 254:		u64 esr = FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_DABT_LOW) |
 255:			  FIELD_PREP(ESR_ELx_FSC, ESR_ELx_FSC_EXCL_ATOMIC) |
 256:			  ESR_ELx_IL;
 257:	
 258:		vcpu_write_sys_reg(vcpu, addr, FAR_EL2);
 259:		return kvm_inject_nested_sync(vcpu, esr);
 260:	}
 261:	
 262:	/**
 263:	 * kvm_inject_dabt_excl_atomic - inject a data abort for unsupported exclusive
 264:	 *				 or atomic access
 265:	 * @vcpu: The VCPU to receive the data abort
 266:	 * @addr: The address to report in the DFAR
 267:	 *
 268:	 * It is assumed that this code is called from the VCPU thread and that the
 269:	 * VCPU therefore is not currently executing guest code.
 270:	 */
 271:	int kvm_inject_dabt_excl_atomic(struct kvm_vcpu *vcpu, u64 addr)
 272:	{
 273:		u64 esr;
 274:	
 275:		if (is_nested_ctxt(vcpu) && (vcpu_read_sys_reg(vcpu, HCR_EL2) & HCR_VM))
 276:			return kvm_inject_nested_excl_atomic(vcpu, addr);
 277:	
 278:		__kvm_inject_sea(vcpu, false, addr);
 279:		esr = vcpu_read_sys_reg(vcpu, exception_esr_elx(vcpu));
]

327/4 2026/09/08 10:20 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 27054
							output: 47
							thoughts: 42
						

Thoughts:
Okay, let's break this down.

**Initial Investigation into Potential Kernel Issues**

Alright, so I need to dig into some potential issues related to exclusive atomic operations within the kernel. The first thing I'm going to do is use `git-log`. My goal is to find commits that might be relevant to either `ESR_ELx_FSC_EXCL_ATOMIC` or `kvm_inject_dabt_excl_atomic`. These are the two key areas where I suspect the problem might be rooted, or at least where related work is most likely to be found. By looking at the commit history, I can examine code changes, bug fixes, and discussions that might shed light on the current situation. I'll need to pay close attention to the context of the changes, the rationale behind them, and any related bug reports that are mentioned. That should be a solid starting point for getting a better handle on this issue.



328/4 2026/09/08 10:20 tool git-log
0m Args:
map[CodeRegexp:ESR_ELx_FSC_EXCL_ATOMIC Count:10 PathPrefix:arch/arm64]

Results:
map[Output:2937aeec9dc5 KVM: arm64: Handle DABT caused by LS64* instructions on unsupported memory
]

329/4 2026/09/08 10:21 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 27385
							output: 29
							thoughts: 162
						

Thoughts:
**My Investigation into ARM Exclusive Accesses**

Okay, time to dig into this. I need to refresh my memory on the ARM architecture and how exclusive load/stores function. Specifically, I'm going to start with the ARM Architecture Reference Manual (ARM ARM). I need a solid understanding of the rules governing exclusive accesses – LDXR, STXR, LDX, STX, and so on. Also, the atomic instructions like LSE (LDADD, CAS, SWP, etc.) need to be considered in conjunction with the former.

The critical issue is how these access types behave across different memory regions. I have to think through the behavior on:
1.  **Normal memory**, both cached and non-cached.
2.  **Device memory**. I have to consider the nuances of each device memory type: Device-nGnRnE, Device-nGnRE, Device-nGRE, and Device-GRE. These differences matter, and I need to be precise.

To get a feel for how these things manifest in the real world, I'll need some practical examples. I'll search the kernel source, git logs, and relevant kernel discussions for keywords that would show me how the kernel handles these issues: "exclusive", "Normal Non-cacheable", "device", "futex", "SEA", "Synchronous External Abort", "LDXR". Hopefully this will shed some light on the subject.



330/4 2026/09/08 10:21 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:futex.*abort PathPrefix:arch/arm64]

Results:
map[Output:]

331/4 2026/09/08 10:21 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 27887
							output: 36
							thoughts: 31
						

Thoughts:
Okay, here's my attempt at summarizing those thoughts from a first-person, expert perspective, focusing on the core intent:

**Investigating Load-Exclusive Operations and Memory Ordering**

Alright, I need to dig into the details of how we handle `ldxr` operations, or more generally, the whole "Load-Exclusive" memory access mechanism. The goal is to fully understand its behavior and implications within the system. I'm going to leverage our extensive documentation and the project's codebase – essentially, I'm doing a comprehensive search. I'll be looking for any mention of the explicit instruction `ldxr`, which is the cornerstone. I won't limit myself to just that mnemonic though, I'll also be searching for references to "Load-Exclusive" itself, any discussions on "exclusive" memory type behaviors in general, or, to be really thorough, the underlying Shared Exclusive Access (SEA) concepts. I'm expecting to find information scattered across different modules and design documents, possibly buried within discussions about cache coherence or concurrent programming models. I need to make sure I don't miss any relevant details or potential pitfalls that might be hiding within the broader context of the system architecture.



332/4 2026/09/08 10:21 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:exclusive.*(Device|Normal|SEA|abort) PathPrefix:arch/arm64]

Results:
map[Output:]

333/4 2026/09/08 10:21 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 28216
							output: 33
							thoughts: 29
						

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

**Analyzing Relevant Commits: Device Interactions and Synchronization Primitives**

Right, let's dive in. I need to get a clear picture of what's been happening around device interactions in relation to the exclusive access and synchronization primitives. My immediate goal is to locate commits that touch on the interplay between devices, specifically using mechanisms like `ldxr`, `STXR`, `futex`, and anything related to "exclusive" access. I'm focusing on these keywords because they highlight areas prone to potential race conditions, contention, or interesting concurrency challenges when hardware resources are involved. Thinking about how the kernel interacts with the hardware, this usually indicates that the hardware supports exclusive access, either atomically or some mechanism, which is interesting for me to see how the software interacts and deals with it. I'll need to then quickly evaluate how those changes might impact performance, correctness, and security. What kind of pattern is being used? What architectures were most impacted? Were they using cache-line based synchronization? What was the use case? I wonder if there are any interesting uses of memory models involved.



334/4 2026/09/08 10:21 tool git-log
0m Args:
map[MessageRegexps:[exclusive device] PathPrefix:arch/arm64]

Results:
map[Output:2937aeec9dc5 KVM: arm64: Handle DABT caused by LS64* instructions on unsupported memory
e2b691804319 arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dts
2ddd93481bce arm64: dts: rockchip: rename rfkill label for Radxa ROCK 5B
d03521e6c18f arm64: dts: mediatek: mt8186-corsola: Update ADSP reserved memory region
76cbe23e4399 arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio
a3d5fb3b084c arm64: dts: qcom: sc7180: Add ADSP
3a4086985696 arm64: dts: ti: k3-j784s4: Add phase tags marking
5e52cf6bf3c7 arm64: dts: ti: k3-am64-tqma64xxl-mbax4xxl: add SD-card and WLAN overlays
d683a73980a6 arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node
ed8efe50b76e arm64: dts: renesas: rzg2ul-smarc-som: Enable eMMC on SMARC platform
]

335/4 2026/09/08 10:21 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 28912
							output: 31
							thoughts: 21
						

Thoughts:
Here's my thought process, as if I were thinking it:

**Focusing on ARM64 Exclusive Access**

Okay, so I need to track down some commits related to exclusivity in the `arch/arm64` architecture, but I need to be precise. I'm going to start by searching the commit history for any mentions of "exclusive" within the `arch/arm64` directory. That seems like a solid starting point. However, I need to refine that search, and fast, because that will return a ton of false positives. I know that if I don't, I could be looking at a pile of irrelevant commits. Specifically, I *don't* want anything dealing with "device" related exclusivity, so I need to exclude that term from the search. That should help me narrow things down considerably. It is the best way to get to what I am after quickly.



336/4 2026/09/08 10:21 tool git-log
0m Args:
map[MessageRegexps:[exclusive] PathPrefix:arch/arm64/mm]

Results:
map[Output:a660194dd101 arm64: Enable permission change on arm64 kernel block mappings
b868fff5b10b arm64: mm: Represent physical memory with phys_addr_t and resource_size_t
61d2d1808b20 arm64: mm: don't acquire mutex when rewriting swapper
3d2403fd10a1 arm64: uaccess: remove set_fs()
96d389ca1011 arm64: Add workaround for Arm Cortex-A77 erratum 1508412
cba779d80a5d arm64: mm: Fix column alignment for UXN in kernel_page_tables
51369e398d0d arm64: Make USER_DS an inclusive limit
3bbf7157ac66 arm64: Convert pte handling from inline asm to using (cmp)xchg
2dd0e8d2d2a1 arm64: Kprobes with single stepping support
2f4b829c625e arm64: Add support for hardware updates of the access and dirty pte bits
]

337/4 2026/09/08 10:21 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 29448
							output: 36
							thoughts: 1187
						

Thoughts:
**Analyzing ARM Architecture and Exclusive Accesses for Futex Implementation**

Okay, let's dive into this. I need to solidify my understanding of ARM's exclusive access mechanisms, particularly concerning the interaction between Load-Exclusive/Store-Exclusive (LDXR/STXR) instructions and memory types, especially in the context of implementing futexes. I need to be absolutely clear on what the ARM Architecture Reference Manual (ARM ARM) says about this.

My primary focus is the behavior of exclusive accesses on different memory types within the ARMv8/v9 architecture. Exclusive monitors, both local and global, are key here. I understand the basics for non-shareable and shareable cacheable memory, but I need to fully grasp the nuances with Normal Non-cacheable memory (`MT_NORMAL_NC`). This seems critical.

Specifically, what about accessing device memory? The ARM ARM is pretty clear there: an exclusive access to Device memory is either CONSTRAINED UNPREDICTABLE, leads to an exception, or results in an external abort. I need to verify which abort is generated, since that is critical to understand the futex behavior. A synchronous data abort (Alignment fault or External abort) is what the ARM ARM mentions and I know that most ARMv8 implementations generate an External Abort or Alignment fault/Unsupported Exclusive abort, particularly on Cortex-A cores (like the A53, A57, A72, A73, A76, A77, A78, Neoverse, and Apple M1). These cores send exclusive transactions over AXI/ACE/CHI, which peripherals usually don't support, resulting in DECERR/SLVERR or a Synchronous External Abort (SEA).

The real question I need answered is regarding `MT_NORMAL_NC`. What happens when LDXR/STXR is performed on this? Does it generate an SEA? Is it supported? Does it cause an abort? This is crucial for understanding how futexes behave.

My use case is VRAM mapped via a DRM render node, mapped to userspace with `pgprot_writecombine` (which is `MT_NORMAL_NC`). If userspace is calling `futex()` on that address, the kernel will eventually execute `ldxr` or `stlxr`. If this causes an SEA, can the kernel's futex code handle it, or does it lead to a crash? I have to confirm whether or not `ldxr` on `MT_NORMAL_NC` actually causes an SEA in the first place.

I need to dig deep into the kernel's git commit history, discussions on mailing lists, and any relevant bug reports. I need to search for commits that mention futex, SEA, writecombine, and ARM64 to see if others have faced this problem before. Let's see what I can find!



338/4 2026/09/08 10:21 tool git-log
10m Error:
log-in to see details

Args:
map[CodeRegexp:futex.*SEA|SEA.*futex|futex.*abort Count:10]

Results:
map[Output:]

339/4 2026/09/08 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 31304
							output: 30
							thoughts: 32
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Investigating Futex-Related ARM64 Kernel History**

Alright, time to dig into the kernel's Git history. I need to get a handle on how futexes have evolved, especially on the ARM64 architecture. My focus is going to be narrow, so I'm going to focus my search within the `kernel/futex/` and `arch/arm64/` directories. No need to cast a wide net right now. I'm going to use specific keywords or, more likely, code regexps to pinpoint commits related to specific messages or code patterns that I'm interested in. I'm thinking this targeted approach will be the most efficient way to trace back the changes I'm looking for.



340/4 2026/09/08 10:31 tool git-log
0m Args:
map[MessageRegexps:[futex] PathPrefix:arch/arm64]

Results:
map[Output:7eccf137dc04 arm64/runtime-const: Introduce runtime_const_mask_32()
a6690350a4ae arm64/runtime-const: Use aarch64_insn_patch_text_nosync() for patching
25ef34b541eb arm64: futex: Consolidate 'old == new' check in __lsui_cmpxchg32()
44adf2bf40ef arm64: futex: Support futex with FEAT_LSUI
eaa3babcceaa arm64: futex: Refactor futex atomic operation
773b24bcedc1 arm64, compiler-context-analysis: Permit alias analysis through __READ_ONCE() with CONFIG_LTO=y
a4e5927115f3 arm64: mte: Set TCMA1 whenever MTE is present in the kernel
1cf89b6bf660 arm64: Kconfig: Make CPU_BIG_ENDIAN depend on BROKEN
0f4b5f972216 futex: Add sys_futex_requeue()
cb8c4312afca futex: Add sys_futex_wait()
]

341/4 2026/09/08 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 31849
							output: 30
							thoughts: 35
						

Thoughts:
Here's my analysis of the situation, presented from my perspective as an expert:

**Investigating ARM64 Exception Handling in Depth**

Okay, so I need to dive into some ARM64 kernel code. The goal is to understand how exceptions are handled, specifically focusing on interactions with `fixup_exception`, `do_sea`, and anything related to "SEA" or "abort" routines within the `arch/arm64` directory.

My immediate assumption is that I'm looking for either bug fixes related to exception handling, perhaps specific to System Error Abort (SEA), or changes to the error handling flow itself. The keywords point me in that direction. The fact that SEA is specifically mentioned is a strong indicator of a security vulnerability or a specific hardware issue being addressed.

I'll be looking for commit messages, and the code changes they describe, to understand the problem, why the fix was implemented, and the potential impact of those changes. I'll need to pay close attention to the registers being saved and restored, any modifications to interrupt masks, and any new error handling paths that have been introduced. The interaction between hardware, firmware and software is likely critical here.

I'll have to consider: are these changes performance-driven? Security-driven? Bug fixes? Or are they part of a larger architecture change? The context of the commit history will be essential to provide clarity. Hopefully, the commit messages are well-written.



342/4 2026/09/08 10:31 tool git-log
0m Args:
map[MessageRegexps:[external abort] PathPrefix:arch/arm64]

Results:
map[Output:4cd774c1feb3 arm64: dts: qcom: purwa: Fix GPU IOMMU property
9f3e83345a56 KVM: arm64: nv: Inject SEA if kvm_translate_vncr() can't resolve PFN
85d98669fa7f arm64: dts: qcom: monaco: Reserve full Gunyah metadata region
ee021b27333b arm64: dts: qcom: kodiak: Add missing clock votes for lpass_tlmm
ad9c62bd8946 KVM: arm64: VM exit to userspace to handle SEA
69f8fe955d0b KVM: arm64: nv: Handle SEAs due to VNCR redirection
c6e35dff58d3 KVM: arm64: Check for SYSREGS_ON_CPU before accessing the CPU state
d7ce7e3a8464 arm64: Mark kernel as tainted on SAE and SError panic
a3c4a00dbe20 KVM: arm64: Advertise support for FEAT_DoubleFault2
ce66109cec86 KVM: arm64: nv: Take "masked" aborts to EL2 when HCRX_EL2.TMEA is set
]

343/4 2026/09/08 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 32545
							output: 32
							thoughts: 28
						

Thoughts:
Here's a summary of my thought process:

**Diving into ARM64 Fault Handling with SEA in Mind**

Okay, so I'm thinking, "Where's the real meat of how SEA (Software Error Analysis) is being addressed in the ARM64 kernel?" The logical place to start is the fault handling code, specifically `arch/arm64/mm/fault.c`. The commit history should be a goldmine of information, showing me the evolution of SEA-related fixes, features, and optimizations within the fault handling path. By examining those commits, I'm hoping to get a clear picture of how they've integrated with the existing error reporting mechanisms, any new fault types that may have been added to deal with SEA events, and generally how the kernel team is addressing the challenge. This will really help clarify my understanding, and I might get some useful insights for my own work with SEA.



344/4 2026/09/08 10:31 tool git-log
0m Args:
map[Count:30 PathPrefix:arch/arm64/mm/fault.c]

Results:
map[Output:a77644d009de arm64: mm: Fix the lockless page-table walk in show_pte()
f797f51a185f arm64: mm: When logging data aborts only decode Xs when ISV=1
dc11a4dba246 bpf: Recover arena kernel faults with scratch page
6a288a4ddb4a mm/page_alloc: fix initialization of tags of the huge zero folio with init_on_free
281a38ad2920 KVM: arm64: Reclaim faulting page from pKVM in spurious fault handler
9ff714a09222 KVM: arm64: Inject SIGSEGV on illegal accesses
b7d9d2e3a8ab arm64: mm: __ptep_set_access_flags must hint correct TTL
15397e3c3850 arm64: mm: Wrap flush_tlb_page() around __do_flush_tlb_range()
cb1fa2e99955 arm64, tlbflush: don't TLBI broadcast if page reused in write fault
5bebe8de1926 mm/huge_memory: Fix initialization of huge zero folio
adfb6609c680 mm/huge_memory: initialise the tags of the huge zero folio
d7ce7e3a8464 arm64: Mark kernel as tainted on SAE and SError panic
d75fa3c94750 mm: update architecture and driver code to use vm_flags_t
a8b8cce9d96d arm64: debug: remove debug exception registration infrastructure
eaff68b32861 arm64: entry: Add entry and exit functions for debug exceptions
22f3a4f60859 arm64: poe: Handle spurious Overlay faults
7c7f55039b8d arm64: Report address tag when FEAT_MTE_TAGGED_FAR is supported
04a9f771d81c arm64: mm: Handle PAN faults on uaccess CPY* instructions
653884f88777 arm64: extable: Add fixup handling for uaccess CPY* instructions
6359c39c9de6 mm: remove unused hugepage for vma_alloc_folio()
cfad706e8f6d arm64/mm: Handle GCS data aborts
7f0ab6076307 arm64: handle PKEY/POE faults
eebb5181a02f arm64: mm: drop VM_FAULT_BADMAP/VM_FAULT_BADACCESS
faab3d0f250a arm64: mm: accelerate pagefault when VM_FAULT_BADACCESS
6ea02ee48979 arm64: mm: cleanup __do_page_fault()
5a00bfd6a52c arm64/mm: new ptep layer to manage contig bit
659e19302791 arm64/mm: convert set_pte_at() to set_ptes(..., 1)
532736558e8e arm64/mm: convert READ_ONCE(*ptep) to ptep_get(ptep)
7ac8d5b2423c arm64: Add ESR decoding for exceptions involving translation level -1
46e714c729c8 arch/mm/fault: fix major fault accounting when retrying under per-VMA lock
]

345/4 2026/09/08 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 33661
							output: 26
							thoughts: 36
						

Thoughts:
Okay, let's dive in.

**Checking the SEA Implementation**

Right, so I need to understand how we're dealing with SEA in this context. My first step is to quickly look at the `do_sea` function and trace how SEA is actually defined and implemented within the code. I need to refresh my memory and make sure I understand the current approach. I'll need to pay close attention to the data structures involved, the logic that's applied, and any specific considerations the developers made.

After that quick check, I think it will be useful to review the code in commit `d7ce7e3a8464`. This commit likely represents a relevant change to the SEA system. I expect that I will be able to get additional context around the current implementation. I'll focus on what was added or changed in the code, and how these changes impacted the broader system. I'll be looking for design decisions, bug fixes, or enhancements that are relevant to my current need.



346/4 2026/09/08 10:31 tool git-show
0m Args:
map[Commit:d7ce7e3a8464]

Results:
map[Output:commit d7ce7e3a84642aadf7c4787f7ec4f58eb163d129
Author: Breno Leitao <leitao@debian.org>
Date:   Wed Jul 16 02:42:01 2025 -0700

    arm64: Mark kernel as tainted on SAE and SError panic
    
    Set TAINT_MACHINE_CHECK when SError or Synchronous External Abort (SEA)
    interrupts trigger a panic to flag potential hardware faults. This
    tainting mechanism aids in debugging and enables correlation of
    hardware-related crashes in large-scale deployments.
    
    This change aligns with similar patches[1] that mark machine check
    events when the system crashes due to hardware errors.
    
    Link: https://lore.kernel.org/all/20250702-add_tain-v1-1-9187b10914b9@debian.org/ [1]
    Signed-off-by: Breno Leitao <leitao@debian.org>
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Link: https://lore.kernel.org/r/20250716-vmcore_hw_error-v2-1-f187f7d62aba@debian.org
    Signed-off-by: Will Deacon <will@kernel.org>

diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 9bfa5c944379..7468b22585ce 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -931,6 +931,7 @@ void __noreturn panic_bad_stack(struct pt_regs *regs, unsigned long esr, unsigne
 
 void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr)
 {
+	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 	console_verbose();
 
 	pr_crit("SError Interrupt on CPU%d, code 0x%016lx -- %s\n",
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index ec0a337891dd..004106ff4bd0 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -826,6 +826,7 @@ static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
 		 */
 		siaddr  = untagged_addr(far);
 	}
+	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
 	arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 
 	return 0;
]

347/4 2026/09/08 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 34736
							output: 22
							thoughts: 56
						

Thoughts:
Okay, let's dive into this futex situation.

**Investigating Futex Interaction with User Mappings**

Right, I need to get a clear picture of how futex operations play out with user-space memory mappings. Specifically, I need to understand how these operations, you know, interact with the physical memory pages. My instinct tells me the place to start is digging into the `kernel/futex/` code. I'll search that directory for any relevant functions or calls that deal with getting the physical pages backing a user-space futex address. I'm thinking I should start by looking for calls like `get_user_pages`, which I expect will be crucial, and perhaps related functions like `get_futex_key`, or other functions with a similar purpose. The goal is to see exactly how these futex operations translate virtual addresses into physical addresses, and, you know, what locking or synchronization is involved with that process.



348/4 2026/09/08 10:31 tool codesearch-dir-index
0m Args:
map[Dir:kernel/futex]

Results:
map[Files:[core.c futex.h pi.c requeue.c syscalls.c waitwake.c] Subdirs:<nil>]

349/4 2026/09/08 10:31 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 35065
							output: 38
							thoughts: 24
						

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

**Diving into `get_futex_key`**

Okay, so I'm focusing in on `get_futex_key` within `kernel/futex/core.c`. My immediate thought is, "Right, this is *the* function responsible for deriving the unique key associated with a futex. That's the core of how the whole mechanism works, linking user-space operations to kernel-space wait queues." I need to understand this key generation.

I'm probably going to be thinking about how it handles different scenarios: different memory mappings, shared vs. private futexes, and especially how it deals with the potential for aliasing. What's the strategy for ensuring uniqueness *and* efficiency? I bet there's some clever use of the vma structure, maybe some address-space lookups... definitely the mm_struct is involved somehow. I hope it’s optimized. Is this key directly the address, or is it an indirect structure, or something computed from it? I'm going to have to follow the code and find the answer.



350/4 2026/09/08 10:32 tool codesearch-definition-source
0m Args:
map[ContextFile:kernel/futex/core.c Name:get_futex_key]

Results:
map[SourceCode: 479:	/**
 480:	 * get_futex_key() - Get parameters which are the keys for a futex
 481:	 * @uaddr:	virtual address of the futex
 482:	 * @flags:	FLAGS_*
 483:	 * @key:	address where result is stored.
 484:	 * @rw:		mapping needs to be read/write (values: FUTEX_READ,
 485:	 *              FUTEX_WRITE)
 486:	 *
 487:	 * Return: a negative error code or 0
 488:	 *
 489:	 * The key words are stored in @key on success.
 490:	 *
 491:	 * For shared mappings (when @fshared), the key is:
 492:	 *
 493:	 *   ( inode->i_sequence, page offset within mapping, offset_within_page )
 494:	 *
 495:	 * [ also see get_inode_sequence_number() ]
 496:	 *
 497:	 * For private mappings (or when !@fshared), the key is:
 498:	 *
 499:	 *   ( current->mm, address, 0 )
 500:	 *
 501:	 * This allows (cross process, where applicable) identification of the futex
 502:	 * without keeping the page pinned for the duration of the FUTEX_WAIT.
 503:	 *
 504:	 * lock_page() might sleep, the caller should not hold a spinlock.
 505:	 */
 506:	int get_futex_key(u32 __user *uaddr, unsigned int flags, union futex_key *key,
 507:			  enum futex_access rw)
 508:	{
 509:		unsigned long address = (unsigned long)uaddr;
 510:		struct mm_struct *mm = current->mm;
 511:		struct page *page;
 512:		struct folio *folio;
 513:		struct address_space *mapping;
 514:		int node, err, size, ro = 0;
 515:		bool node_updated = false;
 516:		bool fshared;
 517:	
 518:		fshared = flags & FLAGS_SHARED;
 519:		size = futex_size(flags);
 520:		if (flags & FLAGS_NUMA)
 521:			size *= 2;
 522:	
 523:		/*
 524:		 * The futex address must be "naturally" aligned.
 525:		 */
 526:		key->both.offset = address % PAGE_SIZE;
 527:		if (unlikely((address & (size-1)) != 0))
 528:			return -EINVAL;
 529:		address -= key->both.offset;
 530:	
 531:		if (unlikely(!access_ok(uaddr, size)))
 532:			return -EFAULT;
 533:	
 534:		if (unlikely(should_fail_futex(fshared)))
 535:			return -EFAULT;
 536:	
 537:		node = FUTEX_NO_NODE;
 538:	
 539:		if (flags & FLAGS_NUMA) {
 540:			u32 __user *naddr = (void *)uaddr + size / 2;
 541:	
 542:			if (get_user_inline(node, naddr))
 543:				return -EFAULT;
 544:	
 545:			if ((node != FUTEX_NO_NODE) &&
 546:			    ((unsigned int)node >= MAX_NUMNODES || !node_possible(node)))
 547:				return -EINVAL;
 548:		}
 549:	
 550:		if (node == FUTEX_NO_NODE && (flags & FLAGS_MPOL)) {
 551:			node = futex_mpol(mm, address);
 552:			node_updated = true;
 553:		}
 554:	
 555:		if (flags & FLAGS_NUMA) {
 556:			u32 __user *naddr = (void *)uaddr + size / 2;
 557:	
 558:			if (node == FUTEX_NO_NODE) {
 559:				node = numa_node_id();
 560:				node_updated = true;
 561:			}
 562:			if (node_updated && put_user_inline(node, naddr))
 563:				return -EFAULT;
 564:		}
 565:	
 566:		key->both.node = node;
 567:	
 568:		/*
 569:		 * PROCESS_PRIVATE futexes are fast.
 570:		 * As the mm cannot disappear under us and the 'key' only needs
 571:		 * virtual address, we dont even have to find the underlying vma.
 572:		 * Note : We do have to check 'uaddr' is a valid user address,
 573:		 *        but access_ok() should be faster than find_vma()
 574:		 */
 575:		if (!fshared) {
 576:			/*
 577:			 * On no-MMU, shared futexes are treated as private, therefore
 578:			 * we must not include the current process in the key. Since
 579:			 * there is only one address space, the address is a unique key
 580:			 * on its own.
 581:			 */
 582:			if (IS_ENABLED(CONFIG_MMU))
 583:				key->private.mm = mm;
 584:			else
 585:				key->private.mm = NULL;
 586:	
 587:			key->private.address = address;
 588:			return 0;
 589:		}
 590:	
 591:	again:
 592:		/* Ignore any VERIFY_READ mapping (futex common case) */
 593:		if (unlikely(should_fail_futex(true)))
 594:			return -EFAULT;
 595:	
 596:		err = get_user_pages_fast(address, 1, FOLL_WRITE, &page);
 597:		/*
 598:		 * If write access is not required (eg. FUTEX_WAIT), try
 599:		 * and get read-only access.
 600:		 */
 601:		if (err == -EFAULT && rw == FUTEX_READ) {
 602:			err = get_user_pages_fast(address, 1, 0, &page);
 603:			ro = 1;
 604:		}
 605:		if (err < 0)
 606:			return err;
 607:		else
 608:			err = 0;
 609:	
 610:		/*
 611:		 * The treatment of mapping from this point on is critical. The folio
 612:		 * lock protects many things but in this context the folio lock
 613:		 * stabilizes mapping, prevents inode freeing in the shared
 614:		 * file-backed region case and guards against movement to swap cache.
 615:		 *
 616:		 * Strictly speaking the folio lock is not needed in all cases being
 617:		 * considered here and folio lock forces unnecessarily serialization.
 618:		 * From this point on, mapping will be re-verified if necessary and
 619:		 * folio lock will be acquired only if it is unavoidable
 620:		 *
 621:		 * Mapping checks require the folio so it is looked up now. For
 622:		 * anonymous pages, it does not matter if the folio is split
 623:		 * in the future as the key is based on the address. For
 624:		 * filesystem-backed pages, the precise page is required as the
 625:		 * index of the page determines the key.
 626:		 */
 627:		folio = page_folio(page);
 628:		mapping = READ_ONCE(folio->mapping);
 629:	
 630:		/*
 631:		 * If folio->mapping is NULL, then it cannot be an anonymous
 632:		 * page; but it might be the ZERO_PAGE or in the gate area or
 633:		 * in a special mapping (all cases which we are happy to fail);
 634:		 * or it may have been a good file page when get_user_pages_fast
 635:		 * found it, but truncated or holepunched or subjected to
 636:		 * invalidate_complete_page2 before we got the folio lock (also
 637:		 * cases which we are happy to fail).  And we hold a reference,
 638:		 * so refcount care in invalidate_inode_page's remove_mapping
 639:		 * prevents drop_caches from setting mapping to NULL beneath us.
 640:		 *
 641:		 * The case we do have to guard against is when memory pressure made
 642:		 * shmem_writepage move it from filecache to swapcache beneath us:
 643:		 * an unlikely race, but we do need to retry for folio->mapping.
 644:		 */
 645:		if (unlikely(!mapping)) {
 646:			int shmem_swizzled;
 647:	
 648:			/*
 649:			 * Folio lock is required to identify which special case above
 650:			 * applies. If this is really a shmem page then the folio lock
 651:			 * will prevent unexpected transitions.
 652:			 */
 653:			folio_lock(folio);
 654:			shmem_swizzled = folio_test_swapcache(folio) || folio->mapping;
 655:			folio_unlock(folio);
 656:			folio_put(folio);
 657:	
 658:			if (shmem_swizzled)
 659:				goto again;
 660:	
 661:			return -EFAULT;
 662:		}
 663:	
 664:		/*
 665:		 * Private mappings are handled in a simple way.
 666:		 *
 667:		 * If the futex key is stored in anonymous memory, then the associated
 668:		 * object is the mm which is implicitly pinned by the calling process.
 669:		 *
 670:		 * NOTE: When userspace waits on a MAP_SHARED mapping, even if
 671:		 * it's a read-only handle, it's expected that futexes attach to
 672:		 * the object not the particular process.
 673:		 */
 674:		if (folio_test_anon(folio)) {
 675:			/*
 676:			 * A RO anonymous page will never change and thus doesn't make
 677:			 * sense for futex operations.
 678:			 */
 679:			if (unlikely(should_fail_futex(true)) || ro) {
 680:				err = -EFAULT;
 681:				goto out;
 682:			}
 683:	
 684:			key->both.offset |= FUT_OFF_MMSHARED; /* ref taken on mm */
 685:			key->private.mm = mm;
 686:			key->private.address = address;
 687:	
 688:		} else {
 689:			struct inode *inode;
 690:	
 691:			/*
 692:			 * The associated futex object in this case is the inode and
 693:			 * the folio->mapping must be traversed. Ordinarily this should
 694:			 * be stabilised under folio lock but it's not strictly
 695:			 * necessary in this case as we just want to pin the inode, not
 696:			 * update i_pages or anything like that.
 697:			 *
 698:			 * The RCU read lock is taken as the inode is finally freed
 699:			 * under RCU. If the mapping still matches expectations then the
 700:			 * mapping->host can be safely accessed as being a valid inode.
 701:			 */
 702:			rcu_read_lock();
 703:	
 704:			if (READ_ONCE(folio->mapping) != mapping) {
 705:				rcu_read_unlock();
 706:				folio_put(folio);
 707:	
 708:				goto again;
 709:			}
 710:	
 711:			inode = READ_ONCE(mapping->host);
 712:			if (!inode) {
 713:				rcu_read_unlock();
 714:				folio_put(folio);
 715:	
 716:				goto again;
 717:			}
 718:	
 719:			key->both.offset |= FUT_OFF_INODE; /* inode-based key */
 720:			key->shared.i_seq = get_inode_sequence_number(inode);
 721:			key->shared.pgoff = page_pgoff(folio, page);
 722:			rcu_read_unlock();
 723:		}
 724:	
 725:	out:
 726:		folio_put(folio);
 727:		return err;
 728:	}
 SourceFile:kernel/futex/core.c]

351/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 39082
							output: 37
							thoughts: 259
						

Thoughts:
**My Analysis of the futex Implementation**

Okay, let's break this down. In `get_futex_key`, specifically when dealing with private futexes (which, as I know, is the default glibc setup with `FUTEX_WAIT_PRIVATE` and friends), something interesting jumps out at me. If the `fshared` flag is *not* set, meaning we're using a private futex, then, on lines 575-589, it skips the VMA lookup and the call to `get_user_pages_fast` entirely. Instead, it simply stores the memory management structure (`mm`) and the address. It just assigns the `mm` and `address` to the `key->private` members, and returns `0`. That's it! No real page lookups, no VMA checking - at least not here.

The obvious follow-up is: what happens *later*? How does `futex_wait`, `futex_wake`, or `futex_lock_pi` use this stored `mm` and `address` information? The key is going to be tracing these calls. I'm going to jump into `kernel/futex/waitwake.c` and take a look at `futex_wait`. I need to understand how the system later uses this bare `mm` and `address` that `get_futex_key` is providing, and if there is a later check.



352/4 2026/09/08 10:32 tool codesearch-definition-source
0m Args:
map[ContextFile:kernel/futex/waitwake.c Name:futex_wait]

Results:
map[SourceCode: 741:	int futex_wait(u32 __user *uaddr, unsigned int flags, u32 val, ktime_t *abs_time, u32 bitset)
 742:	{
 743:		struct hrtimer_sleeper timeout, *to;
 744:		struct restart_block *restart;
 745:		int ret;
 746:	
 747:		to = futex_setup_timer(abs_time, &timeout, flags,
 748:				       current->timer_slack_ns);
 749:	
 750:		ret = __futex_wait(uaddr, flags, val, to, bitset);
 751:	
 752:		/* No timeout, nothing to clean up. */
 753:		if (!to)
 754:			return ret;
 755:	
 756:		hrtimer_cancel(&to->timer);
 757:		destroy_hrtimer_on_stack(&to->timer);
 758:	
 759:		if (ret == -ERESTARTSYS) {
 760:			restart = &current->restart_block;
 761:			restart->futex.uaddr = uaddr;
 762:			restart->futex.val = val;
 763:			restart->futex.time = *abs_time;
 764:			restart->futex.bitset = bitset;
 765:			restart->futex.flags = flags | FLAGS_HAS_TIMEOUT;
 766:	
 767:			return set_restart_fn(restart, futex_wait_restart);
 768:		}
 769:	
 770:		return ret;
 771:	}
 SourceFile:kernel/futex/waitwake.c]

353/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 40189
							output: 39
							thoughts: 24
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Diving into futex_wait_setup**

Alright, time to crack open `kernel/futex/waitwake.c` and zero in on `futex_wait_setup`. I need to refresh my understanding of how a process is prepped to wait on a futex. Specifically, I want to see how the setup stage is handled, before the actual blocking occurs. I'm looking for the nitty-gritty details of how the wait structure is initialized, any necessary sanity checks, and what state the process is put into *before* it gets put to sleep. I'm keen to examine the interaction with the futex's internal data structures at this initial stage. I want to see if any pre-sleep validations are made, and what is being done to prepare the linked lists and wait queues. Understanding `futex_wait_setup` is critical to seeing the architecture of the entire wait-wake cycle.



354/4 2026/09/08 10:32 tool codesearch-definition-source
0m Args:
map[ContextFile:kernel/futex/waitwake.c Name:futex_wait_setup]

Results:
map[SourceCode: 604:	/**
 605:	 * futex_wait_setup() - Prepare to wait on a futex
 606:	 * @uaddr:	the futex userspace address
 607:	 * @val:	the expected value
 608:	 * @flags:	futex flags (FLAGS_SHARED, etc.)
 609:	 * @q:		the associated futex_q
 610:	 * @key2:	the second futex_key if used for requeue PI
 611:	 * @task:	Task queueing this futex
 612:	 *
 613:	 * Setup the futex_q and locate the hash_bucket.  Get the futex value and
 614:	 * compare it with the expected value.  Handle atomic faults internally.
 615:	 * Return with the hb lock held on success, and unlocked on failure.
 616:	 *
 617:	 * Return:
 618:	 *  -  0 - uaddr contains val and hb has been locked;
 619:	 *  - <0 - On error and the hb is unlocked. A possible reason: the uaddr can not
 620:	 *	   be read, does not contain the expected value or is not properly aligned.
 621:	 */
 622:	int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags,
 623:			     struct futex_q *q, union futex_key *key2,
 624:			     struct task_struct *task)
 625:	{
 626:		u32 uval;
 627:		int ret;
 628:	
 629:		/*
 630:		 * Access the page AFTER the hash-bucket is locked.
 631:		 * Order is important:
 632:		 *
 633:		 *   Userspace waiter: val = var; if (cond(val)) futex_wait(&var, val);
 634:		 *   Userspace waker:  if (cond(var)) { var = new; futex_wake(&var); }
 635:		 *
 636:		 * The basic logical guarantee of a futex is that it blocks ONLY
 637:		 * if cond(var) is known to be true at the time of blocking, for
 638:		 * any cond.  If we locked the hash-bucket after testing *uaddr, that
 639:		 * would open a race condition where we could block indefinitely with
 640:		 * cond(var) false, which would violate the guarantee.
 641:		 *
 642:		 * On the other hand, we insert q and release the hash-bucket only
 643:		 * after testing *uaddr.  This guarantees that futex_wait() will NOT
 644:		 * absorb a wakeup if *uaddr does not match the desired values
 645:		 * while the syscall executes.
 646:		 */
 647:	retry:
 648:		ret = get_futex_key(uaddr, flags, &q->key, FUTEX_READ);
 649:		if (unlikely(ret != 0))
 650:			return ret;
 651:	
 652:	retry_private:
 653:		if (1) {
 654:			CLASS(hbr, hbr)(&q->key);
 655:			auto hb = hbr.hb;
 656:	
 657:			futex_q_lock(q, hb);
 658:	
 659:			ret = futex_get_value_locked(&uval, uaddr);
 660:	
 661:			if (ret) {
 662:				futex_q_unlock(hb);
 663:				__release(q->lock_ptr);
 664:	
 665:				ret = get_user(uval, uaddr);
 666:				if (ret)
 667:					return ret;
 668:	
 669:				if (!(flags & FLAGS_SHARED))
 670:					goto retry_private;
 671:	
 672:				goto retry;
 673:			}
 674:	
 675:			if (uval != val) {
 676:				futex_q_unlock(hb);
 677:				__release(q->lock_ptr);
 678:				return -EWOULDBLOCK;
 679:			}
 680:	
 681:			if (key2 && futex_match(&q->key, key2)) {
 682:				futex_q_unlock(hb);
 683:				__release(q->lock_ptr);
 684:				return -EINVAL;
 685:			}
 686:	
 687:			/*
 688:			 * The task state is guaranteed to be set before another task can
 689:			 * wake it. set_current_state() is implemented using smp_store_mb() and
 690:			 * futex_queue() calls spin_unlock() upon completion, both serializing
 691:			 * access to the hash list and forcing another memory barrier.
 692:			 */
 693:			if (task == current)
 694:				set_current_state(TASK_INTERRUPTIBLE|TASK_FREEZABLE);
 695:			futex_queue(q, hb, task);
 696:		}
 697:	
 698:		return ret;
 699:	}
 SourceFile:kernel/futex/waitwake.c]

355/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 41982
							output: 36
							thoughts: 54
						

Thoughts:
Okay, let's see...

**Delving into Futex Atomic Operations**

Right, so I'm thinking about those futex operations, specifically the ones that leverage atomic compare-and-swap (cmpxchg) instructions. My immediate focus is on whether `futex_lock_pi` is a prime candidate, or perhaps something like `futex_atomic_cmpxchg_inatomic`. The key is understanding how these atomic operations are being *used* in the futex implementation. I need to understand the callers of those atomic futex functions, their contexts, the kinds of synchronization patterns they're supporting. That's where the real detail lives, and what dictates performance. Let's dig into the callers... let's see where those atomic ops are actually *being* called from. The answer lies in the call sites.



356/4 2026/09/08 10:32 tool grepper
0m Args:
map[Expression:futex_atomic_cmpxchg_inatomic PathPrefix:kernel/futex]

Results:
map[Output:kernel/futex/futex.h=290=static inline int futex_cmpxchg_value_locked(u32 *curval, u32 __user *uaddr, u32 uval, u32 newval)
--
kernel/futex/futex.h-294-	pagefault_disable();
kernel/futex/futex.h:295:	ret = futex_atomic_cmpxchg_inatomic(curval, uaddr, uval, newval);
kernel/futex/futex.h-296-	pagefault_enable();
]

357/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 42408
							output: 30
							thoughts: 1443
						

Thoughts:
**Deep Dive into ARM64 Futex Implementation and Potential SEA Issues**

Okay, so here's the situation as I see it, based on this code and my expertise. We're looking at the low-level workings of futexes on ARM64, specifically the `futex_cmpxchg_value_locked` function, which, as I know, is a critical component for synchronization primitives. This function gets called by `futex_lock_pi`, `futex_unlock_pi`, and `futex_wake_op`, and it's built upon `futex_atomic_cmpxchg_inatomic`. The key operation here is the atomic compare-and-exchange implemented using assembly instructions: `__llsc_futex_cmpxchg`. The assembly code uses load-exclusive (LDXR) and store-exclusive (STXR) instructions.

My immediate focus, given my extensive experience in this area, is on how these exclusive accesses behave, particularly when dealing with different memory types. We're getting down to the nitty-gritty of memory access and potential synchronization problems that can result from its implementation. The question boils down to whether `ldxr` operations on `MT_NORMAL_NC` (write-combine memory, like what you'd see when using `pgprot_writecombine`) can trigger a Synchronous External Abort (SEA), or if that only occurs on `MT_DEVICE_nGnRE` (device memory) as I thought. The second question, which I know to be most concerning, is what happens when an unprivileged user maps VRAM using a DRM render node (which uses write-combine memory) and then calls futex operations on it. Can this reliably crash the kernel through an SEA?

My analysis needs to be thorough. First, let's look at the ARM Architecture Reference Manual (ARM ARM). We're going to examine how it defines memory types and exclusive accesses. Specifically, let's explore how the manual handles exclusive accesses to both `Device` memory and `Normal` memory (both cacheable and non-cacheable). This is key!

Okay, according to the ARM ARM, Device memory is the problem area. Exclusive accesses to Device memory are either explicitly "CONSTRAINED UNPREDICTABLE" or even generate an exception like a Synchronous Data Abort (SDA) with a specific fault status code (FSC). This occurs because device buses generally don't support the exclusive monitors needed for the read-modify-write semantics of LDXR/STXR. Most real-world ARM64 implementations do this when accessing memory classified as Device, which means peripherals and most device memory accesses will result in an SEA, due to the bus protocols.

Now, what about Normal Non-cacheable memory (`MT_NORMAL_NC`)? This is a crucial distinction. The ARM ARM considers it **Normal** memory. The architecture states that "Normal memory supports all Normal memory accesses, including unaligned accesses and exclusive accesses." Exclusive access to Normal memory relies on exclusive monitors. These monitors can be local to the core or global. Normal Non-cacheable accesses bypass the L1/L2 caches and go out to the system interconnect. In typical ARMv8 systems, there's a Global Exclusive Monitor implemented at the interconnect level (e.g., CoreLink, CMN, CCI). Even if the memory is Non-cacheable, because it's defined as "Normal" memory, the core and interconnect treat it as such, which means exclusive loads to Normal Non-cacheable RAM should *not* generate an SEA. They should succeed, provided there is a global monitor. This is key: *Should* not, but what if the memory is actually a PCI device like VRAM?

This leads us to the crucial consideration: Does the same behavior occur when we are accessing a PCIe MMIO region or GPU VRAM BAR (Base Address Register) that's mapped as `MT_NORMAL_NC`? Here, we need to think about the PCIe bus protocol. The question here is can `ldxr` go over PCIe to an external GPU (VRAM) without issues? The answer lies in how the PCIe fabric handles these exclusive accesses. Do these protocols behave as intended or do we run into the same constraints of `Device` memory?

Therefore, I need to do further investigation. My next step will be to search the Linux kernel code and mailing lists for discussions, commits, and bug reports related to:

*   PCIe exclusive accesses
*   DRM render node mmap and futex interactions
*   The differences and implications of `MT_NORMAL_NC` versus `MT_DEVICE`
*   How the kernel handles SEAs or SDAs in this context.

This will give me the information I need to confirm whether an SEA is possible or if my initial understanding is correct.



358/4 2026/09/08 10:32 tool grepper
0m Args:
map[Expression:pgprot_writecombine PathPrefix:drivers/gpu/drm]

Results:
map[Output:drivers/gpu/drm/drm_fbdev_shmem.c=43=static int drm_fbdev_shmem_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
--
drivers/gpu/drm/drm_fbdev_shmem.c-50-	if (shmem->map_wc)
drivers/gpu/drm/drm_fbdev_shmem.c:51:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/drm_fbdev_shmem.c-52-
--
drivers/gpu/drm/drm_gem.c=1222=int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
--
drivers/gpu/drm/drm_gem.c-1253-		vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP);
drivers/gpu/drm/drm_gem.c:1254:		vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/drm_gem.c-1255-		vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
--
drivers/gpu/drm/drm_gem_shmem_helper.c=389=int drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem,
--
drivers/gpu/drm/drm_gem_shmem_helper.c-413-		if (shmem->map_wc)
drivers/gpu/drm/drm_gem_shmem_helper.c:414:			prot = pgprot_writecombine(prot);
drivers/gpu/drm/drm_gem_shmem_helper.c-415-		shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
--
drivers/gpu/drm/drm_gem_shmem_helper.c=752=int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct *vma)
--
drivers/gpu/drm/drm_gem_shmem_helper.c-786-	if (shmem->map_wc)
drivers/gpu/drm/drm_gem_shmem_helper.c:787:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/drm_gem_shmem_helper.c-788-
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c=129=static int etnaviv_gem_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c-138-	if (etnaviv_obj->flags & ETNA_BO_WC) {
drivers/gpu/drm/etnaviv/etnaviv_gem.c:139:		vma->vm_page_prot = pgprot_writecombine(vm_page_prot);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-140-	} else if (etnaviv_obj->flags & ETNA_BO_UNCACHED) {
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c=344=static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
--
drivers/gpu/drm/etnaviv/etnaviv_gem.c-363-	default:
drivers/gpu/drm/etnaviv/etnaviv_gem.c:364:		prot = pgprot_writecombine(PAGE_KERNEL);
drivers/gpu/drm/etnaviv/etnaviv_gem.c-365-	}
--
drivers/gpu/drm/exynos/exynos_drm_gem.c=365=static int exynos_drm_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/exynos/exynos_drm_gem.c-382-		vma->vm_page_prot =
drivers/gpu/drm/exynos/exynos_drm_gem.c:383:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/exynos/exynos_drm_gem.c-384-	else
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c=60=i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-114-			vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:115:				pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-116-		else
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c=990=i915_gem_object_mmap(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1037-		vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:1038:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1039-		vma->vm_ops = &vm_ops_cpu;
--
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1057-		vma->vm_page_prot =
drivers/gpu/drm/i915/gem/i915_gem_mman.c:1058:			pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/i915/gem/i915_gem_mman.c-1059-		vma->vm_ops = &vm_ops_gtt;
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c=272=static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c-307-	case I915_MAP_WC:
drivers/gpu/drm/i915/gem/i915_gem_pages.c:308:		pgprot = pgprot_writecombine(PAGE_KERNEL_IO);
drivers/gpu/drm/i915/gem/i915_gem_pages.c-309-		break;
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c=329=static void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj,
--
drivers/gpu/drm/i915/gem/i915_gem_pages.c-351-		pfns[i++] = (iomap + addr) >> PAGE_SHIFT;
drivers/gpu/drm/i915/gem/i915_gem_pages.c:352:	vaddr = vmap_pfn(pfns, n_pfn, pgprot_writecombine(PAGE_KERNEL_IO));
drivers/gpu/drm/i915/gem/i915_gem_pages.c-353-	if (pfns != stack)
--
drivers/gpu/drm/imagination/pvr_mmu.c=257=pvr_mmu_backing_page_init(struct pvr_mmu_backing_page *page,
--
drivers/gpu/drm/imagination/pvr_mmu.c-274-	if (device_get_dma_attr(dev) != DEV_DMA_COHERENT)
drivers/gpu/drm/imagination/pvr_mmu.c:275:		prot = pgprot_writecombine(prot);
drivers/gpu/drm/imagination/pvr_mmu.c-276-
--
drivers/gpu/drm/imagination/pvr_vm_mips.c=30=pvr_vm_mips_init(struct pvr_device *pvr_dev)
--
drivers/gpu/drm/imagination/pvr_vm_mips.c-66-	mips_data->pt = vmap(mips_data->pt_pages, pt_size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/imagination/pvr_vm_mips.c:67:			     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/imagination/pvr_vm_mips.c-68-	if (!mips_data->pt) {
--
drivers/gpu/drm/lima/lima_sched.c=273=static void lima_sched_build_error_task_list(struct lima_sched_task *task)
--
drivers/gpu/drm/lima/lima_sched.c-365-			data = vmap(bo->base.pages, bo->heap_size >> PAGE_SHIFT,
drivers/gpu/drm/lima/lima_sched.c:366:				    VM_MAP, pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/lima/lima_sched.c-367-			if (!data) {
--
drivers/gpu/drm/msm/msm_gem.c=323=static pgprot_t msm_gem_pgprot(struct msm_gem_object *msm_obj, pgprot_t prot)
--
drivers/gpu/drm/msm/msm_gem.c-325-	if (msm_obj->flags & MSM_BO_WC)
drivers/gpu/drm/msm/msm_gem.c:326:		return pgprot_writecombine(prot);
drivers/gpu/drm/msm/msm_gem.c-327-	return prot;
--
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c=186=gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
--
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c-209-	node->base.vaddr = vmap(node->pages, size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:210:				pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c-211-	if (!node->base.vaddr) {
--
drivers/gpu/drm/omapdrm/omap_fbdev.c=85=static int omap_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/gpu/drm/omapdrm/omap_fbdev.c-86-{
drivers/gpu/drm/omapdrm/omap_fbdev.c:87:	vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/omapdrm/omap_fbdev.c-88-
--
drivers/gpu/drm/omapdrm/omap_gem.c=534=static int omap_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/omapdrm/omap_gem.c-540-	if (omap_obj->flags & OMAP_BO_WC) {
drivers/gpu/drm/omapdrm/omap_gem.c:541:		vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/omapdrm/omap_gem.c-542-	} else if (omap_obj->flags & OMAP_BO_UNCACHED) {
--
drivers/gpu/drm/omapdrm/omap_gem.c=1067=void *omap_gem_vaddr(struct drm_gem_object *obj)
--
drivers/gpu/drm/omapdrm/omap_gem.c-1082-		omap_obj->vaddr = vmap(omap_obj->pages, obj->size >> PAGE_SHIFT,
drivers/gpu/drm/omapdrm/omap_gem.c:1083:				VM_MAP, pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/omapdrm/omap_gem.c-1084-	}
--
drivers/gpu/drm/panthor/panthor_gem.c=381=panthor_gem_vmap_get_locked(struct panthor_gem_object *bo)
--
drivers/gpu/drm/panthor/panthor_gem.c-405-	if (should_map_wc(bo))
drivers/gpu/drm/panthor/panthor_gem.c:406:		prot = pgprot_writecombine(prot);
drivers/gpu/drm/panthor/panthor_gem.c-407-
--
drivers/gpu/drm/panthor/panthor_gem.c=742=static int panthor_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
--
drivers/gpu/drm/panthor/panthor_gem.c-780-	if (should_map_wc(bo))
drivers/gpu/drm/panthor/panthor_gem.c:781:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/panthor/panthor_gem.c-782-
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=125=static int rockchip_gem_alloc_iommu(struct rockchip_gem_object *rk_obj,
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-139-		rk_obj->kvaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:140:				      pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-141-		if (!rk_obj->kvaddr) {
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=240=static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj,
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-257-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:258:	vma->vm_page_prot = pgprot_writecombine(vma_get_page_prot(vma));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-259-	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c=514=int rockchip_gem_prime_vmap(struct drm_gem_object *obj, struct iosys_map *map)
--
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-524-			vaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:525:				     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/rockchip/rockchip_drm_gem.c-526-
--
drivers/gpu/drm/tegra/fbdev.c=69=int tegra_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
--
drivers/gpu/drm/tegra/fbdev.c-117-		bo->vaddr = vmap(bo->pages, bo->num_pages, VM_MAP,
drivers/gpu/drm/tegra/fbdev.c:118:				 pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/tegra/fbdev.c-119-		if (!bo->vaddr) {
--
drivers/gpu/drm/tegra/gem.c=177=static void *tegra_bo_mmap(struct host1x_bo *bo)
--
drivers/gpu/drm/tegra/gem.c-195-	vaddr = vmap(obj->pages, obj->num_pages, VM_MAP,
drivers/gpu/drm/tegra/gem.c:196:		     pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/tegra/gem.c-197-	if (!vaddr)
--
drivers/gpu/drm/tegra/gem.c=580=int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma)
--
drivers/gpu/drm/tegra/gem.c-608-
drivers/gpu/drm/tegra/gem.c:609:		vma->vm_page_prot = pgprot_writecombine(prot);
drivers/gpu/drm/tegra/gem.c-610-	}
--
drivers/gpu/drm/ttm/ttm_module.c=62=pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
--
drivers/gpu/drm/ttm/ttm_module.c-69-	if (caching == ttm_write_combined)
drivers/gpu/drm/ttm/ttm_module.c:70:		tmp = pgprot_writecombine(tmp);
drivers/gpu/drm/ttm/ttm_module.c-71-#ifndef CONFIG_UML
--
drivers/gpu/drm/ttm/ttm_module.c-79-	if (caching == ttm_write_combined)
drivers/gpu/drm/ttm/ttm_module.c:80:		tmp = pgprot_writecombine(tmp);
drivers/gpu/drm/ttm/ttm_module.c-81-	else
--
drivers/gpu/drm/v3d/v3d_bo.c=194=void v3d_get_bo_vaddr(struct v3d_bo *bo)
--
drivers/gpu/drm/v3d/v3d_bo.c-198-	bo->vaddr = vmap(obj->pages, obj->base.size >> PAGE_SHIFT, VM_MAP,
drivers/gpu/drm/v3d/v3d_bo.c:199:			 pgprot_writecombine(PAGE_KERNEL));
drivers/gpu/drm/v3d/v3d_bo.c-200-}
--
drivers/gpu/drm/virtio/virtgpu_vram.c=35=static int virtio_gpu_vram_mmap(struct drm_gem_object *obj,
--
drivers/gpu/drm/virtio/virtgpu_vram.c-63-	if (vram->map_info == VIRTIO_GPU_MAP_CACHE_WC)
drivers/gpu/drm/virtio/virtgpu_vram.c:64:		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
drivers/gpu/drm/virtio/virtgpu_vram.c-65-	else if (vram->map_info == VIRTIO_GPU_MAP_CACHE_UNCACHED)
]

359/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 50034
							output: 42
							thoughts: 79
						

Thoughts:
Here's my take on those thoughts:

**Analyzing `ttm_prot_from_caching`**

Alright, let's dive in. I'm focusing on `ttm_prot_from_caching` within `drivers/gpu/drm/ttm/ttm_module.c`. I know TTM is crucial for handling the VRAM on discrete GPUs, think AMDGPU, Nouveau, or even Intel's Xe and i915 integrated graphics. My primary interest is in understanding how memory protection and caching policies are managed at this level. Let's start by looking directly at the code in `ttm_module.c` and see what insights we can glean.



360/4 2026/09/08 10:32 tool read-file
0m Args:
map[File:drivers/gpu/drm/ttm/ttm_module.c FirstLine:60 LineCount:40]

Results:
map[Contents:  60:	 * Return: The modified page protection
  61:	 */
  62:	pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
  63:	{
  64:		/* Cached mappings need no adjustment */
  65:		if (caching == ttm_cached)
  66:			return tmp;
  67:	
  68:	#if defined(__i386__) || defined(__x86_64__)
  69:		if (caching == ttm_write_combined)
  70:			tmp = pgprot_writecombine(tmp);
  71:	#ifndef CONFIG_UML
  72:		else if (boot_cpu_data.x86 > 3)
  73:			tmp = pgprot_noncached(tmp);
  74:	#endif /* CONFIG_UML */
  75:	#endif /* __i386__ || __x86_64__ */
  76:	#if defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || \
  77:		defined(__powerpc__) || defined(__mips__) || defined(__loongarch__) || \
  78:		defined(__riscv)
  79:		if (caching == ttm_write_combined)
  80:			tmp = pgprot_writecombine(tmp);
  81:		else
  82:			tmp = pgprot_noncached(tmp);
  83:	#endif
  84:	#if defined(__sparc__)
  85:		tmp = pgprot_noncached(tmp);
  86:	#endif
  87:		return tmp;
  88:	}
  89:	
  90:	MODULE_AUTHOR("Thomas Hellstrom, Jerome Glisse");
  91:	MODULE_DESCRIPTION("TTM memory manager subsystem (for DRM device)");
  92:	MODULE_LICENSE("GPL and additional rights");
]

361/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 50814
							output: 30
							thoughts: 72
						

Thoughts:
Here's my take on the thought process:

**Diving into Memory Type Definitions**

Okay, so I need to understand how the memory type attributes are being set up, specifically the ones used for different device memory and normal memory regions. My instinct is to check the header files for the architecture-specific definitions, so I'll start by looking at `arch/arm64/include/asm/pgtable-prot.h` and if that's not the right place, I will go to `pgtable.h`. I'm particularly interested in how these are mapped to the MAIR_EL1 registers: `MT_DEVICE_nGnRE`, `MT_DEVICE_nGnRnE`, `MT_NORMAL_NC`, and `MT_NORMAL`. Knowing the underlying definitions will allow me to correlate these enums/macros with the actual bit patterns that are programmed into the memory attribute registers. This is fundamental to understanding the memory access behavior I'm expecting. It's time to dig into the source and see how these attributes are being declared.



362/4 2026/09/08 10:32 tool grepper
0m Args:
map[Expression:MT_NORMAL_NC PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/memory.h-172-#define MT_NORMAL_TAGGED	1
arch/arm64/include/asm/memory.h:173:#define MT_NORMAL_NC		2
arch/arm64/include/asm/memory.h-174-#define MT_DEVICE_nGnRnE	3
--
arch/arm64/include/asm/pgtable-prot.h-44-#define PROT_DEVICE_nGnRE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_DEVICE_nGnRE))
arch/arm64/include/asm/pgtable-prot.h:45:#define PROT_NORMAL_NC		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL_NC))
arch/arm64/include/asm/pgtable-prot.h-46-#define PROT_NORMAL		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
--
arch/arm64/include/asm/pgtable.h=725=static inline void __set_puds(struct mm_struct *mm, unsigned long addr,
--
arch/arm64/include/asm/pgtable.h-754-#define pgprot_writecombine(prot) \
arch/arm64/include/asm/pgtable.h:755:	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h-756-#define pgprot_device(prot) \
--
arch/arm64/include/asm/pgtable.h-770-	__pgprot_modify(prot, PTE_ATTRINDX_MASK, \
arch/arm64/include/asm/pgtable.h:771:			PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
arch/arm64/include/asm/pgtable.h-772-
--
arch/arm64/kvm/mmu.c=1537=static bool kvm_vma_is_cacheable(struct vm_area_struct *vma)
--
arch/arm64/kvm/mmu.c-1539-	switch (FIELD_GET(PTE_ATTRINDX_MASK, pgprot_val(vma->vm_page_prot))) {
arch/arm64/kvm/mmu.c:1540:	case MT_NORMAL_NC:
arch/arm64/kvm/mmu.c-1541-	case MT_DEVICE_nGnRnE:
--
arch/arm64/mm/proc.S-76-	 MAIR_ATTRIDX(MAIR_ATTR_DEVICE_nGnRE, MT_DEVICE_nGnRE) |	\
arch/arm64/mm/proc.S:77:	 MAIR_ATTRIDX(MAIR_ATTR_NORMAL_NC, MT_NORMAL_NC) |		\
arch/arm64/mm/proc.S-78-	 MAIR_ATTRIDX(MAIR_ATTR_NORMAL, MT_NORMAL) |			\
--
arch/arm64/mm/ptdump.c=41=static const struct ptdump_prot_bits pte_bits[] = {
--
arch/arm64/mm/ptdump.c-106-		.mask	= PTE_ATTRINDX_MASK,
arch/arm64/mm/ptdump.c:107:		.val	= PTE_ATTRINDX(MT_NORMAL_NC),
arch/arm64/mm/ptdump.c-108-		.set	= "MEM/NORMAL-NC",
]

363/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 52105
							output: 38
							thoughts: 59
						

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

**Diving into ARM64 Memory Management**

Okay, so I need to get into the nitty-gritty of ARM64 memory management, specifically within the kernel. My first port of call will be those critical architecture-specific files. Let's see... I'm thinking the relevant code will be in `arch/arm64/mm/proc.S` and `arch/arm64/include/asm/memory.h`. Knowing the ARM64 architecture, I figure those are the likely spots for the core routines and definitions related to process memory.

Now, let me zoom in on `arch/arm64/mm/proc.S`, and I'll jump right to around line 76. That seems like a reasonable starting point to understand the low-level aspects, probably dealing with page table manipulation or address translation. Let's see what gems I can find there. This is where the real architecture-specific magic happens.



364/4 2026/09/08 10:32 tool read-file
0m Args:
map[File:arch/arm64/mm/proc.S FirstLine:60 LineCount:40]

Results:
map[Contents:  60:	#define TCR_MTE_FLAGS 0
  61:	#endif
  62:	
  63:	#define TCR_IRGN_WBWA	((TCR_EL1_IRGN0_WBWA << TCR_EL1_IRGN0_SHIFT) |\
  64:				 (TCR_EL1_IRGN1_WBWA << TCR_EL1_IRGN1_SHIFT))
  65:	#define TCR_ORGN_WBWA	((TCR_EL1_ORGN0_WBWA << TCR_EL1_ORGN0_SHIFT) |\
  66:				 (TCR_EL1_ORGN1_WBWA << TCR_EL1_ORGN1_SHIFT))
  67:	#define TCR_SHARED	((TCR_EL1_SH0_INNER << TCR_EL1_SH0_SHIFT) |\
  68:				 (TCR_EL1_SH1_INNER << TCR_EL1_SH1_SHIFT))
  69:	
  70:	/*
  71:	 * Default MAIR_EL1. MT_NORMAL_TAGGED is initially mapped as Normal memory and
  72:	 * changed during mte_cpu_setup to Normal Tagged if the system supports MTE.
  73:	 */
  74:	#define MAIR_EL1_SET							\
  75:		(MAIR_ATTRIDX(MAIR_ATTR_DEVICE_nGnRnE, MT_DEVICE_nGnRnE) |	\
  76:		 MAIR_ATTRIDX(MAIR_ATTR_DEVICE_nGnRE, MT_DEVICE_nGnRE) |	\
  77:		 MAIR_ATTRIDX(MAIR_ATTR_NORMAL_NC, MT_NORMAL_NC) |		\
  78:		 MAIR_ATTRIDX(MAIR_ATTR_NORMAL, MT_NORMAL) |			\
  79:		 MAIR_ATTRIDX(MAIR_ATTR_NORMAL, MT_NORMAL_TAGGED))
  80:	
  81:	#ifdef CONFIG_CPU_PM
  82:	/**
  83:	 * cpu_do_suspend - save CPU registers context
  84:	 *
  85:	 * x0: virtual address of context pointer
  86:	 *
  87:	 * This must be kept in sync with struct cpu_suspend_ctx in <asm/suspend.h>.
  88:	 */
  89:	SYM_FUNC_START(cpu_do_suspend)
  90:		mrs	x2, tpidr_el0
  91:		mrs	x3, tpidrro_el0
  92:		mrs	x4, contextidr_el1
  93:		mrs	x5, osdlr_el1
  94:		mrs	x6, cpacr_el1
  95:		mrs	x7, tcr_el1
  96:		mrs	x8, vbar_el1
  97:		mrs	x9, mdscr_el1
  98:		mrs	x10, oslsr_el1
  99:		mrs	x11, sctlr_el1
]

365/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 53220
							output: 33
							thoughts: 55
						

Thoughts:
Here's my summary, as if I were thinking these thoughts:

**Dissecting ARM64 Memory Attribute Definitions**

Okay, time to dig into the nitty-gritty of ARM64 memory attributes. I need to understand how these memory types are actually *defined*. Specifically, I'm thinking about those macros – `MAIR_ATTR_NORMAL_NC`, `MAIR_ATTR_DEVICE_nGnRE`, and the like. Where are the definitive declarations for these things? The logical place to start looking is within the architecture-specific include files, namely `arch/arm64/include/asm/memory.h` and `sysreg.h`. I'll open those up and see exactly how they're mapping these symbolic names to their underlying register values or bitfield assignments. Gotta make sure I'm crystal clear on what each memory attribute *means* in the context of the hardware. This is crucial for properly setting up memory regions and performance tuning – you can't optimize what you don't understand. So, let's get to it!



366/4 2026/09/08 10:32 tool grepper
0m Args:
map[Expression:MAIR_ATTR_NORMAL_NC PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/sysreg.h-874-#define MAIR_ATTR_DEVICE_nGnRE		UL(0x04)
arch/arm64/include/asm/sysreg.h:875:#define MAIR_ATTR_NORMAL_NC		UL(0x44)
arch/arm64/include/asm/sysreg.h-876-#define MAIR_ATTR_NORMAL_TAGGED		UL(0xf0)
--
arch/arm64/mm/proc.S-76-	 MAIR_ATTRIDX(MAIR_ATTR_DEVICE_nGnRE, MT_DEVICE_nGnRE) |	\
arch/arm64/mm/proc.S:77:	 MAIR_ATTRIDX(MAIR_ATTR_NORMAL_NC, MT_NORMAL_NC) |		\
arch/arm64/mm/proc.S-78-	 MAIR_ATTRIDX(MAIR_ATTR_NORMAL, MT_NORMAL) |			\
]

367/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 53785
							output: 29
							thoughts: 3301
						

Thoughts:
**My Analysis of Exclusive Accesses, Futexes, and VRAM Mappings**

Okay, let's break this down. My understanding of the situation is this: `MAIR_ATTR_NORMAL_NC` is indeed defined as `0x44` which corresponds to `Normal Non-cacheable` memory. `MAIR_ATTR_DEVICE_nGnRE` is `0x04` – Device memory (non-cacheable, no-gather, no-read allocate, no-write allocate), and `MAIR_ATTR_DEVICE_nGnRnE` is `0x00`, also Device memory, just a slightly stricter variant (non-cacheable, no-gather, no-read allocate, no-write allocate). My primary concern here revolves around how exclusive access instructions (LDXR/STXR, CAS, etc.) behave when interacting with these memory types.

My reading of the ARM Architecture Reference Manual (ARM DDI 0487) clearly states that exclusive accesses to Device memory are "CONSTRAINED UNPREDICTABLE." This means they can generate a Data Abort exception (Synchronous External Abort, or SEA), an Alignment fault, or execute as a NOP, or as a non-exclusive load/store.  In reality, issuing `ldxr` / `stxr` to Device memory typically results in an SEA because device memory lacks the necessary exclusive monitors.

However, when we talk about **Normal Non-cacheable** memory (`MT_NORMAL_NC` or `pgprot_writecombine`), the situation is different. The ARM architecture *permits* exclusive accesses to Normal memory.  The architecture also specifies that accesses to Normal memory rely on Local and Global Exclusive Monitors.  When an LDXR instruction is executed, my expectation is that the CPU doesn't forbid exclusive accesses, instead the access is treated as a normal load/store, but the exclusivity is tagged. In an ARMv8/v9 interconnect, there's a Global Exclusive Monitor. So, if the physical address is, say, RAM, the transaction succeeds normally. The `ldxr` does its job setting the monitor, and `stxr` returns the correct success/failure status. No SEA.

The interesting part of this question is if the target address is VRAM, which in the user's case, is accessed via a PCIe BAR.  Since the page tables define it as `MT_NORMAL_NC`, the ARM core sees *Normal* memory.  The interconnect's Global Exclusive Monitor handles the accesses. It either monitors the address internally or the interconnect handles the transaction. Therefore, *no* SEA is generated when `ldxr` is used on `MT_NORMAL_NC`.  Even more, the `ldxr` instruction is merely a load-linked and does not require hardware atomic operation at the endpoint.

Now, regarding the specific scenario of an unprivileged user mapping VRAM via a DRM render node (using `pgprot_writecombine`) and calling `futex`:

My analysis leads me to believe there won't be a kernel crash. Here's why:

1.  **`ldxr` on `MT_NORMAL_NC`:** As established, this *doesn't* cause an SEA. SEA is related to `MT_DEVICE_nGnRE` (Device memory), not Normal memory.

2.  **`futex` syscall behavior:**
    *   **`FUTEX_WAIT_PRIVATE`/`FUTEX_WAKE_PRIVATE`:** These operations, fundamentally, use a plain `get_user` (or `ldtr`) to read the futex value. No exclusive accesses are involved. No crash.
    *   **`FUTEX_LOCK_PI`/`FUTEX_UNLOCK_PI`/`FUTEX_WAKE_OP`:** These *do* use atomic instructions (`cmpxchg`, internally `ldxr`/`stlxr`). But, because the memory is mapped as `MT_NORMAL_NC`, the `ldxr` and `stlxr` execute as normal exclusive accesses. No SEA. The atomic operation completes successfully or gracefully.
    *   **Shared futex (`FUTEX_WAIT` / `FUTEX_WAKE`)**: Uses `get_user_pages_fast`. This will likely fail with `-EFAULT` due to lack of a `struct page` for VRAM mappings (VM_PFNMAP or VM_IO). This causes a return of `-EFAULT` from the `futex` syscall *before* any exclusive instructions are involved.
    *   **If Exclusive access is done on Device memory (via a driver or `/dev/mem`):**
        *    If an exclusive access does happen from userspace (EL0), this *will* generate a Synchronous Data Abort (


368/4 2026/09/08 10:32 tool grepper
0m Args:
map[Expression:fixup_exception PathPrefix:arch/arm64]

Results:
map[Output:arch/arm64/include/asm/efi.h=16=extern void efi_init(void);
arch/arm64/include/asm/efi.h-17-
arch/arm64/include/asm/efi.h:18:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg);
arch/arm64/include/asm/efi.h-19-#else
--
arch/arm64/include/asm/efi.h=22=static inline
arch/arm64/include/asm/efi.h:23:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
arch/arm64/include/asm/efi.h-24-{
--
arch/arm64/include/asm/extable.h=43=bool ex_handler_bpf(const struct exception_table_entry *ex,
--
arch/arm64/include/asm/extable.h-49-
arch/arm64/include/asm/extable.h:50:bool fixup_exception(struct pt_regs *regs, unsigned long esr);
arch/arm64/include/asm/extable.h-51-#endif
--
arch/arm64/kernel/efi.c=220=asmlinkage efi_status_t __efi_rt_asm_recover(void);
arch/arm64/kernel/efi.c-221-
arch/arm64/kernel/efi.c:222:bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
arch/arm64/kernel/efi.c-223-{
--
arch/arm64/kernel/probes/kprobes.c=301=int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
--
arch/arm64/kernel/probes/kprobes.c-310-	 * must be left alone for the normal page fault handler, including
arch/arm64/kernel/probes/kprobes.c:311:	 * fixup_exception.
arch/arm64/kernel/probes/kprobes.c-312-	 */
--
arch/arm64/kernel/traps.c=495=void do_el1_bti(struct pt_regs *regs, unsigned long esr)
arch/arm64/kernel/traps.c-496-{
arch/arm64/kernel/traps.c:497:	if (efi_runtime_fixup_exception(regs, "BTI violation")) {
arch/arm64/kernel/traps.c-498-		regs->pstate &= ~PSR_BTYPE_MASK;
--
arch/arm64/mm/extable.c=69=ex_handler_load_unaligned_zeropad(const struct exception_table_entry *ex,
--
arch/arm64/mm/extable.c-94-
arch/arm64/mm/extable.c:95:bool fixup_exception(struct pt_regs *regs, unsigned long esr)
arch/arm64/mm/extable.c-96-{
--
arch/arm64/mm/fault.c=409=static void __do_kernel_fault(unsigned long addr, unsigned long esr,
--
arch/arm64/mm/fault.c-417-	 */
arch/arm64/mm/fault.c:418:	if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr))
arch/arm64/mm/fault.c-419-		return;
--
arch/arm64/mm/fault.c-454-
arch/arm64/mm/fault.c:455:	if (efi_runtime_fixup_exception(regs, msg))
arch/arm64/mm/fault.c-456-		return;
]

369/4 2026/09/08 10:32 llm codeexpert
0m Model:
gemini-3.7-flash

Tokens:
							input: 59143
							output: 553
							thoughts: 2389
						

Thoughts:
**Analysis of Synchronous External Aborts (SEAs) and Futexes on ARM64**

Okay, so here's my understanding: I've been digging into how Synchronous External Aborts (SEAs) relate to memory types and futex operations, specifically within the context of ARM64 and the Linux kernel.

First, I looked at how the kernel handles SEAs.  I've found that when an SEA happens in kernel mode (EL1), it bypasses the normal exception handling paths and leads directly to a kernel panic (an `Oops`!) via `arm64_notify_die()` and `die()`. This is because `do_sea()` is called directly by `do_mem_abort()` and doesn't invoke `fixup_exception` as it should in some other cases, which is what would normally allow the kernel to recover.

Now, let's get down to the crux of the issue: why a `ldxr` (load-exclusive) instruction can trigger an SEA in some memory regions but not others. On ARM64, the memory attribute types are critical.  Memory mapped as `MT_DEVICE_*` (like `MT_DEVICE_nGnRE`) is treated as a *device* and, according to the ARM ARM, exclusive access instructions (like `LDXR`, `STXR`) are either CONSTRAINED UNPREDICTABLE or completely prohibited when accessing device memory. In these cases, the hardware *will* generate a Data Abort exception, specifically a Synchronous External Abort (SEA). This happens because peripherals are usually not designed to support the exclusive monitor protocol used by atomic operations. If an EL1 process tries to execute an `ldxr` on a pointer that points to this type of memory, boom: kernel crash.

However, `MT_NORMAL_NC` – which is what you get from `pgprot_writecombine` – is very different. It's for "Normal Non-cacheable" memory.  The ARM architecture *requires* that Normal memory, whether cacheable or not, supports all memory accesses, including unaligned and exclusive accesses like `LDXR` and `STXR`. The CPU monitors exclusivity with local and interconnect monitors. So, when the CPU executes an `ldxr` instruction on memory mapped as `MT_NORMAL_NC`, it uses the monitors to keep track of exclusive access and *doesn't* generate an SEA. Therefore, it's safe to use these operations on normal memory.

Now, I was specifically interested in the implications for DRM render nodes and futexes. When an unprivileged user mmaps a GPU buffer or VRAM through a render node (e.g., `/dev/dri/renderD128`), the DRM drivers use `pgprot_writecombine` (which is `MT_NORMAL_NC`). So, even if the user later passes the address to a futex system call, *it won't crash the kernel*. In private futex operations, the key is constructed from just the mm and virtual address, and the futex works by accessing memory normally. In futex operations that need exclusive access, like `FUTEX_LOCK_PI` which runs `futex_atomic_cmpxchg_inatomic` which executes `ldxr` and `stlxr` which are designed to work on the shared memory. Since it's normal memory, there's no SEA. Shared futexes are handled differently, calling `get_user_pages_fast()` which looks for pages backing the memory, VRAM doesn't have a backing page so `get_user_pages_fast()` fails and returns EFAULT back to the user without crashing the kernel. So, unless the user accidentally maps the memory with the wrong attributes, it will never crash.

I've rechecked to make sure my logic is sound. All the pieces fit, and the architectural specifications back it up.



370/4 2026/09/08 10:33 tool set-results
0m Args:
map[Answer:1. **Behavior of `ldxr` on `MT_NORMAL_NC` vs `MT_DEVICE_nGnRE`**:
   - `ldxr` on `MT_NORMAL_NC` (`pgprot_writecombine`) **does not** cause a Synchronous External Abort (SEA). `MT_NORMAL_NC` configures the MMU with **Normal Non-cacheable** memory attributes (MAIR index attribute `0x44`). In the ARMv8/ARMv9 architecture, all Normal memory (both cacheable and non-cacheable) supports exclusive accesses (`LDXR`/`STXR`), which are tracked by local and global/interconnect exclusive monitors.
   - In contrast, exclusive accesses to `MT_DEVICE_nGnRE` (or `MT_DEVICE_nGnRnE` / `pgprot_device` / `pgprot_noncached`) are targeted at **Device** memory. Under the ARM architecture, exclusive operations on Device memory are prohibited/CONSTRAINED UNPREDICTABLE; hardware implementations generate a Data Abort / Synchronous External Abort (SEA) because peripheral buses and device endpoints do not support exclusive monitors.

2. **DRM Render Node VRAM Mapping and `futex`**:
   - Calling `futex` on VRAM mapped via a DRM render node **will not** crash the kernel via SEA.
   - DRM render nodes map buffer objects (GEM/TTM) using `pgprot_writecombine` (`MT_NORMAL_NC`), not `MT_DEVICE_nGnRE`.
   - When the kernel executes `futex_atomic_cmpxchg_inatomic` (e.g., during `FUTEX_LOCK_PI` or `FUTEX_WAKE_OP`), the `ldxr`/`stlxr` instructions operate on `MT_NORMAL_NC` Normal memory, which executes normally and does not trigger an SEA.
   - For non-private/shared futex calls, `get_futex_key()` calls `get_user_pages_fast()`, which fails gracefully with `-EFAULT` on `VM_PFNMAP`/`VM_IO` VRAM buffers and safely returns `-EFAULT` to userspace.
   - While a true SEA occurring in kernel mode (EL1) on ARM64 does lead to `die()` (kernel Oops/panic) because `do_sea()` does not invoke exception table fixups, this condition is not triggered on `MT_NORMAL_NC` mappings.]

Results:
map[Answer:1. **Behavior of `ldxr` on `MT_NORMAL_NC` vs `MT_DEVICE_nGnRE`**:
   - `ldxr` on `MT_NORMAL_NC` (`pgprot_writecombine`) **does not** cause a Synchronous External Abort (SEA). `MT_NORMAL_NC` configures the MMU with **Normal Non-cacheable** memory attributes (MAIR index attribute `0x44`). In the ARMv8/ARMv9 architecture, all Normal memory (both cacheable and non-cacheable) supports exclusive accesses (`LDXR`/`STXR`), which are tracked by local and global/interconnect exclusive monitors.
   - In contrast, exclusive accesses to `MT_DEVICE_nGnRE` (or `MT_DEVICE_nGnRnE` / `pgprot_device` / `pgprot_noncached`) are targeted at **Device** memory. Under the ARM architecture, exclusive operations on Device memory are prohibited/CONSTRAINED UNPREDICTABLE; hardware implementations generate a Data Abort / Synchronous External Abort (SEA) because peripheral buses and device endpoints do not support exclusive monitors.

2. **DRM Render Node VRAM Mapping and `futex`**:
   - Calling `futex` on VRAM mapped via a DRM render node **will not** crash the kernel via SEA.
   - DRM render nodes map buffer objects (GEM/TTM) using `pgprot_writecombine` (`MT_NORMAL_NC`), not `MT_DEVICE_nGnRE`.
   - When the kernel executes `futex_atomic_cmpxchg_inatomic` (e.g., during `FUTEX_LOCK_PI` or `FUTEX_WAKE_OP`), the `ldxr`/`stlxr` instructions operate on `MT_NORMAL_NC` Normal memory, which executes normally and does not trigger an SEA.
   - For non-private/shared futex calls, `get_futex_key()` calls `get_user_pages_fast()`, which fails gracefully with `-EFAULT` on `VM_PFNMAP`/`VM_IO` VRAM buffers and safely returns `-EFAULT` to userspace.
   - While a true SEA occurring in kernel mode (EL1) on ARM64 does lead to `die()` (kernel Oops/panic) because `do_sea()` does not invoke exception table fixups, this condition is not triggered on `MT_NORMAL_NC` mappings.]

371/2 2026/09/08 10:33 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 44015
							output: 36
							thoughts: 568
						

Thoughts:
**My Analysis of Memory Mapping and the SEA Bug**

Okay, so I've been dissecting this SEA (Speculative Execution Attack) bug. My initial understanding is now solidified: it's not `MT_NORMAL_NC` that triggers it, but specifically the `MT_DEVICE_*` memory types. And since DRM render nodes utilize `MT_NORMAL_NC` (using `pgprot_writecombine`), they are thankfully NOT a pathway for this bug. That's a relief.

Now, I'm trying to figure out how these `MT_DEVICE_*` mappings – `MT_DEVICE_nGnRE` (pgprot_device) or `MT_DEVICE_nGnRnE` (pgprot_noncached) – are even accessed. The usual suspects come to mind: `/dev/mem`, `/sys/bus/pci/...`, `/proc/bus/pci/...`, UIO drivers, and VFIO drivers. But wait, all of these typically require root or specific group privileges. This is key.

My next question is whether an unprivileged user can somehow map these `MT_DEVICE_*` regions. The answer, as I suspect, is almost certainly no. Device memory mapping is a strictly privileged operation because it grants direct hardware access. This access, if uncontrolled, can bypass the IOMMU, cause system instability, and ultimately compromise security. Therefore, an unprivileged user *cannot* map this type of memory.

Consequently, since an unprivileged user can't map these memory types, they cannot trigger the SEA bug via a method like `futex`. The implications are significant: this bug isn't exploitable from unprivileged processes. And by extension, it's also not accessible from user namespaces, because user namespaces don't grant access to these protected device nodes or sysfs files.

I need to confirm this understanding, however. I'm going to exhaustively double-check for any unprivileged avenues to map `pgprot_device` or `pgprot_noncached` memory. I'm thinking of edge cases: can `mmap` of `/dev/zero` or a regular file provide a backdoor? No, that's just normal memory. What about mmap'ing a device node?

Are there any device nodes accessible to unprivileged users, but map as `pgprot_device`? I'm thinking of checking specific drivers like `evdev` (input devices). Nope, doesn't mmap or if it does, normal memory. `snd-pcm` (sound)? It's using `pgprot_writecombine` or regular memory. What about `fbdev` (framebuffer)? `/dev/fb0` is usually root:video, and accessible by the `video` group. Hmm, potential area.

I must examine the `fb_mmap` function in `drivers/video/fbdev/core/fbmem.c` to see how `fbdev`'s memory mapping is handled. This seems like a reasonable avenue for confirmation. I'm on the right track; I think.



372/2 2026/09/08 10:33 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:pgprot_ PathPrefix:drivers/video/fbdev/core/fbmem.c]

Results:
map[Output:]

373/2 2026/09/08 10:33 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 45281
							output: 37
							thoughts: 26
						

Thoughts:
Here's my take on the process, considering I'm an expert:

**Diving into the Framebuffer Memory Mapping**

Okay, so I need to get my hands dirty and understand how the framebuffer memory mapping is working under the hood. The obvious place to start digging is `drivers/video/fbdev/core/fbmem.c`. That file is the central hub for the framebuffer device core. It's where the critical functions related to memory management, specifically how the frame buffer is mapped into user space, should reside. I'm expecting to find the key functions for things like `mmap`, `munmap`, and related calls that handle the interaction between the kernel space framebuffer and a user-space application that needs to access it. I'll be looking for things like how physical memory is translated to virtual memory, any locking mechanisms used to prevent race conditions on memory accesses, and error handling related to memory allocation and deallocation within that context. I'll need to pay close attention to the data structures involved, like the `fb_info` struct, and how it's used to manage the framebuffer. This initial step is critical to forming a solid understanding of memory management in this subsystem.



374/2 2026/09/08 10:33 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:fb_mmap PathPrefix:drivers/video/fbdev/core/fbmem.c]

Results:
map[Output:]

375/2 2026/09/08 10:33 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 45608
							output: 31
							thoughts: 31
						

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

**Where Did That Come From?**

Okay, so I'm thinking about where this `fbmem.c` module actually resides. Memory is failing me for a moment, and instead of immediately jumping into a grep fest, let me quickly consider common locations. My gut feeling is telling me that it could be stashed in a few logical places.

It's likely not just floating out there, so it has to be a character device and, if I remember correctly, there's the `drivers/video/fbdev/core/` directory. Maybe it's in `fb_chrdev.c` or something related to it. That's a good starting point to check. I'll need to double check the kernel source, or look at how they're packaged for my specific kernel.



376/2 2026/09/08 10:33 tool grepper
0m Args:
map[Expression:fb_mmap PathPrefix:drivers/video/fbdev/]

Results:
map[Output:drivers/video/fbdev/68328fb.c=92=static int mc68x328fb_pan_display(struct fb_var_screeninfo *var,
drivers/video/fbdev/68328fb.c-93-			   struct fb_info *info);
drivers/video/fbdev/68328fb.c:94:static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/68328fb.c-95-
drivers/video/fbdev/68328fb.c=96=static const struct fb_ops mc68x328fb_ops = {
--
drivers/video/fbdev/68328fb.c-103-	__FB_DEFAULT_IOMEM_OPS_DRAW,
drivers/video/fbdev/68328fb.c:104:	.fb_mmap	= mc68x328fb_mmap,
drivers/video/fbdev/68328fb.c-105-};
--
drivers/video/fbdev/68328fb.c=363=static int mc68x328fb_pan_display(struct fb_var_screeninfo *var,
--
drivers/video/fbdev/68328fb.c-388-
drivers/video/fbdev/68328fb.c:389:static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/68328fb.c-390-{
--
drivers/video/fbdev/arcfb.c=439=static const struct fb_ops arcfb_ops = {
--
drivers/video/fbdev/arcfb.c-446-	.fb_ioctl 	= arcfb_ioctl,
drivers/video/fbdev/arcfb.c:447:	// .fb_mmap reqires deferred I/O
drivers/video/fbdev/arcfb.c-448-};
--
drivers/video/fbdev/atafb.c=233=static int *MV300_reg = MV300_reg_8bit;
--
drivers/video/fbdev/atafb.c-291- *	* perform fb specific mmap *
drivers/video/fbdev/atafb.c:292: *	int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/atafb.c-293- * } ;
--
drivers/video/fbdev/aty/atyfb_base.c=249=static int atyfb_compat_ioctl(struct fb_info *info, u_int cmd, u_long arg)
--
drivers/video/fbdev/aty/atyfb_base.c-255-#ifdef __sparc__
drivers/video/fbdev/aty/atyfb_base.c:256:static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/aty/atyfb_base.c-257-#endif
--
drivers/video/fbdev/aty/atyfb_base.c=300=static struct fb_ops atyfb_ops = {
--
drivers/video/fbdev/aty/atyfb_base.c-317-#ifdef __sparc__
drivers/video/fbdev/aty/atyfb_base.c:318:	.fb_mmap	= atyfb_mmap,
drivers/video/fbdev/aty/atyfb_base.c-319-#else
--
drivers/video/fbdev/aty/atyfb_base.c=1925=static int atyfb_sync(struct fb_info *info)
--
drivers/video/fbdev/aty/atyfb_base.c-1934-#ifdef __sparc__
drivers/video/fbdev/aty/atyfb_base.c:1935:static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/aty/atyfb_base.c-1936-{
--
drivers/video/fbdev/au1100fb.c=610=static int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi)
--
drivers/video/fbdev/au1100fb.c-652-
drivers/video/fbdev/au1100fb.c:653:/* fb_mmap
drivers/video/fbdev/au1100fb.c:654: * Map video memory in user space. We don't use the generic fb_mmap method mainly
drivers/video/fbdev/au1100fb.c-655- * to allow the use of the TLB streaming flag (CCA=6)
drivers/video/fbdev/au1100fb.c-656- */
drivers/video/fbdev/au1100fb.c:657:static int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
drivers/video/fbdev/au1100fb.c-658-{
--
drivers/video/fbdev/au1100fb.c=672=static const struct fb_ops au1100fb_ops = {
--
drivers/video/fbdev/au1100fb.c-678-	__FB_DEFAULT_IOMEM_OPS_DRAW,
drivers/video/fbdev/au1100fb.c:679:	.fb_mmap		= au1100fb_fb_mmap,
drivers/video/fbdev/au1100fb.c-680-};
--
drivers/video/fbdev/au1200fb.c=1201=static int au1200fb_fb_blank(int blank_mode, struct fb_info *fbi)
--
drivers/video/fbdev/au1200fb.c-1230-
drivers/video/fbdev/au1200fb.c:1231:/* fb_mmap
drivers/video/fbdev/au1200fb.c:1232: * Map video memory in user space. We don't use the generic fb_mmap
drivers/video/fbdev/au1200fb.c-1233- * method mainly to allow the use of the TLB streaming flag (CCA=6)
drivers/video/fbdev/au1200fb.c-1234- */
drivers/video/fbdev/au1200fb.c:1235:static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/au1200fb.c-1236-{
--
drivers/video/fbdev/au1200fb.c=1491=static const struct fb_ops au1200fb_fb_ops = {
--
drivers/video/fbdev/au1200fb.c-1500-	.fb_ioctl	= au1200fb_ioctl,
drivers/video/fbdev/au1200fb.c:1501:	.fb_mmap	= au1200fb_fb_mmap,
drivers/video/fbdev/au1200fb.c-1502-};
--
drivers/video/fbdev/bw2.c=32=static int bw2_blank(int, struct fb_info *);
drivers/video/fbdev/bw2.c-33-
drivers/video/fbdev/bw2.c:34:static int bw2_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/bw2.c-35-static int bw2_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/bw2.c=150=static const struct sbus_mmap_map bw2_mmap_map[] = {
--
drivers/video/fbdev/bw2.c-156-
drivers/video/fbdev/bw2.c:157:static int bw2_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/bw2.c-158-{
--
drivers/video/fbdev/bw2.c-160-
drivers/video/fbdev/bw2.c:161:	return sbusfb_mmap_helper(bw2_mmap_map,
drivers/video/fbdev/bw2.c-162-				  info->fix.smem_start, info->fix.smem_len,
--
drivers/video/fbdev/cg14.c=34=static int cg14_pan_display(struct fb_var_screeninfo *, struct fb_info *);
drivers/video/fbdev/cg14.c-35-
drivers/video/fbdev/cg14.c:36:static int cg14_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/cg14.c-37-static int cg14_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/cg14.c=237=static int cg14_setcolreg(unsigned regno,
--
drivers/video/fbdev/cg14.c-260-
drivers/video/fbdev/cg14.c:261:static int cg14_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/cg14.c-262-{
--
drivers/video/fbdev/cg14.c-264-
drivers/video/fbdev/cg14.c:265:	return sbusfb_mmap_helper(par->mmap_map,
drivers/video/fbdev/cg14.c-266-				  info->fix.smem_start, info->fix.smem_len,
--
drivers/video/fbdev/cg3.c=34=static int cg3_blank(int, struct fb_info *);
drivers/video/fbdev/cg3.c-35-
drivers/video/fbdev/cg3.c:36:static int cg3_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/cg3.c-37-static int cg3_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/cg3.c=212=static const struct sbus_mmap_map cg3_mmap_map[] = {
--
drivers/video/fbdev/cg3.c-220-
drivers/video/fbdev/cg3.c:221:static int cg3_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/cg3.c-222-{
--
drivers/video/fbdev/cg3.c-224-
drivers/video/fbdev/cg3.c:225:	return sbusfb_mmap_helper(cg3_mmap_map,
drivers/video/fbdev/cg3.c-226-				  info->fix.smem_start, info->fix.smem_len,
--
drivers/video/fbdev/cg6.c=40=static int cg6_pan_display(struct fb_var_screeninfo *, struct fb_info *);
drivers/video/fbdev/cg6.c-41-
drivers/video/fbdev/cg6.c:42:static int cg6_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/cg6.c-43-static int cg6_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/cg6.c=548=static const struct sbus_mmap_map cg6_mmap_map[] = {
--
drivers/video/fbdev/cg6.c-591-
drivers/video/fbdev/cg6.c:592:static int cg6_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/cg6.c-593-{
--
drivers/video/fbdev/cg6.c-595-
drivers/video/fbdev/cg6.c:596:	return sbusfb_mmap_helper(cg6_mmap_map,
drivers/video/fbdev/cg6.c-597-				  info->fix.smem_start, info->fix.smem_len,
--
drivers/video/fbdev/controlfb.c=693=static int controlfb_blank(int blank_mode, struct fb_info *info)
--
drivers/video/fbdev/controlfb.c-728- * for controlfb.
drivers/video/fbdev/controlfb.c:729: * Note there's no locking in here; it's done in fb_mmap() in fbmem.c.
drivers/video/fbdev/controlfb.c-730- */
drivers/video/fbdev/controlfb.c:731:static int controlfb_mmap(struct fb_info *info,
drivers/video/fbdev/controlfb.c-732-                       struct vm_area_struct *vma)
--
drivers/video/fbdev/controlfb.c=756=static const struct fb_ops controlfb_ops = {
--
drivers/video/fbdev/controlfb.c-764-	__FB_DEFAULT_IOMEM_OPS_DRAW,
drivers/video/fbdev/controlfb.c:765:	.fb_mmap	= controlfb_mmap,
drivers/video/fbdev/controlfb.c-766-};
--
drivers/video/fbdev/core/fb_chrdev.c=268=static long fb_compat_ioctl(struct file *file, unsigned int cmd,
--
drivers/video/fbdev/core/fb_chrdev.c-307-
drivers/video/fbdev/core/fb_chrdev.c:308:static int fb_mmap(struct file *file, struct vm_area_struct *vma)
drivers/video/fbdev/core/fb_chrdev.c-309-{
--
drivers/video/fbdev/core/fb_chrdev.c-315-
drivers/video/fbdev/core/fb_chrdev.c:316:	if (fb_WARN_ON_ONCE(info, !info->fbops->fb_mmap))
drivers/video/fbdev/core/fb_chrdev.c-317-		return -ENODEV;
--
drivers/video/fbdev/core/fb_chrdev.c-319-	mutex_lock(&info->mm_lock);
drivers/video/fbdev/core/fb_chrdev.c:320:	res = info->fbops->fb_mmap(info, vma);
drivers/video/fbdev/core/fb_chrdev.c-321-	mutex_unlock(&info->mm_lock);
--
drivers/video/fbdev/core/fb_chrdev.c=400=static const struct file_operations fb_fops = {
--
drivers/video/fbdev/core/fb_chrdev.c-407-#endif
drivers/video/fbdev/core/fb_chrdev.c:408:	.mmap = fb_mmap,
drivers/video/fbdev/core/fb_chrdev.c-409-	.open = fb_open,
--
drivers/video/fbdev/ep93xx-fb.c=290=static int ep93xxfb_check_var(struct fb_var_screeninfo *var,
--
drivers/video/fbdev/ep93xx-fb.c-309-
drivers/video/fbdev/ep93xx-fb.c:310:static int ep93xxfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/ep93xx-fb.c-311-{
--
drivers/video/fbdev/ep93xx-fb.c=407=static const struct fb_ops ep93xxfb_ops = {
--
drivers/video/fbdev/ep93xx-fb.c-414-	.fb_setcolreg	= ep93xxfb_setcolreg,
drivers/video/fbdev/ep93xx-fb.c:415:	.fb_mmap	= ep93xxfb_mmap,
drivers/video/fbdev/ep93xx-fb.c-416-};
--
drivers/video/fbdev/ffb.c=40=static int ffb_pan_display(struct fb_var_screeninfo *, struct fb_info *);
drivers/video/fbdev/ffb.c-41-
drivers/video/fbdev/ffb.c:42:static int ffb_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/ffb.c-43-static int ffb_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/ffb.c=685=static int ffb_blank(int blank, struct fb_info *info)
--
drivers/video/fbdev/ffb.c-724-
drivers/video/fbdev/ffb.c:725:static const struct sbus_mmap_map ffb_mmap_map[] = {
drivers/video/fbdev/ffb.c-726-	{
--
drivers/video/fbdev/ffb.c-863-
drivers/video/fbdev/ffb.c:864:static int ffb_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/ffb.c-865-{
--
drivers/video/fbdev/ffb.c-867-
drivers/video/fbdev/ffb.c:868:	return sbusfb_mmap_helper(ffb_mmap_map,
drivers/video/fbdev/ffb.c-869-				  par->physbase, par->fbsize,
--
drivers/video/fbdev/gbefb.c=900=static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
--
drivers/video/fbdev/gbefb.c-994-
drivers/video/fbdev/gbefb.c:995:static int gbefb_mmap(struct fb_info *info,
drivers/video/fbdev/gbefb.c-996-			struct vm_area_struct *vma)
--
drivers/video/fbdev/gbefb.c=1048=static const struct fb_ops gbefb_ops = {
--
drivers/video/fbdev/gbefb.c-1055-	__FB_DEFAULT_IOMEM_OPS_DRAW,
drivers/video/fbdev/gbefb.c:1056:	.fb_mmap	= gbefb_mmap,
drivers/video/fbdev/gbefb.c-1057-};
--
drivers/video/fbdev/leo.c=34=static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *);
drivers/video/fbdev/leo.c-35-
drivers/video/fbdev/leo.c:36:static int leo_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/leo.c-37-static int leo_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/leo.c=341=static const struct sbus_mmap_map leo_mmap_map[] = {
--
drivers/video/fbdev/leo.c-409-
drivers/video/fbdev/leo.c:410:static int leo_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/leo.c-411-{
--
drivers/video/fbdev/leo.c-413-
drivers/video/fbdev/leo.c:414:	return sbusfb_mmap_helper(leo_mmap_map,
drivers/video/fbdev/leo.c-415-				  info->fix.smem_start, info->fix.smem_len,
--
drivers/video/fbdev/omap/omapfb_main.c=1051=static int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd,
--
drivers/video/fbdev/omap/omapfb_main.c-1199-
drivers/video/fbdev/omap/omapfb_main.c:1200:static int omapfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/omap/omapfb_main.c-1201-{
--
drivers/video/fbdev/omap/omapfb_main.c=1609=static int omapfb_do_probe(struct platform_device *pdev,
--
drivers/video/fbdev/omap/omapfb_main.c-1687-	if (fbdev->ctrl->mmap != NULL)
drivers/video/fbdev/omap/omapfb_main.c:1688:		omapfb_ops.fb_mmap = omapfb_mmap;
drivers/video/fbdev/omap/omapfb_main.c-1689-	init_state++;
--
drivers/video/fbdev/omap2/omapfb/omapfb-main.c=1084=static const struct vm_operations_struct mmap_user_ops = {
--
drivers/video/fbdev/omap2/omapfb/omapfb-main.c-1088-
drivers/video/fbdev/omap2/omapfb/omapfb-main.c:1089:static int omapfb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
drivers/video/fbdev/omap2/omapfb/omapfb-main.c-1090-{
--
drivers/video/fbdev/omap2/omapfb/omapfb-main.c=1288=static const struct fb_ops omapfb_ops = {
--
drivers/video/fbdev/omap2/omapfb/omapfb-main.c-1298-	.fb_pan_display = omapfb_pan_display,
drivers/video/fbdev/omap2/omapfb/omapfb-main.c:1299:	.fb_mmap	= omapfb_mmap,
drivers/video/fbdev/omap2/omapfb/omapfb-main.c-1300-	.fb_setcolreg	= omapfb_setcolreg,
--
drivers/video/fbdev/p9100.c=32=static int p9100_blank(int, struct fb_info *);
drivers/video/fbdev/p9100.c-33-
drivers/video/fbdev/p9100.c:34:static int p9100_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/p9100.c-35-static int p9100_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/p9100.c=209=static const struct sbus_mmap_map p9100_mmap_map[] = {
--
drivers/video/fbdev/p9100.c-213-
drivers/video/fbdev/p9100.c:214:static int p9100_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/p9100.c-215-{
--
drivers/video/fbdev/p9100.c-217-
drivers/video/fbdev/p9100.c:218:	return sbusfb_mmap_helper(p9100_mmap_map,
drivers/video/fbdev/p9100.c-219-				  info->fix.smem_start, info->fix.smem_len,
--
drivers/video/fbdev/ps3fb.c=692=static int ps3fb_pan_display(struct fb_var_screeninfo *var,
--
drivers/video/fbdev/ps3fb.c-705-
drivers/video/fbdev/ps3fb.c:706:static int ps3fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/ps3fb.c-707-{
--
drivers/video/fbdev/ps3fb.c=937=static const struct fb_ops ps3fb_ops = {
--
drivers/video/fbdev/ps3fb.c-946-	__FB_DEFAULT_SYSMEM_OPS_DRAW,
drivers/video/fbdev/ps3fb.c:947:	.fb_mmap	= ps3fb_mmap,
drivers/video/fbdev/ps3fb.c-948-	.fb_blank	= ps3fb_blank,
--
drivers/video/fbdev/sa1100fb.c=529=static int sa1100fb_blank(int blank, struct fb_info *info)
--
drivers/video/fbdev/sa1100fb.c-557-
drivers/video/fbdev/sa1100fb.c:558:static int sa1100fb_mmap(struct fb_info *info,
drivers/video/fbdev/sa1100fb.c-559-			 struct vm_area_struct *vma)
--
drivers/video/fbdev/sa1100fb.c=578=static const struct fb_ops sa1100fb_ops = {
--
drivers/video/fbdev/sa1100fb.c-586-	__FB_DEFAULT_IOMEM_OPS_DRAW,
drivers/video/fbdev/sa1100fb.c:587:	.fb_mmap	= sa1100fb_mmap,
drivers/video/fbdev/sa1100fb.c-588-};
--
drivers/video/fbdev/sbuslib.c=33=EXPORT_SYMBOL(sbusfb_fill_var);
drivers/video/fbdev/sbuslib.c-34-
drivers/video/fbdev/sbuslib.c:35:static unsigned long sbusfb_mmapsize(long size, unsigned long fbsize)
drivers/video/fbdev/sbuslib.c-36-{
--
drivers/video/fbdev/sbuslib.c-41-
drivers/video/fbdev/sbuslib.c:42:int sbusfb_mmap_helper(const struct sbus_mmap_map *map,
drivers/video/fbdev/sbuslib.c-43-		       unsigned long physbase,
--
drivers/video/fbdev/sbuslib.c-71-			if (map[i].voff == off+page) {
drivers/video/fbdev/sbuslib.c:72:				map_size = sbusfb_mmapsize(map[i].size, fbsize);
drivers/video/fbdev/sbuslib.c-73-#ifdef __sparc_v9__
--
drivers/video/fbdev/sbuslib.c-99-}
drivers/video/fbdev/sbuslib.c:100:EXPORT_SYMBOL(sbusfb_mmap_helper);
drivers/video/fbdev/sbuslib.c-101-
--
drivers/video/fbdev/sbuslib.h=20=extern void sbusfb_fill_var(struct fb_var_screeninfo *var,
drivers/video/fbdev/sbuslib.h-21-			    struct device_node *dp, int bpp);
drivers/video/fbdev/sbuslib.h:22:extern int sbusfb_mmap_helper(const struct sbus_mmap_map *map,
drivers/video/fbdev/sbuslib.h-23-			      unsigned long physbase, unsigned long fbsize,
--
drivers/video/fbdev/sbuslib.h=29=int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
--
drivers/video/fbdev/sbuslib.h-54-#define __FB_DEFAULT_SBUS_OPS_MMAP(__prefix) \
drivers/video/fbdev/sbuslib.h:55:	.fb_mmap	= __prefix ## _sbusfb_mmap
drivers/video/fbdev/sbuslib.h-56-
--
drivers/video/fbdev/sh_mobile_lcdcfb.c=1496=static const struct fb_ops sh_mobile_lcdc_overlay_ops = {
--
drivers/video/fbdev/sh_mobile_lcdcfb.c-1504-	.fb_set_par	= sh_mobile_lcdc_overlay_set_par,
drivers/video/fbdev/sh_mobile_lcdcfb.c:1505:	.fb_mmap	= sh_mobile_lcdc_overlay_mmap,
drivers/video/fbdev/sh_mobile_lcdcfb.c-1506-};
--
drivers/video/fbdev/sh_mobile_lcdcfb.c=1963=static const struct fb_ops sh_mobile_lcdc_ops = {
--
drivers/video/fbdev/sh_mobile_lcdcfb.c-1976-	.fb_set_par	= sh_mobile_lcdc_set_par,
drivers/video/fbdev/sh_mobile_lcdcfb.c:1977:	.fb_mmap	= sh_mobile_lcdc_mmap,
drivers/video/fbdev/sh_mobile_lcdcfb.c-1978-};
--
drivers/video/fbdev/skeletonfb.c=636=static const struct fb_ops xxxfb_ops = {
--
drivers/video/fbdev/skeletonfb.c-652-	.fb_ioctl	= xxxfb_ioctl,
drivers/video/fbdev/skeletonfb.c:653:	.fb_mmap	= xxxfb_mmap,
drivers/video/fbdev/skeletonfb.c-654-};
--
drivers/video/fbdev/smscufx.c=1250=static const struct fb_ops ufx_ops = {
--
drivers/video/fbdev/smscufx.c-1254-	__FB_DEFAULT_DEFERRED_OPS_DRAW(ufx_ops),
drivers/video/fbdev/smscufx.c:1255:	.fb_mmap = ufx_ops_mmap,
drivers/video/fbdev/smscufx.c-1256-	.fb_ioctl = ufx_ops_ioctl,
--
drivers/video/fbdev/tcx.c=35=static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *);
drivers/video/fbdev/tcx.c-36-
drivers/video/fbdev/tcx.c:37:static int tcx_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
drivers/video/fbdev/tcx.c-38-static int tcx_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
--
drivers/video/fbdev/tcx.c=239=static const struct sbus_mmap_map __tcx_mmap_map[TCX_MMAP_ENTRIES] = {
--
drivers/video/fbdev/tcx.c-294-
drivers/video/fbdev/tcx.c:295:static int tcx_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/tcx.c-296-{
--
drivers/video/fbdev/tcx.c-298-
drivers/video/fbdev/tcx.c:299:	return sbusfb_mmap_helper(par->mmap_map,
drivers/video/fbdev/tcx.c-300-				  info->fix.smem_start, info->fix.smem_len,
--
drivers/video/fbdev/udlfb.c=1175=static const struct fb_ops dlfb_ops = {
--
drivers/video/fbdev/udlfb.c-1179-	__FB_DEFAULT_DEFERRED_OPS_DRAW(dlfb_ops),
drivers/video/fbdev/udlfb.c:1180:	.fb_mmap = dlfb_ops_mmap,
drivers/video/fbdev/udlfb.c-1181-	.fb_ioctl = dlfb_ops_ioctl,
--
drivers/video/fbdev/vfb.c=76=static int vfb_pan_display(struct fb_var_screeninfo *var,
drivers/video/fbdev/vfb.c-77-			   struct fb_info *info);
drivers/video/fbdev/vfb.c:78:static int vfb_mmap(struct fb_info *info,
drivers/video/fbdev/vfb.c-79-		    struct vm_area_struct *vma);
--
drivers/video/fbdev/vfb.c=81=static const struct fb_ops vfb_ops = {
--
drivers/video/fbdev/vfb.c-88-	__FB_DEFAULT_SYSMEM_OPS_DRAW,
drivers/video/fbdev/vfb.c:89:	.fb_mmap	= vfb_mmap,
drivers/video/fbdev/vfb.c-90-};
--
drivers/video/fbdev/vfb.c=357=static int vfb_pan_display(struct fb_var_screeninfo *var,
--
drivers/video/fbdev/vfb.c-381-
drivers/video/fbdev/vfb.c:382:static int vfb_mmap(struct fb_info *info,
drivers/video/fbdev/vfb.c-383-		    struct vm_area_struct *vma)
--
drivers/video/fbdev/vt8500lcdfb.c=242=static const struct fb_ops vt8500lcd_ops = {
--
drivers/video/fbdev/vt8500lcdfb.c-253-	.fb_blank	= vt8500lcd_blank,
drivers/video/fbdev/vt8500lcdfb.c:254:	// .fb_mmap needs DMA mmap
drivers/video/fbdev/vt8500lcdfb.c-255-};
]

377/2 2026/09/08 10:33 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 54987
							output: 43
							thoughts: 79
						

Thoughts:
Here's my take on the thought process:

**Diving into the Framebuffer Character Device Driver**

Okay, so I need to understand the memory mapping process for the framebuffer. My first thought is to check out the `fb_mmap` function. Right, let's look in the core framebuffer device driver code. Specifically, I'm thinking either `drivers/video/fbdev/core/fb_chrdev.c` or possibly `drivers/video/fbdev/core/fbmem.c`. Ah, got it – `fb_mmap` is actually defined within `drivers/video/fbdev/core/fb_chrdev.c`. Excellent. Time to crack open that file and get reading! Let's examine that `fb_mmap` implementation.



378/2 2026/09/08 10:33 tool read-file
0m Args:
map[File:drivers/video/fbdev/core/fb_chrdev.c FirstLine:308 LineCount:50]

Results:
map[Contents: 308:	static int fb_mmap(struct file *file, struct vm_area_struct *vma)
 309:	{
 310:		struct fb_info *info = file_fb_info(file);
 311:		int res;
 312:	
 313:		if (!info)
 314:			return -ENODEV;
 315:	
 316:		if (fb_WARN_ON_ONCE(info, !info->fbops->fb_mmap))
 317:			return -ENODEV;
 318:	
 319:		mutex_lock(&info->mm_lock);
 320:		res = info->fbops->fb_mmap(info, vma);
 321:		mutex_unlock(&info->mm_lock);
 322:	
 323:		return res;
 324:	}
 325:	
 326:	static int fb_open(struct inode *inode, struct file *file)
 327:	__acquires(&info->lock)
 328:	__releases(&info->lock)
 329:	{
 330:		int fbidx = iminor(inode);
 331:		struct fb_info *info;
 332:		int res = 0;
 333:	
 334:		info = get_fb_info(fbidx);
 335:		if (!info) {
 336:			request_module("fb%d", fbidx);
 337:			info = get_fb_info(fbidx);
 338:			if (!info)
 339:				return -ENODEV;
 340:		}
 341:		if (IS_ERR(info))
 342:			return PTR_ERR(info);
 343:	
 344:		lock_fb_info(info);
 345:		if (!try_module_get(info->fbops->owner)) {
 346:			res = -ENODEV;
 347:			goto out;
 348:		}
 349:		file->private_data = info;
 350:		if (info->fbops->fb_open) {
 351:			res = info->fbops->fb_open(info, 1);
 352:			if (res)
 353:				module_put(info->fbops->owner);
 354:		}
 355:	#ifdef CONFIG_FB_DEFERRED_IO
 356:		if (info->fbdefio)
 357:			fb_deferred_io_open(info, inode, file);
]

379/2 2026/09/08 10:33 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 55998
							output: 37
							thoughts: 217
						

Thoughts:
**Dissecting the Framebuffer Memory Mapping Logic**

Okay, so I'm trying to figure out how framebuffer memory mapping works in the kernel, specifically how `fb_mmap` is handled. The initial assumption, which seems logical, is that `fb_mmap` is a direct function call to `info->fbops->fb_mmap`, which makes sense. I see drivers utilize functions like `fb_deferred_io_mmap` or define their custom mapping routines.

My initial thought was that if the driver doesn't provide a specific `fb_mmap` implementation in the `fbops` structure, a default mechanism is used, likely in the core framebuffer code. I was wrong, that's not the case. It returns `-ENODEV`.

Alright, I remember seeing `fb_mmap` mentioned in `drivers/video/fbdev/core/fbmem.c`, but wait... wasn't that moved? Let me double-check... Yes, it appears to have been relocated to `fb_chrdev.c`. Then, `fb_deferred_io_mmap` handles pages like normal memory mapping, that makes sense.

So now, let's circle back to `drivers/video/fbdev/core/fb_chrdev.c`. Ah, there it is! `fb_mmap` in `fb_chrdev.c` *does* simply call `info->fbops->fb_mmap`.

Finally, it seems I need to check `drivers/video/fbdev/core/fbmem.c` to see if there is an `fb_mmap` function. Let's see if this old function is still lurking.



380/2 2026/09/08 10:33 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:fb_mmap PathPrefix:drivers/video/fbdev/core/fbmem.c]

Results:
map[Output:]

381/2 2026/09/08 10:33 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 56628
							output: 31
							thoughts: 233
						

Thoughts:
**Navigating the Framebuffer Driver Landscape**

Okay, so I remember `fb_mmap` got shifted over to `fb_chrdev.c`. Right, let's just make sure that's the current location. Quick check in `drivers/video/fbdev/core/fb_mmap.c`... nope. Okay, maybe in `drivers/video/fbdev/core/fb_io.c`... still no luck. Back to `drivers/video/fbdev/core/fb_chrdev.c` then. Ah, yes, here it is. Wait a minute, I see `fb_mmap` in `fb_chrdev.c` calls `info->fbops->fb_mmap`. Okay, so it defers to the framebuffer operations struct. Interesting.

So what's the default behavior if the driver doesn't provide its own? Many framebuffer drivers *do* use the one from `drivers/video/fbdev/core/fb_chrdev.c`, right? Let me double-check... no, they all seem to override the function. Okay, let me go back to `drivers/video/fbdev/core/fb_chrdev.c` and search for the symbol "fb_mmap". Hmm, there isn't a default? That's unexpected. Alright, it looks like it's time to dig into `include/linux/fb.h` and see what's actually going on.



382/2 2026/09/08 10:33 tool grepper
0m Args:
map[Expression:fb_mmap PathPrefix:include/linux/fb.h]

Results:
map[Output:include/linux/fb.h=242=struct fb_ops {
--
include/linux/fb.h-297-	/* perform fb specific mmap */
include/linux/fb.h:298:	int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);
include/linux/fb.h-299-
--
include/linux/fb.h=444=struct fb_info {
--
include/linux/fb.h-453-	struct mutex lock;		/* Lock for open/release/ioctl funcs */
include/linux/fb.h:454:	struct mutex mm_lock;		/* Lock for fb_mmap and smem_* fields */
include/linux/fb.h-455-	struct fb_var_screeninfo var;	/* Current var */
--
include/linux/fb.h=549=int fb_io_mmap(struct fb_info *info, struct vm_area_struct *vma);
--
include/linux/fb.h-560-#define __FB_DEFAULT_IOMEM_OPS_MMAP \
include/linux/fb.h:561:	.fb_mmap	= fb_io_mmap
include/linux/fb.h-562-
--
include/linux/fb.h=659=extern int fb_deferred_io_fsync(struct file *file, loff_t start,
--
include/linux/fb.h-727-#define __FB_DEFAULT_DEFERRED_OPS_MMAP(__prefix) \
include/linux/fb.h:728:	.fb_mmap	= fb_deferred_io_mmap
include/linux/fb.h-729-
]

383/2 2026/09/08 10:33 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 57646
							output: 35
							thoughts: 48
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as a first-person expert summary:

**Working Through a Memory Mapping Configuration**

Right, so it looks like `fb_io_mmap` is, by default, the mechanism being used for IOMEM access. That makes sense, but I need to confirm the specifics of its implementation. My immediate next step is to drill down into the source code, specifically to `drivers/video/fbdev/core/fb_io.c`. I need to understand exactly how `fb_io_mmap` is handling the memory mapping, the potential pitfalls and limitations it might have, and if this could be the root cause of the behavior I am seeing. I'll need to check the mapping flags, error handling, and any synchronization mechanisms to gain a better understanding of the overall picture. This is a common and usually performant approach. The trick is always in the details.



384/2 2026/09/08 10:34 tool grepper
0m Args:
map[Expression:fb_io_mmap PathPrefix:drivers/video/fbdev/core/]

Results:
map[Output:drivers/video/fbdev/core/fb_io_fops.c=164=EXPORT_SYMBOL(fb_io_write);
drivers/video/fbdev/core/fb_io_fops.c-165-
drivers/video/fbdev/core/fb_io_fops.c:166:int fb_io_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/core/fb_io_fops.c-167-{
--
drivers/video/fbdev/core/fb_io_fops.c-193-}
drivers/video/fbdev/core/fb_io_fops.c:194:EXPORT_SYMBOL(fb_io_mmap);
drivers/video/fbdev/core/fb_io_fops.c-195-
]

385/2 2026/09/08 10:34 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 58145
							output: 45
							thoughts: 32
						

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

**Diving into `fb_io_mmap`**

Alright, let's get down to it. Time to dissect `fb_io_mmap`. Specifically, I need to focus on its implementation within `drivers/video/fbdev/core/fb_io_fops.c`. This is where the core memory mapping functionality for framebuffer devices should reside. I want to understand how user-space processes get access to the frame buffer's memory, so I need to go through this code. There's probably a lot of device-specific setup in here, or maybe it's abstracted better than I recall. I'm going to pay close attention to the interaction between the kernel virtual addresses and the physical frame buffer memory. I should also look for how error checking is handled; buffer sizes and permissions have to be nailed down tightly when you're dealing with direct memory access. I'm also going to check for the locking mechanisms; concurrency is a real concern in this area. I hope it handles potential race conditions between multiple user-space clients. Finally, I'll keep an eye out for any memory management implications or potential for resource leaks. I want to see if this design takes into account specific hardware constraints or is a more general-purpose implementation. Let's see what's what.



386/2 2026/09/08 10:34 tool read-file
0m Args:
map[File:drivers/video/fbdev/core/fb_io_fops.c FirstLine:166 LineCount:30]

Results:
map[Contents: 166:	int fb_io_mmap(struct fb_info *info, struct vm_area_struct *vma)
 167:	{
 168:		unsigned long start = info->fix.smem_start;
 169:		u32 len = info->fix.smem_len;
 170:		unsigned long mmio_pgoff = PAGE_ALIGN((start & ~PAGE_MASK) + len) >> PAGE_SHIFT;
 171:	
 172:		if (info->flags & FBINFO_VIRTFB)
 173:			fb_warn_once(info, "Framebuffer is not in I/O address space.");
 174:	
 175:		/*
 176:		 * This can be either the framebuffer mapping, or if pgoff points
 177:		 * past it, the mmio mapping.
 178:		 */
 179:		if (vma->vm_pgoff >= mmio_pgoff) {
 180:			if (info->var.accel_flags)
 181:				return -EINVAL;
 182:	
 183:			vma->vm_pgoff -= mmio_pgoff;
 184:			start = info->fix.mmio_start;
 185:			len = info->fix.mmio_len;
 186:		}
 187:	
 188:		vma->vm_page_prot = vma_get_page_prot(vma);
 189:		vma->vm_page_prot = pgprot_framebuffer(vma->vm_page_prot, vma->vm_start,
 190:						       vma->vm_end, start);
 191:	
 192:		return vm_iomap_memory(vma, start, len);
 193:	}
 194:	EXPORT_SYMBOL(fb_io_mmap);
 195:	
]

387/2 2026/09/08 10:34 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59038
							output: 31
							thoughts: 26
						

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

**Analyzing `pgprot_framebuffer` on ARM64**

Alright, so the code's using `pgprot_framebuffer`. Right away, my gears start turning. I need to quickly refresh my understanding of what that protection code means, especially in the context of ARM64. Is it a standard framebuffer protection setting? Does it align with my expectations for memory mapping in this architecture? I need to quickly recall the implications of `pgprot_framebuffer` on the page table entries, cache behavior, and potential for device-specific optimizations on ARM64. Are there any known errata or specific hardware considerations I need to keep in mind, regarding this mapping for a framebuffer on this platform? Time to check the specifics.



388/2 2026/09/08 10:34 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:pgprot_framebuffer PathPrefix:arch/arm64/]

Results:
map[Output:]

389/2 2026/09/08 10:34 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59279
							output: 31
							thoughts: 20
						

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

**Diving into the Generic Assembly Code**

Okay, time to get this sorted. I need to refresh my memory on the `pgprot_framebuffer` macro. I know it's related to the framebuffer, which points me towards memory management and probably specific page table entries or protections. Since it's generic, it's likely defined in `include/asm-generic/`. That location makes sense; it'll probably have the architecture-independent definition, before the architecture-specific overrides come into play. I need to understand exactly how this macro configures the memory protection for framebuffer access. Let's go take a look and get this sorted.



390/2 2026/09/08 10:34 tool grepper
0m Args:
map[Expression:pgprot_framebuffer PathPrefix:include/asm-generic/]

Results:
map[Output:include/asm-generic/video.h=15=struct device;
include/asm-generic/video.h-16-
include/asm-generic/video.h:17:#ifndef pgprot_framebuffer
include/asm-generic/video.h:18:#define pgprot_framebuffer pgprot_framebuffer
include/asm-generic/video.h:19:static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
include/asm-generic/video.h-20-					  unsigned long vm_start, unsigned long vm_end,
]

391/2 2026/09/08 10:34 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59631
							output: 36
							thoughts: 23
						

Thoughts:
Here's my summary, as though I'm reading and processing the provided text:

**Diving into the Framebuffer Protection Macros**

Okay, time to get into the nitty-gritty. I need to take a look at `pgprot_framebuffer`. I know it's defined within `include/asm-generic/video.h`, which suggests it's a generic macro used across architectures. That tells me this isn't something specific to a single hardware platform, but rather a standard way of setting page protection for framebuffer memory. I'm guessing it's designed to handle the typical read/write/execute permissions needed for displaying graphics, but I'll need to confirm that. It's probably responsible for setting up the memory mappings in the page table entries for the framebuffer, so the kernel can properly interact with the graphics hardware. Let's see how it's defined and how it's used. This should give me a good insight into the core principles of how the kernel manages framebuffer memory protections.



392/2 2026/09/08 10:34 tool read-file
0m Args:
map[File:include/asm-generic/video.h FirstLine:17 LineCount:10]

Results:
map[Contents:  17:	#ifndef pgprot_framebuffer
  18:	#define pgprot_framebuffer pgprot_framebuffer
  19:	static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
  20:						  unsigned long vm_start, unsigned long vm_end,
  21:						  unsigned long offset)
  22:	{
  23:		return pgprot_writecombine(prot);
  24:	}
  25:	#endif
  26:	
]

393/2 2026/09/08 10:34 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 60046
							output: 66
							thoughts: 2281
						

Thoughts:
**Bug Analysis: SEA via futex and Device Memory**

Okay, let's break this down systematically. My initial thought was: `pgprot_framebuffer` defaults to `pgprot_writecombine`, and we know `pgprot_writecombine` (MT_NORMAL_NC) *doesn't* cause SEA on ARM64. So framebuffer mappings are safe. But, the question now is, is there *any* scenario where an unprivileged user gets to play with `pgprot_device` or `pgprot_noncached`? UIO, VFIO, sysfs PCI BARs, `/dev/mem` - all require root. So, there is **no** direct path for an unprivileged process to hit `pgprot_device` memory. That means user namespaces are also out, since they don't magically grant access to root-owned devices.

The bottom line is this: the bug *is* a Synchronous External Abort (SEA) caused by `ldxr` (via `futex`) on Device memory (`MT_DEVICE_nGnRE` or similar). Device memory doesn't like exclusive accesses, and the architecture says "boom" when that happens, specifically when hitting the bus (like PCIe). The SEA triggers `do_sea()`, which doesn't use `fixup_exception()`, and panics the kernel via `die()`. However, *mapping* Device memory requires privilege. While unprivileged users *can* map VRAM via DRM render nodes, it uses `pgprot_writecombine` which is Normal Non-Cacheable memory. Exclusive accesses on this type of memory are supported, so no SEA. So, no trigger for unprivileged users.

Let's double-check any other possible ways an unprivileged user could trigger this. What about `mmap` of a device node with `pgprot_noncached` that is accessible? Usually not possible. Exposing `pgprot_noncached` to unprivileged users is risky. Thus, it is safe to assume this cannot be accessed.

So, let's summarize the dimensions: Exploitable: No (just a panic). DoS: Yes (kernel panic). Unprivileged: No. UserNamespace: No. VMGuestTrigger, VMHostTrigger, NetworkTrigger, RemoteTrigger, PeripheralTrigger, FilesystemTrigger: all No.

However, can we ensure that there's no way `futex` on `MT_NORMAL_NC` (pgprot_writecombine) *does* cause SEA? Codeexpert said: "ldxr on MT_NORMAL_NC (pgprot_writecombine) does not cause a Synchronous External Abort (SEA). MT_NORMAL_NC configures the MMU with Normal Non-cacheable memory attributes... all Normal memory supports exclusive accesses". So that's safe.

The only way to trigger this is to map `MT_DEVICE_*` memory and call `futex`. Since mapping this requires root, no chance for unprivileged users.

But, what about the reproducer code that uses `mmap` on `/sys/bus/pci/devices/.../resource0`? It mounts sysfs. Syzkaller is running this in a user namespace, which has `CAP_SYS_ADMIN`, but even in a user namespace, the files will still be owned by root, which is the global root and is not mapped to the user namespace unless created by root (i.e., syzkaller is running as root). So, it works because syzkaller is root on the test VM. If an unprivileged user tried this, they'd get `-EACCES` on `openat`, which is what's expected.

Let's verify this, again. If a file is owned by global root (UID 0), mode 0600. In an unprivileged user namespace, UID 0 is mapped to the user's UID. The file's UID (global 0) is *unmapped*, so it appears as `overflowuid`. The process' fsuid is the user's local UID. The DAC check has to check if the file's UID is mapped; and the user has `CAP_DAC_OVERRIDE` in the user namespace. But, the check fails, because the global 0 UID is not mapped. Thus `capable_wrt_inode_uidgid` will return false and `-EACCES` will be the response.

So, the bug is definitely NOT accessible from unprivileged processes or user namespaces.

What about unmapped addresses passed to `futex`? `access_ok()` checks if it's within `TASK_SIZE`. Then `futex_atomic_cmpxchg_inatomic` does `ldxr`. If unmapped, a Translation Fault occurs. Handled by `do_page_fault()`. Kernel mode checks


394/2 2026/09/08 10:35 tool set-results
0m Args:
map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]

Results:
map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]

395/2 2026/09/08 10:35 llm expert
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 63483
							output: 725
							thoughts: 330
						

Thoughts:
**Final Reasoning on the Synchronous External Abort Bug**

Okay, here's the breakdown of this SEA issue. The results are in, so let's synthesize this concisely. We're dealing with a Synchronous External Abort (SEA), and it's all down to an `ldxr` instruction being executed on Device memory. Specifically, the `futex` system call is the culprit, as it uses `ldxr` internally on a user-provided address. The key vulnerability is that if that address happens to point to memory that's been mapped as Device memory (like with `MT_DEVICE_nGnRE` attributes), the ARM architecture throws a fit. Exclusive accesses are simply not supported for Device memory.

The interconnect, like PCIe, rejects the transaction and throws a Synchronous External Abort. This SEA triggers the `do_sea()` handler, which, being a severe hardware error, promptly calls `die()`. No exception fixup, no recovery, just immediate kernel panic or task termination. That's the bad news.

Here's the critical point: this isn't a vulnerability an unprivileged user can just trip. Mapping Device memory is a *privileged* operation. You can't just get this through sysfs, `/dev/mem`, UIO, or VFIO. DRM render nodes might give you VRAM mappings, but those are safe `pgprot_writecombine` (`MT_NORMAL_NC`) which *do* allow exclusive accesses.

So, this bug is limited to a privileged user (i.e. root) who has the ability to map this sort of Device memory. It's a DoS, a kernel panic, for sure, but there's no way to escalate privileges or leak information. It's a hardware exception that immediately halts the process.



396/1 2026/09/08 10:35 action format-explanation
0m Results:
map[Explanation:**Analysis of the Bug:**

The bug is a Synchronous External Abort (SEA) on ARM64, triggered by executing
an exclusive load instruction (`ldxr`) on memory mapped as Device memory.

1. **Root Cause:**
   The `futex` system call performs atomic operations on user-provided memory
   addresses using Load-Exclusive (`ldxr`) and Store-Exclusive (`stlxr`)
   instructions. If a user maps a PCI Base Address Register (BAR) or other
   peripheral memory into their address space (which is mapped as Device memory,
   e.g., `MT_DEVICE_nGnRE`), and passes that address to `futex`, the CPU
   attempts an exclusive read from the device.
   Under the ARM architecture, exclusive accesses to Device memory are not
   supported (they lack an exclusive monitor). When the transaction reaches the
   system interconnect (e.g., the PCIe Root Complex), it is rejected, and the
   CPU raises a Synchronous External Abort (SEA).
   In the Linux kernel, SEAs are handled by `do_sea()`. Unlike normal page
   faults or alignment faults, `do_sea()` treats the abort as a severe hardware
   error (machine check). It does not attempt to recover via exception fixup
   tables (`fixup_exception()`) and instead directly calls `die()`, which panics
   the kernel or kills the task.

2. **Exploitability:**
   This bug is **not exploitable** for privilege escalation, memory corruption,
   or information leaks. It is a hardware-level bus error that immediately
   invokes the kernel's `die()` handler, halting execution. It strictly results
   in a Denial of Service (DoS).

3. **Accessibility (Unprivileged / User Namespaces):**
   This bug is **not accessible to unprivileged users**, even within user
   namespaces.
   To trigger the bug, a process must map Device memory (`pgprot_device` or
   `pgprot_noncached`) into its address space. Access to Device memory is
   strictly privileged:
   - The reproducer uses `/sys/bus/pci/devices/.../resource0`, which is owned by
   `root:root` with `0600` permissions.
   - Other vectors like `/dev/mem`, UIO, or VFIO also require root privileges or
   specific group access not granted to typical unprivileged users.
   - If an unprivileged user creates a user namespace and mounts `sysfs`, the
   PCI resource files will still appear as owned by the unmapped global root
   (e.g., `nobody` or `overflowuid`). The user's `CAP_DAC_OVERRIDE` within the
   namespace does not grant access to files owned by unmapped UIDs, so the
   `openat` syscall will fail with `-EACCES`.
   - While unprivileged users *can* map GPU VRAM via DRM render nodes (e.g.,
   `/dev/dri/renderD*`), DRM drivers map VRAM using `pgprot_writecombine`
   (`MT_NORMAL_NC` - Normal Non-Cacheable memory). The ARM architecture fully
   supports exclusive accesses on Normal Non-Cacheable memory, so calling
   `futex` on DRM VRAM executes safely and does not generate a SEA.

**Conclusion:**
This is a privileged-only Denial of Service (DoS) bug. A root user can crash the
system by mapping a PCI BAR and calling `futex` on it, but unprivileged
processes cannot reach the vulnerable state.]

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)