summaryrefslogtreecommitdiff
path: root/include/uapi
AgeCommit message (Collapse)Author
8 hoursMerge tag 'char-misc-7.4-rc1' of ↵HEADmasterLinus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull Char/Misc/IIO/others driver updates from Greg KH: "Here is the big set of char/misc/android/iio and other small driver subsystem patches for 7.4-rc1. Loads of stuff in here, larger than normal. Highlights include: - removal of the C binder code, the rust version is stable and will be used going forward in a few billion devices. Great job by those developers - loads and loads of IIO driver updates and feature additions - speakup driver fixes and updates - mhi driver updates - mei driver updates - xillybus driver fixes - comedi driver fixes - lots of coresight driver updates - Interconnect driver updates - nvmem driver updates and fixes - slimbus driver updates and fixes - spmi driver updates and fixes - lots of tiny misc and char driver fixes based on people scanning for things All of these have been in linux-next for a while with no reported issues, other than a merge conflict with one of the rust tree files, which should be simple to resolve" * tag 'char-misc-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (446 commits) rust_binder: wake epoll on self-work queued to poll thread rust_binder: avoid overflow in get_node_debug_info() MAINTAINERS: Add Abel as SPMI co-maintainer spmi: mtk-pmif: Fix clock reference leak in mtk_spmi_bus_probe() iio: adc: qcom-spmi-iadc: Remove regmap R/W wrapper functions iio: adc: qcom-spmi-iadc: Migrate to devm_spmi_subdevice_alloc_and_add() misc: qcom-coincell: Migrate to devm_spmi_subdevice_alloc_and_add() phy: qualcomm: eusb2-repeater: Migrate to devm_spmi_subdevice_alloc_and_add() power: reset: qcom-pon: Migrate to devm_spmi_subdevice_alloc_and_add() nvmem: qcom-spmi-sdam: Migrate to devm_spmi_subdevice_alloc_and_add() spmi: Add helper to get a parent SPMI device spmi: Implement spmi_subdevice_alloc_and_add() and devm variant spmi: Remove unneeded goto in spmi_device_add() error path spmi: Print error status with %pe format spmi: Remove redundant dev_name() print in spmi_device_add() spmi: Fix potential use-after-free by grabbing of_node reference spmi: mtk-pmif: Add workaround for FSM lockup/error in read operation MAINTAINERS: Add Qualcomm SPMI controller entry spmi: pmic-arb: return 0 in spmi_pmic_arb_register_buses() on success comedi: addi_apci_3xxx: fix subdevice count underallocation ...
10 hoursMerge tag 'for-7.4/io_uring-20261021' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux Pull io_uring updates from Jens Axboe: "The bulk of this is a big robustness pass over cancelation, io-wq, timeouts, and poll. Outside of that: - Large series from Josef hardening the cancelation, io-wq, timeout, poll, and wait paths. Fixes for lost wakeups and lost cancels as io-wq arms poll/timeouts, work stranding on worker exit, CQE32 resize handling, napi entry timeouts, and a pile of smaller correctness issues across the board - Rework of how io-wq posts completions, posting from the last request reference and dropping the request file before the completion, and running ring release cancelations synchronously - canceling and waiting for all in-flight requests and dropping registered files and buffers at release time - Don't charge the SQ/CQ rings or provided buffer rings to RLIMIT_MEMLOCK, which the region API conversion had started doing - Split io_uring_cmd_set_res() out from io_uring_cmd_done() so a command can set the result from its ->end_io() handler, used by nvme - CQE32 ring fixes for the free entry check, aux CQE big_cqe zeroing, and the dummy skip CQE - Timeout fixes for sequence handling and multishot updates - net fixes for MSG_TRUNC buffer overconsumption and keeping recv buffer select length within MAX_RW_COUNT - Wake real-time waiters from hard interrupt context - Don't spin on local work an exiting task can't run, reachable by an unprivileged user - Various other fixes and cleanups" * tag 'for-7.4/io_uring-20261021' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (75 commits) io_uring: end the drain when the drain request completes io_uring/futex: return a wait's data to the cache when it fails to arm io_uring/wait: wake real-time waiters from hard interrupt context io_uring/waitid: return -EAGAIN for a non-blocking pidfd io_uring/net: keep recv buffer select length within MAX_RW_COUNT io_uring/waitid: prevent cancel reference wrap io_uring/poll: don't loop on HUP with multiple references io_uring/timeout: don't lose a cancel as io-wq arms a timeout io_uring/timeout: don't flush with the sequence behind the last flush io_uring/timeout: don't put a sequence target behind the last flush io_uring/poll: avoid retry wakeup loss when dropping ownership io_uring: look up the file before queueing to io-wq io_uring/timeout: don't end a linked timeout with 1 io_uring/timeout: no ABS update of multishot timeouts io_uring/net: don't retry recv on uncommitted buffers io_uring: don't pass restart error codes to userspace io_uring/openclose: keep the lock in io_pipe_fixed() io_uring/sqpoll: let the thread sleep on disabled rings io_uring/kbuf: handle index wrap in last buffer check io_uring/zcrx: fix buffer offsets in areas above 4GB ...
29 hoursMerge tag 'drm-next-2026-10-21' of https://gitlab.freedesktop.org/drm/kernelLinus Torvalds
Pull drm updates from Dave Airlie: "Highlights: - core: a lot of atomic refactoring in progress, panic got split into a core/helpers model - amdgpu: enables HDMI 2.1 FRL and other good things finally, UAlink over Ethernet support - xe: has a bunch of CRI support, ras error for bad vram, memory offlining support. - msm: enables a bunch more GPUs. Otherwise it's a the usual mountain of stuff all over the place. Details: rust: - I/O tree shared with driver-core - DMA tree shared with driver-core - allow aux registration data closures to return covariant sub-fields - Implement Send and Sync for MapleTree - add pci resource flags and IORESOURCE_MEM_64 drm/rust: - add dma_fence abstraction - init DRM registrations and their data in place - drop unused flags argument to registration vgaarb: - rework API to pass a private ptr instead of pci device sound: - adapt to omapdrm changes gem: - add callback for handle count going to 0 gpusvm: - share one HMM fault and keep single mappings inline pagemap: - Prevent CPU stalls during unbounded pagemap teardown dma-fence: - fix docs vga_switcheroo: - disconnect from fbcon - update fbcon from within fbdev emulation atomic: - move DRM from state reset callbacks to atomic_create_state - remove drm_simple_encoder_init panic: - split into core and helpers buddy: - improve dirty tracking clients: - improve vmap handling - fbdev: Move helpers from drm_kms_helper.ko to drm_client_lib.ko display: - export HDMI SCDC status data via debugfs - rework SCDC for better HDMI 2.0 support - dp/mst: improve DPCD compliance edid: - parse AMD VSDB - parse ALLM/VRR capabilities - support detecting panel size log: - add drm_warn_ratelimited sched: - cleanup interface - add missing locking - fix run-queue cleanup - fix locking sysfb: - remove obsolete quirk for Lenovo D330 - fix panel orientation for non-native display modes - drop drm_class_device_register colorop: - provide DRM_COLOR_OP_FIXED_MATRIX bridge: - analogix: Support eDP lane mapping - ti-sn65dsi83: Support LVDS Channel B on SN65DSI84 - Select DRM_PANEL_BRIDGE for various drivers that require it - add chrontel ch7218a support panel: - panel-edp: Support MNE007QS3-F, TM140VDXP15, and KD116N36-30NB-A001 - samsung-s6d16d0: Use mipi_dsi_*_multi() functions - support Ilitek ILI7836A OLED plus DT bindings - support Novatek NT36532 plus DT bindings - convert several drivers to managed cleanup - fix Kconfig selections - edp: - Add support for BOE NV140FHM-T0A - Support CSOT MNE007QB1-1 - NV140WU2-M70 - ebbg-ft8719: Fix MODULE_LICENSE() string; Improve initialization - samsung: Share test-key helpers - ilitek-ili9882t: Support Ilitek IL79600A plus DT bindings - simple: Support Truly TFT320240-229-E plus DT bindings; Support BOE DV215FHM-R01 plus DT bindings - Refactor struct drm_panel to contain struct drm_bridge plus fallout in various panel drivers - Add support for BOE Novatek NT51021, Retroid Pocket 6, Raydium RM69220 DDIC panels, Sharp LQ138P1JX61 eDP, BOE NV140FHD-N43, AUO B140HAN04.0, AUO 0x0db3, panels. amdgpu: - use AMD VSDB for freesync - implement YUV-to-RGB with fixed-matrix colorop - enable FRL for HDMI - HDMI 2.1 freesync support - HDMI 2.1 ALLM support - HDMI 2.1 VRR support - UALoE (UALink over Ethernet) support - add syncobj_points to userq signal ioctl - drop unused kunit tests - NBIO/GC/MMHUB/SMU updates/fixes - GPU spatial partitioning updates - display kunit fixes - userq fixes - RGB quantization fixes - DC RMCM refactor - DP MST fixes - USB4 fixes - add new trace events - Rework display instance handling - stack frame size fixes for various compilers/configs - VCN 4/5 reset fixes - freesync updates - cursor refactor - Fix direct scanout alpha on some DRM_FORMATs - Expand Mac reserved memory workaround - Make runtime pm more fine grained amdkfd: - updates and fixes - GC 10 CU occupancy support radeon: - eDP fix for DCE3.2 iMacs xe: - add drm_ras netlink error event support - add memory page offlining support - introduce error threshold to drm_ras - fix stale GTT mappings on unmap - reject page faults for non-page fault mode scratch VM - enable CRI package and VRAM temperatures - introduce cold reset recovery - handle CRI+ power interval encoding - VF migration for multi-queue - handle exec queue teardown after hot unplug - alerts and controller enabling modifications - use IBCv3 on PTL - VRAM health check - report GT TDR and VM rebind faults using SIGID - add multi_queue_active_lrca debugfs - shrinker: Runtime PM reference for non-system memory - guc: Add simple KLV decoder helpers - debugfs: Expose per-engine idle status - Keep walking on SVM eviction failure - Nuke PTs only after unlinking contested VMAs - limit sg segment size to PAGE_SIZE on Xen PV - keep VF LMEM bar size low if no VFs - CPU binds and ULLS on migration queue - New PTL PCI ID - Enable PXP for NVL-S - Do not dma_fence_put zero fences in err_out path - Refresh TTM LRU on SVM prefetch - export device UID in sysfs i915: - rename GEN6_PCODE_DATA to match spec - fix incorrect RCU teardown order - fix potential UAF in command parsing - avoid WARN splat during RPS boosting race - use simpler min functions - Fixes to make i915 work well with PREEMPT_RT i915/display: - Enable CMRR (Content Match Refresh Rate) in fixed-RR VRR path - Switch DG2 MPLL to DPLL framework - DP-HDMI PCON DSC fixes - limit invalid joiner combinations - CDCLK related fixes and refactor around PCODE integration - Gate UHBR SST SDP splitting on sink caps - add HDMI TMDS audio bandwidth check - vswing/preemph override - enable AS SDP Skip frames - Handle negative configuration index on DP link caps for robustness - Preparation for enabling SDR plane color pipeline - An eDP quirk for HP Pavilion Plus - Introduce PME (Power Management Event) support on display hotplug - Handle VSC SDP revision 7 in unpack msm: - CI: - Dropped sc7180 trogdor lazor from the CI - Core: - Fixed msm_ioremap for resources without a name - Changed msm.separate_gpu_kms to default to auto selection - GPU: - Enable CLX (Current Limit eXtension) for gen8 to avoid exceeding limits on CX/GX rails - New GPUs: a830 (Pakala), a845 (Maili), a850 (Hawi), x2-85 (Mahua) - Fix VBIF halt mask on a306, which was preventing runpm suspend - Enable THP support for GEM buffers - Add modparam to disable waiting on fences in shrinker - Drop use of drm_prime_sg_to_page_array() - a5xx: don't read the GPMU registers on GPUs without a GPMU - a2xx/a3xx/a5xx: hangcheck progress detection - a6xx: gmuwrapper runpm fix - Calculate reported GMEM size based on active slices - Split a6xx/a7xx/a8xx catalog - DP: - Picked up some preparation patches for the MST support - Fixed reported status of the link training - DPU: - Fixed CRTC bandwidth computation - Fixed DSC programming - Fixed encoder disablement path - DSI: - Fixed VM leak in error path - Indention fix - MDP5: - Added MSM8952 configuration - Dropped incorrect cursor pipe on MSM8976/56 - HDMI: - Small fixes nouveau: - improve runtime PM on R570 GSP firmware - various fixes throughout the driver - dispnv50: support 2.147 GHz pixel clock in GB20x nova: - add initial uapi concept - add initial PRAMIN access support - add GpuMm centralized memory manager - add GPU VM and BAR1 support - add GPU interrupts and GSP events support - GSP messaging fixes tyr: - use bitfield! - zero unsupported and newly added GPU info fields - limit doorbell array to 17 entries exynos: - FIMD fixes - Fix clock leak on resume error path - Fix Sparse warnings by adding missing __iomem annotation - VIDI cleanup - Replace kmalloc() and copy_from_user() with memdup_user() amdxdna: - fix BO handling - Support AIE2 rev 9 - Fix UAF access in scheduler fences - Update workqueue interface - expose busy time via fdinfo ast: - support 256-byte EDID hyperv_drm: - remove support for pre win10 hosts komeda: - fix GLB_CORE_ID usage omap: - report HDMI hotplug events to ASoC HDMI codec panthor: - provide gpu_cache_flush tracepoint - improve dma_fence signalling latency - improve locking - export scheduling information via debugfs - Validate user-space input against firmware limits qaic: - reject BOs that exceed maximum page count - add missing include statements verisilicon: - fix hardware cursor offsets vkms: - implement YUV-to-RGB with fixed-matrix colorop gma500: - avoid unsupported ARGB formats in primary plane hibmc: - handle vblank interrupts correctly ivpu: - add DRM_IVPU_CAP_CMDQ_SET_PRIORITY - support command-queue priority ioctl - Simplify NULL-pointer handling in cleanup code arcpgu: - replace simple-display pipeline with regular atomic helpers aspeed: - replace simple-display pipeline with regular atomic helpers gm12u320: - replace simple-display pipeline with regular atomic helpers imagination: - various improvement to firmware interaction - add job to pvr_job_submit_fw trace event mali-dp: - fix runtime PM leak mcde: - replace simple-display pipeline with regular atomic helpers p111: - replace simple-display pipeline with regular atomic helpers - drop unsupported alpha formats from primary plane rcar-du: - support Renesas R-Car V4H DSC - dsi: Support larger transfers with AXI memory - Support RZ/G3L SoC repaper: - replace simple-display pipeline with regular atomic helpers rockchip: - dsi: improve PHY timings ssd130x: - support Solomon SSD1351 OLED plus DT bindings - ssd133x: upgrade color format to RGB565 - ssd132x: Set correct hardware window when clearing screen tve200: - replace simple-display pipeline with regular atomic helpers xen: - replace simple-display pipeline with regular atomic helpers v3d: - improve job handling under perfmon vc4: - reliably reset V3D - drop brcm,vc4-v3d compatible virtio: - fix damage handling - Support ARGB8888 for virtio primary planes. host1x: - Support partitioning imx: - Replace simple-display with regular atomic helpers mxsfb: - Support bus formats plus DT bindings tegra: - improve syncobj handling on submit panfrost: - add Mali-G68 support - improve GPU reset handling rockchip: - add HDMI 2.0 support to dw-hdmi-qp - improve HPD handling" * tag 'drm-next-2026-10-21' of https://gitlab.freedesktop.org/drm/kernel: (2324 commits) drm/adp: Switch to drm_atomic_helper_connector_create_state drm/malidp: Convert to atomic_create_state drm/vc4: Switch to drm_atomic_helper_connector_create_state drm/sysfb: Switch to drm_atomic_helper_connector_create_state drm/solomon: ssd130x: Switch to drm_atomic_helper_connector_create_state drm/imx: ipuv3: Switch to drm_atomic_helper_connector_create_state drm/hyperv: Switch to drm_atomic_helper_connector_create_state drm/bridge: megachips: Switch to drm_atomic_helper_connector_create_state drm/bridge: lontium-lt8912b: Switch to drm_atomic_helper_connector_create_state drm/arm: komeda: Switch to drm_atomic_helper_connector_create_state drm/appletbdrm: Fix incorrect error message on encoder attach failure drm/sun4i: hdmi: Convert to drmm_connector_hdmi_init() drm/rockchip: rk3066_hdmi: Advertise HDMI 1.4 capabilities drm/bridge: lontium-lt9611: Advertise HDMI 1.4 capabilities drm/bridge: ite-it66121: Advertise HDMI 1.2 capabilities drm/bridge: ite-it6263: Advertise HDMI 1.3 capabilities drm/bridge: ite-it6263: Drop redundant .mode_valid hook drm/bridge: inno-hdmi: Advertise HDMI 1.2 capabilities drm/bridge: adv7511: Advertise HDMI 1.2 capabilities drm/sched: Document entity->stopped is protected by entity->lock ...
34 hoursMerge 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 ...
35 hoursMerge 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 ...
2 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 ...
2 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
2 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[] ...
2 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
3 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
3 daysMerge tag 'v7.4-p1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Fix algif_skcipher source SG overrun - Allow hmac(sha512) for non-root users Algorithms: - Add wrapper for zeroing AES key context - Avoid redundant stream initialisations in zstd Drivers: - Remove hisilicon/sec. - Handle digest-only authenc requests in atmel - Handle zero-length skcipher requests in mxs-dcp - Lower the default priority of caam/qi2 Others: - Optimise key comparison in rhashtable lookup that uses constant parameters" * tag 'v7.4-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (146 commits) crypto: atmel-tdes - consolidate error paths in atmel_tdes_dma_init() crypto: atmel-tdes - reuse fast in atmel_tdes_crypt_start() crypto: atmel-tdes - use separate DMA scatterlists MAINTAINERS: delete entry for John Allen hwrng: amd - use PMBASE_OFFSET consistently hwrng: cctrng - simplify cctrng_probe() hwrng: intel - simplify intel_rng_mod_init() crypto: qat - fix use of destroyed vf2pf_lock on VF restart crypto: qat - initialise state_lock on every path in adf_devmgr_add_dev() hwrng: imx-rngc - Use optional clock crypto: talitos - init tasklets before requesting IRQs crypto: algif_skcipher - rewind rounded output bytes crypto: algif_hash - Allow hmac(sha512) for unpriviledged users crypto: sa2ul - Remove unused fields hwrng: stm32 - use devm_platform_ioremap_resource() in stm32_rng_probe() hwrng: stm32 - drop redundant initializations hwrng: amd - simplify control flow in amd_rng_mod_init() hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain() hwrng: stm32 - use swap() in stm32_rng_probe() hwrng: cctrng - drop redundant initializations ...
3 daysMerge tag 'soc-drivers-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC driver updates from Arnd Bergmann: "There are lots of minor updates for driver subsystems managed through the soc tree (turris-omnia platform, cache driver, tee drivers, arm-cci, bus, memory) as well as soc vendor specific drivers (starfive, xilinx, microchip, nxp, amlogic, imx, renesas, samsung, ti, nvidia). The more notable changes are: - Larger updates for Qualcomm SoCs including support for SM8950 (Maili) SM8975 (Hawi), Glymur, Shikra, and IPQ5424 - Added SoC support for Exynos5515, Tegra264, Tegra410, R8A774A3, and MT8167 in existing drivers - Arm SCMI firmware driver support for ACPI PCC transport and module autoloading of protocol specific drivers - Apple crash log support for CrgA embedded controller" * tag 'soc-drivers-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (176 commits) platform: cznic: turris-omnia-mcu: stop button emulation producers cache: Make cpu_cache_invalidate_memregion() error out if there are no handlers soc: mpfs: use kref cleanup on probe failure arm64: enable HAVE_SHARED_GPIOS for all ARM64 platforms bus: arm-cci: Drop cci-control-port node reference in __cci_ace_get_port() bus: arm-cci: Drop CPU node reference in cci_ace_init_ports() soc: fsl: dpio: Free the IRQ before releasing the I/O object soc: fsl: dpio: Fix cleanup on IRQ registration failure bus: fsl-mc: Annotate fsl_mc_io.portal_virt_addr with __counted_by_ptr bus: fsl-mc: drop the fwnode links of the dpmacs nodes soc: fsl: cpm1: tsa: Fix clock leak in tsa_of_parse_tdms() soc: qcom: geni-se: Drop unused icc_ddr parameter from geni_icc_get() firmware: qcom: scm: Allow QSEECOM on ThinkPad T14s Gen 7 dt-bindings: mailbox: qcom: Document Maili CPUCP mailbox controller dt-bindings: spmi: glymur-spmi-pmic-arb: Add compatible for Qualcomm Maili SoC soc: qcom: pmic_pdcharger_ulog: prevent work requeue during remove ASoC: dt-bindings: qcom,apr: Add modem_apps GLINK channel for shikra firmware: qcom: tzmem: disable SHM bridge for SM7125 platform soc: qcom: ubwc: Add Kalambo UBWC config firmware: qcom: scm: Allow QSEECOM on Kalambo CRD ...
3 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 ...
3 daysnet: ethtool: Introduce ethtool command to list portsMaxime Chevallier
Expose the phy_port information to userspace, so that we can know how many ports are available on a given interface, as well as their capabilities. For MDI ports, we report the list of supported linkmodes based on what the PHY that drives this port says. For MII ports, i.e. empty SFP cages, we report the MII linkmodes that we can output on this port. Tested-by: Aleksei Sviridkin <f@lex.la> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261016133107.54054-10-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
3 daysnetlink: specs: Add ethernet port listing with ethtoolMaxime Chevallier
Ethernet network interfaces may have more than one front-facing port. The phy_port infrastructure was introduced to keep track of these ports, and allow userspace to know about the presence and capability of these ports. Add a ethnl netlink message to report this information. Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261016133107.54054-9-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 daysnet: add AF_PACKET multicast dumpsYuyang Huang
RTM_GETMULTICAST dumps IPv4 and IPv6 multicast group memberships, but the device multicast list (dev->mc) is only available through /proc/net/dev_mcast, so "ip maddr show" still has to parse procfs for its link-layer entries. Handle RTM_GETMULTICAST dumps with ifa_family set to AF_PACKET next to the dev->mc helpers in dev_addr_lists.c and report every entry of dev->mc in the existing ifaddrmsg format: - IFA_MULTICAST carries the raw link-layer address - IFA_MC_USERS carries the entry reference count - IFA_F_GLOBAL in IFA_FLAGS reports netdev_hw_addr::global_use, set by dev_mc_add_global() (SIOCADDMULTI) and dev_mc_add_excl() ("bridge fdb add ... self"), i.e. entries added explicitly rather than by a protocol join. This is the static column of /proc/net/dev_mcast - ifa_scope is RT_SCOPE_LINK This covers every column of /proc/net/dev_mcast. AF_PACKET is the family iproute2 already uses for link-layer addresses ("ip -0"). The default FDB dump also walks dev->mc, but only for Ethernet devices and only if the driver uses it, vxlan for example does not, and it has no users count or global_use bit. Extending it would change "bridge fdb show" output and add NDA_* attributes. Requests are always validated, there are no legacy users: prefixlen, flags and scope must be zero, ifa_index selects one device and IFA_TARGET_NETNSID is the only attribute accepted. The dump runs under RCU and netif_addr_lock_bh() without RTNL. cb->seq is set from the dev->mc generation counter and dev_base_seq before each round and checked after it, so an entry added or removed since the previous round sets NLM_F_DUMP_INTR. A round without a message skips the check and cb->seq is set once more after the round, so the NLMSG_DONE check reports a change made during the last round or before an empty one. Signed-off-by: Yuyang Huang <sigefriedhyy@gmail.com> Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Link: https://patch.msgid.link/20261012011707.3378-5-sigefriedhyy@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
4 daysMerge tag 'lsm-pr-20261016' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm updates from Paul Moore: - Add LSM hooks, object blobs, and audit records for namespaces Add the necessary bits to enable LSMs to enforce access controls on the management of various kernel namespaces. While this pull request does not contain any in-tree users of these hooks, the Landlock pull request for Linux v7.4 will include Landlock support and the next merge window will likely include SELinux support as well. Considering the development behind these hooks, I expect that BPF LSM developers will also be making use of the namespace hooks, if they haven't already. - Update the inode LSM hooks to include mount idmaps This allows LSMs to incorporate the mount ID mapping into their access control decisions. While there are no current in-tree users of this, it was requested by those developing BPF LSM programs and this pull request includes a BPF LSM selftest. - Preserve the full 32-bit ioctl command in LSM audit records Previously only the low 16 bits were logged, ignoring the direction and size information in the upper 16 bits. The pull request also includes a Landlock based selftest to verify the full 32-bit ioctl value. - Ensure we don't call security_backing_file_free() multiple times Thankfully we don't have a problem with the current code base, but we want to fix this behavior now before it becomes a problem. - Clarify that only the current task may access current->cred The current code is a bit misleading around safely accessing the cred field in a task struct. Through comment and code corrections, this pull request clarifies that only the task itself may access its cred field. - Add SLAB_NO_MERGE to the credential object cache Harden the credential cache by ensuring credential objects live on dedicated slab pages. - Make use of safe memory zero'ing in the LSM Rust bindings - Update the docs for the current behavior of /sys/kernel/security/lsm - Update the docs for CONFIG_LSM and the "lsm=" command line option - Remove unnecessary code * tag 'lsm-pr-20261016' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lsm: remove redundant NULL check in security_init() selftests/landlock: Check full ioctl commands in audit records lsm: Preserve full ioctl commands in audit records doc: fix LSM ordering description for /sys/kernel/security/lsm doc: describe CONFIG_LSM and lsm= as the selection mechanism selftests/bpf: verify mount idmaps reach inode hooks lsm: expose mount idmaps to inode hooks rust: lsm: replace `core::mem::zeroed` with `pin_init::zeroed` cred: prevent slab cache merging for cred_jar lsm: don't call security_backing_file_free() multiple times lsm: delete duplicate assignment in lsm_prepare() lsm: update the BUILD_BUG_ON() in audit_log_lsm_data() lsm: add LSM_AUDIT_DATA_NS for namespace audit records lsm: add LSM blob and hooks for namespaces ns: Free anonymous mount namespaces via ns_common_free() cred: clarify that task_struct::cred is only for the current task
4 daysMerge tag 'audit-pr-20261016' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: - Fix the accounting of audit filter rule additions and removals Tracking audit filter rules is important as their presence can trigger additional processing. Unfortunately, the existing code did not properly track the removal of filter rules, resulting in some cases where additional processing was done when none was required. This not only corrects the accounting problems, but also provides a cleaner API for tracking audit filter rule additions and removals. - Add a FSOPEN record to log the filesystem name in the new mount API Close a long standing audit blindspot by capturing the filesystem name, e.g. "tmpfs", when calling fsopen(). - Split audit's storage of process and file capabilities Instead of a single structure that stores all possible capability information, create a dedicated audit file capabilities struct and convert the existing audit capabilities struct into a process capabilities struct. This saves 80 bytes from the per-task audit_context on 64-bit systems. - Ensure that the PROCTITLE record is reset on exec() This fixes a problem where systemd would set a temporary PROCTITLE string after forking a child process before calling exec(), effectively locking the PROCTITLE string to the temporary value. This pull request resets the PROCTITLE state on exec() so that newly executed processes can set their PROCTITLE correctly. - Add some missing unlikely() annotations to the audit wrapper functions - Clean up the audit netlink multicast skb length adjustment * tag 'audit-pr-20261016' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: add FSOPEN record to log filesystem name audit: separate file and process capability storage audit: Fix filter rule accounting after automatic removal audit: use copied skb length in kauditd_send_multicast_skb() audit: add missing unlikely hint to audit_dummy_context() wrappers audit: free proctitle in context so it can be re-set by fork on exec_binprm
4 daysMerge tag 'for-7.4-tag' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "User visible changes: - remove tweakable sysfs way to enable features, used only for extent-irefs which has been default since 3.12; the sysfs interface makes it complicated due to locking and context, unlike ioctl - change which backup superblock does mount option 'rescue=usebackuproot' choose, skip the last one due to rotation, for more fine grained control add options selecting a specific backup superblock by index (usebackuproot_N) Notable fixes: - syslog message fixup of error state description, duplicate 'E' renamed to 'H' (emergency shutdown), added 'I 'when delayed iputs are blocked - use kvmalloc for b-tree buffer allocations, as we're using more contig ranges because of large folios, the allocations started to warn on fragmented memory - handle unknown commands for the /dev/btrfs-control ioctls - tune timing of transaction commit when the space is getting low - in raid56, skip verifications if data checksums are not available Performance improvements: - reflink speedup, reorder locking and flushing to optimize for more common cases where the reflinked ranges are accessed, avoid unnecessary contention - minor speedup in zstd decompression (+8MB/s) - reduced contention of inode extent map lock, improves e.g. when shrinker processes inodes without extent maps, measured time reduction 10-20% Core changes: - move allocation errors out of some contexts (new inode/dentry/rename) to avoid transaction aborts - allocate system new chunks earlier, e.g. when consumed by fallocate, and tune deleting unused block groups if the system space is low - tree checker: reject extents for special files - many qgroup fixes regarding enabling/disabling, other state changes and qgroup relation updates - error handling fixes - refactoring, cleanups: - page to folio cleanups - transaction state macros/enums simplification - parameter simplifications" * tag 'for-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (92 commits) btrfs: fix use-after-free on quota enable allocation failure btrfs: prevent use-after-free in btrfs_transaction::switch_commits btrfs: return -ENOTTY for unknown ioctls on the control device btrfs: defrag: fix check to see if next extent can be defragged too btrfs: defrag: fix key comparison with max defrag key in btrfs_defrag_leaves() btrfs: use READ_ONCE() to read the chunk size from the data space_info btrfs: qgroup: make btrfs_record_squota_delta() return void btrfs: fix lost error return value in btrfs_alloc_logged_file_extent() btrfs: qgroup: fix off-by-one max level check in qgroup_trace_new_subtree_blocks() btrfs: abort transaction on qgroup failures in create_pending_snapshot() btrfs: qgroup: merge error labels in btrfs_quota_enable() btrfs: qgroup: fix leak of qgroups in rb tree after failure to enable quotas btrfs: qgroup: abort transaction on failure to add qgroup relation btrfs: qgroup: fix swapped blocks existence check when tracing after COW btrfs: introduce more accurate usebackuproot options btrfs: always use the second newest slot for rescue=usebackuproot btrfs: raid56: do not verify the content if there is no data checksum btrfs: qgroup: do not leak -ENOENT from btrfs_remove_qgroup() btrfs: qgroup: use qgroup_mark_inconsistent() in quick_update_accounting() btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup ...
4 daysMerge tag 'drm-misc-next-2026-10-16' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v7.5: UAPI Changes: - Add Apple Interchange fourcc. - Expose amdxdna busy time via DRM fdinfo. Cross-subsystem Changes: - Improve DT bindings for display/ste,mcde - Add kunit test for dma_fence_dedup_array() to dma-buf/test. Core Changes: - Documentation updates to drm/scheduler, gpu/buddy. - Fail kmapping a bo without pages. Driver Changes: - Bugfixes and improvements to panel/Raystar RFF500F-AWH-DNN, accel/ivpu, vc4, accel/amdxdna, panthor, nouveau, panfrost, panthor, accel/qaic, accel/rocket, bridge/lontium-lt8713sx, appletbdrm. - Add support for BOE Novatek NT51021, Retroid Pocket 6, Raydium RM69220 DDIC panels, Sharp LQ138P1JX61 eDP, BOE NV140FHD-N43, AUO B140HAN04.0, AUO 0x0db3, panels. - Add support for Mali-G68 to panfrost. - Add Chrontel CH7218A to bridge/simple. - Support ARGB8888 for virtio primary planes. - Improve panfrost gpu reset handling and initialization. - Add HDMI 2.0 support to rockchip/dw-hdmi-qp and improve HPD handling. - Advertise HDMI 1.2 capabilities in sun4i, bridge/adv7511, it66121 & inno-hdmi. - Advertise HDMI 1.3 capabilities in bridge/ite-6263. - Advertise HDMI 1.4 capabilities in bridge/lt9611 & rockchip/rk3066_hdmi - Switch many drivers to drm_atomic_helper_create_state in preparation for readout. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patch.msgid.link/75e7de61-048c-4fdd-9ad2-6b47b29a4863@linux.intel.com
4 daysMerge tag 'docs-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/docs/linuxLinus Torvalds
Pull documentation updates from Jonathan Corbet: "It was a reasonably busy cycle for docs; changes include: - Add the AGENTS.md symbolic link into the top-level directory in the hopes that LLMs will read it and produce better work - The removal of the Assisted-by requirement, as concluded at the Maintainer Summit - A new "testdocs" make target to run the documentation unit tests - Lots of work on the Portuguese, and Chinese translations; there is now maintenance for the traditional Chinese translations as well ...and the usual pile of minor fixes, documentation updates, etc" * tag 'docs-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/docs/linux: (125 commits) docs: add AGENTS.md as a symlink to README docs: kernel-parameters: adjust reserve_mem build option docs: kernel-parameters: don't mix cmdline options & build options docs/ja_JP: translate submitting-patches.rst (review and report tags) docs: remove Assisted-by references Revert "docs: landlock: fix ENOMSG condition in create_ruleset kernel-doc" docs: kdoc: parse context_lock_struct() as struct declaration docs: timers: hpet: Document userspace API and ioctl commands docs: timers: hpet: Modernize file references Documentation: sched-preemption: Add a SPDX license identifier docs: ABI: sysfs-driver-xdata: use literal blocks for console commands docs: ABI: sysfs-class-firmware-attributes: use literal blocks for console commands ABI: sysfs-bus-usb: use literal block for console commands docs/ABI: testing: aspeed-uart-routing: use literal block for console commands docs: kernel-parameters: fix a truncated sentence for preempt=lazy sched/doc: add a preemption model overview docs: ABI: TMR manager: use literal blocks for console I/O Documentation/ABI: IFS: use literal blocks for commands ABI: sysfs-bus-pci: use literal blocks for commands docs: translations: pt_BR: add debugging index ...
4 daysMerge tag 'perf-core-2026-10-18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf events updates from Ingo Molnar: - Support SIMD/eGPRs/SSP register sampling in perf (Dapeng Mi, Kan Liang) - Turn amd_uncore_ctx events into a flexible array (Rosen Penev) - Finish the work related to fixing the guest PEBS path to not set unwanted PERF_GLOBAL_CTRL bits, for which urgent fixes are upstream already (Sean Christopherson) - Drop redundant counter slot searches in the AMD uncore driver (Usama Arif) - Don't WARN when the ext_regs_buf allocation fails (vineash) - Annotate x86_pmu::hybrid_pmu with __counted_by_ptr (Thorsten Blum) * tag 'perf-core-2026-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits) perf/x86: Don't WARN when the ext_regs_buf allocation fails perf/x86/amd/uncore: Free counter slot by index perf/x86/amd/uncore: Remove redundant event slot scan perf/x86/intel: Check only PMC bits in PEBS_ENABLED when detecting host PEBS usage KVM: VMX: Only tell perf to enable PEBS counters for fully enabled PMCs KVM: VMX: Drop a redundant pmu->global_ctrl check when processing pebs_enable perf/x86/intel: KVM: Handle cross-mapped PEBS PMCs entirely within KVM perf/x86: KVM: Have perf define a dedicated struct for getting guest PEBS data perf/x86/intel: Invert names of intel_ctrl_{guest,host}_mask perf/x86/intel: Annotate x86_pmu::hybrid_pmu with __counted_by_ptr perf/x86/amd/uncore: Turn amd_uncore_ctx events into a flexible array perf/x86/intel: Add sanity check for PEBS record/fragment size perf/x86: Activate back-to-back NMI detection for arch-PEBS induced NMIs perf/x86/intel: Advertise PERF_PMU_CAP_SIMD_REGS capability perf/x86/intel: Support arch-PEBS based SIMD/eGPRs sampling perf/x86: Support SSP sampling using sample_regs_* fields perf/x86: Support eGPRs sampling using sample_regs_* fields perf: Enhance perf_reg_validate() with simd_enabled argument perf/x86: Support OPMASK sampling using sample_simd_pred_reg_* fields perf/x86: Support ZMM sampling using sample_simd_vec_reg_* fields ...
4 daysMerge tag 'sched-core-2026-10-18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "Kconfig updates: - Simplify PREEMPT_DYNAMIC (Mark Rutland) Fair scheduler updates: - Remove redundant RUN_TO_PARITY check (Elif Topuz) - Declare augmented callbacks per field, fix rb_add_augmented_cached() descent (Yiwei Lin, Peter Zijlstra) - Restart fair hrtick after same-task repicks (Shubhang Kaushik) - Improve the scheduling latency of short slice tasks (Vincent Guittot) Deadline/RT scheduler updates: - Check start_dl_timer expiry with ktime_before() (Liang Hao) - irq_work: CPU-hotplug improvements on PREEMPT_RT (Sebastian Andrzej Siewior) Energy-aware scheduling updates: - Implement the steal_governor, introduce preferred CPUs and steal-driven vCPU backoff (Shrikanth Hegde) Multi-processor load-balancing updates: - Enable preferred SMT siblings on NVIDIA Olympus (Andrea Righi) - Randomize equally shallow idle CPU picks (Christian Loehle) - Remove redundant core_sched_seq (Hui Su) Cache-aware scheduling updates: - Avoid publishing partial LLC utilization (Jemmy Wong) NUMA-balancing updates: - Reset NUMA fault locality after scan period update (Eric Kim) Proxy execution updates: - Ongoing work to implement sleeping owner handling for proxy execution (John Stultz, Vasily Gorbik) - Preparatory steps to make sched_ext compatible with proxy execution (Andrea Righi) Scheduler infrastructure updates & fixes: - Remove the RCU wait from PSI trigger destruction (Shakeel Butt) - Avoid modifying wait-entry on failed priority registration (Hui Su) - Use the new static key API for sched_feat (Hongyan Xia) - Convert paravirt_steal to new static key APIs (Hongyan Xia) - cputime: Don't account idle time twice after dyntick-idle (Stian Halseth) Scheduler debugging updates: - Set TIF_NEED_RESCHED before calling __trace_set_need_resched() (Sechang Lim) - Fix context analysis errors in non-preferred CPU push (Shrikanth Hegde) Misc cleanups and fixes by Christian Loehle, Shubhang Kaushik, Thomas Huth and Vladimir Zapolskiy" * tag 'sched-core-2026-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits) sched: Replace nr_iowait_cpu() with a bool accessor Revert "sched/fair: Remove dead code on enqueue_task_fair()" sched/cache: Avoid publishing partial LLC utilization sched/cputime: Don't account idle time twice after dyntick-idle sched/psi: Remove the RCU wait from trigger destruction sched/eevdf: Remove redundant RUN_TO_PARITY check sched/wait: Avoid modifying entry on failed priority registration rbtree_test: Use rb_add_augmented_cached() for the cached augmented test rbtree: Update augmented data on the way down in rb_add_augmented_cached() rbtree: Declare augmented callbacks per field with RB_AUG() rbtree_test: Use rb_add() and rb_add_cached() for the basic tests smpboot: Don't park the thread if work is pending irq_work: Flush lazy work CPU down on PREEMPT_RT irq_work: Update a comment regarding CPU hotplug invocation sched/topology: Add asymmetric SMT packing override sched/fair: Honor asymmetric SMT priority in idle selection sched: Set TIF_NEED_RESCHED before calling __trace_set_need_resched() sched/core: Fix context analysis errors in non-preferred CPU push virt/steal_governor: Enable the driver virt/steal_governor: Implement steal_governor policy loop ...
5 daysbpf: Add unwind_goto and unwind_exit insnsAlexei Starovoitov
Rust Drop, C++ destructors and __attribute__((cleanup)) in C have to run when a panic or an exception passes through a frame. v1 [1] did it with a flag in r3 and 'if r3 != 0 goto pad' after the call. Three bugs that the bots found there had the same cause: r3 is an ordinary register, and JITs guessed the meaning from the shape of the code. Kumar suggested new insns instead [2]: unwind_goto pad BPF_JMP | BPF_JCOND, src_reg = BPF_UNWIND_GOTO unwind_exit BPF_JMP | BPF_EXIT, src_reg = BPF_UNWIND_EXIT 'call foo; unwind_goto pad' goes to the pad when foo left with unwind_exit and falls through when it left with exit. No register says which one it was. In everything else unwind_exit is exit. llvm lowers unwinding to them [3]: ret exit invoke foo unwind pad call foo; unwind_goto pad resume r0 = 0; unwind_exit call _Unwind_RaiseException r0 = 0; unwind_exit invoke _Unwind_RaiseException goto pad In a function that returns 16 bytes it's 'r0 = 0; r2 = 0; unwind_exit'. Landing pads are ordinary blocks, so the verifier checks them like any other code. A pad that forgets to drop a lock or a reference is a leak on that path. There are no tables, no stack walk, no kfuncs, no BTF and nothing to do for libbpf and other loaders. In the verifier: - unwind_goto has to follow a call or callx of a subprog and cannot be a jump target. For cfg, liveness and the rest it's one more conditional jump, like may_goto. - How the callee left is one bit of the verifier state. It lives from the exit of the callee to the next insn. states_equal() looks at it, since the registers can be the same either way. - unwind_exit is rejected when unwind_goto doesn't follow the call. - A global subprog that has unwind_exit can leave either way. Both are explored after the call, like it's done for might_throw. - A sync callback cannot unwind. The helper that calls it doesn't expect that: bpf_loop() would go on. - unwind_exit of the main prog is exit, unless it's an extension. So it is in async and exception callbacks. The kernel calls them, and there is no frame to unwind to. - An extension leaves either way, like the subprog that it replaced. freplace is a jump, so the extension returns to the caller of the subprog. An extension that has unwind_exit can replace only a subprog that has it too. Otherwise there is no unwind_goto after the calls. - Of tracing progs only fentry can attach to a subprog or an extension that has unwind_exit. It would return to the trampoline that called it. - unwind_exit changes its return address, so the cpu mispredicts the return and runs what follows unwind_goto speculatively. Without CAP_PERFMON the verifier looks at that path too. - unwind_goto goes away together with a pad that turned out to be dead code. It stays when what follows it is dead code. The cpu predicts that the callee returns there, so 'goto pc-1' takes the place of the dead code. Otherwise its removal would move other code there. JITs don't emit a branch: unwind_goto: extable[n++] = { ret_addr - 1 -> pad } unwind_exit: my_ret_addr = bpf_unwind_target(my_ret_addr) epilogue So exit and the normal path after the call cost nothing. Every frame fixes only its own return address. There is no stack walk. The lookup is what the page fault handler does for bpf progs. The interpreter cannot do that, so the prog has to be JITed, and JITs opt in with bpf_jit_supports_unwind(). x86-64 and arm64 are in the next patches. BPF_JCOND is the same opcode as BPF_CALL_ARGS of the interpreter, and BPF_UNWIND_GOTO is the same number as BPF_PSEUDO_CALL. may_goto is gone by the time a prog is dumped, unwind_goto is not. bpf_insn_prepare_dump() tells them apart: a prog with unwind_goto is always JITed. Compared to v1 there is no BTF decl_tag and no 'r3 = 0' before every exit. Tail call and ld_abs are fine in a subprog that can unwind, since they leave it like exit does. unwind_exit doesn't set r0. An implicit definition of r0 would need special cases in backtracking, in liveness and in the check of the return value of the main prog. A plain 'r0 = 0' in front of it needs none. Rust rust-bpf [4] builds with that llvm as it is. The programs are built with -C panic=unwind. The panic handler prints the message and calls _Unwind_RaiseException(). exc_cleanup.rs panics three frames deep, with preemption disabled in one frame and rcu_read_lock held in another. All Drop impls run and the prog returns 0. scx_simple.rs is 2195 insns with 48 unwind_goto, 20 of them after callx, and 16 unwind_exit. With r3 it was 2216 insns. scx_cosmos.rs is 3694 insns with 68 and 18. It was 3716. C++ Exceptions work too. This compiles, loads and runs: struct rcu_guard { rcu_guard() { bpf_rcu_read_lock(); } ~rcu_guard() { bpf_rcu_read_unlock(); } }; static __noinline int inner(int len) { rcu_guard guard; if (len > 100) throw 1; return len; } SEC("tc") int prog(struct __sk_buff *skb) { try { return inner(skb->len); } catch (...) { return 42; } } It returns 64 for a packet of 64 bytes and 42 for a packet of 200 bytes. The destructor runs in both cases, otherwise the verifier would reject the prog. 'throw' is a jump to the pad with the destructor. 'catch' is unwind_goto: inner: w6 = w1 call bpf_rcu_read_lock if w6 s< 101 goto ret r1 = exc_obj ll *(u32 *)(r1 + 0) = 1 goto pad ret: call bpf_rcu_read_unlock w0 = w6 exit pad: call bpf_rcu_read_unlock r0 = 0 unwind_exit prog: w6 = *(u32 *)(r1 + 0) w1 = w6 call inner unwind_goto catch out: w0 = w6 exit catch: w6 = 42 goto out It needs -fexceptions -funwind-tables and four one line __cxa_*() functions, where __cxa_throw() calls _Unwind_RaiseException(). Every pad is entered whatever was thrown, so llvm takes catch (...) only. It's a selftest in patch 5. [1] https://lore.kernel.org/bpf/20261018010246.1643877-1-alexei.starovoitov@gmail.com/ [2] https://lore.kernel.org/bpf/DM7KR7J8VY2T.1CZIRUF6QRCWG@gmail.com/ [3] https://github.com/llvm/llvm-project/pull/233649 [4] https://github.com/4ast/rust-bpf Suggested-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261020181320.1284798-2-alexei.starovoitov@gmail.com
5 dayslandlock: Add documentation for capability and namespace restrictionsMickaël Salaün
Document the two new Landlock permission categories, introduced with ABI 12, in the userspace API guide, admin guide, trace-event guide, UAPI comments, and kernel security documentation. The kernel security documentation generalizes the existing per-object access-rights framing into three restriction models (handled_access_*, handled_permissions, scoped) and states criteria for choosing among them, so future permission or scope additions have a documented place to land. Cc: Christian Brauner <brauner@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge E. Hallyn <serge@hallyn.com> Link: https://patch.msgid.link/20261014082718.1435842-9-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
5 dayslandlock: Enforce capability restrictionsMickaël Salaün
Add Landlock enforcement for capability use via the LSM capable hook. This lets a sandboxed process restrict which Linux capabilities it can exercise, using LANDLOCK_PERMISSION_CAPABILITY_USE and per-capability rules. The check is a flat per-layer allowed-capabilities test, with no domain-ancestry bypass, no cross-namespace discriminant, and no dependency on the target user namespace. These categorical denials return -EPERM, like the namespace permission introduced by the previous commit, and they mirror its per-capability allowed and quiet masks, so LANDLOCK_ADD_RULE_QUIET stays rejected for this rule type. Successful capability rules and denials are traced as the previous commit describes. Enforce only at capability exercise time rather than modifying the credential's capability sets. Modifying them would give capget(2) an accurate view of usable capabilities, but no LSM other than commoncap does so; Landlock follows that convention. A sandboxed process inside a user namespace therefore sees all capabilities via capget(2) but receives -EPERM when attempting to use one that is denied. An earlier design bypassed this hook for namespace management through a domain-ancestry comparison with the namespace creator's stored Landlock domain. That made a Landlock decision depend on kernel namespace state, and the ns != cred->user_ns heuristic did not accurately identify namespace-management operations. The flat, namespace-agnostic check instead enforces capability and namespace restrictions independently; creating a non-user namespace requires an allowed CAP_SYS_ADMIN even when combined with CLONE_NEWUSER in one unshare(). Cc: Christian Brauner <brauner@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge E. Hallyn <serge@hallyn.com> Link: https://patch.msgid.link/20261014082718.1435842-5-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
5 dayslandlock: Enforce namespace use restrictionsMickaël Salaün
Add Landlock enforcement for namespace use through the LSM namespace_init and namespace_install hooks. This lets a sandboxed process restrict which namespace types it can create, join, or acquire a file descriptor for, using LANDLOCK_PERMISSION_NAMESPACE_USE and per-type rules. Introduce the handled_permissions field in struct landlock_ruleset_attr: each permission gates every use of a kernel-defined category (CLONE_NEW* namespace types, CAP_* capabilities) with complete deny-by-default coverage, so unknown member values need no validation, being denied until a rule allows them. This UAPI extension advances the Landlock ABI from 11 to 12. There is no domain-ancestry bypass and no namespace-creator tracking, only a flat per-layer allowed-types bitmask: hook_namespace_init() covers creation through clone(2), unshare(2), open_tree(2) and fsmount(2), and hook_namespace_install() covers setns(2). Each permission hook maps its member mask explicitly in the shared permission walker, which warns and denies if a future caller omits that mapping. These categorical denials return -EPERM, matching Landlock's scope and mount-topology denials rather than its object-access -EACCES convention. struct permission_masks is forced to eight bytes with __packed and __aligned because it must eventually hold both the eight namespace types and all capabilities, and because m68k GCC otherwise packs its u64 bitfields at byte granularity, making the structure smaller than sizeof(u64). Carrying it grows struct layer_config from 4 to 16 bytes, so the largest 16-entry domain FAM grows from 64 to 256 bytes. The permissions selector keeps the rule attribute self-describing: - User space can mask it against handled_permissions, as it masks allowed_access against handled_access_fs, so a program built against newer headers still adds the rules an older kernel supports. - It tells apart two attributes that share the same three-u64 layout. Unknown member bits are ignored, so without it a mismatched rule type would apply a capability mask as namespace types. - It leaves room for a rule to carry several permissions, or for another rule type to key the same permission differently. The rule also carries a quiet_namespace_types bitmask that suppresses audit submission for denied members without granting them. A sandbox knowingly running a caller that probes a type it will never be granted would otherwise flood the audit log and drown the surprising denials that matter. Quiet is per-member rather than a coarse per-category ruleset bit, so a sandbox can silence CLONE_NEWNET while still auditing CLONE_NEWUTS; making it the complement of the allowed set would be broad, could not audit a member that is neither allowed nor explicitly quieted, and would auto-hide members added by future kernels. It is a per-rule bitmask rather than the LANDLOCK_ADD_RULE_QUIET flag and the ruleset quiet_access_* masks, which suit the unbounded rb-tree objects of filesystem and network rules, so that flag is rejected here. Only the youngest denying layer's quiet mask decides, so a parent cannot silence a denial made by a deeper layer. Trace the handled permission mask, every successful namespace rule, and namespace denials. Successful effective no-ops advance the version, and quiet denials remain trace-visible with logged=0. The denial event takes the blockers argument of the filesystem and network events and records the same blockers_type and blockers_access fields, so one filter expression spans the mask-bearing denial events. Handled and rule permission masks may contain permissions from multiple domains in one field, so their names are domain-qualified, such as namespace.use. A blocker is already interpreted in the domain supplied by the audit prefix or denial event, so it retains the bare action name use, matching existing access blockers such as read_file. User namespace creation does not require capabilities, so Landlock can restrict it directly. Non-user namespace types require CAP_SYS_ADMIN before the Landlock check is reached; when the capability permission added by the next commit is also handled, both must allow the operation. Cc: Christian Brauner <brauner@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge E. Hallyn <serge@hallyn.com> Link: https://patch.msgid.link/20261014082718.1435842-4-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
5 daysMerge branch 'lsm/dev' into masterMickaël Salaün
Merge the 4 namespace-related LSM and audit patches: - 4f238e6e1c2c ("ns: Free anonymous mount namespaces via ns_common_free()") - f675d2e95569 ("lsm: add LSM blob and hooks for namespaces") - e26307d83048 ("lsm: add LSM_AUDIT_DATA_NS for namespace audit records") - 11d73af7b083 ("lsm: update the BUILD_BUG_ON() in audit_log_lsm_data()") A credential fix precede these commits. Align with conflict resolution from commit 436485132d23 ("Automated merge of 'lsm/dev' into 'stable-7.4'"). Link: https://lore.kernel.org/r/CAHC9VhSJ3jRybaU=6y2kOKA=KpGE8r=QTMPwdD3KptGcB7msTw@mail.gmail.com Link: https://lore.kernel.org/r/CAHC9VhQQGcKJU_HF78cMSuCPf=2tj8xW78ELOYwb1xJJU8tuRA@mail.gmail.com Link: https://lore.kernel.org/all/20261020.oa9oezae6aX6@digikod.net/
5 daysMerge tag 'vfs-7.4-rc1.shared.net-next.pidfd' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull pidfd updates from Christian Brauner: "This adds thread specific pidfds to af_unix sockets. SO_PASSPIDFD and SO_PEERPIDFD hand out a pidfd for the thread-group leader. A coredump server on the coredump socket can't get a handle on the thread that took the signal and is writing the dump, and anything doing per-thread authentication has the same problem. The sending and the connecting thread are recorded in addition to the thread-group leader and sk_peer_pid becomes an array indexed by pid type. SO_PASSPIDFD_THREAD works like SO_PASSPIDFD but delivers an SCM_PIDFD_THREAD cmsg for the sending thread. Both options are independent so a receiver can ask for both. On SOCK_STREAM sockets recvmsg() only stops merging data at a thread boundary when the receiver asked for a thread pidfd. SO_PEERPIDFD_THREAD returns a pidfd for the thread that called connect(), listen() or socketpair(). pidfs records the coredump on the dumping thread's struct pid too so its pidfd reports it like the leader's does. Selftests for af_unix and the coredump socket are included" * tag 'vfs-7.4-rc1.shared.net-next.pidfd' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: selftests/coredump: check the dumping thread's pidfd pidfs: record the coredump on the dumping thread's pid too selftests/net: SO_PEERPIDFD_THREAD net: add SO_PEERPIDFD_THREAD to get a thread-specific pidfd af_unix: record the pid of the connecting thread net: turn sk_peer_pid into an array indexed by pid type selftests/net: SO_PASSPIDFD_THREAD net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD af_unix: record the pid of the sending thread pid: add helpers to operate on a struct pid array
5 daysMerge tag 'vfs-7.4-rc1.mount' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull mount updates from Christian Brauner: "This adds OPEN_TREE_DROP_MNTNS_MOUNTS. crun started using OPEN_TREE_NAMESPACE to set up the container's mount namespace and open_tree(OPEN_TREE_CLONE) for the sources of its bind mounts. That fails on any host with a mount namespace pinned below such a source. The recursive clone picks the pinned namespace up and move_mount() refuses to attach the tree with ELOOP. Only a younger mount namespace may ever be bound into an older one or mount namespace references could form a loop. A namespace created with OPEN_TREE_NAMESPACE is younger than everything else on the system so from inside it every pinned namespace is older. By the time this fails setns() has run and the host tree is out of reach, so the runtime has to predict the situation beforehand and lose the optimization. snapd pins mount namespaces under /run/snapd/ns so on Ubuntu that is any container bind mounting the host root. Every other path crossing a mount namespace boundary already leaves these mounts behind, copy_mnt_ns() and create_new_namespace() both do. Only get_detached_copy() asks for them. The new flag lets a caller get a clone without them. It stays opt-in because open_tree(OPEN_TREE_CLONE) plus move_mount() is mount --rbind through a file descriptor and dropping them by default would silently lose /run/snapd/ns/*.mnt on a live system. It requires AT_RECURSIVE, is a no-op with OPEN_TREE_NAMESPACE and skips locked nsfs mounts the way copy_mnt_ns() does, so nothing new is exposed. Selftests are included" * tag 'vfs-7.4-rc1.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: selftests/filesystems: test OPEN_TREE_DROP_MNTNS_MOUNTS mount: add OPEN_TREE_DROP_MNTNS_MOUNTS
5 daysMerge tag 'vfs-7.4-rc1.misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "Fixes: - aio: a keyed poll completion on an epoll instance could recurse into the same epoll waitqueue lock when the result eventfd is watched by that very instance. An unprivileged process could make a CPU spin on the recursive lock. eventfd-backed poll completions are always deferred now. - fsnotify_inoderemove() is only called once the inode is really dead, no nlink and no aliases, and open_by_handle_at() can't add an alias to a dead inode anymore. The race could crash fsnotify or lose inode mark notifications. - devtmpfs: the conversion of the public instance to ->get_tree() broke reconfiguring the shared superblock's options on later mounts which made the boot time defaults permanent. A reconfigure context is kept in fc->fs_private so the parse ops can forward options to the underlying filesystem. - ufs truncated the 64-bit directory size to an unsigned int in ufs_last_byte(). A crafted image with a 4 GiB directory produced an out-of-folio read in ufs_find_entry() and, with CONFIG_UFS_FS_WRITE, a write into an adjacent page. - devpts rejects max=0 instead of silently lifting the per-instance pty limit. The value wrapped into ida_alloc_max() and became unlimited. - fs_pin publishes pins with the rcu list helpers so the kill paths reading the lists under rcu see the initialization. - dentry_kill() reports a Tasks-RCU quiescent state. Its cond_resched() is the only reschedule point on the dentry teardown path and cond_resched() isn't a quiescent state for Tasks-RCU, so Meta kept seeing rcu_tasks stalls in btrfs subvolume deletion. - writeback sizes foreign flushes by the target wb's dirty pages instead of the memcg-wide count which over or undersized a single bdi flush. - nfsd READ emitted two fsnotify access events on the iterator path since vfs_iocb_iter_read() already sends one. A READ on a krb5i or krb5p mount showed up twice in inotify. - pipe and splice pass a poll key when waking readers and writers so epoll, poll() and select() waiters only wake for the event they asked for. - the iso8859-14 Unicode to charset tables had page01 duplicated as page1e so 29 code points mapped to the wrong bytes and 22 that aren't in the charset were accepted. - orangefs doesn't wait for an unmount service operation that never returns on system shutdown and uses ssize_t for strscpy() errors. - __register_chrdev() checks the kobject_set_name() return value. - selftest fixes: the openat2 tests hardcoded O_LARGEFILE to 0x8000 which is O_NOFOLLOW on powerpc, resolve_test makes /tmp a mountpoint so RESOLVE_NO_XDEV has a boundary to trip over, file_stressor moves into its own directory with a 30 minute timeout, the kernfs listxattr test skips when SELinux exposes security.selinux, the namespaces active reference tests wait for the thread via a PIDFD_THREAD pidfd since pthread_join() returns before exit_nsproxy_namespaces(), the idmapped_tmpfile test chowns its directory into the mapped range, the clone3 CLONE_CLEAR_SIGHAND test adds CLONE_VM so it fails for the intended reason, the pidfd PPID error message prints the values it compares and fscontext_ns gets a .gitignore. Cleanups: - vmcore prints the release of the crashed kernel from the VMCOREINFO note so a kdump that dies before the dump lands still says which kernel it was for. - initramfs allocates hardlink hash entries with the validated cpio name length instead of PATH_MAX, which put every entry in kmalloc-8k. - the unused dax_layout_busy_page() is removed, dax_layout_busy_page_range() becomes static and dax_folio_init() drops a redundant list initialization. - vfs_empty_path() is removed, it has had no callers since getname_maybe_null(). - comment and documentation fixes in aio, bpf_fs_kfuncs, fs-writeback, inode, read_write, squashfs and the vfs.rst copy of struct file_system_type" * tag 'vfs-7.4-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (38 commits) selftests/filesystems: Fix idmapped_tmpfile layer dir ownership selftests/namespaces: Wait for thread exit via pidfd in active-ref tests writeback: size foreign flushes by target wb dirty pages initramfs: Reduce hardlink hash allocation sizes fs: remove unused vfs_empty_path() dcache: report a Tasks-RCU quiescent state in dentry_kill() vmcore: report the release of the crashed kernel splice: pass a poll key when waking pipe readers and writers pipe: pass a poll key when waking writers after a resize orangefs: use ssize_t instead of size_t for error codes... orangefs_super: don't wait on service operation on system shutdown. docs/vfs: Fix the struct file_system_type copy nls: fix the Unicode to charset tables of iso8859-14 selftests/filesystems/openat2: make /tmp a mountpoint inside private namespace selftests/filesystems/openat2: fix O_LARGEFILE definitions for non-arm64 architectures fs: fix misleading comments in read_write.c squashfs: fix inode number description in documentation fs: fix typos in comments fs/dax: Make dax_layout_busy_page_range() static fs/dax: Remove unused dax_layout_busy_page() ...
5 daysMerge tag 'vfs-7.4-rc1.coredump' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull coredump updates from Christian Brauner: "This adds sparse coredumps and per-request memory type selection to the coredump socket protocol. A coredump sent over the socket transfers every zero of every hole in every mapping. For a process with 128 threads that's 1 GB of mostly thread stacks, 8 MB reservations with a few pages touched, and the holes sit in the middle of the dump rather than at the end. The coredump_filter bit that was proposed for this stops each PT_LOAD at the last populated page. But that mask says which kinds of memory to include and propagates across fork and exec, whereas what is selected here is an encoding. The usermodehelper isn't salvagable for this either. The coredump socket already has a handshake for exactly this. A server that raises COREDUMP_RECORDS in coredump_ack->mask gets the coredump as a sequence of records, each a struct coredump_record_header followed by what it describes. The stream ends explicitly with an end record that reports the size, so a missing one means truncation. With COREDUMP_SPARSE holes cross the socket as a bare header that says how many zero bytes were skipped. Reassembling the records gives back the same coredump, so a debugger and everything else still see an ordinary core file. Numbers from the selftests: the 128 thread process sends 1424153 bytes for a coredump of 1075150848 bytes, a 256 MB mapping with the first and the last page touched sends 188793 bytes for 268890112 bytes, and with COREDUMP_RECORDS alone the record overhead is under one percent. The selftests also simulate a server uploading to a blob store that can't seek and rewrites the program headers so the object is an ordinary ELF core file without the holes. COREDUMP_MEMORY_TYPES lets the server choose what memory to dump per request instead of relying on the static /proc/<pid>/coredump_filter of the crashing task. The request carries the default types and a mask of every type the kernel knows about, the ack carries the selection. Zero is valid and dumps the program headers and notes and nothing but the mappings that are always dumped. Preparatory cleanups refuse negative skips in dump_skip_to(), chunk every write at a page so a pipe or a socket never takes a short write in the middle of a record, make the dump helpers return bool and replace the core_dumped integer with COREDUMP_STATE_STARTED and COREDUMP_STATE_TRUNCATED flags. Also included is a fix for coredump_parse() reading core_pattern while it is being modified. The sysctl handler now validates a copy and publishes it under a spinlock and the parser works on a snapshot, so a rejected pattern is never visible and the rollback logic goes away. And to_kthread()'s lockless flags read is annotated with READ_ONCE()" * tag 'vfs-7.4-rc1.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (29 commits) kthread: Annotate lockless to_kthread() flags access coredump: parse a snapshot of core_pattern selftests/coredump: test failed handshakes selftests/coredump: improve coredump size negotiation tests selftests/coredump: test COREDUMP_MEMORY_TYPES selftests/coredump: simplify the refusal tests tools: sync coredump.h header coredump: select memory types to include selftests/coredump: show how to inspect the task to decide how the coredump should be sent selftests/coredump: simulate a blob store selftests/coredump: put a hole in the middle of a sparse mapping selftests/coredump: hand the record stream to a sink selftests/coredump: test COREDUMP_RECORDS and COREDUMP_SPARSE coredump: describe the holes when COREDUMP_SPARSE is negotiated coredump: send the coredump in records if requested tools: sync coredump.h header coredump: add COREDUMP_SPARSE to the coredump socket protocol coredump: add COREDUMP_RECORDS to the coredump socket protocol coredump: clean up coredump state handling coredump: always chunk writes ...
5 daysMerge tag 'vfs-7.4-rc1.close_range' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull close_range updates from Christian Brauner: "This adds two new close_range() flags. CLOSE_RANGE_EXCEPT makes close_range() operate on all file descriptors outside of [fd, max_fd] instead of the ones inside. Alone it closes everything but the range. With CLOSE_RANGE_CLOEXEC it marks everything but the range close-on-exec. With CLOSE_RANGE_UNSHARE dup_fd() never takes a reference on what is dropped. So a task between clone(CLONE_FILES | CLONE_VM | CLONE_VFORK) and execve() that has the descriptors for the child in one window can shed the rest of the shared table in one call and nothing outside of the window is referenced by the child at any point. CLOSE_RANGE_CLOEXEC_ONLY closes the close-on-exec descriptors in the range and leaves everything else alone. Whatever the caller deliberately passes down, stdio, LISTEN_FDS, an inherited pipe, stays where it is. Combined with CLOSE_RANGE_EXCEPT it names the handful of close-on-exec descriptors that have to survive, the executable or an error pipe, and closes every other close-on-exec descriptor. Along the way dup_fd() stops copying a range in the middle of the table only to close it again. close_range(CLOSE_RANGE_UNSHARE) only avoided the copy when the range sat at the end of the table. Descriptors in a skipped range are never copied and no reference is taken on them, so ->flush() isn't called anymore for files from a table they were never part of. The flags are turned into an enum and selftests cover the window positions, the shared and the private table and the unshare form" * tag 'vfs-7.4-rc1.close_range' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: selftests/core: test CLOSE_RANGE_CLOEXEC_ONLY file: add CLOSE_RANGE_CLOEXEC_ONLY file: let dup_fd() drop only close-on-exec descriptors selftests/core: test CLOSE_RANGE_EXCEPT file: add CLOSE_RANGE_EXCEPT close_range: turn the flags into an enum file: let dup_fd() drop everything outside of the range file: rename dup_fd()'s punch_hole to range selftests/core: test the hole CLOSE_RANGE_UNSHARE leaves behind file: let dup_fd() leave the punched hole behind
9 daysAutomated merge of 'lsm/dev' into 'stable-7.4'Paul Moore
Manual merge fixup in ns_common_types.h:ns_common to work around a conflict with the nsfs RCU grace period fix. * lsm/dev: lsm: remove redundant NULL check in security_init() selftests/landlock: Check full ioctl commands in audit records lsm: Preserve full ioctl commands in audit records doc: fix LSM ordering description for /sys/kernel/security/lsm doc: describe CONFIG_LSM and lsm= as the selection mechanism selftests/bpf: verify mount idmaps reach inode hooks lsm: expose mount idmaps to inode hooks rust: lsm: replace `core::mem::zeroed` with `pin_init::zeroed` cred: prevent slab cache merging for cred_jar lsm: don't call security_backing_file_free() multiple times lsm: delete duplicate assignment in lsm_prepare() lsm: update the BUILD_BUG_ON() in audit_log_lsm_data() lsm: add LSM_AUDIT_DATA_NS for namespace audit records lsm: add LSM blob and hooks for namespaces ns: Free anonymous mount namespaces via ns_common_free() cred: clarify that task_struct::cred is only for the current task
9 daysAutomated merge of 'audit/topic-7.3-audit_fsopen' into 'stable-7.4'Paul Moore
* audit/topic-7.3-audit_fsopen: audit: add FSOPEN record to log filesystem name
9 daysMerge tag 'kvm-x86-coco-7.4' of https://github.com/kvm-x86/linux into HEADPaolo Bonzini
KVM guest_memfd and CoCo changes for 7.4 - 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 Conflicts in arch/arm64/kvm/mmu.c: convert to use s2vi.
9 daysnet: dccp: uapi: clean up kernel-doc commentsRandy Dunlap
Use correct kernel-doc format for struct members and add comments for missing struct members (dccph_seq2 and reserved). Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://patch.msgid.link/20261011032800.278870-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
10 daysiommufd/iova_bitmap: Ensure that iova_bitmap_set() handles the full IOVAAndrea Parri
Generally userspace is going to step the dirty bitmap through the IOVA space. However if the bitmap ends in the middle of a large PTE this is problematic. The first step will clear the dirty bit and report dirty to the end of its bitmap while the second step will see the clear'd dirty and report clean for the start of the bitmap. If it happens this ends up losing dirties. Further this function is missing bounds checking so if this does happen ther is a good chance it will write memory beyond what the userspace was expecting. Return an error code if this illegal condition happens. Fixes: 58ccf0190d19 ("vfio: Add an IOVA bitmap support") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Andrea Parri <parri.andrea@gmail.com> Link: https://patch.msgid.link/20260925161142.189813-2-parri.andrea@gmail.com Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
12 daysdrm/fourcc: Add Apple Interchange layout format modifierJames Calligeros
Apple Interchange is a tiled and compressed image layout used for buffer exchange between Apple hardware blocks. It is similar to the already-supported GPU_TILED_COMPRESSED layout. Add a format modifier for Apple Interchange so that it can be used for buffer exchange. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenz.ca> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20261007-apple-interchange-modifier-v3-1-721fc44abf6b@gmail.com
12 daysMerge tag 'tee-for-v7.4' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into soc/drivers Move tee_ioctl_shm_register_data to above IOCTL definition * tag 'tee-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee: tee: move tee_ioctl_shm_register_data to above IOCTL definition Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 dayswifi: nl80211: add NL80211_CMD_UPDATE_BEACONJohannes Berg
Updating beacon and related templates with NL80211_CMD_SET_BEACON requires the wiphy mutex, which can get contended, delaying the updates. Add a NL80211_CMD_UPDATE_BEACON operation that can only do beacon template updates, not other configuration changes, but is called without the wiphy mutex. If something requires the mutex then the driver can return -EAGAIN, to go through the normal change_beacon with wiphy mutex held. Also with this support updating multiple beacons for an MLD at the same time, just to further reduce round-trips if desired. Link: https://patch.msgid.link/20261009201417.fc5c148060cd.I174b47b65aca1bbaaf6a74d64fa0e264f84028b4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 daysMerge branch 'tip/sched/urgent'Peter Zijlstra
Pickup dependencies; notably the RB-tree fix. Signed-off-by: Peter Zijlstra <peterz@infradead.org>
12 daysMerge tag 'drm-rust-next-2026-10-11' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/rust/kernel into drm-next DRM Rust changes for v7.4-rc1 - Cross-subsystem: - I/O (shared from driver-core tree via signed tag rust-io-7.4-rc1): - Reimplement register!() as a procedural macro, require matching base types for register access, and replace relative registers with typed I/O projections. Convert Nova, Tyr and the PCI sample - Add AsRepr/AsReprMut conversions for I/O on compatible wrapper types and transmute helpers with deferred size checks - DMA (shared from driver-core tree via signed tag rust-dma-7.4-rc1): - Tie Coherent, CoherentBox and CoherentHandle to the device's bound lifetime, and allow scoped debugfs files backed by non-'static data - Allow auxiliary registration-data closures to return covariant sub-fields and add UserSliceWriter::write_truncated() - Implement Send and Sync for MapleTree - Add PCI resource_flags() and IORESOURCE_MEM_64, and convert PCI IRQ flags to impl_flags!() - Add I/O view cast() with compile-time size and alignment checks - DRM: - Add Rust dma_fence abstractions with separate producer (DriverFence) and consumer (Fence) types, per-context sequencing, signal callbacks and preallocation. Additional backend operations remain follow-up work. - Initialize DRM registrations and their data in place, removing a separate allocation - Drop the unused flags argument from drm::Registration::new() - Nova: - UAPI and Cross Module API: - Add NovaCoreApi and a lifetime-bound handle for auxiliary child drivers, carried in nova-drm registration data - Expose a render node and extensible INFO ioctl reporting GPU architecture, opaque chip ID, usable VRAM and VRAM BAR sizes, full and short GPU names, and GID, with size discovery and truncation to the userspace buffer size - Move BAR-size queries into GPU info, removing GETPARAM and changing the UAPI - PRAMIN access: - Add typed CPU access to VRAM through the movable 1 MiB BAR0 PRAMIN window, with per-architecture support from Turing through Blackwell - Add GpuMm centralized memory manager, VramAddress type, aperture documentation and optional probe-time self-tests under CONFIG_NOVA_CORE_SELFTESTS - GPU virtual memory and BAR1: - Add VRAM buddy allocation, TLB flushing, MMU v2/v3 page-table types with trait-based generics (PteOps, PdeOps, DualPdeOps, MmuConfig) and a generic walker - Add maple-tree virtual address tracking and multi-page mapping, separating allocation from mapping execution - Add CPU access to mapped VRAM through BAR1 and memory-management self-tests; handle 64-bit BAR0 when locating BAR1 - GPU interrupts and GSP events: - Add GIN (GPU Interrupt and Notification) interrupt-tree support with MSI-X, MSI fallback and per-architecture rearming - Drain GSP events between commands via a threaded SWGEN0 handler - Report OS errors, robust-channel notifications and unknown messages without aborting command waits; hold the queue lock and use one deadline per wait - Disable GSP event interrupts on persistent falcon faults or drain errors - Add a delivery/rearm self-test, interrupt-tree KUnit coverage and interrupt-controller documentation - GSP messaging fixes: - Queue setup RPCs before GSP-RM boot - Correct DMA barriers in both queue directions - Firmware and transport: - Extract a reusable radix3 buffer mapper; zero-pad page-table levels to whole pages to prevent booter reads of stale padding - Correct GSP-FMC naming and boot-flow documentation - Set MCTP header version 1 for FSP messages and retain the command queue's BAR0 reference - Resource handling: - Replace unnecessary BarUser reference counting with in-place ownership and borrowed access; consolidate probe initialization - Declare an unlimited DMA maximum segment size - Tyr: - Use bitfield!() for firmware section flags and memory attributes that do not describe registers - Zero unsupported and newly added GPU-info fields, and limit the doorbell array to 17 entries to fit the mapped register region Signed-off-by: Dave Airlie <airlied@redhat.com> From: "Danilo Krummrich" <dakr@kernel.org> Link: https://patch.msgid.link/DM371PN4TBJT.3LY1B0EYWSI4@kernel.org
13 daysbtrfs: fix typos and repeated words in commentsHemanth Selam
Fix misspellings and repeated words in comments, found with scripts/checkpatch.pl and codespell. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
13 daysbtrfs: qgroup: use atomic operations for btrfs_fs_info::qgroup_flagsQu Wenruo
Currently we define btrfs_fs_info::qgroup_flags as u64, to match the on-disk qgroup status item's flag. But for now we have only 4 bits utilized for that flag, and since it's u64 we have no way to properly use the existing atomic bit operations (requires an unsigned long pointer). This results in a lot of non-atomic operations inside qgroup code. Some maybe fine as other locks are involved, but still it's not a good practice. Remove those non-atomic operations by: - Re-define btrfs_fs_info::qgroup_flags as unsigned long - Define BTRFS_QGROUP_STATUS_BIT_* and BTRFS_QGROUP_RUNTIME_BIT_* Instead of the old value define the bit number. - Use set_bit()/clear_bit()/test_bit() to replace open-coded bit operations - Add one extra check at qgroup status item read time To make sure the on-disk flag is still inside ULONG_MAX. Otherwise reject the status item and disable qgroup. - Get rid of unnecessary spinlock when checking a single bit Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
13 daysdrm/panfrost: Fix races between perfcnt and reset sequenceAdrián Larumbe
Formerly, the reset sequence would race with panfrost_mmu_as_put() when tearing down a perfcnt session. On top of that, poking GPU registers to program a perfcnt session or obtaining a dump might lead to undefined behaviour when done at the same time a reset was ongoing. Use the reset r/w semaphore when disabling and re-enabling perfcnt configuration, and also in the sections inside the 'enable'and 'dump' ioctls where device registers are being accessed. On top of that, expand the DRM uAPI for the perfcnt DUMP operation so that user space can be made aware of a reset having happened, whether it succeeded or failed to restore the original configuration. UM needs to know about this condition because counter data is inaccurate after a reset, so the best approach might be simply to try again. Finally, update driver uAPI documentation to explain the meaning of the new perfcnt dump ioctl's state flags, and bump DRM driver minor number to reflect the new DUMP IOCTL req field. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Fixes: 73e467f60acd ("drm/panfrost: Consolidate reset handling") Fixes: 7786fd108777 ("drm/panfrost: Expose performance counters through unstable ioctls") Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patch.msgid.link/20261012-claude-fixes-v15-15-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
13 daysmount: add OPEN_TREE_DROP_MNTNS_MOUNTSKir Kolyshkin
A recursive open_tree(OPEN_TREE_CLONE) copies the nsfs mounts of any mount namespaces pinned below the source. When the clone is attached inside a mount namespace younger than a pinned one, move_mount(2) fails with ELOOP from check_for_nsfs_mounts(), per the rule from commit 8823c079ba71 ("vfs: Add setns support for the mount namespace") that prevents mount namespace reference loops. This breaks container runtimes that use OPEN_TREE_NAMESPACE, such as crun [1]. The new namespace is younger than everything else, so bind mounting e.g. the host root fails on any host that pins a mount namespace (snapd does, under /run/snapd/ns). By the time it fails, setns() has already run and userspace cannot recover: the host tree is out of reach, and the offending mounts cannot be unmounted from the detached copy. copy_mnt_ns() and create_new_namespace() already leave these mounts behind; only get_detached_copy() copies them. Add an open_tree() flag to drop them from the clone, as suggested by Aleksa [2]. Locked nsfs mounts are dropped the same way copy_mnt_ns() does it, so nothing new is exposed. Keep it opt-in: open_tree(OPEN_TREE_CLONE) plus move_mount(2) is how mount --rbind works through a file descriptor, and in the caller's own or an older namespace such mounts remain usable. The flag requires AT_RECURSIVE, since a non-recursive clone has no submounts to drop, and OPEN_TREE_CLONE or OPEN_TREE_NAMESPACE. With the latter it is a no-op, so a runtime can pass it with any recursive open_tree() call. Link: https://github.com/containers/crun/issues/2262 [1] Link: https://lore.kernel.org/all/2026-01-07-oldest-grim-captions-spills-ywC2O3@cyphar.com/ [2] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Link: https://patch.msgid.link/20261006-nsfs-prune-rfc-v3-1-adb97ea52868@gmail.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 daysnet: add SO_PEERPIDFD_THREAD to get a thread-specific pidfdChristian Brauner
SO_PEERPIDFD hands out a pidfd for the thread-group that called connect() or socketpair(). Enable workloads such as the coredump server or a broker to get a pidfd of the specific thread that connected to the socket. Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Signed-off-by: Andrew Halaney <andrew@amutable.com> Link: https://patch.msgid.link/20261005-work-unix-passpidfd-v4-7-350183b6e02a@amutable.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 daysnet: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFDChristian Brauner
Currently, SCM_PIDFD carries a pidfd for the thread-group leader. A broker or the coredump server cannot learn the identity of the specific thread that sent a given message. Now that both struct pids are recorded a receiver can ask for the specific identity it needs. So add SO_PASSPIDFD_THREAD as a sibling of SO_PASSPIDFD. SO_PASSPIDFD_THREAD delivers an SCM_PIDFD_THREAD, i.e. scoped to the specific thread sending. This is completely independent of SO_PASSPIDFD, meaning you can use both options and get both cmsgs. On SOCK_STREAM sockets recvmsg() only stops merging data at a thread boundary when the receiver asked for a thread pidfd. For SO_PASSCRED and SO_PASSPIDFD receivers all threads of one process remain a single writer. Co-developed-by: Andrew Halaney <andrew@amutable.com> Signed-off-by: Andrew Halaney <andrew@amutable.com> Link: https://patch.msgid.link/20261005-work-unix-passpidfd-v4-3-350183b6e02a@amutable.com Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-10-11Merge tag 'amd-drm-next-7.4-2026-10-08' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/amdgpu/kernel into drm-next amd-drm-next-7.4-2026-10-08: amdgpu: - Fix direct scanout alpha on some DRM_FORMATs - UserQ fixes - Fix for PSR with tearing flips - GPU reset vblank fix - Debugfs register interface fix - Fix mode patching - Expand Mac reserved memory workaround - GC 12.1 fixes - Clean up MES/HWS vmid mask handling - Make runtime pm more fine grained - A+A SPM fixes - SR-IOV fixes - 3D LUT fixes - HDMI fixes - DCN 4.2 fixes - HDMI VRR fixes - DC tracing fixes - UALink fixes amdkfd: - SDMA doorbell fix - Fix dma-buf reference leak in error path Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20261008212310.2508510-1-alexander.deucher@amd.com