1. Jul 04, 2023
  2. Jul 03, 2023
  3. Jun 28, 2023
    • Sumanth Korikkar's avatar
      s390/vdso: filter out mno-pic-data-is-text-relative cflag · d15e4314
      Sumanth Korikkar authored
      
      
      cmd_vdso_check checks if there are any dynamic relocations in
      vdso64.so.dbg. When kernel is compiled with
      -mno-pic-data-is-text-relative, R_390_RELATIVE relocs are generated and
      this results in kernel build error.
      
      kpatch uses -mno-pic-data-is-text-relative option when building the
      kernel to prevent relative addressing between code and data. The flag
      avoids relocation error when klp text and data are too far apart
      
      kpatch does not patch vdso code and hence the
      mno-pic-data-is-text-relative flag is not essential.
      
      Signed-off-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      d15e4314
    • Heiko Carstens's avatar
      s390: consistently use .balign instead of .align · 27d45655
      Heiko Carstens authored
      
      
      The .align directive has inconsistent behavior across architectures. Use
      .balign instead everywhere. This is a no-op for s390, but with this there
      is no mix in using .align and .balign anymore.
      
      Future code is supposed to use only .balign.
      
      Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      27d45655
    • Heiko Carstens's avatar
      s390/decompressor: fix misaligned symbol build error · 938f0c35
      Heiko Carstens authored
      Nathan Chancellor reported a kernel build error on Fedora 39:
      
      $ clang --version | head -1
      clang version 16.0.5 (Fedora 16.0.5-1.fc39)
      
      $ s390x-linux-gnu-ld --version | head -1
      GNU ld version 2.40-1.fc39
      
      $ make -skj"$(nproc)" ARCH=s390 CC=clang CROSS_COMPILE=s390x-linux-gnu- olddefconfig all
      s390x-linux-gnu-ld: arch/s390/boot/startup.o(.text+0x5b4): misaligned symbol `_decompressor_end' (0x35b0f) for relocation R_390_PC32DBL
      make[3]: *** [.../arch/s390/boot/Makefile:78: arch/s390/boot/vmlinux] Error 1
      
      It turned out that the problem with misaligned symbols on s390 was fixed
      with commit 80ddf5ce
      
       ("s390: always build relocatable kernel") for the
      kernel image, but did not take into account that the decompressor uses its
      own set of CFLAGS, which come without -fPIE.
      
      Add the -fPIE flag also to the decompresser CFLAGS to fix this.
      
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reported-by: default avatarCKI <cki-project@redhat.com>
      Suggested-by: default avatarUlrich Weigand <Ulrich.Weigand@de.ibm.com>
      Link: https://github.com/ClangBuiltLinux/linux/issues/1747
      Link: https://lore.kernel.org/32935.123062114500601371@us-mta-9.us.mimecast.lan/
      Link: https://lore.kernel.org/r/20230622125508.1068457-1-hca@linux.ibm.com
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      938f0c35
    • Heiko Carstens's avatar
      s390/zcrypt: use kvmalloc_array() instead of kzalloc() · 13cf06d5
      Heiko Carstens authored
      
      
      zcrypt_unlocked_ioctl() allocates 256k with kzalloc() which is likely to
      fail if memory is fragmented. To avoid that use kvmalloc_array() instead,
      like it is done at several other places for the same reason.
      
      Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      13cf06d5
    • Sven Schnelle's avatar
      s390/vdso: check for undefined symbols after build · 0dd0bbc2
      Sven Schnelle authored
      
      
      When adding an undefined symbol the build still succeeds, but
      userspace is crashing trying to execute vdso because the
      undefined symbol is not resolved. Add the check for undefined
      symbols to prevent this.
      
      Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      0dd0bbc2
    • Baoquan He's avatar
      s390/mm: do not include <asm-generic/io.h> directly · 51f513fd
      Baoquan He authored
      
      
      We should always include <asm/io.h> in ARCH, but not <asm-generic/io.h>
      directly. Otherwise, macro defined by ARCH won't be seen and could cause
      building error.
      
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202306100105.8GHnoMCP-lkp@intel.com/
      Link: https://lore.kernel.org/all/ZIWrtFMUnRfVP5h0@MiWiFi-R3L-srv/
      
      
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      [agordeev@linux.ibm.com changed patch description]
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      51f513fd
    • Alexander Gordeev's avatar
      s390/vmem: fix virtual vs physical address confusion · 688fcbbb
      Alexander Gordeev authored
      
      
      Fix virtual vs physical address confusion (which currently are the same).
      
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      688fcbbb
    • Alexander Gordeev's avatar
      s390/mm: get rid of VMEM_MAX_PHYS macro · 456be42a
      Alexander Gordeev authored
      
      
      VMEM_MAX_PHYS is supposed to be the highest physical
      address that can be added to the identity mapping.
      It should match ident_map_size, which has the same
      meaning. However, unlike ident_map_size it is not
      adjusted against various limiting factors (see the
      comment to setup_ident_map_size() function). That
      renders all checks against VMEM_MAX_PHYS invalid.
      
      Further, VMEM_MAX_PHYS is currently set to vmemmap,
      which is an address in virtual memory space. However,
      it gets compared against physical addresses in various
      locations. That works, because both address spaces
      are the same on s390, but otherwise it is wrong.
      
      Instead of fixing VMEM_MAX_PHYS misuse and semantics
      just remove it.
      
      Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      456be42a
    • Linus Torvalds's avatar
      Merge tag 's390-6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 6a466769
      Linus Torvalds authored
      Pull s390 updates from Alexander Gordeev:
      
       - Fix the style of protected key API driver source: use x-mas tree for
         all local variable declarations
      
       - Rework protected key API driver to not use the struct pkey_protkey
         and pkey_clrkey anymore. Both structures have a fixed size buffer,
         but with the support of ECC protected key these buffers are not big
         enough. Use dynamic buffers internally and transparently for
         userspace
      
       - Add support for a new 'non CCA clear key token' with ECC clear keys
         supported: ECC P256, ECC P384, ECC P521, ECC ED25519 and ECC ED448.
         This makes it possible to derive a protected key from the ECC clear
         key input via PKEY_KBLOB2PROTK3 ioctl, while currently the only way
         to derive is via PCKMO instruction
      
       - The s390 PMU of PAI crypto and extension 1 NNPA counters use atomic_t
         for reference counting. Replace this with the proper data type
         refcount_t
      
       - Select ARCH_SUPPORTS_INT128, but limit this to clang for now, since
         gcc generates inefficient code, which may lead to stack overflows
      
       - Replace one-element array with flexible-array member in struct
         vfio_ccw_parent and refactor the rest of the code accordingly. Also,
         prefer struct_size() over sizeof() open- coded versions
      
       - Introduce OS_INFO_FLAGS_ENTRY pointing to a flags field and
         OS_INFO_FLAG_REIPL_CLEAR flag that informs a dumper whether the
         system memory should be cleared or not once dumped
      
       - Fix a hang when a user attempts to remove a VFIO-AP mediated device
         attached to a guest: add VFIO_DEVICE_GET_IRQ_INFO and
         VFIO_DEVICE_SET_IRQS IOCTLs and wire up the VFIO bus driver callback
         to request a release of the device
      
       - Fix calculation for R_390_GOTENT relocations for modules
      
       - Allow any user space process with CAP_PERFMON capability read and
         display the CPU Measurement facility counter sets
      
       - Rework large statically-defined per-CPU cpu_cf_events data structure
         and replace it with dynamically allocated structures created when a
         perf_event_open() system call is invoked or /dev/hwctr device is
         accessed
      
      * tag 's390-6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/cpum_cf: rework PER_CPU_DEFINE of struct cpu_cf_events
        s390/cpum_cf: open access to hwctr device for CAP_PERFMON privileged process
        s390/module: fix rela calculation for R_390_GOTENT
        s390/vfio-ap: wire in the vfio_device_ops request callback
        s390/vfio-ap: realize the VFIO_DEVICE_SET_IRQS ioctl
        s390/vfio-ap: realize the VFIO_DEVICE_GET_IRQ_INFO ioctl
        s390/pkey: add support for ecc clear key
        s390/pkey: do not use struct pkey_protkey
        s390/pkey: introduce reverse x-mas trees
        s390/zcore: conditionally clear memory on reipl
        s390/ipl: add REIPL_CLEAR flag to os_info
        vfio/ccw: use struct_size() helper
        vfio/ccw: replace one-element array with flexible-array member
        s390: select ARCH_SUPPORTS_INT128
        s390/pai_ext: replace atomic_t with refcount_t
        s390/pai_crypto: replace atomic_t with refcount_t
      6a466769
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20230627' of https://github.com/jcmvbkbc/linux-xtensa · 8d8026f3
      Linus Torvalds authored
      Pull xtensa updates from Max Filippov:
      
       - clean up platform_* interface of the xtensa architecture
      
       - enable HAVE_ASM_MODVERSIONS
      
       - drop ARCH_WANT_FRAME_POINTERS
      
       - clean up unaligned access exception handler
      
       - provide handler for load/store exceptions
      
       - various small fixes and cleanups
      
      * tag 'xtensa-20230627' of https://github.com/jcmvbkbc/linux-xtensa:
        xtensa: dump userspace code around the exception PC
        xtensa: rearrange show_stack output
        xtensa: add load/store exception handler
        xtensa: rearrange unaligned exception handler
        xtensa: always install slow handler for unaligned access exception
        xtensa: move early_trap_init from kasan_early_init to init_arch
        xtensa: drop ARCH_WANT_FRAME_POINTERS
        xtensa: report trax and perf counters in cpuinfo
        xtensa: add asm-prototypes.h
        xtensa: only build __strncpy_user with CONFIG_ARCH_HAS_STRNCPY_FROM_USER
        xtensa: drop bcopy implementation
        xtensa: drop EXPORT_SYMBOL for common_exception_return
        xtensa: boot-redboot: clean up Makefile
        xtensa: clean up default platform functions
        xtensa: drop platform_halt and platform_power_off
        xtensa: drop platform_restart
        xtensa: drop platform_heartbeat
        xtensa: xt2000: drop empty platform_init
      8d8026f3
    • Dinh Nguyen's avatar
      Revert "nios2: Convert __pte_free_tlb() to use ptdescs" · 0ae61229
      Dinh Nguyen authored
      This reverts commit 6ebe94ba
      
      .
      
      The patch "nios2: Convert __pte_free_tlb() to use ptdescs" was supposed
      to go together with a patchset that Vishal Moola had planned taking it
      through the mm tree. By just having this patch, all NIOS2 builds are
      broken.
      
      Signed-off-by: default avatarDinh Nguyen <dinguyen@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0ae61229
    • Linus Torvalds's avatar
      Merge tag 'objtool-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6f612579
      Linus Torvalds authored
      Pull objtool updates from Ingo Molar:
       "Build footprint & performance improvements:
      
         - Reduce memory usage with CONFIG_DEBUG_INFO=y
      
           In the worst case of an allyesconfig+CONFIG_DEBUG_INFO=y kernel,
           DWARF creates almost 200 million relocations, ballooning objtool's
           peak heap usage to 53GB. These patches reduce that to 25GB.
      
           On a distro-type kernel with kernel IBT enabled, they reduce
           objtool's peak heap usage from 4.2GB to 2.8GB.
      
           These changes also improve the runtime significantly.
      
        Debuggability improvements:
      
         - Add the unwind_debug command-line option, for more extend unwinding
           debugging output
         - Limit unreachable warnings to once per function
         - Add verbose option for disassembling affected functions
         - Include backtrace in verbose mode
         - Detect missing __noreturn annotations
         - Ignore exc_double_fault() __noreturn warnings
         - Remove superfluous global_noreturns entries
         - Move noreturn function list to separate file
         - Add __kunit_abort() to noreturns
      
        Unwinder improvements:
      
         - Allow stack operations in UNWIND_HINT_UNDEFINED regions
         - drm/vmwgfx: Add unwind hints around RBP clobber
      
        Cleanups:
      
         - Move the x86 entry thunk restore code into thunk functions
         - x86/unwind/orc: Use swap() instead of open coding it
         - Remove unnecessary/unused variables
      
        Fixes for modern stack canary handling"
      
      * tag 'objtool-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits)
        x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y
        objtool: Skip reading DWARF section data
        objtool: Free insns when done
        objtool: Get rid of reloc->rel[a]
        objtool: Shrink elf hash nodes
        objtool: Shrink reloc->sym_reloc_entry
        objtool: Get rid of reloc->jump_table_start
        objtool: Get rid of reloc->addend
        objtool: Get rid of reloc->type
        objtool: Get rid of reloc->offset
        objtool: Get rid of reloc->idx
        objtool: Get rid of reloc->list
        objtool: Allocate relocs in advance for new rela sections
        objtool: Add for_each_reloc()
        objtool: Don't free memory in elf_close()
        objtool: Keep GElf_Rel[a] structs synced
        objtool: Add elf_create_section_pair()
        objtool: Add mark_sec_changed()
        objtool: Fix reloc_hash size
        objtool: Consolidate rel/rela handling
        ...
      6f612579
    • Linus Torvalds's avatar
      Merge tag 'x86-mm-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4d675181
      Linus Torvalds authored
      Pull x86 mm updates from Ingo Molnar:
      
       - Remove Xen-PV leftovers from init_32.c
      
       - Fix __swp_entry_to_pte() warning splat for Xen PV guests, triggered
         on CONFIG_DEBUG_VM_PGTABLE=y
      
      * tag 'x86-mm-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Remove Xen-PV leftovers from init_32.c
        x86/mm: Fix __swp_entry_to_pte() for Xen PV guests
      4d675181
    • Linus Torvalds's avatar
      Merge tag 'perf-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a193cc75
      Linus Torvalds authored
      Pull perf events updates from Ingo Molnar:
      
       - Rework & fix the event forwarding logic by extending the core
         interface.
      
         This fixes AMD PMU events that have to be forwarded from the
         core PMU to the IBS PMU.
      
       - Add self-tests to test AMD IBS invocation via core PMU events
      
       - Clean up Intel FixCntrCtl MSR encoding & handling
      
      * tag 'perf-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Re-instate the linear PMU search
        perf/x86/intel: Define bit macros for FixCntrCtl MSR
        perf test: Add selftest to test IBS invocation via core pmu events
        perf/core: Remove pmu linear searching code
        perf/ibs: Fix interface via core pmu events
        perf/core: Rework forwarding of {task|cpu}-clock events
      a193cc75
    • Linus Torvalds's avatar
      Merge tag 'locking-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bc6cb4d5
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
      
       - Introduce cmpxchg128() -- aka. the demise of cmpxchg_double()
      
         The cmpxchg128() family of functions is basically & functionally the
         same as cmpxchg_double(), but with a saner interface.
      
         Instead of a 6-parameter horror that forced u128 - u64/u64-halves
         layout details on the interface and exposed users to complexity,
         fragility & bugs, use a natural 3-parameter interface with u128
         types.
      
       - Restructure the generated atomic headers, and add kerneldoc comments
         for all of the generic atomic{,64,_long}_t operations.
      
         The generated definitions are much cleaner now, and come with
         documentation.
      
       - Implement lock_set_cmp_fn() on lockdep, for defining an ordering when
         taking multiple locks of the same type.
      
         This gets rid of one use of lockdep_set_novalidate_class() in the
         bcache code.
      
       - Fix raw_cpu_generic_try_cmpxchg() bug due to an unintended variable
         shadowing generating garbage code on Clang on certain ARM builds.
      
      * tag 'locking-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (43 commits)
        locking/atomic: scripts: fix ${atomic}_dec_if_positive() kerneldoc
        percpu: Fix self-assignment of __old in raw_cpu_generic_try_cmpxchg()
        locking/atomic: treewide: delete arch_atomic_*() kerneldoc
        locking/atomic: docs: Add atomic operations to the driver basic API documentation
        locking/atomic: scripts: generate kerneldoc comments
        docs: scripts: kernel-doc: accept bitwise negation like ~@var
        locking/atomic: scripts: simplify raw_atomic*() definitions
        locking/atomic: scripts: simplify raw_atomic_long*() definitions
        locking/atomic: scripts: split pfx/name/sfx/order
        locking/atomic: scripts: restructure fallback ifdeffery
        locking/atomic: scripts: build raw_atomic_long*() directly
        locking/atomic: treewide: use raw_atomic*_<op>()
        locking/atomic: scripts: add trivial raw_atomic*_<op>()
        locking/atomic: scripts: factor out order template generation
        locking/atomic: scripts: remove leftover "${mult}"
        locking/atomic: scripts: remove bogus order parameter
        locking/atomic: xtensa: add preprocessor symbols
        locking/atomic: x86: add preprocessor symbols
        locking/atomic: sparc: add preprocessor symbols
        locking/atomic: sh: add preprocessor symbols
        ...
      bc6cb4d5
    • Linus Torvalds's avatar
      Merge tag 'sched-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ed3b7923
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
       "Scheduler SMP load-balancer improvements:
      
         - Avoid unnecessary migrations within SMT domains on hybrid systems.
      
           Problem:
      
              On hybrid CPU systems, (processors with a mixture of
              higher-frequency SMT cores and lower-frequency non-SMT cores),
              under the old code lower-priority CPUs pulled tasks from the
              higher-priority cores if more than one SMT sibling was busy -
              resulting in many unnecessary task migrations.
      
           Solution:
      
              The new code improves the load balancer to recognize SMT cores
              with more than one busy sibling and allows lower-priority CPUs
              to pull tasks, which avoids superfluous migrations and lets
              lower-priority cores inspect all SMT siblings for the busiest
              queue.
      
         - Implement the 'runnable boosting' feature in the EAS balancer:
           consider CPU contention in frequency, EAS max util & load-balance
           busiest CPU selection.
      
           This improves CPU utilization for certain workloads, while leaves
           other key workloads unchanged.
      
        Scheduler infrastructure improvements:
      
         - Rewrite the scheduler topology setup code by consolidating it into
           the build_sched_topology() helper function and building it
           dynamically on the fly.
      
         - Resolve the local_clock() vs. noinstr complications by rewriting
           the code: provide separate sched_clock_noinstr() and
           local_clock_noinstr() functions to be used in instrumentation code,
           and make sure it is all instrumentation-safe.
      
        Fixes:
      
         - Fix a kthread_park() race with wait_woken()
      
         - Fix misc wait_task_inactive() bugs unearthed by the -rt merge:
             - Fix UP PREEMPT bug by unifying the SMP and UP implementations
             - Fix task_struct::saved_state handling
      
         - Fix various rq clock update bugs, unearthed by turning on the rq
           clock debugging code.
      
         - Fix the PSI WINDOW_MIN_US trigger limit, which was easy to trigger
           by creating enough cgroups, by removing the warnign and restricting
           window size triggers to PSI file write-permission or
           CAP_SYS_RESOURCE.
      
         - Propagate SMT flags in the topology when removing degenerate domain
      
         - Fix grub_reclaim() calculation bug in the deadline scheduler code
      
         - Avoid resetting the min update period when it is unnecessary, in
           psi_trigger_destroy().
      
         - Don't balance a task to its current running CPU in load_balance(),
           which was possible on certain NUMA topologies with overlapping
           groups.
      
         - Fix the sched-debug printing of rq->nr_uninterruptible
      
        Cleanups:
      
         - Address various -Wmissing-prototype warnings, as a preparation to
           (maybe) enable this warning in the future.
      
         - Remove unused code
      
         - Mark more functions __init
      
         - Fix shadow-variable warnings"
      
      * tag 'sched-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits)
        sched/core: Avoid multiple calling update_rq_clock() in __cfsb_csd_unthrottle()
        sched/core: Avoid double calling update_rq_clock() in __balance_push_cpu_stop()
        sched/core: Fixed missing rq clock update before calling set_rq_offline()
        sched/deadline: Update GRUB description in the documentation
        sched/deadline: Fix bandwidth reclaim equation in GRUB
        sched/wait: Fix a kthread_park race with wait_woken()
        sched/topology: Mark set_sched_topology() __init
        sched/fair: Rename variable cpu_util eff_util
        arm64/arch_timer: Fix MMIO byteswap
        sched/fair, cpufreq: Introduce 'runnable boosting'
        sched/fair: Refactor CPU utilization functions
        cpuidle: Use local_clock_noinstr()
        sched/clock: Provide local_clock_noinstr()
        x86/tsc: Provide sched_clock_noinstr()
        clocksource: hyper-v: Provide noinstr sched_clock()
        clocksource: hyper-v: Adjust hv_read_tsc_page_tsc() to avoid special casing U64_MAX
        x86/vdso: Fix gettimeofday masking
        math64: Always inline u128 version of mul_u64_u64_shr()
        s390/time: Provide sched_clock_noinstr()
        loongarch: Provide noinstr sched_clock_read()
        ...
      ed3b7923
    • Linus Torvalds's avatar
      Merge tag 'x86_sgx_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e8f75c02
      Linus Torvalds authored
      Pull SGX update from Borislav Petkov:
      
       - A fix to avoid using a list iterator variable after the loop it is
         used in
      
      * tag 'x86_sgx_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sgx: Avoid using iterator after loop in sgx_mmu_notifier_release()
      e8f75c02
    • Linus Torvalds's avatar
      Merge tag 'x86_sev_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 12dc0100
      Linus Torvalds authored
      Pull x86 SEV updates from Borislav Petkov:
      
       - Some SEV and CC platform helpers cleanup and simplifications now that
         the usage patterns are becoming apparent
      
      [ I'm sure I'm the only one that has gets confused by all the TLAs, but
        in case there are others: here SEV is AMD's "Secure Encrypted
        Virtualization" and CC is generic "Confidential Computing".
      
        There's also Intel SGX (Software Guard Extensions) and TDX (Trust
        Domain Extensions), along with all the vendor memory encryption
        extensions (SME, TSME, TME, and WTF).
      
        And then we have arm64 with RMA and CCA, and I probably forgot another
        dozen or so related acronyms    - Linus ]
      
      * tag 'x86_sev_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/coco: Get rid of accessor functions
        x86/sev: Get rid of special sev_es_enable_key
        x86/coco: Mark cc_platform_has() and descendants noinstr
      12dc0100
    • Linus Torvalds's avatar
      Merge tag 'x86_mtrr_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dc43fc75
      Linus Torvalds authored
      Pull x86 mtrr updates from Borislav Petkov:
       "A serious scrubbing of the MTRR code including adding a new map
        mechanism in order to look up the memory type of a region easily.
      
        Also address memory range lookup issues like returning an invalid
        memory type. Furthermore, this handles the decoupling of PAT from MTRR
        more naturally.
      
        All work by Juergen Gross"
      
      * tag 'x86_mtrr_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/xen: Set default memory type for PV guests to WB
        x86/mtrr: Unify debugging printing
        x86/mtrr: Remove unused code
        x86/mm: Only check uniform after calling mtrr_type_lookup()
        x86/mtrr: Don't let mtrr_type_lookup() return MTRR_TYPE_INVALID
        x86/mtrr: Use new cache_map in mtrr_type_lookup()
        x86/mtrr: Add mtrr=debug command line option
        x86/mtrr: Construct a memory map with cache modes
        x86/mtrr: Add get_effective_type() service function
        x86/mtrr: Allocate mtrr_value array dynamically
        x86/mtrr: Move 32-bit code from mtrr.c to legacy.c
        x86/mtrr: Have only one set_mtrr() variant
        x86/mtrr: Replace vendor tests in MTRR code
        x86/xen: Set MTRR state when running as Xen PV initial domain
        x86/hyperv: Set MTRR state when running as SEV-SNP Hyper-V guest
        x86/mtrr: Support setting MTRR state for software defined MTRRs
        x86/mtrr: Replace size_or_mask and size_and_mask with a much easier concept
        x86/mtrr: Remove physical address size calculation
      dc43fc75
    • Linus Torvalds's avatar
      Merge tag 'x86_misc_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4baa098a
      Linus Torvalds authored
      Pull misc x86 updates from Borislav Petkov:
      
       - Remove the local symbols prefix of the get/put_user() exception
         handling symbols so that tools do not get confused by the presence of
         code belonging to the wrong symbol/not belonging to any symbol
      
       - Improve csum_partial()'s performance
      
       - Some improvements to the kcpuid tool
      
      * tag 'x86_misc_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/lib: Make get/put_user() exception handling a visible symbol
        x86/csum: Fix clang -Wuninitialized in csum_partial()
        x86/csum: Improve performance of `csum_partial`
        tools/x86/kcpuid: Add .gitignore
        tools/x86/kcpuid: Dump the correct CPUID function in error
      4baa098a
    • Linus Torvalds's avatar
      Merge tag 'x86_microcode_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4aacacee
      Linus Torvalds authored
      Pull x86 microcode loader updates from Borislav Petkov:
      
       - Load late on both SMT threads on AMD, just like it is being done in
         the early loading procedure
      
        - Cleanups
      
      * tag 'x86_microcode_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/microcode/AMD: Load late on both threads too
        x86/microcode/amd: Remove unneeded pointer arithmetic
        x86/microcode/AMD: Get rid of __find_equiv_id()
      4aacacee
    • Linus Torvalds's avatar
      Merge tag 'docs-arm-move' of git://git.lwn.net/linux · 04fc8904
      Linus Torvalds authored
      Pull arm documentation move from Jonathan Corbet:
       "Move the Arm architecture documentation under Documentation/arch/.
      
        This brings some order to the documentation directory, declutters the
        top-level directory, and makes the documentation organization more
        closely match that of the source"
      
      * tag 'docs-arm-move' of git://git.lwn.net/linux:
        dt-bindings: Update Documentation/arm references
        docs: update some straggling Documentation/arm references
        crypto: update some Arm documentation references
        mips: update a reference to a moved Arm Document
        arm64: Update Documentation/arm references
        arm: update in-source documentation references
        arm: docs: Move Arm documentation to Documentation/arch/
      04fc8904
    • Linus Torvalds's avatar
      Merge tag 'docs-6.5' of git://git.lwn.net/linux · a3540495
      Linus Torvalds authored
      Pull documentation updates from Jonathan Corbet:
       "It's been a relatively calm cycle in docsland. We do have:
      
         - Some initial page-table documentation from Linus (the other Linus)
      
         - Regression-handling documentation improvements from Thorsten
      
         - Addition of kerneldoc documentation for the ERR_PTR() and related
           macros from James Seo
      
        ... and the usual collection of fixes and updates"
      
      * tag 'docs-6.5' of git://git.lwn.net/linux:
        docs: consolidate storage interfaces
        Documentation: update git configuration for Link: tag
        Documentation: KVM: make corrections to vcpu-requests.rst
        Documentation: KVM: make corrections to ppc-pv.rst
        Documentation: KVM: make corrections to locking.rst
        Documentation: KVM: make corrections to halt-polling.rst
        Documentation: virt: correct location of haltpoll module params
        Documentation/mm: Initial page table documentation
        docs: crypto: async-tx-api: fix typo in struct name
        docs/doc-guide: Clarify how to write tables
        docs: handling-regressions: rework section about fixing procedures
        docs: process: fix a typoed cross-reference
        docs: submitting-patches: Discuss interleaved replies
        MAINTAINERS: direct process doc changes to a dedicated ML
        Documentation: core-api: Add error pointer functions to kernel-api
        err.h: Add missing kerneldocs for error pointer functions
        Documentation: conf.py: Add __force to c_id_attributes
        docs: clarify KVM related kernel parameters' descriptions
        docs: consolidate human interface subsystems
        docs: admin-guide: Add information about intel_pstate active mode
      a3540495
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-next-6.5-rc1' of... · dedbf31a
      Linus Torvalds authored
      Merge tag 'linux-kselftest-next-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest updates from Shuah Khan:
      
       - allow runners to override the timeout
      
         This change is made to avoid future increases of long timeouts
      
       - several other spelling and cleanups
      
       - a new subtest to video_device_test
      
       - enhancements to test coverage in clone3 test
      
       - other fixes to ftrace and cpufreq tests
      
      * tag 'linux-kselftest-next-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/ftace: Fix KTAP output ordering
        selftests/cpufreq: Don't enable generic lock debugging options
        kselftests: Sort the collections list to avoid duplicate tests
        selftest: pidfd: Omit long and repeating outputs
        selftests: allow runners to override the timeout
        selftests/ftrace: Add new test case which checks for optimized probes
        selftests/clone3: test clone3 with exit signal in flags
        kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined
        selftests: prctl: Fix spelling mistake "anonynous" -> "anonymous"
        selftests: media_tests: Add new subtest to video_device_test
      dedbf31a
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-kunit-6.5-rc1' of... · 9ba92dc1
      Linus Torvalds authored
      Merge tag 'linux-kselftest-kunit-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull KUnit updates from Shuah Khan:
      
       - kunit_add_action() API to defer a call until test exit
      
       - Update document to add kunit_add_action() usage notes
      
       - Changes to always run cleanup from a test kthread
      
       - Documentation updates to clarify cleanup usage (assertions should not
         be used in cleanup)
      
       - Documentation update to clearly indicate that exit functions should
         run even if init fails
      
       - Several fixes and enhancements to existing tests
      
      * tag 'linux-kselftest-kunit-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        MAINTAINERS: Add source tree entry for kunit
        Documentation: kunit: Rename references to kunit_abort()
        kunit: Move kunit_abort() call out of kunit_do_failed_assertion()
        kunit: Fix obsolete name in documentation headers (func->action)
        Documentation: Kunit: add MODULE_LICENSE to sample code
        kunit: Update kunit_print_ok_not_ok function
        kunit: Fix reporting of the skipped parameterized tests
        kunit/test: Add example test showing parameterized testing
        Documentation: kunit: Add usage notes for kunit_add_action()
        kunit: kmalloc_array: Use kunit_add_action()
        kunit: executor_test: Use kunit_add_action()
        kunit: Add kunit_add_action() to defer a call until test exit
        kunit: example: Provide example exit functions
        Documentation: kunit: Warn that exit functions run even if init fails
        Documentation: kunit: Note that assertions should not be used in cleanup
        kunit: Always run cleanup from a test kthread
        Documentation: kunit: Modular tests should not depend on KUNIT=y
        kunit: tool: undo type subscripts for subprocess.Popen
      9ba92dc1
    • Linus Torvalds's avatar
      Merge tag 'nolibc.2023.06.22a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu · b19edac5
      Linus Torvalds authored
      Pull nolibc updates from Paul McKenney:
      
       - Add stackprotector support
      
       - Fix RISC-V load-store instruction syntax to support 32-bit binaries,
         plus fixes for generic 32-bit support
      
       - Fix use of s390 sys_fork()
      
       - Add my_syscall6() for ARM
      
       - Support different platforms having different errno definitions
      
       - Fix ppoll/ppoll_time64 arguments (add the fifth argument)
      
       - Force use of little endian on MIPS
      
       - Improved testing, for example, better handling of different compilers
         and compiler versions, comparing nolibc behavior to that of libc, and
         additional test cases
      
       - Improve syntax and header ordering
      
       - Use existing <linux/reboot.h> instead of redefining constants
      
       - Add syscall()
      
      * tag 'nolibc.2023.06.22a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (53 commits)
        selftests/nolibc: make sure gcc always use little endian on MIPS
        selftests/nolibc: also count skipped and failed tests in output
        selftests/nolibc: add new gettimeofday test cases
        selftests/nolibc: remove gettimeofday_bad1/2 completely
        selftests/nolibc: support two errnos with EXPECT_SYSER2()
        tools/nolibc: open: fix up compile warning for arm
        tools/nolibc: arm: add missing my_syscall6
        selftests/nolibc: use INT_MAX instead of __INT_MAX__
        selftests/nolibc: not include limits.h for nolibc
        selftests/nolibc: fix up compile warning with glibc on x86_64
        selftests/nolibc: allow specify extra arguments for qemu
        selftests/nolibc: remove test gettimeofday_null
        tools/nolibc: ensure fast64 integer types have 64 bits
        selftests/nolibc: test_fork: fix up duplicated print
        tools/nolibc: ppoll/ppoll_time64: add a missing argument
        selftests/nolibc: remove the duplicated gettimeofday_bad2
        selftests/nolibc: print name instead of number for EOVERFLOW
        tools/nolibc: support nanoseconds in stat()
        selftests/nolibc: prevent coredumps during test execution
        tools/nolibc: add support for prctl()
        ...
      b19edac5
    • Linus Torvalds's avatar
      Merge tag 'rcu.2023.06.22a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu · af96134d
      Linus Torvalds authored
      Pull RCU updates from Paul McKenney:
       "Documentation updates
      
        Miscellaneous fixes, perhaps most notably:
      
         - Remove RCU_NONIDLE(). The new visibility of most of the idle loop
           to RCU has obsoleted this API.
      
         - Make the RCU_SOFTIRQ callback-invocation time limit also apply to
           the rcuc kthreads that invoke callbacks for CONFIG_PREEMPT_RT.
      
         - Add a jiffies-based callback-invocation time limit to handle
           long-running callbacks. (The local_clock() function is only invoked
           once per 32 callbacks due to its high overhead.)
      
         - Stop rcu_tasks_invoke_cbs() from using never-onlined CPUs, which
           fixes a bug that can occur on systems with non-contiguous CPU
           numbering.
      
        kvfree_rcu updates:
      
         - Eliminate the single-argument variant of k[v]free_rcu() now that
           all uses have been converted to k[v]free_rcu_mightsleep().
      
         - Add WARN_ON_ONCE() checks for k[v]free_rcu*() freeing callbacks too
           soon. Yes, this is closing the barn door after the horse has
           escaped, but Murphy says that there will be more horses.
      
        Callback-offloading updates:
      
         - Fix a number of bugs involving the shrinker and lazy callbacks.
      
        Tasks RCU updates
      
        Torture-test updates"
      
      * tag 'rcu.2023.06.22a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (32 commits)
        torture: Remove duplicated argument -enable-kvm for ppc64
        doc/rcutorture: Add description of rcutorture.stall_cpu_block
        rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale
        rcu/rcuscale: Move rcu_scale_*() after kfree_scale_cleanup()
        rcutorture: Correct name of use_softirq module parameter
        locktorture: Add long_hold to adjust lock-hold delays
        rcu/nocb: Make shrinker iterate only over NOCB CPUs
        rcu-tasks: Stop rcu_tasks_invoke_cbs() from using never-onlined CPUs
        rcu: Make rcu_cpu_starting() rely on interrupts being disabled
        rcu: Mark rcu_cpu_kthread() accesses to ->rcu_cpu_has_work
        rcu: Mark additional concurrent load from ->cpu_no_qs.b.exp
        rcu: Employ jiffies-based backstop to callback time limit
        rcu: Check callback-invocation time limit for rcuc kthreads
        rcu: Remove RCU_NONIDLE()
        rcu: Add more RCU files to kernel-api.rst
        rcu-tasks: Clarify the cblist_init_generic() function's pr_info() output
        rcu-tasks: Avoid pr_info() with spin lock in cblist_init_generic()
        rcu/nocb: Recheck lazy callbacks under the ->nocb_lock from shrinker
        rcu/nocb: Fix shrinker race against callback enqueuer
        rcu/nocb: Protect lazy shrinker against concurrent (de-)offloading
        ...
      af96134d
  4. Jun 27, 2023
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v6.5' of... · 1ef6663a
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform updates from Tzung-Bi Shih:
       "Improvements:
      
         - Support Pin Assignment D in getting mux state
      
         - Emit an uevent when EC panics so that userland programs get chance
           to capture EC coredumps (LPC interface only)
      
         - Send EC_CMD_HOST_SLEEP_EVENT to EC at the very beginning/end of
           system suspend/resume so that EC can watch the duration more
           accurately (LPC interface only)
      
        Misc:
      
         - Switch back from I2C .probe_new() to .probe()
      
         - Use %*ph for printing hexdump of small buffers"
      
      * tag 'tag-chrome-platform-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
        platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer
        platform/chrome: Switch i2c drivers back to use .probe()
        platform/chrome: cros_ec_lpc: Move host command to prepare/complete
        platform/chrome: cros_ec: Report EC panic as uevent
        platform/chrome: cros_typec_switch: Add Pin D support
      1ef6663a