Linux/linux 1fc5a74drivers/block/drbd drbd_nl_gen.c, drivers/gpu/drm/amd/display/dc/resource/dcn42 dcn42_resource.c

Merge tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull kmalloc_obj conversions from Kees Cook:
 "Another run of the Coccinelle script for converting kmalloc()
  family of allocations to kmalloc_obj() via the existing rules
  in scripts/coccinelle/api/kmalloc_objs.cocci"

* tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: refresh kmalloc_obj() conversions
  drm/amd/display: Fix harmless type mismatch in allocation
DeltaFile
+21-31drivers/scsi/leapraid/leapraid_func.c
+23-27drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c
+21-25drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c
+20-22drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c
+22-18drivers/block/drbd/drbd_nl_gen.c
+10-20drivers/staging/media/atomisp/pci/sh_css.c
+117-143298 files not shown
+637-726304 files

Linux/linux 9f0346d. MAINTAINERS CREDITS, Documentation/ABI/testing sysfs-class-firmware

Merge tag 'driver-core-7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core fixes from Danilo Krummrich:

 - Fix kernfs listxattr() not returning security xattr names (e.g.
   SELinux labels) when the kernfs node has no allocated kernfs_iattrs

 - Fix silent truncation of IRQ vector indices in the Rust PCI
   abstractions

 - Don't select OF from DRIVER_PE_KUNIT_TEST; skip the test when OF is
   disabled instead of silently enabling extra kernel functionality

 - Russ Weight is retiring from kernel development; update the Firmware
   Loader sysfs contact to the driver-core mailing list, add a CREDITS
   entry for Firmware Upload, and update MAINTAINERS accordingly

* tag 'driver-core-7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
  MAINTAINERS: Remove Russ Weight from Firmware Loader

    [5 lines not shown]
DeltaFile
+7-7Documentation/ABI/testing/sysfs-class-firmware
+1-3fs/kernfs/inode.c
+3-1rust/kernel/pci/irq.rs
+4-0CREDITS
+3-0drivers/base/test/property-entry-test.c
+0-1MAINTAINERS
+18-121 files not shown
+18-137 files

Linux/linux 214f4aearch/loongarch/kernel smp.c, arch/loongarch/kvm vcpu.c mmu.c

Merge tag 'loongarch-fixes-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch fixes from Huacai Chen:

 - Fix build errors when RUST and KASAN enabled

 - fix a typo in comment of vmlinux.lds.S

 - fix several bugs in Kprobes, BPF JIT and KVM support

* tag 'loongarch-fixes-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  perf build: Add clang and rust target flags for LoongArch
  LoongArch: KVM: Fix TOCTOU race on pv_features
  LoongArch: KVM: Validate MSI data before routing it to EIOINTC
  LoongArch: KVM: Preserve memslot arch flags on KVM_MR_FLAGS_ONLY
  LoongArch: KVM: Remove unused function kvm_arch_flush_remote_tlbs_memslot()
  LoongArch: KVM: Fix resource leak in kvm_loongarch_env_init() error path
  LoongArch: KVM: Add unregister helpers for the KVM interrupt devices
  LoongArch: KVM: Free init resources if kvm_init() fails

    [6 lines not shown]
DeltaFile
+34-5arch/loongarch/kvm/main.c
+10-6arch/loongarch/kvm/mmu.c
+0-8arch/loongarch/kernel/smp.c
+8-0arch/loongarch/kvm/intc/pch_pic.c
+5-1arch/loongarch/kvm/vcpu.c
+5-0arch/loongarch/kvm/intc/dmsintc.c
+62-2014 files not shown
+86-2620 files

Linux/linux d9d80a8fs/btrfs zstd.c zoned.c

Merge tag 'for-7.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

 - preserve inode compression level when changing attributes

 - fix lost wakeup when waiting for a zstd workspace

 - fix bio context leaks after ordered extent processing errors

 - in send, handle unexpected extents for non-regular inodes

 - handle edge case in creation of reloc tree with enabled quotas

 - in scrub report the exact failing offset, not the stripe base

 - error handling fixes
     - error code propagation in send, zoned mode and raid-stripe-tree
     - restore active device pointer after seeding device addition error

    [22 lines not shown]
DeltaFile
+16-9fs/btrfs/raid-stripe-tree.c
+14-10fs/btrfs/scrub.c
+18-3fs/btrfs/ioctl.c
+18-1fs/btrfs/transaction.c
+7-9fs/btrfs/zoned.c
+10-1fs/btrfs/zstd.c
+83-337 files not shown
+104-3813 files

Linux/linux 0d9ff90drivers/scsi scsi_bsg.c, drivers/scsi/megaraid megaraid_sas_base.c

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Two enhancements to add support and MCQ for additional Intel 4.0
  controller types.

  The rest are all driver fixes, the largest of which is the mpi3mr
  target use after free fix, follwed by a similar TOCTOU fix for
  io_uring passthrough in bsg"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: megaraid_sas: Limit NVMe request size to the PRP chain frame
  scsi: bsg: Fix TOCTOU in io_uring passthrough command setup
  scsi: bsg: Cap io_uring sense copy to max_response_len
  scsi: mpt3sas: Avoid out-of-bounds cpumask_of_node() call in _base_assign_reply_queues()
  scsi: mpi3mr: Fix use-after-free on tgt_dev->starget during target device refresh/update
  scsi: target: iscsi: Reserve a terminator byte for the login payload
  scsi: target: iscsi: Fix hang for aborted WRITE_PENDING commands
  scsi: ufs: ufs-pci: Add MCQ support for Intel UFS 4.0 controllers

    [10 lines not shown]
DeltaFile
+59-0drivers/ufs/host/ufshcd-pci.c
+29-18drivers/scsi/scsi_bsg.c
+35-10drivers/scsi/mpi3mr/mpi3mr_os.c
+13-4drivers/ufs/host/ufs-qcom.c
+12-1drivers/scsi/megaraid/megaraid_sas_base.c
+8-0drivers/scsi/mpi3mr/mpi3mr_transport.c
+156-337 files not shown
+170-4013 files

Linux/linux d0fc310Documentation/fault-injection nvme-fault-injection.rst, drivers/nvme/host rdma.c fc.c

Merge tag 'block-7.3-20260905' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull block fixes from Jens Axboe:

 - NVMe fixes via Keith:
     - nvme-tcp fixes for an out-of-bounds write on an over-long PDU
     - nvmet-tcp, nvmet-rdma and nvme-rdma leak and cleanup-ordering
       fixes
     - FDP placement id array racy access fix
     - nvme-fc double free of fabrics options on nvme_add_ctrl()
       failure, and a secret leak failure
     - Fault injection opcode filtering
     - stale namespace removal during scan
     - Various other smaller fixes and cleanups

 - Flag zoned disks with GENHD_FL_NO_PART

 - Save the page offset gaps in a cloned bio


    [26 lines not shown]
DeltaFile
+57-42drivers/nvme/host/core.c
+65-0Documentation/fault-injection/nvme-fault-injection.rst
+20-6drivers/nvme/host/fc.c
+9-9include/linux/nvme-tcp.h
+10-8drivers/nvme/host/rdma.c
+7-8drivers/nvme/target/rdma.c
+168-7318 files not shown
+260-9024 files

Linux/linux 3a2c4d5drivers/block/drbd drbd_nl_gen.c, drivers/gpu/drm/amd/display/dc/resource/dcn42 dcn42_resource.c

treewide: refresh kmalloc_obj() conversions

This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook <kees+treewide at kernel.org>
DeltaFile
+21-31drivers/scsi/leapraid/leapraid_func.c
+23-27drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c
+21-25drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c
+20-22drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c
+22-18drivers/block/drbd/drbd_nl_gen.c
+10-20drivers/staging/media/atomisp/pci/sh_css.c
+117-143298 files not shown
+637-726304 files

Linux/linux 4d7d948Documentation/ABI/testing ima_policy, fs/configfs mount.c

Merge tag 'integrity-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity

Pull IMA fixes from Mimi Zohar:

 - Instantiating the ima_file_truncate and ima_path_truncate LSM hooks
   resulted in configfs locking issues.

   configfs files should not be measured, appraised, or audited in the
   first place, so the builtin policies are updated to exclude them.

 - IMA audit messages include the filename, which could result in a page
   fault when the filename doesn't exist

 - Un-hide the IMA_MEASURE_PCR_IDX Kconfig prompt

* tag 'integrity-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
  ima: allow users to specify the pcr index with IMA_MEASURE_PCR_IDX
  ima: Check for ERR_PTR from dentry_path() in validate_hash_algo()
  ima: don't measure/appraise files on configfs
  configfs: move CONFIGFS_MAGIC definition to magic.h
DeltaFile
+6-1security/integrity/ima/ima_policy.c
+5-1security/integrity/ima/Kconfig
+1-3fs/configfs/mount.c
+3-0Documentation/ABI/testing/ima_policy
+2-0security/integrity/ima/ima_appraise.c
+1-0include/uapi/linux/magic.h
+18-56 files

Linux/linux 654ae5ddrivers/dma-buf dma-heap.c, drivers/gpu/drm drm_pagemap.c

Merge tag 'drm-fixes-2026-09-05' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Lots of scattered fixes: nouveau has a bunch of display fixes for
  blackwell GPUs that should mean we light up monitors properly and fix
  some desktop rendering problems, amdgpu and intel display changes as
  usual.

  There also changes to the core pagemap, then the usual amouny of AI
  inspired validation fixes.

  core:
   - Fix drm_crtc_commit leak when PAGE_FLIP_EVENT is used

  dma-buf:
   - Publish the dma-buf only after copy_to_user succeeds
   - fix some kernel-doc warnings

  atomic-state-helpers:

    [106 lines not shown]
DeltaFile
+233-37drivers/gpu/drm/drm_pagemap.c
+191-0drivers/gpu/drm/nouveau/nvkm/engine/disp/gb202.c
+52-73drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
+112-1tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+85-1drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c
+40-40drivers/dma-buf/dma-heap.c
+713-15279 files not shown
+1,210-31785 files

Linux/linux 3f17a52arch/arm64/include/asm cpufeature.h, arch/arm64/kernel cpuinfo.c cpu_errata.c

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:
 "Nothing Earth-shattering, but worthwhile fixes nonetheless:

   - Disable interrupts during page-table walk in show_pte()

   - Fix kexec_file_load() with 52-bit capable kernels on machines
     without 52-bit addressing

   - Fix MIDR matching in CPU errata handling for KVM guests

   - Avoid reading MTE-specific ID registers when MTE support is
     disabled"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Don't read GMID_EL1 when MTE is disabled
  arm64: errata: pass REVIDR when matching target implementation CPUs
  arm64: trans_pgd: clone only the linear map that exists at runtime
  arm64: mm: Fix the lockless page-table walk in show_pte()
DeltaFile
+29-4arch/arm64/kernel/cpufeature.c
+8-4arch/arm64/mm/fault.c
+0-7arch/arm64/include/asm/cpufeature.h
+2-1arch/arm64/kernel/machine_kexec.c
+1-1arch/arm64/kernel/cpuinfo.c
+1-1arch/arm64/kernel/cpu_errata.c
+41-181 files not shown
+42-187 files

Linux/linux 408802ffs/ceph mds_client.h mds_client.c, net/ceph messenger.c

Merge tag 'ceph-for-7.3-rc2' of https://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
 "A small fixup for the new nearfull_sync mount option, a potential
  use-after-free fix (marked for stable) and a patch that eliminates
  the last use of PageWriteback macro in the tree"

* tag 'ceph-for-7.3-rc2' of https://github.com/ceph/ceph-client:
  ceph: apply nearfull_sync option on remount
  libceph: remove pinning assertion in ceph_msg_data_iter_next()
  ceph: lock mutex in ceph_mds_check_access()
DeltaFile
+5-0fs/ceph/super.c
+4-0fs/ceph/mds_client.c
+0-1net/ceph/messenger.c
+1-0fs/ceph/mds_client.h
+10-14 files

Linux/linux 6903878security/integrity/ima Kconfig

ima: allow users to specify the pcr index with IMA_MEASURE_PCR_IDX

The IMA_MEASURE_PCR_IDX option is currently not visible in the kconfig
frontend, so it always uses its default, 10. This means that the
'range 8 14' is dead code, and users are unable to specify the pcr index
value.

In a previous discussion, Mimi explained that users should be able to use
this config option to specify the pcr index. [1]

Let's add a prompt for users to specify the pcr index, when EXPERT is
enabled.

This dead range was found by kconfirm, a static analysis tool for Kconfig.

Link: https://lore.kernel.org/all/1feff118-4afa-4b9c-86f1-271a7a88208f@gmail.com/T/#mc4efa2491b4937eb7c9e532c29ffba516a70e662 [1]
Signed-off-by: Julian Braha <julianbraha at gmail.com>
Signed-off-by: Mimi Zohar <zohar at linux.ibm.com>
DeltaFile
+5-1security/integrity/ima/Kconfig
+5-11 files

Linux/linux 90feea3drivers/gpu/drm/amd/display/dc/resource/dcn42 dcn42_resource.c

drm/amd/display: Fix harmless type mismatch in allocation

While converting to kmalloc_obj() API, a type assignment mismatch was
found between the desired struct dcn42_resource_pool and the allocated
struct dcn401_resource_pool. Fix the type (it is harmless: the objects
have the same contents and size).

Signed-off-by: Kees Cook <kees at kernel.org>
---
Cc: Harry Wentland <harry.wentland at amd.com>
Cc: Leo Li <sunpeng.li at amd.com>
Cc: Rodrigo Siqueira <siqueira at igalia.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: "Christian König" <christian.koenig at amd.com>
Cc: David Airlie <airlied at gmail.com>
Cc: Simona Vetter <simona at ffwll.ch>
Cc: Dan Wheeler <daniel.wheeler at amd.com>
Cc: Roman Li <Roman.Li at amd.com>
Cc: Ovidiu Bunea <ovidiu.bunea at amd.com>

    [6 lines not shown]
DeltaFile
+1-1drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c
+1-11 files

Linux/linux 986c24edrivers/hid wacom_wac.c hid-multitouch.c, drivers/hid/bpf hid_bpf_struct_ops.c

Merge tag 'hid-for-linus-2026090401' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID fixes from Benjamin Tissoires:

 - hid-hyperv build fixes on certain configs (Jiri Kosina)

 - HID-BPF fix and selftests now that the bpf verifier is more
   restrictive (Benjamin Tissoires)

 - Some AI detected fixes for OOB, errors and validation (Ibrahim
   Hashimov, Shen Yongchao, Wei Jie Law)

 - various device fixes (Dave Carey and Vadim Klishko)

* tag 'hid-for-linus-2026090401' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: bpf: serialize device reference release in struct_ops destroy path
  HID: rmi: fix OOB access with undersized RMI reports
  selftests/hid: prepare test_rdesc_fixup_get_data_overflow for the new verifier
  selftests/hid: Add a test to ensure we can write fields in hid_device

    [6 lines not shown]
DeltaFile
+43-8tools/testing/selftests/hid/hid_bpf.c
+43-3drivers/hid/hid-rmi.c
+26-0tools/testing/selftests/hid/progs/hid.c
+19-4drivers/hid/bpf/hid_bpf_struct_ops.c
+8-11drivers/hid/hid-multitouch.c
+13-0drivers/hid/wacom_wac.c
+152-265 files not shown
+161-2911 files

Linux/linux 36ec09esound/core pcm_native.c, sound/hda/codecs conexant.c

Merge tag 'sound-7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes since 7.3-rc1.

  Quite a few fixes are for ALSA core for issues that have been detected
  by the things you know well. Additionally a series of hardening for
  runtime PM, and usual quirk updates, and some other misc driver fixes
  are included.

  Core:
   - Fixes for PCM races
   - UMP parser NULL dereference fix
   - Fix error handling in rawmidi ioctl

  USB- and HD-audio:
   - Implement missing runtime PM guards across multiple interfaces
   - Fix for OOB access in US-122L MIDI driver
   - Double-free fix for CAIAQ driver

    [29 lines not shown]
DeltaFile
+38-1sound/hda/codecs/realtek/alc269.c
+27-10sound/core/pcm_native.c
+30-6sound/usb/mixer_scarlett2.c
+20-0sound/hda/codecs/conexant.c
+18-0sound/usb/mixer_maps.c
+5-5sound/usb/caiaq/audio.c
+138-2213 files not shown
+191-3119 files

Linux/linux 3e66602drivers/ata libata-scsi.c ahci.c

Merge tag 'ata-7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata fixes from Niklas Cassel:

 - Work around lost interrupts on Marvell 88SE61xx

   The Marvell AHCI controller requires you to clear interrupts in the
   opposite order from what is specified in the AHCI specification in
   order to not lose interrupts (Hajo)

 - Do not raise UNIT ATTENTION for depopulation commands

   The libata completion function unconditionally sets sense data with
   sense key UNIT ATTENTION (UA) for depopulation commands. The SCSI
   layer will fail a command when seeing this sense data. UA is only
   supposed to be raised if the capacity actually changed.

   Since these commands are currently only supported as passthrough
   commands, the user is expected to revalidate the device, which will

    [6 lines not shown]
DeltaFile
+49-0drivers/ata/ahci.c
+0-24drivers/ata/libata-scsi.c
+49-242 files

Linux/linux 58f93a4fs/smb/server ksmbd_work.h vfs.c, fs/smb/server/mgmt tree_connect.c

Merge tag 'ksmbd-for-7.3-rc2-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb

Pull smb server fixes from Namjae Jeon:

 - Fix a tree connection use-after-free in smb2_tree_connect() by
   balancing references across concurrent connect, disconnect, and
   session logoff paths.

 - Validate source and target ranges in COPYCHUNK requests before range
   locking and copy operations.

 - Fix an oplock break notification UAF by acquiring a connection
   reference under ksmbd_inode lock and releasing it after the
   notification work completes.

 - Fix the sparc build by using an unsigned int for the atomic work
   state, ensuring xchg() uses a supported four-byte operation.

* tag 'ksmbd-for-7.3-rc2-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb:

    [4 lines not shown]
DeltaFile
+57-16fs/smb/server/oplock.c
+13-15fs/smb/server/smb2pdu.c
+11-1fs/smb/server/vfs.c
+8-0fs/smb/server/mgmt/tree_connect.c
+1-1fs/smb/server/ksmbd_work.h
+90-335 files

Linux/linux 4210669kernel kprobes.c, kernel/trace trace_probe.h trace_btf.h

Merge tag 'probes-fixes-v7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull probes fixes from Masami Hiramatsu:

 - Protect kprobe_blacklist with RCU

   RCU-protect kprobe_blacklist and use kfree_rcu() to prevent UAF races
   during module unloading and enable safe atomic lookups.

 - Fix multi-probe field use-after-free

   Duplicate field and type strings on trace_probe_event to prevent UAF
   when freeing primary probe

 - Fix probe BTF member lookup:

   Check the containing inner struct/union kflag when resolving
   anonymous members to ensure correct bitfield offset calculation


    [17 lines not shown]
DeltaFile
+55-8kernel/trace/trace_probe.c
+17-14kernel/trace/trace_btf.c
+10-4kernel/kprobes.c
+2-2kernel/trace/trace_uprobe.c
+2-1kernel/trace/trace_btf.h
+2-0kernel/trace/trace_probe.h
+88-291 files not shown
+89-297 files

Linux/linux 65119e8drivers/cpuidle dt_idle_genpd.c cpuidle-psci.c, drivers/pmdomain/mediatek Kconfig

Merge tag 'pmdomain-v7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm

Pull pmdomain and cpuidle fixes from Ulf Hansson:
 "pmdomain providers:
   - mediatek: Fix Kconfig for Airoha power domains
   - qcom: Revert adding the missing power domains for Eliza

  cpuidle:
   - psci: Fix support for probe deferral by dropping the faux device
   - dt_idle_genpd: Free the original name allocation"

* tag 'pmdomain-v7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  cpuidle: dt_idle_genpd: kfree() the original name allocation
  pmdomain: airoha: fix unselectable AIROHA_CPU_PM_DOMAIN kconfig
  cpuidle: psci: Fix support for probe deferral by dropping the faux device
  Revert "pmdomain: qcom: rpmhpd: Add missing MXC and MMCX power domains for Eliza"
DeltaFile
+16-26drivers/cpuidle/cpuidle-psci.c
+3-2drivers/pmdomain/mediatek/Kconfig
+0-4drivers/pmdomain/qcom/rpmhpd.c
+1-2drivers/cpuidle/dt_idle_genpd.c
+20-344 files

Linux/linux a2628cetools/perf Makefile.config

perf build: Add clang and rust target flags for LoongArch

Add missing CLANG_TARGET_FLAGS_loongarch and RUST_TARGET_FLAGS_loongarch
so that perf can be built with clang and enable rust cross compilation.

Cc: stable at vger.kernel.org
Acked-by: Miguel Ojeda <ojeda at kernel.org>
Acked-by: Dmitrii Dolgov <9erthalion6 at gmail.com>
Signed-off-by: Haiyong Sun <sunhaiyong at loongson.cn>
Signed-off-by: WANG Rui <wangrui at loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai at loongson.cn>
DeltaFile
+2-0tools/perf/Makefile.config
+2-01 files

Linux/linux 501514darch/loongarch/kvm/intc pch_pic.c

LoongArch: KVM: Validate MSI data before routing it to EIOINTC

pch_msi_set_irq() passes e->msi.data straight into eiointc_set_irq() as
the irq number. The MSI data comes from userspace, that either via a
KVM_IRQ_ROUTING_MSI entry set with KVM_SET_GSI_ROUTING (used by irqfd
and KVM_IRQ_LINE) or directly via KVM_SIGNAL_MSI, and is never checked
against EIOINTC_IRQS.

eiointc_set_irq() uses the value with __set_bit()/__clear_bit() on the
256-bit isr bitmap, eiointc_update_irq() then indexes sw_coremap[] and
the per-cpu coreisr/sw_coreisr bitmaps with it. Therefore a data value
>= 256 reads and writes memory past the end of those arrays, i.e. any
process holding a VM fd can corrupt kernel memory beyond the allocation
of loongarch_eiointc.

Reject MSI data that doesn't fit in the EIOINTC irq space. The DMSINTC
path is unaffected as it decodes the vector from the address and masks
it.


    [8 lines not shown]
DeltaFile
+3-0arch/loongarch/kvm/intc/pch_pic.c
+3-01 files

Linux/linux 9296375arch/loongarch/include/asm kvm_host.h, arch/loongarch/kvm vm.c vcpu.c

LoongArch: KVM: Fix TOCTOU race on pv_features

In kvm_loongarch_cpucfg_set_attr() the check-then-set on
kvm->arch.pv_features is lockless, so two vCPUs can race past the
validation and set different values. Add a spinlock to protect it.

Cc: stable at vger.kernel.org
Reviewed-by: Bibo Mao <maobibo at loongson.cn>
Signed-off-by: Tao Cui <cuitao at kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai at loongson.cn>
DeltaFile
+5-1arch/loongarch/kvm/vcpu.c
+1-0arch/loongarch/kvm/vm.c
+1-0arch/loongarch/include/asm/kvm_host.h
+7-13 files

Linux/linux 27a9bfearch/loongarch/kvm mmu.c

LoongArch: KVM: Preserve memslot arch flags on KVM_MR_FLAGS_ONLY

kvm_arch_prepare_memory_region() computes new->arch.flags, i.e. whether
a memslot is KVM_MEM_HUGEPAGE_CAPABLE or KVM_MEM_HUGEPAGE_INCAPABLE,
only for KVM_MR_CREATE and KVM_MR_MOVE, and returns early for every
other change. But the generic code allocates a zeroed memslot for every
change and never copies old->arch, so after a KVM_MR_FLAGS_ONLY update,
e.g. toggling KVM_MEM_LOG_DIRTY_PAGES for live migration, the active
memslot has arch.flags == 0.

With both flags clear, fault_supports_huge_mapping() falls through to
the alignment check on the HVA range alone, which no longer verifies
that the GPA and HVA have the same offset within a PMD. A memslot that
was marked KVM_MEM_HUGEPAGE_INCAPABLE because of a GPA/HVA offset
mismatch can then be mapped with PMD entries on read faults, and since
kvm_map_page() aligns the gfn and the pfn independently, the guest ends
up accessing the wrong host pages, exactly the "d -> f, e -> g" case
described in the comment above the check.


    [10 lines not shown]
DeltaFile
+10-0arch/loongarch/kvm/mmu.c
+10-01 files

Linux/linux 910132barch/loongarch/kvm main.c

LoongArch: KVM: Fix resource leak in kvm_loongarch_env_init() error path

kvm_loongarch_env_init() allocates the per-CPU kvm_context (vmcs) and
kvm_loongarch_ops, registers the perf callbacks, and then registers
the IPI/EIOINTC/PCH-PIC/DMSINTC KVM devices. If any of those device
registrations fails, the function returned the error directly, leaving
everything acquired so far in place: vmcs and kvm_loongarch_ops are
never freed, the perf callbacks stay registered, and all previously
registered KVM device operations remain registered. kvm_loongarch_init()
propagates the errors without calling kvm_loongarch_env_exit(), so
nothing else cleans up either.

Unwind the error path in reverse order of registration, so that each
failure only undoes what had actually been set up. Use the same helpers
in kvm_loongarch_env_exit() to remove the device registrations during
normal teardown as well.

Cc: stable at vger.kernel.org
Fixes: c532de5a67a7 ("LoongArch: KVM: Add IPI device support")

    [3 lines not shown]
DeltaFile
+29-4arch/loongarch/kvm/main.c
+29-41 files

Linux/linux 40bdbb4arch/loongarch/include/asm kvm_host.h, arch/loongarch/kvm mmu.c

LoongArch: KVM: Remove unused function kvm_arch_flush_remote_tlbs_memslot()

Function kvm_arch_flush_remote_tlbs_memslot() is not called any more, so
remove this API.

Reviewed-by: Tao Cui <cuitao at kylinos.cn>
Signed-off-by: Bibo Mao <maobibo at loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai at loongson.cn>
DeltaFile
+0-6arch/loongarch/kvm/mmu.c
+0-1arch/loongarch/include/asm/kvm_host.h
+0-72 files

Linux/linux 4af2217arch/loongarch/include/asm kvm_eiointc.h kvm_dmsintc.h, arch/loongarch/kvm/intc pch_pic.c ipi.c

LoongArch: KVM: Add unregister helpers for the KVM interrupt devices

The IPI/EIOINTC/PCH-PIC/DMSINTC KVM devices each have a helper that
registers their kvm_device_ops, but there is no counterpart to remove
them, so a caller that needs to undo a registration has to open-code
kvm_unregister_device_ops() with the matching device type.

Add kvm_loongarch_unregister_{ipi,eiointc,pch_pic,dmsintc}_device()
next to the existing register helpers. kvm_unregister_device_ops() is a
no-op when the corresponding device type is not currently registered.

No functional change, as there are no callers yet.

Cc: stable at vger.kernel.org
Suggested-by: Bibo Mao <maobibo at loongson.cn>
Reviewed-by: Bibo Mao <maobibo at loongson.cn>
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911 at gmail.com>
Signed-off-by: Huacai Chen <chenhuacai at loongson.cn>
DeltaFile
+5-0arch/loongarch/kvm/intc/pch_pic.c
+5-0arch/loongarch/kvm/intc/ipi.c
+5-0arch/loongarch/kvm/intc/eiointc.c
+5-0arch/loongarch/kvm/intc/dmsintc.c
+1-0arch/loongarch/include/asm/kvm_eiointc.h
+1-0arch/loongarch/include/asm/kvm_dmsintc.h
+22-02 files not shown
+24-08 files

Linux/linux f7a1064arch/loongarch/kvm main.c

LoongArch: KVM: Free init resources if kvm_init() fails

kvm_loongarch_init() calls kvm_loongarch_env_init() to allocate the
per-CPU kvm_context (vmcs) and kvm_loongarch_ops and to register the
perf callbacks, and then calls kvm_init(). If kvm_init() fails its
result is returned directly, but since module_init() does not run the
module_exit() stuff on failure, so kvm_loongarch_env_exit() is never
called and those resources are leaked.

So call kvm_loongarch_env_exit() when kvm_init() fails, matching the
teardown-on-failure pattern used by riscv_kvm_init().

Cc: stable at vger.kernel.org
Fixes: 2bd6ac687261 ("LoongArch: KVM: Implement kvm module related interface")
Reviewed-by: Bibo Mao <maobibo at loongson.cn>
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911 at gmail.com>
Signed-off-by: Huacai Chen <chenhuacai at loongson.cn>
DeltaFile
+5-1arch/loongarch/kvm/main.c
+5-11 files

Linux/linux 72ce4b2arch/loongarch/kernel kprobes.c

LoongArch: Avoid preempt count underflow without probe

LoongArch uses break 11 for the breakpoint placed after an instruction
that Kprobes executes out of line. Since userspace can issue the same
break instruction, do_bp() can reach kprobe_singlestep_handler() when
there is no current probe.

The handler actually returns false in this case, but it first calls
preempt_enable_no_resched(). The corresponding preempt_disable() is done
by kprobe_breakpoint_handler() on a real Kprobe hit, so it has not run
here. As a result, an ordinary userspace breakpoint (code 11) underflows
the current task's preempt count.

This also makes in_interrupt() return true until the task schedules. One
visible consequence is the socket cgroup attribution: cgroup_sk_alloc()
treats the allocation as interrupt context and assigns the socket to the
root cgroup. A socket opened from the SIGTRAP handler can then avoid a
BPF_CGROUP_INET_SOCK_CREATE policy attached to the task's own cgroup.


    [11 lines not shown]
DeltaFile
+3-0arch/loongarch/kernel/kprobes.c
+3-01 files

Linux/linux c3f2feaarch/loongarch/kernel rethook_trampoline.S

LoongArch: Do not save/restore percpu base register in rethook trampoline

The rethook trampoline saves $r21 ($u0), the percpu base, into its frame
at entry and restores it at exit. Inbetween rethook_trampoline_handler()
may schedule via preempt_enable_notrace().

If the task migrates to another CPU, the frame's $r21 holds the old
CPU's percpu base, and restoring it poisons $r21 on the new CPU. Until
the next user->kernel transition heals $r21, all this_cpu_*() accesses
(runqueues, RCU per-CPU data, timer tick programming, FPU ownership)
hit the wrong CPU's percpu area.

Under kretprobe-heavy preemptible load this can corrupt scheduler and
timer state: scheduling-while-atomic splats, wrong-CPU RCU warnings,
WARN_ON_ONCE(rq != this_rq()) in nohz_balance_exit_idle(), and CPUs
parking in the idle loop with the constant timer never re-armed (hard
lockup). Reproduces on a Loongson-3A6000 with kretprobes on VFS paths
plus heavy file churn (OS install / unsquashfs).


    [16 lines not shown]
DeltaFile
+0-2arch/loongarch/kernel/rethook_trampoline.S
+0-21 files

Linux/linux 3e1b64barch/loongarch/kernel smp.c

LoongArch: Remove unused setup_profiling_timer() function

setup_profiling_timer() is not used by any code at this point. Since a
default weak implementation exists, there is no need to still keep this
arch-specific definition around. Remove it along with the now-redundant
profile header includes.

Signed-off-by: Anthony Iliopoulos <ailiop at suse.com>
Signed-off-by: Huacai Chen <chenhuacai at loongson.cn>
DeltaFile
+0-8arch/loongarch/kernel/smp.c
+0-81 files