1. 07 7月, 2020 1 次提交
  2. 04 5月, 2020 1 次提交
  3. 28 4月, 2020 1 次提交
  4. 18 3月, 2020 1 次提交
  5. 17 3月, 2020 1 次提交
    • D
      arm64: Basic Branch Target Identification support · 8ef8f360
      Dave Martin 提交于
      This patch adds the bare minimum required to expose the ARMv8.5
      Branch Target Identification feature to userspace.
      
      By itself, this does _not_ automatically enable BTI for any initial
      executable pages mapped by execve().  This will come later, but for
      now it should be possible to enable BTI manually on those pages by
      using mprotect() from within the target process.
      
      Other arches already using the generic mman.h are already using
      0x10 for arch-specific prot flags, so we use that for PROT_BTI
      here.
      
      For consistency, signal handler entry points in BTI guarded pages
      are required to be annotated as such, just like any other function.
      This blocks a relatively minor attack vector, but comforming
      userspace will have the annotations anyway, so we may as well
      enforce them.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NDave Martin <Dave.Martin@arm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      8ef8f360
  6. 07 3月, 2020 1 次提交
  7. 22 1月, 2020 1 次提交
  8. 16 1月, 2020 2 次提交
  9. 15 1月, 2020 1 次提交
    • M
      arm64: Add initial support for E0PD · 3e6c69a0
      Mark Brown 提交于
      Kernel Page Table Isolation (KPTI) is used to mitigate some speculation
      based security issues by ensuring that the kernel is not mapped when
      userspace is running but this approach is expensive and is incompatible
      with SPE.  E0PD, introduced in the ARMv8.5 extensions, provides an
      alternative to this which ensures that accesses from userspace to the
      kernel's half of the memory map to always fault with constant time,
      preventing timing attacks without requiring constant unmapping and
      remapping or preventing legitimate accesses.
      
      Currently this feature will only be enabled if all CPUs in the system
      support E0PD, if some CPUs do not support the feature at boot time then
      the feature will not be enabled and in the unlikely event that a late
      CPU is the first CPU to lack the feature then we will reject that CPU.
      
      This initial patch does not yet integrate with KPTI, this will be dealt
      with in followup patches.  Ideally we could ensure that by default we
      don't use KPTI on CPUs where E0PD is present.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      [will: Fixed typo in Kconfig text]
      Signed-off-by: NWill Deacon <will@kernel.org>
      3e6c69a0
  10. 26 10月, 2019 1 次提交
  11. 18 10月, 2019 1 次提交
  12. 08 10月, 2019 2 次提交
  13. 19 6月, 2019 1 次提交
  14. 23 5月, 2019 2 次提交
    • M
      arm64: Handle erratum 1418040 as a superset of erratum 1188873 · a5325089
      Marc Zyngier 提交于
      We already mitigate erratum 1188873 affecting Cortex-A76 and
      Neoverse-N1 r0p0 to r2p0. It turns out that revisions r0p0 to
      r3p1 of the same cores are affected by erratum 1418040, which
      has the same workaround as 1188873.
      
      Let's expand the range of affected revisions to match 1418040,
      and repaint all occurences of 1188873 to 1418040. Whilst we're
      there, do a bit of reformating in silicon-errata.txt and drop
      a now unnecessary dependency on ARM_ARCH_TIMER_OOL_WORKAROUND.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      a5325089
    • W
      arm64: errata: Add workaround for Cortex-A76 erratum #1463225 · 969f5ea6
      Will Deacon 提交于
      Revisions of the Cortex-A76 CPU prior to r4p0 are affected by an erratum
      that can prevent interrupts from being taken when single-stepping.
      
      This patch implements a software workaround to prevent userspace from
      effectively being able to disable interrupts.
      
      Cc: <stable@vger.kernel.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      969f5ea6
  15. 16 4月, 2019 1 次提交
  16. 06 2月, 2019 1 次提交
  17. 14 12月, 2018 2 次提交
  18. 10 12月, 2018 1 次提交
  19. 07 12月, 2018 1 次提交
  20. 01 10月, 2018 1 次提交
  21. 20 9月, 2018 1 次提交
  22. 18 9月, 2018 1 次提交
    • V
      arm64: mm: Support Common Not Private translations · 5ffdfaed
      Vladimir Murzin 提交于
      Common Not Private (CNP) is a feature of ARMv8.2 extension which
      allows translation table entries to be shared between different PEs in
      the same inner shareable domain, so the hardware can use this fact to
      optimise the caching of such entries in the TLB.
      
      CNP occupies one bit in TTBRx_ELy and VTTBR_EL2, which advertises to
      the hardware that the translation table entries pointed to by this
      TTBR are the same as every PE in the same inner shareable domain for
      which the equivalent TTBR also has CNP bit set. In case CNP bit is set
      but TTBR does not point at the same translation table entries for a
      given ASID and VMID, then the system is mis-configured, so the results
      of translations are UNPREDICTABLE.
      
      For kernel we postpone setting CNP till all cpus are up and rely on
      cpufeature framework to 1) patch the code which is sensitive to CNP
      and 2) update TTBR1_EL1 with CNP bit set. TTBR1_EL1 can be
      reprogrammed as result of hibernation or cpuidle (via __enable_mmu).
      For these two cases we restore CnP bit via __cpu_suspend_exit().
      
      There are a few cases we need to care of changes in TTBR0_EL1:
        - a switch to idmap
        - software emulated PAN
      
      we rule out latter via Kconfig options and for the former we make
      sure that CNP is set for non-zero ASIDs only.
      Reviewed-by: NJames Morse <james.morse@arm.com>
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      [catalin.marinas@arm.com: default y for CONFIG_ARM64_CNP]
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      5ffdfaed
  23. 15 9月, 2018 1 次提交
  24. 10 9月, 2018 1 次提交
  25. 09 7月, 2018 1 次提交
  26. 05 7月, 2018 1 次提交
  27. 01 6月, 2018 1 次提交
  28. 12 4月, 2018 1 次提交
  29. 28 3月, 2018 1 次提交
  30. 27 3月, 2018 1 次提交
    • S
      arm64: Delay enabling hardware DBM feature · 05abb595
      Suzuki K Poulose 提交于
      We enable hardware DBM bit in a capable CPU, very early in the
      boot via __cpu_setup. This doesn't give us a flexibility of
      optionally disable the feature, as the clearing the bit
      is a bit costly as the TLB can cache the settings. Instead,
      we delay enabling the feature until the CPU is brought up
      into the kernel. We use the feature capability mechanism
      to handle it.
      
      The hardware DBM is a non-conflicting feature. i.e, the kernel
      can safely run with a mix of CPUs with some using the feature
      and the others don't. So, it is safe for a late CPU to have
      this capability and enable it, even if the active CPUs don't.
      
      To get this handled properly by the infrastructure, we
      unconditionally set the capability and only enable it
      on CPUs which really have the feature. Also, we print the
      feature detection from the "matches" call back to make sure
      we don't mislead the user when none of the CPUs could use the
      feature.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: NDave Martin <dave.martin@arm.com>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      05abb595
  31. 20 3月, 2018 1 次提交
  32. 19 3月, 2018 2 次提交
  33. 09 3月, 2018 2 次提交
    • S
      arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC · 6ae4b6e0
      Shanker Donthineni 提交于
      The DCache clean & ICache invalidation requirements for instructions
      to be data coherence are discoverable through new fields in CTR_EL0.
      The following two control bits DIC and IDC were defined for this
      purpose. No need to perform point of unification cache maintenance
      operations from software on systems where CPU caches are transparent.
      
      This patch optimize the three functions __flush_cache_user_range(),
      clean_dcache_area_pou() and invalidate_icache_range() if the hardware
      reports CTR_EL0.IDC and/or CTR_EL0.IDC. Basically it skips the two
      instructions 'DC CVAU' and 'IC IVAU', and the associated loop logic
      in order to avoid the unnecessary overhead.
      
      CTR_EL0.DIC: Instruction cache invalidation requirements for
       instruction to data coherence. The meaning of this bit[29].
        0: Instruction cache invalidation to the point of unification
           is required for instruction to data coherence.
        1: Instruction cache cleaning to the point of unification is
            not required for instruction to data coherence.
      
      CTR_EL0.IDC: Data cache clean requirements for instruction to data
       coherence. The meaning of this bit[28].
        0: Data cache clean to the point of unification is required for
           instruction to data coherence, unless CLIDR_EL1.LoC == 0b000
           or (CLIDR_EL1.LoUIS == 0b000 && CLIDR_EL1.LoUU == 0b000).
        1: Data cache clean to the point of unification is not required
           for instruction to data coherence.
      Co-authored-by: NPhilip Elcan <pelcan@codeaurora.org>
      Reviewed-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      6ae4b6e0
    • A
      arm64/kernel: enable A53 erratum #8434319 handling at runtime · ca79acca
      Ard Biesheuvel 提交于
      Omit patching of ADRP instruction at module load time if the current
      CPUs are not susceptible to the erratum.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      [will: Drop duplicate initialisation of .def_scope field]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      ca79acca
  34. 16 1月, 2018 1 次提交