1. 12 Sep, 2024 1 commit
    • Linus Torvalds's avatar
      mm: avoid leaving partial pfn mappings around in error case · 79a61cc3
      Linus Torvalds authored
      As Jann points out, PFN mappings are special, because unlike normal
      memory mappings, there is no lifetime information associated with the
      mapping - it is just a raw mapping of PFNs with no reference counting of
      a 'struct page'.
      
      That's all very much intentional, but it does mean that it's easy to
      mess up the cleanup in case of errors.  Yes, a failed mmap() will always
      eventually clean up any partial mappings, but without any explicit
      lifetime in the page table mapping itself, it's very easy to do the
      error handling in the wrong order.
      
      In particular, it's easy to mistakenly free the physical backing store
      before the page tables are actually cleaned up and (temporarily) have
      stale dangling PTE entries.
      
      To make this situation less error-prone, just make sure that any partial
      pfn mapping is torn down early, before any other error handling.
      Reported-and-tested-by: default avatarJann Horn <jannh@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Simona Vetter <simona.vetter@ffwll.ch>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79a61cc3
  2. 11 Sep, 2024 7 commits
  3. 10 Sep, 2024 1 commit
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 8d8d276b
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Move declaration of interface_lock outside of CONFIG_TIMERLAT_TRACER
      
         The fix to some locking races moved the declaration of the
         interface_lock up in the file, but also moved it into the
         CONFIG_TIMERLAT_TRACER #ifdef block, breaking the build when that
         wasn't set. Move it further up and out of that #ifdef block.
      
       - Remove unused function run_tracer_selftest() stub
      
         When CONFIG_FTRACE_STARTUP_TEST is not set the stub function
         run_tracer_selftest() is not used and clang is warning about it.
         Remove the function stub as it is not needed.
      
      * tag 'trace-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: Drop unused helper function to fix the build
        tracing/osnoise: Fix build when timerlat is not enabled
      8d8d276b
  4. 09 Sep, 2024 11 commits
  5. 08 Sep, 2024 6 commits
  6. 07 Sep, 2024 6 commits
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d1f2d51b
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A pile of Qualcomm clk driver fixes with two main themes: the alpha
        PLL driver and shared RCGs, and one fix for the Starfive JH7110 SoC.
      
         - The Alpha PLL clk_ops had multiple problems around setting rates.
      
           There are a handful of patches here that fix masks and skip
           enabling the clk from set_rate() when the PLL is disabled. The PLLs
           are crucial to operation of the system as almost all frequencies in
           the system are derived from them.
      
         - Parking shared RCGs at a slow always on clk at registration time
           breaks stuff.
      
           USB host mode can't handle such a slow frequency and the serial
           console gets all garbled when the UART clk is handed over to the
           kernel. There's a few patches that don't use the shared clk_ops for
           the UART clks and another one to skip parking the USB clk at
           registration time.
      
         - The Starfive PLL driver used for the CPU was busted causing cpufreq
           to fail because the clk didn't change to a safe parent during
           set_rate().
      
           The fix is to register a notifier and switch to a safe parent so
           the PLL can change rate in a glitch free manner"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: qcom: gcc-sc8280xp: don't use parking clk_ops for QUPs
        clk: starfive: jh7110-sys: Add notifier for PLL0 clock
        clk: qcom: gcc-sm8650: Don't use shared clk_ops for QUPs
        clk: qcom: gcc-sm8550: Don't park the USB RCG at registration time
        clk: qcom: gcc-sm8550: Don't use parking clk_ops for QUPs
        clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs
        clk: qcom: ipq9574: Update the alpha PLL type for GPLLs
        clk: qcom: gcc-x1e80100: Fix USB 0 and 1 PHY GDSC pwrsts flags
        clk: qcom: clk-alpha-pll: Update set_rate for Zonda PLL
        clk: qcom: clk-alpha-pll: Fix zonda set_rate failure when PLL is disabled
        clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API
        clk: qcom: clk-alpha-pll: Fix the pll post div mask
      d1f2d51b
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 37d4cc69
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "Single ufs driver fix quirking around another device spec violation"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: ufs-mediatek: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP
      37d4cc69
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 87276562
      Linus Torvalds authored
      Pull pin control fix from Linus Walleij:
       "A single fix for Qualcomm laptops that are affected by
        missing wakeup IRQs"
      
      * tag 'pinctrl-v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: qcom: x1e80100: Bypass PDC wakeup parent for now
      87276562
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-kunit-fixes-6.11-rc7-2' of... · b31c4492
      Linus Torvalds authored
      Merge tag 'linux_kselftest-kunit-fixes-6.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      PullKUnit fix from Shuah Khan:
       "Fix to a missing function parameter warning found during documentation
        build in linux-next"
      
      * tag 'linux_kselftest-kunit-fixes-6.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        kunit: Fix missing kerneldoc comment
      b31c4492
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.11-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 487ee43b
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Unregister platform devices for child nodes when stopping a PCI
         device, even if the PCI core has already cleared the OF_POPULATED bit
         and of_platform_depopulate() doesn't do anything (Bartosz
         Golaszewski)
      
       - Rescan the bus from a separate thread so we don't deadlock when
         triggering rescan from sysfs (Bartosz Golaszewski)
      
      * tag 'pci-v6.11-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI/pwrctl: Rescan bus on a separate thread
        PCI: Don't rely on of_platform_depopulate() for reused OF-nodes
      487ee43b
    • Linus Torvalds's avatar
      Merge tag 'v6.11-rc6-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · a86b83f7
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - fix potential mount hang
      
       - fix retry problem in two types of compound operations
      
       - important netfs integration fix in SMB1 read paths
      
       - fix potential uninitialized zero point of inode
      
       - minor patch to improve debugging for potential crediting problems
      
      * tag 'v6.11-rc6-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        netfs, cifs: Improve some debugging bits
        cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3
        cifs: Fix zero_point init on inode initialisation
        smb: client: fix double put of @cfile in smb2_set_path_size()
        smb: client: fix double put of @cfile in smb2_rename_path()
        smb: client: fix hang in wait_for_response() for negproto
      a86b83f7
  7. 06 Sep, 2024 8 commits
    • Linus Torvalds's avatar
      KVM: x86: don't fall through case statements without annotations · 9d4c3040
      Linus Torvalds authored
      clang warns on this because it has an unannotated fall-through between
      cases:
      
         arch/x86/kvm/x86.c:4819:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
      
      and while we could annotate it as a fallthrough, the proper fix is to
      just add the break for this case, instead of falling through to the
      default case and the break there.
      
      gcc also has that warning, but it looks like gcc only warns for the
      cases where they fall through to "real code", rather than to just a
      break.  Odd.
      
      Fixes: d30d9ee9 ("KVM: x86: Only advertise KVM_CAP_READONLY_MEM when supported by VM")
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Tom Dohrmann <erbse.13@gmx.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9d4c3040
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 6b8ff511
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Fix the arm64 usage of ftrace_graph_ret_addr() to pass the
        &state->graph_idx pointer instead of NULL, otherwise this function
        just returns early"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: stacktrace: fix the usage of ftrace_graph_ret_addr()
      6b8ff511
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 890daede
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A revert for the mmap() change that ties the allocation range to the
         hint adress, as what we tried to do ended up regressing on other
         userspace workloads.
      
       - A fix to avoid a kernel memory leak when emulating misaligned
         accesses from userspace.
      
       - A Kconfig fix for toolchain vector detection, which now correctly
         detects vector support on toolchains where the V extension depends on
         the M extension.
      
       - A fix to avoid failing the linear mapping bootmem bounds check on
         NOMMU systems.
      
       - A fix for early alternatives on relocatable kernels.
      
      * tag 'riscv-for-linus-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Fix RISCV_ALTERNATIVE_EARLY
        riscv: Do not restrict memory size because of linear mapping on nommu
        riscv: Fix toolchain vector detection
        riscv: misaligned: Restrict user access to kernel memory
        riscv: mm: Do not restrict mmap address based on hint
        riscv: selftests: Remove mmap hint address checks
        Revert "RISC-V: mm: Document mmap changes"
      890daede
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · a78d7dce
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix a deadlock in the powerpc qspinlock MCS queue logic
      
       - Fix the return type of pgd_val() to not truncate 64-bit PTEs on 85xx
      
       - Allow the check for dynamic relocations in the VDSO to work correctly
      
       - Make mmu_pte_psize static to fix a build error
      
      Thanks to Christophe Leroy, Nysal Jan K.A., Nicholas Piggin, Geetika
      Moolchandani, Jijo Varghese, and Vaishnavi Bhat.
      
      * tag 'powerpc-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/qspinlock: Fix deadlock in MCS queue
        powerpc/mm: Fix return type of pgd_val()
        powerpc/vdso: Don't discard rela sections
        powerpc/64e: Define mmu_pte_psize static
      a78d7dce
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · d45111e5
      Linus Torvalds authored
      Pull x86 kvm fixes from Paolo Bonzini:
       "Many small fixes that accumulated while I was on vacation...
      
         - Fixup missed comments from the REMOVED_SPTE => FROZEN_SPTE rename
      
         - Ensure a root is successfully loaded when pre-faulting SPTEs
      
         - Grab kvm->srcu when handling KVM_SET_VCPU_EVENTS to guard against
           accessing memslots if toggling SMM happens to force a VM-Exit
      
         - Emulate MSR_{FS,GS}_BASE on SVM even though interception is always
           disabled, so that KVM does the right thing if KVM's emulator
           encounters {RD,WR}MSR
      
         - Explicitly clear BUS_LOCK_DETECT from KVM's caps on AMD, as KVM
           doesn't yet virtualize BUS_LOCK_DETECT on AMD
      
         - Cleanup the help message for CONFIG_KVM_AMD_SEV, and call out that
           KVM now supports SEV-SNP too
      
         - Specialize return value of
           KVM_CHECK_EXTENSION(KVM_CAP_READONLY_MEM), based on VM type
      
         - Remove unnecessary dependency on CONFIG_HIGH_RES_TIMERS
      
         - Note an RCU quiescent state on guest exit. This avoids a call to
           rcu_core() if there was a grace period request while guest was
           running"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Remove HIGH_RES_TIMERS dependency
        kvm: Note an RCU quiescent state on guest exit
        KVM: x86: Only advertise KVM_CAP_READONLY_MEM when supported by VM
        KVM: SEV: Update KVM_AMD_SEV Kconfig entry and mention SEV-SNP
        KVM: SVM: Don't advertise Bus Lock Detect to guest if SVM support is missing
        KVM: SVM: fix emulation of msr reads/writes of MSR_FS_BASE and MSR_GS_BASE
        KVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS
        KVM: x86/mmu: Check that root is valid/loaded when pre-faulting SPTEs
        KVM: x86/mmu: Fixup comments missed by the REMOVED_SPTE=>FROZEN_SPTE rename
      d45111e5
    • Linus Torvalds's avatar
      Merge tag 'pm-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 788220ee
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "Fix an incorrect warning emitted by the amd-pstate driver on
        processors that don't support X86_FEATURE_CPPC (Gautham Shenoy)"
      
      * tag 'pm-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq/amd-pstate: Remove warning for X86_FEATURE_CPPC on certain Zen models
      788220ee
    • Linus Torvalds's avatar
      Merge tag 'block-6.11-20240906' of git://git.kernel.dk/linux · b66f0b11
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Mostly just some fixlets for NVMe, but also a bug fix for the ublk
        driver and an integrity fix"
      
      * tag 'block-6.11-20240906' of git://git.kernel.dk/linux:
        bio-integrity: don't restrict the size of integrity metadata
        ublk_drv: fix NULL pointer dereference in ublk_ctrl_start_recovery()
        nvmet: Identify-Active Namespace ID List command should reject invalid nsid
        nvme: set BLK_FEAT_ZONED for ZNS multipath disks
        nvme-pci: Add sleep quirk for Samsung 990 Evo
        nvme-pci: allocate tagset on reset if necessary
        nvmet-tcp: fix kernel crash if commands allocation fails
        nvme: use better description for async reset reason
        nvmet: Make nvmet_debugfs static
      b66f0b11
    • Linus Torvalds's avatar
      Merge tag 'sound-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 703896be
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Hopefully the last PR for 6.11, at least for this level of amount.
      
        In addition to the usual HD-audio quirks, there are more changes in
        ASoC, but all look small and device-specific fixes, and nothing stands
        out. The only slightly big change is sunxi I2S fix, which looks quite
        safe to apply, too"
      
      * tag 'sound-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits)
        ALSA: hda/realtek - Fix inactive headset mic jack for ASUS Vivobook 15 X1504VAP
        ALSA: hda/realtek: Support mute LED on HP Laptop 14-dq2xxx
        ALSA: hda/realtek: Enable Mute Led for HP Victus 15-fb1xxx
        ALSA: hda/realtek: extend quirks for Clevo V5[46]0
        ASoC: codecs: lpass-va-macro: set the default codec version for sm8250
        ALSA: hda: add HDMI codec ID for Intel PTL
        ALSA: hda/realtek: add patch for internal mic in Lenovo V145
        ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode
        ASoC: amd: yc: Add a quirk for MSI Bravo 17 (D7VEK)
        ASoC: mediatek: mt8188-mt6359: Modify key
        ASoc: SOF: topology: Clear SOF link platform name upon unload
        ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices
        ASoC: SOF: ipc: replace "enum sof_comp_type" field with "uint32_t"
        ASoC: fix module autoloading
        ASoC: tda7419: fix module autoloading
        ASoC: google: fix module autoloading
        ASoC: intel: fix module autoloading
        ASoC: tegra: Fix CBB error during probe()
        ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object
        ASoC: Intel: soc-acpi-cht: Make Lenovo Yoga Tab 3 X90F DMI match less strict
        ...
      703896be