Skip to content
  1. Aug 03, 2023
  2. Jul 24, 2023
    • Ani Sinha's avatar
      vmbus_testing: fix wrong python syntax for integer value comparison · ed0cf84e
      Ani Sinha authored
      
      
      It is incorrect in python to compare integer values using the "is" keyword.
      The "is" keyword in python is used to compare references to two objects,
      not their values. Newer version of python3 (version 3.8) throws a warning
      when such incorrect comparison is made. For value comparison, "==" should
      be used.
      
      Fix this in the code and suppress the following warning:
      
      /usr/sbin/vmbus_testing:167: SyntaxWarning: "is" with a literal. Did you mean "=="?
      
      Signed-off-by: default avatarAni Sinha <anisinha@redhat.com>
      Link: https://lore.kernel.org/r/20230705134408.6302-1-anisinha@redhat.com
      Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
      ed0cf84e
    • ZhiHu's avatar
      x86/hyperv: fix a warning in mshyperv.h · 060f2b97
      ZhiHu authored
      
      
      The following checkpatch warning is removed:
        WARNING: Use #include <linux/io.h> instead of <asm/io.h>
      
      Signed-off-by: default avatarZhiHu <huzhi001@208suo.com>
      Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
      060f2b97
    • Michael Kelley's avatar
      x86/hyperv: Disable IBT when hypercall page lacks ENDBR instruction · d5ace2a7
      Michael Kelley authored
      
      
      On hardware that supports Indirect Branch Tracking (IBT), Hyper-V VMs
      with ConfigVersion 9.3 or later support IBT in the guest. However,
      current versions of Hyper-V have a bug in that there's not an ENDBR64
      instruction at the beginning of the hypercall page. Since hypercalls are
      made with an indirect call to the hypercall page, all hypercall attempts
      fail with an exception and Linux panics.
      
      A Hyper-V fix is in progress to add ENDBR64. But guard against the Linux
      panic by clearing X86_FEATURE_IBT if the hypercall page doesn't start
      with ENDBR. The VM will boot and run without IBT.
      
      If future Linux 32-bit kernels were to support IBT, additional hypercall
      page hackery would be needed to make IBT work for such kernels in a
      Hyper-V VM.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Link: https://lore.kernel.org/r/1690001476-98594-1-git-send-email-mikelley@microsoft.com
      Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
      d5ace2a7
  3. Jun 29, 2023
  4. Jun 26, 2023
    • Linus Torvalds's avatar
      Linux 6.4 · 6995e2de
      Linus Torvalds authored
      v6.4
      6995e2de
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · e3b2e2c1
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Nothing fancy. Two driver and one DT binding fix"
      
      * tag 'i2c-for-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
        i2c: qup: Add missing unwind goto in qup_i2c_probe()
        dt-bindings: i2c: opencores: Add missing type for "regstep"
      e3b2e2c1
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 547cc9be
      Linus Torvalds authored
      Pull perf fixes from Borislav Petkov:
      
       - Drop the __weak attribute from a function prototype as it otherwise
         leads to the function getting replaced by a dummy stub
      
       - Fix the umask value setup of the frontend event as former is
         different on two Intel cores
      
      * tag 'perf_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Fix the FRONTEND encoding on GNR and MTL
        perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype
      547cc9be
    • Linus Torvalds's avatar
      Merge tag 'objtool_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 300edd75
      Linus Torvalds authored
      Pull objtool fix from Borislav Petkov:
      
       - Add a ORC format hash to vmlinux and modules in order for other tools
         which use it, to detect changes to it and adapt accordingly
      
      * tag 'objtool_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/unwind/orc: Add ELF section with ORC version identifier
      300edd75
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 661e723b
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Do not use set_pgd() when updating the KASLR trampoline pgd entry
         because that updates the user PGD too on KPTI builds, resulting in
         memory corruption
      
       - Prevent a panic in the IO-APIC setup code due to conflicting command
         line parameters
      
      * tag 'x86_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
        x86/mm: Avoid using set_pgd() outside of real PGD pages
      661e723b
  5. Jun 24, 2023
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-06-23' of git://anongit.freedesktop.org/drm/drm · a92b7d26
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Very quiet last week, just two misc fixes, one dp-mst and one qaic:
      
        qaic:
         - dma-buf import fix
      
        dp-mst:
         - fix NULL ptr deref"
      
      [ It turns out it was a quiet week because Alex Deucher hadn't sent in
        his pending AMD changes. So they are coming next    - Linus ]
      
      * tag 'drm-fixes-2023-06-23' of git://anongit.freedesktop.org/drm/drm:
        drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2
        accel/qaic: Call DRM helper function to destroy prime GEM
      a92b7d26
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 0f56e657
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "The final bug fixes for Qualcomm and Rockchips came in, all of them
        for devicetree files:
      
         - Devices on Qualcomm SC7180/SC7280 that are cache coherent are now
           marked so correctly to fix a regression after a change in kernel
           behavior
      
         - Rockchips has a few minor changes for correctness of regulator and
           cache properties, as well as fixes for incorrect behavior of the
           RK3568 PCI controller and reset pins on two boards"
      
      * tag 'arm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP
        dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent
        arm64: dts: rockchip: Fix rk356x PCIe register and range mappings
        arm64: dts: rockchip: fix button reset pin for nanopi r5c
        arm64: dts: rockchip: fix nEXTRST on SOQuartz
        arm64: dts: rockchip: add missing cache properties
        arm64: dts: rockchip: fix USB regulator on ROCK64
      0f56e657
    • Linus Torvalds's avatar
      Merge tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 569fa939
      Linus Torvalds authored
      Pull btrfs fix from David Sterba:
       "Unfortunately the recent u32 overflow fix was not complete, there was
        one conversion left, assertion not triggered by my tests but caught by
        Qu's fstests case.
      
        The "cleanup for later" has been promoted to a proper fix and wraps
        all uses of the stripe left shift so the diffstat has grown but leaves
        no potentially problematic uses.
      
        We should have done it that way before, sorry"
      
      * tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix remaining u32 overflows when left shifting stripe_nr
      569fa939
    • Linus Torvalds's avatar
      Merge tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux · 9cb38381
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "It's apparently the week of 'fixup something from last week', because
        the same is true for this block pull request.
      
        Fix up a lock grab that needs to be IRQ saving, rather than just IRQ
        disabling, in the block cgroup code"
      
      * tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux:
        block: make sure local irq is disabled when calling __blkcg_rstat_flush
      9cb38381
    • Linus Torvalds's avatar
      Merge tag 'iommu-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 917b3c7c
      Linus Torvalds authored
      Pull iommu fix from Joerg Roedel:
      
       - Fix potential memory leak in AMD IOMMU domain allocation path
      
      * tag 'iommu-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix possible memory leak of 'domain'
      917b3c7c
    • Linus Torvalds's avatar
      Merge tag 'sound-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 61dabacd
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Three oneliner fixes: one for a thinko in SOF SoundWire code and two
        HD-audio quirks for ASUS laptops. All device-specific and should be
        safe to apply"
      
      * tag 'sound-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek: Add quirk for ASUS ROG GV601V
        ALSA: hda/realtek: Add quirk for ASUS ROG G634Z
        ASoC: intel: sof_sdw: Fixup typo in device link checking
      61dabacd
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 6edecb99
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix IRQ initialization in gpiochip_irqchip_add_domain()
      
       - add a missing return value check for platform_get_irq() in
         gpio-sifive
      
       - don't free irq_domains which GPIOLIB does not manage
      
      * tag 'gpio-fixes-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain()
        gpio: sifive: add missing check for platform_get_irq
        gpiolib: Fix GPIO chip IRQ initialization restriction
      6edecb99
    • Arnd Bergmann's avatar
      Merge tag 'qcom-arm64-fixes-for-6.4-2' of... · ed8ff046
      Arnd Bergmann authored
      
      Merge tag 'qcom-arm64-fixes-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes
      
      One last Qualcomm ARM64 DeviceTree fix for v6.4
      
      Changes related to cache management for DMA memory caused WiFi to stop
      work on SC7180 and SC7280 based products, using TF-A. These changes
      marks the relevant device dma-coherent to correct the behavior.
      
      * tag 'qcom-arm64-fixes-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
        arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP
        dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent
      
      Link: https://lore.kernel.org/r/20230622203248.106422-1-andersson@kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      ed8ff046
    • Linus Torvalds's avatar
      workqueue: clean up WORK_* constant types, clarify masking · afa4bb77
      Linus Torvalds authored
      
      
      Dave Airlie reports that gcc-13.1.1 has started complaining about some
      of the workqueue code in 32-bit arm builds:
      
        kernel/workqueue.c: In function ‘get_work_pwq’:
        kernel/workqueue.c:713:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
          713 |                 return (void *)(data & WORK_STRUCT_WQ_DATA_MASK);
              |                        ^
        [ ... a couple of other cases ... ]
      
      and while it's not immediately clear exactly why gcc started complaining
      about it now, I suspect it's some C23-induced enum type handlign fixup in
      gcc-13 is the cause.
      
      Whatever the reason for starting to complain, the code and data types
      are indeed disgusting enough that the complaint is warranted.
      
      The wq code ends up creating various "helper constants" (like that
      WORK_STRUCT_WQ_DATA_MASK) using an enum type, which is all kinds of
      confused.  The mask needs to be 'unsigned long', not some unspecified
      enum type.
      
      To make matters worse, the actual "mask and cast to a pointer" is
      repeated a couple of times, and the cast isn't even always done to the
      right pointer, but - as the error case above - to a 'void *' with then
      the compiler finishing the job.
      
      That's now how we roll in the kernel.
      
      So create the masks using the proper types rather than some ambiguous
      enumeration, and use a nice helper that actually does the type
      conversion in one well-defined place.
      
      Incidentally, this magically makes clang generate better code.  That,
      admittedly, is really just a sign of clang having been seriously
      confused before, and cleaning up the typing unconfuses the compiler too.
      
      Reported-by: default avatarDave Airlie <airlied@gmail.com>
      Link: https://lore.kernel.org/lkml/CAPM=9twNnV4zMCvrPkw3H-ajZOH-01JVh_kDrxdPYQErz8ZTdA@mail.gmail.com/
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      afa4bb77
  6. Jun 23, 2023
    • Clark Wang's avatar
      i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle · e69b9bc1
      Clark Wang authored
      Claim clkhi and clklo as integer type to avoid possible calculation
      errors caused by data overflow.
      
      Fixes: a55fa9d0
      
       ("i2c: imx-lpi2c: add low power i2c bus driver")
      Signed-off-by: default avatarClark Wang <xiaoning.wang@nxp.com>
      Signed-off-by: default avatarCarlos Song <carlos.song@nxp.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      e69b9bc1
    • Shuai Jiang's avatar
      i2c: qup: Add missing unwind goto in qup_i2c_probe() · cd948962
      Shuai Jiang authored
      Smatch Warns:
      	drivers/i2c/busses/i2c-qup.c:1784 qup_i2c_probe()
      	warn: missing unwind goto?
      
      The goto label "fail_runtime" and "fail" will disable qup->pclk,
      but here qup->pclk failed to obtain, in order to be consistent,
      change the direct return to goto label "fail_dma".
      
      Fixes: 9cedf3b2
      
       ("i2c: qup: Add bam dma capabilities")
      Signed-off-by: default avatarShuai Jiang <d202180596@hust.edu.cn>
      Reviewed-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      Cc: <stable@vger.kernel.org> # v4.6+
      cd948962
    • Rob Herring's avatar
      dt-bindings: i2c: opencores: Add missing type for "regstep" · bd5c7104
      Rob Herring authored
      "regstep" may be deprecated, but it still needs a type.
      
      Fixes: 8ad69f49
      
       ("dt-bindings: i2c: convert ocores binding to yaml")
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarPeter Korsgaard <peter@korsgaard.com>
      Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Acked-by: default avatarAndi Shyti <andi.shyti@kernel.org>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      bd5c7104
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2023-06-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 9bd9be5c
      Dave Airlie authored
      
      
      drm-misc-fixes for v6.4:
      - Qaic imported dma-buf fix.
      - Fix null pointer deref when printing a dp-mst message.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Maarten Lankhorst <dev@lankhorst.se>
      Link: https://patchwork.freedesktop.org/patch/msgid/e96b1965-ba67-7cc5-2358-826eb5b9b998@lankhorst.se
      9bd9be5c
    • Linus Torvalds's avatar
      Merge tag 'net-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 8a28a0b6
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from ipsec, bpf, mptcp and netfilter.
      
        Current release - regressions:
      
         - netfilter: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
      
         - eth: mlx5e:
            - fix scheduling of IPsec ASO query while in atomic
            - free IRQ rmap and notifier on kernel shutdown
      
        Current release - new code bugs:
      
         - phy: manual remove LEDs to ensure correct ordering
      
        Previous releases - regressions:
      
         - mptcp: fix possible divide by zero in recvmsg()
      
         - dsa: revert "net: phy: dp83867: perform soft reset and retain
           established link"
      
        Previous releases - always broken:
      
         - sched: netem: acquire qdisc lock in netem_change()
      
         - bpf:
            - fix verifier id tracking of scalars on spill
            - fix NULL dereference on exceptions
            - accept function names that contain dots
      
         - netfilter: disallow element updates of bound anonymous sets
      
         - mptcp: ensure listener is unhashed before updating the sk status
      
         - xfrm:
            - add missed call to delete offloaded policies
            - fix inbound ipv4/udp/esp packets to UDPv6 dualstack sockets
      
         - selftests: fixes for FIPS mode
      
         - dsa: mt7530: fix multiple CPU ports, BPDU and LLDP handling
      
         - eth: sfc: use budget for TX completions
      
        Misc:
      
         - wifi: iwlwifi: add support for SO-F device with PCI id 0x7AF0"
      
      * tag 'net-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (74 commits)
        revert "net: align SO_RCVMARK required privileges with SO_MARK"
        net: wwan: iosm: Convert single instance struct member to flexible array
        sch_netem: acquire qdisc lock in netem_change()
        selftests: forwarding: Fix race condition in mirror installation
        wifi: mac80211: report all unusable beacon frames
        mptcp: ensure listener is unhashed before updating the sk status
        mptcp: drop legacy code around RX EOF
        mptcp: consolidate fallback and non fallback state machine
        mptcp: fix possible list corruption on passive MPJ
        mptcp: fix possible divide by zero in recvmsg()
        mptcp: handle correctly disconnect() failures
        bpf: Force kprobe multi expected_attach_type for kprobe_multi link
        bpf/btf: Accept function names that contain dots
        Revert "net: phy: dp83867: perform soft reset and retain established link"
        net: mdio: fix the wrong parameters
        netfilter: nf_tables: Fix for deleting base chains with payload
        netfilter: nfnetlink_osf: fix module autoload
        netfilter: nf_tables: drop module reference after updating chain
        netfilter: nf_tables: disallow timeout for anonymous sets
        netfilter: nf_tables: disallow updates of anonymous sets
        ...
      8a28a0b6
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 412d070b
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM:
      
         - Correctly save/restore PMUSERNR_EL0 when host userspace is using
           PMU counters directly
      
         - Fix GICv2 emulation on GICv3 after the locking rework
      
         - Don't use smp_processor_id() in kvm_pmu_probe_armpmu(), and
           document why
      
        Generic:
      
         - Avoid setting page table entries pointing to a deleted memslot if a
           host page table entry is changed concurrently with the deletion"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Avoid illegal stage2 mapping on invalid memory slot
        KVM: arm64: Use raw_smp_processor_id() in kvm_pmu_probe_armpmu()
        KVM: arm64: Restore GICv2-on-GICv3 functionality
        KVM: arm64: PMU: Don't overwrite PMUSERENR with vcpu loaded
        KVM: arm64: PMU: Restore the host's PMUSERENR_EL0
      412d070b
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · e7758c0d
      Linus Torvalds authored
      Pull powerpc fix from Michael Ellerman:
      
       - Disable IRQs when switching mm in exit_lazy_flush_tlb() called from
         exit_mmap()
      
      Thanks to Nicholas Piggin and Sachin Sant.
      
      * tag 'powerpc-6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s/radix: Fix exit lazy tlb mm switch with irqs enabled
      e7758c0d
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 4a426aa1
      Linus Torvalds authored
      Pull pci fix from Bjorn Helgaas:
      
       - Transfer Intel LGM GW PCIe maintenance from Rahul Tanwar to Chuanhua
         Lei (Zhu YiXin)
      
      * tag 'pci-v6.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        MAINTAINERS: Add Chuanhua Lei as Intel LGM GW PCIe maintainer
      4a426aa1
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 93765002
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
      
       - Fix support for deferred probing for several host drivers
      
       - litex_mmc: Use async probe as it's common for all mmc hosts
      
       - meson-gx: Fix bug when scheduling while atomic
      
       - mmci_stm32: Fix max busy timeout calculation
      
       - sdhci-msm: Disable broken 64-bit DMA on MSM8916
      
      * tag 'mmc-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: usdhi60rol0: fix deferred probing
        mmc: sunxi: fix deferred probing
        mmc: sh_mmcif: fix deferred probing
        mmc: sdhci-spear: fix deferred probing
        mmc: sdhci-acpi: fix deferred probing
        mmc: owl: fix deferred probing
        mmc: omap_hsmmc: fix deferred probing
        mmc: omap: fix deferred probing
        mmc: mvsdio: fix deferred probing
        mmc: mtk-sd: fix deferred probing
        mmc: meson-gx: fix deferred probing
        mmc: bcm2835: fix deferred probing
        mmc: litex_mmc: set PROBE_PREFER_ASYNCHRONOUS
        mmc: meson-gx: remove redundant mmc_request_done() call from irq context
        mmc: mmci: stm32: fix max busy timeout calculation
        mmc: sdhci-msm: Disable broken 64-bit DMA on MSM8916
      93765002
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.4-5' of... · 65d48989
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fix from Hans de Goede:
       "One small fix for an AMD PMF driver issue which is causing issues for
        users of just released AMD laptop models"
      
      * tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86/amd/pmf: Register notify handler only if SPS is enabled
      65d48989
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.4-2023-06-21' of git://git.kernel.dk/linux · c213de63
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A fix for a race condition with poll removal and linked timeouts, and
        then a few followup fixes/tweaks for the msg_control patch from last
        week.
      
        Not super important, particularly the sparse fixup, as it was broken
        before that recent commit. But let's get it sorted for real for this
        release, rather than just have it broken a bit differently"
      
      * tag 'io_uring-6.4-2023-06-21' of git://git.kernel.dk/linux:
        io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr
        io_uring/net: disable partial retries for recvmsg with cmsg
        io_uring/net: clear msg_controllen on partial sendmsg retry
        io_uring/poll: serialize poll linked timer start with poll removal
      c213de63
    • Linus Torvalds's avatar
      Merge tag 'cgroup-for-6.4-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 5950a006
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "It's late but here are two bug fixes. Both fix problems which can be
        severe but are very confined in scope. The risk to most use cases
        should be minimal.
      
         - Fix for an old bug which triggers if a cgroup subsystem is
           remounted to a different hierarchy while someone is reading its
           cgroup.procs/tasks file. The risk is pretty low given how seldom
           cgroup subsystems are moved across hierarchies.
      
         - We moved cpus_read_lock() outside of cgroup internal locks a while
           ago but forgot to update the legacy_freezer leading to lockdep
           triggers. Fixed"
      
      * tag 'cgroup-for-6.4-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: Do not corrupt task iteration when rebinding subsystem
        cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex in freezer_css_{online,offline}()
      5950a006
    • Paolo Bonzini's avatar
      Merge tag 'kvmarm-fixes-6.4-4' of... · 2623b3dc
      Paolo Bonzini authored
      Merge tag 'kvmarm-fixes-6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
      
      KVM/arm64 fixes for 6.4, take #4
      
      - Correctly save/restore PMUSERNR_EL0 when host userspace is using
        PMU counters directly
      
      - Fix GICv2 emulation on GICv3 after the locking rework
      
      - Don't use smp_processor_id() in kvm_pmu_probe_armpmu(), and
        document why...
      2623b3dc
    • Douglas Anderson's avatar
      arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices · 7b59e8ae
      Douglas Anderson authored
      Just like for sc7180 devices using the Chrome bootflow (AKA trogdor
      and IDP), sc7280 devices using the Chrome bootflow also need their
      firmware marked dma-coherent. On sc7280 this wasn't causing WiFi to
      fail to startup, since WiFi works differently there. However, on
      sc7280 devices we were still getting the message at bootup after
      commit 7bd6680b ("Revert "Revert "arm64: dma: Drop cache
      invalidation from arch_dma_prep_coherent()"""):
      
       qcom_scm firmware:scm: Assign memory protection call failed -22
       qcom_rmtfs_mem 9c900000.memory: assign memory failed
       qcom_rmtfs_mem: probe of 9c900000.memory failed with error -22
      
      We should mark SCM properly just like we did for trogdor.
      
      Fixes: 7bd6680b ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""")
      Fixes: 7a1f4e7f
      
       ("arm64: dts: qcom: sc7280: Add basic dts/dtsi files for sc7280 soc")
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://lore.kernel.org/r/20230616081440.v2.4.I21dc14a63327bf81c6bb58fe8ed91dbdc9849ee2@changeid
      Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
      7b59e8ae
    • Douglas Anderson's avatar
      arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor · a54b7fa6
      Douglas Anderson authored
      Trogdor devices use firmware backed by TF-A instead of Qualcomm's
      normal TZ. On TF-A we end up mapping memory as cacheable.
      Specifically, you can see in Trogdor's TF-A code [1] in
      qti_sip_mem_assign() that we call qti_mmap_add_dynamic_region() with
      MT_RO_DATA. This translates down to MT_MEMORY instead of
      MT_NON_CACHEABLE or MT_DEVICE. Apparently Qualcomm's normal TZ
      implementation maps the memory as non-cacheable.
      
      Let's add the "dma-coherent" attribute to the SCM for trogdor.
      
      Adding "dma-coherent" like this fixes WiFi on sc7180-trogdor
      devices. WiFi was broken as of commit 7bd6680b ("Revert "Revert
      "arm64: dma: Drop cache invalidation from
      arch_dma_prep_coherent()"""). Specifically at bootup we'd get:
      
       qcom_scm firmware:scm: Assign memory protection call failed -22
       qcom_rmtfs_mem 94600000.memory: assign memory failed
       qcom_rmtfs_mem: probe of 94600000.memory failed with error -22
      
      From discussion on the mailing lists [2] and over IRC [3], it was
      determined that we should always have been tagging the SCM as
      dma-coherent on trogdor but that the old "invalidate" happened to make
      things work most of the time. Tagging it properly like this is a much
      more robust solution.
      
      [1] https://chromium.googlesource.com/chromiumos/third_party/arm-trusted-firmware/+/refs/heads/firmware-trogdor-13577.B/plat/qti/common/src/qti_syscall.c
      [2] https://lore.kernel.org/r/20230614165904.1.I279773c37e2c1ed8fbb622ca6d1397aea0023526@changeid
      [3] https://oftc.irclog.whitequark.org/linux-msm/2023-06-15
      
      Fixes: 7bd6680b ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""")
      Fixes: 7ec3e673
      
       ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt")
      Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://lore.kernel.org/r/20230616081440.v2.3.Ic62daa649b47b656b313551d646c4de9a7da4bd4@changeid
      Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
      a54b7fa6
    • Douglas Anderson's avatar
      arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP · 9a5f0b11
      Douglas Anderson authored
      sc7180-idp is, for most intents and purposes, a trogdor device.
      Specifically, sc7180-idp is designed to run the same style of firmware
      as trogdor devices. This can be seen from the fact that IDP has the
      same "Reserved memory changes" in its device tree that trogdor has.
      
      Recently it was realized that we need to mark SCM as dma-coherent to
      match what trogdor's style of firmware (based on TF-A) does [1]. That
      means we need this dma-coherent tag on IDP as well.
      
      Without this, on newer versions of Linux, specifically those with
      commit 7bd6680b ("Revert "Revert "arm64: dma: Drop cache
      invalidation from arch_dma_prep_coherent()"""), WiFi will fail to
      work. At bootup you'll see:
      
        qcom_scm firmware:scm: Assign memory protection call failed -22
        qcom_rmtfs_mem 94600000.memory: assign memory failed
        qcom_rmtfs_mem: probe of 94600000.memory failed with error -22
      
      [1] https://lore.kernel.org/r/20230615145253.1.Ic62daa649b47b656b313551d646c4de9a7da4bd4@changeid
      
      Fixes: 7bd6680b ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""")
      Fixes: f5ab220d
      
       ("arm64: dts: qcom: sc7180: Add remoteproc enablers")
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://lore.kernel.org/r/20230616081440.v2.2.I3c17d546d553378aa8a0c68c3fe04bccea7cba17@changeid
      Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
      9a5f0b11
    • Douglas Anderson's avatar
      dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent · c0877829
      Douglas Anderson authored
      
      
      Trogdor devices use firmware backed by TF-A instead of Qualcomm's
      normal TZ. On TF-A we end up mapping memory as cacheable. Specifically,
      you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we
      call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates
      down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE.
      
      Let's allow devices like trogdor to be described properly by allowing
      "dma-coherent" in the SCM node.
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Link: https://lore.kernel.org/r/20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid
      Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
      c0877829
    • Gavin Shan's avatar
      KVM: Avoid illegal stage2 mapping on invalid memory slot · 2230f9e1
      Gavin Shan authored
      We run into guest hang in edk2 firmware when KSM is kept as running on
      the host. The edk2 firmware is waiting for status 0x80 from QEMU's pflash
      device (TYPE_PFLASH_CFI01) during the operation of sector erasing or
      buffered write. The status is returned by reading the memory region of
      the pflash device and the read request should have been forwarded to QEMU
      and emulated by it. Unfortunately, the read request is covered by an
      illegal stage2 mapping when the guest hang issue occurs. The read request
      is completed with QEMU bypassed and wrong status is fetched. The edk2
      firmware runs into an infinite loop with the wrong status.
      
      The illegal stage2 mapping is populated due to same page sharing by KSM
      at (C) even the associated memory slot has been marked as invalid at (B)
      when the memory slot is requested to be deleted. It's notable that the
      active and inactive memory slots can't be swapped when we're in the middle
      of kvm_mmu_notifier_change_pte() because kvm->mn_active_invalidate_count
      is elevated, and kvm_swap_active_memslots() will busy loop until it reaches
      to zero again. Besides, the swapping from the active to the inactive memory
      slots is also avoided by holding &kvm->srcu in __kvm_handle_hva_range(),
      corresponding to synchronize_srcu_expedited() in kvm_swap_active_memslots().
      
        CPU-A                    CPU-B
        -----                    -----
                                 ioctl(kvm_fd, KVM_SET_USER_MEMORY_REGION)
                                 kvm_vm_ioctl_set_memory_region
                                 kvm_set_memory_region
                                 __kvm_set_memory_region
                                 kvm_set_memslot(kvm, old, NULL, KVM_MR_DELETE)
                                   kvm_invalidate_memslot
                                     kvm_copy_memslot
                                     kvm_replace_memslot
                                     kvm_swap_active_memslots        (A)
                                     kvm_arch_flush_shadow_memslot   (B)
        same page sharing by KSM
        kvm_mmu_notifier_invalidate_range_start
              :
        kvm_mmu_notifier_change_pte
          kvm_handle_hva_range
          __kvm_handle_hva_range
          kvm_set_spte_gfn            (C)
              :
        kvm_mmu_notifier_invalidate_range_end
      
      Fix the issue by skipping the invalid memory slot at (C) to avoid the
      illegal stage2 mapping so that the read request for the pflash's status
      is forwarded to QEMU and emulated by it. In this way, the correct pflash's
      status can be returned from QEMU to break the infinite loop in the edk2
      firmware.
      
      We tried a git-bisect and the first problematic commit is cd4c7183 ("
      KVM: arm64: Convert to the gfn-based MMU notifier callbacks"). With this,
      clean_dcache_guest_page() is called after the memory slots are iterated
      in kvm_mmu_notifier_change_pte(). clean_dcache_guest_page() is called
      before the iteration on the memory slots before this commit. This change
      literally enlarges the racy window between kvm_mmu_notifier_change_pte()
      and memory slot removal so that we're able to reproduce the issue in a
      practical test case. However, the issue exists since commit d5d8184d
      ("KVM: ARM: Memory virtualization setup").
      
      Cc: stable@vger.kernel.org # v3.9+
      Fixes: d5d8184d
      
       ("KVM: ARM: Memory virtualization setup")
      Reported-by: default avatarShuai Hu <hshuai@redhat.com>
      Reported-by: default avatarZhenyu Zhang <zhenyzha@redhat.com>
      Signed-off-by: default avatarGavin Shan <gshan@redhat.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarOliver Upton <oliver.upton@linux.dev>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
      Reviewed-by: default avatarShaoqin Huang <shahuang@redhat.com>
      Message-Id: <20230615054259.14911-1-gshan@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2230f9e1
  7. Jun 22, 2023
    • Qu Wenruo's avatar
      btrfs: fix remaining u32 overflows when left shifting stripe_nr · cb091225
      Qu Wenruo authored
      There was regression caused by a97699d1 ("btrfs: replace
      map_lookup->stripe_len by BTRFS_STRIPE_LEN") and supposedly fixed by
      a7299a18 ("btrfs: fix u32 overflows when left shifting stripe_nr").
      To avoid code churn the fix was open coding the type casts but
      unfortunately missed one which was still possible to hit [1].
      
      The missing place was assignment of bioc->full_stripe_logical inside
      btrfs_map_block().
      
      Fix it by adding a helper that does the safe calculation of the offset
      and use it everywhere even though it may not be strictly necessary due
      to already using u64 types.  This replaces all remaining
      "<< BTRFS_STRIPE_LEN_SHIFT" calls.
      
      [1] https://lore.kernel.org/linux-btrfs/20230622065438.86402-1-wqu@suse.com/
      
      Fixes: a7299a18
      
       ("btrfs: fix u32 overflows when left shifting stripe_nr")
      Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
      Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
      [ update changelog ]
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
      cb091225