1. 04 Aug, 2024 1 commit
  2. 03 Aug, 2024 5 commits
  3. 02 Aug, 2024 21 commits
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.11-20240802' of git://git.kernel.dk/linux · 17712b7e
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two minor tweaks for the NAPI handling, both from Olivier:
      
         - Kill two unused list definitions
      
         - Ensure that multishot NAPI doesn't age away"
      
      * tag 'io_uring-6.11-20240802' of git://git.kernel.dk/linux:
        io_uring: remove unused local list heads in NAPI functions
        io_uring: keep multishot request NAPI timeout current
      17712b7e
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · d9ef02e5
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "These fix a few issues related to the MSI IRQs management in the
        int340x thermal driver, fix a thermal core issue that may lead to
        missing trip point crossing events and update the thermal core
        documentation.
      
        Specifics:
      
         - Fix MSI error path cleanup in int340x, allow it to work with a
           subset of thermal MSI IRQs if some of them are not working and make
           it free all MSI IRQs on module exit (Srinivas Pandruvada)
      
         - Fix a thermal core issue that may lead to missing trip point
           crossing events in some cases when thermal_zone_set_trips() is used
           and update the thermal core documentation (Rafael Wysocki)"
      
      * tag 'thermal-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: core: Update thermal zone registration documentation
        thermal: trip: Avoid skipping trips in thermal_zone_set_trips()
        thermal: intel: int340x: Free MSI IRQ vectors on module exit
        thermal: intel: int340x: Allow limited thermal MSI support
        thermal: intel: int340x: Fix kernel warning during MSI cleanup
      d9ef02e5
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 041b1061
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Expand the speculative SSBS errata workaround to more CPUs
      
       - Ensure jump label changes are visible to all CPUs with a
         kick_all_cpus_sync() (and also enable jump label batching as part of
         the fix)
      
       - The shadow call stack sanitiser is currently incompatible with Rust,
         make CONFIG_RUST conditional on !CONFIG_SHADOW_CALL_STACK
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: jump_label: Ensure patched jump_labels are visible to all CPUs
        rust: SHADOW_CALL_STACK is incompatible with Rust
        arm64: errata: Expand speculative SSBS workaround (again)
        arm64: cputype: Add Cortex-A725 definitions
        arm64: cputype: Add Cortex-X1C definitions
      041b1061
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.11-rc2' of https://github.com/ceph/ceph-client · 1c424629
      Linus Torvalds authored
      Pull ceph fix from Ilya Dryomov:
       "A fix for a potential hang in the MDS when cap revocation races with
        the client releasing the caps in question, marked for stable"
      
      * tag 'ceph-for-6.11-rc2' of https://github.com/ceph/ceph-client:
        ceph: force sending a cap update msg back to MDS for revoke op
      1c424629
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 725d410f
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "The bulk of the changes here is a largish change to guest_memfd,
        delaying the clearing and encryption of guest-private pages until they
        are actually added to guest page tables. This started as "let's make
        it impossible to misuse the API" for SEV-SNP; but then it ballooned a
        bit.
      
        The new logic is generally simpler and more ready for hugepage support
        in guest_memfd.
      
        Summary:
      
         - fix latent bug in how usage of large pages is determined for
           confidential VMs
      
         - fix "underline too short" in docs
      
         - eliminate log spam from limited APIC timer periods
      
         - disallow pre-faulting of memory before SEV-SNP VMs are initialized
      
         - delay clearing and encrypting private memory until it is added to
           guest page tables
      
         - this change also enables another small cleanup: the checks in
           SNP_LAUNCH_UPDATE that limit it to non-populated, private pages can
           now be moved in the common kvm_gmem_populate() function
      
         - fix compilation error that the RISC-V merge introduced in selftests"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86/mmu: fix determination of max NPT mapping level for private pages
        KVM: riscv: selftests: Fix compile error
        KVM: guest_memfd: abstract how prepared folios are recorded
        KVM: guest_memfd: let kvm_gmem_populate() operate only on private gfns
        KVM: extend kvm_range_has_memory_attributes() to check subset of attributes
        KVM: cleanup and add shortcuts to kvm_range_has_memory_attributes()
        KVM: guest_memfd: move check for already-populated page to common code
        KVM: remove kvm_arch_gmem_prepare_needed()
        KVM: guest_memfd: make kvm_gmem_prepare_folio() operate on a single struct kvm
        KVM: guest_memfd: delay kvm_gmem_prepare_folio() until the memory is passed to the guest
        KVM: guest_memfd: return locked folio from __kvm_gmem_get_pfn
        KVM: rename CONFIG_HAVE_KVM_GMEM_* to CONFIG_HAVE_KVM_ARCH_GMEM_*
        KVM: guest_memfd: do not go through struct page
        KVM: guest_memfd: delay folio_mark_uptodate() until after successful preparation
        KVM: guest_memfd: return folio from __kvm_gmem_get_pfn()
        KVM: x86: disallow pre-fault for SNP VMs before initialization
        KVM: Documentation: Fix title underline too short warning
        KVM: x86: Eliminate log spam from limited APIC timer periods
      725d410f
    • Paolo Bonzini's avatar
      Merge branch 'kvm-fixes' into HEAD · 1773014a
      Paolo Bonzini authored
      * fix latent bug in how usage of large pages is determined for
        confidential VMs
      
      * fix "underline too short" in docs
      
      * eliminate log spam from limited APIC timer periods
      
      * disallow pre-faulting of memory before SEV-SNP VMs are initialized
      
      * delay clearing and encrypting private memory until it is added to
        guest page tables
      
      * this change also enables another small cleanup: the checks in
        SNP_LAUNCH_UPDATE that limit it to non-populated, private pages
        can now be moved in the common kvm_gmem_populate() function
      1773014a
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 948752d2
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A fix to avoid dropping some of the internal pseudo-extensions, which
         breaks *envcfg dependency parsing
      
       - The kernel entry address is now aligned in purgatory, which avoids a
         misaligned load that can lead to crash on systems that don't support
         misaligned accesses early in boot
      
       - The FW_SFENCE_VMA_RECEIVED perf event was duplicated in a handful of
         perf JSON configurations, one of them been updated to
         FW_SFENCE_VMA_ASID_SENT
      
       - The starfive cache driver is now restricted to 64-bit systems, as it
         isn't 32-bit clean
      
       - A fix for to avoid aliasing legacy-mode perf counters with software
         perf counters
      
       - VM_FAULT_SIGSEGV is now handled in the page fault code
      
       - A fix for stalls during CPU hotplug due to IPIs being disabled
      
       - A fix for memblock bounds checking. This manifests as a crash on
         systems with discontinuous memory maps that have regions that don't
         fit in the linear map
      
      * tag 'riscv-for-linus-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Fix linear mapping checks for non-contiguous memory regions
        RISC-V: Enable the IPI before workqueue_online_cpu()
        riscv/mm: Add handling for VM_FAULT_SIGSEGV in mm_fault_error()
        perf: riscv: Fix selecting counters in legacy mode
        cache: StarFive: Require a 64-bit system
        perf arch events: Fix duplicate RISC-V SBI firmware event name
        riscv/purgatory: align riscv_kernel_entry
        riscv: cpufeature: Do not drop Linux-internal extensions
      948752d2
    • Paolo Bonzini's avatar
      Merge tag 'kvm-riscv-fixes-6.11-1' of https://github.com/kvm-riscv/linux into HEAD · 29b5bbf7
      Paolo Bonzini authored
      KVM/riscv fixes for 6.11, take #1
      
      - Fix compile error in get-reg-list selftests
      29b5bbf7
    • Linus Torvalds's avatar
      Merge tag 's390-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 66242ef2
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - remove unused empty CPU alternatives header file
      
       - fix recently and erroneously removed exception handling when loading
         an invalid floating point register
      
       - ptdump fixes to reflect the recent changes due to the uncoupling of
         physical vs virtual kernel address spaces
      
       - changes to avoid the unnecessary splitting of large pages in kernel
         mappings
      
       - add the missing MODULE_DESCRIPTION for the CIO modules
      
      * tag 's390-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: Keep inittext section writable
        s390/vmlinux.lds.S: Move ro_after_init section behind rodata section
        s390/mm: Get rid of RELOC_HIDE()
        s390/mm/ptdump: Improve sorting of markers
        s390/mm/ptdump: Add support for relocated lowcore mapping
        s390/mm/ptdump: Fix handling of identity mapping area
        s390/cio: Add missing MODULE_DESCRIPTION() macros
        s390/alternatives: Remove unused empty header file
        s390/fpu: Re-add exception handling in load_fpu_state()
      66242ef2
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-fixes-6.11-1' of... · 29ccb40f
      Linus Torvalds authored
      Merge tag 'asm-generic-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
      
      Pull asm-generic fixes from Arnd Bergmann:
       "These are three important bug fixes for the cross-architecture tree,
        fixing a regression with the new syscall.tbl file, the inconsistent
        numbering for the new uretprobe syscall and a bug with iowrite64be on
        alpha"
      
      * tag 'asm-generic-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        syscalls: fix syscall macros for newfstat/newfstatat
        uretprobe: change syscall number, again
        alpha: fix ioread64be()/iowrite64be() helpers
      29ccb40f
    • Linus Torvalds's avatar
      Merge tag 'sound-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 6b779f8a
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A small collection of fixes:
      
         - Revert of FireWire changes that caused a long-time regression
      
         - Another long-time regression fix for AMD HDMI
      
         - MIDI2 UMP fixes
      
         - HD-audio Conexant codec fixes and a quirk"
      
      * tag 'sound-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda: Conditionally use snooping for AMD HDMI
        ALSA: usb-audio: Correct surround channels in UAC1 channel map
        ALSA: seq: ump: Explicitly reset RPN with Null RPN
        ALSA: seq: ump: Transmit RPN/NRPN message at each MSB/LSB data reception
        ALSA: seq: ump: Use the common RPN/bank conversion context
        ALSA: ump: Explicitly reset RPN with Null RPN
        ALSA: ump: Transmit RPN/NRPN message at each MSB/LSB data reception
        Revert "ALSA: firewire-lib: operate for period elapse event in process context"
        Revert "ALSA: firewire-lib: obsolete workqueue for period update"
        ALSA: hda/realtek: Add quirk for Acer Aspire E5-574G
        ALSA: seq: ump: Optimize conversions from SysEx to UMP
        ALSA: hda/conexant: Mute speakers at suspend / shutdown
        ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown
        ALSA: hda: conexant: Fix headset auto detect fail in the polling mode
      6b779f8a
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-08-02' of https://gitlab.freedesktop.org/drm/kernel · 29b4a699
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular weekly fixes. This is a bit larger than usual but doesn't seem
        too crazy.
      
        Most of it is vmwgfx changes that fix a bunch of issues with wayland
        userspaces with dma-buf/external buffers and modesetting fixes.
      
        Otherwise it's kinda spread out, v3d fixes some new ioctls, nouveau
        has regression revert and fixes, amdgpu, i915 and ast have some small
        fixes, and some core fixes spread about.
      
        client:
         - fix error code
      
        atomic:
         - allow damage clips with async flips
         - allow explicit sync with async flips
      
        kselftests:
         - fix dmabuf-heaps test
      
        panic:
         - fix schedule_work in panic paths
      
        panel:
         - fix OrangePi Neo orientation
      
        gpuvm:
         - fix missing dependency
      
        amdgpu:
         - SMU 14.x update
         - Fix contiguous VRAM handling for IB parsing
         - GFX 12 fix
         - Regression fix for old APUs
      
        i915:
         - Static analysis fix for int overflow
         - Fix for HDCP2_STREAM_STATUS macro and removal of PWR_CLK_STATE for gen12
      
        nouveau:
         - revert busy wait change that caused a resume regression
         - fix buffer placement fault on dynamic pm s/r
         - fix refcount underflow
      
        ast:
         - fix black screen on resume
         - wake during connector status detect
      
        v3d:
         - fix issues with perf/timestamp ioctls
      
        vmwgfx:
         - fix deadlock in dma-buf fence polling
         - fix screen surface refcounting
         - fix dumb buffer handling
         - fix support for external buffers
         - fix overlay with screen targets
         - trigger modeset on screen moves"
      
      * tag 'drm-fixes-2024-08-02' of https://gitlab.freedesktop.org/drm/kernel: (31 commits)
        Revert "nouveau: rip out busy fence waits"
        nouveau: set placement to original placement on uvmm validate.
        drm/atomic: Allow userspace to use damage clips with async flips
        drm/atomic: Allow userspace to use explicit sync with atomic async flips
        drm/i915: Fix possible int overflow in skl_ddi_calculate_wrpll()
        drm/i915/hdcp: Fix HDCP2_STREAM_STATUS macro
        drm/ast: astdp: Wake up during connector status detection
        i915/perf: Remove code to update PWR_CLK_STATE for gen12
        kselftests: dmabuf-heaps: Ensure the driver name is null-terminated
        drm/client: Fix error code in drm_client_buffer_vmap_local()
        drm/amdgpu: Fix APU handling in amdgpu_pm_load_smu_firmware()
        drm/amdgpu: increase mes log buffer size for gfx12
        drm/amdgpu: fix contiguous handling for IB parsing v2
        drm/amdgpu/pm: support gpu_metrics sysfs interface for smu v14.0.2/3
        drm/vmwgfx: Trigger a modeset when the screen moves
        drm/vmwgfx: Fix overlay when using Screen Targets
        drm/vmwgfx: Add basic support for external buffers
        drm/vmwgfx: Fix handling of dumb buffers
        drm/vmwgfx: Make sure the screen surface is ref counted
        drm/vmwgfx: Fix a deadlock in dma buf fence polling
        ...
      29b4a699
    • Linus Torvalds's avatar
      Merge tag 'ata-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux · 454e2370
      Linus Torvalds authored
      Pull ata fix from Damien Le Moal:
      
       - Add missing power-domains property to the device tree bindings for
         the Rockchip Designware AHCI adapter (from Heiko)
      
      * tag 'ata-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
        dt-bindings: ata: rockchip-dwc-ahci: add missing power-domains
      454e2370
    • Linus Torvalds's avatar
      Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · bbea34e6
      Linus Torvalds authored
      Pull vfs fix from Al Viro:
       "do_dup2() out-of-bounds array speculation fix"
      
      * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        protect the fetch of ->fd[fd] in do_dup2() from mispredictions
      bbea34e6
    • Will Deacon's avatar
      arm64: jump_label: Ensure patched jump_labels are visible to all CPUs · cfb00a35
      Will Deacon authored
      Although the Arm architecture permits concurrent modification and
      execution of NOP and branch instructions, it still requires some
      synchronisation to ensure that other CPUs consistently execute the newly
      written instruction:
      
       >  When the modified instructions are observable, each PE that is
       >  executing the modified instructions must execute an ISB or perform a
       >  context synchronizing event to ensure execution of the modified
       >  instructions
      
      Prior to commit f6cc0c50 ("arm64: Avoid calling stop_machine() when
      patching jump labels"), the arm64 jump_label patching machinery
      performed synchronisation using stop_machine() after each modification,
      however this was problematic when flipping static keys from atomic
      contexts (namely, the arm_arch_timer CPU hotplug startup notifier) and
      so we switched to the _nosync() patching routines to avoid "scheduling
      while atomic" BUG()s during boot.
      
      In hindsight, the analysis of the issue in f6cc0c50 isn't quite
      right: it cites the use of IPIs in the default patching routines as the
      cause of the lockup, whereas stop_machine() does not rely on IPIs and
      the I-cache invalidation is performed using __flush_icache_range(),
      which elides the call to kick_all_cpus_sync(). In fact, the blocking
      wait for other CPUs is what triggers the BUG() and the problem remains
      even after f6cc0c50, for example because we could block on the
      jump_label_mutex. Eventually, the arm_arch_timer driver was fixed to
      avoid the static key entirely in commit a862fc22
      ("clocksource/arm_arch_timer: Remove use of workaround static key").
      
      This all leaves the jump_label patching code in a funny situation on
      arm64 as we do not synchronise with other CPUs to reduce the likelihood
      of a bug which no longer exists. Consequently, toggling a static key on
      one CPU cannot be assumed to take effect on other CPUs, leading to
      potential issues, for example with missing preempt notifiers.
      
      Rather than revert f6cc0c50 and go back to stop_machine() for each
      patch site, implement arch_jump_label_transform_apply() and kick all
      the other CPUs with an IPI at the end of patching.
      
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Fixes: f6cc0c50 ("arm64: Avoid calling stop_machine() when patching jump labels")
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20240731133601.3073-1-will@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      cfb00a35
    • Arnd Bergmann's avatar
      syscalls: fix syscall macros for newfstat/newfstatat · 343416f0
      Arnd Bergmann authored
      The __NR_newfstat and __NR_newfstatat macros accidentally got renamed
      in the conversion to the syscall.tbl format, dropping the 'new' portion
      of the name.
      
      In an unrelated change, the two syscalls are no longer architecture
      specific but are once more defined on all 64-bit architectures, so the
      'newstat' ABI keyword can be dropped from the table as a simplification.
      
      Fixes: Fixes: 4fe53bf2 ("syscalls: add generic scripts/syscall.tbl")
      Closes: https://lore.kernel.org/lkml/838053e0-b186-4e9f-9668-9a3384a71f23@app.fastmail.com/T/#tReported-by: default avatarFlorian Weimer <fweimer@redhat.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      343416f0
    • Arnd Bergmann's avatar
      uretprobe: change syscall number, again · 54233a42
      Arnd Bergmann authored
      Despite multiple attempts to get the syscall number assignment right
      for the newly added uretprobe syscall, we ended up with a bit of a mess:
      
       - The number is defined as 467 based on the assumption that the
         xattrat family of syscalls would use 463 through 466, but those
         did not make it into 6.11.
      
       - The include/uapi/asm-generic/unistd.h file still lists the number
         463, but the new scripts/syscall.tbl that was supposed to have the
         same data lists 467 instead as the number for arc, arm64, csky,
         hexagon, loongarch, nios2, openrisc and riscv. None of these
         architectures actually provide a uretprobe syscall.
      
       - All the other architectures (powerpc, arm, mips, ...) don't list
         this syscall at all.
      
      There are two ways to make it consistent again: either list it with
      the same syscall number on all architectures, or only list it on x86
      but not in scripts/syscall.tbl and asm-generic/unistd.h.
      
      Based on the most recent discussion, it seems like we won't need it
      anywhere else, so just remove the inconsistent assignment and instead
      move the x86 number to the next available one in the architecture
      specific range, which is 335.
      
      Fixes: 5c28424e ("syscalls: Fix to add sys_uretprobe to syscall.tbl")
      Fixes: 190fec72 ("uprobe: Wire up uretprobe system call")
      Fixes: 63ded110 ("uprobe: Change uretprobe syscall scope and number")
      Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      Reviewed-by: default avatarJiri Olsa <jolsa@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      54233a42
    • Rafael J. Wysocki's avatar
      thermal: core: Update thermal zone registration documentation · a0907422
      Rafael J. Wysocki authored
      The thermal sysfs API document is outdated.  One of the problems with
      it is that is still documents thermal_zone_device_register() which
      does not exit any more and it does not reflect the current thermal
      zone operations definition.
      
      Replace the thermal_zone_device_register() description in it with
      a thermal_zone_device_register_with_trips() description, including
      an update of the thermal zone operations list.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Link: https://patch.msgid.link/2767845.mvXUDI8C0e@rjwysocki.net
      a0907422
    • Dave Airlie's avatar
      Revert "nouveau: rip out busy fence waits" · 27ce65f6
      Dave Airlie authored
      This reverts commit d45bb9c5.
      
      Just got a report that this causes some suspend/resume issues,
      so back it out and I'll investigate it later.
      Reported-by: default avatarMike Galbraith <efault@gmx.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      27ce65f6
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2024-08-01' of... · 4eb39974
      Dave Airlie authored
      Merge tag 'drm-misc-fixes-2024-08-01' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
      
      A couple drm_panic fixes, several v3d fixes to increase the new timestamp API
      safety, several fixes for vmwgfx for various modesetting issues, PM fixes
      for ast, async flips improvements and two fixes for nouveau to fix
      resource refcounting and buffer placement.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <mripard@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240801-interesting-antique-bat-2fe4c0@houat
      4eb39974
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2024-08-01' of... · 7b9b7651
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2024-08-01' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
      
      - Static analysis fix for int overflow
      - Fix for HDCP2_STREAM_STATUS macro and removal of PWR_CLK_STATE for gen12
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/ZqslBkcZlInYdYgm@jlahtine-mobl.ger.corp.intel.com
      7b9b7651
  4. 01 Aug, 2024 13 commits
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.11-2024-07-27' of... · 774c6f27
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.11-2024-07-27' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.11-2024-07-27:
      
      amdgpu:
      - SMU 14.x update
      - Fix contiguous VRAM handling for IB parsing
      - GFX 12 fix
      - Regression fix for old APUs
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240728025407.2115881-1-alexander.deucher@amd.com
      774c6f27
    • Al Viro's avatar
      protect the fetch of ->fd[fd] in do_dup2() from mispredictions · 8aa37bde
      Al Viro authored
      both callers have verified that fd is not greater than ->max_fds;
      however, misprediction might end up with
              tofree = fdt->fd[fd];
      being speculatively executed.  That's wrong for the same reasons
      why it's wrong in close_fd()/file_close_fd_locked(); the same
      solution applies - array_index_nospec(fd, fdt->max_fds) could differ
      from fd only in case of speculative execution on mispredicted path.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      8aa37bde
    • Stuart Menefy's avatar
      riscv: Fix linear mapping checks for non-contiguous memory regions · 3b656442
      Stuart Menefy authored
      The RISC-V kernel already has checks to ensure that memory which would
      lie outside of the linear mapping is not used. However those checks
      use memory_limit, which is used to implement the mem= kernel command
      line option (to limit the total amount of memory, not its address
      range). When memory is made up of two or more non-contiguous memory
      banks this check is incorrect.
      
      Two changes are made here:
       - add a call in setup_bootmem() to memblock_cap_memory_range() which
         will cause any memory which falls outside the linear mapping to be
         removed from the memory regions.
       - remove the check in create_linear_mapping_page_table() which was
         intended to remove memory which is outside the liner mapping based
         on memory_limit, as it is no longer needed. Note a check for
         mapping more memory than memory_limit (to implement mem=) is
         unnecessary because of the existing call to
         memblock_enforce_memory_limit().
      
      This issue was seen when booting on a SV39 platform with two memory
      banks:
        0x00,80000000 1GiB
        0x20,00000000 32GiB
      This memory range is 158GiB from top to bottom, but the linear mapping
      is limited to 128GiB, so the lower block of RAM will be mapped at
      PAGE_OFFSET, and the upper block straddles the top of the linear
      mapping.
      
      This causes the following Oops:
      [    0.000000] Linux version 6.10.0-rc2-gd3b8dd5b51dd-dirty (stuart.menefy@codasip.com) (riscv64-codasip-linux-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.41.0.20231213) #20 SMP Sat Jun 22 11:34:22 BST 2024
      [    0.000000] memblock_add: [0x0000000080000000-0x00000000bfffffff] early_init_dt_add_memory_arch+0x4a/0x52
      [    0.000000] memblock_add: [0x0000002000000000-0x00000027ffffffff] early_init_dt_add_memory_arch+0x4a/0x52
      ...
      [    0.000000] memblock_alloc_try_nid: 23724 bytes align=0x8 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 early_init_dt_alloc_memory_arch+0x1e/0x48
      [    0.000000] memblock_reserve: [0x00000027ffff5350-0x00000027ffffaffb] memblock_alloc_range_nid+0xb8/0x132
      [    0.000000] Unable to handle kernel paging request at virtual address fffffffe7fff5350
      [    0.000000] Oops [#1]
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.10.0-rc2-gd3b8dd5b51dd-dirty #20
      [    0.000000] Hardware name: codasip,a70x (DT)
      [    0.000000] epc : __memset+0x8c/0x104
      [    0.000000]  ra : memblock_alloc_try_nid+0x74/0x84
      [    0.000000] epc : ffffffff805e88c8 ra : ffffffff806148f6 sp : ffffffff80e03d50
      [    0.000000]  gp : ffffffff80ec4158 tp : ffffffff80e0bec0 t0 : fffffffe7fff52f8
      [    0.000000]  t1 : 00000027ffffb000 t2 : 5f6b636f6c626d65 s0 : ffffffff80e03d90
      [    0.000000]  s1 : 0000000000005cac a0 : fffffffe7fff5350 a1 : 0000000000000000
      [    0.000000]  a2 : 0000000000005cac a3 : fffffffe7fffaff8 a4 : 000000000000002c
      [    0.000000]  a5 : ffffffff805e88c8 a6 : 0000000000005cac a7 : 0000000000000030
      [    0.000000]  s2 : fffffffe7fff5350 s3 : ffffffffffffffff s4 : 0000000000000000
      [    0.000000]  s5 : ffffffff8062347e s6 : 0000000000000000 s7 : 0000000000000001
      [    0.000000]  s8 : 0000000000002000 s9 : 00000000800226d0 s10: 0000000000000000
      [    0.000000]  s11: 0000000000000000 t3 : ffffffff8080a928 t4 : ffffffff8080a928
      [    0.000000]  t5 : ffffffff8080a928 t6 : ffffffff8080a940
      [    0.000000] status: 0000000200000100 badaddr: fffffffe7fff5350 cause: 000000000000000f
      [    0.000000] [<ffffffff805e88c8>] __memset+0x8c/0x104
      [    0.000000] [<ffffffff8062349c>] early_init_dt_alloc_memory_arch+0x1e/0x48
      [    0.000000] [<ffffffff8043e892>] __unflatten_device_tree+0x52/0x114
      [    0.000000] [<ffffffff8062441e>] unflatten_device_tree+0x9e/0xb8
      [    0.000000] [<ffffffff806046fe>] setup_arch+0xd4/0x5bc
      [    0.000000] [<ffffffff806007aa>] start_kernel+0x76/0x81a
      [    0.000000] Code: b823 02b2 bc23 02b2 b023 04b2 b423 04b2 b823 04b2 (bc23) 04b2
      [    0.000000] ---[ end trace 0000000000000000 ]---
      [    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
      [    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
      
      The problem is that memblock (unaware that some physical memory cannot
      be used) has allocated memory from the top of memory but which is
      outside the linear mapping region.
      Signed-off-by: default avatarStuart Menefy <stuart.menefy@codasip.com>
      Fixes: c99127c4 ("riscv: Make sure the linear mapping does not use the kernel mapping")
      Reviewed-by: default avatarDavid McKay <david.mckay@codasip.com>
      Reviewed-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
      Link: https://lore.kernel.org/r/20240622114217.2158495-1-stuart.menefy@codasip.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      3b656442
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · c0ecd638
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Fix a pci_intx() regression that caused driver reload to fail with
         "Resources present before probing" (Philipp Stanner)
      
       - Fix a pciehp regression that clobbered the upper bits of RAID status
         LEDs on NVMe devices behind an Intel VMD (Blazej Kucman)
      
      * tag 'pci-v6.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI: pciehp: Retain Power Indicator bits for userspace indicators
        PCI: Fix devres regression in pci_intx()
      c0ecd638
    • Ackerley Tng's avatar
      KVM: x86/mmu: fix determination of max NPT mapping level for private pages · aca0ec97
      Ackerley Tng authored
      The `if (req_max_level)` test was meant ignore req_max_level if
      PG_LEVEL_NONE was returned. Hence, this function should return
      max_level instead of the ignored req_max_level.
      
      This is only a latent issue for now, since guest_memfd does not
      support large pages.
      Signed-off-by: default avatarAckerley Tng <ackerleytng@google.com>
      Message-ID: <20240801173955.1975034-1-ackerleytng@google.com>
      Fixes: f32fb328 ("KVM: x86: Add hook for determining max NPT mapping level")
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      aca0ec97
    • Blazej Kucman's avatar
      PCI: pciehp: Retain Power Indicator bits for userspace indicators · 5560a612
      Blazej Kucman authored
      The sysfs "attention" file normally controls the Slot Control Attention
      Indicator with 0 (off), 1 (on), 2 (blink) settings.
      
      576243b3 ("PCI: pciehp: Allow exclusive userspace control of
      indicators") added pciehp_set_raw_indicator_status() to allow userspace to
      directly control all four bits in both the Attention Indicator and the
      Power Indicator fields via the "attention" file.
      
      This is used on Intel VMD bridges so utilities like "ledmon" can use sysfs
      "attention" to control up to 16 indicators for NVMe device RAID status.
      
      abaaac48 ("PCI: hotplug: Use FIELD_GET/PREP()") broke this by masking
      the sysfs data with PCI_EXP_SLTCTL_AIC, which discards the upper two bits
      intended for the Power Indicator Control field (PCI_EXP_SLTCTL_PIC).
      
      For NVMe devices behind an Intel VMD, ledmon settings that use the
      PCI_EXP_SLTCTL_PIC bits, i.e., ATTENTION_REBUILD (0x5), ATTENTION_LOCATE
      (0x7), ATTENTION_FAILURE (0xD), ATTENTION_OFF (0xF), no longer worked
      correctly.
      
      Mask with PCI_EXP_SLTCTL_AIC | PCI_EXP_SLTCTL_PIC to retain both the
      Attention Indicator and the Power Indicator bits.
      
      Fixes: abaaac48 ("PCI: hotplug: Use FIELD_GET/PREP()")
      Link: https://lore.kernel.org/r/20240722141440.7210-1-blazej.kucman@intel.comSigned-off-by: default avatarBlazej Kucman <blazej.kucman@intel.com>
      [bhelgaas: commit log]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org	# v6.7+
      5560a612
    • Philipp Stanner's avatar
      PCI: Fix devres regression in pci_intx() · 00f89ae4
      Philipp Stanner authored
      pci_intx() becomes managed if pcim_enable_device() has been called in
      advance. Commit 25216afc ("PCI: Add managed pcim_intx()") changed this
      behavior so that pci_intx() always leads to creation of a separate device
      resource for itself, whereas earlier, a shared resource was used for all
      PCI devres operations.
      
      Unfortunately, pci_intx() seems to be used in some drivers' remove() paths;
      in the managed case this causes a device resource to be created on driver
      detach, which causes .probe() to fail if the driver is reloaded:
      
        pci 0000:00:1f.2: Resources present before probing
      
      Fix the regression by only redirecting pci_intx() to its managed twin
      pcim_intx() if the pci_command changes.
      
      Link: https://lore.kernel.org/r/20240725120729.59788-2-pstanner@redhat.com
      Fixes: 25216afc ("PCI: Add managed pcim_intx()")
      Reported-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Closes: https://lore.kernel.org/all/b8f4ba97-84fc-4b7e-ba1a-99de2d9f0118@kernel.org/Signed-off-by: default avatarPhilipp Stanner <pstanner@redhat.com>
      [bhelgaas: add error message to commit log]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Tested-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      00f89ae4
    • Linus Torvalds's avatar
      Merge tag 'net-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 183d46ff
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from wireless, bleutooth, BPF and netfilter.
      
        Current release - regressions:
      
         - core: drop bad gso csum_start and offset in virtio_net_hdr
      
         - wifi: mt76: fix null pointer access in mt792x_mac_link_bss_remove
      
         - eth: tun: add missing bpf_net_ctx_clear() in do_xdp_generic()
      
         - phy: aquantia: only poll GLOBAL_CFG regs on aqr113, aqr113c and
           aqr115c
      
        Current release - new code bugs:
      
         - smc: prevent UAF in inet_create()
      
         - bluetooth: btmtk: fix kernel crash when entering btmtk_usb_suspend
      
         - eth: bnxt: reject unsupported hash functions
      
        Previous releases - regressions:
      
         - sched: act_ct: take care of padding in struct zones_ht_key
      
         - netfilter: fix null-ptr-deref in iptable_nat_table_init().
      
         - tcp: adjust clamping window for applications specifying SO_RCVBUF
      
        Previous releases - always broken:
      
         - ethtool: rss: small fixes to spec and GET
      
         - mptcp:
            - fix signal endpoint re-add
            - pm: fix backup support in signal endpoints
      
         - wifi: ath12k: fix soft lockup on suspend
      
         - eth: bnxt_en: fix RSS logic in __bnxt_reserve_rings()
      
         - eth: ice: fix AF_XDP ZC timeout and concurrency issues
      
         - eth: mlx5:
            - fix missing lock on sync reset reload
            - fix error handling in irq_pool_request_irq"
      
      * tag 'net-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (76 commits)
        mptcp: fix duplicate data handling
        mptcp: fix bad RCVPRUNED mib accounting
        ipv6: fix ndisc_is_useropt() handling for PIO
        igc: Fix double reset adapter triggered from a single taprio cmd
        net: MAINTAINERS: Demote Qualcomm IPA to "maintained"
        net: wan: fsl_qmc_hdlc: Discard received CRC
        net: wan: fsl_qmc_hdlc: Convert carrier_lock spinlock to a mutex
        net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys
        net/mlx5e: Fix CT entry update leaks of modify header context
        net/mlx5e: Require mlx5 tc classifier action support for IPsec prio capability
        net/mlx5: Fix missing lock on sync reset reload
        net/mlx5: Lag, don't use the hardcoded value of the first port
        net/mlx5: DR, Fix 'stack guard page was hit' error in dr_rule
        net/mlx5: Fix error handling in irq_pool_request_irq
        net/mlx5: Always drain health in shutdown callback
        net: Add skbuff.h to MAINTAINERS
        r8169: don't increment tx_dropped in case of NETDEV_TX_BUSY
        netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init().
        netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init().
        net: drop bad gso csum_start and offset in virtio_net_hdr
        ...
      183d46ff
    • Alice Ryhl's avatar
      rust: SHADOW_CALL_STACK is incompatible with Rust · f126745d
      Alice Ryhl authored
      When using the shadow call stack sanitizer, all code must be compiled
      with the -ffixed-x18 flag, but this flag is not currently being passed
      to Rust. This results in crashes that are extremely difficult to debug.
      
      To ensure that nobody else has to go through the same debugging session
      that I had to, prevent configurations that enable both SHADOW_CALL_STACK
      and RUST.
      
      It is rather common for people to backport 724a75ac ("arm64: rust:
      Enable Rust support for AArch64"), so I recommend applying this fix all
      the way back to 6.1.
      
      Cc: stable@vger.kernel.org # 6.1 and later
      Fixes: 724a75ac ("arm64: rust: Enable Rust support for AArch64")
      Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
      Acked-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      Link: https://lore.kernel.org/r/20240729-shadow-call-stack-v4-1-2a664b082ea4@google.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      f126745d
    • Mark Rutland's avatar
      arm64: errata: Expand speculative SSBS workaround (again) · adeec61a
      Mark Rutland authored
      A number of Arm Ltd CPUs suffer from errata whereby an MSR to the SSBS
      special-purpose register does not affect subsequent speculative
      instructions, permitting speculative store bypassing for a window of
      time.
      
      We worked around this for a number of CPUs in commits:
      
      * 7187bb7d ("arm64: errata: Add workaround for Arm errata 3194386 and 3312417")
      * 75b3c43e ("arm64: errata: Expand speculative SSBS workaround")
      
      Since then, similar errata have been published for a number of other Arm
      Ltd CPUs, for which the same mitigation is sufficient. This is described
      in their respective Software Developer Errata Notice (SDEN) documents:
      
      * Cortex-A76 (MP052) SDEN v31.0, erratum 3324349
        https://developer.arm.com/documentation/SDEN-885749/3100/
      
      * Cortex-A77 (MP074) SDEN v19.0, erratum 3324348
        https://developer.arm.com/documentation/SDEN-1152370/1900/
      
      * Cortex-A78 (MP102) SDEN v21.0, erratum 3324344
        https://developer.arm.com/documentation/SDEN-1401784/2100/
      
      * Cortex-A78C (MP138) SDEN v16.0, erratum 3324346
        https://developer.arm.com/documentation/SDEN-1707916/1600/
      
      * Cortex-A78C (MP154) SDEN v10.0, erratum 3324347
        https://developer.arm.com/documentation/SDEN-2004089/1000/
      
      * Cortex-A725 (MP190) SDEN v5.0, erratum 3456106
        https://developer.arm.com/documentation/SDEN-2832921/0500/
      
      * Cortex-X1 (MP077) SDEN v21.0, erratum 3324344
        https://developer.arm.com/documentation/SDEN-1401782/2100/
      
      * Cortex-X1C (MP136) SDEN v16.0, erratum 3324346
        https://developer.arm.com/documentation/SDEN-1707914/1600/
      
      * Neoverse-N1 (MP050) SDEN v32.0, erratum 3324349
        https://developer.arm.com/documentation/SDEN-885747/3200/
      
      * Neoverse-V1 (MP076) SDEN v19.0, erratum 3324341
        https://developer.arm.com/documentation/SDEN-1401781/1900/
      
      Note that due to the manner in which Arm develops IP and tracks errata,
      some CPUs share a common erratum number and some CPUs have multiple
      erratum numbers for the same HW issue.
      
      On parts without SB, it is necessary to use ISB for the workaround. The
      spec_bar() macro used in the mitigation will expand to a "DSB SY; ISB"
      sequence in this case, which is sufficient on all affected parts.
      
      Enable the existing mitigation by adding the relevant MIDRs to
      erratum_spec_ssbs_list. The list is sorted alphanumerically (involving
      moving Neoverse-V3 after Neoverse-V2) so that this is easy to audit and
      potentially extend again in future. The Kconfig text is also updated to
      clarify the set of affected parts and the mitigation.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20240801101803.1982459-4-mark.rutland@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      adeec61a
    • Mark Rutland's avatar
      arm64: cputype: Add Cortex-A725 definitions · 9ef54a38
      Mark Rutland authored
      Add cputype definitions for Cortex-A725. These will be used for errata
      detection in subsequent patches.
      
      These values can be found in the Cortex-A725 TRM:
      
        https://developer.arm.com/documentation/107652/0001/
      
      ... in table A-247 ("MIDR_EL1 bit descriptions").
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/20240801101803.1982459-3-mark.rutland@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      9ef54a38
    • Mark Rutland's avatar
      arm64: cputype: Add Cortex-X1C definitions · 58d245e0
      Mark Rutland authored
      Add cputype definitions for Cortex-X1C. These will be used for errata
      detection in subsequent patches.
      
      These values can be found in the Cortex-X1C TRM:
      
        https://developer.arm.com/documentation/101968/0002/
      
      ... in section B2.107 ("MIDR_EL1, Main ID Register, EL1").
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/20240801101803.1982459-2-mark.rutland@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      58d245e0
    • Nick Hu's avatar
      RISC-V: Enable the IPI before workqueue_online_cpu() · 3908ba2e
      Nick Hu authored
      Sometimes the hotplug cpu stalls at the arch_cpu_idle() for a while after
      workqueue_online_cpu(). When cpu stalls at the idle loop, the reschedule
      IPI is pending. However the enable bit is not enabled yet so the cpu stalls
      at WFI until watchdog timeout. Therefore enable the IPI before the
      workqueue_online_cpu() to fix the issue.
      
      Fixes: 63c5484e ("workqueue: Add multiple affinity scopes and interface to select them")
      Signed-off-by: default avatarNick Hu <nick.hu@sifive.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Link: https://lore.kernel.org/r/20240717031714.1946036-1-nick.hu@sifive.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      3908ba2e