Skip to content
  1. Sep 10, 2023
    • Linus Torvalds's avatar
      Merge tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · fd3a5940
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - six smb3 client fixes including ones to allow controlling smb3
         directory caching timeout and limits, and one debugging improvement
      
       - one fix for nls Kconfig (don't need to expose NLS_UCS2_UTILS option)
      
       - one minor spnego registry update
      
      * tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        spnego: add missing OID to oid registry
        smb3: fix minor typo in SMB2_GLOBAL_CAP_LARGE_MTU
        cifs: update internal module version number for cifs.ko
        smb3: allow controlling maximum number of cached directories
        smb3: add trace point for queryfs (statfs)
        nls: Hide new NLS_UCS2_UTILS
        smb3: allow controlling length of time directory entries are cached with dir leases
        smb: propagate error code of extract_sharename()
      fd3a5940
    • David Howells's avatar
      iov_iter: Kunit tests for page extraction · a3c57ab7
      David Howells authored
      
      
      Add some kunit tests for page extraction for ITER_BVEC, ITER_KVEC and
      ITER_XARRAY type iterators.  ITER_UBUF and ITER_IOVEC aren't dealt with
      as they require userspace VM interaction.  ITER_DISCARD isn't dealt with
      either as that can't be extracted.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a3c57ab7
    • David Howells's avatar
      iov_iter: Kunit tests for copying to/from an iterator · 2d71340f
      David Howells authored
      
      
      Add some kunit tests for page extraction for ITER_BVEC, ITER_KVEC and
      ITER_XARRAY type iterators.  ITER_UBUF and ITER_IOVEC aren't dealt with
      as they require userspace VM interaction.  ITER_DISCARD isn't dealt with
      either as that does nothing.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2d71340f
    • David Howells's avatar
      iov_iter: Fix iov_iter_extract_pages() with zero-sized entries · f741bd71
      David Howells authored
      iov_iter_extract_pages() doesn't correctly handle skipping over initial
      zero-length entries in ITER_KVEC and ITER_BVEC-type iterators.
      
      The problem is that it accidentally reduces maxsize to 0 when it
      skipping and thus runs to the end of the array and returns 0.
      
      Fix this by sticking the calculated size-to-copy in a new variable
      rather than back in maxsize.
      
      Fixes: 7d58fe73
      
       ("iov_iter: Add a function to extract a page list from an iterator")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f741bd71
    • Linus Torvalds's avatar
      Merge tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux · 6b8bb5b8
      Linus Torvalds authored
      Pull sh updates from Adrian Glaubitz:
      
       - Fix a use-after-free bug in the push-switch driver (Duoming Zhou)
      
       - Fix calls to dma_declare_coherent_memory() that incorrectly passed
         the buffer end address instead of the buffer size as the size
         parameter
      
      * tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
        sh: push-switch: Reorder cleanup operations to avoid use-after-free bug
        sh: boards: Fix CEU buffer size passed to dma_declare_coherent_memory()
      6b8bb5b8
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.6-mw2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 1b37a0a2
      Linus Torvalds authored
      Pull more RISC-V updates from Palmer Dabbelt:
      
       - The kernel now dynamically probes for misaligned access speed, as
         opposed to relying on a table of known implementations.
      
       - Support for non-coherent devices on systems using the Andes AX45MP
         core, including the RZ/Five SoCs.
      
       - Support for the V extension in ptrace(), again.
      
       - Support for KASLR.
      
       - Support for the BPF prog pack allocator in RISC-V.
      
       - A handful of bug fixes and cleanups.
      
      * tag 'riscv-for-linus-6.6-mw2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (25 commits)
        soc: renesas: Kconfig: For ARCH_R9A07G043 select the required configs if dependencies are met
        riscv: Kconfig.errata: Add dependency for RISCV_SBI in ERRATA_ANDES config
        riscv: Kconfig.errata: Drop dependency for MMU in ERRATA_ANDES_CMO config
        riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled
        bpf, riscv: use prog pack allocator in the BPF JIT
        riscv: implement a memset like function for text
        riscv: extend patch_text_nosync() for multiple pages
        bpf: make bpf_prog_pack allocator portable
        riscv: libstub: Implement KASLR by using generic functions
        libstub: Fix compilation warning for rv32
        arm64: libstub: Move KASLR handling functions to kaslr.c
        riscv: Dump out kernel offset information on panic
        riscv: Introduce virtual kernel mapping KASLR
        RISC-V: Add ptrace support for vectors
        soc: renesas: Kconfig: Select the required configs for RZ/Five SoC
        cache: Add L2 cache management for Andes AX45MP RISC-V core
        dt-bindings: cache: andestech,ax45mp-cache: Add DT binding documentation for L2 cache controller
        riscv: mm: dma-noncoherent: nonstandard cache operations support
        riscv: errata: Add Andes alternative ports
        riscv: asm: vendorid_list: Add Andes Technology to the vendors list
        ...
      1b37a0a2
    • Duoming Zhou's avatar
      sh: push-switch: Reorder cleanup operations to avoid use-after-free bug · 246f80a0
      Duoming Zhou authored
      The original code puts flush_work() before timer_shutdown_sync()
      in switch_drv_remove(). Although we use flush_work() to stop
      the worker, it could be rescheduled in switch_timer(). As a result,
      a use-after-free bug can occur. The details are shown below:
      
            (cpu 0)                    |      (cpu 1)
      switch_drv_remove()              |
       flush_work()                    |
        ...                            |  switch_timer // timer
                                       |   schedule_work(&psw->work)
       timer_shutdown_sync()           |
       ...                             |  switch_work_handler // worker
       kfree(psw) // free              |
                                       |   psw->state = 0 // use
      
      This patch puts timer_shutdown_sync() before flush_work() to
      mitigate the bugs. As a result, the worker and timer will be
      stopped safely before the deallocate operations.
      
      Fixes: 9f5e8eee
      
       ("sh: generic push-switch framework.")
      Signed-off-by: default avatarDuoming Zhou <duoming@zju.edu.cn>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Link: https://lore.kernel.org/r/20230802033737.9738-1-duoming@zju.edu.cn
      
      
      Signed-off-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      246f80a0
    • Petr Tesarik's avatar
      sh: boards: Fix CEU buffer size passed to dma_declare_coherent_memory() · fb60211f
      Petr Tesarik authored
      In all these cases, the last argument to dma_declare_coherent_memory() is
      the buffer end address, but the expected value should be the size of the
      reserved region.
      
      Fixes: 39fb9930 ("media: arch: sh: ap325rxa: Use new renesas-ceu camera driver")
      Fixes: c2f9b05f ("media: arch: sh: ecovec: Use new renesas-ceu camera driver")
      Fixes: f3590dc3 ("media: arch: sh: kfr2r09: Use new renesas-ceu camera driver")
      Fixes: 186c446f ("media: arch: sh: migor: Use new renesas-ceu camera driver")
      Fixes: 1a3c230b
      
       ("media: arch: sh: ms7724se: Use new renesas-ceu camera driver")
      Signed-off-by: default avatarPetr Tesarik <petr.tesarik.ext@huawei.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarJacopo Mondi <jacopo.mondi@ideasonboard.com>
      Reviewed-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Link: https://lore.kernel.org/r/20230724120742.2187-1-petrtesarik@huaweicloud.com
      
      
      Signed-off-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      fb60211f
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 2a5a4326
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "Mostly small stragglers that missed the initial merge.
      
        Driver updates are qla2xxx and smartpqi (mp3sas has a high diffstat
        due to the volatile qualifier removal, fnic due to unused function
        removal and sd.c has a lot of code shuffling to remove forward
        declarations)"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (38 commits)
        scsi: ufs: core: No need to update UPIU.header.flags and lun in advanced RPMB handler
        scsi: ufs: core: Add advanced RPMB support where UFSHCI 4.0 does not support EHS length in UTRD
        scsi: mpt3sas: Remove volatile qualifier
        scsi: mpt3sas: Perform additional retries if doorbell read returns 0
        scsi: libsas: Simplify sas_queue_reset() and remove unused code
        scsi: ufs: Fix the build for the old ARM OABI
        scsi: qla2xxx: Fix unused variable warning in qla2xxx_process_purls_pkt()
        scsi: fnic: Remove unused functions fnic_scsi_host_start/end_tag()
        scsi: qla2xxx: Fix spelling mistake "tranport" -> "transport"
        scsi: fnic: Replace sgreset tag with max_tag_id
        scsi: qla2xxx: Remove unused variables in qla24xx_build_scsi_type_6_iocbs()
        scsi: qla2xxx: Fix nvme_fc_rcv_ls_req() undefined error
        scsi: smartpqi: Change driver version to 2.1.24-046
        scsi: smartpqi: Enhance error messages
        scsi: smartpqi: Enhance controller offline notification
        scsi: smartpqi: Enhance shutdown notification
        scsi: smartpqi: Simplify lun_number assignment
        scsi: smartpqi: Rename pciinfo to pci_info
        scsi: smartpqi: Rename MACRO to clarify purpose
        scsi: smartpqi: Add abort handler
        ...
      2a5a4326
    • Linus Torvalds's avatar
      Merge tag 'driver-core-6.6-rc1-2' of... · 6b41fb27
      Linus Torvalds authored
      Merge tag 'driver-core-6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver symbol lookup fix from Greg KH:
       "Here is one last fixup for your tree for 6.6-rc1. It resolves a
        problem with the way that symbol_get was changed in the module tree
        merge in your tree to fix up the DVB drivers which rely on this old
        api to attach new devices.
      
        As the changelog comment says:
      
          In commit 9011e49d ("modules: only allow symbol_get of
          EXPORT_SYMBOL_GPL modules") the use of symbol_get is properly
          restricted to GPL-only marked symbols. This interacts oddly with the
          DVB logic which only uses dvb_attach() to load the dvb driver which
          then uses symbol_get().
      
          Fix this up by properly marking all of the dvb_attach attach symbols
          as EXPORT_SYMBOL_GPL().
      
        This has been acked by Hans from the V4L driver side, Luis from the
        module side, Mauro on the media side, and Christoph said it was the
        correct solution, and was tested by the original reporter of the
        issue.
      
        It has passed 0-day testing, but has not been in linux-next due to it
        only being sent yesterday"
      
      * tag 'driver-core-6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        media: dvb: symbol fixup for dvb_attach()
      6b41fb27
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.6-2023-09-09' of git://git.infradead.org/users/hch/dma-mapping · 474197a4
      Linus Torvalds authored
      Pull dma-mapping fixes from Christoph Hellwig:
      
       - move a dma-debug call that prints a message out from a lock that's
         causing problems with the lock order in serial drivers (Sergey
         Senozhatsky)
      
       - fix the CONFIG_DMA_NUMA_CMA Kconfig entry to have the right
         dependency and not default to y (Christoph Hellwig)
      
       - move an ifdef a bit to remove a __maybe_unused that seems to trip up
         some sensitivities (Christoph Hellwig)
      
       - revert a bogus check in the CMA allocator (Zhenhua Huang)
      
      * tag 'dma-mapping-6.6-2023-09-09' of git://git.infradead.org/users/hch/dma-mapping:
        Revert "dma-contiguous: check for memory region overlap"
        dma-pool: remove a __maybe_unused label in atomic_pool_expand
        dma-contiguous: fix the Kconfig entry for CONFIG_DMA_NUMA_CMA
        dma-debug: don't call __dma_entry_alloc_check_leak() under free_entries_lock
      474197a4
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 060249b5
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Add PCI_DYNAMIC_OF_NODES dependency on OF_IRQ to fix sparc64 build
         error (Lizhi Hou)
      
       - After coalescing host bridge resources, free any released resources
         to avoid a leak (Ross Lagerwall)
      
       - Revert a quirk that prevented NVIDIA T4 GPUs from using Secondary Bus
         Reset. The quirk worked around an issue that we now think is related
         to the Root Port, not the GPU (Bjorn Helgaas)
      
      * tag 'pci-v6.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
        PCI: Free released resource after coalescing
        PCI: Fix CONFIG_PCI_DYNAMIC_OF_NODES kconfig dependencies
      060249b5
    • Linus Torvalds's avatar
      Merge tag 'ntb-6.6' of https://github.com/jonmason/ntb · fa9d4bf5
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Link toggling fixes and debugfs error path fixes"
      
      [ And for everybody like me who always have to remind themselves what
        the TLA of the day is, and what NTB stands for - it's a PCIe
        "Non-Transparent Bridge" thing    - Linus ]
      
      * tag 'ntb-6.6' of https://github.com/jonmason/ntb:
        ntb: Check tx descriptors outstanding instead of head/tail for tx queue
        ntb: Fix calculation ntb_transport_tx_free_entry()
        ntb: Drop packets when qp link is down
        ntb: Clean up tx tail index on link down
        ntb: amd: Drop unnecessary error check for debugfs_create_dir
        NTB: ntb_tool: Switch to memdup_user_nul() helper
        dtivers: ntb: fix parameter check in perf_setup_dbgfs()
        ntb: Remove error checking for debugfs_create_dir()
      fa9d4bf5
  2. Sep 09, 2023
  3. Sep 08, 2023
    • Zhenhua Huang's avatar
      Revert "dma-contiguous: check for memory region overlap" · f875db4f
      Zhenhua Huang authored
      This reverts commit 3fa6456e
      
      .
      
      The Commit broke the CMA region creation through DT on arm64,
      as showed below logs with "memblock=debug":
      [    0.000000] memblock_phys_alloc_range: 41943040 bytes align=0x200000
      from=0x0000000000000000 max_addr=0x00000000ffffffff
      early_init_dt_alloc_reserved_memory_arch+0x34/0xa0
      [    0.000000] memblock_reserve: [0x00000000fd600000-0x00000000ffdfffff]
      memblock_alloc_range_nid+0xc0/0x19c
      [    0.000000] Reserved memory: overlap with other memblock reserved region
      
      >From call flow, region we defined in DT was always reserved before entering
      into rmem_cma_setup. Also, rmem_cma_setup has one routine cma_init_reserved_mem
      to ensure the region was reserved. Checking the region not reserved here seems
      not correct.
      
      early_init_fdt_scan_reserved_mem:
          fdt_scan_reserved_mem
              __reserved_mem_reserve_reg
      		early_init_dt_reserve_memory
      			memblock_reserve(using “reg” prop case)
              fdt_init_reserved_mem
      		__reserved_mem_alloc_size
      			*early_init_dt_alloc_reserved_memory_arch*
      				memblock_reserve(dynamic alloc case)
              __reserved_mem_init_node
      		rmem_cma_setup(region overlap check here should always fail)
      
      Example DT can be used to reproduce issue:
      
          dump_mem: mem_dump_region {
                  compatible = "shared-dma-pool";
                  alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
                  reusable;
                  size = <0 0x2800000>;
          };
      
      Signed-off-by: default avatarZhenhua Huang <quic_zhenhuah@quicinc.com>
      f875db4f