1. 14 Aug, 2023 2 commits
    • Borislav Petkov (AMD)'s avatar
      x86/CPU/AMD: Fix the DIV(0) initial fix attempt · f58d6fbc
      Borislav Petkov (AMD) authored
      Initially, it was thought that doing an innocuous division in the #DE
      handler would take care to prevent any leaking of old data from the
      divider but by the time the fault is raised, the speculation has already
      advanced too far and such data could already have been used by younger
      operations.
      
      Therefore, do the innocuous division on every exit to userspace so that
      userspace doesn't see any potentially old data from integer divisions in
      kernel space.
      
      Do the same before VMRUN too, to protect host data from leaking into the
      guest too.
      
      Fixes: 77245f1c ("x86/CPU/AMD: Do not leak quotient data after a division by 0")
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Cc: <stable@kernel.org>
      Link: https://lore.kernel.org/r/20230811213824.10025-1-bp@alien8.de
      f58d6fbc
    • Sean Christopherson's avatar
      x86/retpoline: Don't clobber RFLAGS during srso_safe_ret() · ba5ca5e5
      Sean Christopherson authored
      Use LEA instead of ADD when adjusting %rsp in srso_safe_ret{,_alias}()
      so as to avoid clobbering flags.  Drop one of the INT3 instructions to
      account for the LEA consuming one more byte than the ADD.
      
      KVM's emulator makes indirect calls into a jump table of sorts, where
      the destination of each call is a small blob of code that performs fast
      emulation by executing the target instruction with fixed operands.
      
      E.g. to emulate ADC, fastop() invokes adcb_al_dl():
      
        adcb_al_dl:
          <+0>:  adc    %dl,%al
          <+2>:  jmp    <__x86_return_thunk>
      
      A major motivation for doing fast emulation is to leverage the CPU to
      handle consumption and manipulation of arithmetic flags, i.e. RFLAGS is
      both an input and output to the target of the call.  fastop() collects
      the RFLAGS result by pushing RFLAGS onto the stack and popping them back
      into a variable (held in %rdi in this case):
      
        asm("push %[flags]; popf; " CALL_NOSPEC " ; pushf; pop %[flags]\n"
      
        <+71>: mov    0xc0(%r8),%rdx
        <+78>: mov    0x100(%r8),%rcx
        <+85>: push   %rdi
        <+86>: popf
        <+87>: call   *%rsi
        <+89>: nop
        <+90>: nop
        <+91>: nop
        <+92>: pushf
        <+93>: pop    %rdi
      
      and then propagating the arithmetic flags into the vCPU's emulator state:
      
        ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK);
      
        <+64>:  and    $0xfffffffffffff72a,%r9
        <+94>:  and    $0x8d5,%edi
        <+109>: or     %rdi,%r9
        <+122>: mov    %r9,0x10(%r8)
      
      The failures can be most easily reproduced by running the "emulator"
      test in KVM-Unit-Tests.
      
      If you're feeling a bit of deja vu, see commit b63f20a7
      ("x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386").
      
      In addition, this breaks booting of clang-compiled guest on
      a gcc-compiled host where the host contains the %rsp-modifying SRSO
      mitigations.
      
        [ bp: Massage commit message, extend, remove addresses. ]
      
      Fixes: fb3bd914 ("x86/srso: Add a Speculative RAS Overflow mitigation")
      Closes: https://lore.kernel.org/all/de474347-122d-54cd-eabf-9dcc95ab9eae@amd.comReported-by: default avatarSrikanth Aithal <sraithal@amd.com>
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/20230810013334.GA5354@dev-arch.thelio-3990X/
      Link: https://lore.kernel.org/r/20230811155255.250835-1-seanjc@google.com
      ba5ca5e5
  2. 13 Aug, 2023 9 commits
  3. 12 Aug, 2023 11 commits
    • Linus Torvalds's avatar
      Merge tag 'for-6.5-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · a785fd28
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "More fixes, some of them going back to older releases and there are
        fixes for hangs in stress tests regarding space caching:
      
         - fixes and progress tracking for hangs in free space caching, found
           by test generic/475
      
         - writeback fixes, write pages in integrity mode and skip writing
           pages that have been written meanwhile
      
         - properly clear end of extent range after an error
      
         - relocation fixes:
            - fix race betwen qgroup tree creation and relocation
            - detect and report invalid reloc roots"
      
      * tag 'for-6.5-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: set cache_block_group_error if we find an error
        btrfs: reject invalid reloc tree root keys with stack dump
        btrfs: exit gracefully if reloc roots don't match
        btrfs: avoid race between qgroup tree creation and relocation
        btrfs: properly clear end of the unreserved range in cow_file_range
        btrfs: don't wait for writeback on clean pages in extent_write_cache_pages
        btrfs: don't stop integrity writeback too early
        btrfs: wait for actual caching progress during allocation
      a785fd28
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · ae545c32
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - mark virtual chips exposed by gpio-sim as ones that can sleep
         (callbacks must not be called from interrupt context)
      
       - fix an off-by-one error in gpio-ws16c48
      
      * tag 'gpio-fixes-for-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent
        gpio: sim: mark the GPIO chip as a one that can sleep
      ae545c32
    • Mateusz Guzik's avatar
      locking: remove spin_lock_prefetch · c8afaa1b
      Mateusz Guzik authored
      The only remaining consumer is new_inode, where it showed up in 2001 as
      commit c37fa164 ("v2.4.9.9 -> v2.4.9.10") in a historical repo [1]
      with a changelog which does not mention it.
      
      Since then the line got only touched up to keep compiling.
      
      While it may have been of benefit back in the day, it is guaranteed to
      at best not get in the way in the multicore setting -- as the code
      performs *a lot* of work between the prefetch and actual lock acquire,
      any contention means the cacheline is already invalid by the time the
      routine calls spin_lock().  It adds spurious traffic, for short.
      
      On top of it prefetch is notoriously tricky to use for single-threaded
      purposes, making it questionable from the get go.
      
      As such, remove it.
      
      I admit upfront I did not see value in benchmarking this change, but I
      can do it if that is deemed appropriate.
      
      Removal from new_inode and of the entire thing are in the same patch as
      requested by Linus, so whatever weird looks can be directed at that guy.
      
      Link: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/fs/inode.c?id=c37fa164f793735b32aa3f53154ff1a7659e6442 [1]
      Signed-off-by: default avatarMateusz Guzik <mjguzik@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c8afaa1b
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 3feecb1b
      Linus Torvalds authored
      Pull char / misc driver fixes from Greg KH:
       "Here are some small char/misc driver fixes for 6.5-rc6 that resolve
        some reported issues. Included in here are:
      
         - bunch of iio driver fixes for reported problems
      
         - interconnect driver fixes
      
         - counter driver build fix
      
         - cardreader driver fixes
      
         - binder driver fixes
      
         - other tiny driver fixes
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'char-misc-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits)
        misc: tps6594-esm: Disable ESM for rev 1 PMIC
        misc: rtsx: judge ASPM Mode to set PETXCFG Reg
        binder: fix memory leak in binder_init()
        iio: cros_ec: Fix the allocation size for cros_ec_command
        tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure
        iio: imu: lsm6dsx: Fix mount matrix retrieval
        iio: adc: meson: fix core clock enable/disable moment
        iio: core: Prevent invalid memory access when there is no parent
        iio: frequency: admv1013: propagate errors from regulator_get_voltage()
        counter: Fix menuconfig "Counter support" submenu entries disappearance
        dt-bindings: iio: adi,ad74115: remove ref from -nanoamp
        iio: adc: ina2xx: avoid NULL pointer dereference on OF device match
        iio: light: bu27008: Fix intensity data type
        iio: light: bu27008: Fix scale format
        iio: light: bu27034: Fix scale format
        iio: adc: ad7192: Fix ac excitation feature
        interconnect: qcom: sa8775p: add enable_mask for bcm nodes
        interconnect: qcom: sm8550: add enable_mask for bcm nodes
        interconnect: qcom: sm8450: add enable_mask for bcm nodes
        interconnect: qcom: Add support for mask-based BCMs
        ...
      3feecb1b
    • Linus Torvalds's avatar
      Merge tag 'usb-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 469a2f50
      Linus Torvalds authored
      Pull USB / Thunderbolt driver fixes from Greg KH:
       "Here are some small USB and Thunderbolt driver fixes for reported
        problems. Included in here are:
      
         - thunderbolt driver memory leak fix
      
         - thunderbolt display flicker fix
      
         - usb dwc3 driver fix
      
         - usb gadget uvc disconnect crash fix
      
         - usb typec Kconfig build dependency fix
      
         - usb typec small fixes
      
         - usb-con-gpio bugfix
      
         - usb-storage old driver bugfix
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        thunderbolt: Fix memory leak in tb_handle_dp_bandwidth_request()
        usb: dwc3: Properly handle processing of pending events
        usb-storage: alauda: Fix uninit-value in alauda_check_media()
        usb: common: usb-conn-gpio: Prevent bailing out if initial role is none
        USB: Gadget: core: Help prevent panic during UVC unconfigure
        usb: typec: mux: intel: Add dependency on USB_COMMON
        usb: typec: nb7vpq904m: Add an error handling path in nb7vpq904m_probe()
        usb: typec: altmodes/displayport: Signal hpd when configuring pin assignment
        usb: typec: tcpm: Fix response to vsafe0V event
        thunderbolt: Fix Thunderbolt 3 display flickering issue on 2nd hot plug onwards
      469a2f50
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 43972cf2
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Do not parse the confidential computing blob on non-AMD hardware as
         it leads to an EFI config table ending up unmapped
      
       - Use the correct segment selector in the 32-bit version of getcpu() in
         the vDSO
      
       - Make sure vDSO and VVAR regions are placed in the 47-bit VA range
         even on 5-level paging systems
      
       - Add models 0x90-0x91 to the range of AMD Zenbleed-affected CPUs
      
      * tag 'x86_urgent_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
        x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
        x86/linkage: Fix typo of BUILD_VDSO in asm/linkage.h
        x86/vdso: Choose the right GDT_ENTRY_CPUNODE for 32-bit getcpu() on 64-bit kernel
        x86/sev: Do not try to parse for the CC blob on non-AMD hardware
      43972cf2
    • Linus Torvalds's avatar
      Merge tag 'x86_bugs_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 272b86ba
      Linus Torvalds authored
      Pull x86 mitigation fixes from Borislav Petkov:
       "The first set of fallout fixes after the embargo madness. There will
        be another set next week too.
      
         - A first series of cleanups/unifications and documentation
           improvements to the SRSO and GDS mitigations code which got
           postponed to after the embargo date
      
         - Fix the SRSO aliasing addresses assertion so that the LLVM linker
           can parse it too"
      
      * tag 'x86_bugs_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        driver core: cpu: Fix the fallback cpu_show_gds() name
        x86: Move gds_ucode_mitigated() declaration to header
        x86/speculation: Add cpu_show_gds() prototype
        driver core: cpu: Make cpu_show_not_affected() static
        x86/srso: Fix build breakage with the LLVM linker
        Documentation/srso: Document IBPB aspect and fix formatting
        driver core: cpu: Unify redundant silly stubs
        Documentation/hw-vuln: Unify filename specification in index
      272b86ba
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-v6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd · f8de32cc
      Linus Torvalds authored
      Pull tpm irq fixes from Jarkko Sakkinen:
       "These change the probing and enabling of interrupts advertised by the
        platform firmware (i.e. ACPI, Device Tree) to be an opt-in for tpm_tis,
        which can be set from the kernel command-line.
      
        Note that the opt-in change is only for the PC MMIO tpm_tis module. It
        does not affect other similar drivers using IRQs, like tpm_tis_spi and
        synquacer"
      
      * tag 'tpmdd-v6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        tpm_tis: Opt-in interrupts
        tpm: tpm_tis: Fix UPX-i11 DMI_MATCH condition
      f8de32cc
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 9a20704f
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "A few small bugs:
      
         - Fix longstanding mlx5 bug where ODP would fail with certain MR
           alignments
      
         - cancel work to prevent a hfi1 UAF
      
         - MAINTAINERS update
      
         - UAF, missing mutex_init and an error unwind bug in bnxt_re"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/bnxt_re: Initialize dpi_tbl_lock mutex
        RDMA/bnxt_re: Fix error handling in probe failure path
        RDMA/bnxt_re: Properly order ib_device_unalloc() to avoid UAF
        MAINTAINERS: Remove maintainer of HiSilicon RoCE
        IB/hfi1: Fix possible panic during hotplug remove
        RDMA/umem: Set iova in ODP flow
      9a20704f
    • Linus Torvalds's avatar
      Merge tag 'zonefs-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 0725a704
      Linus Torvalds authored
      Pull zonefs fix from Damien Le Moal:
      
       - The switch to using iomap for executing a direct synchronous write to
         sequential files using a zone append BIO overlooked cases where the
         BIO built by iomap is too large and needs splitting, which is not
         allowed with zone append.
      
         Fix this by using regular write commands instead. The use of zone
         append commands will be reintroduced later with proper support from
         iomap.
      
      * tag 'zonefs-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: fix synchronous direct writes to sequential files
      0725a704
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v6.5-rc6' of... · 5512c33c
      Linus Torvalds authored
      Merge tag 'hwmon-for-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
      
       - Fix sporadic comunication errors in pmbus/bel-pfe and
         aquacomputer_d5next drivers
      
      * tag 'hwmon-for-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (aquacomputer_d5next) Add selective 200ms delay after sending ctrl report
        hwmon: (pmbus/bel-pfe) Enable PMBUS_SKIP_STATUS_CHECK for pfe1100
      5512c33c
  4. 11 Aug, 2023 18 commits
    • Jarkko Sakkinen's avatar
      tpm_tis: Opt-in interrupts · 6aaf663e
      Jarkko Sakkinen authored
      Cc: stable@vger.kernel.org # v6.4+
      Link: https://lore.kernel.org/linux-integrity/CAHk-=whRVp4h8uWOX1YO+Y99+44u4s=XxMK4v00B6F1mOfqPLg@mail.gmail.com/
      Fixes: e644b2f4 ("tpm, tpm_tis: Enable interrupt test")
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      6aaf663e
    • Peter Ujfalusi's avatar
      tpm: tpm_tis: Fix UPX-i11 DMI_MATCH condition · 51e5e551
      Peter Ujfalusi authored
      The patch which made it to the kernel somehow changed the
      match condition from
      DMI_MATCH(DMI_PRODUCT_NAME, "UPX-TGL01")
      to
      DMI_MATCH(DMI_PRODUCT_VERSION, "UPX-TGL")
      
      Revert back to the correct match condition to disable the
      interrupt mode on the board.
      
      Cc: stable@vger.kernel.org # v6.4+
      Fixes: edb13d7b ("tpm: tpm_tis: Disable interrupts *only* for AEON UPX-i11")
      Link: https://lore.kernel.org/lkml/20230524085844.11580-1-peter.ujfalusi@linux.intel.com/Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      51e5e551
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-08-11-13-44' of... · 190bf7b1
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-08-11-13-44' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "14 hotfixes. 11 of these are cc:stable and the remainder address
        post-6.4 issues, or are not considered suitable for -stable
        backporting"
      
      * tag 'mm-hotfixes-stable-2023-08-11-13-44' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/damon/core: initialize damo_filter->list from damos_new_filter()
        nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
        selftests: cgroup: fix test_kmem_basic false positives
        fs/proc/kcore: reinstate bounce buffer for KCORE_TEXT regions
        MAINTAINERS: add maple tree mailing list
        mm: compaction: fix endless looping over same migrate block
        selftests: mm: ksm: fix incorrect evaluation of parameter
        hugetlb: do not clear hugetlb dtor until allocating vmemmap
        mm: memory-failure: avoid false hwpoison page mapped error info
        mm: memory-failure: fix potential unexpected return value from unpoison_memory()
        mm/swapfile: fix wrong swap entry type for hwpoisoned swapcache page
        radix tree test suite: fix incorrect allocation size for pthreads
        crypto, cifs: fix error handling in extract_iter_to_sg()
        zsmalloc: fix races between modifications of fullness and isolated
      190bf7b1
    • Cristian Ciocaltea's avatar
      x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405 · 6dbef74a
      Cristian Ciocaltea authored
      Commit
      
        522b1d69 ("x86/cpu/amd: Add a Zenbleed fix")
      
      provided a fix for the Zen2 VZEROUPPER data corruption bug affecting
      a range of CPU models, but the AMD Custom APU 0405 found on SteamDeck
      was not listed, although it is clearly affected by the vulnerability.
      
      Add this CPU variant to the Zenbleed erratum list, in order to
      unconditionally enable the fallback fix until a proper microcode update
      is available.
      
      Fixes: 522b1d69 ("x86/cpu/amd: Add a Zenbleed fix")
      Signed-off-by: default avatarCristian Ciocaltea <cristian.ciocaltea@collabora.com>
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20230811203705.1699914-1-cristian.ciocaltea@collabora.com
      6dbef74a
    • William Breathitt Gray's avatar
      gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent · 33f83d13
      William Breathitt Gray authored
      The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA,
      which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the
      correct value of 11 so that access to necessary device registers is
      properly requested in the ws16c48_probe() callback by the
      devm_request_region() function call.
      
      Fixes: 2c05a0f2 ("gpio: ws16c48: Implement and utilize register structures")
      Cc: stable@vger.kernel.org
      Cc: Paul Demetrotion <pdemetrotion@winsystems.com>
      Signed-off-by: default avatarWilliam Breathitt Gray <william.gray@linaro.org>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
      33f83d13
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 29d99aae
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "Rework the handling of interrupt overrides on AMD Zen-based machines
        to avoid recently introduced regressions (Hans de Goede).
      
        Note that this is intended as a short-term mitigation for 6.5 and the
        long-term approach will be to attempt to use the configuration left by
        the BIOS, but it requires more investigation"
      
      * tag 'acpi-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: resource: Add IRQ override quirk for PCSpecialist Elimina Pro 16 M
        ACPI: resource: Honor MADT INT_SRC_OVR settings for IRQ1 on AMD Zen
        ACPI: resource: Always use MADT override IRQ settings for all legacy non i8042 IRQs
        ACPI: resource: revert "Remove "Zen" specific match and quirks"
      29d99aae
    • Linus Torvalds's avatar
      Merge tag 'pm-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 9578b04c
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix an amd-pstate cpufreq driver issues and recently introduced
        hibernation-related breakage.
      
        Specifics:
      
         - Make amd-pstate use device_attributes as expected by the CPU root
           kobject (Thomas Weißschuh)
      
         - Restore the previous behavior of resume_store() when hibernation is
           not available which is to return the full number of bytes that were
           to be written by user space (Vlastimil Babka)"
      
      * tag 'pm-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: amd-pstate: fix global sysfs attribute type
        PM: hibernate: fix resume_store() return value when hibernation not available
      9578b04c
    • Linus Torvalds's avatar
      Merge tag 'block-6.5-2023-08-11' of git://git.kernel.dk/linux · 360e6942
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Keith:
            - Fixes for request_queue state (Ming)
            - Another uuid quirk (August)
      
       - RCU poll fix for NVMe (Ming)
      
       - Fix for an IO stall with polled IO (me)
      
       - Fix for blk-iocost stats enable/disable accounting (Chengming)
      
       - Regression fix for large pages for zram (Christoph)
      
      * tag 'block-6.5-2023-08-11' of git://git.kernel.dk/linux:
        nvme: core: don't hold rcu read lock in nvme_ns_chr_uring_cmd_iopoll
        blk-iocost: fix queue stats accounting
        block: don't make REQ_POLLED imply REQ_NOWAIT
        block: get rid of unused plug->nowait flag
        zram: take device and not only bvec offset into account
        nvme-pci: add NVME_QUIRK_BOGUS_NID for Samsung PM9B1 256G and 512G
        nvme-rdma: fix potential unbalanced freeze & unfreeze
        nvme-tcp: fix potential unbalanced freeze & unfreeze
        nvme: fix possible hang when removing a controller during error recovery
      360e6942
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.5-2023-08-11' of git://git.kernel.dk/linux · 2e40ed24
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A followup fix for the parisc/SHM_COLOUR fix, also from Helge, which
        is heading to stable.
      
        And then just the io_uring equivalent of the RESOLVE_CACHED fix in
        commit a0fc452a from last week for build_open_flags()"
      
      * tag 'io_uring-6.5-2023-08-11' of git://git.kernel.dk/linux:
        io_uring/parisc: Adjust pgoff in io_uring mmap() for parisc
        io_uring: correct check for O_TMPFILE
      2e40ed24
    • Borislav Petkov (AMD)'s avatar
      driver core: cpu: Fix the fallback cpu_show_gds() name · 3477144c
      Borislav Petkov (AMD) authored
      In
      
        6524c798 ("driver core: cpu: Make cpu_show_not_affected() static")
      
      I fat-fingered the name of cpu_show_gds(). Usually, I'd rebase but since
      those are extraordinary embargoed times, the commit above was already
      pulled into another tree so no no.
      
      Therefore, fix it ontop.
      
      Fixes: 6524c798 ("driver core: cpu: Make cpu_show_not_affected() static")
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Link: https://lore.kernel.org/r/20230811095831.27513-1-bp@alien8.de
      3477144c
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 4778e128
      Rafael J. Wysocki authored
      Merge a cpufreq fix for 6.5-rc6.
      
      This makes amd-pstate use device_attributes as expected by the CPU root
      kobject.
      
      * pm-cpufreq:
        cpufreq: amd-pstate: fix global sysfs attribute type
      4778e128
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 9106536c
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Add Manivannan Sadhasivam as DesignWare PCIe driver co-maintainer
         (Krzysztof Wilczyński)
      
       - Revert "PCI: dwc: Wait for link up only if link is started" to fix a
         regression on Qualcomm platforms that don't reach interconnect sync
         state if the slot is empty (Johan Hovold)
      
       - Revert "PCI: mvebu: Mark driver as BROKEN" so people can use
         pci-mvebu even though some others report problems (Bjorn Helgaas)
      
       - Avoid a NULL pointer dereference when using acpiphp for root bus
         hotplug to fix a regression added in v6.5-rc1 (Igor Mammedov)
      
      * tag 'pci-v6.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
        Revert "PCI: mvebu: Mark driver as BROKEN"
        Revert "PCI: dwc: Wait for link up only if link is started"
        MAINTAINERS: Add Manivannan Sadhasivam as DesignWare PCIe driver maintainer
      9106536c
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 2a3c17ed
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - Fixes for a pair of kexec_file_load() failures
      
       - A fix to ensure the direct mapping is PMD-aligned
      
       - A fix for CPU feature detection on SMP=n
      
       - The MMIO ordering fences have been strengthened to ensure ordering
         WRT delay()
      
       - Fixes for a pair of -Wmissing-variable-declarations warnings
      
       - A fix to avoid PUD mappings in vmap on sv39
      
       - flush_cache_vmap() now flushes the TLB to avoid issues on systems
         that cache invalid mappings
      
      * tag 'riscv-for-linus-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Implement flush_cache_vmap()
        riscv: Do not allow vmap pud mappings for 3-level page table
        riscv: mm: fix 2 instances of -Wmissing-variable-declarations
        riscv,mmio: Fix readX()-to-delay() ordering
        riscv: Fix CPU feature detection with SMP disabled
        riscv: Start of DRAM should at least be aligned on PMD size for the direct mapping
        riscv/kexec: load initrd high in available memory
        riscv/kexec: handle R_RISCV_CALL_PLT relocation type
      2a3c17ed
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · feb0eee9
      Linus Torvalds authored
      Pull parisc architecture fixes from Helge Deller:
       "A bugfix in the LWS code, which used different lock words than the
        parisc lightweight spinlock checks. This inconsistency triggered false
        positives when the lightweight spinlock checks checked the locks of
        mutexes.
      
        The other patches are trivial cleanups and most of them fix sparse
        warnings.
      
        Summary:
      
         - Fix LWS code to use same lock words as for the parisc lightweight
           spinlocks
      
         - Use PTR_ERR_OR_ZERO() in pdt init code
      
         - Fix lots of sparse warnings"
      
      * tag 'parisc-for-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: perf: Make cpu_device variable static
        parisc: ftrace: Add declaration for ftrace_function_trampoline()
        parisc: boot: Nuke some sparse warnings in decompressor
        parisc: processor: Include asm/smp.h for init_per_cpu()
        parisc: unaligned: Include linux/sysctl.h for unaligned_enabled
        parisc: Move proc_mckinley_root and proc_runway_root to sba_iommu
        parisc: dma: Add prototype for pcxl_dma_start
        parisc: parisc_ksyms: Include libgcc.h for libgcc prototypes
        parisc: ucmpdi2: Fix no previous prototype for '__ucmpdi2' warning
        parisc: firmware: Mark pdc_result buffers local
        parisc: firmware: Fix sparse context imbalance warnings
        parisc: signal: Fix sparse incorrect type in assignment warning
        parisc: ioremap: Fix sparse warnings
        parisc: fault: Use C99 arrary initializers
        parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code
        parisc: Fix lightweight spinlock checks to not break futexes
      feb0eee9
    • Linus Torvalds's avatar
      Merge tag 'cpuidle-psci-v6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm · 2a5482c2
      Linus Torvalds authored
      Pull cpuidle psci fixes from Ulf Hansson:
       "A couple of cpuidle-psci fixes. Usually, this is managed by arm-soc
        maintainers or Rafael, although due to a busy period I have stepped in
        to help out:
      
         - Fix the error path to prevent reverting from OSI back to PC mode"
      
      * tag 'cpuidle-psci-v6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
        cpuidle: psci: Move enabling OSI mode after power domains creation
        cpuidle: dt_idle_genpd: Add helper function to remove genpd topology
      2a5482c2
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-08-11' of git://anongit.freedesktop.org/drm/drm · 9b1b1b74
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This week's fixes, as expected amdgpu is probably a little larger
        since it skipped a week, but otherwise a few nouveau fixes, a couple
        of bridge, rockchip and ivpu fixes.
      
        amdgpu:
         - S/G display workaround for platforms with >= 64G of memory
         - S0i3 fix
         - SMU 13.0.0 fixes
         - Disable SMU 13.x OD features temporarily while the interface is
           reworked to enable additional functionality
         - Fix cursor gamma issues on DCN3+
         - SMU 13.0.6 fixes
         - Fix possible UAF in CS IOCTL
         - Polaris display regression fix
         - Only enable CP GFX shadowing on SR-IOV
      
        amdkfd:
         - Raven/Picasso KFD regression fix
      
        bridge:
         - it6505: runtime PM fix
         - lt9611: revert Do not generate HFP/HBP/HSA and EOT packet
      
        nouveau:
         - enable global memory loads for helper invocations for userspace
           driver
         - dp 1.3 dpcd+ workaround fix
         - remove unused function
         - revert incorrect NULL check
      
        accel/ivpu:
         - Add set_pages_array_wc/uc for internal buffers
      
        rockchip:
         - Don't spam logs in atomic check"
      
      * tag 'drm-fixes-2023-08-11' of git://anongit.freedesktop.org/drm/drm: (23 commits)
        drm/shmem-helper: Reset vma->vm_ops before calling dma_buf_mmap()
        drm/amdkfd: disable IOMMUv2 support for Raven
        drm/amdkfd: disable IOMMUv2 support for KV/CZ
        drm/amdkfd: ignore crat by default
        drm/amdgpu/gfx11: only enable CP GFX shadowing on SR-IOV
        drm/amd/display: Fix a regression on Polaris cards
        drm/amdgpu: fix possible UAF in amdgpu_cs_pass1()
        drm/amd/pm: Fix SMU v13.0.6 energy reporting
        drm/amd/display: check attr flag before set cursor degamma on DCN3+
        drm/amd/pm: disable the SMU13 OD feature support temporarily
        drm/amd/pm: correct the pcie width for smu 13.0.0
        drm/amd/display: Don't show stack trace for missing eDP
        drm/amdgpu: Match against exact bootloader status
        drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11
        drm/amd: Disable S/G for APUs when 64GB or more host memory
        drm/rockchip: Don't spam logs in atomic check
        accel/ivpu: Add set_pages_array_wc/uc for internal buffers
        drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
        Revert "drm/bridge: lt9611: Do not generate HFP/HBP/HSA and EOT packet"
        drm/nouveau: remove unused tu102_gr_load() function
        ...
      9b1b1b74
    • Ming Lei's avatar
      nvme: core: don't hold rcu read lock in nvme_ns_chr_uring_cmd_iopoll · a7a7dabb
      Ming Lei authored
      Now nvme_ns_chr_uring_cmd_iopoll() has switched to request based io
      polling, and the associated NS is guaranteed to be live in case of
      io polling, so request is guaranteed to be valid because blk-mq uses
      pre-allocated request pool.
      
      Remove the rcu read lock in nvme_ns_chr_uring_cmd_iopoll(), which
      isn't needed any more after switching to request based io polling.
      
      Fix "BUG: sleeping function called from invalid context" because
      set_page_dirty_lock() from blk_rq_unmap_user() may sleep.
      
      Fixes: 585079b6 ("nvme: wire up async polling for io passthrough commands")
      Reported-by: default avatarGuangwu Zhang <guazhang@redhat.com>
      Cc: Kanchan Joshi <joshi.k@samsung.com>
      Cc: Anuj Gupta <anuj20.g@samsung.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Tested-by: default avatarGuangwu Zhang <guazhang@redhat.com>
      Link: https://lore.kernel.org/r/20230809020440.174682-1-ming.lei@redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      a7a7dabb
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.5-2023-08-09' of... · fbe8ff72
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.5-2023-08-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.5-2023-08-09:
      
      amdgpu:
      - S/G display workaround for platforms with >= 64G of memory
      - S0i3 fix
      - SMU 13.0.0 fixes
      - Disable SMU 13.x OD features temporarily while the interface is reworked
        to enable additional functionality
      - Fix cursor gamma issues on DCN3+
      - SMU 13.0.6 fixes
      - Fix possible UAF in CS IOCTL
      - Polaris display regression fix
      - Only enable CP GFX shadowing on SR-IOV
      
      amdkfd:
      - Raven/Picasso KFD regression fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230809182827.8135-1-alexander.deucher@amd.com
      fbe8ff72