1. 28 Jun, 2021 27 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 36824f19
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "This covers all architectures (except MIPS) so I don't expect any
        other feature pull requests this merge window.
      
        ARM:
      
         - Add MTE support in guests, complete with tag save/restore interface
      
         - Reduce the impact of CMOs by moving them in the page-table code
      
         - Allow device block mappings at stage-2
      
         - Reduce the footprint of the vmemmap in protected mode
      
         - Support the vGIC on dumb systems such as the Apple M1
      
         - Add selftest infrastructure to support multiple configuration and
           apply that to PMU/non-PMU setups
      
         - Add selftests for the debug architecture
      
         - The usual crop of PMU fixes
      
        PPC:
      
         - Support for the H_RPT_INVALIDATE hypercall
      
         - Conversion of Book3S entry/exit to C
      
         - Bug fixes
      
        S390:
      
         - new HW facilities for guests
      
         - make inline assembly more robust with KASAN and co
      
        x86:
      
         - Allow userspace to handle emulation errors (unknown instructions)
      
         - Lazy allocation of the rmap (host physical -> guest physical
           address)
      
         - Support for virtualizing TSC scaling on VMX machines
      
         - Optimizations to avoid shattering huge pages at the beginning of
           live migration
      
         - Support for initializing the PDPTRs without loading them from
           memory
      
         - Many TLB flushing cleanups
      
         - Refuse to load if two-stage paging is available but NX is not (this
           has been a requirement in practice for over a year)
      
         - A large series that separates the MMU mode (WP/SMAP/SMEP etc.) from
           CR0/CR4/EFER, using the MMU mode everywhere once it is computed
           from the CPU registers
      
         - Use PM notifier to notify the guest about host suspend or hibernate
      
         - Support for passing arguments to Hyper-V hypercalls using XMM
           registers
      
         - Support for Hyper-V TLB flush hypercalls and enlightened MSR bitmap
           on AMD processors
      
         - Hide Hyper-V hypercalls that are not included in the guest CPUID
      
         - Fixes for live migration of virtual machines that use the Hyper-V
           "enlightened VMCS" optimization of nested virtualization
      
         - Bugfixes (not many)
      
        Generic:
      
         - Support for retrieving statistics without debugfs
      
         - Cleanups for the KVM selftests API"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (314 commits)
        KVM: x86: rename apic_access_page_done to apic_access_memslot_enabled
        kvm: x86: disable the narrow guest module parameter on unload
        selftests: kvm: Allows userspace to handle emulation errors.
        kvm: x86: Allow userspace to handle emulation errors
        KVM: x86/mmu: Let guest use GBPAGES if supported in hardware and TDP is on
        KVM: x86/mmu: Get CR4.SMEP from MMU, not vCPU, in shadow page fault
        KVM: x86/mmu: Get CR0.WP from MMU, not vCPU, in shadow page fault
        KVM: x86/mmu: Drop redundant rsvd bits reset for nested NPT
        KVM: x86/mmu: Optimize and clean up so called "last nonleaf level" logic
        KVM: x86: Enhance comments for MMU roles and nested transition trickiness
        KVM: x86/mmu: WARN on any reserved SPTE value when making a valid SPTE
        KVM: x86/mmu: Add helpers to do full reserved SPTE checks w/ generic MMU
        KVM: x86/mmu: Use MMU's role to determine PTTYPE
        KVM: x86/mmu: Collapse 32-bit PAE and 64-bit statements for helpers
        KVM: x86/mmu: Add a helper to calculate root from role_regs
        KVM: x86/mmu: Add helper to update paging metadata
        KVM: x86/mmu: Don't update nested guest's paging bitmasks if CR0.PG=0
        KVM: x86/mmu: Consolidate reset_rsvds_bits_mask() calls
        KVM: x86/mmu: Use MMU role_regs to get LA57, and drop vCPU LA57 helper
        KVM: x86/mmu: Get nested MMU's root level from the MMU's role
        ...
      36824f19
    • Linus Torvalds's avatar
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 9840cfcb
      Linus Torvalds authored
      Pull arm64 updates from Will Deacon:
       "There's a reasonable amount here and the juicy details are all below.
      
        It's worth noting that the MTE/KASAN changes strayed outside of our
        usual directories due to core mm changes and some associated changes
        to some other architectures; Andrew asked for us to carry these [1]
        rather that take them via the -mm tree.
      
        Summary:
      
         - Optimise SVE switching for CPUs with 128-bit implementations.
      
         - Fix output format from SVE selftest.
      
         - Add support for versions v1.2 and 1.3 of the SMC calling
           convention.
      
         - Allow Pointer Authentication to be configured independently for
           kernel and userspace.
      
         - PMU driver cleanups for managing IRQ affinity and exposing event
           attributes via sysfs.
      
         - KASAN optimisations for both hardware tagging (MTE) and out-of-line
           software tagging implementations.
      
         - Relax frame record alignment requirements to facilitate 8-byte
           alignment with KASAN and Clang.
      
         - Cleanup of page-table definitions and removal of unused memory
           types.
      
         - Reduction of ARCH_DMA_MINALIGN back to 64 bytes.
      
         - Refactoring of our instruction decoding routines and addition of
           some missing encodings.
      
         - Move entry code moved into C and hardened against harmful compiler
           instrumentation.
      
         - Update booting requirements for the FEAT_HCX feature, added to v8.7
           of the architecture.
      
         - Fix resume from idle when pNMI is being used.
      
         - Additional CPU sanity checks for MTE and preparatory changes for
           systems where not all of the CPUs support 32-bit EL0.
      
         - Update our kernel string routines to the latest Cortex Strings
           implementation.
      
         - Big cleanup of our cache maintenance routines, which were
           confusingly named and inconsistent in their implementations.
      
         - Tweak linker flags so that GDB can understand vmlinux when using
           RELR relocations.
      
         - Boot path cleanups to enable early initialisation of per-cpu
           operations needed by KCSAN.
      
         - Non-critical fixes and miscellaneous cleanup"
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (150 commits)
        arm64: tlb: fix the TTL value of tlb_get_level
        arm64: Restrict undef hook for cpufeature registers
        arm64/mm: Rename ARM64_SWAPPER_USES_SECTION_MAPS
        arm64: insn: avoid circular include dependency
        arm64: smp: Bump debugging information print down to KERN_DEBUG
        drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe()
        perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number
        arm64: suspend: Use cpuidle context helpers in cpu_suspend()
        PSCI: Use cpuidle context helpers in psci_cpu_suspend_enter()
        arm64: Convert cpu_do_idle() to using cpuidle context helpers
        arm64: Add cpuidle context save/restore helpers
        arm64: head: fix code comments in set_cpu_boot_mode_flag
        arm64: mm: drop unused __pa(__idmap_text_start)
        arm64: mm: fix the count comments in compute_indices
        arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan
        arm64: mm: Pass original fault address to handle_mm_fault()
        arm64/mm: Drop SECTION_[SHIFT|SIZE|MASK]
        arm64/mm: Use CONT_PMD_SHIFT for ARM64_MEMSTART_SHIFT
        arm64/mm: Drop SWAPPER_INIT_MAP_SIZE
        arm64: Conditionally configure PTR_AUTH key of the kernel.
        ...
      9840cfcb
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 17cfb9d3
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
      
        - update Finn's email address in MAINTAINERS
      
        - defconfig updates
      
        - minor fixes and improvements
      
      * tag 'm68k-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: atari: Fix ATARI_KBD_CORE kconfig unmet dependency warning
        m68k: defconfig: Update defconfigs for v5.13-rc1
        MAINTAINERS, .mailmap: Update Finn Thain's email address
        m68k: dma: Remove unnecessary include of asm/cacheflush.h
        m68k: Drop -fno-strength-reduce from KBUILD_CFLAGS
      17cfb9d3
    • Linus Torvalds's avatar
      Merge tag 'x86-splitlock-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1b1cf8fe
      Linus Torvalds authored
      Pull x86 splitlock updates from Ingo Molnar:
      
       - Add the "ratelimit:N" parameter to the split_lock_detect= boot
         option, to rate-limit the generation of bus-lock exceptions.
      
         This is both easier on system resources and kinder to offending
         applications than the current policy of outright killing them.
      
       - Document the split-lock detection feature and its parameters.
      
      * tag 'x86-splitlock-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Documentation/x86: Add ratelimit in buslock.rst
        Documentation/admin-guide: Add bus lock ratelimit
        x86/bus_lock: Set rate limit for bus lock
        Documentation/x86: Add buslock.rst
      1b1cf8fe
    • Linus Torvalds's avatar
      Merge tag 'x86-mm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5f498328
      Linus Torvalds authored
      Pull x86 mm update from Ingo Molnar:
       "Do not create the x86/init_pkru debugfs file if the CPU doesn't
        support PKRU"
      
      * tag 'x86-mm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/pkeys: Skip 'init_pkru' debugfs file creation when pkeys not supported
      5f498328
    • Linus Torvalds's avatar
      Merge tag 'x86-misc-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e98e8864
      Linus Torvalds authored
      Pull x86 uapi fixlet from Ingo Molnar:
       "Fix the <uapi/asm/hwcap2.h> UAPI header to build in user-space too"
      
      * tag 'x86-misc-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/elf: Use _BITUL() macro in UAPI headers
      e98e8864
    • Linus Torvalds's avatar
      Merge tag 'x86-cleanups-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8e4d7a78
      Linus Torvalds authored
      Pull x86 cleanups from Ingo Molnar:
       "Misc cleanups & removal of obsolete code"
      
      * tag 'x86-cleanups-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sgx: Correct kernel-doc's arg name in sgx_encl_release()
        doc: Remove references to IBM Calgary
        x86/setup: Document that Windows reserves the first MiB
        x86/crash: Remove crash_reserve_low_1M()
        x86/setup: Remove CONFIG_X86_RESERVE_LOW and reservelow= options
        x86/alternative: Align insn bytes vertically
        x86: Fix leftover comment typos
        x86/asm: Simplify __smp_mb() definition
        x86/alternatives: Make the x86nops[] symbol static
      8e4d7a78
    • Linus Torvalds's avatar
      Merge tag 'x86-cache-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 98e62da8
      Linus Torvalds authored
      Pull x86 resource control documentation fixes from Ingo Molnar:
       "Fix Docbook comments in the x86/resctrl code"
      
      * tag 'x86-cache-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/resctrl: Fix kernel-doc in internal.h
        x86/resctrl: Fix kernel-doc in pseudo_lock.c
      98e62da8
    • Linus Torvalds's avatar
      Merge tag 'x86-boot-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1b98ed0e
      Linus Torvalds authored
      Pull x86 boot update from Ingo Molnar:
       "Modernize the genimage.sh script, add a 'hdimage' target and EFI
        support"
      
      * tag 'x86-boot-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Modernize genimage script; hdimage+EFI support
      1b98ed0e
    • Linus Torvalds's avatar
      Merge tag 'x86-asm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 909489bf
      Linus Torvalds authored
      Pull x86 asm updates from Ingo Molnar:
      
       - Micro-optimize and standardize the do_syscall_64() calling convention
      
       - Make syscall entry flags clearing more conservative
      
       - Clean up syscall table handling
      
       - Clean up & standardize assembly macros, in preparation of FRED
      
       - Misc cleanups and fixes
      
      * tag 'x86-asm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/asm: Make <asm/asm.h> valid on cross-builds as well
        x86/regs: Syscall_get_nr() returns -1 for a non-system call
        x86/entry: Split PUSH_AND_CLEAR_REGS into two submacros
        x86/syscall: Maximize MSR_SYSCALL_MASK
        x86/syscall: Unconditionally prototype {ia32,x32}_sys_call_table[]
        x86/entry: Reverse arguments to do_syscall_64()
        x86/entry: Unify definitions from <asm/calling.h> and <asm/ptrace-abi.h>
        x86/asm: Use _ASM_BYTES() in <asm/nops.h>
        x86/asm: Add _ASM_BYTES() macro for a .byte ... opcode sequence
        x86/asm: Have the __ASM_FORM macros handle commas in arguments
      909489bf
    • Linus Torvalds's avatar
      Merge tag 'x86-apic-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e5a0fc4e
      Linus Torvalds authored
      Pull x86 exception handling updates from Ingo Molnar:
      
       - Clean up & simplify AP exception handling setup.
      
       - Consolidate the disjoint IDT setup code living in idt_setup_traps()
         and idt_setup_ist_traps() into a single idt_setup_traps()
         initialization function and call it before cpu_init().
      
      * tag 'x86-apic-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/idt: Rework IDT setup for boot CPU
        x86/cpu: Init AP exception handling from cpu_init_secondary()
      e5a0fc4e
    • Linus Torvalds's avatar
      Merge tag 'timers-nohz-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9269d27e
      Linus Torvalds authored
      Pull timers/nohz updates from Ingo Molnar:
      
       - Micro-optimize tick_nohz_full_cpu()
      
       - Optimize idle exit tick restarts to be less eager
      
       - Optimize tick_nohz_dep_set_task() to only wake up a single CPU.
         This reduces IPIs and interruptions on nohz_full CPUs.
      
       - Optimize tick_nohz_dep_set_signal() in a similar fashion.
      
       - Skip IPIs in tick_nohz_kick_task() when trying to kick a
         non-running task.
      
       - Micro-optimize tick_nohz_task_switch() IRQ flags handling to
         reduce context switching costs.
      
       - Misc cleanups and fixes
      
      * tag 'timers-nohz-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        MAINTAINERS: Add myself as context tracking maintainer
        tick/nohz: Call tick_nohz_task_switch() with interrupts disabled
        tick/nohz: Kick only _queued_ task whose tick dependency is updated
        tick/nohz: Change signal tick dependency to wake up CPUs of member tasks
        tick/nohz: Only wake up a single target cpu when kicking a task
        tick/nohz: Update nohz_full Kconfig help
        tick/nohz: Update idle_exittime on actual idle exit
        tick/nohz: Remove superflous check for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
        tick/nohz: Conditionally restart tick on idle exit
        tick/nohz: Evaluate the CPU expression after the static key
      9269d27e
    • Linus Torvalds's avatar
      Merge tag 'sched-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 54a728dc
      Linus Torvalds authored
      Pull scheduler udpates from Ingo Molnar:
      
       - Changes to core scheduling facilities:
      
          - Add "Core Scheduling" via CONFIG_SCHED_CORE=y, which enables
            coordinated scheduling across SMT siblings. This is a much
            requested feature for cloud computing platforms, to allow the
            flexible utilization of SMT siblings, without exposing untrusted
            domains to information leaks & side channels, plus to ensure more
            deterministic computing performance on SMT systems used by
            heterogenous workloads.
      
            There are new prctls to set core scheduling groups, which allows
            more flexible management of workloads that can share siblings.
      
          - Fix task->state access anti-patterns that may result in missed
            wakeups and rename it to ->__state in the process to catch new
            abuses.
      
       - Load-balancing changes:
      
          - Tweak newidle_balance for fair-sched, to improve 'memcache'-like
            workloads.
      
          - "Age" (decay) average idle time, to better track & improve
            workloads such as 'tbench'.
      
          - Fix & improve energy-aware (EAS) balancing logic & metrics.
      
          - Fix & improve the uclamp metrics.
      
          - Fix task migration (taskset) corner case on !CONFIG_CPUSET.
      
          - Fix RT and deadline utilization tracking across policy changes
      
          - Introduce a "burstable" CFS controller via cgroups, which allows
            bursty CPU-bound workloads to borrow a bit against their future
            quota to improve overall latencies & batching. Can be tweaked via
            /sys/fs/cgroup/cpu/<X>/cpu.cfs_burst_us.
      
          - Rework assymetric topology/capacity detection & handling.
      
       - Scheduler statistics & tooling:
      
          - Disable delayacct by default, but add a sysctl to enable it at
            runtime if tooling needs it. Use static keys and other
            optimizations to make it more palatable.
      
          - Use sched_clock() in delayacct, instead of ktime_get_ns().
      
       - Misc cleanups and fixes.
      
      * tag 'sched-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (72 commits)
        sched/doc: Update the CPU capacity asymmetry bits
        sched/topology: Rework CPU capacity asymmetry detection
        sched/core: Introduce SD_ASYM_CPUCAPACITY_FULL sched_domain flag
        psi: Fix race between psi_trigger_create/destroy
        sched/fair: Introduce the burstable CFS controller
        sched/uclamp: Fix uclamp_tg_restrict()
        sched/rt: Fix Deadline utilization tracking during policy change
        sched/rt: Fix RT utilization tracking during policy change
        sched: Change task_struct::state
        sched,arch: Remove unused TASK_STATE offsets
        sched,timer: Use __set_current_state()
        sched: Add get_current_state()
        sched,perf,kvm: Fix preemption condition
        sched: Introduce task_is_running()
        sched: Unbreak wakeups
        sched/fair: Age the average idle time
        sched/cpufreq: Consider reduced CPU capacity in energy calculation
        sched/fair: Take thermal pressure into account while estimating energy
        thermal/cpufreq_cooling: Update offline CPUs per-cpu thermal_pressure
        sched/fair: Return early from update_tg_cfs_load() if delta == 0
        ...
      54a728dc
    • Linus Torvalds's avatar
      Merge tag 'perf-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 28a27cbd
      Linus Torvalds authored
      Pull perf events updates from Ingo Molnar:
      
       - Platform PMU driver updates:
      
           - x86 Intel uncore driver updates for Skylake (SNR) and Icelake (ICX) servers
           - Fix RDPMC support
           - Fix [extended-]PEBS-via-PT support
           - Fix Sapphire Rapids event constraints
           - Fix :ppp support on Sapphire Rapids
           - Fix fixed counter sanity check on Alder Lake & X86_FEATURE_HYBRID_CPU
           - Other heterogenous-PMU fixes
      
       - Kprobes:
      
           - Remove the unused and misguided kprobe::fault_handler callbacks.
           - Warn about kprobes taking a page fault.
           - Fix the 'nmissed' stat counter.
      
       - Misc cleanups and fixes.
      
      * tag 'perf-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix task context PMU for Hetero
        perf/x86/intel: Fix instructions:ppp support in Sapphire Rapids
        perf/x86/intel: Add more events requires FRONTEND MSR on Sapphire Rapids
        perf/x86/intel: Fix fixed counter check warning for some Alder Lake
        perf/x86/intel: Fix PEBS-via-PT reload base value for Extended PEBS
        perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task
        kprobes: Do not increment probe miss count in the fault handler
        x86,kprobes: WARN if kprobes tries to handle a fault
        kprobes: Remove kprobe::fault_handler
        uprobes: Update uprobe_write_opcode() kernel-doc comment
        perf/hw_breakpoint: Fix DocBook warnings in perf hw_breakpoint
        perf/core: Fix DocBook warnings
        perf/core: Make local function perf_pmu_snapshot_aux() static
        perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX
        perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on SNR
        perf/x86/intel/uncore: Generalize I/O stacks to PMON mapping procedure
        perf/x86/intel/uncore: Drop unnecessary NULL checks after container_of()
      28a27cbd
    • Linus Torvalds's avatar
      Merge tag 'locking-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a15286c6
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
      
       - Core locking & atomics:
      
           - Convert all architectures to ARCH_ATOMIC: move every architecture
             to ARCH_ATOMIC, then get rid of ARCH_ATOMIC and all the
             transitory facilities and #ifdefs.
      
             Much reduction in complexity from that series:
      
                 63 files changed, 756 insertions(+), 4094 deletions(-)
      
           - Self-test enhancements
      
       - Futexes:
      
           - Add the new FUTEX_LOCK_PI2 ABI, which is a variant that doesn't
             set FLAGS_CLOCKRT (.e. uses CLOCK_MONOTONIC).
      
             [ The temptation to repurpose FUTEX_LOCK_PI's implicit setting of
               FLAGS_CLOCKRT & invert the flag's meaning to avoid having to
               introduce a new variant was resisted successfully. ]
      
           - Enhance futex self-tests
      
       - Lockdep:
      
           - Fix dependency path printouts
      
           - Optimize trace saving
      
           - Broaden & fix wait-context checks
      
       - Misc cleanups and fixes.
      
      * tag 'locking-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits)
        locking/lockdep: Correct the description error for check_redundant()
        futex: Provide FUTEX_LOCK_PI2 to support clock selection
        futex: Prepare futex_lock_pi() for runtime clock selection
        lockdep/selftest: Remove wait-type RCU_CALLBACK tests
        lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING
        lockdep: Fix wait-type for empty stack
        locking/selftests: Add a selftest for check_irq_usage()
        lockding/lockdep: Avoid to find wrong lock dep path in check_irq_usage()
        locking/lockdep: Remove the unnecessary trace saving
        locking/lockdep: Fix the dep path printing for backwards BFS
        selftests: futex: Add futex compare requeue test
        selftests: futex: Add futex wait test
        seqlock: Remove trailing semicolon in macros
        locking/lockdep: Reduce LOCKDEP dependency list
        locking/lockdep,doc: Improve readability of the block matrix
        locking/atomics: atomic-instrumented: simplify ifdeffery
        locking/atomic: delete !ARCH_ATOMIC remnants
        locking/atomic: xtensa: move to ARCH_ATOMIC
        locking/atomic: sparc: move to ARCH_ATOMIC
        locking/atomic: sh: move to ARCH_ATOMIC
        ...
      a15286c6
    • Linus Torvalds's avatar
      Merge tags 'objtool-urgent-2021-06-28' and 'objtool-core-2021-06-28' of... · b89c07de
      Linus Torvalds authored
      Merge tags 'objtool-urgent-2021-06-28' and 'objtool-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull objtool fix and updates from Ingo Molnar:
       "An ELF format fix for a section flags mismatch bug that breaks kernel
        tooling such as kpatch-build.
      
        The biggest change in this cycle is the new code to handle and rewrite
        variable sized jump labels - which results in slightly tighter code
        generation in hot paths, through the use of short(er) NOPs.
      
        Also a number of cleanups and fixes, and a change to the generic
        include/linux/compiler.h to handle a s390 GCC quirk"
      
      * tag 'objtool-urgent-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Don't make .altinstructions writable
      
      * tag 'objtool-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Improve reloc hash size guestimate
        instrumentation.h: Avoid using inline asm operand modifiers
        compiler.h: Avoid using inline asm operand modifiers
        kbuild: Fix objtool dependency for 'OBJECT_FILES_NON_STANDARD_<obj> := n'
        objtool: Reflow handle_jump_alt()
        jump_label/x86: Remove unused JUMP_LABEL_NOP_SIZE
        jump_label, x86: Allow short NOPs
        objtool: Provide stats for jump_labels
        objtool: Rewrite jump_label instructions
        objtool: Decode jump_entry::key addend
        jump_label, x86: Emit short JMP
        jump_label: Free jump_entry::key bit1 for build use
        jump_label, x86: Add variable length patching support
        jump_label, x86: Introduce jump_entry_size()
        jump_label, x86: Improve error when we fail expected text
        jump_label, x86: Factor out the __jump_table generation
        jump_label, x86: Strip ASM jump_label support
        x86, objtool: Dont exclude arch/x86/realmode/
        objtool: Rewrite hashtable sizing
      b89c07de
    • Linus Torvalds's avatar
      Merge tag 'efi-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6796355b
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "Two driver API cleanups, and a log message tweak"
      
      * tag 'efi-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/efi: Log 32/64-bit mismatch with kernel as an error
        efi/dev-path-parser: Switch to use for_each_acpi_dev_match()
        efi/apple-properties: Handle device properties with software node API
      6796355b
    • Linus Torvalds's avatar
      Merge tag 'x86_sev_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d04f7de0
      Linus Torvalds authored
      Pull x86 SEV updates from Borislav Petkov:
      
       - Differentiate the type of exception the #VC handler raises depending
         on code executed in the guest and handle the case where failure to
         get the RIP would result in a #GP, as it should, instead of in a #PF
      
       - Disable interrupts while the per-CPU GHCB is held
      
       - Split the #VC handler depending on where the #VC exception has
         happened and therefore provide for precise context tracking like the
         rest of the exception handlers deal with noinstr regions now
      
       - Add defines for the GHCB version 2 protocol so that further shared
         development with KVM can happen without merge conflicts
      
       - The usual small cleanups
      
      * tag 'x86_sev_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sev: Use "SEV: " prefix for messages from sev.c
        x86/sev: Add defines for GHCB version 2 MSR protocol requests
        x86/sev: Split up runtime #VC handler for correct state tracking
        x86/sev: Make sure IRQs are disabled while GHCB is active
        x86/sev: Propagate #GP if getting linear instruction address failed
        x86/insn: Extend error reporting from insn_fetch_from_user[_inatomic]()
        x86/insn-eval: Make 0 a valid RIP for insn_get_effective_ip()
        x86/sev: Fix error message in runtime #VC handler
      d04f7de0
    • Linus Torvalds's avatar
      Merge tag 'x86_cpu_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2594b713
      Linus Torvalds authored
      Pull x86 cpu updates from Borislav Petkov:
      
       - New AMD models support
      
       - Allow MONITOR/MWAIT to be used for C1 state entry on Hygon too
      
       - Use the special RAPL CPUID bit to detect the functionality on AMD and
         Hygon instead of doing family matching.
      
       - Add support for new Intel microcode deprecating TSX on some models
         and do not enable kernel workarounds for those CPUs when TSX
         transactions always abort, as a result of that microcode update.
      
      * tag 'x86_cpu_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/tsx: Clear CPUID bits when TSX always force aborts
        x86/events/intel: Do not deploy TSX force abort workaround when TSX is deprecated
        x86/msr: Define new bits in TSX_FORCE_ABORT MSR
        perf/x86/rapl: Use CPUID bit on AMD and Hygon parts
        x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems
        x86/amd_nb: Add AMD family 19h model 50h PCI ids
        x86/cpu: Fix core name for Sapphire Rapids
      2594b713
    • Linus Torvalds's avatar
      Merge tag 'ras_core_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f565b207
      Linus Torvalds authored
      Pull x86 RAS updates from Borislav Petkov:
      
       - Add the required information to the faked APEI-reported mem error so
         that the kernel properly attempts to offline the corresponding page,
         as it does for kernel-detected correctable errors.
      
       - Fix a typo in AMD's error descriptions.
      
      * tag 'ras_core_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        EDAC/mce_amd: Fix typo "FIfo" -> "Fifo"
        x86/mce: Include a MCi_MISC value in faked mce logs
        x86/MCE/AMD, EDAC/mce_amd: Add new SMCA bank types
      f565b207
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 2a5c6184
      Linus Torvalds authored
      Pull hwmon updates from Guenter Roeck:
       "New drivers:
      
         - Delta DPS920AB
      
         - Flex PIM4006, PIM4328 and PIM4820
      
         - MPS MP2888
      
         - Sensirion SHT4X
      
        Added chip support to existing drivers:
      
         - Flex BMR310, BMR456, BMR457, BMR458, BMR480, BMR490, BMR491, and
           BMR492
      
         - TI TMP1075
      
         - Renesas ZLS1003, ZLS4009 and ZL8802
      
        Other:
      
         - Dropped explicit ACPI support for MAX31722 and LM70; the APIC IDs
           in those drivers do not exist.
      
         - Support set_trips() callback into thermal subsystem
      
         - Minor fixes and improvements in various drivers"
      
      * tag 'hwmon-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (49 commits)
        hwmon: Support set_trips() of thermal device ops
        hwmon: (lm90) Prevent integer underflows of temperature calculations
        hwmon: (lm90) Disable interrupt on suspend
        hwmon: (lm90) Unmask hardware interrupt
        hwmon: (lm90) Use hwmon_notify_event()
        hwmon: (lm90) Don't override interrupt trigger type
        hwmon: (pmbus/dps920ab) Delete some dead code
        hwmon: (ntc_thermistor) Drop unused headers.
        MAINTAINERS: Add Delta DPS920AB PSU driver
        dt-bindings: trivial-devices: Add Delta DPS920AB
        hwmon: (pmbus) Add driver for Delta DPS-920AB PSU
        hwmon: (pmbus/pim4328) Add documentation for the pim4328 PMBus driver
        hwmon: (pmbus/pim4328) Add PMBus driver for PIM4006, PIM4328 and PIM4820
        hwmon: (pmbus) Allow phase function even if it's not on page
        hwmon: (pmbus) Add support for reading direct mode coefficients
        hwmon: (pmbus) Add new pmbus flag NO_WRITE_PROTECT
        docs: hwmon: adm1177.rst: avoid using ReSt :doc:`foo` markup
        hwmon: (pmbus_core) Check adapter PEC support
        hwmon: (ina3221) use CVRF only for single-shot conversion
        hwmon: (max31790) Detect and report zero fan speed
        ...
      2a5c6184
    • Linus Torvalds's avatar
      Merge tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 69609a91
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "The biggest single thing in the diffstat here is a massive overhaul of
        the PXA2xx driver from Andy Shevchenko (the IP is still in use on
        modern Intel systems), though we also have quite a lot of core work as
        well:
      
         - Better support for mixing native and GPIO chip selects also from
           Andy.
      
         - Support for devices with multiple chip selects from Sebastian
           Reichel.
      
         - Helper for polling status registers in spi-mem from Patrice
           Chotard.
      
         - Support for Renesas RZ/N1 and Rockchip RV1126"
      
      * tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (86 commits)
        spi: core: add dma_map_dev for dma device
        spi: convert Xilinx Zynq UltraScale+ MPSoC GQSPI bindings to YAML
        spi: Fix self assignment issue with ancillary->mode
        spi: spi-sh-msiof: : use proper DMAENGINE API for termination
        spi: spi-rspi: : use proper DMAENGINE API for termination
        spi: spi-rockchip: add description for rv1126
        spi: rockchip: Support SPI_CS_HIGH
        spi: rockchip: Support cs-gpio
        spi: rockchip: Wait for STB status in slave mode tx_xfer
        spi: rockchip: Set rx_fifo interrupt waterline base on transfer item
        spi: rockchip: add compatible string for rv1126
        spi: spi-sun6i: Fix chipselect/clock bug
        spi: dt-bindings: support devices with multiple chipselects
        spi: add ancillary device support
        spi: xilinx: convert to yaml
        spi: convert Cadence SPI bindings to YAML
        spi: stm32-qspi: Remove unused qspi field of struct stm32_qspi_flash
        spi: add of_device_uevent_modalias support
        spi: meson-spicc: fix memory leak in meson_spicc_probe
        spi: meson-spicc: fix a wrong goto jump for avoiding memory leak.
        ...
      69609a91
    • Linus Torvalds's avatar
      Merge tag 'regulator-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · c10383b3
      Linus Torvalds authored
      Pull regulator updates from Mark Brown:
       "The main core change this release is generic support for handling of
        hardware errors from Matti Vaittinen, including some small updates to
        the reboot and thermal code so we can share support for powering off
        the system if things are going wrong enough.
      
        Otherwise this release we've mainly seen the addition of new drivers,
        including MT6359 which has pulled in some small changes from the MFD
        tree for build dependencies.
      
         - Support for controlling the trigger points for hardware error
           detection, and shared handlers for this.
      
         - Support for Maxim MAX8993, Mediatek MT6359 and MT6359P, Qualcomm
           PM8226 and SA8115P-ADP, and Sylergy TCS4526"
      
      * tag 'regulator-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (91 commits)
        regulator: bd9576: Fix uninitializes variable may_have_irqs
        regulator: max8893: Select REGMAP_I2C to fix build error
        regulator: da9052: Ensure enough delay time for .set_voltage_time_sel
        regulator: mt6358: Fix vdram2 .vsel_mask
        regulator: hi6421v600: Fix setting wrong driver_data
        MAINTAINERS: Add reviewer for regulator irq_helpers
        regulator: bd9576: Fix the driver name in id table
        regulator: bd9576: Support error reporting
        regulator: bd9576 add FET ON-resistance for OCW
        regulator: add property parsing and callbacks to set protection limits
        regulator: IRQ based event/error notification helpers
        regulator: move rdev_print helpers to internal.h
        regulator: add warning flags
        thermal: Use generic HW-protection shutdown API
        reboot: Add hardware protection power-off
        regulator: Add protection limit properties
        regulator: hi6421v600: Fix setting idle mode
        regulator: Add MAX8893 bindings
        regulator: max8893: add regulator driver
        regulator: hi6421: Use correct variable type for regmap api val argument
        ...
      c10383b3
    • Linus Torvalds's avatar
      Merge tag 'regmap-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 52f8cf8b
      Linus Torvalds authored
      Pull regmap updates from Mark Brown:
       "The big thing this release is support for accessing the register maps
        of MDIO devices via the framework. We've also added support for 7/17
        register formats on bytestream transports and inverted status
        registers in regmap-irq"
      
      * tag 'regmap-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: mdio: Reject invalid addresses
        regmap: mdio: Fix regmap_bus pointer constness
        regmap: mdio: Add clause-45 support
        regmap: mdio: Clean up invalid clause-22 addresses
        regmap-irq: Introduce inverted status registers support
        regmap: add support for 7/17 register formating
        regmap: mdio: Don't modify output if error happened
        regmap: Add MDIO bus support
        regmap-i2c: Set regmap max raw r/w from quirks
      52f8cf8b
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · ef60eb0e
      Linus Torvalds authored
      Pull MMC and MEMSTICK updates from Ulf Hansson:
       "MMC core:
         - Add support for Cache Ctrl for SD cards
         - Add support for Power Off Notification for SD cards
         - Add support for read/write of the SD function extension registers
         - Allow broken eMMC HS400 mode to be disabled via DT
         - Allow UHS-I voltage switch for SDSC cards if supported
         - Disable command queueing in the ioctl path
         - Enable eMMC sleep commands to use HW busy polling to minimize delay
         - Extend re-use of the common polling loop to standardize behaviour
         - Take into account MMC_CAP_NEED_RSP_BUSY for eMMC HPI commands
      
        MMC host:
         - jz4740: Add support for the JZ4775 variant
         - sdhci-acpi: Disable write protect detection on Toshiba Encore 2 WT8-B
         - sdhci-esdhc-imx: Advertise HS400 support through MMC caps
         - sdhci-esdhc-imx: Enable support for system wakeup for SDIO
         - sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211
         - vub3000: Fix control-request direction
      
        MEMSTICK:
         - A couple of fixes/cleanups"
      
      * tag 'mmc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (54 commits)
        mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211
        dt-bindings: mmc: sdhci-iproc: Add brcm,bcm7211a0-sdhci
        mmc: JZ4740: Add support for JZ4775
        dt-bindings: mmc: JZ4740: Add bindings for JZ4775
        mmc: sdhci-esdhc-imx: Enable support for system wakeup for SDIO
        mmc: Improve function name when aborting a tuning cmd
        mmc: sdhci-of-aspeed: Turn down a phase correction warning
        mmc: debugfs: add description for module parameter
        mmc: via-sdmmc: add a check against NULL pointer dereference
        mmc: sdhci-sprd: use sdhci_sprd_writew
        mmc: sdhci-esdhc-imx: remove unused is_imx6q_usdhc
        mmc: core: Allow UHS-I voltage switch for SDSC cards if supported
        mmc: mmc_spi: Imply container_of() to be no-op
        mmc: mmc_spi: Drop duplicate 'mmc_spi' in the debug messages
        mmc: dw_mmc-pltfm: Remove unused <linux/clk.h>
        mmc: sdhci-of-aspeed: Configure the SDHCIs as specified by the devicetree.
        mmc: core: Add a missing SPDX license header
        mmc: vub3000: fix control-request direction
        mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding
        mmc: sdhci_am654: Use pm_runtime_resume_and_get() to replace open coding
        ...
      ef60eb0e
    • Linus Torvalds's avatar
      Merge tag 'for-5.14/libata-2021-06-27' of git://git.kernel.dk/linux-block · 43bd8a67
      Linus Torvalds authored
      Pull libata updates from Jens Axboe:
       "The big change in this round is that we're finally in a position where
        we can sanely remove the old drivers/ide/ code, as libata covers
        everything we need by now.
      
        This is exciting for two reasons:
      
         1) we delete a lot of legacy code that doesn't really meet the
            standards we have today, and
      
         2) it enables us to clean up various bits in the block layer that
            exist only because of the old IDE code.
      
        Outside of that, just a few minor fixes here, fixups for warnings,
        etc"
      
      * tag 'for-5.14/libata-2021-06-27' of git://git.kernel.dk/linux-block: (29 commits)
        ata: rb532_cf: remove redundant codes
        ide: remove the legacy ide driver
        m68k: use libata instead of the legacy ide driver
        ARM: disable CONFIG_IDE in pxa_defconfig
        ARM: disable CONFIG_IDE in footbridge_defconfig
        alpha: use libata instead of the legacy ide driver
        pata_cypress: add a module option to disable BM-DMA
        ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht'
        ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht
        ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in '
        ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht'
        ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht'
        ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht'
        ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht'
        ata: sata_mv: Do not over-write initialise fields in 'mv6_sht'
        ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht'
        ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT()
        ata: include: libata: Move fields commonly over-written to separate MACRO
        ahci: Add support for Dell S140 and later controllers
        ata: ahci_sunxi: Disable DIPM
        ...
      43bd8a67
    • Mel Gorman's avatar
      mm/page_alloc: Correct return value of populated elements if bulk array is populated · 66d92825
      Mel Gorman authored
      Dave Jones reported the following
      
      	This made it into 5.13 final, and completely breaks NFSD for me
      	(Serving tcp v3 mounts).  Existing mounts on clients hang, as do
      	new mounts from new clients.  Rebooting the server back to rc7
      	everything recovers.
      
      The commit b3b64ebd ("mm/page_alloc: do bulk array bounds check after
      checking populated elements") returns the wrong value if the array is
      already populated which is interpreted as an allocation failure. Dave
      reported this fixes his problem and it also passed a test running dbench
      over NFS.
      
      Fixes: b3b64ebd ("mm/page_alloc: do bulk array bounds check after checking populated elements")
      Reported-and-tested-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: <stable@vger.kernel.org> [5.13+]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      66d92825
  2. 27 Jun, 2021 2 commits
    • Linus Torvalds's avatar
      Linux 5.13 · 62fb9874
      Linus Torvalds authored
      62fb9874
    • Linus Torvalds's avatar
      Revert "signal: Allow tasks to cache one sigqueue struct" · b4b27b9e
      Linus Torvalds authored
      This reverts commits 4bad58eb (and
      399f8dd9, which tried to fix it).
      
      I do not believe these are correct, and I'm about to release 5.13, so am
      reverting them out of an abundance of caution.
      
      The locking is odd, and appears broken.
      
      On the allocation side (in __sigqueue_alloc()), the locking is somewhat
      straightforward: it depends on sighand->siglock.  Since one caller
      doesn't hold that lock, it further then tests 'sigqueue_flags' to avoid
      the case with no locks held.
      
      On the freeing side (in sigqueue_cache_or_free()), there is no locking
      at all, and the logic instead depends on 'current' being a single
      thread, and not able to race with itself.
      
      To make things more exciting, there's also the data race between freeing
      a signal and allocating one, which is handled by using WRITE_ONCE() and
      READ_ONCE(), and being mutually exclusive wrt the initial state (ie
      freeing will only free if the old state was NULL, while allocating will
      obviously only use the value if it was non-NULL, so only one or the
      other will actually act on the value).
      
      However, while the free->alloc paths do seem mutually exclusive thanks
      to just the data value dependency, it's not clear what the memory
      ordering constraints are on it.  Could writes from the previous
      allocation possibly be delayed and seen by the new allocation later,
      causing logical inconsistencies?
      
      So it's all very exciting and unusual.
      
      And in particular, it seems that the freeing side is incorrect in
      depending on "current" being single-threaded.  Yes, 'current' is a
      single thread, but in the presense of asynchronous events even a single
      thread can have data races.
      
      And such asynchronous events can and do happen, with interrupts causing
      signals to be flushed and thus free'd (for example - sending a
      SIGCONT/SIGSTOP can happen from interrupt context, and can flush
      previously queued process control signals).
      
      So regardless of all the other questions about the memory ordering and
      locking for this new cached allocation, the sigqueue_cache_or_free()
      assumptions seem to be fundamentally incorrect.
      
      It may be that people will show me the errors of my ways, and tell me
      why this is all safe after all.  We can reinstate it if so.  But my
      current belief is that the WRITE_ONCE() that sets the cached entry needs
      to be a smp_store_release(), and the READ_ONCE() that finds a cached
      entry needs to be a smp_load_acquire() to handle memory ordering
      correctly.
      
      And the sequence in sigqueue_cache_or_free() would need to either use a
      lock or at least be interrupt-safe some way (perhaps by using something
      like the percpu 'cmpxchg': it doesn't need to be SMP-safe, but like the
      percpu operations it needs to be interrupt-safe).
      
      Fixes: 399f8dd9 ("signal: Prevent sigqueue caching after task got released")
      Fixes: 4bad58eb ("signal: Allow tasks to cache one sigqueue struct")
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Christian Brauner <christian.brauner@ubuntu.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4b27b9e
  3. 26 Jun, 2021 2 commits
  4. 25 Jun, 2021 9 commits