1. 05 Jul, 2023 10 commits
    • Linus Torvalds's avatar
      Merge tag 'xfs-6.5-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · bb8e7e9f
      Linus Torvalds authored
      Pull more xfs updates from Darrick Wong:
      
       - Fix some ordering problems with log items during log recovery
      
       - Don't deadlock the system by trying to flush busy freed extents while
         holding on to busy freed extents
      
       - Improve validation of log geometry parameters when reading the
         primary superblock
      
       - Validate the length field in the AGF header
      
       - Fix recordset filtering bugs when re-calling GETFSMAP to return more
         results when the resultset didn't previously fit in the caller's
         buffer
      
       - Fix integer overflows in GETFSMAP when working with rt volumes larger
         than 2^32 fsblocks
      
       - Fix GETFSMAP reporting the undefined space beyond the last rtextent
      
       - Fix filtering bugs in GETFSMAP's log device backend if the log ever
         becomes longer than 2^32 fsblocks
      
       - Improve validation of file offsets in the GETFSMAP range parameters
      
       - Fix an off by one bug in the pmem media failure notification
         computation
      
       - Validate the length field in the AGI header too
      
      * tag 'xfs-6.5-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: Remove unneeded semicolon
        xfs: AGI length should be bounds checked
        xfs: fix the calculation for "end" and "length"
        xfs: fix xfs_btree_query_range callers to initialize btree rec fully
        xfs: validate fsmap offsets specified in the query keys
        xfs: fix logdev fsmap query result filtering
        xfs: clean up the rtbitmap fsmap backend
        xfs: fix getfsmap reporting past the last rt extent
        xfs: fix integer overflows in the fsmap rtbitmap and logdev backends
        xfs: fix interval filtering in multi-step fsmap queries
        xfs: fix bounds check in xfs_defer_agfl_block()
        xfs: AGF length has never been bounds checked
        xfs: journal geometry is not properly bounds checked
        xfs: don't block in busy flushing when freeing extents
        xfs: allow extent free intents to be retried
        xfs: pass alloc flags through to xfs_extent_busy_flush()
        xfs: use deferred frees for btree block freeing
        xfs: don't reverse order of items in bulk AIL insertion
        xfs: remove redundant initializations of pointers drop_leaf and save_leaf
      bb8e7e9f
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.5-rc1' of... · ace1ba1c
      Linus Torvalds authored
      Merge tag 'pwm/for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "There's a little bit of everything in here: we've got various
        improvements and cleanups to drivers, some fixes across the board and
        a bit of new hardware support"
      
      * tag 'pwm/for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (22 commits)
        dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
        pwm: Add Renesas RZ/G2L MTU3a PWM driver
        pwm: mtk_disp: Fix the disable flow of disp_pwm
        dt-bindings: pwm: restrict node name suffixes
        pwm: pca9685: Switch i2c driver back to use .probe()
        pwm: ab8500: Fix error code in probe()
        MAINTAINERS: add pwm to PolarFire SoC entry
        pwm: add microchip soft ip corePWM driver
        pwm: sysfs: Do not apply state to already disabled PWMs
        pwm: imx-tpm: force 'real_period' to be zero in suspend
        pwm: meson: make full use of common clock framework
        pwm: meson: don't use hdmi/video clock as mux parent
        pwm: meson: switch to using struct clk_parent_data for mux parents
        pwm: meson: remove not needed check in meson_pwm_calc
        pwm: meson: fix handling of period/duty if greater than UINT_MAX
        pwm: meson: modify and simplify calculation in meson_pwm_get_state
        dt-bindings: pwm: Add R-Car V3U device tree bindings
        dt-bindings: pwm: imx: add i.MX8QXP compatible
        pwm: mediatek: Add support for MT7981
        dt-bindings: pwm: mediatek: Add mediatek,mt7981 compatible
        ...
      ace1ba1c
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · b9861581
      Linus Torvalds authored
      Pull more devicetree updates from Rob Herring:
      
       - Whitespace clean-ups in binding examples
      
       - Restrict node name suffixes to "-[0-9]+" for cases of multiple
         instances which don't have unit-addresses
      
       - Convert brcm,kona-wdt and cdns,wdt-r1p2 watchdog bindings to DT
         schema
      
      * tag 'devicetree-for-6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: soc: qcom: stats: Update maintainer email
        dt-bindings: cleanup DTS example whitespaces
        dt-bindings: timestamp: restrict node name suffixes
        dt-bindings: slimbus: restrict node name suffixes
        dt-bindings: watchdog: restrict node name suffixes
        dt-bindings: watchdog: brcm,kona-wdt: convert txt file to yaml
        dt-bindings: watchdog: cdns,wdt-r1p2: Convert cadence watchdog to yaml
      b9861581
    • Linus Torvalds's avatar
      Merge tag 'soundwire-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire · fe1de551
      Linus Torvalds authored
      Pull soundwire updates from Vinod Koul:
      
       - Stream handling and slave alert handling
      
       - Qualcomm Soundwire v2.0.0 controller support
      
       - Intel ACE2.x initial support and code reorganization
      
      * tag 'soundwire-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (55 commits)
        soundwire: stream: Make master_list ordered to prevent deadlocks
        soundwire: bus: Prevent lockdep asserts when stream has multiple buses
        soundwire: qcom: fix storing port config out-of-bounds
        soundwire: intel_ace2x: fix SND_SOC_SOF_HDA_MLINK dependency
        soundwire: debugfs: Add missing SCP registers
        soundwire: stream: Remove unnecessary gotos
        soundwire: stream: Invert logic on runtime alloc flags
        soundwire: stream: Remove unneeded checks for NULL bus
        soundwire: bandwidth allocation: Remove pointless variable
        soundwire: cadence: revisit parity injection
        soundwire: intel/cadence: update hardware reset sequence
        soundwire: intel_bus_common: enable interrupts last
        soundwire: intel_bus_common: update error log
        soundwire: amd: Improve error message in remove callback
        soundwire: debugfs: fix unbalanced pm_runtime_put()
        soundwire: qcom: fix unbalanced pm_runtime_put()
        soundwire: qcom: set clk stop need reset flag at runtime
        soundwire: qcom: add software workaround for bus clash interrupt assertion
        soundwire: qcom: wait for fifo to be empty before suspend
        soundwire: qcom: drop unused struct qcom_swrm_ctrl members
        ...
      fe1de551
    • Linus Torvalds's avatar
      Merge tag 'media/v6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 15ac4686
      Linus Torvalds authored
      Pull media updates from Mauro Carvalho Chehab:
      
       - Lots of improvement at atomisp driver, which is starting to look in
         good shape
      
       - Mediatek vcodec driver has gained support for av1 and hevc stateless
         codecs
      
       - New sensor driver: ov01a10
      
       - verisilicon driver has gained AV1 entropy helpers
      
       - tegra-video has gained support for Tegra20 parallel input
      
       - dvb core has gained an extra property to better support DVB-S2X
      
       - as usual, lots of cleanups, fixes and improvements on media drivers
      
      * tag 'media/v6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (253 commits)
        media: wl128x: fix a clang warning
        media: dvb: mb86a20s: get rid of a clang-15 warning
        media: cec: i2c: ch7322: also select REGMAP
        media: add HAS_IOPORT dependencies
        media: tc358746: select CONFIG_GENERIC_PHY
        media: mediatek: vcodec: Add dbgfs help function
        media: mediatek: vcodec: Add encode to support dbgfs
        media: mediatek: vcodec: Change dbgfs interface to support encode
        media: mediatek: vcodec: Get each instance format type
        media: mediatek: vcodec: Get each context resolution information
        media: mediatek: vcodec: Add a debugfs file to get different useful information
        media: mediatek: vcodec: Add debug params to control different log level
        media: mediatek: vcodec: Add debugfs interface to get debug information
        media: mediatek: vcodec: support stateless AV1 decoder
        media: verisilicon: Conditionally ignore native formats
        media: verisilicon: Enable AV1 decoder on rk3588
        media: verisilicon: Add film grain feature to AV1 driver
        media: verisilicon: Add Rockchip AV1 decoder
        media: verisilicon: Add AV1 entropy helpers
        media: verisilicon: Compute motion vectors size for AV1 frames
        ...
      15ac4686
    • Linus Torvalds's avatar
      Merge tag 'trace-tools-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 2784d74b
      Linus Torvalds authored
      Pull tracing tooling updates from Steven Rostedt:
      
       - Add cgroup support for rtla via the -C option
      
       - Add --house-keeping option that tells rtla where to place the
         housekeeping threads
      
       - Have rtla/timerlat have its own tracing instance instead of using the
         top level tracing instance that is the default for other tracing
         users to use
      
       - Add auto analysis to timerlat_hist
      
       - Have rtla start the tracers after creating the instances
      
       - Reduce rtla hwnoise down to 75% from 100% as it runs with preemption
         disabled and can cause system instability at 100%
      
       - Add support to run timerlat_top and timerlat_hist threads in
         user-space instead of just using the kernel tasks
      
       - Some minor clean ups and documentation changes
      
      * tag 'trace-tools-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        Documentation: Add tools/rtla timerlat -u option documentation
        rtla/timerlat_hist: Add timerlat user-space support
        rtla/timerlat_top: Add timerlat user-space support
        rtla/hwnoise: Reduce runtime to 75%
        rtla: Start the tracers after creating all instances
        rtla/timerlat_hist: Add auto-analysis support
        rtla/timerlat: Give timerlat auto analysis its own instance
        rtla: Automatically move rtla to a house-keeping cpu
        rtla: Change monitored_cpus from char * to cpu_set_t
        rtla: Add --house-keeping option
        rtla: Add -C cgroup support
      2784d74b
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.5-rc1-2' of... · 2a95b03d
      Linus Torvalds authored
      Merge tag 'parisc-for-6.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
      
      Pull more parisc architecture updates from Helge Deller:
      
       -  Fix all compiler warnings in arch/parisc and drivers/parisc when
          compiled with W=1
      
      * tag 'parisc-for-6.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: syscalls: Avoid compiler warnings with W=1
        parisc: math-emu: Avoid compiler warnings with W=1
        parisc: Raise minimal GCC version to 12.0.0
        parisc: unwind: Avoid missing prototype warning for handle_interruption()
        parisc: smp: Add declaration for start_cpu_itimer()
        parisc: pdt: Get prototype for arch_report_meminfo()
      2a95b03d
    • Linus Torvalds's avatar
      gup: make the stack expansion warning a bit more targeted · 6cd06ab1
      Linus Torvalds authored
      I added a warning about about GUP no longer expanding the stack in
      commit a425ac53 ("gup: add warning if some caller would seem to want
      stack expansion"), but didn't really expect anybody to hit it.
      
      And it's true that nobody seems to have hit a _real_ case yet, but we
      certainly have a number of reports of false positives.  Which not only
      causes extra noise in itself, but might also end up hiding any real
      cases if they do exist.
      
      So let's tighten up the warning condition, and replace the simplistic
      
      	vma = find_vma(mm, start);
      	if (vma && (start < vma->vm_start)) {
      		WARN_ON_ONCE(vma->vm_flags & VM_GROWSDOWN);
      
      with a
      
      	vma = gup_vma_lookup(mm, start);
      
      helper function which works otherwise like just "vma_lookup()", but with
      some heuristics for when to warn about gup no longer causing stack
      expansion.
      
      In particular, don't just warn for "below the stack", but warn if it's
      _just_ below the stack (with "just below" arbitrarily defined as 64kB,
      because why not?).  And rate-limit it to at most once per hour, which
      means that any false positives shouldn't completely hide subsequent
      reports, but we won't be flooding the logs about it either.
      
      The previous code triggered when some GUP user (chromium crashpad)
      accessing past the end of the previous vma, for example.  That has never
      expanded the stack, it just causes GUP to return early, and as such we
      shouldn't be warning about it.
      
      This is still going trigger the randomized testers, but to mitigate the
      noise from that, use "dump_stack()" instead of "WARN_ON_ONCE()" to get
      the kernel call chain.  We'll get the relevant information, but syzbot
      shouldn't get too upset about it.
      
      Also, don't even bother with the GROWSUP case, which would be using
      different heuristics entirely, but only happens on parisc.
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Reported-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Reported-by: syzbot+6cf44e127903fdf9d929@syzkaller.appspotmail.com
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6cd06ab1
    • Maulik Shah's avatar
    • Krzysztof Kozlowski's avatar
      dt-bindings: cleanup DTS example whitespaces · ad5d9601
      Krzysztof Kozlowski authored
      The DTS code coding style expects spaces around '=' sign.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
      Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #display/msm
      Acked-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
      Acked-by: default avatarMike Leach <mike.leach@linaro.org>
      Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Acked-by: default avatarVinod Koul <vkoul@kernel.org>
      Link: https://lore.kernel.org/r/20230702182308.7583-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
      ad5d9601
  2. 04 Jul, 2023 18 commits
    • Linus Torvalds's avatar
      Revert ".gitignore: ignore *.cover and *.mbx" · d5280145
      Linus Torvalds authored
      This reverts commit 534066a9.
      
      It's actively detrimental in that it hides files that shouldn't be
      hidden.
      
      If I have some b4 mbx file in my git directory, it either was already
      applied with "git am" and is now stale, or maybe it's waiting for that
      to happen.  In neither case is "ignore it" the right option.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d5280145
    • Linus Torvalds's avatar
      Merge tag 'core_guards_for_6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue · 04f2933d
      Linus Torvalds authored
      Pull scope-based resource management infrastructure from Peter Zijlstra:
       "These are the first few patches in the Scope-based Resource Management
        series that introduce the infrastructure but not any conversions as of
        yet.
      
        Adding the infrastructure now allows multiple people to start using
        them.
      
        Of note is that Sparse will need some work since it doesn't yet
        understand this attribute and might have decl-after-stmt issues"
      
      * tag 'core_guards_for_6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue:
        kbuild: Drop -Wdeclaration-after-statement
        locking: Introduce __cleanup() based infrastructure
        apparmor: Free up __cleanup() name
        dmaengine: ioat: Free up __cleanup() name
      04f2933d
    • David Howells's avatar
      afs: Fix accidental truncation when storing data · 03275585
      David Howells authored
      When an AFS FS.StoreData RPC call is made, amongst other things it is
      given the resultant file size to be.  On the server, this is processed
      by truncating the file to new size and then writing the data.
      
      Now, kafs has a lock (vnode->io_lock) that serves to serialise
      operations against a specific vnode (ie.  inode), but the parameters for
      the op are set before the lock is taken.  This allows two writebacks
      (say sync and kswapd) to race - and if writes are ongoing the writeback
      for a later write could occur before the writeback for an earlier one if
      the latter gets interrupted.
      
      Note that afs_writepages() cannot take i_mutex and only takes a shared
      lock on vnode->validate_lock.
      
      Also note that the server does the truncation and the write inside a
      lock, so there's no problem at that end.
      
      Fix this by moving the calculation for the proposed new i_size inside
      the vnode->io_lock.  Also reset the iterator (which we might have read
      from) and update the mtime setting there.
      
      Fixes: bd80d8a8 ("afs: Use ITER_XARRAY for writing")
      Reported-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeffrey Altman <jaltman@auristor.com>
      Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      cc: linux-afs@lists.infradead.org
      cc: linux-fsdevel@vger.kernel.org
      Link: https://lore.kernel.org/r/3526895.1687960024@warthog.procyon.org.uk/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      03275585
    • Linus Torvalds's avatar
      Merge tag 'ovl-update-6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs · 538140ca
      Linus Torvalds authored
      Pull more overlayfs updates from Amir Goldstein:
       "This is a small 'move code around' followup by Christian to his work
        on porting overlayfs to the new mount api for 6.5. It makes things a
        bit cleaner and simpler for the next development cycle when I hand
        overlayfs back over to Miklos"
      
      * tag 'ovl-update-6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
        ovl: move all parameter handling into params.{c,h}
      538140ca
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v6.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 94c76955
      Linus Torvalds authored
      Pull gfs2 updates from Andreas Gruenbacher:
      
       - Move the freeze/thaw logic from glock callback context to process /
         worker thread context to prevent deadlocks
      
       - Fix a quota reference couting bug in do_qc()
      
       - Carry on deallocating inodes even when gfs2_rindex_update() fails
      
       - Retry filesystem-internal reads when they are interruped by a signal
      
       - Eliminate kmap_atomic() in favor of kmap_local_page() /
         memcpy_{from,to}_page()
      
       - Get rid of noop_direct_IO
      
       - And a few more minor fixes and cleanups
      
      * tag 'gfs2-v6.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (23 commits)
        gfs2: Add quota_change type
        gfs2: Use memcpy_{from,to}_page where appropriate
        gfs2: Convert remaining kmap_atomic calls to kmap_local_page
        gfs2: Replace deprecated kmap_atomic with kmap_local_page
        gfs: Get rid of unnucessary locking in inode_go_dump
        gfs2: gfs2_freeze_lock_shared cleanup
        gfs2: Replace sd_freeze_state with SDF_FROZEN flag
        gfs2: Rework freeze / thaw logic
        gfs2: Rename SDF_{FS_FROZEN => FREEZE_INITIATOR}
        gfs2: Reconfiguring frozen filesystem already rejected
        gfs2: Rename gfs2_freeze_lock{ => _shared }
        gfs2: Rename the {freeze,thaw}_super callbacks
        gfs2: Rename remaining "transaction" glock references
        gfs2: retry interrupted internal reads
        gfs2: Fix possible data races in gfs2_show_options()
        gfs2: Fix duplicate should_fault_in_pages() call
        gfs2: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method
        gfs2: Don't remember delete unless it's successful
        gfs2: Update rl_unlinked before releasing rgrp lock
        gfs2: Fix gfs2_qa_get imbalance in gfs2_quota_hold
        ...
      94c76955
    • Linus Torvalds's avatar
      Merge tag 'pm-6.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ccf46d85
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These add support for new hardware (ap807 and AM62A7), fix several
        issues in cpufreq drivers and in the operating performance points
        (OPP) framework, fix up intel_idle after recent changes and add
        documentation.
      
        Specifics:
      
         - Add missing __init annotation to one function in the intel_idle
           drvier (Rafael Wysocki)
      
         - Make intel_pstate use a correct scaling factor when mapping HWP
           performance levels to frequency values on hybrid-capable systems
           with disabled E-cores (Srinivas Pandruvada)
      
         - Fix Kconfig dependencies of the cpufreq-dt-platform driver (Viresh
           Kumar)
      
         - Add support to build cpufreq-dt-platdev as a module (Zhipeng Wang)
      
         - Don't allocate Sparc's cpufreq_driver dynamically (Viresh Kumar)
      
         - Add support for TI's AM62A7 platform (Vibhore Vardhan)
      
         - Add support for Armada's ap807 platform (Russell King (Oracle))
      
         - Add support for StarFive JH7110 SoC (Mason Huo)
      
         - Fix voltage selection for Mediatek Socs (Daniel Golle)
      
         - Fix error handling in Tegra's cpufreq driver (Christophe JAILLET)
      
         - Document Qualcomm's IPQ8074 in DT bindings (Robert Marko)
      
         - Don't warn for disabling a non-existing frequency for imx6q cpufreq
           driver (Christoph Niedermaier)
      
         - Use dev_err_probe() in Qualcomm's cpufreq driver (Andrew Halaney)
      
         - Simplify performance state related logic in the OPP core (Viresh
           Kumar)
      
         - Fix use-after-free and improve locking around lazy_opp_tables
           (Viresh Kumar, Stephan Gerhold)
      
         - Minor cleanups - using dev_err_probe() and rate-limiting debug
           messages (Andrew Halaney, Adrián Larumbe)"
      
      * tag 'pm-6.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits)
        cpufreq: intel_pstate: Fix scaling for hybrid-capable systems with disabled E-cores
        cpufreq: Make CONFIG_CPUFREQ_DT_PLATDEV depend on OF
        intel_idle: Add __init annotation to matchup_vm_state_with_baremetal()
        OPP: Properly propagate error along when failing to get icc_path
        OPP: Use dev_err_probe() when failing to get icc_path
        cpufreq: qcom-cpufreq-hw: Use dev_err_probe() when failing to get icc paths
        cpufreq: mediatek: correct voltages for MT7622 and MT7623
        cpufreq: armada-8k: add ap807 support
        OPP: Simplify the over-designed pstate <-> level dance
        OPP: pstate is only valid for genpd OPP tables
        OPP: don't drop performance constraint on OPP table removal
        OPP: Protect `lazy_opp_tables` list with `opp_table_lock`
        OPP: Staticize `lazy_opp_tables` in of.c
        cpufreq: dt-platdev: Support building as module
        opp: Fix use-after-free in lazy_opp_tables after probe deferral
        dt-bindings: cpufreq: qcom-cpufreq-nvmem: document IPQ8074
        cpufreq: dt-platdev: Blacklist ti,am62a7 SoC
        cpufreq: ti-cpufreq: Add support for AM62A7
        OPP: rate-limit debug messages when no change in OPP is required
        cpufreq: imx6q: don't warn for disabling a non-existing frequency
        ...
      ccf46d85
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · b869e9f4
      Linus Torvalds authored
      Pull more clk updates from Stephen Boyd:
       "Another set of clk driver updates and fixes for the merge window. The
        driver updates needed more time to bake in linux-next.
      
        Updates:
         - Support for more clk controllers in Qualcomm SoCs such as SM8350,
           SM8450, SDX75, SC8280XP, and IPQ9574
         - Runtime PM enablement of some more Qualcomm clk controllers
         - Various fixes to Qualcomm clk driver data to use correct clk_ops
           and to check halt bits properly
         - AT91 updates to modernize with clk_parent_data structures
      
        Fixes:
         - Remove 'syscon' from dt binding fix for ti,j721e-system-controller
         - Fix determine rate in the Tegra driver that got wrecked by the
           refactorting of muxes this merge window"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (69 commits)
        clk: tegra: Avoid calling an uninitialized function
        dt-bindings: mfd: ti,j721e-system-controller: Remove syscon from example
        clk: at91: sama7g5: s/ep_chg_chg_id/ep_chg_id
        clk: at91: sama7g5: switch to parent_hw and parent_data
        clk: at91: sckc: switch to parent_data/parent_hw
        clk: at91: clk-sam9x60-pll: add support for parent_hw
        clk: at91: clk-utmi: add support for parent_hw
        clk: at91: clk-system: add support for parent_hw
        clk: at91: clk-programmable: add support for parent_hw
        clk: at91: clk-peripheral: add support for parent_hw
        clk: at91: clk-master: add support for parent_hw
        clk: at91: clk-generated: add support for parent_hw
        clk: at91: clk-main: add support for parent_data/parent_hw
        clk: qcom: gcc-sc8280xp: Add runtime PM
        clk: qcom: gpucc-sc8280xp: Add runtime PM
        clk: qcom: mmcc-msm8974: fix MDSS_GDSC power flags
        clk: qcom: gpucc-sm6375: Enable runtime pm
        dt-bindings: clock: sm6375-gpucc: Add VDD_GX
        clk: qcom: gcc-sm6115: Add missing PLL config properties
        clk: qcom: clk-alpha-pll: Add a way to update some bits of test_ctl(_hi)
        ...
      b869e9f4
    • Linus Torvalds's avatar
      Merge tag 'firewire-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 · 406fb9eb
      Linus Torvalds authored
      Pull firewire updates from Takashi Sakamoto:
       "This consist of three parts; UAPI update, OHCI driver update, and
        several bug fixes.
      
        Firstly, the 1394 OHCI specification defines method to retrieve
        hardware time stamps for asynchronous communication, which was
        previously unavailable in user space. This adds new events to the
        UAPI, allowing applications to retrieve the time when asynchronous
        packet are received and sent. The new events are tested in the
        bleeding edge of libhinawa and look to work well. The new version of
        libhinawa will be released after current merge window is closed:
      
          https://git.kernel.org/pub/scm/libs/ieee1394/libhinawa.git/
      
        Secondly, the FireWire stack includes a PCM device driver for 1394
        OHCI hardware, This change modernizes the driver by managed resource
        (devres) framework.
      
        Lastly, bug fixes for firewire-net and firewire-core"
      
      * tag 'firewire-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: (25 commits)
        firewire: net: fix use after free in fwnet_finish_incoming_packet()
        firewire: core: obsolete usage of GFP_ATOMIC at building node tree
        firewire: ohci: release buffer for AR req/resp contexts when managed resource is released
        firewire: ohci: use devres for content of configuration ROM
        firewire: ohci: use devres for IT, IR, AT/receive, and AT/request contexts
        firewire: ohci: use devres for list of isochronous contexts
        firewire: ohci: use devres for requested IRQ
        firewire: ohci: use devres for misc DMA buffer
        firewire: ohci: use devres for MMIO region mapping
        firewire: ohci: use devres for PCI-related resources
        firewire: ohci: use devres for memory object of ohci structure
        firewire: fix warnings to generate UAPI documentation
        firewire: fix build failure due to missing module license
        firewire: cdev: implement new event relevant to phy packet with time stamp
        firewire: cdev: add new event to notify phy packet with time stamp
        firewire: cdev: code refactoring to dispatch event for phy packet
        firewire: cdev: implement new event to notify response subaction with time stamp
        firewire: cdev: add new event to notify response subaction with time stamp
        firewire: cdev: code refactoring to operate event of response
        firewire: core: implement variations to send request and wait for response with time stamp
        ...
      406fb9eb
    • Linus Torvalds's avatar
      module: fix init_module_from_file() error handling · f1962207
      Linus Torvalds authored
      Vegard Nossum pointed out two different problems with the error handling
      in init_module_from_file():
      
       (a) the idempotent loading code didn't clean up properly in some error
           cases, leaving the on-stack 'struct idempotent' element still in
           the hash table
      
       (b) failure to read the module file would nonsensically update the
           'invalid_kread_bytes' stat counter with the error value
      
      The first error is quite nasty, in that it can then cause subsequent
      idempotent loads of that same file to access stale stack contents of the
      previous failure.  The case may not happen in any normal situation
      (explaining all the "Tested-by's on the original change), and requires
      admin privileges, but syzkaller triggers random bad behavior as a
      result:
      
          BUG: soft lockup in sys_finit_module
          BUG: unable to handle kernel paging request in init_module_from_file
          general protection fault in init_module_from_file
          INFO: task hung in init_module_from_file
          KASAN: out-of-bounds Read in init_module_from_file
          KASAN: slab-out-of-bounds Read in init_module_from_file
          ...
      
      The second error is fairly benign and just leads to nonsensical stats
      (and has been around since the debug stats were added).
      
      Vegard also provided a patch for the idempotent loading issue, but I'd
      rather re-organize the code and make it more legible using another level
      of helper functions than add the usual "goto out" error handling.
      
      Link: https://lore.kernel.org/lkml/20230704100852.23452-1-vegard.nossum@oracle.com/
      Fixes: 9b9879fc ("modules: catch concurrent module loads, treat them as idempotent")
      Reported-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
      Reported-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
      Reported-by: syzbot+9c2bdc9d24e4a7abe741@syzkaller.appspotmail.com
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f1962207
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-cpuidle' · 40c565a4
      Rafael J. Wysocki authored
      Merge CPU power management updates for 6.5-rc1:
      
       - Add missing __init annotation to one function in the intel_idle
         drvier (Rafael Wysocki).
      
       - Make intel_pstate use a correct scaling factor when mapping HWP
         performance levels to frequency values on hybrid-capable systems
         with disabled E-cores (Srinivas Pandruvada).
      
       - Fix Kconfig dependencies of the cpufreq-dt-platform driver (Viresh
         Kumar).
      
       - Add support to build cpufreq-dt-platdev as a module (Zhipeng Wang).
      
       - Don't allocate Sparc's cpufreq_driver dynamically (Viresh Kumar).
      
       - Add support for TI's AM62A7 platform (Vibhore Vardhan).
      
       - Add support for Armada's ap807 platform (Russell King (Oracle)).
      
       - Add support for StarFive JH7110 SoC (Mason Huo).
      
       - Fix voltage selection for Mediatek Socs (Daniel Golle).
      
       - Fix error handling in Tegra's cpufreq driver (Christophe JAILLET).
      
       - Document Qualcomm's IPQ8074 in DT bindings (Robert Marko).
      
       - Don't warn for disabling a non-existing frequency for imx6q cpufreq
         driver (Christoph Niedermaier).
      
       - Use dev_err_probe() in Qualcomm's cpufreq driver (Andrew Halaney).
      
      * pm-cpufreq:
        cpufreq: intel_pstate: Fix scaling for hybrid-capable systems with disabled E-cores
        cpufreq: Make CONFIG_CPUFREQ_DT_PLATDEV depend on OF
        cpufreq: qcom-cpufreq-hw: Use dev_err_probe() when failing to get icc paths
        cpufreq: mediatek: correct voltages for MT7622 and MT7623
        cpufreq: armada-8k: add ap807 support
        cpufreq: dt-platdev: Support building as module
        dt-bindings: cpufreq: qcom-cpufreq-nvmem: document IPQ8074
        cpufreq: dt-platdev: Blacklist ti,am62a7 SoC
        cpufreq: ti-cpufreq: Add support for AM62A7
        cpufreq: imx6q: don't warn for disabling a non-existing frequency
        cpufreq: sparc: Don't allocate cpufreq_driver dynamically
        cpufreq: tegra194: Fix an error handling path in tegra194_cpufreq_probe()
        cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
      
      * pm-cpuidle:
        intel_idle: Add __init annotation to matchup_vm_state_with_baremetal()
      40c565a4
    • Thierry Reding's avatar
      clk: tegra: Avoid calling an uninitialized function · f679e89a
      Thierry Reding authored
      Commit 493ffb04 ("clk: tegra: super: Switch to determine_rate")
      replaced clk_super_round_rate() by clk_super_determine_rate(), but
      didn't update one callsite that was explicitly calling the old
      tegra_clk_super_ops.round_rate() function, which was now NULL. This
      resulted in a crash on Tegra30 systems during early boot.
      
      Switch this callsite over to the clk_super_determine_rate() equivalent
      to avoid the crash.
      
      Fixes: 493ffb04 ("clk: tegra: super: Switch to determine_rate")
      Tested-by: default avatarDmitry Osipenko <digetx@gmail.com>
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Link: https://lore.kernel.org/r/20230630130748.840729-1-thierry.reding@gmail.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      f679e89a
    • Linus Torvalds's avatar
      mm: don't do validate_mm() unnecessarily and without mmap locking · b5641a5d
      Linus Torvalds authored
      This is an addition to commit ae80b404 ("mm: validate the mm before
      dropping the mmap lock"), because it turns out there were two problems,
      but lockdep just stopped complaining after finding the first one.
      
      The do_vmi_align_munmap() function now drops the mmap lock after doing
      the validate_mm() call, but it turns out that one of the callers then
      immediately calls validate_mm() again.
      
      That's both a bit silly, and now (again) happens without the mmap lock
      held.
      
      So just remove that validate_mm() call from the caller, but make sure to
      not lose any coverage by doing that mm sanity checking in the error path
      of do_vmi_align_munmap() too.
      Reported-and-tested-by: default avatarkernel test robot <oliver.sang@intel.com>
      Link: https://lore.kernel.org/lkml/ZKN6CdkKyxBShPHi@xsang-OptiPlex-9020/
      Fixes: 408579cd ("mm: Update do_vmi_align_munmap() return semantics")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b5641a5d
    • SeongJae Park's avatar
      arch/arm64/mm/fault: Fix undeclared variable error in do_page_fault() · 24be4d0b
      SeongJae Park authored
      Commit ae870a68 ("arm64/mm: Convert to using
      lock_mm_and_find_vma()") made do_page_fault() to use 'vma' even if
      CONFIG_PER_VMA_LOCK is not defined, but the declaration is still in the
      ifdef.
      
      As a result, building kernel without the config fails with undeclared
      variable error as below:
      
          arch/arm64/mm/fault.c: In function 'do_page_fault':
          arch/arm64/mm/fault.c:624:2: error: 'vma' undeclared (first use in this function); did you mean 'vmap'?
            624 |  vma = lock_mm_and_find_vma(mm, addr, regs);
                |  ^~~
                |  vmap
      
      Fix it by moving the declaration out of the ifdef.
      
      Fixes: ae870a68 ("arm64/mm: Convert to using lock_mm_and_find_vma()")
      Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      24be4d0b
    • Linus Torvalds's avatar
      Merge tag 'block-6.5-2023-07-03' of git://git.kernel.dk/linux · e50df249
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
       "Mostly items that came in a bit late for the initial pull request,
        wanted to make sure they had the appropriate amount of linux-next soak
        before going upstream.
      
        Outside of stragglers, just generic fixes for either merge window
        items, or longer standing bugs"
      
      * tag 'block-6.5-2023-07-03' of git://git.kernel.dk/linux: (25 commits)
        md/raid0: add discard support for the 'original' layout
        nvme: disable controller on reset state failure
        nvme: sync timeout work on failed reset
        nvme: ensure unquiesce on teardown
        cdrom/gdrom: Fix build error
        nvme: improved uring polling
        block: add request polling helper
        nvme-mpath: fix I/O failure with EAGAIN when failing over I/O
        nvme: host: fix command name spelling
        blk-sysfs: add a new attr_group for blk_mq
        blk-iocost: move wbt_enable/disable_default() out of spinlock
        blk-wbt: cleanup rwb_enabled() and wbt_disabled()
        blk-wbt: remove dead code to handle wbt enable/disable with io inflight
        blk-wbt: don't create wbt sysfs entry if CONFIG_BLK_WBT is disabled
        blk-mq: fix two misuses on RQF_USE_SCHED
        blk-throttle: Fix io statistics for cgroup v1
        bcache: Fix bcache device claiming
        bcache: Alloc holder object before async registration
        raid10: avoid spin_lock from fastpath from raid10_unplug()
        md: fix 'delete_mutex' deadlock
        ...
      e50df249
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.5-2023-07-03' of git://git.kernel.dk/linux · 4f528753
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "The fix for the msghdr->msg_inq assigned value being wrong, using -1
        instead of -1U for the signed type.
      
        Also a fix for ensuring when we're trying to run task_work on an
        exiting task, that we wait for it. This is not really a correctness
        thing as the work is being canceled, but it does help with ensuring
        file descriptors are closed when the task has exited."
      
      * tag 'io_uring-6.5-2023-07-03' of git://git.kernel.dk/linux:
        io_uring: flush offloaded and delayed task_work on exit
        io_uring: remove io_fallback_tw() forward declaration
        io_uring/net: use proper value for msg_inq
      4f528753
    • Linus Torvalds's avatar
      Merge tag 'hsi-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi · 69c9f230
      Linus Torvalds authored
      Pull HSI updates from Sebastian Reichel:
      
       - fix build warning with W=1
      
       - drop error handling for debugfs
      
      * tag 'hsi-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
        HSI: omap_ssi_port: Drop error checking for debugfs_create_dir
        HSI: fix ssi_waketest() declaration
      69c9f230
    • Linus Torvalds's avatar
      Merge tag 'for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 0df24138
      Linus Torvalds authored
      Pull power supply and reset updates from Sebastian Reichel:
      
       - Add new Qualcomm PMI8998/PM660 SMB2 charger
      
       - bq256xx: support systems without thermistors
      
       - cros_pchg: fix peripheral device status after system resume
      
       - axp20x_usb_power: add support for AXP192
      
       - qcom-pon: add support for pm8941
      
       - at91-reset: prepare to expose reset reason to sysfs
      
       - switch all I2C drivers back to use .probe instead of .probe_new
      
       - convert some more DT bindings to YAML
      
       - misc cleanups
      
      * tag 'for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits)
        MAINTAINERS: add documentation file for Microchip SAMA5D2 shutdown controller
        dt-bindings: power: reset: atmel,sama5d2-shdwc: convert to yaml
        dt-bindings: power: reset: atmel,at91sam9260-shdwc: convert to yaml
        power: reset: at91-reset: change the power on reason prototype
        power: reset: qcom-pon: add support for pm8941-pon
        dt-bindings: power: reset: qcom-pon: define pm8941-pon
        power: supply: add Qualcomm PMI8998 SMB2 Charger driver
        dt-bindings: power: supply: qcom,pmi8998-charger: add bindings for smb2 driver
        power: supply: rt9467: Make charger-enable control as logic level
        power: supply: Switch i2c drivers back to use .probe()
        power: reset: add HAS_IOPORT dependencies
        dt-bindings: power: supply: axp20x: Add AXP192 compatible
        power: supply: axp20x_usb_power: Add support for AXP192
        power: supply: axp20x_usb_power: Remove variant IDs from VBUS polling check
        power: supply: axp20x_usb_power: Use regmap field for VBUS disabling
        power: supply: axp20x_usb_power: Use regmap fields for USB BC feature
        power: supply: axp20x_usb_power: Use regmap fields for VBUS monitor feature
        power: supply: axp20x_usb_power: Simplify USB current limit handling
        power: supply: hwmon: constify pointers to hwmon_channel_info
        power: supply: twl4030_madc_battery: Refactor twl4030_madc_bat_ext_changed()
        ...
      0df24138
    • Linus Torvalds's avatar
      Merge tag 'rproc-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 02676ecc
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "The bulk of these patches relates to the moving to a void-returning
        remove callback.
      
        The i.MX HiFi remoteproc driver gets its pm_ops helpers updated to
        resolve build warnings about 'defined but not used' variables in
        certain configurations.
      
        The ST STM32 remoteproc driver is extended to allow using a SCMI reset
        controller to hold boot, and has an error message corrected.
      
        The Qualcomm Q6V5 PAS driver gains a missing 'static' qualifier on
        adsp_segment_dump()"
      
      * tag 'rproc-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (23 commits)
        remoteproc: qcom_q6v5_pas: staticize adsp_segment_dump()
        remoteproc: stm32: Fix error code in stm32_rproc_parse_dt()
        remoteproc: stm32: Allow hold boot management by the SCMI reset controller
        dt-bindings: remoteproc: st,stm32-rproc: Rework reset declarations
        remoteproc: imx_dsp_rproc: use modern pm_ops
        remoteproc: wkup_m3: Convert to platform remove callback returning void
        remoteproc: stm32: Convert to platform remove callback returning void
        remoteproc: st: Convert to platform remove callback returning void
        remoteproc: virtio: Convert to platform remove callback returning void
        remoteproc: rcar: Convert to platform remove callback returning void
        remoteproc: qcom_wcnss: Convert to platform remove callback returning void
        remoteproc: qcom_q6v5_wcss: Convert to platform remove callback returning void
        remoteproc: qcom_q6v5_pas: Convert to platform remove callback returning void
        remoteproc: qcom_q6v5_mss: Convert to platform remove callback returning void
        remoteproc: qcom_q6v5_adsp: Convert to platform remove callback returning void
        remoteproc: pru: Convert to platform remove callback returning void
        remoteproc: omap: Convert to platform remove callback returning void
        remoteproc: mtk_scp: Convert to platform remove callback returning void
        remoteproc: meson_mx_ao_arc: Convert to platform remove callback returning void
        remoteproc: keystone: Convert to platform remove callback returning void
        ...
      02676ecc
  3. 03 Jul, 2023 12 commits
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 6afb24a0
      Linus Torvalds authored
      Pull hwspinlock update from Bjorn Andersson:
       "This drops the last of_match_ptr() from the hwspinlock drivers,
        solving the resulting 'defined but not used' warning/error"
      
      * tag 'hwlock-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        hwspinlock: omap: drop of_match_ptr for ID table
      6afb24a0
    • Arnd Bergmann's avatar
      rdma: fix INFINIBAND_USER_ACCESS dependency · b39aeb33
      Arnd Bergmann authored
      After a change to the bnxt_re driver, it fails to link when
      CONFIG_INFINIBAND_USER_ACCESS is disabled:
      
        aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o: in function `bnxt_re_handler_BNXT_RE_METHOD_ALLOC_PAGE':
        ib_verbs.c:(.text+0xd64): undefined reference to `ib_uverbs_get_ucontext_file'
        aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o:(.rodata+0x168): undefined reference to `uverbs_idr_class'
        aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o:(.rodata+0x1a8): undefined reference to `uverbs_destroy_def_handler'
      
      The problem is that the 'bnxt_re_uapi_defs' structure is built
      unconditionally and references a couple of functions that are never
      really called in this configuration but instead require other functions
      that are left out.
      
      Adding an #ifdef around the new code, or a Kconfig dependency would
      address this problem, but adding the compile-time check inside of the
      UAPI_DEF_CHAIN_OBJ_TREE_NAMED() macro seems best because that also
      addresses the problem in other drivers that may run into the same
      dependency.
      
      Fixes: 360da60d ("RDMA/bnxt_re: Enable low latency push")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b39aeb33
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · a8d70602
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
      
       - resume support in vdpa/solidrun
      
       - structure size optimizations in virtio_pci
      
       - new pds_vdpa driver
      
       - immediate initialization mechanism for vdpa/ifcvf
      
       - interrupt bypass for vdpa/mlx5
      
       - multiple worker support for vhost
      
       - viirtio net in Intel F2000X-PL support for vdpa/ifcvf
      
       - fixes, cleanups all over the place
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (48 commits)
        vhost: Make parameter name match of vhost_get_vq_desc()
        vduse: fix NULL pointer dereference
        vhost: Allow worker switching while work is queueing
        vhost_scsi: add support for worker ioctls
        vhost: allow userspace to create workers
        vhost: replace single worker pointer with xarray
        vhost: add helper to parse userspace vring state/file
        vhost: remove vhost_work_queue
        vhost_scsi: flush IO vqs then send TMF rsp
        vhost_scsi: convert to vhost_vq_work_queue
        vhost_scsi: make SCSI cmd completion per vq
        vhost_sock: convert to vhost_vq_work_queue
        vhost: convert poll work to be vq based
        vhost: take worker or vq for flushing
        vhost: take worker or vq instead of dev for queueing
        vhost, vhost_net: add helper to check if vq has work
        vhost: add vhost_worker pointer to vhost_virtqueue
        vhost: dynamically allocate vhost_worker
        vhost: create worker at end of vhost_dev_set_owner
        virtio_bt: call scheduler when we free unused buffs
        ...
      a8d70602
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · e8069f5a
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "ARM64:
      
         - Eager page splitting optimization for dirty logging, optionally
           allowing for a VM to avoid the cost of hugepage splitting in the
           stage-2 fault path.
      
         - Arm FF-A proxy for pKVM, allowing a pKVM host to safely interact
           with services that live in the Secure world. pKVM intervenes on
           FF-A calls to guarantee the host doesn't misuse memory donated to
           the hyp or a pKVM guest.
      
         - Support for running the split hypervisor with VHE enabled, known as
           'hVHE' mode. This is extremely useful for testing the split
           hypervisor on VHE-only systems, and paves the way for new use cases
           that depend on having two TTBRs available at EL2.
      
         - Generalized framework for configurable ID registers from userspace.
           KVM/arm64 currently prevents arbitrary CPU feature set
           configuration from userspace, but the intent is to relax this
           limitation and allow userspace to select a feature set consistent
           with the CPU.
      
         - Enable the use of Branch Target Identification (FEAT_BTI) in the
           hypervisor.
      
         - Use a separate set of pointer authentication keys for the
           hypervisor when running in protected mode, as the host is untrusted
           at runtime.
      
         - Ensure timer IRQs are consistently released in the init failure
           paths.
      
         - Avoid trapping CTR_EL0 on systems with Enhanced Virtualization
           Traps (FEAT_EVT), as it is a register commonly read from userspace.
      
         - Erratum workaround for the upcoming AmpereOne part, which has
           broken hardware A/D state management.
      
        RISC-V:
      
         - Redirect AMO load/store misaligned traps to KVM guest
      
         - Trap-n-emulate AIA in-kernel irqchip for KVM guest
      
         - Svnapot support for KVM Guest
      
        s390:
      
         - New uvdevice secret API
      
         - CMM selftest and fixes
      
         - fix racy access to target CPU for diag 9c
      
        x86:
      
         - Fix missing/incorrect #GP checks on ENCLS
      
         - Use standard mmu_notifier hooks for handling APIC access page
      
         - Drop now unnecessary TR/TSS load after VM-Exit on AMD
      
         - Print more descriptive information about the status of SEV and
           SEV-ES during module load
      
         - Add a test for splitting and reconstituting hugepages during and
           after dirty logging
      
         - Add support for CPU pinning in demand paging test
      
         - Add support for AMD PerfMonV2, with a variety of cleanups and minor
           fixes included along the way
      
         - Add a "nx_huge_pages=never" option to effectively avoid creating NX
           hugepage recovery threads (because nx_huge_pages=off can be toggled
           at runtime)
      
         - Move handling of PAT out of MTRR code and dedup SVM+VMX code
      
         - Fix output of PIC poll command emulation when there's an interrupt
      
         - Add a maintainer's handbook to document KVM x86 processes,
           preferred coding style, testing expectations, etc.
      
         - Misc cleanups, fixes and comments
      
        Generic:
      
         - Miscellaneous bugfixes and cleanups
      
        Selftests:
      
         - Generate dependency files so that partial rebuilds work as
           expected"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (153 commits)
        Documentation/process: Add a maintainer handbook for KVM x86
        Documentation/process: Add a label for the tip tree handbook's coding style
        KVM: arm64: Fix misuse of KVM_ARM_VCPU_POWER_OFF bit index
        RISC-V: KVM: Remove unneeded semicolon
        RISC-V: KVM: Allow Svnapot extension for Guest/VM
        riscv: kvm: define vcpu_sbi_ext_pmu in header
        RISC-V: KVM: Expose IMSIC registers as attributes of AIA irqchip
        RISC-V: KVM: Add in-kernel virtualization of AIA IMSIC
        RISC-V: KVM: Expose APLIC registers as attributes of AIA irqchip
        RISC-V: KVM: Add in-kernel emulation of AIA APLIC
        RISC-V: KVM: Implement device interface for AIA irqchip
        RISC-V: KVM: Skeletal in-kernel AIA irqchip support
        RISC-V: KVM: Set kvm_riscv_aia_nr_hgei to zero
        RISC-V: KVM: Add APLIC related defines
        RISC-V: KVM: Add IMSIC related defines
        RISC-V: KVM: Implement guest external interrupt line management
        KVM: x86: Remove PRIx* definitions as they are solely for user space
        s390/uv: Update query for secret-UVCs
        s390/uv: replace scnprintf with sysfs_emit
        s390/uvdevice: Add 'Lock Secret Store' UVC
        ...
      e8069f5a
    • Linus Torvalds's avatar
      Merge tag 'kgdb-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux · eded3777
      Linus Torvalds authored
      Pull kgdb updates from Daniel Thompson:
       "Fairly small changes this cycle:
      
         - An additional static inline function when kgdb is not enabled to
           reduce boilerplate in arch files
      
         - kdb will now handle input with linefeeds more like carriage return.
           This will make little difference for interactive use but can make
           it script to use expect-like interaction with kdb
      
         - A couple of warning fixes"
      
      * tag 'kgdb-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
        kdb: move kdb_send_sig() declaration to a better header file
        kdb: Handle LF in the command parser
        kdb: include kdb_private.h for function prototypes
        kgdb: Provide a stub kgdb_nmicallback() if !CONFIG_KGDB
      eded3777
    • Bob Peterson's avatar
      gfs2: Add quota_change type · 432928c9
      Bob Peterson authored
      Function do_qc has two main uses: (1) to re-sync the local quota changes
      (qd) to the master quotas, and (2) normal quota changes. In the case of
      normal quota changes, the change can be positive or negative, as the
      quota usage goes up and down.
      
      Before this patch function do_qc was distinguishing one from another by
      whether the resulting value is or isn't zero: In the case of a re-sync
      (called do_sync) the quota value is moved from the temporary value to a
      master value, so the amount is added to one and subtracted from the
      other. The problem is that since the values can be positive or negative
      we can occasionally run into situations where we are not doing a re-sync
      but the quota change just happens to cancel out the previous value.
      
      In the case of a re-sync extra references and locks are taken, and so
      do_qc needs to release them. In the case of a normal quota change, no
      extra references and locks are taken, so it must not try to release
      them.
      
      The problem is: if the quota change is not a re-sync but the value just
      happens to cancel out the original quota change, the resulting zero
      value fools do_qc into thinking this is a re-sync and therefore it must
      release the extra references. This results in problems, mainly having to
      do with slot reference numbers going smaller than zero.
      
      This patch introduces new constants, QC_SYNC and QC_CHANGE so do_qc can
      really tell the difference. For QC_SYNC calls it must release the extra
      references acquired by gfs2_quota_unlock's call to qd_check_sync. For
      QC_CHANGE calls it does not have extra references to put.
      
      Note that this allows quota changes back to a value of zero, and so I
      removed an assert warning related to that.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      432928c9
    • Andreas Gruenbacher's avatar
      gfs2: Use memcpy_{from,to}_page where appropriate · d68d0c6c
      Andreas Gruenbacher authored
      Replace kmap_local_page() + memcpy() + kunmap_local() sequences with
      memcpy_{from,to}_page() where we are not doing anything else with the
      mapped page.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      d68d0c6c
    • Andreas Gruenbacher's avatar
      gfs2: Convert remaining kmap_atomic calls to kmap_local_page · b0c21c6d
      Andreas Gruenbacher authored
      Replace the remaining instances of kmap_atomic() ... kunmap_atomic()
      with kmap_local_page() ... kunmap_local().
      
      In gfs2_write_buf_to_page(), we can call flush_dcache_page() after
      unmapping the page.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      b0c21c6d
    • Deepak R Varma's avatar
      gfs2: Replace deprecated kmap_atomic with kmap_local_page · 58721bd4
      Deepak R Varma authored
      kmap_atomic() is deprecated in favor of kmap_local_{folio,page}().
      
      Therefore, replace kmap_atomic() with kmap_local_page() in
      gfs2_internal_read() and stuffed_readpage().
      
      kmap_atomic() disables page-faults and preemption (the latter only for
      !PREEMPT_RT kernels), However, the code within the mapping/un-mapping in
      gfs2_internal_read() and stuffed_readpage() does not depend on the
      above-mentioned side effects.
      
      Therefore, a mere replacement of the old API with the new one is all that
      is required (i.e., there is no need to explicitly add any calls to
      pagefault_disable() and/or preempt_disable()).
      Signed-off-by: default avatarDeepak R Varma <drv@mailo.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      58721bd4
    • Andreas Gruenbacher's avatar
      gfs: Get rid of unnucessary locking in inode_go_dump · f246dd4b
      Andreas Gruenbacher authored
      Commit 27a2660f ("gfs2: Dump nrpages for inodes and their glocks")
      added some locking around reading inode->i_data.nrpages.  That locking
      doesn't do anything really, so get rid of it.
      
      With that, the glock argument to ->go_dump() can be made const again as
      well.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      f246dd4b
    • Andreas Gruenbacher's avatar
      gfs2: gfs2_freeze_lock_shared cleanup · 6c7410f4
      Andreas Gruenbacher authored
      All the remaining users of gfs2_freeze_lock_shared() set freeze_gh to
      &sdp->sd_freeze_gh and flags to 0, so remove those two parameters.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      6c7410f4
    • Andreas Gruenbacher's avatar
      gfs2: Replace sd_freeze_state with SDF_FROZEN flag · 5432af15
      Andreas Gruenbacher authored
      Replace sd_freeze_state with a new SDF_FROZEN flag.
      
      There no longer is a need for indicating that a freeze is in progress
      (SDF_STARTING_FREEZE); we are now protecting the critical sections with
      the sd_freeze_mutex.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      5432af15