1. 31 May, 2023 3 commits
    • Mirsad Goran Todorovac's avatar
      test_firmware: fix a memory leak with reqs buffer · be37bed7
      Mirsad Goran Todorovac authored
      Dan Carpenter spotted that test_fw_config->reqs will be leaked if
      trigger_batched_requests_store() is called two or more times.
      The same appears with trigger_batched_requests_async_store().
      
      This bug wasn't trigger by the tests, but observed by Dan's visual
      inspection of the code.
      
      The recommended workaround was to return -EBUSY if test_fw_config->reqs
      is already allocated.
      
      Fixes: 7feebfa4 ("test_firmware: add support for request_firmware_into_buf")
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Russ Weight <russell.h.weight@intel.com>
      Cc: Tianfei Zhang <tianfei.zhang@intel.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Colin Ian King <colin.i.king@gmail.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: linux-kselftest@vger.kernel.org
      Cc: stable@vger.kernel.org # v5.4
      Suggested-by: default avatarDan Carpenter <error27@gmail.com>
      Suggested-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarMirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
      Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Link: https://lore.kernel.org/r/20230509084746.48259-2-mirsad.todorovac@alu.unizg.hrSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      be37bed7
    • Mirsad Goran Todorovac's avatar
      test_firmware: prevent race conditions by a correct implementation of locking · 4acfe3df
      Mirsad Goran Todorovac authored
      Dan Carpenter spotted a race condition in a couple of situations like
      these in the test_firmware driver:
      
      static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg)
      {
              u8 val;
              int ret;
      
              ret = kstrtou8(buf, 10, &val);
              if (ret)
                      return ret;
      
              mutex_lock(&test_fw_mutex);
              *(u8 *)cfg = val;
              mutex_unlock(&test_fw_mutex);
      
              /* Always return full write size even if we didn't consume all */
              return size;
      }
      
      static ssize_t config_num_requests_store(struct device *dev,
                                               struct device_attribute *attr,
                                               const char *buf, size_t count)
      {
              int rc;
      
              mutex_lock(&test_fw_mutex);
              if (test_fw_config->reqs) {
                      pr_err("Must call release_all_firmware prior to changing config\n");
                      rc = -EINVAL;
                      mutex_unlock(&test_fw_mutex);
                      goto out;
              }
              mutex_unlock(&test_fw_mutex);
      
              rc = test_dev_config_update_u8(buf, count,
                                             &test_fw_config->num_requests);
      
      out:
              return rc;
      }
      
      static ssize_t config_read_fw_idx_store(struct device *dev,
                                              struct device_attribute *attr,
                                              const char *buf, size_t count)
      {
              return test_dev_config_update_u8(buf, count,
                                               &test_fw_config->read_fw_idx);
      }
      
      The function test_dev_config_update_u8() is called from both the locked
      and the unlocked context, function config_num_requests_store() and
      config_read_fw_idx_store() which can both be called asynchronously as
      they are driver's methods, while test_dev_config_update_u8() and siblings
      change their argument pointed to by u8 *cfg or similar pointer.
      
      To avoid deadlock on test_fw_mutex, the lock is dropped before calling
      test_dev_config_update_u8() and re-acquired within test_dev_config_update_u8()
      itself, but alas this creates a race condition.
      
      Having two locks wouldn't assure a race-proof mutual exclusion.
      
      This situation is best avoided by the introduction of a new, unlocked
      function __test_dev_config_update_u8() which can be called from the locked
      context and reducing test_dev_config_update_u8() to:
      
      static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg)
      {
              int ret;
      
              mutex_lock(&test_fw_mutex);
              ret = __test_dev_config_update_u8(buf, size, cfg);
              mutex_unlock(&test_fw_mutex);
      
              return ret;
      }
      
      doing the locking and calling the unlocked primitive, which enables both
      locked and unlocked versions without duplication of code.
      
      The similar approach was applied to all functions called from the locked
      and the unlocked context, which safely mitigates both deadlocks and race
      conditions in the driver.
      
      __test_dev_config_update_bool(), __test_dev_config_update_u8() and
      __test_dev_config_update_size_t() unlocked versions of the functions
      were introduced to be called from the locked contexts as a workaround
      without releasing the main driver's lock and thereof causing a race
      condition.
      
      The test_dev_config_update_bool(), test_dev_config_update_u8() and
      test_dev_config_update_size_t() locked versions of the functions
      are being called from driver methods without the unnecessary multiplying
      of the locking and unlocking code for each method, and complicating
      the code with saving of the return value across lock.
      
      Fixes: 7feebfa4 ("test_firmware: add support for request_firmware_into_buf")
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Russ Weight <russell.h.weight@intel.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Tianfei Zhang <tianfei.zhang@intel.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Colin Ian King <colin.i.king@gmail.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: linux-kselftest@vger.kernel.org
      Cc: stable@vger.kernel.org # v5.4
      Suggested-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarMirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
      Link: https://lore.kernel.org/r/20230509084746.48259-1-mirsad.todorovac@alu.unizg.hrSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4acfe3df
    • Dan Carpenter's avatar
      firmware_loader: Fix a NULL vs IS_ERR() check · ffa28312
      Dan Carpenter authored
      The crypto_alloc_shash() function doesn't return NULL, it returns
      error pointers.  Update the check accordingly.
      
      Fixes: 02fe26f2 ("firmware_loader: Add debug message with checksum for FW file")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Reviewed-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
      Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Link: https://lore.kernel.org/r/36ef6042-ce74-4e8e-9e2c-5b5c28940610@kili.mountainSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ffa28312
  2. 30 May, 2023 3 commits
  3. 29 May, 2023 4 commits
  4. 28 May, 2023 9 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-fixes-for-6.4a' of... · bca7a463
      Greg Kroah-Hartman authored
      Merge tag 'iio-fixes-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus
      
      Jonathan writes:
      
      1st set of IIO fixes for the 6.4 cycle.
      
      Usual mixed bag of issues in new code for this cycle and old issues
      that have surfaced in the last few weeks.
      
      - adi,ad_sigma_delta
        * Ensure irq lazy disable handing is not used as it breaks completion
          detection.
      - adi,ad4130
        * Fix failure to remove clock provider.
      - adi,ad5758
        * Wrong CONFIG variable used to control driver build.
      - adi,ad7192
        * Fix repeated channel index by just expressing shorted channels
          as differential channel between a channel and itself.
      - adi,ad74413
        * Fix error handling for resistance input processing to not fail
          in case of success.
      - rohm,bu27034
        * Fix integration time in wrong units (should be seconds not usecs)
        * Ensure reset is actually written not detected as already set from
          regcache.
      - gts helper
        * Fix wrong parameter docs.
        * Fix integration time in wrong units (should be seconds not usecs)
      - fsl,imx8qxp-adc
        * Add missing vref-supply to binding doc (already used by driver)
      - fsl,imx93
        * Fix sign bug in read_raw() so that error check didn't work.
      - inv,icm42600
        * Fix reset of timestamp to work even if a particular sensor is off when
          the chip is first enabled.
      - kionix,kx022a
        * Fix irq get form fw node to not include the 0 value.
      - microchip,mcp4725
        * Fix return value from i2c_master_send() handling to nto assume 0 on
          success.
      - mediatek,mt6370
        * Fix incorrect scaling of a few currents on devices with particular
          vendor IDs.
      - fsl,mxs-lradc
        * Cleanup ordering issue fix.
      - renesas,rcar-adc bindings
        * Fix missing vendor prefix for adi,ad7476
      - st,st_accel
        * Fix handling when no ACPI _ONT method present.
      - st,stm32-adc
        * Handle no adc-diff-channel present case (all single ended)
        * Handle no adc-channels present case (all differential)
      - ti,palmas
        * Fix off by one bug that could allow out of bounds read if callers
          provided wrong value.
      - ti,tmag5273
        * Fix a runtime PM leak on measurement error
      - vishay,vcnl4035
        * Correctly mask chip ID so devices with different addresses
          don't fail the test.
      
      * tag 'iio-fixes-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (23 commits)
        iio: imu: inv_icm42600: fix timestamp reset
        iio: adc: ad_sigma_delta: Fix IRQ issue by setting IRQ_DISABLE_UNLAZY flag
        dt-bindings: iio: adc: renesas,rcar-gyroadc: Fix adi,ad7476 compatible value
        iio: dac: mcp4725: Fix i2c_master_send() return value handling
        iio: accel: kx022a fix irq getting
        iio: bu27034: Ensure reset is written
        iio: dac: build ad5758 driver when AD5758 is selected
        iio: addac: ad74413: fix resistance input processing
        iio: light: vcnl4035: fixed chip ID check
        dt-bindings: iio: imx8qxp-adc: add missing vref-supply
        iio: adc: stm32-adc: skip adc-channels setup if none is present
        iio: adc: stm32-adc: skip adc-diff-channels setup if none is present
        iio: adc: ad7192: Change "shorted" channels to differential
        iio: accel: st_accel: Fix invalid mount_matrix on devices without ACPI _ONT method
        iio: gts-helpers: fix integration time units
        iio: bu27034: Fix integration time
        iio: fix doc for iio_gts_find_sel_by_int_time
        iio: adc: palmas: fix off by one bugs
        iio: adc: mxs-lradc: fix the order of two cleanup operations
        iio: ad4130: Make sure clock provider gets removed
        ...
      bca7a463
    • Linus Torvalds's avatar
      Linux 6.4-rc4 · 7877cb91
      Linus Torvalds authored
      7877cb91
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f8b2507c
      Linus Torvalds authored
      Pull x86 cpu fix from Thomas Gleixner:
       "A single fix for x86:
      
         - Prevent a bogus setting for the number of HT siblings, which is
           caused by the CPUID evaluation trainwreck of X86. That recomputes
           the value for each CPU, so the last CPU "wins". That can cause
           completely bogus sibling values"
      
      * tag 'x86-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
      f8b2507c
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2d5438f4
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A small set of perf fixes:
      
         - Make the MSR-readout based CHA discovery work around broken
           discovery tables in some SPR firmwares.
      
         - Prevent saving PEBS configuration which has software bits set that
           cause a crash when restored into the relevant MSR"
      
      * tag 'perf-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/uncore: Correct the number of CHAs on SPR
        perf/x86/intel: Save/restore cpuc->active_pebs_data_cfg when using guest PEBS
      2d5438f4
    • Linus Torvalds's avatar
      Merge tag 'objtool-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · abbf7fa1
      Linus Torvalds authored
      Pull unwinder fixes from Thomas Gleixner:
       "A set of unwinder and tooling fixes:
      
         - Ensure that the stack pointer on x86 is aligned again so that the
           unwinder does not read past the end of the stack
      
         - Discard .note.gnu.property section which has a pointlessly
           different alignment than the other note sections. That confuses
           tooling of all sorts including readelf, libbpf and pahole"
      
      * tag 'objtool-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
        vmlinux.lds.h: Discard .note.gnu.property section
      abbf7fa1
    • Linus Torvalds's avatar
      Merge tag 'core-debugobjects-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d8f14b84
      Linus Torvalds authored
      Pull debugobjects fixes from Thomas Gleixner:
       "Two fixes for debugobjects:
      
         - Prevent the allocation path from waking up kswapd.
      
           That's a long standing issue due to the GFP_ATOMIC allocation flag.
           As debug objects can be invoked from pretty much any context waking
           kswapd can end up in arbitrary lock chains versus the waitqueue
           lock
      
         - Correct the explicit lockdep wait-type violation in
           debug_object_fill_pool()"
      
      * tag 'core-debugobjects-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        debugobjects: Don't wake up kswapd from fill_pool()
        debugobjects,locking: Annotate debug_object_fill_pool() wait type violation
      d8f14b84
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9bd5386c
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A set of fixes for interrupt chip drivers:
      
         - Prevent loss of state in the MIPS GIC interrupt controller
      
         - Disable pseudo NMIs on Mediatek based Chromebooks as they have
           firmware issues which cause instantenous chrashes and freezes wen
           pseudo NMIs are used
      
         - Fix the error handling path in the MBIGEN driver and a defined but
           not used warning in the meson-gpio interrupt chip driver"
      
      * tag 'irq-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/mbigen: Unify the error handling in mbigen_of_create_domain()
        irqchip/meson-gpio: Mark OF related data as maybe unused
        irqchip/mips-gic: Use raw spinlock for gic_lock
        irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
        irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues
        dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW
      9bd5386c
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes_6.4_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 045049cb
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fixes to get alchemy platform back in shape
      
       - fix for initrd detection
      
      * tag 'mips-fixes_6.4_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        mips: Move initrd_start check after initrd address sanitisation.
        MIPS: Alchemy: fix dbdma2
        MIPS: Restore Au1300 support
        MIPS: unhide PATA_PLATFORM
      045049cb
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 41683902
      Linus Torvalds authored
      Pull powerpc fix from Michael Ellerman:
      
       - Reinstate ARCH_FORCE_MAX_ORDER ranges to fix various breakage
      
      * tag 'powerpc-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/mm: Reinstate ARCH_FORCE_MAX_ORDER ranges
      41683902
  5. 27 May, 2023 3 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 4e893b5a
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - a double free fix in the Xen pvcalls backend driver
      
       - a fix for a regression causing the MSI related sysfs entries to not
         being created in Xen PV guests
      
       - a fix in the Xen blkfront driver for handling insane input data
         better
      
      * tag 'for-linus-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        x86/pci/xen: populate MSI sysfs entries
        xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
        xen/blkfront: Only check REQ_FUA for writes
      4e893b5a
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 957f3f8e
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are some small driver fixes for 6.4-rc4. They are just two
        different types:
      
         - binder fixes and reverts for reported problems and regressions in
           the binder "driver".
      
         - coresight driver fixes for reported problems.
      
        All of these have been in linux-next for over a week with no reported
        problems"
      
      * tag 'char-misc-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        binder: fix UAF of alloc->vma in race with munmap()
        binder: add lockless binder_alloc_(set|get)_vma()
        Revert "android: binder: stop saving a pointer to the VMA"
        Revert "binder_alloc: add missing mmap_lock calls when using the VMA"
        binder: fix UAF caused by faulty buffer cleanup
        coresight: perf: Release Coresight path when alloc trace id failed
        coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet()
      957f3f8e
    • Linus Torvalds's avatar
      Merge tag 'cxl-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · 49572d53
      Linus Torvalds authored
      Pull compute express link fixes from Dan Williams:
       "The 'media ready' series prevents the driver from acting on bad
        capacity information, and it moves some checks earlier in the init
        sequence which impacts topics in the queue for 6.5.
      
        Additional hotplug testing uncovered a missing enable for memory
        decode. A debug crash fix is also included.
      
        Summary:
      
         - Stop trusting capacity data before the "media ready" indication
      
         - Add missing HDM decoder capability enable for the cold-plug case
      
         - Fix a debug message induced crash"
      
      * tag 'cxl-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
        cxl: Explicitly initialize resources when media is not ready
        cxl/port: Fix NULL pointer access in devm_cxl_add_port()
        cxl: Move cxl_await_media_ready() to before capacity info retrieval
        cxl: Wait Memory_Info_Valid before access memory related info
        cxl/port: Enable the HDM decoder capability for switch ports
      49572d53
  6. 26 May, 2023 18 commits
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 18713e8a
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There have not been a lot of fixes for for the soc tree in 6.4, but
        these have been sitting here for too long.
      
        For the devicetree side, there is one minor warning fix for vexpress,
        the rest all all for the the NXP i.MX platforms: SoC specific bugfixes
        for the iMX8 clocks and its USB-3.0 gadget device, as well as board
        specific fixes for regulators and the phy on some of the i.MX boards.
      
        The microchip risc-v and arm32 maintainers now also add a shared
        maintainer file entry for the arm64 parts.
      
        The remaining fixes are all for firmware drivers, addressing mistakes
        in the optee, scmi and ff-a firmware driver implementation, mostly in
        the error handling code, incorrect use of the alloc_workqueue()
        interface in SCMI, and compatibility with corner cases of the firmware
        implementation"
      
      * tag 'arm-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        MAINTAINERS: update arm64 Microchip entries
        arm64: dts: imx8: fix USB 3.0 Gadget Failure in QM & QXPB0 at super speed
        dt-binding: cdns,usb3: Fix cdns,on-chip-buff-size type
        arm64: dts: colibri-imx8x: delete adc1 and dsp
        arm64: dts: colibri-imx8x: fix iris pinctrl configuration
        arm64: dts: colibri-imx8x: move pinctrl property from SoM to eval board
        arm64: dts: colibri-imx8x: fix eval board pin configuration
        arm64: dts: imx8mp: Fix video clock parents
        ARM: dts: imx6qdl-mba6: Add missing pvcie-supply regulator
        ARM: dts: imx6ull-dhcor: Set and limit the mode for PMIC buck 1, 2 and 3
        arm64: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay
        arm64: dts: imx8mn: Fix video clock parents
        firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors
        firmware: arm_ffa: Fix FFA device names for logical partitions
        firmware: arm_ffa: Fix usage of partition info get count flag
        firmware: arm_ffa: Check if ffa_driver remove is present before executing
        arm64: dts: arm: add missing cache properties
        ARM: dts: vexpress: add missing cache properties
        firmware: arm_scmi: Fix incorrect alloc_workqueue() invocation
        optee: fix uninited async notif value
      18713e8a
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 96f15fc6
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
      
       - Quirk Ice Lake Root Ports to work around DPC log size issue (Mika
         Westerberg)
      
      * tag 'pci-v6.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports
      96f15fc6
    • Linus Torvalds's avatar
      Merge tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio · 8846af75
      Linus Torvalds authored
      Pull VFIO fix from Alex Williamson:
      
       - Test for and return error for invalid pfns through the pin pages
         interface (Yan Zhao)
      
      * tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio:
        vfio/type1: check pfn valid before converting to struct page
      8846af75
    • Linus Torvalds's avatar
      Merge tag 'block-6.4-2023-05-26' of git://git.kernel.dk/linux · a92c9ab6
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes for the storage side of things:
      
         - Fix bio caching condition for passthrough IO (Anuj)
      
         - end-of-device check fix for zero sized devices (Christoph)
      
         - Update Paolo's email address
      
         - NVMe pull request via Keith with a single quirk addition
      
         - Fix regression in how wbt enablement is done (Yu)
      
         - Fix race in active queue accounting (Tian)"
      
      * tag 'block-6.4-2023-05-26' of git://git.kernel.dk/linux:
        NVMe: Add MAXIO 1602 to bogus nid list.
        block: make bio_check_eod work for zero sized devices
        block: fix bio-cache for passthru IO
        block, bfq: update Paolo's address in maintainer list
        blk-mq: fix race condition in active queue accounting
        blk-wbt: fix that wbt can't be disabled by default
      a92c9ab6
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux · 6fae9129
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Just a single fix for the conditional schedule with the SQPOLL thread,
        dropping the uring_lock if we do need to reschedule"
      
      * tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux:
        io_uring: unlock sqd->lock before sq thread release CPU
      6fae9129
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 77af1f2b
      Linus Torvalds authored
      Pull thermal control fix from Rafael Wysocki:
       "Fix a regression introduced inadvertently during the 6.3 cycle by a
        commit making the Intel int340x thermal driver use sysfs_emit_at()
        instead of scnprintf() (Srinivas Pandruvada)"
      
      * tag 'thermal-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel: int340x: Add new line for UUID display
      77af1f2b
    • Linus Torvalds's avatar
      Merge tag 'pm-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c551afcd
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Fix three issues related to the ->fast_switch callback in the AMD
        P-state cpufreq driver (Gautham R. Shenoy and Wyes Karny)"
      
      * tag 'pm-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: amd-pstate: Update policy->cur in amd_pstate_adjust_perf()
        cpufreq: amd-pstate: Remove fast_switch_possible flag from active driver
        cpufreq: amd-pstate: Add ->fast_switch() callback
      c551afcd
    • Dave Jiang's avatar
      cxl: Explicitly initialize resources when media is not ready · 793a539a
      Dave Jiang authored
      When media is not ready do not assume that the capacity information from
      the identify command is valid, i.e. ->total_bytes
      ->partition_align_bytes ->{volatile,persistent}_only_bytes. Explicitly
      zero out the capacity resources and exit early.
      
      Given zero-init of those fields this patch is functionally equivalent to
      the prior state, but it improves readability and robustness going
      forward.
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Link: https://lore.kernel.org/r/168506118166.3004974.13523455340007852589.stgit@djiang5-mobl3Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      793a539a
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 91a30434
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix incorrect output in in-tree gpio tools
      
       - fix a shell coding issue in gpio-sim selftests
      
       - correctly set the permissions for debugfs attributes exposed by
         gpio-mockup
      
       - fix chip name and pin count in gpio-f7188x for one of the supported
         models
      
       - fix numberspace pollution when using dynamically and statically
         allocated GPIOs together
      
      * tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio-f7188x: fix chip name and pin count on Nuvoton chip
        gpiolib: fix allocation of mixed dynamic/static GPIOs
        gpio: mockup: Fix mode of debugfs files
        selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change
        tools: gpio: fix debounce_period_us output of lsgpio
      91a30434
    • Linus Torvalds's avatar
      Merge tag 'for-6.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · b158dd94
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - handle memory allocation error in checksumming helper (reported by
         syzbot)
      
       - fix lockdep splat when aborting a transaction, add NOFS protection
         around invalidate_inode_pages2 that could allocate with GFP_KERNEL
      
       - reduce chances to hit an ENOSPC during scrub with RAID56 profiles
      
      * tag 'for-6.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: use nofs when cleaning up aborted transactions
        btrfs: handle memory allocation failure in btrfs_csum_one_bio
        btrfs: scrub: try harder to mark RAID56 block groups read-only
      b158dd94
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-05-26' of git://anongit.freedesktop.org/drm/drm · b83ac44e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This week's collection is pretty spread out, accel/qaic has a bunch of
        fixes, amdgpu, then lots of single fixes across a bunch of places.
      
        core:
         - fix drmm_mutex_init lock class
      
        mgag200:
         - fix gamma lut initialisation
      
        pl111:
         - fix FB depth on IMPD-1 framebuffer
      
        amdgpu:
         - Fix missing BO unlocking in KIQ error path
         - Avoid spurious secure display error messages
         - SMU13 fix
         - Fix an OD regression
         - GPU reset display IRQ warning fix
         - MST fix
      
        radeon:
         - Fix a DP regression
      
        i915:
         - PIPEDMC disabling fix for bigjoiner config
      
        panel:
         - fix aya neo air plus quirk
      
        sched:
         - remove redundant NULL check
      
        qaic:
         - fix NNC message corruption
         - Grab ch_lock during QAIC_ATTACH_SLICE_BO
         - Flush the transfer list again
         - Validate if BO is sliced before slicing
         - Validate user data before grabbing any lock
         - initialize ret variable to 0
         - silence some uninitialized variable warnings"
      
      * tag 'drm-fixes-2023-05-26' of git://anongit.freedesktop.org/drm/drm:
        drm/amd/display: Have Payload Properly Created After Resume
        drm/amd/display: Fix warning in disabling vblank irq
        drm/amd/pm: Fix output of pp_od_clk_voltage
        drm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7
        drm/radeon: reintroduce radeon_dp_work_func content
        drm/amdgpu: don't enable secure display on incompatible platforms
        drm:amd:amdgpu: Fix missing buffer object unlock in failure path
        accel/qaic: Fix NNC message corruption
        accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO
        accel/qaic: Flush the transfer list again
        accel/qaic: Validate if BO is sliced before slicing
        accel/qaic: Validate user data before grabbing any lock
        accel/qaic: initialize ret variable to 0
        drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration
        drm: fix drmm_mutex_init()
        drm/sched: Remove redundant check
        drm: panel-orientation-quirks: Change Air's quirk to support Air Plus
        accel/qaic: silence some uninitialized variable warnings
        drm/pl111: Fix FB depth on IMPD-1 framebuffer
        drm/mgag200: Fix gamma lut not initialized.
      b83ac44e
    • Linus Torvalds's avatar
      x86: re-introduce support for ERMS copies for user space accesses · 47ee3f1d
      Linus Torvalds authored
      I tried to streamline our user memory copy code fairly aggressively in
      commit adfcf423 ("x86: don't use REP_GOOD or ERMS for user memory
      copies"), in order to then be able to clean up the code and inline the
      modern FSRM case in commit 577e6a7f ("x86: inline the 'rep movs' in
      user copies for the FSRM case").
      
      We had reports [1] of that causing regressions earlier with blogbench,
      but that turned out to be a horrible benchmark for that case, and not a
      sufficient reason for re-instating "rep movsb" on older machines.
      
      However, now Eric Dumazet reported [2] a regression in performance that
      seems to be a rather more real benchmark, where due to the removal of
      "rep movs" a TCP stream over a 100Gbps network no longer reaches line
      speed.
      
      And it turns out that with the simplified the calling convention for the
      non-FSRM case in commit 427fda2c ("x86: improve on the non-rep
      'copy_user' function"), re-introducing the ERMS case is actually fairly
      simple.
      
      Of course, that "fairly simple" is glossing over several missteps due to
      having to fight our assembler alternative code.  This code really wanted
      to rewrite a conditional branch to have two different targets, but that
      made objtool sufficiently unhappy that this instead just ended up doing
      a choice between "jump to the unrolled loop, or use 'rep movsb'
      directly".
      
      Let's see if somebody finds a case where the kernel memory copies also
      care (see commit 68674f94: "x86: don't use REP_GOOD or ERMS for
      small memory copies").  But Eric does argue that the user copies are
      special because networking tries to copy up to 32KB at a time, if
      order-3 pages allocations are possible.
      
      In-kernel memory copies are typically small, unless they are the special
      "copy pages at a time" kind that still use "rep movs".
      
      Link: https://lore.kernel.org/lkml/202305041446.71d46724-yujie.liu@intel.com/ [1]
      Link: https://lore.kernel.org/lkml/CANn89iKUbyrJ=r2+_kK+sb2ZSSHifFZ7QkPLDpAtkJ8v4WUumA@mail.gmail.com/ [2]
      Reported-and-tested-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: adfcf423 ("x86: don't use REP_GOOD or ERMS for user memory copies")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      47ee3f1d
    • Jens Axboe's avatar
      Merge tag 'nvme-6.4-2023-05-26' of git://git.infradead.org/nvme into block-6.4 · 9491d01f
      Jens Axboe authored
      Pull NVMe fix from Keith:
      
      "nvme fixes for 6.4
      
       One nvme quirk (Tatsuki)"
      
      * tag 'nvme-6.4-2023-05-26' of git://git.infradead.org/nvme:
        NVMe: Add MAXIO 1602 to bogus nid list.
      9491d01f
    • Tatsuki Sugiura's avatar
      NVMe: Add MAXIO 1602 to bogus nid list. · a3a9d63d
      Tatsuki Sugiura authored
      HIKSEMI FUTURE M.2 SSD uses the same dummy nguid and eui64.
      I confirmed it with my two devices.
      
      This patch marks the controller as NVME_QUIRK_BOGUS_NID.
      
      ---------------------------------------------------------
      sugi@tempest:~% sudo nvme id-ctrl /dev/nvme0
      NVME Identify Controller:
      vid       : 0x1e4b
      ssvid     : 0x1e4b
      sn        : 30096022612
      mn        : HS-SSD-FUTURE 2048G
      fr        : SN10542
      rab       : 0
      ieee      : 000000
      cmic      : 0
      mdts      : 7
      cntlid    : 0
      ver       : 0x10400
      rtd3r     : 0x7a120
      rtd3e     : 0x1e8480
      oaes      : 0x200
      ctratt    : 0x2
      rrls      : 0
      cntrltype : 1
      fguid     : 00000000-0000-0000-0000-000000000000
      <snip...>
      ---------------------------------------------------------
      
      ---------------------------------------------------------
      sugi@tempest:~% sudo nvme id-ns /dev/nvme0n1
      NVME Identify Namespace 1:
      <snip...>
      nguid   : 00000000000000000000000000000000
      eui64   : 0000000000000002
      lbaf  0 : ms:0   lbads:9  rp:0 (in use)
      ---------------------------------------------------------
      Signed-off-by: default avatarTatsuki Sugiura <sugi@nemui.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      a3a9d63d
    • Arnd Bergmann's avatar
      Merge tag 'ffa-fixes-6.4' of... · abf5422e
      Arnd Bergmann authored
      Merge tag 'ffa-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes
      
      Arm FF-A fixes for v6.4
      
      Quite a few fixes to address set of assorted issues:
      1. NULL pointer dereference if the ffa driver doesn't provide remove()
         callback as it is currently executed unconditionally
      2. FF-A core probe failure on systems with v1.0 firmware as the new
         partition info get count flag is used unconditionally
      3. Failure to register more than one logical partition or service within
         the same physical partition as the device name contains only VM ID
         which will be same for all but each will have unique UUID.
      4. Rejection of certain memory interface transmissions by the receivers
         (secure partitions) as few MBZ fields are non-zero due to lack of
         explicit re-initialization of those fields
      
      * tag 'ffa-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
        firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors
        firmware: arm_ffa: Fix FFA device names for logical partitions
        firmware: arm_ffa: Fix usage of partition info get count flag
        firmware: arm_ffa: Check if ffa_driver remove is present before executing
      
      Link: https://lore.kernel.org/r/20230509143453.1188753-1-sudeep.holla@arm.comSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      abf5422e
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2023-05-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 5502d1fa
      Dave Airlie authored
      drm-misc-fixes for v6.4-rc4:
      - A few non-trivial fixes to qaic.
      - Fix drmm_mutex_init always using same lock class.
      - Fix pl111 fb depth.
      - Fix uninitialised gamma lut in mgag200.
      - Add Aya Neo Air Plus quirk.
      - Trivial null check removal in scheduler.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/d19f748c-2c5b-8140-5b05-a8282dfef73e@linux.intel.com
      5502d1fa
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.4-2023-05-24' of... · 13aa38f8
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.4-2023-05-24' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.4-2023-05-24:
      
      amdgpu:
      - Fix missing BO unlocking in KIQ error path
      - Avoid spurious secure display error messages
      - SMU13 fix
      - Fix an OD regression
      - GPU reset display IRQ warning fix
      - MST fix
      
      radeon:
      - Fix a DP regression
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230524211238.7749-1-alexander.deucher@amd.com
      13aa38f8
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2023-05-25' of... · 94d39d01
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2023-05-25' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      PIPEDMC disabling fix for bigjoiner config
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/ZG9aROGyc947/J1l@jlahtine-mobl.ger.corp.intel.com
      94d39d01