1. 29 Apr, 2023 10 commits
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-6.4-1' of git://git.linux-nfs.org/projects/anna/linux-nfs · 0127f25b
      Linus Torvalds authored
      Pull NFS client updates from Anna Schumaker:
       "New Features:
      
         - Convert the readdir path to use folios
      
         - Convert the NFS fscache code to use netfs
      
        Bugfixes and Cleanups:
      
         - Always send a RECLAIM_COMPLETE after establishing a lease
      
         - Simplify sysctl registrations and other cleanups
      
         - Handle out-of-order write replies on NFS v3
      
         - Have sunrpc call_bind_status use standard hard/soft task semantics
      
         - Other minor cleanups"
      
      * tag 'nfs-for-6.4-1' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        NFSv4.2: Rework scratch handling for READ_PLUS
        NFS: Cleanup unused rpc_clnt variable
        NFS: set varaiable nfs_netfs_debug_id storage-class-specifier to static
        SUNRPC: remove the maximum number of retries in call_bind_status
        NFS: Convert readdir page array functions to use a folio
        NFS: Convert the readdir array-of-pages into an array-of-folios
        NFSv3: handle out-of-order write replies.
        NFS: Remove fscache specific trace points and NFS_INO_FSCACHE bit
        NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API
        NFS: Convert buffered read paths to use netfs when fscache is enabled
        NFS: Configure support for netfs when NFS fscache is configured
        NFS: Rename readpage_async_filler to nfs_read_add_folio
        sunrpc: simplify one-level sysctl registration for debug_table
        sunrpc: move sunrpc_table and proc routines above
        sunrpc: simplify one-level sysctl registration for xs_tunables_table
        sunrpc: simplify one-level sysctl registration for xr_tunables_table
        nfs: simplify two-level sysctl registration for nfs_cb_sysctls
        nfs: simplify two-level sysctl registration for nfs4_cb_sysctls
        lockd: simplify two-level sysctl registration for nlm_sysctls
        NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease
      0127f25b
    • Linus Torvalds's avatar
      Merge tag 'ntfs3_for_6.4' of https://github.com/Paragon-Software-Group/linux-ntfs3 · 1e098dec
      Linus Torvalds authored
      Pull ntfs3 updates from Konstantin Komarov:
       "New code:
      
         - add missed "nocase" in ntfs_show_options
      
         - extend information on failures/errors
      
         - small optimizations
      
        Fixes:
      
         - some logic errors
      
         - some dead code was removed
      
         - code is refactored and reformatted according to the new version of
           clang-format
      
        Code removal:
      
         - 'noacsrules' option.
      
           Currently, this option does not work properly, and its use leads to
           unstable results. If we figure out how to implement it without
           errors, we will add it later
      
         - writepage"
      
      * tag 'ntfs3_for_6.4' of https://github.com/Paragon-Software-Group/linux-ntfs3: (30 commits)
        fs/ntfs3: Fix root inode checking
        fs/ntfs3: Print details about mount fails
        fs/ntfs3: Add missed "nocase" in ntfs_show_options
        fs/ntfs3: Code formatting and refactoring
        fs/ntfs3: Changed ntfs_get_acl() to use dentry
        fs/ntfs3: Remove field sbi->used.bitmap.set_tail
        fs/ntfs3: Undo critial modificatins to keep directory consistency
        fs/ntfs3: Undo endian changes
        fs/ntfs3: Optimization in ntfs_set_state()
        fs/ntfs3: Fix ntfs_create_inode()
        fs/ntfs3: Remove noacsrules
        fs/ntfs3: Use bh_read to simplify code
        fs/ntfs3: Fix a possible null-pointer dereference in ni_clear()
        fs/ntfs3: Refactoring of various minor issues
        fs/ntfs3: Restore overflow checking for attr size in mi_enum_attr
        fs/ntfs3: Check for extremely large size of $AttrDef
        fs/ntfs3: Improved checking of attribute's name length
        fs/ntfs3: Add null pointer checks
        fs/ntfs3: fix spelling mistake "attibute" -> "attribute"
        fs/ntfs3: Add length check in indx_get_root
        ...
      1e098dec
    • Linus Torvalds's avatar
      Merge tag 'xfs-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 56c455b3
      Linus Torvalds authored
      Pull xfs updates from Dave Chinner:
       "This consists mainly of online scrub functionality and the design
        documentation for the upcoming online repair functionality built on
        top of the scrub code:
      
         - Added detailed design documentation for the upcoming online repair
           feature
      
         - major update to online scrub to complete the reverse mapping
           cross-referencing infrastructure enabling us to fully validate
           allocated metadata against owner records. This is the last piece of
           scrub infrastructure needed before we can start merging online
           repair functionality.
      
         - Fixes for the ascii-ci hashing issues
      
         - deprecation of the ascii-ci functionality
      
         - on-disk format verification bug fixes
      
         - various random bug fixes for syzbot and other bug reports"
      
      * tag 'xfs-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (107 commits)
        xfs: fix livelock in delayed allocation at ENOSPC
        xfs: Extend table marker on deprecated mount options table
        xfs: fix duplicate includes
        xfs: fix BUG_ON in xfs_getbmap()
        xfs: verify buffer contents when we skip log replay
        xfs: _{attr,data}_map_shared should take ILOCK_EXCL until iread_extents is completely done
        xfs: remove WARN when dquot cache insertion fails
        xfs: don't consider future format versions valid
        xfs: deprecate the ascii-ci feature
        xfs: test the ascii case-insensitive hash
        xfs: stabilize the dirent name transformation function used for ascii-ci dir hash computation
        xfs: cross-reference rmap records with refcount btrees
        xfs: cross-reference rmap records with inode btrees
        xfs: cross-reference rmap records with free space btrees
        xfs: cross-reference rmap records with ag btrees
        xfs: introduce bitmap type for AG blocks
        xfs: convert xbitmap to interval tree
        xfs: drop the _safe behavior from the xbitmap foreach macro
        xfs: don't load local xattr values during scrub
        xfs: remove the for_each_xbitmap_ helpers
        ...
      56c455b3
    • Linus Torvalds's avatar
      Merge tag 'iomap-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · bedf1495
      Linus Torvalds authored
      Pull iomap updates from Darrick Wong:
       "The only changes for this cycle are the addition of tracepoints to the
        iomap directio code so that Ritesh (who is working on porting ext2 to
        iomap) can observe the io flows more easily.
      
        Summary:
      
         - Remove an unused symbol
      
         - Add tracepoints for the directio code"
      
      * tag 'iomap-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        iomap: Add DIO tracepoints
        iomap: Remove IOMAP_DIO_NOSYNC unused dio flag
        fs.h: Add TRACE_IOCB_STRINGS for use in trace points
      bedf1495
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.4-2023-04-28' of git://git.infradead.org/users/hch/dma-mapping · b28e6315
      Linus Torvalds authored
      Pull dma-mapping updates from Christoph Hellwig:
      
       - fix a PageHighMem check in dma-coherent initialization (Doug Berger)
      
       - clean up the coherency defaul initialiation (Jiaxun Yang)
      
       - add cacheline to user/kernel dma-debug space dump messages (Desnes
         Nunes, Geert Uytterhoeve)
      
       - swiotlb statistics improvements (Michael Kelley)
      
       - misc cleanups (Petr Tesarik)
      
      * tag 'dma-mapping-6.4-2023-04-28' of git://git.infradead.org/users/hch/dma-mapping:
        swiotlb: Omit total_used and used_hiwater if !CONFIG_DEBUG_FS
        swiotlb: track and report io_tlb_used high water marks in debugfs
        swiotlb: fix debugfs reporting of reserved memory pools
        swiotlb: relocate PageHighMem test away from rmem_swiotlb_setup
        of: address: always use dma_default_coherent for default coherency
        dma-mapping: provide CONFIG_ARCH_DMA_DEFAULT_COHERENT
        dma-mapping: provide a fallback dma_default_coherent
        dma-debug: Use %pa to format phys_addr_t
        dma-debug: add cacheline to user/kernel space dump messages
        dma-debug: small dma_debug_entry's comment and variable name updates
        dma-direct: cleanup parameters to dma_direct_optimal_gfp_mask
      b28e6315
    • Linus Torvalds's avatar
      Merge tag 'timers-core-2023-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7d8d2019
      Linus Torvalds authored
      Pull more timer updates from Thomas Gleixner:
       "Timekeeping and clocksource/event driver updates the second batch:
      
         - A trivial documentation fix in the timekeeping core
      
         - A really boring set of small fixes, enhancements and cleanups in
           the drivers code. No new clocksource/clockevent drivers for a
           change"
      
      * tag 'timers-core-2023-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timekeeping: Fix references to nonexistent ktime_get_fast_ns()
        dt-bindings: timer: rockchip: Add rk3588 compatible
        dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible
        clocksource/drivers/ti: Use of_property_read_bool() for boolean properties
        clocksource/drivers/timer-ti-dm: Fix finding alwon timer
        clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails
        clocksource/drivers/stm32-lp: Drop of_match_ptr for ID table
        clocksource/drivers/timer-ti-dm: Convert to platform remove callback returning void
        clocksource/drivers/timer-tegra186: Convert to platform remove callback returning void
        clocksource/drivers/timer-ti-dm: Improve error message in .remove
        clocksource/drivers/timer-stm32-lp: Mark driver as non-removable
        clocksource/drivers/sh_mtu2: Mark driver as non-removable
        clocksource/drivers/timer-ti-dm: Use of_address_to_resource()
        clocksource/drivers/timer-imx-gpt: Remove non-DT function
        clocksource/drivers/timer-mediatek: Split out CPUXGPT timers
        clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer
      7d8d2019
    • Linus Torvalds's avatar
      Merge tag 'lsm-pr-20230428' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm · 8c1318e4
      Linus Torvalds authored
      Pull lsm fix from Paul Moore:
       "A single Documentation/LSM fix to update the LSM hook documentation
        references from lsm_hooks.h to security.c"
      
      * tag 'lsm-pr-20230428' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
        lsm: move hook comments docs to security/security.c
      8c1318e4
    • Linus Torvalds's avatar
      Merge tag 'integrity-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity · febf9ee3
      Linus Torvalds authored
      Pull integrity update from Mimi Zohar:
       "Just one one bug fix. Other integrity changes are being upstreamed via
        the tpm and lsm trees"
      
      * tag 'integrity-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
        IMA: allow/fix UML builds
      febf9ee3
    • Linus Torvalds's avatar
      Merge tag 'cgroup-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 86e98ed1
      Linus Torvalds authored
      Pull cgroup updates from Tejun Heo:
      
       - cpuset changes including the fix for an incorrect interaction with
         CPU hotplug and an optimization
      
       - Other doc and cosmetic changes
      
      * tag 'cgroup-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        docs: cgroup-v1/cpusets: update libcgroup project link
        cgroup/cpuset: Minor updates to test_cpuset_prs.sh
        cgroup/cpuset: Include offline CPUs when tasks' cpumasks in top_cpuset are updated
        cgroup/cpuset: Skip task update if hotplug doesn't affect current cpuset
        cpuset: Clean up cpuset_node_allowed
        cgroup: bpf: use cgroup_lock()/cgroup_unlock() wrappers
      86e98ed1
    • Linus Torvalds's avatar
      Merge tag 'wq-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · cd546fa3
      Linus Torvalds authored
      Pull workqueue updates from Tejun Heo:
       "Mostly changes from Petr to improve warning and error reporting.
      
        Workqueue now reports more of the relevant failures with better
        context which should help debugging"
      
      * tag 'wq-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Introduce show_freezable_workqueues
        workqueue: Print backtraces from CPUs with hung CPU bound workqueues
        workqueue: Warn when a rescuer could not be created
        workqueue: Interrupted create_worker() is not a repeated event
        workqueue: Warn when a new worker could not be created
        workqueue: Fix hung time report of worker pools
        workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu()
        MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry
      cd546fa3
  2. 28 Apr, 2023 25 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 89d77f71
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
      
       - Support for runtime detection of the Svnapot extension
      
       - Support for Zicboz when clearing pages
      
       - We've moved to GENERIC_ENTRY
      
       - Support for !MMU on rv32 systems
      
       - The linear region is now mapped via huge pages
      
       - Support for building relocatable kernels
      
       - Support for the hwprobe interface
      
       - Various fixes and cleanups throughout the tree
      
      * tag 'riscv-for-linus-6.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (57 commits)
        RISC-V: hwprobe: Explicity check for -1 in vdso init
        RISC-V: hwprobe: There can only be one first
        riscv: Allow to downgrade paging mode from the command line
        dt-bindings: riscv: add sv57 mmu-type
        RISC-V: hwprobe: Remove __init on probe_vendor_features()
        riscv: Use --emit-relocs in order to move .rela.dyn in init
        riscv: Check relocations at compile time
        powerpc: Move script to check relocations at compile time in scripts/
        riscv: Introduce CONFIG_RELOCATABLE
        riscv: Move .rela.dyn outside of init to avoid empty relocations
        riscv: Prepare EFI header for relocatable kernels
        riscv: Unconditionnally select KASAN_VMALLOC if KASAN
        riscv: Fix ptdump when KASAN is enabled
        riscv: Fix EFI stub usage of KASAN instrumented strcmp function
        riscv: Move DTB_EARLY_BASE_VA to the kernel address space
        riscv: Rework kasan population functions
        riscv: Split early and final KASAN population functions
        riscv: Use PUD/P4D/PGD pages for the linear mapping
        riscv: Move the linear mapping creation in its own function
        riscv: Get rid of riscv_pfn_base variable
        ...
      89d77f71
    • Linus Torvalds's avatar
      Merge tag 'm68knommu-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · b23c1376
      Linus Torvalds authored
      Pull m68knommu updates from Greg Ungerer:
       "A couple of minor changes.
      
        One to remove the long dead uclinux.org web address and email list
        from the MAINTAINERS entry for UCLINUX.
      
        The other to remove dead config options in the m68knommu Kconfig"
      
      * tag 'm68knommu-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: Kconfig.machine: remove obsolete configs ROMBASE and ROMSIZE
        MAINTAINERS: drop uclinux.org
      b23c1376
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 70cc1b53
      Linus Torvalds authored
      Pull powerpc updates from Michael Ellerman:
      
       - Add support for building the kernel using PC-relative addressing on
         Power10.
      
       - Allow HV KVM guests on Power10 to use prefixed instructions.
      
       - Unify support for the P2020 CPU (85xx) into a single machine
         description.
      
       - Always build the 64-bit kernel with 128-bit long double.
      
       - Drop support for several obsolete 2000's era development boards as
         identified by Paul Gortmaker.
      
       - A series fixing VFIO on Power since some generic changes.
      
       - Various other small features and fixes.
      
      Thanks to Alexey Kardashevskiy, Andrew Donnellan, Benjamin Gray, Bo Liu,
      Christophe Leroy, Dan Carpenter, David Binderman, Ira Weiny, Joel
      Stanley, Kajol Jain, Kautuk Consul, Liang He, Luis Chamberlain, Masahiro
      Yamada, Michael Neuling, Nathan Chancellor, Nathan Lynch, Nicholas
      Miehlbradt, Nicholas Piggin, Nick Desaulniers, Nysal Jan K.A, Pali
      Rohár, Paul Gortmaker, Paul Mackerras, Petr Vaněk, Randy Dunlap, Rob
      Herring, Sachin Sant, Sean Christopherson, Segher Boessenkool, and
      Timothy Pearson.
      
      * tag 'powerpc-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits)
        powerpc/64s: Disable pcrel code model on Clang
        powerpc: Fix merge conflict between pcrel and copy_thread changes
        powerpc/configs/powernv: Add IGB=y
        powerpc/configs/64s: Drop JFS Filesystem
        powerpc/configs/64s: Use EXT4 to mount EXT2 filesystems
        powerpc/configs: Make pseries_defconfig an alias for ppc64le_guest
        powerpc/configs: Make pseries_le an alias for ppc64le_guest
        powerpc/configs: Incorporate generic kvm_guest.config into guest configs
        powerpc/configs: Add IBMVETH=y and IBMVNIC=y to guest configs
        powerpc/configs/64s: Enable Device Mapper options
        powerpc/configs/64s: Enable PSTORE
        powerpc/configs/64s: Enable VLAN support
        powerpc/configs/64s: Enable BLK_DEV_NVME
        powerpc/configs/64s: Drop REISERFS
        powerpc/configs/64s: Use SHA512 for module signatures
        powerpc/configs/64s: Enable IO_STRICT_DEVMEM
        powerpc/configs/64s: Enable SCHEDSTATS
        powerpc/configs/64s: Enable DEBUG_VM & other options
        powerpc/configs/64s: Enable EMULATED_STATS
        powerpc/configs/64s: Enable KUNIT and most tests
        ...
      70cc1b53
    • Linus Torvalds's avatar
      Merge tag 'trace-tools-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 5ea8abf5
      Linus Torvalds authored
      Pull tracing tools updates from Steven Rostedt:
      
       - Add auto-analysis only option to rtla/timerlat
      
         Add an --aa-only option to the tooling to perform only the auto
         analysis and not to parse and format the data.
      
       - Other minor fixes and clean ups
      
      * tag 'trace-tools-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        rtla/timerlat: Fix "Previous IRQ" auto analysis' line
        rtla/timerlat: Add auto-analysis only option
        rv: Remove redundant assignment to variable retval
        rv: Fix addition on an uninitialized variable 'run'
        rtla: Add .gitignore file
      5ea8abf5
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · d579c468
      Linus Torvalds authored
      Pull tracing updates from Steven Rostedt:
      
       - User events are finally ready!
      
         After lots of collaboration between various parties, we finally
         locked down on a stable interface for user events that can also work
         with user space only tracing.
      
         This is implemented by telling the kernel (or user space library, but
         that part is user space only and not part of this patch set), where
         the variable is that the application uses to know if something is
         listening to the trace.
      
         There's also an interface to tell the kernel about these events,
         which will show up in the /sys/kernel/tracing/events/user_events/
         directory, where it can be enabled.
      
         When it's enabled, the kernel will update the variable, to tell the
         application to start writing to the kernel.
      
         See https://lwn.net/Articles/927595/
      
       - Cleaned up the direct trampolines code to simplify arm64 addition of
         direct trampolines.
      
         Direct trampolines use the ftrace interface but instead of jumping to
         the ftrace trampoline, applications (mostly BPF) can register their
         own trampoline for performance reasons.
      
       - Some updates to the fprobe infrastructure. fprobes are more efficient
         than kprobes, as it does not need to save all the registers that
         kprobes on ftrace do. More work needs to be done before the fprobes
         will be exposed as dynamic events.
      
       - More updates to references to the obsolete path of
         /sys/kernel/debug/tracing for the new /sys/kernel/tracing path.
      
       - Add a seq_buf_do_printk() helper to seq_bufs, to print a large buffer
         line by line instead of all at once.
      
         There are users in production kernels that have a large data dump
         that originally used printk() directly, but the data dump was larger
         than what printk() allowed as a single print.
      
         Using seq_buf() to do the printing fixes that.
      
       - Add /sys/kernel/tracing/touched_functions that shows all functions
         that was every traced by ftrace or a direct trampoline. This is used
         for debugging issues where a traced function could have caused a
         crash by a bpf program or live patching.
      
       - Add a "fields" option that is similar to "raw" but outputs the fields
         of the events. It's easier to read by humans.
      
       - Some minor fixes and clean ups.
      
      * tag 'trace-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (41 commits)
        ring-buffer: Sync IRQ works before buffer destruction
        tracing: Add missing spaces in trace_print_hex_seq()
        ring-buffer: Ensure proper resetting of atomic variables in ring_buffer_reset_online_cpus
        recordmcount: Fix memory leaks in the uwrite function
        tracing/user_events: Limit max fault-in attempts
        tracing/user_events: Prevent same address and bit per process
        tracing/user_events: Ensure bit is cleared on unregister
        tracing/user_events: Ensure write index cannot be negative
        seq_buf: Add seq_buf_do_printk() helper
        tracing: Fix print_fields() for __dyn_loc/__rel_loc
        tracing/user_events: Set event filter_type from type
        ring-buffer: Clearly check null ptr returned by rb_set_head_page()
        tracing: Unbreak user events
        tracing/user_events: Use print_format_fields() for trace output
        tracing/user_events: Align structs with tabs for readability
        tracing/user_events: Limit global user_event count
        tracing/user_events: Charge event allocs to cgroups
        tracing/user_events: Update documentation for ABI
        tracing/user_events: Use write ABI in example
        tracing/user_events: Add ABI self-test
        ...
      d579c468
    • Linus Torvalds's avatar
      Merge tag 'smp-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f20730ef
      Linus Torvalds authored
      Pull SMP cross-CPU function-call updates from Ingo Molnar:
      
       - Remove diagnostics and adjust config for CSD lock diagnostics
      
       - Add a generic IPI-sending tracepoint, as currently there's no easy
         way to instrument IPI origins: it's arch dependent and for some major
         architectures it's not even consistently available.
      
      * tag 'smp-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        trace,smp: Trace all smp_function_call*() invocations
        trace: Add trace_ipi_send_cpu()
        sched, smp: Trace smp callback causing an IPI
        smp: reword smp call IPI comment
        treewide: Trace IPIs sent via smp_send_reschedule()
        irq_work: Trace self-IPIs sent via arch_irq_work_raise()
        smp: Trace IPIs sent via arch_send_call_function_ipi_mask()
        sched, smp: Trace IPIs sent via send_call_function_single_ipi()
        trace: Add trace_ipi_send_cpumask()
        kernel/smp: Make csdlock_debug= resettable
        locking/csd_lock: Remove per-CPU data indirection from CSD lock debugging
        locking/csd_lock: Remove added data from CSD lock debugging
        locking/csd_lock: Add Kconfig option for csd_debug default
      f20730ef
    • Linus Torvalds's avatar
      Merge tag 'sched-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 586b222d
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
      
       - Allow unprivileged PSI poll()ing
      
       - Fix performance regression introduced by mm_cid
      
       - Improve livepatch stalls by adding livepatch task switching to
         cond_resched(). This resolves livepatching busy-loop stalls with
         certain CPU-bound kthreads
      
       - Improve sched_move_task() performance on autogroup configs
      
       - On core-scheduling CPUs, avoid selecting throttled tasks to run
      
       - Misc cleanups, fixes and improvements
      
      * tag 'sched-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/clock: Fix local_clock() before sched_clock_init()
        sched/rt: Fix bad task migration for rt tasks
        sched: Fix performance regression introduced by mm_cid
        sched/core: Make sched_dynamic_mutex static
        sched/psi: Allow unprivileged polling of N*2s period
        sched/psi: Extract update_triggers side effect
        sched/psi: Rename existing poll members in preparation
        sched/psi: Rearrange polling code in preparation
        sched/fair: Fix inaccurate tally of ttwu_move_affine
        vhost: Fix livepatch timeouts in vhost_worker()
        livepatch,sched: Add livepatch task switching to cond_resched()
        livepatch: Skip task_call_func() for current task
        livepatch: Convert stack entries array to percpu
        sched: Interleave cfs bandwidth timers for improved single thread performance at low utilization
        sched/core: Reduce cost of sched_move_task when config autogroup
        sched/core: Avoid selecting the task that is throttled to run when core-sched enable
        sched/topology: Make sched_energy_mutex,update static
      586b222d
    • Linus Torvalds's avatar
      Merge tag 'perf-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7c339778
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
      
       - Add Intel Granite Rapids support
      
       - Add uncore events for Intel SPR IMC PMU
      
       - Fix perf IRQ throttling bug
      
      * tag 'perf-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel/uncore: Add events for Intel SPR IMC PMU
        perf/core: Fix hardlockup failure caused by perf throttle
        perf/x86/cstate: Add Granite Rapids support
        perf/x86/msr: Add Granite Rapids
        perf/x86/intel: Add Granite Rapids
      7c339778
    • Linus Torvalds's avatar
      Merge tag 'objtool-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2aff7c70
      Linus Torvalds authored
      Pull objtool updates from Ingo Molnar:
      
       - Mark arch_cpu_idle_dead() __noreturn, make all architectures &
         drivers that did this inconsistently follow this new, common
         convention, and fix all the fallout that objtool can now detect
         statically
      
       - Fix/improve the ORC unwinder becoming unreliable due to
         UNWIND_HINT_EMPTY ambiguity, split it into UNWIND_HINT_END_OF_STACK
         and UNWIND_HINT_UNDEFINED to resolve it
      
       - Fix noinstr violations in the KCSAN code and the lkdtm/stackleak code
      
       - Generate ORC data for __pfx code
      
       - Add more __noreturn annotations to various kernel startup/shutdown
         and panic functions
      
       - Misc improvements & fixes
      
      * tag 'objtool-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits)
        x86/hyperv: Mark hv_ghcb_terminate() as noreturn
        scsi: message: fusion: Mark mpt_halt_firmware() __noreturn
        x86/cpu: Mark {hlt,resume}_play_dead() __noreturn
        btrfs: Mark btrfs_assertfail() __noreturn
        objtool: Include weak functions in global_noreturns check
        cpu: Mark nmi_panic_self_stop() __noreturn
        cpu: Mark panic_smp_self_stop() __noreturn
        arm64/cpu: Mark cpu_park_loop() and friends __noreturn
        x86/head: Mark *_start_kernel() __noreturn
        init: Mark start_kernel() __noreturn
        init: Mark [arch_call_]rest_init() __noreturn
        objtool: Generate ORC data for __pfx code
        x86/linkage: Fix padding for typed functions
        objtool: Separate prefix code from stack validation code
        objtool: Remove superfluous dead_end_function() check
        objtool: Add symbol iteration helpers
        objtool: Add WARN_INSN()
        scripts/objdump-func: Support multiple functions
        context_tracking: Fix KCSAN noinstr violation
        objtool: Add stackleak instrumentation to uaccess safe list
        ...
      2aff7c70
    • Anna Schumaker's avatar
      NFSv4.2: Rework scratch handling for READ_PLUS · fbd2a05f
      Anna Schumaker authored
      Instead of using a tiny, static scratch buffer, we should use a kmalloc()-ed
      buffer that is allocated when checking for read plus usage. This lets us
      use the buffer before decoding any part of the READ_PLUS operation
      instead of setting it right before segment decoding, meaning it should
      be a little more robust.
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      fbd2a05f
    • Linus Torvalds's avatar
      Merge tag 'x86_mm_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 22b8cc3e
      Linus Torvalds authored
      Pull x86 LAM (Linear Address Masking) support from Dave Hansen:
       "Add support for the new Linear Address Masking CPU feature.
      
        This is similar to ARM's Top Byte Ignore and allows userspace to store
        metadata in some bits of pointers without masking it out before use"
      
      * tag 'x86_mm_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm/iommu/sva: Do not allow to set FORCE_TAGGED_SVA bit from outside
        x86/mm/iommu/sva: Fix error code for LAM enabling failure due to SVA
        selftests/x86/lam: Add test cases for LAM vs thread creation
        selftests/x86/lam: Add ARCH_FORCE_TAGGED_SVA test cases for linear-address masking
        selftests/x86/lam: Add inherit test cases for linear-address masking
        selftests/x86/lam: Add io_uring test cases for linear-address masking
        selftests/x86/lam: Add mmap and SYSCALL test cases for linear-address masking
        selftests/x86/lam: Add malloc and tag-bits test cases for linear-address masking
        x86/mm/iommu/sva: Make LAM and SVA mutually exclusive
        iommu/sva: Replace pasid_valid() helper with mm_valid_pasid()
        mm: Expose untagging mask in /proc/$PID/status
        x86/mm: Provide arch_prctl() interface for LAM
        x86/mm: Reduce untagged_addr() overhead for systems without LAM
        x86/uaccess: Provide untagged_addr() and remove tags before address check
        mm: Introduce untagged_addr_remote()
        x86/mm: Handle LAM on context switch
        x86: CPUID and CR3/CR4 flags for Linear Address Masking
        x86: Allow atomic MM_CONTEXT flags setting
        x86/mm: Rework address range check in get_user() and put_user()
      22b8cc3e
    • Linus Torvalds's avatar
      Merge tag 'x86_tdx_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7b664cc3
      Linus Torvalds authored
      Pull x86 tdx update from Dave Hansen:
       "The original tdx hypercall assembly code took two flags in %RSI to
        tweak its behavior at runtime. PeterZ recently axed one flag in commit
        e80a48ba ("x86/tdx: Remove TDX_HCALL_ISSUE_STI").
      
        Kill the other flag too and tweak the 'output' mode with an assembly
        macro instead. This results in elimination of one push/pop pair and
        overall easier to read assembly.
      
         - Do conditional __tdx_hypercall() 'output' processing via an
           assembly macro argument rather than a runtime register"
      
      * tag 'x86_tdx_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/tdx: Drop flags from __tdx_hypercall()
      7b664cc3
    • Linus Torvalds's avatar
      Merge tag 'x86_fpu_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e54debe6
      Linus Torvalds authored
      Pull x86 fpu updates from Dave Hansen:
       "There's no _actual_ kernel functionality here.
      
        This expands the documentation around AMX support including some code
        examples. The example code also exposed the fact that hardware
        architecture constants as part of the ABI, but there's no easy place
        that they get defined for apps. Adding them to a uabi header will
        eventually make life easier for consumers of the ABI.
      
        Summary:
      
         - Improve AMX documentation along with example code
      
         - Explicitly make some hardware constants part of the uabi"
      
      * tag 'x86_fpu_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Documentation/x86: Explain the state component permission for guests
        Documentation/x86: Add the AMX enabling example
        x86/arch_prctl: Add AMX feature numbers as ABI constants
        Documentation/x86: Explain the purpose for dynamic features
      e54debe6
    • Linus Torvalds's avatar
      Merge tag 'x86_cache_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4980c176
      Linus Torvalds authored
      Pull x86 resctrl update from Dave Hansen:
       "Reduce redundant counter reads with resctrl refactoring"
      
      * tag 'x86_cache_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/resctrl: Avoid redundant counter read in __mon_event_count()
      4980c176
    • Linus Torvalds's avatar
      Merge tag 'x86_cleanups_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 682f7bba
      Linus Torvalds authored
      Pull x86 cleanups from Borislav Petkov:
      
       - Unify duplicated __pa() and __va() definitions
      
       - Simplify sysctl tables registration
      
       - Remove unused symbols
      
       - Correct function name in comment
      
      * tag 'x86_cleanups_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Centralize __pa()/__va() definitions
        x86: Simplify one-level sysctl registration for itmt_kern_table
        x86: Simplify one-level sysctl registration for abi_table2
        x86/platform/intel-mid: Remove unused definitions from intel-mid.h
        x86/uaccess: Remove memcpy_page_flushcache()
        x86/entry: Change stale function name in comment to error_return()
      682f7bba
    • Randy Dunlap's avatar
      lsm: move hook comments docs to security/security.c · 6d2ed653
      Randy Dunlap authored
      Fix one kernel-doc warning, but invesigating that led to other
      kernel-doc movement (lsm_hooks.h to security.c) that needs to be
      fixed also.
      
      include/linux/lsm_hooks.h:1: warning: no structured comments found
      
      Fixes: e261301c ("lsm: move the remaining LSM hook comments to security/security.c")
      Fixes: 1cd2aca6 ("lsm: move the io_uring hook comments to security/security.c")
      Fixes: 452b670c ("lsm: move the perf hook comments to security/security.c")
      Fixes: 55e85320 ("lsm: move the bpf hook comments to security/security.c")
      Fixes: b14faf9c ("lsm: move the audit hook comments to security/security.c")
      Fixes: 1427ddbe ("lsm: move the binder hook comments to security/security.c")
      Fixes: 43fad282 ("lsm: move the sysv hook comments to security/security.c")
      Fixes: ecc419a4 ("lsm: move the key hook comments to security/security.c")
      Fixes: 742b9945 ("lsm: move the xfrm hook comments to security/security.c")
      Fixes: ac318aed ("lsm: move the Infiniband hook comments to security/security.c")
      Fixes: 4a49f592 ("lsm: move the SCTP hook comments to security/security.c")
      Fixes: 6b6bbe8c ("lsm: move the socket hook comments to security/security.c")
      Fixes: 2c2442fd ("lsm: move the AF_UNIX hook comments to security/security.c")
      Fixes: 2bcf51bf ("lsm: move the netlink hook comments to security/security.c")
      Fixes: 130c53bf ("lsm: move the task hook comments to security/security.c")
      Fixes: a0fd6480 ("lsm: move the file hook comments to security/security.c")
      Fixes: 9348944b ("lsm: move the kernfs hook comments to security/security.c")
      Fixes: 916e3258 ("lsm: move the inode hook comments to security/security.c")
      Fixes: 08526a90 ("lsm: move the filesystem hook comments to security/security.c")
      Fixes: 36819f18 ("lsm: move the fs_context hook comments to security/security.c")
      Fixes: 1661372c ("lsm: move the program execution hook comments to security/security.c")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Paul Moore <paul@paul-moore.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: "Serge E. Hallyn" <serge@hallyn.com>
      Cc: linux-security-module@vger.kernel.org
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: linux-doc@vger.kernel.org
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: bpf@vger.kernel.org
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      6d2ed653
    • Linus Torvalds's avatar
      Merge tag 'mm-nonmm-stable-2023-04-27-16-01' of... · 33afd4b7
      Linus Torvalds authored
      Merge tag 'mm-nonmm-stable-2023-04-27-16-01' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull non-MM updates from Andrew Morton:
       "Mainly singleton patches all over the place.
      
        Series of note are:
      
         - updates to scripts/gdb from Glenn Washburn
      
         - kexec cleanups from Bjorn Helgaas"
      
      * tag 'mm-nonmm-stable-2023-04-27-16-01' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (50 commits)
        mailmap: add entries for Paul Mackerras
        libgcc: add forward declarations for generic library routines
        mailmap: add entry for Oleksandr
        ocfs2: reduce ioctl stack usage
        fs/proc: add Kthread flag to /proc/$pid/status
        ia64: fix an addr to taddr in huge_pte_offset()
        checkpatch: introduce proper bindings license check
        epoll: rename global epmutex
        scripts/gdb: add GDB convenience functions $lx_dentry_name() and $lx_i_dentry()
        scripts/gdb: create linux/vfs.py for VFS related GDB helpers
        uapi/linux/const.h: prefer ISO-friendly __typeof__
        delayacct: track delays from IRQ/SOFTIRQ
        scripts/gdb: timerlist: convert int chunks to str
        scripts/gdb: print interrupts
        scripts/gdb: raise error with reduced debugging information
        scripts/gdb: add a Radix Tree Parser
        lib/rbtree: use '+' instead of '|' for setting color.
        proc/stat: remove arch_idle_time()
        checkpatch: check for misuse of the link tags
        checkpatch: allow Closes tags with links
        ...
      33afd4b7
    • Linus Torvalds's avatar
      Merge tag 'mm-stable-2023-04-27-15-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 7fa8a8ee
      Linus Torvalds authored
      Pull MM updates from Andrew Morton:
      
       - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of
         switching from a user process to a kernel thread.
      
       - More folio conversions from Kefeng Wang, Zhang Peng and Pankaj
         Raghav.
      
       - zsmalloc performance improvements from Sergey Senozhatsky.
      
       - Yue Zhao has found and fixed some data race issues around the
         alteration of memcg userspace tunables.
      
       - VFS rationalizations from Christoph Hellwig:
           - removal of most of the callers of write_one_page()
           - make __filemap_get_folio()'s return value more useful
      
       - Luis Chamberlain has changed tmpfs so it no longer requires swap
         backing. Use `mount -o noswap'.
      
       - Qi Zheng has made the slab shrinkers operate locklessly, providing
         some scalability benefits.
      
       - Keith Busch has improved dmapool's performance, making part of its
         operations O(1) rather than O(n).
      
       - Peter Xu adds the UFFD_FEATURE_WP_UNPOPULATED feature to userfaultd,
         permitting userspace to wr-protect anon memory unpopulated ptes.
      
       - Kirill Shutemov has changed MAX_ORDER's meaning to be inclusive
         rather than exclusive, and has fixed a bunch of errors which were
         caused by its unintuitive meaning.
      
       - Axel Rasmussen give userfaultfd the UFFDIO_CONTINUE_MODE_WP feature,
         which causes minor faults to install a write-protected pte.
      
       - Vlastimil Babka has done some maintenance work on vma_merge():
         cleanups to the kernel code and improvements to our userspace test
         harness.
      
       - Cleanups to do_fault_around() by Lorenzo Stoakes.
      
       - Mike Rapoport has moved a lot of initialization code out of various
         mm/ files and into mm/mm_init.c.
      
       - Lorenzo Stoakes removd vmf_insert_mixed_prot(), which was added for
         DRM, but DRM doesn't use it any more.
      
       - Lorenzo has also coverted read_kcore() and vread() to use iterators
         and has thereby removed the use of bounce buffers in some cases.
      
       - Lorenzo has also contributed further cleanups of vma_merge().
      
       - Chaitanya Prakash provides some fixes to the mmap selftesting code.
      
       - Matthew Wilcox changes xfs and afs so they no longer take sleeping
         locks in ->map_page(), a step towards RCUification of pagefaults.
      
       - Suren Baghdasaryan has improved mmap_lock scalability by switching to
         per-VMA locking.
      
       - Frederic Weisbecker has reworked the percpu cache draining so that it
         no longer causes latency glitches on cpu isolated workloads.
      
       - Mike Rapoport cleans up and corrects the ARCH_FORCE_MAX_ORDER Kconfig
         logic.
      
       - Liu Shixin has changed zswap's initialization so we no longer waste a
         chunk of memory if zswap is not being used.
      
       - Yosry Ahmed has improved the performance of memcg statistics
         flushing.
      
       - David Stevens has fixed several issues involving khugepaged,
         userfaultfd and shmem.
      
       - Christoph Hellwig has provided some cleanup work to zram's IO-related
         code paths.
      
       - David Hildenbrand has fixed up some issues in the selftest code's
         testing of our pte state changing.
      
       - Pankaj Raghav has made page_endio() unneeded and has removed it.
      
       - Peter Xu contributed some rationalizations of the userfaultfd
         selftests.
      
       - Yosry Ahmed has fixed an issue around memcg's page recalim
         accounting.
      
       - Chaitanya Prakash has fixed some arm-related issues in the
         selftests/mm code.
      
       - Longlong Xia has improved the way in which KSM handles hwpoisoned
         pages.
      
       - Peter Xu fixes a few issues with uffd-wp at fork() time.
      
       - Stefan Roesch has changed KSM so that it may now be used on a
         per-process and per-cgroup basis.
      
      * tag 'mm-stable-2023-04-27-15-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (369 commits)
        mm,unmap: avoid flushing TLB in batch if PTE is inaccessible
        shmem: restrict noswap option to initial user namespace
        mm/khugepaged: fix conflicting mods to collapse_file()
        sparse: remove unnecessary 0 values from rc
        mm: move 'mmap_min_addr' logic from callers into vm_unmapped_area()
        hugetlb: pte_alloc_huge() to replace huge pte_alloc_map()
        maple_tree: fix allocation in mas_sparse_area()
        mm: do not increment pgfault stats when page fault handler retries
        zsmalloc: allow only one active pool compaction context
        selftests/mm: add new selftests for KSM
        mm: add new KSM process and sysfs knobs
        mm: add new api to enable ksm per process
        mm: shrinkers: fix debugfs file permissions
        mm: don't check VMA write permissions if the PTE/PMD indicates write permissions
        migrate_pages_batch: fix statistics for longterm pin retry
        userfaultfd: use helper function range_in_vma()
        lib/show_mem.c: use for_each_populated_zone() simplify code
        mm: correct arg in reclaim_pages()/reclaim_clean_pages_from_list()
        fs/buffer: convert create_page_buffers to folio_create_buffers
        fs/buffer: add folio_create_empty_buffers helper
        ...
      7fa8a8ee
    • Linus Torvalds's avatar
      Merge tag 'mips_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 91ec4b0d
      Linus Torvalds authored
      Pull MIPS updates from Thomas Bogendoerfer:
      
       - added support for Huawei B593u-12
      
       - added support for virt board aligned to QEMU MIPS virt board
      
       - added support for doing DMA coherence on a per device base
      
       - reworked handling of RALINK SoCs
      
       - cleanup for Loongon64 barriers
      
       - removed deprecated support for MIPS_CMP SMP handling method
      
       - removed support Sibyte CARMEL and CHRINE boards
      
       - cleanups and fixes
      
      * tag 'mips_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (59 commits)
        MIPS: uprobes: Restore thread.trap_nr
        MIPS: Don't clear _PAGE_SPECIAL in _PAGE_CHG_MASK
        MIPS: Sink body of check_bugs_early() into its only call site
        MIPS: Mark check_bugs() as __init
        Revert "MIPS: generic: Enable all CPUs supported by virt board in Kconfig"
        MIPS: octeon_switch: Remove duplicated labels
        MIPS: loongson2ef: Add missing break in cs5536_isa
        MIPS: Remove set_swbp() in uprobes.c
        MIPS: Use def_bool y for ARCH_SUPPORTS_UPROBES
        MIPS: fw: Allow firmware to pass a empty env
        MIPS: Remove deprecated CONFIG_MIPS_CMP
        MIPS: lantiq: remove unused function declaration
        MIPS: Drop unused positional parameter in local_irq_{dis,en}able
        MIPS: mm: Remove local_cache_flush_page
        MIPS: Remove no longer used ide.h
        MIPS: mm: Remove unused *cache_page_indexed flush functions
        MIPS: generic: Enable all CPUs supported by virt board in Kconfig
        MIPS: Add board config for virt board
        MIPS: Octeon: Disable CVMSEG by default on other platforms
        MIPS: Loongson: Don't select platform features with CPU
        ...
      91ec4b0d
    • Linus Torvalds's avatar
      Merge tag 'sh-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux · 513f17f8
      Linus Torvalds authored
      Pull sh updates from John Paul Adrian Glaubitz:
       "This is a bit larger than my previous one and mainly consists of
        clean-up work in the arch/sh directory by Geert Uytterhoeven and Randy
        Dunlap.
      
        Additionally, this fixes a bug in the Storage Queue code that was
        discovered while I was reviewing a patch to switch the code to the
        bitmap API by Christophe Jaillet.
      
        So this contains both a fix for the original bug in the Storage Queue
        code that can be backported later as well as the Christophe's patch to
        swich the code to the bitmap API.
      
        Summary:
      
         - Use generic GCC library routines
      
         - sq: Use the bitmap API when applicable
      
         - sq: Fix incorrect element size for allocating bitmap buffer
      
         - pci: Remove unused variable in SH-7786 PCI Express code
      
         - mcount.S: fix build error when PRINTK is not enabled
      
         - remove sh5/sh64 last fragments
      
         - math-emu: fix macro redefined warning
      
         - init: use OF_EARLY_FLATTREE for early init
      
         - nmi_debug: fix return value of __setup handler
      
         - SH2007: drop the bad URL info"
      
      * tag 'sh-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
        sh: Replace <uapi/asm/types.h> by <asm-generic/int-ll64.h>
        sh: Use generic GCC library routines
        sh: sq: Use the bitmap API when applicable
        sh: sq: Fix incorrect element size for allocating bitmap buffer
        sh: pci: Remove unused variable in SH-7786 PCI Express code
        sh: mcount.S: fix build error when PRINTK is not enabled
        sh: remove sh5/sh64 last fragments
        sh: math-emu: fix macro redefined warning
        sh: init: use OF_EARLY_FLATTREE for early init
        sh: nmi_debug: fix return value of __setup handler
        sh: SH2007: drop the bad URL info
      513f17f8
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 35fab927
      Linus Torvalds authored
      Pull xen updates from Juergen Gross:
      
       - some cleanups in the Xen blkback driver
      
       - fix potential sleeps under lock in various Xen drivers
      
      * tag 'for-linus-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/blkback: move blkif_get_x86_*_req() into blkback.c
        xen/blkback: simplify free_persistent_gnts() interface
        xen/blkback: remove stale prototype
        xen/blkback: fix white space code style issues
        xen/pvcalls: don't call bind_evtchn_to_irqhandler() under lock
        xen/scsiback: don't call scsiback_free_translation_entry() under lock
        xen/pciback: don't call pcistub_device_put() under lock
      35fab927
    • Linus Torvalds's avatar
      Merge tag 'hyperv-next-signed-20230424' of... · da46b58f
      Linus Torvalds authored
      Merge tag 'hyperv-next-signed-20230424' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv updates from Wei Liu:
      
       - PCI passthrough for Hyper-V confidential VMs (Michael Kelley)
      
       - Hyper-V VTL mode support (Saurabh Sengar)
      
       - Move panic report initialization code earlier (Long Li)
      
       - Various improvements and bug fixes (Dexuan Cui and Michael Kelley)
      
      * tag 'hyperv-next-signed-20230424' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (22 commits)
        PCI: hv: Replace retarget_msi_interrupt_params with hyperv_pcpu_input_arg
        Drivers: hv: move panic report code from vmbus to hv early init code
        x86/hyperv: VTL support for Hyper-V
        Drivers: hv: Kconfig: Add HYPERV_VTL_MODE
        x86/hyperv: Make hv_get_nmi_reason public
        x86/hyperv: Add VTL specific structs and hypercalls
        x86/init: Make get/set_rtc_noop() public
        x86/hyperv: Exclude lazy TLB mode CPUs from enlightened TLB flushes
        x86/hyperv: Add callback filter to cpumask_to_vpset()
        Drivers: hv: vmbus: Remove the per-CPU post_msg_page
        clocksource: hyper-v: make sure Invariant-TSC is used if it is available
        PCI: hv: Enable PCI pass-thru devices in Confidential VMs
        Drivers: hv: Don't remap addresses that are above shared_gpa_boundary
        hv_netvsc: Remove second mapping of send and recv buffers
        Drivers: hv: vmbus: Remove second way of mapping ring buffers
        Drivers: hv: vmbus: Remove second mapping of VMBus monitor pages
        swiotlb: Remove bounce buffer remapping for Hyper-V
        Driver: VMBus: Add Devicetree support
        dt-bindings: bus: Add Hyper-V VMBus
        Drivers: hv: vmbus: Convert acpi_device to more generic platform_device
        ...
      da46b58f
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 8ccd54fe
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
       "virtio,vhost,vdpa: features, fixes, and cleanups:
      
         - reduction in interrupt rate in virtio
      
         - perf improvement for VDUSE
      
         - scalability for vhost-scsi
      
         - non power of 2 ring support for packed rings
      
         - better management for mlx5 vdpa
      
         - suspend for snet
      
         - VIRTIO_F_NOTIFICATION_DATA
      
         - shared backend with vdpa-sim-blk
      
         - user VA support in vdpa-sim
      
         - better struct packing for virtio
      
        and fixes, cleanups all over the place"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (52 commits)
        vhost_vdpa: fix unmap process in no-batch mode
        MAINTAINERS: make me a reviewer of VIRTIO CORE AND NET DRIVERS
        tools/virtio: fix build caused by virtio_ring changes
        virtio_ring: add a struct device forward declaration
        vdpa_sim_blk: support shared backend
        vdpa_sim: move buffer allocation in the devices
        vdpa/snet: use likely/unlikely macros in hot functions
        vdpa/snet: implement kick_vq_with_data callback
        virtio-vdpa: add VIRTIO_F_NOTIFICATION_DATA feature support
        virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
        vdpa/snet: support the suspend vDPA callback
        vdpa/snet: support getting and setting VQ state
        MAINTAINERS: add vringh.h to Virtio Core and Net Drivers
        vringh: address kdoc warnings
        vdpa: address kdoc warnings
        virtio_ring: don't update event idx on get_buf
        vdpa_sim: add support for user VA
        vdpa_sim: replace the spinlock with a mutex to protect the state
        vdpa_sim: use kthread worker
        vdpa_sim: make devices agnostic for work management
        ...
      8ccd54fe
    • Linus Torvalds's avatar
      Merge tag 'pstore-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 0835b5ee
      Linus Torvalds authored
      Pull pstore update from Kees Cook:
      
       - Revert pmsg_lock back to a normal mutex (John Stultz)
      
      * tag 'pstore-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        pstore: Revert pmsg_lock back to a normal mutex
      0835b5ee
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 900941be
      Linus Torvalds authored
      Pull hardening update from Kees Cook:
      
       - Fix kheaders array declaration to avoid tripping FORTIFY_SOURCE
      
      * tag 'hardening-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        kheaders: Use array declaration instead of char
      900941be
  3. 27 Apr, 2023 5 commits
    • Linus Torvalds's avatar
      Merge tag 'sysctl-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 888d3c9f
      Linus Torvalds authored
      Pull sysctl updates from Luis Chamberlain:
       "This only does a few sysctl moves from the kernel/sysctl.c file, the
        rest of the work has been put towards deprecating two API calls which
        incur recursion and prevent us from simplifying the registration
        process / saving memory per move. Most of the changes have been
        soaking on linux-next since v6.3-rc3.
      
        I've slowed down the kernel/sysctl.c moves due to Matthew Wilcox's
        feedback that we should see if we could *save* memory with these moves
        instead of incurring more memory. We currently incur more memory since
        when we move a syctl from kernel/sysclt.c out to its own file we end
        up having to add a new empty sysctl used to register it. To achieve
        saving memory we want to allow syctls to be passed without requiring
        the end element being empty, and just have our registration process
        rely on ARRAY_SIZE(). Without this, supporting both styles of sysctls
        would make the sysctl registration pretty brittle, hard to read and
        maintain as can be seen from Meng Tang's efforts to do just this [0].
        Fortunately, in order to use ARRAY_SIZE() for all sysctl registrations
        also implies doing the work to deprecate two API calls which use
        recursion in order to support sysctl declarations with subdirectories.
      
        And so during this development cycle quite a bit of effort went into
        this deprecation effort. I've annotated the following two APIs are
        deprecated and in few kernel releases we should be good to remove
        them:
      
         - register_sysctl_table()
         - register_sysctl_paths()
      
        During this merge window we should be able to deprecate and unexport
        register_sysctl_paths(), we can probably do that towards the end of
        this merge window.
      
        Deprecating register_sysctl_table() will take a bit more time but this
        pull request goes with a few example of how to do this.
      
        As it turns out each of the conversions to move away from either of
        these two API calls *also* saves memory. And so long term, all these
        changes *will* prove to have saved a bit of memory on boot.
      
        The way I see it then is if remove a user of one deprecated call, it
        gives us enough savings to move one kernel/sysctl.c out from the
        generic arrays as we end up with about the same amount of bytes.
      
        Since deprecating register_sysctl_table() and register_sysctl_paths()
        does not require maintainer coordination except the final unexport
        you'll see quite a bit of these changes from other pull requests, I've
        just kept the stragglers after rc3"
      
      Link: https://lkml.kernel.org/r/ZAD+cpbrqlc5vmry@bombadil.infradead.org [0]
      
      * tag 'sysctl-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: (29 commits)
        fs: fix sysctls.c built
        mm: compaction: remove incorrect #ifdef checks
        mm: compaction: move compaction sysctl to its own file
        mm: memory-failure: Move memory failure sysctls to its own file
        arm: simplify two-level sysctl registration for ctl_isa_vars
        ia64: simplify one-level sysctl registration for kdump_ctl_table
        utsname: simplify one-level sysctl registration for uts_kern_table
        ntfs: simplfy one-level sysctl registration for ntfs_sysctls
        coda: simplify one-level sysctl registration for coda_table
        fs/cachefiles: simplify one-level sysctl registration for cachefiles_sysctls
        xfs: simplify two-level sysctl registration for xfs_table
        nfs: simplify two-level sysctl registration for nfs_cb_sysctls
        nfs: simplify two-level sysctl registration for nfs4_cb_sysctls
        lockd: simplify two-level sysctl registration for nlm_sysctls
        proc_sysctl: enhance documentation
        xen: simplify sysctl registration for balloon
        md: simplify sysctl registration
        hv: simplify sysctl registration
        scsi: simplify sysctl registration with register_sysctl()
        csky: simplify alignment sysctl registration
        ...
      888d3c9f
    • Linus Torvalds's avatar
      Merge tag 'modules-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · b6a78285
      Linus Torvalds authored
      Pull module updates from Luis Chamberlain:
       "The summary of the changes for this pull requests is:
      
         - Song Liu's new struct module_memory replacement
      
         - Nick Alcock's MODULE_LICENSE() removal for non-modules
      
         - My cleanups and enhancements to reduce the areas where we vmalloc
           module memory for duplicates, and the respective debug code which
           proves the remaining vmalloc pressure comes from userspace.
      
        Most of the changes have been in linux-next for quite some time except
        the minor fixes I made to check if a module was already loaded prior
        to allocating the final module memory with vmalloc and the respective
        debug code it introduces to help clarify the issue. Although the
        functional change is small it is rather safe as it can only *help*
        reduce vmalloc space for duplicates and is confirmed to fix a bootup
        issue with over 400 CPUs with KASAN enabled. I don't expect stable
        kernels to pick up that fix as the cleanups would have also had to
        have been picked up. Folks on larger CPU systems with modules will
        want to just upgrade if vmalloc space has been an issue on bootup.
      
        Given the size of this request, here's some more elaborate details:
      
        The functional change change in this pull request is the very first
        patch from Song Liu which replaces the 'struct module_layout' with a
        new 'struct module_memory'. The old data structure tried to put
        together all types of supported module memory types in one data
        structure, the new one abstracts the differences in memory types in a
        module to allow each one to provide their own set of details. This
        paves the way in the future so we can deal with them in a cleaner way.
        If you look at changes they also provide a nice cleanup of how we
        handle these different memory areas in a module. This change has been
        in linux-next since before the merge window opened for v6.3 so to
        provide more than a full kernel cycle of testing. It's a good thing as
        quite a bit of fixes have been found for it.
      
        Jason Baron then made dynamic debug a first class citizen module user
        by using module notifier callbacks to allocate / remove module
        specific dynamic debug information.
      
        Nick Alcock has done quite a bit of work cross-tree to remove module
        license tags from things which cannot possibly be module at my request
        so to:
      
         a) help him with his longer term tooling goals which require a
            deterministic evaluation if a piece a symbol code could ever be
            part of a module or not. But quite recently it is has been made
            clear that tooling is not the only one that would benefit.
            Disambiguating symbols also helps efforts such as live patching,
            kprobes and BPF, but for other reasons and R&D on this area is
            active with no clear solution in sight.
      
         b) help us inch closer to the now generally accepted long term goal
            of automating all the MODULE_LICENSE() tags from SPDX license tags
      
        In so far as a) is concerned, although module license tags are a no-op
        for non-modules, tools which would want create a mapping of possible
        modules can only rely on the module license tag after the commit
        8b41fc44 ("kbuild: create modules.builtin without
        Makefile.modbuiltin or tristate.conf").
      
        Nick has been working on this *for years* and AFAICT I was the only
        one to suggest two alternatives to this approach for tooling. The
        complexity in one of my suggested approaches lies in that we'd need a
        possible-obj-m and a could-be-module which would check if the object
        being built is part of any kconfig build which could ever lead to it
        being part of a module, and if so define a new define
        -DPOSSIBLE_MODULE [0].
      
        A more obvious yet theoretical approach I've suggested would be to
        have a tristate in kconfig imply the same new -DPOSSIBLE_MODULE as
        well but that means getting kconfig symbol names mapping to modules
        always, and I don't think that's the case today. I am not aware of
        Nick or anyone exploring either of these options. Quite recently Josh
        Poimboeuf has pointed out that live patching, kprobes and BPF would
        benefit from resolving some part of the disambiguation as well but for
        other reasons. The function granularity KASLR (fgkaslr) patches were
        mentioned but Joe Lawrence has clarified this effort has been dropped
        with no clear solution in sight [1].
      
        In the meantime removing module license tags from code which could
        never be modules is welcomed for both objectives mentioned above. Some
        developers have also welcomed these changes as it has helped clarify
        when a module was never possible and they forgot to clean this up, and
        so you'll see quite a bit of Nick's patches in other pull requests for
        this merge window. I just picked up the stragglers after rc3. LWN has
        good coverage on the motivation behind this work [2] and the typical
        cross-tree issues he ran into along the way. The only concrete blocker
        issue he ran into was that we should not remove the MODULE_LICENSE()
        tags from files which have no SPDX tags yet, even if they can never be
        modules. Nick ended up giving up on his efforts due to having to do
        this vetting and backlash he ran into from folks who really did *not
        understand* the core of the issue nor were providing any alternative /
        guidance. I've gone through his changes and dropped the patches which
        dropped the module license tags where an SPDX license tag was missing,
        it only consisted of 11 drivers. To see if a pull request deals with a
        file which lacks SPDX tags you can just use:
      
          ./scripts/spdxcheck.py -f \
      	$(git diff --name-only commid-id | xargs echo)
      
        You'll see a core module file in this pull request for the above, but
        that's not related to his changes. WE just need to add the SPDX
        license tag for the kernel/module/kmod.c file in the future but it
        demonstrates the effectiveness of the script.
      
        Most of Nick's changes were spread out through different trees, and I
        just picked up the slack after rc3 for the last kernel was out. Those
        changes have been in linux-next for over two weeks.
      
        The cleanups, debug code I added and final fix I added for modules
        were motivated by David Hildenbrand's report of boot failing on a
        systems with over 400 CPUs when KASAN was enabled due to running out
        of virtual memory space. Although the functional change only consists
        of 3 lines in the patch "module: avoid allocation if module is already
        present and ready", proving that this was the best we can do on the
        modules side took quite a bit of effort and new debug code.
      
        The initial cleanups I did on the modules side of things has been in
        linux-next since around rc3 of the last kernel, the actual final fix
        for and debug code however have only been in linux-next for about a
        week or so but I think it is worth getting that code in for this merge
        window as it does help fix / prove / evaluate the issues reported with
        larger number of CPUs. Userspace is not yet fixed as it is taking a
        bit of time for folks to understand the crux of the issue and find a
        proper resolution. Worst come to worst, I have a kludge-of-concept [3]
        of how to make kernel_read*() calls for modules unique / converge
        them, but I'm currently inclined to just see if userspace can fix this
        instead"
      
      Link: https://lore.kernel.org/all/Y/kXDqW+7d71C4wz@bombadil.infradead.org/ [0]
      Link: https://lkml.kernel.org/r/025f2151-ce7c-5630-9b90-98742c97ac65@redhat.com [1]
      Link: https://lwn.net/Articles/927569/ [2]
      Link: https://lkml.kernel.org/r/20230414052840.1994456-3-mcgrof@kernel.org [3]
      
      * tag 'modules-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: (121 commits)
        module: add debugging auto-load duplicate module support
        module: stats: fix invalid_mod_bytes typo
        module: remove use of uninitialized variable len
        module: fix building stats for 32-bit targets
        module: stats: include uapi/linux/module.h
        module: avoid allocation if module is already present and ready
        module: add debug stats to help identify memory pressure
        module: extract patient module check into helper
        modules/kmod: replace implementation with a semaphore
        Change DEFINE_SEMAPHORE() to take a number argument
        module: fix kmemleak annotations for non init ELF sections
        module: Ignore L0 and rename is_arm_mapping_symbol()
        module: Move is_arm_mapping_symbol() to module_symbol.h
        module: Sync code of is_arm_mapping_symbol()
        scripts/gdb: use mem instead of core_layout to get the module address
        interconnect: remove module-related code
        interconnect: remove MODULE_LICENSE in non-modules
        zswap: remove MODULE_LICENSE in non-modules
        zpool: remove MODULE_LICENSE in non-modules
        x86/mm/dump_pagetables: remove MODULE_LICENSE in non-modules
        ...
      b6a78285
    • Linus Torvalds's avatar
      cdx: fix build failure due to sysfs 'bus_type' argument needing to be const · d06f5a3f
      Linus Torvalds authored
      Commit 75cff725 ("driver core: bus: mark the struct bus_type for
      sysfs callbacks as constant") missed at least one case - the CDX bus
      driver.  Probably because Greg didn't notice the build failure, because
      it only ends up being enabled on arm64.
      
      And I missed it during the merge, because while I do arm64 builds these
      days, I don't do them in between each pull.  So it took a while for me
      to notice the breakage, rather than me just fixing it in the driver core
      merge that brought this failure case in.
      
      Maybe we should remove the CDX_BUS dependency on arm64 when COMPILE_TEST
      is on?
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Nipun Gupta <nipun.gupta@amd.com>
      Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d06f5a3f
    • Johannes Berg's avatar
      ring-buffer: Sync IRQ works before buffer destruction · 675751bb
      Johannes Berg authored
      If something was written to the buffer just before destruction,
      it may be possible (maybe not in a real system, but it did
      happen in ARCH=um with time-travel) to destroy the ringbuffer
      before the IRQ work ran, leading this KASAN report (or a crash
      without KASAN):
      
          BUG: KASAN: slab-use-after-free in irq_work_run_list+0x11a/0x13a
          Read of size 8 at addr 000000006d640a48 by task swapper/0
      
          CPU: 0 PID: 0 Comm: swapper Tainted: G        W  O       6.3.0-rc1 #7
          Stack:
           60c4f20f 0c203d48 41b58ab3 60f224fc
           600477fa 60f35687 60c4f20f 601273dd
           00000008 6101eb00 6101eab0 615be548
          Call Trace:
           [<60047a58>] show_stack+0x25e/0x282
           [<60c609e0>] dump_stack_lvl+0x96/0xfd
           [<60c50d4c>] print_report+0x1a7/0x5a8
           [<603078d3>] kasan_report+0xc1/0xe9
           [<60308950>] __asan_report_load8_noabort+0x1b/0x1d
           [<60232844>] irq_work_run_list+0x11a/0x13a
           [<602328b4>] irq_work_tick+0x24/0x34
           [<6017f9dc>] update_process_times+0x162/0x196
           [<6019f335>] tick_sched_handle+0x1a4/0x1c3
           [<6019fd9e>] tick_sched_timer+0x79/0x10c
           [<601812b9>] __hrtimer_run_queues.constprop.0+0x425/0x695
           [<60182913>] hrtimer_interrupt+0x16c/0x2c4
           [<600486a3>] um_timer+0x164/0x183
           [...]
      
          Allocated by task 411:
           save_stack_trace+0x99/0xb5
           stack_trace_save+0x81/0x9b
           kasan_save_stack+0x2d/0x54
           kasan_set_track+0x34/0x3e
           kasan_save_alloc_info+0x25/0x28
           ____kasan_kmalloc+0x8b/0x97
           __kasan_kmalloc+0x10/0x12
           __kmalloc+0xb2/0xe8
           load_elf_phdrs+0xee/0x182
           [...]
      
          The buggy address belongs to the object at 000000006d640800
           which belongs to the cache kmalloc-1k of size 1024
          The buggy address is located 584 bytes inside of
           freed 1024-byte region [000000006d640800, 000000006d640c00)
      
      Add the appropriate irq_work_sync() so the work finishes before
      the buffers are destroyed.
      
      Prior to the commit in the Fixes tag below, there was only a
      single global IRQ work, so this issue didn't exist.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20230427175920.a76159263122.I8295e405c44362a86c995e9c2c37e3e03810aa56@changeid
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Fixes: 15693458 ("tracing/ring-buffer: Move poll wake ups into ring buffer code")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      675751bb
    • Paul Mackerras's avatar