summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
6 daysMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds
Pull KVM updates from Paolo Bonzini: "ARM: - pKVM state isolation: years after pKVM started being enabled upstream, we finally get the basics in the form of state isolation. The vcpu state is now off-limit for the host for protected VMs - pKVM also grows a hypervisor-private memory allocator, allowing it to deal with sub-page allocation, much like everywhere else - pKVM also lands a trace_printk() equivalent, which hopefully will make debugging a bit easier - First shot at annotating portions of the KVM/arm64 code to be extracted and built on s390. The real fun is yet to come - Allow pre-faulting of stage-2 canonical mappings from userspace, joining x86 and s390 in implementing this feature - Add a reverse mapping infrastructure for shadow stage-2, significantly improving performance when MMU notifiers kick in, and avoiding full unmap of all shadow tables for this VM - Next step of GICv5 enablement, adding support for the IRS block, and providing both SPI and LPI support. This is the first point where KVM/arm64 can support an SMP GICv5 guest - As a preliminary to eventually enabling CCA, add a bunch of infrastructure to KVM/arm64, splitting some of the basic operations into individual backends (normal VM, normal pKVM VM, protected pKVM VM). This allows CCA to later slot in without polluting the rest of KVM with its firmware-driven nonsense - Make ID registers immutable from the point where a vcpu is able to run, even if it fails to run. This prevents KVM from sampling untrusted values - Restore some type checking to the EL2 object. KVM/arm64 originally had some strong type checking between the kernel and the EL2 object, but lost it along the way when the private hypercall interface was (somewhat pointlessly) converted to SMCCC. Type checking is back, syscall style, and with added sparse goodies - Expand the FFA support to FFA_NOTIFICATION_*, and add some sanitisation of the protocol that pKVM relays to the "trusted" runtime - Make GICv3 RD assignment more robust to userspace nonsense - Convert the remaining MMU fault handler backends to kvm_s2_fault_vma_info and co., fixing a number of bugs in the process - Fix the SError/SEA selftests to be both more robust and less braindead - Fix a smattering of documentation bugs, some of them as a result of our AI friends spitting out credible assertions based on non-existing symbols - The usual collection of low impact bug fixes (SMCCC, timers, PMU) Loongarch: - Add separate vmid support - Simplify MSI interrupt injection - Add crash hypercall support - Allow to set pv_feature until vCPU run - Enable HW page table walk automatically in selftests s390: - rework page allocation for secure guest variable storage - Selftests and documentation improvements - Replace get_zeroed_page with kzalloc - Fix corner cases of floating interrupt injection - Initial arm64 on s390 support x86: - Clean up the handling of vcpu->arch.xen.long_mode to be consistent and correctly handle 32-bit/64-bit alignment, and various other bug fixes have accumulated over the months since v1 - Grab KVM's SRCU "lock" in kvm_zap_gfn_range() to fix a recurring bug where callers fail to do so - Fix a variety of issues in the pre-fault code that are mostly benign in the current code base, but will show up in big ways if/when the pre-faulting logic is used to implementing prefetch-on-fault for the TDP MMU - For PREEMPT_RT=y kernels, drop the rmaps' individual bit-spinlock and just walk the rmaps' with mmu_lock taken. On the write side (which always uses mmu_lock), the bit-spinlock was assuming that preemption was disabled, but that is *not* true when rwlocks become sleepable - Prepare a memory_fault exit (paired with -EFAULT) when KVM hits an error PFN, e.g. so that userspace can resolve transient issues instead of killing the guest. Convert a variety of WARN()+EFAULT paths into KVM_BUG_ON()+EIO so that KVM can hard commit to filling memory_fault on -EFAULTs that occur in the page fault path - Fix a NX hugepage un-accounting bug where KVM would always uncharge the shadow MMU, even when handling TDP MMU pages - Mask off the address space ID when checking for illegal usage of kvm_set_internal_memslot() to prevent false negatives on the sanity check - Explicitly zero reserved flags when delivering a SynIC message to avoid leaking a byte of stack information to the guest - Rework TDX's handling of the canonical MMU root level to not rely on userspace to fill CPUID correctly, as doing so lets userspace trivially trigger a KVM_BUG_ON() - Reject KVM_SET_NESTED_STATE if userspace "restores" L1 with EFER.LMA=1 && EFER.LME=0, which confuses KVM into trying to configure an 64-bit MMU without PAE - Ignore EFER.LMA (clear it from KVM's cached save state) if EFER.LME=0 when preparing L2 state, to fix another way to confuse KVM's MMU (and because real hardware also ignores EFER.LMA) - Improve KVM's sanity checks for a misconfigured MMU to (hopefully) detect all of the ways KVM can botch EFER.LMA vs. CR4.PAE - Remove the "full" out-param from kvm_x86_ops.flush_tlb_gva() as the param is only used to avoid what effectively amounts to a single memory write - Fix a mostly-benign bug where KVM can write through a guest's read-only mapping due to not checking the error code when expediting emulated MMIO page faults - Honor the guest's view of the "EFER.LMSLE must be zero" defeature so that userspace can provide migration compatibility between Rome and Milan+ - Pend a KVM_REQ_EVENT request when an exception is morphed into a nested VM-Exit, otherwise KVM can fail to actually deliver the nested VM-Exit, e.g. when injecting a page fault - Add support for PML on SVM - Add support for virtualizing Bus Lock Detect on SVM, and fix a number of DR6 bugs and warts along the way - Fix a variety of warts in KVM's handling of guest TSC, kvmclock, and timekeeping in general, as a (big) first step towards addressing several longstanding problems with the kvmclock implementation. Most notably, fix a precision issue where get_kvmclock_ns() computed the clock from the *host* TSC without applying guest TSC scaling, causing systemic drift from the values the guest computes from its own TSC - Rip out KVM's shadow timekeeping structures, now that ktime snapshots are powerful enough to replace it - Misc fixes and cleanups x86 (AMD): - Fix a benign-in-practice bug where KVM unintentionally sets a non-zero error code when delivering exceptions to SEV-ES+ guests - Force a new ASID in both VMCBs on pCPU migration to fix a bug where KVM can run a VMCB with a stale ASID due to the tracking being per-CPU, not per-VMCB - Return INVALID_INPUT to the guest instead of exiting to userspace with -EIO if KVM can't access "guest request" buffer, i.e. try to keep the guest alive if the guest or userspace goofs x86 (Intel): - Enable Notify VM-Exits (now called Instruction Timeout in the SDM) and Bus Lock VM-Exits for TDX guests when they're enabled by userspace (KVM forgot to wire up the TDX Module knobs) - Move all common (between VMX and TDX) APIs/helpers to common.h/main.c, and change all namespace prefixes from "vmx" to "vt" - Fix a thankfully benign bug (due to other areas of KVM being hardened) where userspace can bypass INIT_MEM_REGION's address wrap check by providing a nr_pages that will overflow a u64 when converted to bytes, and fix an also- benign off-by-one bug in the check (inclusive vs. exclusive) - Set the vmcs.GUEST_ACTIVITY_STATE back to ACTIVE when userspace sets KVM's mp_state to anything other than HALTED, e.g. so that a vCPU doesn't get stuck in HLT if userspace emulates RESET guest_memfd: - Take the invalidate lock when unbinding a dying file to fix a race with kvm_gmem_invalidate_end() that results in KVM leaving the MMU invalidation count elevated. Not taking the lock in the first place was pure misguided paranoid - When binding a memslot, purge the bindings if storing the new memslot fails, as Xarray's "store range" API can subtly fail partway through - Establish memslot<=>guest_memfd bindings *after* the memslot is ready, as the memslot becomes reachable the instant the binding is installed - Don't grab a page refcount when reloading an SNP VMSA and stop returning a "struct page" from guest_memfd's PFN lookup altogether, to ensure that KVM doesn't hold any unnecessary refcounts (the lifetime of the page is ensured by MMU notifiers and similar hooks). Preventing unnecessary refcounts greatly simplifies supporting in-place SHARED=>PRIVATE conversions - Add support for in-place PRIVATE<=>SHARED conversion, i.e. allow a single guest_memfd instance to be used for both PRIVATE and SHARED variations of CoCo guests' memory (though not at the same time). This eliminates the need to double allocate guest memory for TDX and SNP, and is basically a hard requirement for pKVM, which relies on being able to preserve memory contents on conversions - Hack-a-fix a deadlock bug in ->error_remove_folio() by returning -EBUSY if the filemap invalidate lock is contended. Punt on a proper fix for the moment, as a proper fix likely involves reworking truncate_error_folio() - Add a pile of selftests for in-place conversions - Misc guest_memfd cleanups Generic: - Move some configuration items to preprocessor symbols, to help with arm-on-s390's need to compile the same code twice with different values - Allow KVM implementations to choose alternative device names, also for s390's support of ARM virtualmachines - Switch the KVM-VFIO interface and external consumers over to standard file-based reference counting, eliminating all external KVM symbol exports Selftests: - Rework KVM selftest's handling of memory regions all so that PPC can force its page table allocations to be naturally aligned - PPC support - Fix emulation of VMPTRST and VMPTRLD when eVMCS is in-use to match real Hyper-V's behavior - Saturate L2's TSC frequency if stacking L1 and L2 scaling multipliers exceeds what hardware supports, as attempting to run L2 with an illegal multiplier will either cause VM-Entry to fail (VMX) or trigger a #GP when writing MSR_AMD64_TSC_RATIO (SVM). The #GP is thankfully benign in the grand scheme as even "unsafe" WRMSRs have exception fixup - Rework KVM selftest's handling of memory regions so that PPC can force its page table allocations to be naturally aligned - Clean up selftest's VMX instruction helpers, and drop an absurd number of completely useless return values, e.g. functions that unconditionally return %true and then have every caller assert success - Add selftests support for Zhaoxin CPUs - Overhaul the TSC scaling test to add a regression test for the saturation behavior, and to increase its coverage in general - Fix selftests usage various NUMA syscalls to account for an undocumented, but known since 2007, off-by-one kernel bug. Add helpers to try and avoid re-introducing the same flaws in the future - Automatically run xAPIC IPI migration test (between NUMA nodes) when possible, as the entire point of the test is verify KVM's handling of page migration of the APIC backing page - Misc cleanups" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (506 commits) KVM: always make in-place conversion a compile-time constant when possible KVM: x86: leave the legacy private attribute in for TDX and SEV KVM: split CONFIG_KVM_PRIVATE_MEMATTR_VM out of KVM_VM_MEMORY_ATTRIBUTES selftests: kvm: remove useless comma operator arm64: Use proper include variant MAINTAINERS: Add entry for ARM on s390 KVM KVM: s390: arm64: Integrate arm on s390 KVM: s390: arm64: Implement basic page fault handler KVM: s390: arm64: Implement vCPU IOCTLs KVM: s390: arm64: Implement vm/vcpu create destroy KVM: s390: arm64: Implement required functions KVM: s390: Add basic arm64 kvm module s390/hwcaps: Report SAE support as hwcap KVM: s390: arm64: Introduce host definitions s390: Introduce Start Arm Execution instruction KVM: s390: Use arm64 code s390/tools: Use arm64 headers KVM: s390: Use dedicated function for migration mode s390/Kconfig: remove PCI dependency from HAS_IOMEM KVM: s390: Kick PV cpus at the right time for service irqs ...
6 daysMerge tag 'bpf-next-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Pull bpf updates from Alexei Starovoitov: "Major changes: - Introduce scalar evolution (SCEV) analysis in the verifier. It infers how registers and stack slots change in a loop and lets the verifier check bounded loops with induction variables as ranges instead of walking every iteration. The number of processed insns drops ten fold in programs with loops (Eduard Zingerman) - Add 'callx' instruction: indirect call of a static BPF subprogram. The address is taken with ld_imm64 or loaded from read-only data. Supported by x86-64, arm64 and riscv64 JITs (Alexei Starovoitov, Pu Lehui) - Add unwind_goto and unwind_exit instructions, so that Rust panic or C++ exception can run destructors of every frame it passes through. The normal path is free of unwind code. Supported by x86-64 and arm64 JITs (Alexei Starovoitov) - Support programs compiled by rust-bpf: treat load and store through a number as arena access with BPF_F_ARENA_SCALAR, accept rust names in BTF (Alexei Starovoitov) - Raise BPF program stack size from 512 bytes to 2 KiB on x86-64 and arm64 (Kumar Kartikeya Dwivedi) - Support struct, union and __int128 up to 16 bytes passed and returned by value in BPF subprograms and kfuncs, and fix x86-64 and arm64 trampolines for such arguments (Yonghong Song) - Introduce a common way to attach struct_ops to a cgroup via bpf_link. bpf_tcp_ops is the first user and mirrors TCP sock_ops callbacks (Martin KaFai Lau, Amery Hung) - Describe inlined functions in BTF. New kinds tell where the inline sites are and how to fetch the arguments there. CONFIG_DEBUG_INFO_BTF_INLINE keeps it apart from the main BTF in .BTF.inline section or in btf_vmlinux_inline.ko (Alan Maguire) - Fix many memory safety, lifetime and locking bugs in BPF core, verifier, iterators, local storage, dynptr, devmap, cpumap and seg6local (Josef Bacik, Alexei Starovoitov) - Diff stat is dominated by selftests and by removal of lib/test_bpf.c. Its 16k lines of instruction tests were converted to BPF selftests that BPF CI runs on every architecture it covers (Daniel Borkmann) Other features and fixes: - Add KASAN checks to memory accesses of JITed programs on x86-64 (Alexis Lothoré) - Complete unification of helper, kfunc and subprog argument checks in the verifier (Amery Hung) - Add bpf_copy_from_user_mm[_str]() kfuncs (Anastasios Papagiannis) - Various features and fixes (Daniel Borkmann): - Add .bpf keyring for program signature verification, modelled after dm-verity keyring, and support ML-DSA in signing tools - Emit shorter and faster code in x86-64 JIT for patterns that LLVM generates - Fix various issues in gotox handling - Let BPF LSM set xattrs at inode creation with bpf_inode_init_xattr() (David Windsor, Daniel Borkmann) - Use sleepable page allocation in sleepable arena paths. Fix races between arena free, allocation and user page fault (Emil Tsalapatis) - Switch BPF crypto from lskcipher to AES-CBC and AES-ECB libraries (Eric Biggers) - Add bpf_proactive_reclaim() kfunc (Hui Zhu) - Render decl_tags in libbpf btf_dump and add tests for bpftool C dump (Ihor Solodrai) - Speed up tracing_multi attach on x86 (Jiri Olsa) - Various features and fixes (Kumar Kartikeya Dwivedi): - Add BPF_PROG_STREAM_OPEN command to read BPF streams through a file descriptor with poll support - Let kernel structs publish arena pointers with __arena type tag - Fix __uninit kfunc output buffers and fastcall rewrite with indirect stack accesses - Refuse CO-RE relocations for signed programs - Add enqueue_rcvq and dequeue_rcvq hooks to bpf_tcp_ops to adjust sk_rcvlowat and avoid unnecessary wakeups (Kuniyuki Iwashima) - Add bpf_ksock_sendto() kfunc and allow ksock connect and send from bpf_wq (Mahe Tardy) - Fix racy plt target update in arm64 bpf_arch_text_poke() (Matthew Wood) - Restructure BPF selftests Makefile as a layered build (Mykola Lysenko) - Speed up hash map lookups for u32 and u64 keys (Mykyta Yatsenko) - Add signed div/mod, movsx, bswap and gotol to MIPS JITs, signed div/mod to parisc JITs (Nicholas Dudar, Johan Almbladh) - Fix stack overflow in build ID parser on 32-bit (Nickolai Zeldovich) - Add stack arguments, signed arena loads and gotox to riscv64 JIT. Pu Lehui is now co-maintainer of riscv BPF JITs (Pu Lehui, Chen Pei, Feng Jiang) - Add bpf_call_rcu() and bpf_call_rcu_tasks_trace() kfuncs. Support fetching and/or/xor atomics in arena on x86-64 (Puranjay Mohan) - Fix flaky selftests, selftests with clang 23 and bpf-gcc (Qiliang Yuan, KaFai Wan, Vineet Gupta) - Fix builds broken by fatal resolve_btfids warnings, BTF generation on ARC, and define arch_cmpxchg_local() on arc, hexagon and openrisc (Sasha Levin) - Reduce memory use of hash maps by up to 50% per element (T.J. Mercier) - Mark pointer fields of sched_ext ops arguments as trusted (Tejun Heo) - Remove legacy bpf_asm, bpf_dbg and bpf_jit_disasm tools (Xia Yan) - Fix index overflow in queue and stack maps, arena range tree after allocation failure, tail call loop after freplace detach, lost signal in bpf_send_signal() (Yuan Chen) - Many more fixes and cleanups" * tag 'bpf-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (660 commits) selftests/bpf: Time tc_edt from its first packet with data selftests/bpf: Test unwind_exit of an exception callback selftests/bpf: Tests for 32-bit scalar evolution bounds computation bpf: Reject unwind_goto and unwind_exit in offloaded progs bpf: Support 32-bit linear scalar evolution bpf: Make unwind_exit of an exception callback exit in JITs selftests/bpf: Test forbidden bpf_ksock_sendto() LSM attach selftests/bpf: Test ksock sendto() bpf: Add bpf_ksock_sendto() kfunc selftests/bpf: Test unwinding from R0: R2 subprog selftests/bpf: Add a C++ prog with exceptions selftests/bpf: Add tests for unwind_goto and unwind_exit bpf, arm64: Support unwind_goto and unwind_exit bpf, x86: Support unwind_goto and unwind_exit bpf: Add unwind_goto and unwind_exit insns tools/bpf: Remove legacy BPF tools bpf: Annotate data races on bpf_lru_node type selftests/bpf: Add arena allocation race tests bpf: Fix arena race between page free and alloc leading to incoherency bpf: Revalidate faulted arena pages before installing user mappings ...
6 daysselftests/net: tcp_mmap: remove unused -k option and keepflagGreg Thelen
Commit aacb0c2e524c ("selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE") removed the only read of keepflag in child_thread(), leaving the file-scope keepflag variable set by the -k option in main() but never read. This triggers a Clang 23 warning: tcp_mmap.c:91:12: error: variable 'keepflag' set but not used [-Werror,-Wunused-but-set-global] Remove the unused keepflag variable and the dead -k getopt option. Fixes: aacb0c2e524c ("selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE") Signed-off-by: Greg Thelen <gthelen@google.com> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/20261021152658.2618709-1-gthelen@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
6 daysMerge tag 'bootconfig-v7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull bootconfig updates from Masami Hiramatsu: "Parser robustness and validation improvements: - Skip printing early params to cmdline from bootconfig Suppress early_param keys from /proc/cmdline and warn the user, since bootconfig does not invoke early_param handlers and silently ignoring them is misleading - Reject unexpected data after null character Detect and reject non-null data following an intermediate null character in the bootconfig buffer, preventing silently ignored configuration after an early termination Code cleanups: - Merge _xbc_exit() into xbc_exit() Since memblock_free() now handles late freeing and NULL addresses, the separate _xbc_exit() helper and its early argument are unnecessary. Inline it into xbc_exit() - Remove redundant assignment in xbc_parse_array() The node->child = 0 assignment after the loop duplicates what xbc_init_node() already did - Skip internal tree sanity checks in kernel Move the node index bounds loop from xbc_verify_tree() into a userspace-only xbc_sanity_check_tree() to reduce boot-time overhead, since out-of-bounds indices cannot be produced by malformed input - Move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h Share the footer size constant between kernel and user-space tools, replacing the hardcoded (BOOTCONFIG_MAGIC_LEN + 8) expression in init/main.c Tooling improvements: - Remove unused PAGE_SIZE macro from the bootconfig tool - Consolidate xbc_init() to error message wrapper Use init_xbc_with_error() for all bootconfig initialization paths in the tool for simpler and more consistent error handling" * tag 'bootconfig-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h bootconfig: Skip internal tree sanity checks in kernel tools/bootconfig: Consolidate xbc_init() to error message wrapper bootconfig: Reject unexpected data after null character bootconfig: Skip printing early params to cmdline from bootconfig tools/bootconfig: remove unused PAGE_SIZE macro bootconfig: remove redundant assignment in xbc_parse_array() bootconfig: merge _xbc_exit() into xbc_exit()
6 daysMerge tag 'probes-v7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes updates from Masami Hiramatsu: "Asynchronous optprobe optimizer and cleanups: - Make optprobe optimizer multi-generational and asynchronous Rework the optimizer as a state machine to avoid calling time-consuming synchronize_rcu_tasks() while holding kprobe_mutex, text_mutex, and cpus_read_lock(). Uses call_rcu_tasks() and a fixed ring of generation slots instead, so locks are only held during the brief instruction- patching window - Use DEFINE_DEBUGFS_ATTRIBUTE for the kprobes enabled knob Replace a hand-rolled debugfs read/write pair (dating from 2007) with the proper DEFINE_DEBUGFS_ATTRIBUTE macro, removing dead code and the stale XXX comment Code quality and documentation cleanups: - Add const qualifier to new_argv allocation type in trace_probe.c, preparing for the type-aware kmalloc_obj allocator conversion - Clarify btf_find_struct_member() container parameter Rename the misleading @member_type parameter to @container_type and add proper kernel-doc documentation for all parameters and return values Boot tracing test framework and testcases: - Add a generic boot tracing test framework under tools/testing/selftests/ftrace/boottime/ The test runner builds a minimal initramfs with busybox, boots QEMU, and runs tracefs checker scripts, supporting bootconfig, kernel command-line options, and multi-boot crash/reboot scenarios - Add boot-time tracing testcases Verify dynamic kprobe, synthetic events, eprobe, fprobe, tprobe, and trace instance creation via bootconfig - Add kernel cmdline tracing testcases Verify ftrace, trace_event, trace_buf_size, trace_options, trace_clock, and trace_instance kernel parameters - Add persistent ring buffer testcases: Verify memory reservation via reserve_mem= and trace data retention across guest crash/reboot, as well as backup instance creation and boot log preservation - Change non-unique test symbol from name_show to init_once in kprobe_non_uniq_symbol.tc for more reliable cross-architecture testing" * tag 'probes-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ftrace/selftests: Change non-unique test symbol to init_once tracing/probes: Clarify btf_find_struct_member() container parameter and add kernel-doc kprobes: Make optprobe optimizer multi-generational and asynchronous tracing/probes: Add const to new_argv allocation type kprobes: use DEFINE_DEBUGFS_ATTRIBUTE for the enabled knob selftests/ftrace: Add persistent ring buffer testcases selftests/ftrace: Add kernel cmdline tracing testcases selftests/ftrace: Add boot-time tracing testcases selftests/ftrace: Add generic boot tracing test framework
6 daysMerge tag 'trace-tools-v7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull RTLA tooling updates from Steven Rostedt: - Test actions in absence of threshold Cover the case which regressed in the past in tests. - More robust CPU count detection Parse /sys/devices/system/cpu/possible directly instead of going through libc for CPU count and sanity check against any mismatch with the number reported by tracefs / osnoise. - Add option to record IPI count in osnoise top In addition to counting IRQs, add an option to enable counting IPIs targetting the measurement CPU to the rtla-osnoise-top tool. - Improve runtime test usability Catch up with increased complexity of runtime tests with better defaults and more options available to the developer running the tests. - Simplify osnoise tracer option setting code Deduplicate osnoise tracer option setting code with macros to make it less error-prone and to make it easier to add new tracer options in the future. * tag 'trace-tools-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rtla: Simplify osnoise tracer option setting code rtla/tests: Add $SUBTESTS and $STOPONFAIL rtla/tests: Show the command line for failing tests rtla/tests: Use absolute path for $RTLA rtla/osnoise: Trace IPI events when recording a trace file rtla: Unconditionally clean any pre-existing filters for user-provided events rtla: Enable and disable events in the user-defined order rtla: Make struct trace_events double linked rtla/osnoise: Allow IPI filters to gracefully fail rtla/osnoise: Leverage IPI event filters when tracing a subset of CPUs rtla/osnoise: Record IPI count in osnoise top rtla/osnoise: Add IPI tracking cmdline option rtla/tests: Add unit test for get_max_cpu_from_list() rtla/tests: Add unit test for cpu_list_iterate() rtla: Abort on nr_cpus mismatch with tracer rtla: Discard trace entries with cpu >= nr_cpus rtla: Replace get_nprocs_conf() with sysfs possible cpus rtla/tests: Test actions in absence of threshold
6 daysMerge tag 'livepatching-for-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Petr Mladek: - Update maintainers list: added Joe and Song, removed Jiri - Prevent removing the livepatch module before releasing all kobjects - Ignore debug messages from other subsystems in livepatch selftests * tag 'livepatching-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Add Joe and Song as maintainers livepatch: remove myself from MAINTAINERS selftests/livepatch: filter debug messages in check_result() livepatch: Fix UAF of unregistered patch kobjects
6 daysselftests: gro: remove unused variable total_dataHangbin Liu
I hit a build warning when building the net selftests. gro.c: In function 'check_capacity_pkts': gro.c:1249:13: warning: variable 'total_data' set but not used [-Wunused-but-set-variable=] 1249 | int total_data = 0; | ^~~~~~~~~~ Remove the total_data variable, as it is no longer used. Fixes: d97348474708 ("selftests: drv-net: gro: always wait for FIN in the capacity test") Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn> Reviewed-by: Antoine Tenart <atenart@kernel.org> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20261022-self_unused_var-v1-1-8ab10a6b7f44@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
6 daysMerge tag 'sysctl-7.04-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl Pull sysctl updates from Joel Granados: - Disallow partial vector updates Stage sysctl vector writes before updating. Removes the chance of leaving a sysctl vector partially updated due to erroneous input. This is not an atomic write; a concurrent reader can still see a partially updated vector. - Remove redundant sysctl config guards Remove locations where (CONFIG_SYSCTL && CONFIG_PROC_FS) was checked. They are superfluous as CONFIG_SYSCTL now depends directly on CONFIG_PROC_FS. - Rewrite selftests using KTAP helpers Each test now reports its own KTAP result and runs in a subshell. Test suite continues after failure. - Misc Fix a use-after-free in the selftests test_sysctl module. Quiet an unused variable warning in fs/proc/proc_sysctl.c:init_header(). Add tests for partial vector updates and the int jiffies converters. * tag 'sysctl-7.04-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: selftests: sysctl: Check the sign of a negative jiffies read sysctl: Add jiffies converter entries to the test module sysctl: quiet unused variable warning in fs/proc/proc_sysctl.c:init_header() sysctl: unregister tables before freeing bitmap sysctl: Rewrite selftests on top of KTAP helpers sysctl: remove redundant CONFIG_PROC_FS checks sysctl: consolidate CONFIG_SYSCTL into a single block in kernel/sysctl.c sysctl: collapse redundant CONFIG_SYSCTL nesting in kernel/sysctl.c sysctl: Add 0013 to test partially updated vectors sysctl: Disallow partial updates for erroneous sysctl vectors sysctl: Reject uint arrays before calling the general proc_vec sysctl: Split data conversion and file position handling
6 daysMerge tag 'modules-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux Pull module updates from Petr Pavlu: - Ignore local labels and mapping symbols during module load These symbols were already ignored during kallsyms address-to-symbol lookups. Filter them out earlier during module loading to reduce lookup overhead and prevent them from appearing in /proc/kallsyms. - Fix potentially incorrect access of SetOnce<T> when setting Rust module parameters. - Fix a potential read of an uninitialized count when printing taint information for unloaded modules. - Allocate the kmod argument array using kmalloc_array() in preparation for conversion to type-aware allocators. - Clean up includes in linux/kmod.h Add explicit includes of linux/umh.h to files that use usermode helpers. Then clean up the #include list in linux/kmod.h, notably removing the compatibility linux/umh.h include. - Remove the error-injection.h include from linux/module.h Add explicit includes of linux/error-injection.h to files that use the ALLOW_ERROR_INJECTION() macro and currently rely on it being provided indirectly via linux/module.h. Then remove the unnecessary linux/error-injection.h include from linux/module.h. - Replace __MODULE_STRING() with __stringify() in various drivers in preparation for removing the former macro. * tag 'modules-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux: drivers: Replace __MODULE_STRING() with __stringify() module: Fix uninitialized count read of unloaded taint tracking record rust: module_param: Fix potentially incorrect access of `SetOnce<T>` module: Remove the error-injection.h include from linux/module.h drm/xe: Include error-injection.h for ALLOW_ERROR_INJECTION() drm/i915: Include error-injection.h for ALLOW_ERROR_INJECTION() syscalls: Include error-injection.h for ALLOW_ERROR_INJECTION() net: Include error-injection.h for ALLOW_ERROR_INJECTION() block: Include error-injection.h for ALLOW_ERROR_INJECTION() module: Bring includes in linux/kmod.h up to date time/jiffies: Include linux/sysctl.h for proc_int_u2k_conv_uop(), ... umh, treewide: Explicitly include linux/umh.h where needed modules/kmod: Allocate argv with kmalloc_array() module/kallsyms: Ignore local labels and mapping symbols during module load module/kallsyms: Refactor current symbol filtering into is_core_symbol() module/kallsyms: Rename is_mapping_symbol() to is_ignored_kernel_symbol()
6 daysMerge tag 'mm-stable-2026-10-19-21-33' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: - "selftests/mm: improve khugepaged coverage" (Kiryl Shutsemau): Give khugepaged a proper workout. Extend the tests to all supported mTHP orders, check exactly which windows collapsed, and make scan completion deterministic. Race collapse against faults, pinning, fork and remap; verify that the contents survive. Add coverage for whole-page-table zaps and memory pressure too. - "selftests/mm: separate GUP microbenchmarking from functional testing" (Sarthak Sharma): Untangle GUP benchmarking from correctness testing. Move the benchmark into tools/mm, add a standalone harness-based GUP selftest, and move shared helpers into tools/lib/mm. Give each tool one job instead of mixing timing measurements with correctness checks. Cover the mapping, pinning and batch-size combinations explicitly. - "mm: Switch device DAX to section-based vmemmap optimization" (Muchun Song): Apply section-based vmemmap optimization to device DAX. Rework the backing metadata layout to save memory while preserving the handling of device memory hotplug and its different alignment and lifetime requirements. - "mm: Introduce section-based vmemmap optimization for HugeTLB" (Muchun Song): Cut the memory consumed by HugeTLB's struct page array with section-based vmemmap optimization. Arrange the metadata so large huge pages need fewer backing pages, while keeping initialization, teardown and the various hugepage configurations straight. - "mm/huge_memory: clean up and decouple the anon and file split helpers" (Kairui Song): Separate anonymous and file-backed folio splitting, which have rather different locking and bookkeeping requirements. Move the work into separate helpers, drop dead checks and tidy swap-cache handling. Fix error paths, including one that could leave a folio frozen. Keep the swap cache cases separate from file-cache splitting. - "mm: Unconditional per-VMA locks and cleanups" (Dave Hansen): Make per-VMA locking unconditional and clean up the old conditional code around it. This removes configuration-dependent plumbing and lets callers depend on one locking model rather than carrying both cases along. - "memcg: remove the v1 soft limit" (Shakeel Butt): Remove the old cgroup v1 memory soft-limit machinery. This has long since been superseded by the newer memory-control interfaces; hauling around a separate reclaim scheme for it no longer buys us much. - "read proc/pid/smaps_rollup under per-vma lock" (Suren Baghdasaryan): Read /proc/PID/smaps_rollup using per-VMA locks where possible, rather than holding mmap_lock across the entire walk. Retain the contention fallback and add tearing tests. This considerably reduces latency when another thread is busy changing its mappings. - "mm/damon: introduce data access-as-a-data attribute" (SJ Park): Teach DAMON to expose memory access observations as data attributes, making them available to the probe and filtering machinery. Extend the interfaces, documentation and tests so the new information can be used rather than merely collected. - "Remove PG_private by using page/folio->private checks instead" (Zi Yan): Get rid of PG_private and use the folio's private pointer to say whether private data is attached. Convert the filesystem users, including erofs, f2fs and md, and clean up the old accessors and flags. There are a few special cases, notably swapcache and hugetlb, which need explicit care. - "mm: make userland page table freeing RCU-safe" (Lorenzo Stoakes): Make freeing userspace page tables safe against RCU readers. Sort out the page-table lifetime and locking rules so walkers cannot stumble over freed tables while mappings are being torn down. - "make unused huge shrinker memcg aware" (Qi Zheng): Make shmem's unused-huge-folio shrinker aware of memory cgroups, so reclaim can find those folios under the right memcg. Wire up the per-memcg tracking and its lifetime rules, and give the shrinklist its own lockdep class to avoid spurious dependency reports. - "mm: Drop pxd_ERROR()" (Anshuman Khandual): Remove the old pxd_ERROR() page-table checks and their architecture-specific baggage. Simplify the common page-table interfaces and callers now that these checks no longer serve a useful purpose. - "memcg: group struct fields by access pattern" (Shakeel Butt): Rearrange memcg's hot and cold fields according to how they're actually accessed. Keep frequently updated counters and their neighboring state from fighting over cachelines and reduce needless cacheline traffic. - "mm/damon/core: fix the size charged for a filter-trimmed region" (Donggeun Yoo): Fix DAMOS quota accounting when a filter trims a monitoring region. Charge only the part left after filtering, not the original region, and add KUnit coverage. Previously the excluded memory could eat into the quota and make schemes run more slowly than requested. - "mm/damon: add kunit and selftests for probes and probe weights" (SJ Park): Add more tests for DAMON probes and their weights, including validation and the results reported to userspace. This is mostly about catching regressions in the newer probe infrastructure before they become harder to diagnose. - "mm: memcontrol: constify the read side of the read side of the memcg API" (Tal Zussman): Mark the read-only parts of the memcg interface const, from folio and lruvec accessors to counters and swap helpers. Most of this is mechanical, but it makes the contracts clearer and lets the compiler catch accidental writes. - "mm/damon/vaddr: support {prep,apply}_probes" (SJ Park): Support the new prepare/apply probe operations in DAMON's virtual-address backend. This brings vaddr monitoring into line with the probe infrastructure and makes the added probe types useful there too. - "mm/mglru: clean up folio counters and flag usage" (Kairui Song): Simplify MGLRU's folio counters and flag handling. Remove redundant accounting paths and make the state transitions easier to follow without changing the intended reclaim policy. - "arch, mm/execmem: resolve confusion about set_direct_map_valid_noflush()" (Mike Rapoport (Microsoft)): Clarify and straighten out the set_direct_map_valid_noflush() interface across architectures and execmem. Make the requested mapping changes and the callers' expectations agree, rather than relying on subtly different architecture behavior. - "mm: zswap: free cold writeback folios promptly" (Alexandre Ghiti): Free zswap writeback folios as soon as their disk write completes. They are cold temporary buffers, so putting them on the LRU only makes reclaim rediscover them later. Extend swap-cache dropbehind and let zswap keep these folios off the LRU altogether. - "mm: gup: cleanup gup_fast call chain" (Aristeu Rozanski): Clean up the GUP-fast call chain and simplify how the fast-path helpers pass their arguments and results around. Keep the page-pin behavior the same while making the call sequence easier to maintain. - "mm: optimize zone-device memmap initialization" (Li Zhe): Speed up initialization of zone-device struct pages. Avoid redundant work when setting up large device-memory ranges, where touching every descriptor can get expensive. - "mm/zswap: shrink zswap_entry via a pool id" (Jianyue Wu): Reduce the size of zswap_entry by storing a compact pool identifier instead of a full pointer. Keep the pool lookup and lifetime handling correct while saving per-entry metadata. - "mm/damon: support access monitoring of hugetlb-backed memory" (Krishna Iyer): Let DAMON monitor hugetlb-backed memory too. Extend the relevant access checks and add coverage so those mappings no longer fall through a hole in the monitoring machinery. - "mm/execmem: fixes and cleanups for the ROX cache" (Mike Rapoport): Tidy execmem's read-only-executable cache and fix its handling of the awkward allocation and release cases. The aim is to make the cache's ownership and permission transitions more predictable. - "zsmallc: remove old object read API" (Sergey Senozhatsky): Drop zsmalloc's old object-read API and move its remaining users to the supported access mechanism. This removes a duplicate interface which we no longer need. - "mm/mempolicy: stop copying state in the interleave paths" (Gregory Price): Stop copying mempolicy state in the interleave paths when a reference to the existing policy will do. This avoids extra work and makes the ownership rules less obscure. - "mm/mglru: speed up inc_min_seq() and fix cold/hot inversions" (Barry Song): Make MGLRU's generation advancement cheaper and fix cases where cold and hot folios end up in the wrong order. Adjust the counter and list handling so reclaim doesn't keep passing over the better eviction candidates. - "mm: Fix MF_DELAYED handling on memory failure" (Lisa Wang): Treat MF_DELAYED as a partially completed memory-failure operation, not an outright failure. Propagate that result correctly through shmem and the generic handler, fix the extra-reference accounting, and add tests for the resulting SIGBUS behavior. - "tools/mm/page_owner_sort: fix --sort, add module filter, improve usage" (Ye Liu): Fix page_owner_sort's --sort handling, add module-based filtering and make the usage output more helpful. This makes the tool less frustrating when tracking down who is holding on to pages. - "mm/damon: move damos filter range arguments validation to core" (SJ Park): Move DAMOS filter range validation into the core, where all callers can share it. Also close the sysfs read-twice races which could pass inconsistent ranges, and add tests for invalid input. - "mm/damon: misc cleanups" (Zenghui Yu): Clean up a collection of small DAMON rough edges in the core, interfaces and tests. No large behavior change here, just simpler code and fewer opportunities for confusion. - "mm/damon: cleanup code, add test cases, and update guidances in docs" (SJ Park): Clean up DAMON's core and interfaces, add missing test cases and bring the documentation into line with the code. These changes should make the newer facilities easier to understand and maintain. - "mm/damon: introduce hugepage_size probe filter" (SJ Park): Add a DAMON probe filter for hugepage size. Let users select a range of folio sizes through sysfs, validate the range and document the new interface, so monitoring can concentrate on memory backed by the desired hugepage sizes. - "selftests/mm: pagemap_ioctl test fixes and cleanups" (Zenghui Yu): Fix some pagemap ioctl test assumptions and clean up their setup and reporting. Make failures point to the operation that went wrong rather than to test harness bookkeeping. - "mm: avoid large folio splits when swap is unavailable" (Johannes Weiner): Avoid splitting large folios merely to attempt swap when no swap space is available. There is little point paying for an expensive split when reclaim cannot actually swap the resulting pages out. - "mm: workingset: fix the shadow node budget under MGLRU" (Hui Zhu): Fix the workingset shadow-node budget with MGLRU enabled. Keep the shadow entries within the intended limits so refault tracking does not quietly consume more metadata than it should. - "selftests/mm: TAP output and global-state fixes" (Song Hu): Fix selftests which produce misleading TAP output or fail to restore global settings after a run. A test ought to leave the system as it found it, particularly when a whole suite follows behind. - "mm: remove page_swap_entry()" (Tal Zussman): Remove page_swap_entry() and convert its remaining users to the folio and swap-entry helpers. Lose an old page-level interface and make the swap paths a little more consistent. - "mm: refactor zonelist constructors and iterators" (Gregory Price): Refactor the zonelist construction and walk helpers to reduce duplicated logic. Keep the allocation ordering rules intact while making it clearer how zones are selected. - "mm: kmemleak: batch the struct page scan" (Breno Leitao): Scan adjacent struct pages in batches instead of taking kmemleak_lock once for every single page. This preserves scan coverage and the lock-hold bound, while cutting overhead substantially on debug kernels. - "mm/damon: misc improvements in tests and documents" (Zenghui Yu): Fix some DAMON selftests which leave kdamond running or fail under Python safe-path mode, and improve the KUnit coverage and documentation. Nothing especially glamorous, but these are worth doing. - "mm/damon: introduce probe_hits_wsum DAMOS core filter" (SJ Park): Add a DAMOS core filter using weighted probe-hit counts. This gives schemes another way to select regions based on what the monitoring probes observed. - "mm/mglru: fix ineffective memory protection for non-kswapd reclaim" (Ridong Chen): Fix MGLRU's memory protection handling for reclaim outside kswapd. The protection settings weren't having the intended effect in these paths, leaving protected memory more exposed than requested. - "mm/damon: improve readability, clarity and test coverage" (SJ Park): Simplify a handful of DAMON core helpers, clarify their behavior and expand test coverage. There are no intended userspace-visible changes in this batch. - "mm: replace PF_KCOMPACTD/PF_KSWAPD with kthread_func()" (Kefeng Wang): Stop identifying reclaim and compaction workers through the PF_KSWAPD and PF_KCOMPACTD task flags. Use their kthread functions instead and remove the redundant flag plumbing. - "mm/hugetlb: fix surplus accounting and availability checks during demotion" (Longlong Xia): Fix HugeTLB surplus accounting and availability checks when demoting huge pages. Keep the counters and reservation decisions consistent as one huge page turns into several smaller ones. - "mm/damon: add kunit tests for probe_hits handling and probe params validation" (Jason Angelov): Add KUnit tests for DAMON probe-hit handling and invalid probe parameters. These cover edge cases that were too easy to miss in ordinary monitoring tests. - "mm/damon: fix misc bugs in kunit, quota goals and sysfs refresh_ms" (SJ Park): Fix a few DAMON bugs in KUnit tests, quota-goal handling and the sysfs refresh interval. Small fixes, but the incorrect results and control behavior were real. - "mm: zswap: optimize zswap invalidate and store" (Kefeng Wang): Simplify zswap's invalidate and store paths to avoid avoidable lookups and work. Keep the entry lifetime rules intact while making those frequent operations cheaper. - "mm: replace custom ratelimiting logic" (Pedro Falcato): Replace hand-rolled MM rate limiting with the common kernel helpers. There is no need to maintain another local version of the same mechanism. - "mm/vmalloc: minor cleanups" (Ye Liu): Tidy some vmalloc initialization and reporting code, and pull duplicated vmap-area insertion work into a helper. No functional changes are intended. - "mm/mglru: clean up isolate_folios for readability and clarity" (Ridong Chen): Clean up MGLRU's isolate_folios() so the decisions are easier to read and verify. Keep reclaim behavior unchanged while removing unnecessary twists in the control flow. - "Catch automatic storage in IDA and Maple Tree definitions" (Yury Norov): Catch IDA and maple-tree definitions placed in automatic storage where the lifetime rules are wrong or easy to get wrong. Add checks so such mistakes are harder to slip through unnoticed. - "mm, swap: some random fixes and cleanups" (Kemeng Shi): Fix and simplify a few unrelated swap paths, removing redundant work and tidying up error handling. A small collection of things which were better fixed than left lying around. - "mm/page_io: folio conversion cleanups" (Tal Zussman): Finish some page-to-folio conversions in swap I/O, removing obsolete wrappers and using folio operations consistently. The I/O behavior is intended to remain the same. - "mm/swap: skip empty clusters in the swapoff scan" (Youngjun Park): Skip empty swap clusters during swapoff instead of walking slots which have nothing to release. This avoids pointless work on sparsely used swap devices. - "mm: trace: decode architecture-specific VMA flags" (Meijing Zhao): Teach the VMA trace output to decode architecture-specific flags, rather than leaving them as unexplained bits. That should make tracing a good deal more useful when debugging unusual mappings. - "mm, swap: don't spin on a bad swap entry" (Breno Leitao): Stop repeatedly retrying a swap entry which is already known to be bad. Make the error path terminate cleanly instead of wasting CPU chasing an entry that cannot be used. - "mm/page_isolation: fix UBSAN shift-out-of-bounds in isolate_single_pageblock" (Qi Xi): Fix an out-of-range shift in isolate_single_pageblock() and tighten its associated boundary handling. UBSAN found the issue; the result should be more robust pageblock isolation. - "mm: khugepaged: fix tracepoint UAF" (Vernon Yang): Fix a use-after-free in khugepaged tracepoint handling. Make sure the information recorded by tracing stays valid for as long as the trace event needs it. - "mm/damon: fix DAMOS bugs in core, paddr and vaddr" (SJ Park): Fix several DAMOS problems across the core and physical- and virtual-address backends. The changes close error cases and bring the implementations back into agreement. - "mm/hugetlb_cgroup: move the per-node usage along with the folio" (Hongfu Li): Move HugeTLB per-node usage accounting when folios migrate between nodes or are reparented to another cgroup. Otherwise numa_stat can retain stale charges and even underflow when the folio is freed. - "docs/core-api: memory-allocation: add k[mz]alloc_obj() and clarify kmalloc" (Mike Rapoport): Document the typed k[mz]alloc_obj() allocation helpers and clear up some kmalloc guidance. Make it easier for callers to choose the right interface. - "selftests/mm: Validate selections and scope memfd_secret setup" (Tianyi Chen): Check selftest selections before running and confine memfd_secret setup to the cases that actually need it. Avoid confusing failures caused by the test harness itself. - "mm/damon: move zero damos quota target_value handling to the core layer" (SJ Park): Handle a zero DAMOS quota goal target in the core rather than making each user of the interface invent its own rule. Keep quota decisions consistent across callers. - "mm/damon: Introduce a huge page collapsing mechanism using auto tuning" (Asier Gutierrez): Add an auto-tuned DAMON mechanism for collapsing huge pages. Use monitoring feedback to decide when collapse is worthwhile rather than forcing one fixed policy onto every workload. - "kmemleak: fix stale documentation and raise the verbose default" (Breno Leitao): Bring the kmemleak documentation up to date and require a third confirming scan before verbose kernels print a suspected leak. The extra scan helps suppress transient false positives in noisy debug builds. - "mm/memory: improve insert_pages() error handling" (Avi Weiss): Tighten insert_pages() error handling so partial failures are reported and cleaned up consistently. The caller should not have to guess how far the operation got. - "mm/damon: allow NULL or unstarted damon_ctx parameter for damon_call()" (SJ Park): Make damon_call() handle NULL and not-yet-started contexts safely. Simplify the rules for callers and avoid an indefinite wait on an invalid state. - "mm/damon: introduce pgidle_set probe filter type" (SJ Park): Add a pgidle_set DAMON probe filter, giving monitoring users another way to select pages by their idle-tracking state. Wire it through the filter interfaces and tests. - "mm/damon/core: remove unused helper functions" (Cheng-Han Wu): Remove DAMON core helpers which no longer have callers. Keep the API surface smaller rather than retaining dead code just in case. - "mm: stop calling pmd_folio() on special PMDs" (Gregory Price): Avoid calling pmd_folio() on special PMD mappings that have no struct page. The old assumption could fault in procfs walkers; use the normal-folio checks and handle those mappings properly. - "mm: remove three unused helpers from mm.h" (Tal Zussman): Remove three unused helpers from mm.h. Fewer obsolete interfaces for the next person to stumble over. - "mm/damon: improvements in efficiency, error handling, documents" (Liew Rui Yan): Skip needless DAMOS quota work once the quota is full, propagate a missing sysfs error and tidy a couple of comments. The ignored error could make a monitoring-start request appear successful when it wasn't. - "docs/mm/damon/design: add explanation of nr_snapshots" (Liew Rui Yan): Explain DAMON's nr_snapshots accounting in the design documentation and straighten out the associated terminology. Make it clearer what users should expect from that counter. - "selftests/cgroup: fixes for test_zswap on single core VM" (Wilson Felipe Pereira): Fix two test_zswap failures on single-CPU VMs. Wait for the exiting child's cgroup to become unpopulated before reconfiguring it, and avoid another test assumption which breaks under constrained scheduling. - "docs/ksm: fix advisor documentation and comment" (Jinjiang Tu): Correct the KSM advisor documentation and a misleading code comment. Keep the description aligned with how the advisor actually works. - "Fix bugs in HugeTLB allocation when mem_cgroup_charge_hugetlb() fails" (Ackerley Tng): Fix HugeTLB allocation cleanup when the memcg charge fails. Make sure failure exits undo what was allocated rather than leaving stale accounting or resources behind. - "mm, memcg: fix memory.peak reset clobbering other fds' watermark" (Ridong Chen): Fix memory.peak reset handling so resetting one file descriptor doesn't overwrite the watermark kept for another. Keep those per-open measurements independent as intended. - "mm: reject zone device folios in more folio walkers" (Gregory Price): Reject zone-device folios in page walkers that cannot safely handle them. Extend the existing checks rather than assuming every folio has ordinary system-memory backing. - "percpu: remove code with no effect" (Sang-Heon Jeon): Remove a few pieces of percpu code which no longer do anything. There is no reason to keep maintaining dead paths. * tag 'mm-stable-2026-10-19-21-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (539 commits) mm: shmem: assign a lock class to the unused huge shrinklist mm: vmscan: put rotation-missed folios at the LRU tail mm: kmemleak: scan the struct page array in MAX_SCAN_SIZE batches mm: kmemleak: move the struct page scan into a helper mm/damon: document that a zero sample_interval is accepted mm/damon: fix typos in comments mm/damon/sysfs: propagate damon_call() error in turn_damon_on mm/damon/core: skip quota score setup when the quota is full mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region mm/damon/core: charge only the part of a region the filter left mm: disallow raw PFN mappings of huge/shared zeropage selftests/mm: zap whole PTE tables in the khugepaged race harness selftests/mm: add memory-pressure threads to the khugepaged race harness selftests/mm: race the collapse of windows with holes selftests/mm: add khugepaged race harness selftests/mm: check that one khugepaged pass collapses one window selftests/mm: run every supported collapse order by default selftests/mm: cover a shared-source collapse write race selftests/mm: parameterize the mixed-source collapse case by source order selftests/mm: add order-parameterized khugepaged collapse cases ...
7 daysMerge tag 'net-next-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "This includes a significant number of low-priority fixes - especially in the NIC drivers area - that we deferred from the last few RCs in the previous cycle, which can't be easily outlined in the synopsis below. Core & protocols: - Continue the work on removing rtnl_lock dependencies: - per-netns ARP and ND neighbour tables, with the default settings now configurable per netns (inheritance from init_net is controlled by the new net.core.neigh_inherit_init_net sysctl) - RCU-protected configuration and rtnl_lock-less fill_info() for hsr, netkit, sit, vlan and vxlan devices - per-netns device unregistration for ip tunnel and gre devices - use the netdev instance lock instead of rtnl_lock when reading speed and duplex via sysfs - batch the flushing of uncached routes at device unregistration time, relieving rtnl_lock contention on netns dismantle. - Add hardware pacing offload support, admin-controlled via a new rtnetlink attribute, with sch_fq integration (implemented in idpf). - Re-segment BIG TCP GSO packets into GSO packets fitting the egress device limits instead of plain MSS-sized segments, improving throughput for mixed BIG TCP / non-BIG TCP paths by up to 70%. - Generate RSS keys that spread flows over all the RX queues; the previous random keys could leave some queues unused. - Optimize the bridge VLAN forwarding paths: cache the port-VLAN in fdb entries and consider only VLAN members when flooding, for ~10% more Mpps in the fdb forwarding path. - A few TCP/IP performance improvements aimed at efficient cache usage and reducing contention. - Add the TCP ROCCET congestion control, a CUBIC variant aimed at avoiding bufferbloat in cellular networks. - Continue the conversion of getsockopt callbacks to sockopt_t. - Add an ethtool command to list the front-facing ports of an interface, including SFP cages and modules, using the phy_port representation. - Enable BIG TCP support for bareudp tunnels. - Remove the IPV6_ADDRFORM socket option and disallow buggy TCP state transitions (listen() + shutdown() + connect() and connect() + connect(AF_UNSPEC) + listen()). - Remove most BUG_ON()s from core packet processing, replacing them with error paths. Wireless: - Latency improvements, including lockless station get/dump and beacon updates, plus RTNL reduction and locking cleanups. - Infrastructure for non-station TX/RX with MLO. - NAN (Wi-Fi Aware) Instant Communication support and other NAN improvements. - Control frame Integrity Protocol (CIP) and protected TWT support. - Improvements for AP regulatory checks. Netfilter: - Disable br_netfilter in user namespaces and schedule it for removal in 2027. - Restrict the raw table in nft_compat to the specific family, hook and priority. - Prepare the flowtable for mixed IPv4-over-IPv6 tunneling (and vice versa). - Use GFP_KERNEL_ACCOUNT for most netfilter allocations, for better integration with memcg. - Allow discovering conntrack zone filtering support in ctnetlink dumps, and fix nfnetlink_hook handling of large dumps. Deletions: - Move the LLC type 2 sockets out of tree. There are no known users and the code attracts a never-ending stream of LLM-driven fixes. Device drivers: - New drivers: - Meta Platforms NIC (mpnic), the second-generation NIC from Meta - initial skeleton of the Nebula-matrix NICs driver (nbl) - X-Powers AC200/AC300 Fast Ethernet PHYs - Ethernet high-speed NICs: - Intel: - i40e: XDP metadata support for RX hash and VLAN tag - ice: expose the E825 TSPLL state via the DPLL subsystem - nVidia/Mellanox: - move the data direct infrastructure from IB to core, in preparation for netdev support. - reduce the memory used per offloaded TC rule - Meta (fbnic): - support large io_uring zero-copy RX buffers - Microsoft vNIC (mana): - add BQL support - Ethernet NICs consumer, and embedded: - Airoha: - LRO offload support - Cadence (macb): - context swapping for ringparam and MTU changes, avoiding buffer loss under memory pressure - Mucse (rnpgbe): - TX/RX and link status support - NXP (enetc): - SR-IOV improvements and VF support for ENETC v4 - Qualcomm (ppe): - IPQ5424 support - Realtek PCI (r8169): - phylink support - RSS support for RTL8127 - Renesas (ravb): - gPTP support for R-Car Gen4 - Synopsys (stmmac): - XDP multi-buffer support on the TX side - tc mqprio hw queue priority offload - support for RK3568 SGMII, Allwinner H616 EMAC1, UltraRISC DP1000 and Qualcomm sa8255p - Ethernet switches: - Mediatek (mt7530): - fast age and change conduit support - Microchip (ksz): - support for KSZ8995XA/KS8995XA - Microchip (lan966x): - PCIe FDMA support, ~20x throughput increase in PCIe endpoint - Microchip (sparx5): - Time Aware Shaper (taprio) offload - Motorcomm (yt921x): - LED and SerDes PCS support - Realtek (rtl8365mb): - EEE support - Ethernet PHYs: - Broadcom: - enable jumbo frames on BCM54xx - Realtek: - support for RTL8261CE_CG and RTL8261D_VM - MDIO support for RTL838x and RTL839x - WiFi drivers: - Broadcom (brcmfmac): - FT/OKC roaming offload - Intel (iwlwifi): - UHR sniffer support - support for newer UEFI/BIOS tables - MediaTek (mt76): - mt7925 NAN improvements - offchannel/scan improvements and MLO fixes - Morse Micro (mm81x): - monitor mode support - Qualcomm (ath12k): - IPQ5332 platform infrastructure - Realtek (rtw88): - RTL8723BS support - SDIO TX performance improvements - Realtek (rtw89): - P2P_DEVICE support - BT-coex updates for RTL8922D - Bluetooth: - move H:4 reassembly into the Bluetooth core - add generic support for vendor packets - MGMT: add security level changed event - Bluetooth drivers: - btusb: support Bulk Serialization Mode - Intel: support Draco and Titan Lake, allow unsigned firmware - Mediatek: MT7928 support - Qualcomm: QCC2072 support - Broadcom: Synaptics 4384 support" * tag 'net-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2126 commits) Bluetooth: btusb: disable by default Qualcomm multi-subsystem tipc: fix broadcast sender hang on last acker departure tipc: fix use-after-free of broadcast reception link at node release r8169: clear TX LPI on RTL8168h at link up after phylink conversion tun: Require CAP_NET_ADMIN to attach to an ownerless device net/sched/sch_cake: drop dead nla_nest_end() error check net/sched/sch_cake: widen buffer_used to u64 net/sched/sch_cake: reduce parent backlog when clearing a tin net/sched/sch_cake: serialize reconfiguration with the datapath tg3: Add Datto SIRIS 5 1U Server to restart AER quirk table net/mlx5e: Stop asserting for RTNL when closing channels net: shrink the payload-only part of skb dataref to one bit net: wwan: iosm: validate msg_head before indexing msg_ring net: bgmac: rate limit RX error messages selftests: net: veth: test XDP_TX to a peer with GRO enabled veth: schedule the peer's NAPI after XDP_TX when only GRO is enabled pppoe: delete session hash entries by pointer match net: lan969x: don't disable hardirqs in fdma tx clear net: sparx5/lan969x: do not clobber the PSFP cycle timer update period net: lan969x: fix DSM calendar for empty taxis ...
7 daysMerge tag 'hardening-v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: - Provide kmalloc_obj*-style API for devm_kmalloc() - Improve seq_buf API for saner C String handling with several bug fixes along the way (Kees Cook, Bill Wendling) - Overflow helper readability improvements (Bill Wendling) - Unexport native_write_cr4() (Dennis Chen) - um: fix CONFIG_GCOV for built-in code (Johannes Berg) - Improve stackinit test coverage (Justin Stitt) - KMSAN: fix memset() when using fortify-source, again (Arnd Bergmann) - lkdtm: use kmalloc() instead of __get_free_page (Mahad Ibrahim) - signalfd: don't dequeue the forced fatal signals (Oleg Nesterov) - Fix randstruct to recognize new container_of() behavior - coccinelle: kmalloc_obj: Convert multi-byte integral allocations too - Fix a couple remaining allocation return type mismatches * tag 'hardening-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (29 commits) overflow: Match arithmetic in both parts of __builtin_choose_expr lkdtm: Make UNSET_SMEP built-in-only and unexport native_write_cr4() extcon: realtek: Remove const from type_c_cfg allocation type coresight: cti: Add const to con_groups allocation type docs: core-api: Document the seq_buf API nvdimm: ndtest: Return the string length from flags_show() powerpc/papr_scm: Return the string length from the sysfs show functions seq_buf: Add seq_buf_init_append() bpf: Remove dead newline stripping from format_disasm_line() seq_buf: Add seq_buf_terminate() seq_buf: Add seq_buf_strlen() seq_buf: Clear what a writer did not claim when a seq_buf overflows seq_buf: Copy what fits when seq_buf_puts() and seq_buf_putmem() overflow scsi: lpfc: Print rx monitor records straight into the seq_buf seq_buf: Do not pop from an overflowed seq_buf seq_buf: Do not print an empty line from an overflowed seq_buf_do_printk() .get_maintainer.ignore: Add Kees Cook devres: Provide kmalloc_obj*-style API for devm_kmalloc mm: Move default_gfp() into gfp_types.h kunit/stackinit: Clean up XFAIL under instrumentation ...
7 daysMerge tag 'execve-v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve update Kees Cook: "Make CIs happier about the execve tests: report the skipped binfmt_misc_bpf test on stderr (Sasha Levin)" * tag 'execve-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/exec: report the skipped binfmt_misc_bpf test on stderr
7 daysMerge tag 'seccomp-v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: - allow addfd to transfer O_PATH descriptors (Cong Wang) - allow restarting interrupted unreceived notifications (Cong Wang) - fix SECCOMP_ADDFD_FLAG_SEND when interrupted (Hui Peng) - Various docs and test clean-ups * tag 'seccomp-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: Split fork_and_close into clone and close tests seccomp: Document RESTART_BEFORE_RECV and O_PATH addfd selftests/seccomp: test addfd with an O_PATH descriptor seccomp: allow addfd to transfer O_PATH descriptors docs/seccomp: describe the SECCOMP_FILTER_FLAG_RESTART_BEFORE_RECV flag selftests/seccomp: cover restart of unreceived notifications seccomp: allow restarting interrupted unreceived notifications seccomp: restore knotif->state when SECCOMP_ADDFD_FLAG_SEND is interrupted
7 daysMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdmaLinus Torvalds
Pull rdma updates from Jason Gunthorpe: "A smaller cycle for features, still mostly AI and tool found bug fixes for long standing issues: - Bug fixes and minor cleanups across bnxt_re, cxgb4, EFA, ERDMA, HFI1, HNS, ionic, iRDMA, mlx4/mlx5, rdmavt, rtrs, RXE, SIW, SRP, isert and IPoIB. Lots of error unwind leaks, integer overflows, and use after free during teardown from timers/work that was not cancelled - Core fixes for uverbs DMABUF lifetime, RMPP reassembly use after free, multicast rb-tree corruption, restrack, and a user triggerable NULL deref when creating a WQ without a CQ - Prevent userspace from getting a writable mmap of the cxgb4 status page and the mlx4 clock page - Many rxe hardening fixes for bad user and network input, plus netdev and tunnel socket lifetime fixes - Peer supplied values are now validated in rtrs-clt, which is remote triggerable - umem now picks the DMA direction from the access flags instead of always using DMA_BIDIRECTIONAL, so an IOMMU can stop the device from writing to read-only memory. Several drivers were fixed to pin CQ and queue memory as writable to go along with this - SRQ support, firmware assigned CQ IDs and RCQ userspace support for ionic - RC QP improvements in MANA: MMQ creation, fixed size send WQEs and power of two send queues. Also multi-port GSI QPs and a rework of the UD send/receive and CQ polling paths - Relaxed ordering MRs for EFA - Non-contiguous kernel QP and CQ buffers for ERDMA - Move the mlx5 data direct infrastructure from mlx5_ib to mlx5_core so netdev can use it too. The data direct PCI driver is now named "mlx5_dd" - debugfs knob in hns to fix the SL used by the GSI QP, working around a HW problem with dropped CQEs - Selftest fixes, removal of the qib sysfs ABI docs, DT schema conversion for hns, and MANA maintainer handover" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (153 commits) RDMA/irdma: Bound in-flight CQP ops across deferred completions RDMA/mlx5: Validate priority in STEERING_ANCHOR_CREATE handler RDMA/mlx5: Fix CQ resize destination index mask RDMA/usnic: Bound buffer size to sizeof(buf) in flowinfo_read() RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv() dt-bindings: infiniband: Convert hisilicon,hns-roce-v1 to DT schema RDMA/srp: Avoid reading uninitialized has_port on srp_parse_in() failure RDMA/irdma: Fix PBLE_LEVEL_2 FRWR generation RDMA/core: Reject LAG selection when source MAC lookup fails RDMA/core: Free unpublished port statistics after initial-read failure RDMA/core: Preserve the selected source GID on failed AH modification RDMA/uverbs: Fix DMABUF use-after-free during ufile cleanup RDMA/uverbs: Fix uobject leak in DMABUF release RDMA/irdma: Fix FRWR IRDMAQPSQ_PBLADDR field population IB/rdmavt: Fix error unwind path for qp_priv_init() in rvt_create_qp() RDMA/irdma: Check MR contiguity before PBLE alloc IB/mlx4: Avoid requeueing executing CM timeout work RDMA/rxe: bound the WQE opcode before indexing rxe_wr_opcode_info[] RDMA/rxe: Fix out-of-range unsigned-to-signed conversion for RDMA message in 2GiB size RDMA/rxe: validate inline sge_offset in finish_packet() before indexing inline_data[] ...
7 daysMerge tag 'for-linus-iommufd' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd updates from Jason Gunthorpe: "Several bug fixes, probably found by AI based on the emails: - Several edge cases in the self test - Reject malformed invalidation commands in case the VMM let them through - Rework how the invalidation interface works to the drivers to be more robust and fix several Sashiko issues - Correct several error unwind paths - UAF during eventq file release - Reject more malformed usage of the dirty tracking by the VMM" * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: iommupt: Do not allow PTEs to be split when dirty logging iommufd/iova_bitmap: Ensure that iova_bitmap_set() handles the full IOVA iommufd: Reject a zero-length dirty bitmap request iommufd/iova_bitmap: Fail GET_DIRTY_BITMAP when a bitmap page cannot be pinned iommufd: Fix event queue release use-after-free iommufd: Keep dmabuf PFNs MMIO when filling another domain iommufd: Keep reserved IOVA ranges when a replace within one IOAS fails iommufd: Fix iommufd_hw_capabilities reference in kernel-doc iommu/vt-d: Convert nested cache invalidation to the core array loop iommu/arm-smmu-v3-iommufd: Convert cache invalidation to the core array loop iommufd/selftest: Convert cache invalidation mocks to the core array loop iommufd: Iterate the cache invalidation array in the core iommu/arm-smmu-v3-iommufd: Reject unsupported bits in invalidation commands iommufd/selftest: Skip when the mock device is not there iommufd/selftest: Return dmabuf fd from IOMMU_TEST_OP_DMABUF_GET again
7 daysMerge tag 'sched_ext-for-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext updates from Tejun Heo: - Proxy execution can now be enabled together with sched_ext. A BPF scheduler can opt in to receive mutex-blocked tasks that donate their scheduling context to the lock owner and place them itself. - Lazy preemption: a BPF scheduler can preempt or kick a CPU lazily, deferring the switch to the next return to user space or tick, as the fair class can. - Sub-schedulers: a parent now learns which child runs on each CPU it delegated and when a cap change takes effect. A detaching child loses its caps before the parent restores the CPUs. - New kfuncs re-enqueue single tasks from a dispatch queue iteration and report a cgroup's CPU count and a CID's NUMA node. The CID topology now includes clusters. - Hot path optimizations: dispatch queue and task lookups compare keys inline, remote task moves no longer take a dispatch queue lock twice, and sub-scheduler hooks cost nothing without sub-schedulers. - Kfuncs callable from tracing programs are hardened against NMI and IRQ nesting, which could hard-lock the CPU or pick a wrong idle CPU. - Built-in dispatch queues no longer allocate per-CPU state that grew with the square of the CPU count. - Header syncs with the scx repo, a BTF workaround for pahole 1.32, and selftest fixes and coverage. * tag 'sched_ext-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: (69 commits) sched_ext: Drop the locks periodically while walking a user DSQ for re-enqueue sched_ext: scx_qmap: Also re-enqueue stranded tasks with scx_bpf_dsq_reenq_task() sched_ext: Add scx_bpf_dsq_reenq_task() to re-enqueue single tasks from a DSQ iteration sched_ext: Factor out the rq lock switch of scx_dsq_move() sched_ext: Don't queue balance callbacks from a core-sched pick sched_ext: Don't leave balance callbacks queued across a pick retry sched_ext: Fix a bypassed task stalling on a cpu its scheduler has no caps on sched_ext: Fix the running task keeping its protection into bypass sched_ext: Fix use-after-free of a local reenq node left on an inactive cpu sched_ext: Keep proxy donors with slice left on the local DSQ selftests/sched_ext: Report reload_loop attach failures selftests/sched_ext: Bound exit waits selftests/sched_ext: Add SCX_ASSERT_ALIVE and adopt it selftests/sched_ext: Fail loudly when EXIT_KIND is missing from BTF sched_ext: Add SCX_ECODE_RSN_CGROUP_OFFLINE to user_exit_info.h selftests/sched_ext: Fix reload_loop error-path use-after-free selftests/sched_ext: Fix build error in dequeue_remote selftest sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes sched_ext: scx_qmap: Show actual cid use per participant ...
7 daysMerge tag 'cgroup-for-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - A write to cgroup.subtree_control or cgroup.type could hang in D state for as long as a task pinning a dying controller took to exit, as syzbot reported. The wait is now interruptible. - cpuset: the deadline bandwidth check ran on cpusets that weren't valid partition roots, failing cpuset writes with -EBUSY while deadline tasks existed. The CPU count the fair class takes from cpuset assumed a shared hierarchy that cgroup1 may not have. - Finding a cgroup's effective controller state no longer walks up the hierarchy, for per-I/O users such as nvmet. io.stat reads of cgroups without block devices skip the stat flush. - cpuset v1-only code moved to the v1 file and the exclusive flag dropped from v2, with documentation corrections for partition roots and boot-isolated CPUs. - Dead cgroups fail writes with -ENODEV consistently, plus small cleanups. - Selftest fixes, most visibly for tests that skipped on machines with many mounts, and a new pids.events notification test. * tag 'cgroup-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (27 commits) selftests/cgroup: test pids.events notification selftests: cgroup: make test_memcg_sock check flushed sock stats selftests: cgroup: skip test_memcg_sock under cgroup.memory=nosocket selftests/cgroup: Free the paths returned by cg_control() selftests: memcg: Don't close an uninitialized fd cgroup: Track the effective css in each cgroup cgroup/cpuset: Move cpuset_update_flag() to cpuset-v1.c selftests: cgroup: Preserve command arguments in with_stress.sh selftests: cgroup: Enable the cpu controller in test_cpu cgroup/cpuset: Use cpuset_v2() in cpuset_num_cpus() selftests/cgroup: add settings file with a longer timeout cgroup/cpuset: Remove CS_CPU_EXCLUSIVE handling code from v2 cgroup/cpuset: Run SCHED_DEADLINE shrink test on valid partition root only docs: cgroup-v2: Describe effective CPUs of partition roots docs: cgroup-v2: Describe boot-isolated CPUs in cpuset.cpus.isolated cgroup/cpuset: Remove redundant sched domain rebuild from update_prstate() selftests/cgroup: don't crash on a truncated mount entry in cg_find_root() selftests/cgroup: read the entire file in read_text() blk-cgroup: skip rstat flush for cgroups without blkgs cgroup: use assign_bit() where applicable ...
7 daysMerge tag 'landlock-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull Landlock update from Mickaël Salaün: "The main change adds composable Landlock controls for namespace types and Linux capabilities, thanks to new LSM hooks (merged via the LSM tree). A umount race condition is also fixed" * tag 'landlock-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Fix superblock use-after-free in release_inode() selftests/landlock: Fix snprintf truncation checks in test files landlock: Add documentation for capability and namespace restrictions samples/landlock: Add capability and namespace restriction support selftests/landlock: Add capability restriction tests selftests/landlock: Add namespace restriction tests landlock: Enforce capability restrictions landlock: Enforce namespace use restrictions landlock: Wrap per-layer access masks in struct layer_config landlock: Rename quiet_masks to quiet_access
7 daysMerge tag 'linux_kselftest-next-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: - Improve selftest build, run-time, and install framework Install even when some modules fail to build, print summary of test results at the end of the default test run, keep the build status from wrapping to success so build errors are reported, and optionally record per-suite build and install results. - Add LLVM support to kselftest_deps.sh - Fix resctrl, breakpoints suspend, ftrace, and tracing tests - Fix and enhance resctrl test * tag 'linux_kselftest-next-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: breakpoints: Skip step_after_suspend_test on systems without a wakeup capable RTC selftests: optionally record per-suite build and install results selftests: keep the build status from wrapping to success selftests/ftrace: Add nice dependency selftests: kselftest_deps.sh: Support LLVM selftests: lib.mk: Don't fail install if no modules were built selftests/ftrace: Avoid unlink error on first run tracing/selftests: Fix incorrect invocation of exit_fail selftests/lib.mk: run_tests: print summary at the end selftests/ftrace: skip gcov symbols when picking a function to probe selftests/resctrl: Enable dynamic management of IMC counters via linked list selftests/resctrl: Replace counter index references with pointers selftests/resctrl: Introduce linked list management for IMC counters selftests/resctrl: Skip L3_CAT when no exclusive cache portion exists
7 daysMerge tag 'spi-v7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Quite a lot of work in the SPI subsystem this time around, almost all in drivers rather than the core. As well as the general cleanup/fix work we're seeing over most of the kernel there's been some substantial performance work to two existing drivers and support for a number of new devices including a couple of new drivers. There was also a big overhaul of the spidev_test utility from the Pengutronix people. - Improvements for spidev_test to cover additional use cases, plus be a bit easier to use. - Substantial performance work in both DesignWare and Tegra210 QSPI drivers, making their interrupt handling more efficient to drive up hardware utilisation. - Documentation clarifications. - Fixes for some runtime PM and error handling issues. - Support for Nuvoton MA35D1, Qualcomm QPIC SNAND v2, Renesas R-Car Gen5 and X5H and Realtek RTD1625" * tag 'spi-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (136 commits) spi: ch341: handle transfers without a TX or RX buffer spi: dt-bindings: spi-qpic-snand: Add IPQ9650 compatible spi: spi-pci1xxxx: quiesce DMA engines on transfer timeout spi: amd: fix len==0 underflow and FIFO overflow spi: tegra114: initialize native chip selects inactive spi: bcm-qspi: reject oversized dummy bytes in mspi exec_mem_op spi: npcm-fiu: limit UMA data_size to the 16-byte staging buffer spi: omap2-mcspi: handle DMA setup failures spi: jcore: fix divide-by-zero when speed_hz is zero spi: cadence-xspi: fix stack buffer overflow in the Marvell b0 path spi: cadence-xspi: reject SDMA transfers larger than the requested length spi: meson-spicc: fix invalid DMA unmap on mapping failure spi: s3c64xx: Use snprintf() instead of sprintf() spi: omap2-mcspi: Use snprintf() instead of sprintf() spi: tle62x0: Use kstrtoul() instead of simple_strtoul() spi: lm70llp: Use strscpy() instead of strcpy() spi: butterfly: Use strscpy() instead of strcpy() spi: jcore: Use devm_platform_ioremap_resource() spi: sh-hspi: Use devm_platform_ioremap_resource() spi: ljca: validate the response length before copying the data ...
7 daysMerge tag 'gpio-updates-for-v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "Nothing stands out as particularly interesting, it's been a calm cycle. We have three new drivers, support for more models and lots of updates across many modules (details are in the signed tag as usual). There are also some minor changes and additions to the in-kernel GPIO API. GPIO core: - provide a new controller API: gpiochip_generic_get_config() - return -EOPNOTSUPP instead of -ENODEV to user-space if it requests hardware timestamping on systems where it's unavailable (no user-space regressions reported) New drivers: - add a driver for ROHM BD73800 PMIC GPIO controller - add a driver for Axiado AX3005 SGPIO controller - add a driver for Analog Devices AD7768 GPIO controller New hardware support: - extend gpio-rcar with support for R-Car X5H (R8A78000) - extend gpio-tegra186 with support for Tegra 268 Driver changes: - refactor and improve gpio-rtd1625: switch to modern or better fitting interfaces and improve coding style - improve error handling of return values of platform_get_irq_optional() in several drivers - normalize the return value of the gpio_chip::get() callback in gpio-siox in order to not propagate invalid values up to the GPIO core - implement gpio_chip::get_direction() for gpio-pcf857x - use managed variants of notifier registration functions in several drivers - remove legacy gpio_set_value_cansleep() as it has no more users - add pinctrl support to gpio-realtek-otto - add runtime PM support to the gpio-regmap helper module - add more ACPI GPIO quirks for various hardware - stop needlessly reading gpio_chip::base in gpio-pxa - add support for tracking of direction of generic GPIO chips with no direction registers via pinctrl backend to gpio-mmio (use the new core API: gpiochip_generic_get_config()) - use the "safe" variants of debugfs_create_file() in gpio-sloppy-analyzer - use device name as GPIO chip label in gpio-omap - refactor bit ops in gpio-dln2 - prepare gpio-it87 for upcoming kmalloc_obj() conversion Devicetree bindings: - document new model in gpio-pca95xx - allow the gpio-hogs property in gpio-zynq and fsl,qoriq-gpio - allow the gpio-ranges property in gpio-realtek-otto Misc fixes: - add missing MODULE_ALIAS() to gpio-crystalcove - fix a comment typo in example GPIO tools - fix unbalanced brackets in documentation - add names to regmaps in gpio-mvebu to avoid collisions in debugfs output - fix GPIO lookup using relative paths in GPIO ACPI" * tag 'gpio-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (63 commits) gpiolib: acpi: Fix GPIO lookup using relative path gpio: legacy: Kill gpio_set_value_cansleep() dt-bindings: gpio: pca95xx: add onnn,pca9655 with nxp,pca9555 fallback gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI gpio: pxa: stop reading gpio_chip::base in direction callbacks gpio: axiado: add AX3005 SGPIO controller support dt-bindings: gpio: add Axiado AX3005 SGPIO controller gpiolib: acpi: Add quirk for Lenovo IdeaPad Slim 3 15ABR8 MAINTAINERS: Add ROHM BD73800 PMIC files gpio: bd73800: Support ROHM BD73800 PMIC GPIOs clk: bd718x7: Support ROHM BD73800 regulator: bd71828: Support ROHM BD73800 rtc: bd70528: Support RTC on ROHM BD73800 mfd: Support for ROHM BD73800 PMIC core dt-bindings: mfd: ROHM BD73800 PMIC dt-bindings: regulator: ROHM BD73800 regulators dt-bindings: rohm,bd*: Ref common ROHM bindings dt-bindings: mfd: Common ROHM PMIC properties gpio: siox: normalize return value of gpio_get() gpio: dln2: use assign_bit() where applicable ...
7 daysdocs: xforms_lists: Handle DECLARE_KHOSER_PTR() struct membersPasha Tatashin
KHO ABI structures declare their preservation pointers with DECLARE_KHOSER_PTR(name, type), which expands to a union of the pointer and its physical address. kernel-doc does not know the macro and does not see the member: it warns that an unnamed member is not described and that the description of the member is excess. Translate DECLARE_KHOSER_PTR(name, type) into "type name", as is done for DECLARE_KFIFO_PTR(). Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Message-ID: <20261015020313.946940-1-pasha.tatashin@soleen.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 daysdocs: test_doc_build: don't select urllib3 yanked versionMauro Carvalho Chehab
Trying to install urllib3 gives a warning about a yanked version: WARNING: The candidate selected for download or install is a yanked version: 'urllib3' candidate (version 2.0.0 at https://files.pythonhosted.org/packages/ca/25/fe81738a115a2f1005b19bd69b6253b7b5cd6c9119164f13f02ec627fc41/urllib3-2.0.0-py3-none-any.whl (from https://pypi.org/simple/urllib3/) (requires-python:>=3.7)) To avoid that, use the recommended replacement (2.0.2) which should be enough to avoid the warning while keep using the same minor. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <09dc30b251c726910ef192b0f750b1c476cf52d4.1792053090.git.mchehab+huawei@kernel.org>
7 daysdocs: test_doc_build: address pylint warningsMauro Carvalho Chehab
Address existing pylint issues. While here, adjust some line breaks using black suggestions. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <1a790b550a158bb3b00e5471ba7351eac5185ece.1792053090.git.mchehab+huawei@kernel.org>
7 daysdocs: test_doc_build: update it to support newer Sphinx versionsMauro Carvalho Chehab
Current version is 9.1.0. Update the script to handle it. As there were python deprecations on newer versions, add support for those. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <ea7c1a2a8b5adecc2f4d9ccee7ef1f32fa8d0d78.1792053090.git.mchehab+huawei@kernel.org>
7 daysdocs: test_doc_build: better handle python versionMauro Carvalho Chehab
Make the python version logic more generic to allow adding more python degradation changes on more recent Sphinx tools. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <871255ee391ceae0d24ed18f31c1e91589d139c7.1792053090.git.mchehab+huawei@kernel.org>
7 dayscgroup/cpuset: Fix task checking when enabling a partitionGuopeng Zhang
Creating a child partition can fail when tasks are present in its descendants, even though the parent has no tasks of its own. On a cgroup v2 system with CPUs 0-7 online: cd /sys/fs/cgroup echo +cpuset > cgroup.subtree_control mkdir A echo 1-2 > A/cpuset.cpus echo root > A/cpuset.cpus.partition echo +cpuset > A/cgroup.subtree_control mkdir A/B echo 1-2 > A/B/cpuset.cpus echo +cpuset > A/B/cgroup.subtree_control mkdir A/B/C echo 1-2 > A/B/C/cpuset.cpus echo $$ > A/B/C/cgroup.procs echo root > A/B/cpuset.cpus.partition cat A/B/cpuset.cpus.partition root invalid (Parent unable to distribute cpu downstream) cat A/cpuset.cpus.effective 1-2 B should be a valid root, leaving A with an empty effective CPU list. The task in C belongs to B's partition and does not need CPUs in A. partition_is_populated() is called with B as excluded_child, but continue only skips B in the pre-order walk. The walk still visits C and finds the task there, so A is considered populated. Fix this by skipping the whole excluded subtree with css_rightmost_descendant(), as is already done for valid child partitions. Also add a test case to test_cpuset_prs.sh with a task in a grandchild cpuset. Fixes: b1bcaed1e39a ("cpuset: Treat cpusets in attaching as populated") Cc: stable@vger.kernel.org # v6.19+ Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn> Reviewed-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
8 daysMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netPaolo Abeni
Merge in late fixes in preparation for the net-next PR. Conflicts: net/netfilter/nf_conntrack_netlink.c cd37ab22a74e0 ("netfilter: nf_conntrack_netlink: fix inverted IPv6 tuple filter") 1ae2d094b0200 ("netfilter: ctnetlink: fix inverted IPv6 address match in dump filter") Adjacent changes: drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c 8830e65ed46de ("net: use assign_bit() where applicable") 07bd391eb957 ("octeontx2-af: Fix CQ enable state tracking after AQ writes") net/core/sock.c 31c5ea8a3296 ("ipv6: Remove IPV6_ADDRFORM.") 31b564f70d88 ("net: use the full socket in sk_mc_loop()") net/mptcp/protocol.h 0cb6910130a3 ("mptcp: remove thmac from subflow ctx") 7538fa33bb2f ("mptcp: fix subflow bitfield misuse") Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 daysMerge tag 'driver-core-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core Pull driver core updates from Danilo Krummrich: "Core: - Add TAINT_FORCED_BIND to taint the kernel and driver module before manual sysfs bind/unbind operations; make add_taint_module() available to driver core and update taint decoding tools and documentation - Constify device_show/store_*() attribute parameters and adapt x86 MCE and perf users to prepare for const dev_ext_attribute instances - Fix UAF in NUMA access node registration failure handling by dropping the device reference with put_device() instead of directly freeing the node debugfs: - Make debugfs_create_str() read-only to eliminate double-free races between concurrent writers; reject writable modes; convert interconnect and SoundWire users to local file operations with mutex-protected strings kobject: - Fix out-of-bounds access in kobject_action_type() when parsing action strings containing embedded NUL bytes - Fix the kobject_set_name() reference in kset_register() kernel-doc Rust: - DMA: - Tie Coherent, CoherentBox and CoherentHandle to the device's bound lifetime to prevent retaining DMA allocations beyond driver unbind; propagate the lifetime through nova-core and the DMA sample driver - I/O: - Require explicit base types for registers and replace relative registers with typed subregion projections; reimplement register!() as a proc macro, support registers using existing types without inline bitfields, and convert nova-core, Tyr and the PCI sample; add AsRepr/AsReprMut and transmute helpers with deferred size checks for representation conversions - Wrap ResourceSize in a transparent newtype with explicit conversions, including checked conversion to usize - PCI: - Add typed PCIe extended capability lookup and SR-IOV accessors for the First VF Offset and decoded VF BAR addresses and widths, keeping raw SR-IOV registers private to preserve PCI core ownership of their state - scatterlist: - Honor the device's maximum segment size as well as the DMA mapping limit when constructing SG tables - Return u32 from SGEntry::dma_len() to match the C segment length type - misc: - Validate auxiliary DeviceId name length explicitly to improve compile-time diagnostics for oversized device ID table entries - Drop unnecessary 'static bounds from debugfs ScopedDir file creation methods to support data containing non-'static references, including DMA buffers Misc: - Add Johan Hovold as driver core maintainer - Simplify platform_device_alloc() by returning early on allocation failure - Fix typos in driver core and kernfs comments" * tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (41 commits) rust: pci: add extended capability and SR-IOV support kobject: Fix the kobj_set_name reference in kset_register() kernel-doc rust: io: convert ResourceSize into a transparent newtype rust: scatterlist: return u32 from SGEntry::dma_len() MAINTAINERS: add myself as driver core maintainer debugfs: make debugfs_create_str() read-only soundwire: debugfs: replace writable string helper interconnect: debugfs: replace writable string helper docs: admin-guide: Handle TAINT_FORCED_BIND when parsing /proc/sys/kernel/tainted driver core: platform: Simplify platform_device_alloc() kobject: fix out-of-bounds access in kobject_action_type() rust: scatterlist: honor the device's maximum segment size driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers module: fix up documentation for add_taint() and add_taint_module() module: pull out add_taint_module() to be public driver core: Constify the signature of device_show/store_*() drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute rust: auxiliary: validate DeviceId name length driver core: fix typos in comments ...
8 daysMerge tag 'thermal-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "These are mostly updates of thermal drivers including a new Exynos ACPM thermal driver for Google GS101, new Renesas RZ/G3L thermal sensor support, new Qualcomm MSM8952 TSENS support, new Qualcomm PMAU0102 Master BandGap temperature monitor support in DT bindings, and new rugged Panther Lake support in intel_tcc_cooling. Moreover, the AN7583 driver is extended to register separate thermal zones for bandgap, GbE and CPU (its DT bindings are updated accordingly). There are also multiple fixes and assorted cleanups, as usual. Specifics: - Make the Intel powerclamp thermal driver reject invalid window_size values, drop redundant clamp() from duration_set() in it, and simplify 4 functions in it (Thorsten Blum) - Add rugged Panther Lake support to the intel_tcc_cooling thermal driver (Srinivas Pandruvada) - Fix temperature selection around 0 C in the int340x thermal driver, drop redundant else from proc_thermal_add() in it, and simplify slider_def_*_set() in it (Thorsten Blum) - Drop unbalanced paren from cpu-idle-cooling.rst (Manuel Ebner) - Use %pe to print error pointers symbolically in the thermal control code and fix assorted typos in comments in it (Sumeet Pawnikar and Hemanth Selam) - Add the Exynos ACPM thermal driver for Google GS101, along with DT bindings and a MAINTAINERS entry (Tudor Ambarus) - Add Renesas RZ/G3L thermal sensor support and DT bindings, and move default calibration values to per-SoC match data (Biju Das) - Add Qualcomm MSM8952 TSENS support and the corresponding DT binding compatible (Muzaffer Kadir) - Document the Qualcomm PMAU0102 Master BandGap temperature monitor compatible in the DT bindings (Dhruvin Rajpura) - Extend the QCom TSENS v2 trip temperature limits to the hardware range of -204°C to +204°C to prevent interrupt storms when operating beyond the previous software limits (Priyansh Jain) - Fix temperature threshold map indexing in the QCom SPMI temperature alarm driver to prevent out-of-bounds reads (Georgi Djakov) - Describe the additional bus clock required by the Amlogic T7 thermal sensor and switch the driver to the clk_bulk API to manage multiple clocks (Ronald Claveau) - Request the Airoha EN7581 IRQ after thermal zone registration to prevent the interrupt handler from accessing an unregistered or already freed thermal zone (Vitaliy Sochnev) - Fix the Airoha AN7583 ADC mux field mapping, serialize access to the shared ADC, and verify mux selection to avoid invalid temperature readings and spurious critical shutdowns (Vitaliy Sochnev) - Register separate thermal zones for the AN7583 bandgap, GbE and CPU sensors, and update the DT bindings to use one thermal sensor cell to select the sensor (Vitaliy Sochnev) - Fix signed integer overflow in the Renesas RZ/G3E temperature-to-code conversion, preserve compare interrupt state across runtime PM, and prevent overlapping temperature conversions (Ovidiu Panait) - Remove redundant trip window validation and runtime PM pm_runtime_mark_last_busy() calls from the Renesas RZ/G3E driver (Ovidiu Panait) - Propagate reset assertion failures from Renesas RZ/G3E suspend and attempt to restore power if the sensor was active (Pengpeng Hou) - Stop the TI bandgap alert IRQ before removing sensor interfaces and cancel pending alert work to prevent use-after-free on driver removal (Weigang He) - Validate Spreadtrum sensor IDs read from the device tree before using them for register offsets and array indexing (Weigang He) - Convert the TI OMAP bandgap DT bindings to schema and document the DRA752 compatible and thermal sensor cells (Bhargav Joshi) - Use DT property helpers matching the signed temperature and unsigned hysteresis types defined by the thermal zone bindings (Rob Herring) - Reuse common error handling code in the power allocator governor bind callback (Markus Elfring) - Constify the thermal zone device operations in the i.MX9 driver (Christophe JAILLET) - Fix kernel-doc parameter names and firmware node references in the cooling device registration helpers (Aryan Sinha) - Correct the documented return value of ti_bandgap_get_sensor_data() to describe validation errors and potentially NULL stored data (Karl Mehltretter) - Ensure NUL-termination when copying the cooling device command-line argument in tmon and fix the associated string truncation warning (Florian Fainelli) - Fix undefined behavior caused by a signed shift in the tmon thermal zone binding display (Liu Jing) - Fix wording in tmon comments (Hemanth Selam) - Simplify cpufreq_set_cur_state() in the cpufreq_cooling thermal control driver (Thorsten Blum)" * tag 'thermal-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (51 commits) thermal/drivers/rzg3e: Propagate reset assertion failure from suspend thermal: ti-soc-thermal: Fix the return value in ti_bandgap_get_sensor_data() kernel-doc thermal/fw: Fix kernel-doc parameter names thermal/qcom/tsens: Add support for MSM8952 tsens dt-bindings: thermal: tsens: Add MSM8952 thermal/drivers/amlogic: Switch to clk_bulk API to support multiple clocks dt-bindings: thermal: amlogic: describe bus clock for t7-thermal tools/thermal/tmon: Fix string truncation warning in optarg copy thermal/drivers/airoha: Register a thermal zone per AN7583 sensor dt-bindings: arm: airoha: Use one thermal sensor cell for AN7583 thermal/drivers/airoha: Serialise access to the shared ADC thermal/drivers/airoha: Fix AN7583 ADC mux field mapping thermal/drivers/sprd: validate the sensor id from the device tree thermal/drivers/ti-soc-thermal: Cancel pending alert work on remove thermal/drivers/qcom-spmi-temp-alarm: Fix temp_map indexing thermal: gov_power_allocator: Use common error handling code in power_allocator_bind() tools/thermal/tmon: Fix signed shift UB in binding display MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver thermal/drivers/samsung: Add Exynos ACPM TMU driver GS101 dt-bindings: thermal: Add Google GS101 TMU ...
8 daysselftests: net: veth: test XDP_TX to a peer with GRO enabledTianyi Gao
Test that XDP_TX frames reach a peer that has GRO enabled and no XDP program. GRO enables NAPI on the peer, so the frames are queued on the peer's ring, and the peer's NAPI must be scheduled to process them. Attach a program that returns XDP_TX for every frame, send 5 echo requests and check that all of them were sent back and that the peer's NAPI received them, as counted in its xdp_packets statistic. IPv6 is disabled on both devices, so that only the echo requests are counted. Add the program to xdp_dummy.bpf.c in a section of its own, so that the tests that load "section xdp" still get XDP_PASS. Signed-off-by: Tianyi Gao <tianyi@cloudflare.com> Link: https://patch.msgid.link/20261016214217.16942-3-tianyi@cloudflare.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 daysMerge tag 'pm-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "This time, the most visible part are the ACPI CPPC updates from Christian Loehle, including CPPC cpufreq driver changes, even though updates of cpufreq drivers proper are still the largest topic group. However, the updates of cpufreq drivers depend on the ACPI CPPC updates, so they should really be counted together and that is well over 1/2 of the total commit count. Interestingly enough, almost all of the updates included here are fixes or cleanups, with some new feature support in the amd-pstate cpufreq driver and IPQ9650 support in the qcom-nvmem cpufreq driver. The runtime PM documentation improvements from Brian Norris can also be mostly regarded as fixes, but a new kunit test goes along with them. Specifics: - Fix multiple issues related to input validation, synchronization, access safety, memory layout and register field validation, and error handling in the ACPI CPPC library (Christian Loehle and Sumit Gupta) - Select the frequency-invariance callback per CPU in the CPPC cpufreq driver and create the FIE worker before enabling PCC callbacks in it to avoid queueing work through a missing worker and dereferencing a NULL pointer (Christian Loehle) - Update the CPPC cpufreq driver entry in MAINTAINERS and add a new entry for the ACPI CPPC library (Christian Loehle) - Minor fixes in various cpufreq drivers (Alexander Koskovich, Daniel Schwierzeck, Frank Zhang, Haotian Zhang, Kathiravan Thirumoorthy, Sumeet Pawnikar, and Xueqin Luo) - Fix wrong behaviors on multi-node servers in the Loongson cpufreq driver (Huacai Chen) - Reject NULL from cpufreq_cpu_get() in the Rust code (Mehmet Koseoglu) - Add suspend OPP to mediatek cpufreq driver and DT (Ryan Brue) - Fixups for a few bugs identified by Sashiko in the amd-pstate cpufreq driver (Mario Limoncielloi, Wentao Guan) - Initial support for maximum frequency capacity handling on Zen6 client in amd-pstate (Mario Limonciello) - Fix for amd-pstate-ut with 'Requested CPU Min frequency' BIOS option (K Prateek Nayak) - New Zen6 tuning values for EPP in amd-pstate (Mario Limonciello, Vishal Badole) - amd-pstate documentation fix (Karl Mehltretter) - Restrict deferred downscaling to low load for shared policies in the conservative cpufreq governor to avoid undesirable CPU frequency reduction in some cases (Shengming Hu) - Serialize sugov_start() against rate limit updates in the schedutil cpufreq governor to avoid using a stale rate limit value (Hui Su) - Prevent cpuidle governors menu and teo from returning idle state 0 after it has been disabled (Xueqin Luo) - Replace min_t() with the better alternatives in the intel_idle driver and make it use 2-argument strscpy() (Andy Shevchenko) - Fix two repeated phrase instances in cpuidle (Hemanth Selam, Syazwina Fazrul) - Add rugged Panther Lake support to the intel_rapl power capping driver and make it use %pe for printing error pointers (Srinivas Pandruvada and Sumeet Pawnikar) - Update and improve runtime PM documentation and add a kunit test for supplier idle/suspend (Brian Norris) - Add a pm_runtime_dont_use_autosuspend() call to pm_runtime_reinit() to ensure autosuspend disabling on driver teardown (Joshua Crofts) - Ignore page-zero RAM in E820 checksum during hibernation on x86 to avoid rejecting images created after kexec() (Matthias Goergens) - Add resume event mapping for PMSG_POWEROFF to the PM core to allow it to carry out device shutdown in the future (Mario Limonciello) - Add DPM watchdog to prepare/late/early/noirq/complete phases of device suspend and resume (Mayank Rungta) - Update swsusp.txt references to swsusp.rst in hibernation documentation (Li Jun) - Fix use-after-free of perf domain in netlink doit handlers for energy models (Fan Wu) - Add synchronize_rcu() back to cpu_pm_unregister_notifier() after it was removed inadvertently in previous development cycles to avoid use-after-free (Bradley Morgan) - Unregister CPU PM notifier outside the timer lock in the timer-ti-dm clocksource driver (Bradley Morgan) - Fix typo "sucessfully" in a comment in pm_clk_add_clk() kerneldoc comment and typo "hierachy" in a comment in pm-graph (Hemanth Selam) - Fix the return value in dev_pm_opp_get_of_node() kernel-doc (Karl Mehltretter)" * tag 'pm-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (89 commits) cpufreq: loongson3: Replace IOCSR read/write with MMIO ones cpufreq: loongson3: Use global physical CPU ID in get/target callbacks cpufreq: loongson3: Replace per-package mutex with per-node cpufreq: loongson3: Adjust the width of id and val in smc_message cpufreq: loongson3: Make this driver depend on MACH_LOONGSON64 PM: runtime: Expand introduction with core concepts and structure cpufreq: schedutil: Serialize sugov_start() against rate limit updates MAINTAINERS: ACPI: Add a separate CPPC entry MAINTAINERS: cpufreq: Replace CPPC reviewer arm64: dts: mediatek: mt8173: Mark the lowest CPU OPPs for suspend cpufreq: mediatek: Enter system sleep at the suspend OPP cpufreq: qcom-cpufreq-hw: fix device node refcount leak in phandle parsing cpufreq: qcom-nvmem: Add IPQ9650 support cpufreq: Add Milos to cpufreq-dt-platdev blocklist cpufreq: Use %pe to print error pointers symbolically rust: rcpufreq_dt: add module alias cpufreq: sti: avoid NULL dereference in dev_err() cpufreq: tegra194: fix double-pointer error in get_cpu_ndiv cpufreq: sparc-us2e: fix frequency table index copy-paste error rust: cpufreq: reject NULL from cpufreq_cpu_get() ...
8 daysMerge tag 'timers-core-2026-10-20' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer core updates from Thomas Gleixner: "Updates for the core timekeeping and timers subsystem: - Futher cleanups for the POSIX timer exit/exec related code to simplify the code flow and to make it more robust against future changes. - Prevent tearing of timekeeper::ktime_sec which can be accessed without the sequence count protection. The timekeeper is updated by memcpy() with an uneven sequence count to force readers into the retry path. On 64-bit machine the ktime_sec member can be accessed atomically without the sequence count protection. That is only correct when the update side memcpy() guarantees atomicity at the 64-bit granularity. That's not guaranteed due to debug options, compilers and instruction availability. If the memcpy() does not provide the atomicity then the unprotected readers can observe store tearing. To prevent this write the ktime_sec member before the memcpy() so that a non-atomic memcpy() will write the same data. A similar fix has been done for the xtime_sec member, but the ktime_sec equivalent was missed. - Prevent time64_to_tm() day truncation on 32-bit kernels The function receives a 64-bit seconds value but stores the quotient of the computation in a long, which truncates the result for large input values. Cure this by using div_s64_rem() which stores the quotient in s64 and only leaves the seconds-within-day reminder in a long, which is guaranteed to fit. This fix comes with a corresponding kunit test to prevent further mishaps. - Mark data-racy accesses to the hrtimer_sleeper::task member. The recent updates to KCSAN flagged these benign races. Annotate them with new helper functions, convert all existing usage sites and mark the task member private after that so that future users which fail to use the helpers can be detected automatically. - Address similar benign KCSAN flagged issues in the hrtimer, timer and timer migration code. - Fixes for a few selftest issues" * tag 'timers-core-2026-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits) selftests/timers: clocksource-switch: Fix unchecked open()/read() selftests: timers: Measure the CPU timers on the clock they count selftests: timers: Count what tick is worth in the drift estimate time/kunit: Add time64_to_tm() case beyond 32-bit day count time: Prevent time64_to_tm() day truncation on 32-bit timekeeping: Use READ_ONCE/WRITE_ONCE() for ktime_sec to prevent tearing timers/migration: Mark racy updates to tmigr_event::ignore field timers: Mark racy updates to hlist_node::pprev field hrtimer: Apply READ_ONCE() to lockless base->running loads hrtimer: Mark the hrtimer_sleeper structure's ->task field __private hrtimer: Update hrtimer_resolution only if value changes futex: Use accessor for hrtimer_sleeper ->task field in requeue rtmutex: Use accessor for hrtimer_sleeper ->task field net: pktgen: Use accessor for hrtimer_sleeper ->task field timers: Use accessor for hrtimer_sleeper ->task field in sleep_timeout.c futex: Use accessor for hrtimer_sleeper ->task field in waitwake.c io-uring/rw: Use accessor for hrtimer_sleeper ->task field wait: Use accessor for hrtimer_sleeper ->task field aio: Use accessor for hrtimer_sleeper ->task field hrtimer: Mark data-racy accesses to hrtimer_sleeper ->task field ...
8 daysMerge tag 'kbuild-7.4-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux Pull Kbuild / Kconfig updates from Nathan Chancellor: "Kbuild: - Suppress compiler flags in debug info for external module builds - Use '-fmacro-prefix-map' in more places in the build - Merge initial set of changes from Lorenzo's speed up series, along with some fixes found through testing: - Avoid allocating .modinfo in vmlinux - Speed up kallsyms by indexing symbols by token and outputting binary data to disk directly then including in assembly via .incbin - Don't sort $(NM) output when unnecessary - Only emit relocations on the final vmlinx link - Reimplement mksysmap in C - Move many cc-option and ld-option calls into the Kconfig stage to cache their results - Use pigz for gzip compression when available - Move gen_init_cpio and gen_initramfs.sh from usr/ to scripts/ - Add a TOML configuration to scripts/container and update documentation accordingly - Add a generic, opt-in mechanism for checking that headers can compile standalone - Update machine function splitting argument for LLVM 24 rename in AutoFDO build - Miscellaneous minor clean ups, fixes, and hardening, mostly found/fixed via LLMs Kconfig: - Turn recursive ranges into an error - Fix savedefconfig for defaults that were adjusted for being out of range and revert a previously applied workaround - Improvements and hardening around integer and hexadecimal values - Emit a warning when selecting or implying a choice symbol, which has no effect - Emit a warning when KCONFIG_PROBABILITY is malformed - Introduce def_string / def_int / def_hex to mirror the existing def_bool / def_tristate to succinctly set a value and type at the same time. - Add cc-option-str and ld-option-str macros to act like Kbuild's cc-option and ld-option, returning the string when the option is supported, allowing many checks to be moved into Kconfig - Minor usability improvements to Kconfig tests" * tag 'kbuild-7.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: (59 commits) kbuild: AutoFDO: Update split machine function argument for upstream rename kbuild: Mark the initcall ordering recipe as recursive kbuild: Mark the gzip recipes as recursive localmodconfig: Explicitly report boolean configs during integrity check scripts/make_fit: Ignore schema checks when decomposing DTBs clang-tools: Import os for broken pipe handling kconfig: use the value argument in sym_get_near_range_bound() kconfig: fix infinite loop in conf_choice() when no choice value is visible kconfig: cleanup stale comment about 'keys' array kconfig: Improve ergonomics around disabling warnings with cc-option scripts/Kconfig.toolchain: Drop compiler symbols from dependencies checkkconfigsymbols.py: Parse Git status output line by line gen_init_cpio: stop parsing on lines with a missing argument list .gitignore: drop Module.markers .gitignore: ignore pacman package signatures kbuild: add header check facility as a manually run static analyzer Documentation: dev-tools: refer to user ID rather than id Documentation: dev-tools: update container.rst with config file scripts: add TOML config to container tool kconfig: tests: {old,save}defconfig: Forward dynamic keyword arguments ...
8 daysMerge tag 'rcu.2026.10.12b' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux Pull RCU updates from Paul McKenney: "Execution contexts and call_rcu() and call_srcu(): - Make call_rcu() and call_srcu invocable from NMI handlers and while holding scheduler locks (using irq-work handlers) - Add rcutorture and BPF tests calling these functions from these contexts - Disable rcutorture overload testing for RCU readers that are "fragile", that is, that do not either disable preemption or have some form of RCU priority boosting SRCU updates: - Add an atomic SRCU where readers run with preemption disabled and grace periods can be invoked from atomic contexts. David Woodhouse has a patch series exploiting this for GPC - Add torture and lockdep tests for atomic SRCU - Add numerous optimizations for atomic SRCU based on the fact that it does not have callbacks, for example, eliminating any transition to "big" srcu_struct structures even on systems that configure these to happen at initialization time Additional torture-test updates: - Fix a divide-by-zero bug in forward-progress testing - Synchronously wait for all IRQ-queued callbacks to complete - Allow alternative "ssh" commands to be specified for use by kvm-remote.sh - Fix kvm-again.sh re-run failure on PowerPC - Add additional lockdep testing for atomic SRCU - Fix error double-counting in srcu_lockdep.sh - Add atomic SRCU cross-CPU IRQ context mismatch testing, with the - trick being that the atomic SRCU readers context must be at least as strict as that of the atomic SRCU grace-period wait. So for example, if the readers have IRQs disabled, so must the grace-period wait Miscellaneous updates: - Update stallwarn.rst documentation for the re-implementation of RCU Tasks Trace in terms of SRCU - Fix the lazy-callback shrink scanner budget computation so that it honors the reclaim budget - Avoid panicking on RCU CPU stalls that end before the warning can be printed - Add "running" and "boosted" indications to the RCU task stall warning output - People have been (incorrectly) relying on rcu_barrier() to wait for kfree_rcu() callbacks and processing. But it turns out to be easier to fix rcu_barrier() to meet their expectations than to fix their code to live within the earlier rcu_barrier() specification. So rcu_barrier() now waits on kfree_rcu() callbacks and processing - Disable RCU Tasks console output that track when this RCU flavor switches between per-CPU and global callback queuing. New use cases appeared that generated enough console traffic to cause trouble, and no one seemed to care about these messages. For those needing those messages, there is a new rcupdate.rcu_task_collapse_debug kernel boot parameter - Fix __rcu pointer attribute handling to eliminate false positives - Fix typos and drop redundant #include directives" * tag 'rcu.2026.10.12b' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux: (46 commits) rcutorture: Add atomic SRCU cross-CPU IRQ context mismatch test selftests/rcutorture: Fix double nerrs count in srcu_lockdep.sh selftests/rcutorture: Wire atomic SRCU into srcu_lockdep.sh rcutorture: Add atomic SRCU lockdep support rcutorture: Fix kvm-again.sh re-run failure on ppc64 torture: Allow specifying alternative ssh command to kvm-remote.sh rcutorture: Synchronously wait for all rcu_torture_irq() callbacks to complete rcutorture: Fix divide-by-zero with fwd_progress_div=1 srcutree: Preserve IRQ state in synchronize_srcu_atomic() callchain srcutiny: Add lockdep and early-boot checks to synchronize_srcu_atomic() srcutree: Add lockdep and early-boot checks to synchronize_srcu_atomic() srcutree: Skip torture to-big transition for atomic SRCU srcutree: Don't transition atomic SRCU to big in srcu_gp_end() srcutree: Make init_srcu_struct_atomic() prevent transition to big srcu: Restrict atomic-SRCU non_block annotation to task context srcutree: Remove srcu_barrier() sleep for atomic SRCU srcutree: Skip callback scheduling for atomic SRCU grace periods srcutree: Add reader-free fastpath to synchronize_srcu_atomic() rcutorture: Add atomic-SRCU support to torture.sh srcutree: Explicitly note DEFINE_SRCU() needs for srcu_barrier() ...
8 daysMerge tag 'bitmap-for-v7.4-rc1' of https://github.com/norov/linuxLinus Torvalds
Pull bitmap updates from Yury Norov: "This includes __MAKE_OP() macro removal from me with the follow-up from Mark, cleanups for bitmaps parser from Shashank and a couple Rust docs fixes from Georgios" * tag 'bitmap-for-v7.4-rc1' of https://github.com/norov/linux: rust: bitmap: document panics in `next_bit` and `next_zero_bit` rust: id_pool: document panics in `find_unused_id` and `release_id` bitmap: test bitmap_parselist() with a group size close to UINT_MAX bitmap: bitmap_parselist(): don't wrap around on a huge group size bitmap: test bitmap_parselist() with text after the group size bitmap: bitmap_parselist(): reject trailing characters after group size bitmap: test bitmap_parse() with an illegal character before 8 hex digits bitmap: bitmap_parse(): reject non-hex character before 8 digits bitfield: Restore be16_replace_bits() bitfield: get rid of __MAKE_OP machinery
8 daysselftests/bpf: Time tc_edt from its first packet with dataQiliang Yuan
tc_edt sends 1MB over a TCP connection that a BPF program shapes with EDT, and checks that the rate it measures is within 2% of the target rate. The transfer takes about 200ms, so the margin is about 4ms. The measurement starts before send_recv_data(), which first creates the sender thread and accepts the connection. On a KASAN kernel, x86_64 VM with 32 vCPUs, that takes 0.7ms when idle and up to 4.7ms with all CPUs busy, while the BPF program spreads the data over 200.08ms in the median. The test also fails without test_progs -j where everything runs slower, e.g. on s390x and with ASAN in BPF CI. Have the BPF program note when the first packet with data goes out, and start the measurement there. tc_edt run 100 times on the same VM, idle and with 32 busy loops in the background, before and after this patch: before after idle 0 of 100 failed 0 of 100 failed busy loops 3 of 100 failed 0 of 100 failed Fixes: b0f82e7ab6fb ("selftests/bpf: integrate test_tc_edt into test_progs") Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://patch.msgid.link/20261019-selftests-bpf-tc-edt-serial-v2-1-41c3813e7916@gmail.com
8 daysselftests/bpf: Test unwind_exit of an exception callbackAlexei Starovoitov
In both tests the prog that throws returns to a call that unwind_goto follows, and its exception callback ends with unwind_exit: - An extension replaces a subprog that cannot unwind. unwind_goto after the call stays, since it shares the pad with a call of a subprog that can unwind. - A subprog that can unwind does a tail call. unwind_exit of the callback has to be exit. Without the fix the callers go to the pad and return 2 instead of 3 and 42 instead of 7. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261020231942.2568163-4-alexei.starovoitov@gmail.com
8 daysselftests/bpf: Tests for 32-bit scalar evolution bounds computationEduard Zingerman
The post32_* tests exercise scev.c:compute_max_iters(): - 32-bit to 64-bit operand extension and overflow handling. - <, <=, >, >=, s<, s<=, s>, s>=, != operations. - Checks exact boundary hits and overflow at S32_MIN, S32_MAX, and U32_MAX. The post_cond_jne32* tests exercise zero-extension logic in scev.c:linear_bounds(): - 32-bit unsigned wraparound. - Entry and zero-extended iteration values disagreeing on base/step, requiring the step to be reduced. - Widened bounds containing both the original entry value and the zero-extended iteration values. - Preserving step and base when that union crosses the signed 64-bit boundary. The post_cond_alu{32,64}_jmp{64,32} tests cover mixed-width recurrences and comparisons: - Declining to compute an iteration count when operands or the predicted exit fall outside the required 32-bit ranges. - Computing iteration counts and widened bounds for compatible mixed-width loops. Also add a basic pre-condition loop test. Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261020-scev-32bit-v1-2-838f34f9f0cd@gmail.com
8 daysbpf: Support 32-bit linear scalar evolutionEduard Zingerman
Representation -------------- Represent ALU32 recurrences as: w0 += step -> (zext32 (linear r0 step)) Extend simplify() rules to maintain the above form for latch expressions. E.g. for a post-condition loop such as: w0 = 0; l: w0 += 1; if w0 != 3 goto l; exit; SCEV at header: (zext32 (linear r0 1)) Initial SCEV at latch: (zext32 (+ (zext32 (linear r0 1)) 1)) Simplified SCEV at latch: (zext32 (+ (zext32 (linear r0 1)) 1)) -> (zext32 (+ (linear r0 1) 1)) -> (zext32 (linear (+ r0 1) 1)) Iterations count computation ---------------------------- - Extract the main iteration-count logic from compute_max_iters() into compute_backedge_taken_count(). Reuse its 64-bit arithmetic after sign/zero extending the latch operands. - Reject the computed count if the predicted exit value falls outside signed/unsigned 32-bit range, e.g.: w0 = 0x7ffffffe; l: w0 += 1; if w0 s<= 0x7fffffff goto l; The 64-bit computation predicts an exit at S32_MAX + 1, but the 32-bit value wraps to S32_MIN and the comparison remains true. - Handle mixed 64-bit/32-bit comparisons/recurrences only when initial bounds and step fit in 32-bit ranges, e.g.: w0 = 0; r1 = 0x100000003 ll; l: w0 += 1; if r0 != r1 goto l; Truncating the bound to 32 bits would predict three header visits. However, `w0 += 1` keeps r0 within [0, U32_MAX], so it can never be equal to the 64-bit bound. Widened bounds computation -------------------------- - Update linear_bounds() to truncate the initially computed 64-bit range to 32 bits, then zero-extend it to obtain the 64-bit range of iteration values. Step computation needs to handle: - unsigned 32-bit wraparound; - entry and zero-extended iteration values disagreeing on base/step. - Union both ranges with the corresponding register ranges at entry, since the entry value need not be zero-extended. - Extend `struct bounds` to keep both {32,64}-bit ranges and pass both to bpf_set_reg_range(). A 64-bit range alone loses useful 32-bit information, e.g.: entry = 0, step = -1, two header visits r64: [0, U32_MAX] r32: [-1, 0] Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261020-scev-32bit-v1-1-838f34f9f0cd@gmail.com
8 daysselftests: ALSA: pcmtest: Compare all captured bytes in ni_captureHyeongJun An
The ni_capture test reads rate * time frames into each channel buffer and then compares rate * time bytes. A frame is sample_size bytes per channel, so with S16_LE only the first half of each channel is checked. If the second half is wrong the test still passes. Compare rate * time * sample_size bytes per channel. Fixes: 10b98a4db11a ("selftests: ALSA: Add test for the 'pcmtest' driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An <sammiee5311@gmail.com> Link: https://patch.msgid.link/20261021112554.4037107-1-sammiee5311@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 daysselftests/alsa: Check the aloop PCM Slave controls for a matching playbackHenrik Enquist
Add a test that starts a playback with the same parameters as a running capture, and checks that the capture keeps running and that the "PCM Slave" controls report the playback's parameters, with a value event for each control that changed. Before the previous patch, the controls keep the parameters of the earlier stream and the test fails. Signed-off-by: Henrik Enquist <henrik.enquist@gmail.com> Link: https://patch.msgid.link/20261021-aloop-slave-controls-v1-2-62297727177f@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 daysvsock/test: cover SO_INQDavid Carlier
Check the SCM_INQ value after a partial receive, after draining the queue and at EOF, that no cmsg is sent while the option is off, that accepted sockets inherit it from the listener, and that out of range values and SOCK_SEQPACKET are rejected. Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Acked-by: Bobby Eshleman <bobbyeshleman@meta.com> Signed-off-by: David Carlier <devnexen@gmail.com> Link: https://patch.msgid.link/20261016132716.272018-4-devnexen@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
9 daysselftests: net: add a test for the gtp netlink familyAnil Kaushik
Exercise the gtp generic netlink family through its ynl spec: create a gtp device, add a PDP context with newpdp, check getpdp dumps it on that device with the expected TEIDs and addresses, and that delpdp by TEI removes it. Two more cases check that two contexts are dumped and one can be deleted by its MS address, and that deleting an unknown context fails with ENOENT, both by TEI and by MS address. ynl resolves the family ids once per process, with a CTRL_CMD_GETFAMILY dump which does not autoload modules, so the gtp device is created before the family handle: that loads gtp.ko through its rtnl link alias. The test is skipped when the kernel or iproute2 lack GTP support; any other failure to create the device fails it. Add a GtpFamily ynl wrapper and register the test. Signed-off-by: Anil Kaushik <anilkaushikwireless@gmail.com> Link: https://patch.msgid.link/20261016093225.1036375-5-anilkaushikwireless@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
9 daysnetlink: specs: add genetlink-legacy spec for GTPAnil Kaushik
The GTP (GPRS Tunnelling Protocol, user plane) generic netlink family has no YAML specification under Documentation/netlink/specs/, so it cannot be consumed by the ynl tooling used for user-space clients, documentation and selftests. Add a genetlink-legacy spec describing the existing family: the PDP context management commands (NEWPDP, DELPDP, GETPDP) and the GTP-U echo request (ECHOREQ), the GTPA_* attribute set, and the "gtp" multicast group. Command and attribute values are taken from include/uapi/linux/gtp.h and match it one-to-one. The request attributes of each command are the ones its handler in drivers/net/gtp.c reads, and the reply attributes the ones gtp_genl_fill_info() emits. The notifications sent on the "gtp" group are not described: they reuse the command values of the NEWPDP, DELPDP and ECHOREQ requests, which the ynl code generator cannot express with the existing uapi header. The family doc says so. Add the matching CFLAGS_gtp entry to tools/net/ynl/Makefile.deps, so the generated code is built against the tree's gtp.h instead of an older one installed on the host. This only adds the description; there is no kernel code or uapi change. Signed-off-by: Anil Kaushik <anilkaushikwireless@gmail.com> Link: https://patch.msgid.link/20261016093225.1036375-4-anilkaushikwireless@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
9 daysselftests: ALSA: pcmtest: Make room for the longest fill patternHyeongJun An
The driver accepts fill patterns of up to 4096 bytes, as pcmtest.rst documents. The test reads each pattern into a 1024-byte buffer, using the length the driver reports. So a pattern longer than 1024 bytes overflows the buffer into the next pattern and past the array. Size the buffer to the driver's maximum. Fixes: 10b98a4db11a ("selftests: ALSA: Add test for the 'pcmtest' driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An <sammiee5311@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/7cbbcef84d2c14a2f0ec0ad2ba55c6ba0a15a8d8.1792390197.git.sammiee5311@gmail.com
9 daysselftests: ALSA: pcmtest: Check the frame count of each transferHyeongJun An
The tests keep the result of snd_pcm_writei(), snd_pcm_readi() and their non-interleaved forms in a size_t. A size_t is never negative, so ASSERT_GE(res, 0) always passes. The capture tests still catch a failed read when they compare the data. But the playback tests do not. The driver sets pc_test to 1 when it saw no corrupted data, and that is also true when it saw no data at all. So a playback test passes even when every write fails. Store the result as snd_pcm_sframes_t and check that the whole request was transferred. The calls block, so a short count means an error. Fixes: 10b98a4db11a ("selftests: ALSA: Add test for the 'pcmtest' driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An <sammiee5311@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/6f16e2a01f18c0ea069164bab31999182ff6d49e.1792390197.git.sammiee5311@gmail.com
9 daysselftests: net: test AF_PACKET multicast dumpsYuyang Huang
Dump the link-layer multicast addresses of a dummy device and verify that ifa_index restricts the dump to that device, that the all-hosts address joined on link up is listed without IFA_F_GLOBAL, that an address added with SIOCADDMULTI is listed with IFA_F_GLOBAL and IFA_MC_USERS, and that IFA_TARGET_NETNSID dumps another netns. Signed-off-by: Yuyang Huang <sigefriedhyy@gmail.com> Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Link: https://patch.msgid.link/20261012011707.3378-7-sigefriedhyy@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>