1. 23 Oct, 2023 8 commits
    • Christoph Hellwig's avatar
      xfs: handle nimaps=0 from xfs_bmapi_write in xfs_alloc_file_space · 35dc55b9
      Christoph Hellwig authored
      If xfs_bmapi_write finds a delalloc extent at the requested range, it
      tries to convert the entire delalloc extent to a real allocation.
      
      But if the allocator cannot find a single free extent large enough to
      cover the start block of the requested range, xfs_bmapi_write will
      return 0 but leave *nimaps set to 0.
      
      In that case we simply need to keep looping with the same startoffset_fsb
      so that one of the following allocations will eventually reach the
      requested range.
      
      Note that this could affect any caller of xfs_bmapi_write that covers
      an existing delayed allocation.  As far as I can tell we do not have
      any other such caller, though - the regular writeback path uses
      xfs_bmapi_convert_delalloc to convert delayed allocations to real ones,
      and direct I/O invalidates the page cache first.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      35dc55b9
    • Cheng Lin's avatar
      xfs: introduce protection for drop nlink · 2b99e410
      Cheng Lin authored
      When abnormal drop_nlink are detected on the inode,
      return error, to avoid corruption propagation.
      Signed-off-by: default avatarCheng Lin <cheng.lin130@zte.com.cn>
      Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      2b99e410
    • Chandan Babu R's avatar
      Merge tag 'rtalloc-speedups-6.7_2023-10-19' of... · 9fa8753a
      Chandan Babu R authored
      Merge tag 'rtalloc-speedups-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.7-mergeA
      
      xfs: CPU usage optimizations for realtime allocator [v2.3]
      
      This is version 2 of [Omar's] XFS realtime allocator opimization patch
      series.
      
      Changes since v1 [1]:
      
      - Fixed potential overflow in patch 4.
      - Changed deprecated typedefs to normal struct names
      - Fixed broken indentation
      - Used xfs_fileoff_t instead of xfs_fsblock_t where appropriate.
      - Added calls to xfs_rtbuf_cache_relse anywhere that the cache is used
        instead of relying on the buffers being dirtied and thus attached to
        the transaction.
      - Clarified comments and commit messages in a few places.
      - Added Darrick's Reviewed-bys.
      
      Cover letter from v1:
      
      Our distributed storage system uses XFS's realtime device support as a
      way to split an XFS filesystem between an SSD and an HDD -- we configure
      the HDD as the realtime device so that metadata goes on the SSD and data
      goes on the HDD.
      
      We've been running this in production for a few years now, so we have
      some fairly fragmented filesystems. This has exposed various CPU
      inefficiencies in the realtime allocator. These became even worse when
      we experimented with using XFS_XFLAG_EXTSIZE to force files to be
      allocated contiguously.
      
      This series adds several optimizations that don't change the realtime
      allocator's decisions, but make them happen more efficiently, mainly by
      avoiding redundant work. We've tested these in production and measured
      ~10%% lower CPU utilization. Furthermore, it made it possible to use
      XFS_XFLAG_EXTSIZE to force contiguous allocations -- without these
      patches, our most fragmented systems would become unresponsive due to
      high CPU usage in the realtime allocator, but with them, CPU utilization
      is actually ~4-6%% lower than before, and disk I/O utilization is 15-20%%
      lower.
      
      Patches 2 and 3 are preparations for later optimizations; the remaining
      patches are the optimizations themselves.
      
      1: https://lore.kernel.org/linux-xfs/cover.1687296675.git.osandov@osandov.com/
      
      v2.1: djwong rebased everything atop his own cleanups, added dave's rtalloc_args
      v2.2: rebase with new apis and clean them up too
      v2.3: move struct definition around for lolz
      
      With a bit of luck, this should all go splendidly.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      
      * tag 'rtalloc-speedups-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
        xfs: don't look for end of extent further than necessary in xfs_rtallocate_extent_near()
        xfs: don't try redundant allocations in xfs_rtallocate_extent_near()
        xfs: limit maxlen based on available space in xfs_rtallocate_extent_near()
        xfs: return maximum free size from xfs_rtany_summary()
        xfs: invert the realtime summary cache
        xfs: simplify rt bitmap/summary block accessor functions
        xfs: simplify xfs_rtbuf_get calling conventions
        xfs: cache last bitmap block in realtime allocator
        xfs: consolidate realtime allocation arguments
      9fa8753a
    • Chandan Babu R's avatar
      Merge tag 'refactor-rtbitmap-accessors-6.7_2023-10-19' of... · 830b4abf
      Chandan Babu R authored
      Merge tag 'refactor-rtbitmap-accessors-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.7-mergeA
      
      xfs: refactor rtbitmap/summary accessors [v1.2]
      
      Since the rtbitmap and rtsummary accessor functions have proven more
      controversial than the rest of the macro refactoring, split the patchset
      into two to make review easier.
      
      v1.1: various cleanups suggested by hch
      v1.2: rework the accessor functions to reduce the amount of cursor
            tracking required, and create explicit bitmap/summary logging
            functions
      
      With a bit of luck, this should all go splendidly.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      
      * tag 'refactor-rtbitmap-accessors-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
        xfs: use accessor functions for summary info words
        xfs: create helpers for rtsummary block/wordcount computations
        xfs: use accessor functions for bitmap words
        xfs: create a helper to handle logging parts of rt bitmap/summary blocks
      830b4abf
    • Chandan Babu R's avatar
      Merge tag 'refactor-rtbitmap-macros-6.7_2023-10-19' of... · 035e32f7
      Chandan Babu R authored
      Merge tag 'refactor-rtbitmap-macros-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.7-mergeA
      
      xfs: refactor rtbitmap/summary macros [v1.1]
      
      In preparation for adding block headers and enforcing endian order in
      rtbitmap and rtsummary blocks, replace open-coded geometry computations
      and fugly macros with proper helper functions that can be typechecked.
      Soon we'll be needing to add more complex logic to the helpers.
      
      v1.1: various cleanups suggested by hch
      
      With a bit of luck, this should all go splendidly.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      
      * tag 'refactor-rtbitmap-macros-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
        xfs: create helpers for rtbitmap block/wordcount computations
        xfs: convert rt summary macros to helpers
        xfs: convert open-coded xfs_rtword_t pointer accesses to helper
        xfs: remove XFS_BLOCKWSIZE and XFS_BLOCKWMASK macros
        xfs: convert the rtbitmap block and bit macros to static inline functions
      035e32f7
    • Chandan Babu R's avatar
      Merge tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of... · 9d4ca5af
      Chandan Babu R authored
      Merge tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.7-mergeA
      
      xfs: refactor rt extent unit conversions [v1.1]
      
      This series replaces all the open-coded integer division and
      multiplication conversions between rt blocks and rt extents with calls
      to static inline helpers.  Having cleaned all that up, the helpers are
      augmented to skip the expensive operations in favor of bit shifts and
      masking if the rt extent size is a power of two.
      
      v1.1: various cleanups suggested by hch
      
      With a bit of luck, this should all go splendidly.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      
      * tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
        xfs: use shifting and masking when converting rt extents, if possible
        xfs: create rt extent rounding helpers for realtime extent blocks
        xfs: convert do_div calls to xfs_rtb_to_rtx helper calls
        xfs: create helpers to convert rt block numbers to rt extent numbers
        xfs: create a helper to convert extlen to rtextlen
        xfs: create a helper to compute leftovers of realtime extents
        xfs: create a helper to convert rtextents to rtblocks
      9d4ca5af
    • Chandan Babu R's avatar
      Merge tag 'clean-up-realtime-units-6.7_2023-10-19' of... · 3ef52c01
      Chandan Babu R authored
      Merge tag 'clean-up-realtime-units-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.7-mergeA
      
      xfs: clean up realtime type usage [v1.1]
      
      The realtime code uses xfs_rtblock_t and xfs_fsblock_t in a lot of
      places, and it's very confusing.  Clean up all the type usage so that an
      xfs_rtblock_t is always a block within the realtime volume, an
      xfs_fileoff_t is always a file offset within a realtime metadata file,
      and an xfs_rtxnumber_t is always a rt extent within the realtime volume.
      
      v1.1: various cleanups suggested by hch
      
      With a bit of luck, this should all go splendidly.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      
      * tag 'clean-up-realtime-units-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
        xfs: convert rt extent numbers to xfs_rtxnum_t
        xfs: rename xfs_verify_rtext to xfs_verify_rtbext
        xfs: convert rt bitmap extent lengths to xfs_rtbxlen_t
        xfs: convert rt bitmap/summary block numbers to xfs_fileoff_t
        xfs: convert xfs_extlen_t to xfs_rtxlen_t in the rt allocator
        xfs: move the xfs_rtbitmap.c declarations to xfs_rtbitmap.h
        xfs: make sure maxlen is still congruent with prod when rounding down
        xfs: fix units conversion error in xfs_bmap_del_extent_delay
      3ef52c01
    • Chandan Babu R's avatar
      Merge tag 'realtime-fixes-6.7_2023-10-19' of... · d0e85e79
      Chandan Babu R authored
      Merge tag 'realtime-fixes-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.7-mergeA
      
      xfs: minor bugfixes for rt stuff [v1.1]
      
      This is a preparatory patchset that fixes a few miscellaneous bugs
      before we start in on larger cleanups of realtime units usage.
      
      v1.1: various cleanups suggested by hch
      
      With a bit of luck, this should all go splendidly.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      
      * tag 'realtime-fixes-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
        xfs: rt stubs should return negative errnos when rt disabled
        xfs: prevent rt growfs when quota is enabled
        xfs: hoist freeing of rt data fork extent mappings
        xfs: bump max fsgeom struct version
      d0e85e79
  2. 22 Oct, 2023 4 commits
    • Linus Torvalds's avatar
      Linux 6.6-rc7 · 05d3ef8b
      Linus Torvalds authored
      05d3ef8b
    • Linus Torvalds's avatar
      Merge tag 'phy-fixes-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy · fe3cfe86
      Linus Torvalds authored
      Pull phy fixes from Vinod Koul:
      
       - mapphone-mdm6600 runtime pm & pinctrl handling fixes
      
       - Qualcomm qmp usb pcs register fixes, qmp pcie register size warning
         fix, m31 fixes for wrong pointer in PTR_ERR and dropping wrong vreg
         check, qmp combo fix for 8550 power config register
      
       - realtek usb fix for debugfs_create_dir() and kconfig dependency
      
      * tag 'phy-fixes-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
        phy: realtek: Realtek PHYs should depend on ARCH_REALTEK
        phy: qualcomm: Fix typos in comments
        phy: qcom-qmp-combo: initialize PCS_USB registers
        phy: qcom-qmp-combo: Square out 8550 POWER_STATE_CONFIG1
        phy: qcom: m31: Remove unwanted qphy->vreg is NULL check
        phy: realtek: usb: Drop unnecessary error check for debugfs_create_dir()
        phy: qcom: phy-qcom-m31: change m31_ipq5332_regs to static
        phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR()
        dt-bindings: phy: qcom,ipq8074-qmp-pcie: fix warning regarding reg size
        phy: qcom-qmp-usb: split PCS_USB init table for sc8280xp and sa8775p
        phy: qcom-qmp-usb: initialize PCS_USB registers
        phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins
        phy: mapphone-mdm6600: Fix runtime PM for remove
        phy: mapphone-mdm6600: Fix runtime disable on probe
      fe3cfe86
    • Linus Torvalds's avatar
      Merge tag 'efi-fixes-for-v6.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · 70e65afc
      Linus Torvalds authored
      Pull EFI fixes from Ard Biesheuvel:
       "The boot_params pointer fix uses a somewhat ugly extern struct
        declaration but this will be cleaned up the next cycle.
      
         - don't try to print warnings to the console when it is no longer
           available
      
         - fix theoretical memory leak in SSDT override handling
      
         - make sure that the boot_params global variable is set before the
           KASLR code attempts to hash it for 'randomness'
      
         - avoid soft lockups in the memory acceptance code"
      
      * tag 'efi-fixes-for-v6.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
        efi/unaccepted: Fix soft lockups caused by parallel memory acceptance
        x86/boot: efistub: Assign global boot_params variable
        efi: fix memory leak in krealloc failure handling
        x86/efistub: Don't try to print after ExitBootService()
      70e65afc
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 1acfd2bd
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix stale propagated yield_cpu in qspinlocks leading to lockups
      
       - Fix broken hugepages on some configs due to ARCH_FORCE_MAX_ORDER
      
       - Fix a spurious warning when copros are in use at exit time
      
      Thanks to Nicholas Piggin, Christophe Leroy, Nysal Jan K.A Sachin Sant,
      and Shrikanth Hegde.
      
      * tag 'powerpc-6.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/qspinlock: Fix stale propagated yield_cpu
        powerpc/64s/radix: Don't warn on copros in radix__tlb_flush()
        powerpc/mm: Allow ARCH_FORCE_MAX_ORDER up to 12
      1acfd2bd
  3. 21 Oct, 2023 10 commits
  4. 20 Oct, 2023 18 commits
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.6-2-2023-10-20' of... · 9c5d00cb
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.6-2-2023-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix regression in reading scale and unit files from sysfs for PMU
         events, so that we can use that info to pretty print instead of
         printing raw numbers:
      
           # perf stat -e power/energy-ram/,power/energy-gpu/ sleep 2
      
            Performance counter stats for 'system wide':
      
                       1.64 Joules power/energy-ram/
                       0.20 Joules power/energy-gpu/
      
                2.001228914 seconds time elapsed
           #
           # grep -m1 "model name" /proc/cpuinfo
           model name	: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
           #
      
       - The small llvm.cpp file used to check if the llvm devel files are
         present was incorrectly deleted when removing the BPF event in 'perf
         trace', put it back as it is also used by tools/bpf/bpftool, that
         uses llvm routines to do disassembly of BPF object files.
      
       - Fix use of addr_location__exit() in dlfilter__object_code(), making
         sure that it is only used to pair a previous addr_location__init()
         call.
      
      * tag 'perf-tools-fixes-for-v6.6-2-2023-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
        tools build: Fix llvm feature detection, still used by bpftool
        perf dlfilter: Add a test for object_code()
        perf dlfilter: Fix use of addr_location__exit() in dlfilter__object_code()
        perf pmu: Fix perf stat output with correct scale and unit
      9c5d00cb
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest_active-fixes-6.6-rc7' of... · 444ccf1b
      Linus Torvalds authored
      Merge tag 'linux_kselftest_active-fixes-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fix from Shuah Khan:
       "One single fix to assert check in user_events abi_test to properly
        check bit value on Big Endian architectures. The code treated the bit
        values as Little Endian and the check failed on Big Endian"
      
      * tag 'linux_kselftest_active-fixes-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/user_events: Fix abi_test for BE archs
      444ccf1b
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-6.6-4' of git://git.linux-nfs.org/projects/anna/linux-nfs · f74e3ea3
      Linus Torvalds authored
      Pull NFS client fixes from Anna Schumaker:
       "Stable Fix:
         - Fix a pNFS hang in nfs4_evict_inode()
      
        Fixes:
         - Force update of suid/sgid bits after an NFS v4.2 ALLOCATE op
         - Fix a potential oops in nfs_inode_remove_request()
         - Check the validity of the layout pointer in ff_layout_mirror_prepare_stats()
         - Fix incorrectly marking the pNFS MDS with USE_PNFS_DS in some cases"
      
      * tag 'nfs-for-6.6-4' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        NFSv4.1: fixup use EXCHGID4_FLAG_USE_PNFS_DS for DS server
        pNFS/flexfiles: Check the layout validity in ff_layout_mirror_prepare_stats
        pNFS: Fix a hang in nfs4_evict_inode()
        NFS: Fix potential oops in nfs_inode_remove_request()
        nfs42: client needs to strip file mode's suid/sgid bit after ALLOCATE op
      f74e3ea3
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 0e97fd29
      Linus Torvalds authored
      Pull fanotify fix from Jan Kara:
       "Disable superblock / mount marks for filesystems that can encode file
        handles but not open them (currently only overlayfs).
      
        It is not clear the functionality is useful in any way so let's better
        disable it before someone comes up with some creative misuse"
      
      * tag 'fsnotify_for_v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fanotify: limit reporting of event with non-decodeable file handles
      0e97fd29
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f20f29cb
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix the ACPI initialization ordering on ARM and ACPI IRQ
        management in the cases when irq_create_fwspec_mapping() fails.
      
        Specifics:
      
         - Fix ACPI initialization ordering on ARM that was changed
           incorrectly during the 6.5 development cycle (Hanjun Guo)
      
         - Make acpi_register_gsi() return an error code as appropriate when
           irq_create_fwspec_mapping() returns 0 on failure (Sunil V L)"
      
      * tag 'acpi-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: bus: Move acpi_arm_init() to the place of after acpi_ghes_init()
        ACPI: irq: Fix incorrect return value in acpi_register_gsi()
      f20f29cb
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 75e167c2
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two small fixes, both in drivers.
      
        The mptsas one is really fixing an error path issue where it can leave
        the misc driver loaded even though the sas driver fails to initialize"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: qla2xxx: Fix double free of dsd_list during driver load
        scsi: mpt3sas: Fix in error path
      75e167c2
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 659eaa00
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
      
       - Concurrent register updates in the Qualcomm LPASS pin controller gets
         a proper lock.
      
       - revert a mutex fix that was causing problems: contention on the mutex
         or something of the sort lead to probe reordering and MMC block
         devices start to register in a different order, which unsuspecting
         userspace is not ready to handle
      
      * tag 'pinctrl-v6.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()"
        pinctrl: qcom: lpass-lpi: fix concurrent register updates
      659eaa00
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · f6176471
      Linus Torvalds authored
      Pull MTD fixes from Miquel Raynal:
       "In the raw NAND subsystem, the major fix prevents using cached reads
        with devices not supporting it. There was two bug reports about this.
      
        Apart from that, three drivers (pl353, arasan and marvell) could
        sometimes hide page program failures due to their their own program
        page helper not being fully compliant with the specification (many
        drivers use the default helpers shared by the core). Adding a missing
        check prevents these situation.
      
        Finally, the Qualcomm driver had a broken error path.
      
        In the SPI-NAND subsystem one Micron device used a wrong bitmak
        reporting possibly corrupted ECC status.
      
        Finally, the physmap-core got stripped from its map_rom fallback by
        mistake, this feature is added back"
      
      * tag 'mtd/fixes-for-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: rawnand: Ensure the nand chip supports cached reads
        mtd: rawnand: qcom: Unmap the right resource upon probe failure
        mtd: rawnand: pl353: Ensure program page operations are successful
        mtd: rawnand: arasan: Ensure program page operations are successful
        mtd: spinand: micron: correct bitmask for ecc status
        mtd: physmap-core: Restore map_rom fallback
        mtd: rawnand: marvell: Ensure program page operations are successful
      f6176471
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 7da6c042
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
         - Capture correct oemid-bits for eMMC cards
         - Fix error propagation for some ioctl commands
         - Hold retuning if SDIO is in 1-bit mode
      
        MMC host:
         - mtk-sd: Use readl_poll_timeout_atomic to not "schedule while atomic"
         - sdhci-msm: Correct minimum number of clocks
         - sdhci-pci-gli: Fix LPM negotiation so x86/S0ix SoCs can suspend
         - sdhci-sprd: Fix error code in sdhci_sprd_tuning()"
      
      * tag 'mmc-v6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: core: Capture correct oemid-bits for eMMC cards
        mmc: mtk-sd: Use readl_poll_timeout_atomic in msdc_reset_hw
        mmc: core: Fix error propagation for some ioctl commands
        mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
        mmc: sdhci-pci-gli: fix LPM negotiation so x86/S0ix SoCs can suspend
        mmc: core: sdio: hold retuning if sdio in 1-bit mode
        dt-bindings: mmc: sdhci-msm: correct minimum number of clocks
      7da6c042
    • Linus Torvalds's avatar
      Merge tag 'block-6.6-2023-10-20' of git://git.kernel.dk/linux · c3200081
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A fix for a regression with sed-opal and saved keys, and outside of
        that an NVMe pull request fixing a few minor issues on that front"
      
      * tag 'block-6.6-2023-10-20' of git://git.kernel.dk/linux:
        nvme-pci: add BOGUS_NID for Intel 0a54 device
        nvmet-auth: complete a request only after freeing the dhchap pointers
        nvme: sanitize metadata bounce buffer for reads
        block: Fix regression in sed-opal for a saved key.
        nvme-auth: use chap->s2 to indicate bidirectional authentication
        nvmet-tcp: Fix a possible UAF in queue intialization setup
        nvme-rdma: do not try to stop unallocated queues
      c3200081
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.6-2023-10-20' of git://git.kernel.dk/linux · 747b7628
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Just a single fix for a bug report that came in, fixing a case where
        failure to init a ring with IORING_SETUP_NO_MMAP can trigger a NULL
        pointer dereference"
      
      * tag 'io_uring-6.6-2023-10-20' of git://git.kernel.dk/linux:
        io_uring: fix crash with IORING_SETUP_NO_MMAP and invalid SQ ring address
      747b7628
    • Linus Torvalds's avatar
      Merge tag 'sound-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 14f68633
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Still higher volume than wished, but all are driver-specific small
        fixes and look safe for this late RC.
      
        The majority of changes are for ASoC, especially for wcd938x driver
        and Cirrus codec drivers, while there are other random fixes including
        usual HD-audio quirks"
      
      * tag 'sound-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (22 commits)
        ASoC: da7219: Correct the process of setting up Gnd switch in AAD
        ALSA: hda/realtek - Fixed ASUS platform headset Mic issue
        ALSA: hda/realtek: Add quirk for ASUS ROG GU603ZV
        ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq5xxx
        ASoC: dwc: Fix non-DT instantiation
        ASoC: codecs: tas2780: Fix log of failed reset via I2C.
        ASoC: rt5650: fix the wrong result of key button
        ASoC: cs42l42: Fix missing include of gpio/consumer.h
        ASoC: cs42l43: Update values for bias sense
        ASoC: dt-bindings: cirrus,cs42l43: Update values for bias sense
        ASoC: cs35l56: ASP1 DOUT must default to Hi-Z when not transmitting
        ASoC: pxa: fix a memory leak in probe()
        ASoC: cs35l56: Fix illegal use of init_completion()
        ASoC: codecs: wcd938x-sdw: fix runtime PM imbalance on probe errors
        ASoC: codecs: wcd938x-sdw: fix use after free on driver unbind
        ASoC: codecs: wcd938x: fix runtime PM imbalance on remove
        ASoC: codecs: wcd938x: fix regulator leaks on probe errors
        ASoC: codecs: wcd938x: fix resource leaks on bind errors
        ASoC: codecs: wcd938x: fix unbind tear down order
        ASoC: codecs: wcd938x: drop bogus bind error handling
        ...
      14f68633
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-10-20' of git://anongit.freedesktop.org/drm/drm · c8045b4a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular fixes for the week, amdgpu, i915, nouveau, with some other
        scattered around, nothing major.
      
        amdgpu:
         - Fix possible NULL pointer dereference
         - Avoid possible BUG_ON in GPUVM updates
         - Disable AMD_CTX_PRIORITY_UNSET
      
        i915:
         - Fix display issue that was blocking S0ix
         - Retry gtt fault when out of fence registers
      
        bridge:
         - ti-sn65dsi86: Fix device lifetime
      
        edid:
         - Add quirk for BenQ GW2765
      
        ivpu:
         - Extend address range for MMU mmap
      
        nouveau:
         - DP-connector fixes
         - Documentation fixes
      
        panel:
         - Move AUX B116XW03 into panel-simple
      
        scheduler:
         - Eliminate DRM_SCHED_PRIORITY_UNSET
      
        ttm:
         - Fix possible NULL-ptr deref in cleanup
      
        mediatek:
         - Correctly free sg_table in gem prime vmap"
      
      * tag 'drm-fixes-2023-10-20' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: Reserve fences for VM update
        drm/amdgpu: Fix possible null pointer dereference
        accel/ivpu: Extend address range for MMU mmap
        Revert "accel/ivpu: Use cached buffers for FW loading"
        accel/ivpu: Don't enter d0i3 during FLR
        drm/i915: Retry gtt fault when out of fence registers
        drm/i915/cx0: Only clear/set the Pipe Reset bit of the PHY Lanes Owned
        gpu/drm: Eliminate DRM_SCHED_PRIORITY_UNSET
        drm/amdgpu: Unset context priority is now invalid
        drm/mediatek: Correctly free sg_table in gem prime vmap
        drm/edid: add 8 bpc quirk to the BenQ GW2765
        drm/ttm: Reorder sys manager cleanup step
        drm/nouveau/disp: fix DP capable DSM connectors
        drm/nouveau: exec: fix ioctl kernel-doc warning
        drm/panel: Move AUX B116XW03 out of panel-edp back to panel-simple
        drm/bridge: ti-sn65dsi86: Associate DSI device lifetime with auxiliary device
      c8045b4a
    • Ard Biesheuvel's avatar
      c03d21f0
    • Kirill A. Shutemov's avatar
      efi/unaccepted: Fix soft lockups caused by parallel memory acceptance · 50e782a8
      Kirill A. Shutemov authored
      Michael reported soft lockups on a system that has unaccepted memory.
      This occurs when a user attempts to allocate and accept memory on
      multiple CPUs simultaneously.
      
      The root cause of the issue is that memory acceptance is serialized with
      a spinlock, allowing only one CPU to accept memory at a time. The other
      CPUs spin and wait for their turn, leading to starvation and soft lockup
      reports.
      
      To address this, the code has been modified to release the spinlock
      while accepting memory. This allows for parallel memory acceptance on
      multiple CPUs.
      
      A newly introduced "accepting_list" keeps track of which memory is
      currently being accepted. This is necessary to prevent parallel
      acceptance of the same memory block. If a collision occurs, the lock is
      released and the process is retried.
      
      Such collisions should rarely occur. The main path for memory acceptance
      is the page allocator, which accepts memory in MAX_ORDER chunks. As long
      as MAX_ORDER is equal to or larger than the unit_size, collisions will
      never occur because the caller fully owns the memory block being
      accepted.
      
      Aside from the page allocator, only memblock and deferered_free_range()
      accept memory, but this only happens during boot.
      
      The code has been tested with unit_size == 128MiB to trigger collisions
      and validate the retry codepath.
      
      Fixes: 2053bc57 ("efi: Add unaccepted memory support")
      Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Reported-by: Michael Roth <michael.roth@amd.com
      Reviewed-by: default avatarNikolay Borisov <nik.borisov@suse.com>
      Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Tested-by: default avatarMichael Roth <michael.roth@amd.com>
      [ardb: drop unnecessary cpu_relax() call]
      Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      50e782a8
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-irq' · 9caa3a2d
      Rafael J. Wysocki authored
      Merge ACPI IRQ management fix for 6.6-rc7 (Sunil V L).
      
      * acpi-irq:
        ACPI: irq: Fix incorrect return value in acpi_register_gsi()
      9caa3a2d
    • Francis Laniel's avatar
      selftests/ftrace: Add new test case which checks non unique symbol · 03b80ff8
      Francis Laniel authored
      If name_show() is non unique, this test will try to install a kprobe on this
      function which should fail returning EADDRNOTAVAIL.
      On kernel where name_show() is not unique, this test is skipped.
      
      Link: https://lore.kernel.org/all/20231020104250.9537-3-flaniel@linux.microsoft.com/
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarFrancis Laniel <flaniel@linux.microsoft.com>
      Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      03b80ff8
    • Francis Laniel's avatar
      tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols · b022f0c7
      Francis Laniel authored
      When a kprobe is attached to a function that's name is not unique (is
      static and shares the name with other functions in the kernel), the
      kprobe is attached to the first function it finds. This is a bug as the
      function that it is attaching to is not necessarily the one that the
      user wants to attach to.
      
      Instead of blindly picking a function to attach to what is ambiguous,
      error with EADDRNOTAVAIL to let the user know that this function is not
      unique, and that the user must use another unique function with an
      address offset to get to the function they want to attach to.
      
      Link: https://lore.kernel.org/all/20231020104250.9537-2-flaniel@linux.microsoft.com/
      
      Cc: stable@vger.kernel.org
      Fixes: 413d37d1 ("tracing: Add kprobe-based event tracer")
      Suggested-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarFrancis Laniel <flaniel@linux.microsoft.com>
      Link: https://lore.kernel.org/lkml/20230819101105.b0c104ae4494a7d1f2eea742@kernel.org/Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      b022f0c7