1. 19 Feb, 2021 1 commit
    • Will Deacon's avatar
      arm64: spectre: Prevent lockdep splat on v4 mitigation enable path · a2c42bba
      Will Deacon authored
      The Spectre-v4 workaround is re-configured when resuming from suspend,
      as the firmware may have re-enabled the mitigation despite the user
      previously asking for it to be disabled.
      
      Enabling or disabling the workaround can result in an undefined
      instruction exception on CPUs which implement PSTATE.SSBS but only allow
      it to be configured by adjusting the SPSR on exception return. We handle
      this by installing an 'undef hook' which effectively emulates the access.
      
      Installing this hook requires us to take a couple of spinlocks both to
      avoid corrupting the internal list of hooks but also to ensure that we
      don't run into an unhandled exception. Unfortunately, when resuming from
      suspend, we haven't yet called rcu_idle_exit() and so lockdep gets angry
      about "suspicious RCU usage". In doing so, it tries to print a warning,
      which leads it to get even more suspicious, this time about itself:
      
       |  rcu_scheduler_active = 2, debug_locks = 1
       |  RCU used illegally from extended quiescent state!
       |  1 lock held by swapper/0:
       |   #0: (logbuf_lock){-.-.}-{2:2}, at: vprintk_emit+0x88/0x198
       |
       |  Call trace:
       |   dump_backtrace+0x0/0x1d8
       |   show_stack+0x18/0x24
       |   dump_stack+0xe0/0x17c
       |   lockdep_rcu_suspicious+0x11c/0x134
       |   trace_lock_release+0xa0/0x160
       |   lock_release+0x3c/0x290
       |   _raw_spin_unlock+0x44/0x80
       |   vprintk_emit+0xbc/0x198
       |   vprintk_default+0x44/0x6c
       |   vprintk_func+0x1f4/0x1fc
       |   printk+0x54/0x7c
       |   lockdep_rcu_suspicious+0x30/0x134
       |   trace_lock_acquire+0xa0/0x188
       |   lock_acquire+0x50/0x2fc
       |   _raw_spin_lock+0x68/0x80
       |   spectre_v4_enable_mitigation+0xa8/0x30c
       |   __cpu_suspend_exit+0xd4/0x1a8
       |   cpu_suspend+0xa0/0x104
       |   psci_cpu_suspend_enter+0x3c/0x5c
       |   psci_enter_idle_state+0x44/0x74
       |   cpuidle_enter_state+0x148/0x2f8
       |   cpuidle_enter+0x38/0x50
       |   do_idle+0x1f0/0x2b4
      
      Prevent these splats by running __cpu_suspend_exit() with RCU watching.
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Saravana Kannan <saravanak@google.com>
      Suggested-by: default avatar"Paul E . McKenney" <paulmck@kernel.org>
      Reported-by: default avatarSami Tolvanen <samitolvanen@google.com>
      Fixes: c2876207 ("arm64: Rewrite Spectre-v4 mitigation code")
      Cc: <stable@vger.kernel.org>
      Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Acked-by: default avatarMarc Zyngier <maz@kernel.org>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Link: https://lore.kernel.org/r/20210218140346.5224-1-will@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
      a2c42bba
  2. 12 Feb, 2021 14 commits
    • Will Deacon's avatar
      Merge branch 'for-next/vdso' into for-next/core · 1ffa9763
      Will Deacon authored
      vDSO build improvements.
      
      * for-next/vdso:
        arm64: Support running gen_vdso_offsets.sh with BSD userland.
        arm64: do not descend to vdso directories twice
      1ffa9763
    • Will Deacon's avatar
      Merge branch 'for-next/topology' into for-next/core · dcabe10d
      Will Deacon authored
      Cleanup to the AMU support code and initialisation rework to support
      cpufreq drivers built as modules.
      
      * for-next/topology:
        arm64: topology: Make AMUs work with modular cpufreq drivers
        arm64: topology: Reorder init_amu_fie() a bit
        arm64: topology: Avoid the have_policy check
      dcabe10d
    • Will Deacon's avatar
      Merge branch 'for-next/stacktrace' into for-next/core · d23fa87c
      Will Deacon authored
      Remove synthetic frame record from exception stack when entering from
      userspace.
      
      * for-next/stacktrace:
        arm64: remove EL0 exception frame record
      d23fa87c
    • Will Deacon's avatar
      Merge branch 'for-next/selftests' into for-next/core · 82a1c2b9
      Will Deacon authored
      Trivial cleanup to one of the MTE selftests.
      
      * for-next/selftests:
        arm64: mte: style: Simplify bool comparison
      82a1c2b9
    • Will Deacon's avatar
      Merge branch 'for-next/rng' into for-next/core · 9dc8313c
      Will Deacon authored
      Add support for the TRNG firmware call introduced by Arm spec DEN0098.
      
      * for-next/rng:
        arm64: Add support for SMCCC TRNG entropy source
        firmware: smccc: Introduce SMCCC TRNG framework
        firmware: smccc: Add SMCCC TRNG function call IDs
      9dc8313c
    • Will Deacon's avatar
      Merge branch 'for-next/random' into for-next/core · cf6a85a8
      Will Deacon authored
      Avoid calling arch_get_random_seed_long() from add_interrupt_randomness()
      as this can result in a firmware call on some arm64 systems.
      
      * for-next/random:
        random: avoid arch_get_random_seed_long() when collecting IRQ randomness
      cf6a85a8
    • Will Deacon's avatar
      Merge branch 'for-next/perf' into for-next/core · c974a8e5
      Will Deacon authored
      Perf and PMU updates including support for Cortex-A78 and the v8.3 SPE
      extensions.
      
      * for-next/perf:
        drivers/perf: Replace spin_lock_irqsave to spin_lock
        dt-bindings: arm: add Cortex-A78 binding
        arm64: perf: add support for Cortex-A78
        arm64: perf: Constify static attribute_group structs
        drivers/perf: Prevent forced unbinding of ARM_DMC620_PMU drivers
        perf/arm-cmn: Move IRQs when migrating context
        perf/arm-cmn: Fix PMU instance naming
        perf: Constify static struct attribute_group
        perf: hisi: Constify static struct attribute_group
        perf/imx_ddr: Constify static struct attribute_group
        perf: qcom: Constify static struct attribute_group
        drivers/perf: Add support for ARMv8.3-SPE
      c974a8e5
    • Will Deacon's avatar
      Merge branch 'for-next/misc' into for-next/core · 1d32854e
      Will Deacon authored
      Miscellaneous arm64 changes for 5.12.
      
      * for-next/misc:
        arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+
        arm64: vmlinux.ld.S: add assertion for tramp_pg_dir offset
        arm64: vmlinux.ld.S: add assertion for reserved_pg_dir offset
        arm64/ptdump:display the Linear Mapping start marker
        arm64: ptrace: Fix missing return in hw breakpoint code
        KVM: arm64: Move __hyp_set_vectors out of .hyp.text
        arm64: Include linux/io.h in mm/mmap.c
        arm64: cacheflush: Remove stale comment
        arm64: mm: Remove unused header file
        arm64/sparsemem: reduce SECTION_SIZE_BITS
        arm64/mm: Add warning for outside range requests in vmemmap_populate()
        arm64: Drop workaround for broken 'S' constraint with GCC 4.9
      1d32854e
    • Will Deacon's avatar
      Merge branch 'for-next/kexec' into for-next/core · b374d0f9
      Will Deacon authored
      Significant steps along the road to leaving the MMU enabled during kexec
      relocation.
      
      * for-next/kexec:
        arm64: hibernate: add __force attribute to gfp_t casting
        arm64: kexec: arm64_relocate_new_kernel don't use x0 as temp
        arm64: kexec: arm64_relocate_new_kernel clean-ups and optimizations
        arm64: kexec: call kexec_image_info only once
        arm64: kexec: move relocation function setup
        arm64: trans_pgd: hibernate: idmap the single page that holds the copy page routines
        arm64: mm: Always update TCR_EL1 from __cpu_set_tcr_t0sz()
        arm64: trans_pgd: pass NULL instead of init_mm to *_populate functions
        arm64: trans_pgd: pass allocator trans_pgd_create_copy
        arm64: trans_pgd: make trans_pgd_map_page generic
        arm64: hibernate: move page handling function to new trans_pgd.c
        arm64: hibernate: variable pudp is used instead of pd4dp
        arm64: kexec: make dtb_mem always enabled
      b374d0f9
    • Will Deacon's avatar
      Merge branch 'for-next/faultaround' into for-next/core · 6b76c3ae
      Will Deacon authored
      Initialise prefaulted PTEs as 'old' for arm64 when hardware access-flag
      updates are supported, which drastically improves vmscan performance.
      
      * for-next/faultaround:
        mm: filemap: Fix microblaze build failure with 'mmu_defconfig'
        mm/nommu: Fix return type of filemap_map_pages()
        mm: Mark anonymous struct field of 'struct vm_fault' as 'const'
        mm: Use static initialisers for immutable fields of 'struct vm_fault'
        mm: Avoid modifying vmf.address in __collapse_huge_page_swapin()
        mm: Pass 'address' to map to do_set_pte() and drop FAULT_FLAG_PREFAULT
        mm: Move immutable fields of 'struct vm_fault' into anonymous struct
        arm64: mm: Implement arch_wants_old_prefaulted_pte()
        mm: Allow architectures to request 'old' entries when prefaulting
        mm: Cleanup faultaround and finish_fault() codepaths
      6b76c3ae
    • Will Deacon's avatar
      Merge branch 'for-next/errata' into for-next/core · 90eb8c9d
      Will Deacon authored
      Rework of the workaround for Cortex-A76 erratum 1463225 to fit in better
      with the ongoing exception entry cleanups and changes to the detection
      code for Cortex-A55 erratum 1024718 since it applies to all revisions of
      the silicon.
      
      * for-next/errata:
        arm64: entry: consolidate Cortex-A76 erratum 1463225 workaround
        arm64: Extend workaround for erratum 1024718 to all versions of Cortex-A55
      90eb8c9d
    • Will Deacon's avatar
      Merge branch 'for-next/crypto' into for-next/core · f96a816f
      Will Deacon authored
      Introduce a new macro to allow yielding the vector unit if preemption
      is required. The initial users of this are being merged via the crypto
      tree for 5.12.
      
      * for-next/crypto:
        arm64: assembler: add cond_yield macro
      f96a816f
    • Will Deacon's avatar
      Merge branch 'for-next/cpufeature' into for-next/core · 88ddf0df
      Will Deacon authored
      Support for overriding CPU ID register fields on the command-line, which
      allows us to disable certain features which the kernel would otherwise
      use unconditionally when detected.
      
      * for-next/cpufeature: (22 commits)
        arm64: cpufeatures: Allow disabling of Pointer Auth from the command-line
        arm64: Defer enabling pointer authentication on boot core
        arm64: cpufeatures: Allow disabling of BTI from the command-line
        arm64: Move "nokaslr" over to the early cpufeature infrastructure
        KVM: arm64: Document HVC_VHE_RESTART stub hypercall
        arm64: Make kvm-arm.mode={nvhe, protected} an alias of id_aa64mmfr1.vh=0
        arm64: Add an aliasing facility for the idreg override
        arm64: Honor VHE being disabled from the command-line
        arm64: Allow ID_AA64MMFR1_EL1.VH to be overridden from the command line
        arm64: cpufeature: Add an early command-line cpufeature override facility
        arm64: Extract early FDT mapping from kaslr_early_init()
        arm64: cpufeature: Use IDreg override in __read_sysreg_by_encoding()
        arm64: cpufeature: Add global feature override facility
        arm64: Move SCTLR_EL1 initialisation to EL-agnostic code
        arm64: Simplify init_el2_state to be non-VHE only
        arm64: Move VHE-specific SPE setup to mutate_to_vhe()
        arm64: Drop early setting of MDSCR_EL2.TPMS
        arm64: Initialise as nVHE before switching to VHE
        arm64: Provide an 'upgrade to VHE' stub hypercall
        arm64: Turn the MMU-on sequence into a macro
        ...
      88ddf0df
    • Will Deacon's avatar
      Merge branch 'for-next/cosmetic' into for-next/core · bab8443b
      Will Deacon authored
      Cosmetic changes to tidy up stale comments and fix inconsistent
      whitespace. No functional changes here!
      
      * for-next/cosmetic:
        mm/arm64: Correct obsolete comment in do_page_fault()
        arm64: improve whitespace
      bab8443b
  3. 10 Feb, 2021 2 commits
  4. 09 Feb, 2021 19 commits
  5. 08 Feb, 2021 4 commits