29 Feb, 2020

1 commit

  • commit dcde237319e626d1ec3c9d8b7613032f0fd4663a upstream.

    Currently the arm64 kernel ignores the top address byte passed to brk(),
    mmap() and mremap(). When the user is not aware of the 56-bit address
    limit or relies on the kernel to return an error, untagging such
    pointers has the potential to create address aliases in user-space.
    Passing a tagged address to munmap(), madvise() is permitted since the
    tagged pointer is expected to be inside an existing mapping.

    The current behaviour breaks the existing glibc malloc() implementation
    which relies on brk() with an address beyond 56-bit to be rejected by
    the kernel.

    Remove untagging in the above functions by partially reverting commit
    ce18d171cb73 ("mm: untag user pointers in mmap/munmap/mremap/brk"). In
    addition, update the arm64 tagged-address-abi.rst document accordingly.

    Link: https://bugzilla.redhat.com/1797052
    Fixes: ce18d171cb73 ("mm: untag user pointers in mmap/munmap/mremap/brk")
    Cc: # 5.4.x-
    Cc: Florian Weimer
    Reviewed-by: Andrew Morton
    Reported-by: Victor Stinner
    Acked-by: Will Deacon
    Acked-by: Andrey Konovalov
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Greg Kroah-Hartman

    Catalin Marinas
     

01 Nov, 2019

2 commits

  • The Broadcom Brahma-B53 core is susceptible to the issue described by
    ARM64_ERRATUM_843419 so this commit enables the workaround to be applied
    when executing on that core.

    Since there are now multiple entries to match, we must convert the
    existing ARM64_ERRATUM_843419 into an erratum list and use
    cpucap_multi_entry_cap_matches to match our entries.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Will Deacon

    Florian Fainelli
     
  • The Broadcom Brahma-B53 core is susceptible to the issue described by
    ARM64_ERRATUM_845719 so this commit enables the workaround to be applied
    when executing on that core.

    Since there are now multiple entries to match, we must convert the
    existing ARM64_ERRATUM_845719 into an erratum list.

    Signed-off-by: Doug Berger
    Signed-off-by: Florian Fainelli
    Signed-off-by: Will Deacon

    Doug Berger
     

31 Oct, 2019

1 commit


18 Oct, 2019

1 commit

  • Workaround for Cavium/Marvell ThunderX2 erratum #219.

    * errata/tx2-219:
    arm64: Allow CAVIUM_TX2_ERRATUM_219 to be selected
    arm64: Avoid Cavium TX2 erratum 219 when switching TTBR
    arm64: Enable workaround for Cavium TX2 erratum 219 when running SMT
    arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set

    Will Deacon
     

08 Oct, 2019

1 commit


01 Oct, 2019

1 commit

  • Sphinx generates the following warnings for the arm64 doc
    pages:

    Documentation/arm64/memory.rst:158: WARNING: Unexpected indentation.
    Documentation/arm64/memory.rst:162: WARNING: Unexpected indentation.

    These indentations warnings can be resolved by utilising code
    hightlighting instead.

    Signed-off-by: Adam Zerella
    Signed-off-by: Will Deacon

    Adam Zerella
     

18 Sep, 2019

1 commit

  • Pull core irq updates from Thomas Gleixner:
    "Updates from the irq departement:

    - Update the interrupt spreading code so it handles numa node with
    different CPU counts properly.

    - A large overhaul of the ARM GiCv3 driver to support new PPI and SPI
    ranges.

    - Conversion of all alloc_fwnode() users to use physical addresses
    instead of virtual addresses so the virtual addresses are not
    leaked. The physical address is sufficient to identify the
    associated interrupt chip.

    - Add support for Marvel MMP3, Amlogic Meson SM1 interrupt chips.

    - Enforce interrupt threading at compile time if RT is enabled.

    - Small updates and improvements all over the place"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits)
    irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices
    irqchip/uniphier-aidet: Use devm_platform_ioremap_resource()
    irqdomain: Add the missing assignment of domain->fwnode for named fwnode
    irqchip/mmp: Coexist with GIC root IRQ controller
    irqchip/mmp: Mask off interrupts from other cores
    irqchip/mmp: Add missing chained_irq_{enter,exit}()
    irqchip/mmp: Do not use of_address_to_resource() to get mux regs
    irqchip/meson-gpio: Add support for meson sm1 SoCs
    dt-bindings: interrupt-controller: New binding for the meson sm1 SoCs
    genirq/affinity: Remove const qualifier from node_to_cpumask argument
    genirq/affinity: Spread vectors on node according to nr_cpu ratio
    genirq/affinity: Improve __irq_build_affinity_masks()
    irqchip: Remove dev_err() usage after platform_get_irq()
    irqchip: Add include guard to irq-partition-percpu.h
    irqchip/mmp: Do not call irq_set_default_host() on DT platforms
    irqchip/gic-v3-its: Remove the redundant set_bit for lpi_map
    irqchip/gic-v3: Add quirks for HIP06/07 invalid GICD_TYPER erratum 161010803
    irqchip/gic: Skip DT quirks when evaluating IIDR-based quirks
    irqchip/gic-v3: Warn about inconsistent implementations of extended ranges
    irqchip/gic-v3: Add EPPI range support
    ...

    Linus Torvalds
     

30 Aug, 2019

1 commit

  • …njection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core

    * for-next/52-bit-kva: (25 commits)
    Support for 52-bit virtual addressing in kernel space

    * for-next/cpu-topology: (9 commits)
    Move CPU topology parsing into core code and add support for ACPI 6.3

    * for-next/error-injection: (2 commits)
    Support for function error injection via kprobes

    * for-next/perf: (8 commits)
    Support for i.MX8 DDR PMU and proper SMMUv3 group validation

    * for-next/psci-cpuidle: (7 commits)
    Move PSCI idle code into a new CPUidle driver

    * for-next/rng: (4 commits)
    Support for 'rng-seed' property being passed in the devicetree

    * for-next/smpboot: (3 commits)
    Reduce fragility of secondary CPU bringup in debug configurations

    * for-next/tbi: (10 commits)
    Introduce new syscall ABI with relaxed requirements for pointer tags

    * for-next/tlbi: (6 commits)
    Handle spurious page faults arising from kernel space

    Will Deacon
     

28 Aug, 2019

1 commit

  • On AArch64 the TCR_EL1.TBI0 bit is set by default, allowing userspace
    (EL0) to perform memory accesses through 64-bit pointers with a non-zero
    top byte. However, such pointers were not allowed at the user-kernel
    syscall ABI boundary.

    With the Tagged Address ABI patchset, it is now possible to pass tagged
    pointers to the syscalls. Relax the requirements described in
    tagged-pointers.rst to be compliant with the behaviours guaranteed by
    the AArch64 Tagged Address ABI.

    Cc: Will Deacon
    Cc: Szabolcs Nagy
    Cc: Kevin Brodsky
    Acked-by: Andrey Konovalov
    Signed-off-by: Vincenzo Frascino
    Co-developed-by: Catalin Marinas
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Vincenzo Frascino
     

23 Aug, 2019

1 commit

  • Documentation/arm64/tagged-address-abi.rst introduces the
    relaxation of the syscall ABI that allows userspace to pass
    certain tagged pointers to kernel syscalls.

    Add the document to index.rst for a correct generation of the
    table of content.

    Cc: Will Deacon
    Cc: Catalin Marinas
    Signed-off-by: Vincenzo Frascino
    Signed-off-by: Will Deacon

    Vincenzo Frascino
     

22 Aug, 2019

1 commit

  • On AArch64 the TCR_EL1.TBI0 bit is set by default, allowing userspace
    (EL0) to perform memory accesses through 64-bit pointers with a non-zero
    top byte. Introduce the document describing the relaxation of the
    syscall ABI that allows userspace to pass certain tagged pointers to
    kernel syscalls.

    Cc: Will Deacon
    Cc: Szabolcs Nagy
    Acked-by: Kevin Brodsky
    Acked-by: Andrey Konovalov
    Signed-off-by: Vincenzo Frascino
    Co-developed-by: Catalin Marinas
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Vincenzo Frascino
     

20 Aug, 2019

1 commit


09 Aug, 2019

2 commits

  • As the kernel no longer prints out the memory layout on boot, this patch
    adds this information back to the memory document.

    Also, as the 52-bit support introduces some subtle changes to the arm64
    memory, the rationale behind these changes are also added to the memory
    document.

    Signed-off-by: Steve Capper
    Reviewed-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Steve Capper
     
  • KASAN_SHADOW_OFFSET is a constant that is supplied to gcc as a command
    line argument and affects the codegen of the inline address sanetiser.

    Essentially, for an example memory access:
    *ptr1 = val;
    The compiler will insert logic similar to the below:
    shadowValue = *(ptr1 >> KASAN_SHADOW_SCALE_SHIFT + KASAN_SHADOW_OFFSET)
    if (somethingWrong(shadowValue))
    flagAnError();

    This code sequence is inserted into many places, thus
    KASAN_SHADOW_OFFSET is essentially baked into many places in the kernel
    text.

    If we want to run a single kernel binary with multiple address spaces,
    then we need to do this with KASAN_SHADOW_OFFSET fixed.

    Thankfully, due to the way the KASAN_SHADOW_OFFSET is used to provide
    shadow addresses we know that the end of the shadow region is constant
    w.r.t. VA space size:
    KASAN_SHADOW_END = ~0 >> KASAN_SHADOW_SCALE_SHIFT + KASAN_SHADOW_OFFSET

    This means that if we increase the size of the VA space, the start of
    the KASAN region expands into lower addresses whilst the end of the
    KASAN region is fixed.

    Currently the arm64 code computes KASAN_SHADOW_OFFSET at build time via
    build scripts with the VA size used as a parameter. (There are build
    time checks in the C code too to ensure that expected values are being
    derived). It is sufficient, and indeed is a simplification, to remove
    the build scripts (and build time checks) entirely and instead provide
    KASAN_SHADOW_OFFSET values.

    This patch removes the logic to compute the KASAN_SHADOW_OFFSET in the
    arm64 Makefile, and instead we adopt the approach used by x86 to supply
    offset values in kConfig. To help debug/develop future VA space changes,
    the Makefile logic has been preserved in a script file in the arm64
    Documentation folder.

    Reviewed-by: Catalin Marinas
    Signed-off-by: Steve Capper
    Signed-off-by: Will Deacon

    Steve Capper
     

15 Jul, 2019

1 commit


13 Jul, 2019

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "ARM:
    - support for chained PMU counters in guests
    - improved SError handling
    - handle Neoverse N1 erratum #1349291
    - allow side-channel mitigation status to be migrated
    - standardise most AArch64 system register accesses to msr_s/mrs_s
    - fix host MPIDR corruption on 32bit
    - selftests ckleanups

    x86:
    - PMU event {white,black}listing
    - ability for the guest to disable host-side interrupt polling
    - fixes for enlightened VMCS (Hyper-V pv nested virtualization),
    - new hypercall to yield to IPI target
    - support for passing cstate MSRs through to the guest
    - lots of cleanups and optimizations

    Generic:
    - Some txt->rST conversions for the documentation"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (128 commits)
    Documentation: virtual: Add toctree hooks
    Documentation: kvm: Convert cpuid.txt to .rst
    Documentation: virtual: Convert paravirt_ops.txt to .rst
    KVM: x86: Unconditionally enable irqs in guest context
    KVM: x86: PMU Event Filter
    kvm: x86: Fix -Wmissing-prototypes warnings
    KVM: Properly check if "page" is valid in kvm_vcpu_unmap
    KVM: arm/arm64: Initialise host's MPIDRs by reading the actual register
    KVM: LAPIC: Retry tune per-vCPU timer_advance_ns if adaptive tuning goes insane
    kvm: LAPIC: write down valid APIC registers
    KVM: arm64: Migrate _elx sysreg accessors to msr_s/mrs_s
    KVM: doc: Add API documentation on the KVM_REG_ARM_WORKAROUNDS register
    KVM: arm/arm64: Add save/restore support for firmware workaround state
    arm64: KVM: Propagate full Spectre v2 workaround state to KVM guests
    KVM: arm/arm64: Support chained PMU counters
    KVM: arm/arm64: Remove pmc->bitmask
    KVM: arm/arm64: Re-create event when setting counter value
    KVM: arm/arm64: Extract duplicated code to own function
    KVM: arm/arm64: Rename kvm_pmu_{enable/disable}_counter functions
    KVM: LAPIC: ARBPRI is a reserved register for x2APIC
    ...

    Linus Torvalds
     

12 Jul, 2019

1 commit

  • Pull Devicetree updates from Rob Herring:

    - DT binding schema examples are now validated against the schemas.
    Various examples are fixed due to that.

    - Sync dtc with upstream version v1.5.0-30-g702c1b6c0e73

    - Initial schemas for networking bindings. This includes ethernet, phy
    and mdio common bindings with several Allwinner and stmmac converted
    to the schema.

    - Conversion of more Arm top-level SoC/board bindings to DT schema

    - Conversion of PSCI binding to DT schema

    - Rework Arm CPU schema to coexist with other CPU schemas

    - Add a bunch of missing vendor prefixes and new ones for SoChip,
    Sipeed, Kontron, B&R Industrial Automation GmbH, and Espressif

    - Add Mediatek UART RX wakeup support to binding

    - Add reset to ST UART binding

    - Remove some Linuxisms from the endianness common-properties.txt
    binding

    - Make the flattened DT read-only after init

    - Ignore disabled reserved memory nodes

    - Clean-up some dead code in FDT functions

    * tag 'devicetree-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (56 commits)
    dt-bindings: vendor-prefixes: add Sipeed
    dt-bindings: vendor-prefixes: add SoChip
    dt-bindings: 83xx-512x-pci: Drop cell-index property
    dt-bindings: serial: add documentation for Rx in-band wakeup support
    dt-bindings: arm: Convert RDA Micro board/soc bindings to json-schema
    of: unittest: simplify getting the adapter of a client
    of/fdt: pass early_init_dt_reserve_memory_arch() with bool type nomap
    of/platform: Drop superfluous cast in of_device_make_bus_id()
    dt-bindings: usb: ehci: Fix example warnings
    dt-bindings: net: Use phy-mode instead of phy-connection-type
    dt-bindings: simple-framebuffer: Add requirement for pipelines
    dt-bindings: display: Fix simple-framebuffer example
    dt-bindings: net: mdio: Add child nodes
    dt-bindings: net: mdio: Add address and size cells
    dt-bindings: net: mdio: Add a nodename pattern
    dt-bindings: mtd: sunxi-nand: Drop 'maxItems' from child 'reg' property
    dt-bindings: arm: Limit cpus schema to only check Arm 'cpu' nodes
    dt-bindings: backlight: lm3630a: correct schema validation
    dt-bindings: net: dwmac: Deprecate the PHY reset properties
    dt-bindings: net: sun8i-emac: Convert the binding to a schemas
    ...

    Linus Torvalds
     

10 Jul, 2019

1 commit

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

09 Jul, 2019

1 commit

  • Pull arm64 updates from Catalin Marinas:

    - arm64 support for syscall emulation via PTRACE_SYSEMU{,_SINGLESTEP}

    - Wire up VM_FLUSH_RESET_PERMS for arm64, allowing the core code to
    manage the permissions of executable vmalloc regions more strictly

    - Slight performance improvement by keeping softirqs enabled while
    touching the FPSIMD/SVE state (kernel_neon_begin/end)

    - Expose a couple of ARMv8.5 features to user (HWCAP): CondM (new
    XAFLAG and AXFLAG instructions for floating point comparison flags
    manipulation) and FRINT (rounding floating point numbers to integers)

    - Re-instate ARM64_PSEUDO_NMI support which was previously marked as
    BROKEN due to some bugs (now fixed)

    - Improve parking of stopped CPUs and implement an arm64-specific
    panic_smp_self_stop() to avoid warning on not being able to stop
    secondary CPUs during panic

    - perf: enable the ARM Statistical Profiling Extensions (SPE) on ACPI
    platforms

    - perf: DDR performance monitor support for iMX8QXP

    - cache_line_size() can now be set from DT or ACPI/PPTT if provided to
    cope with a system cache info not exposed via the CPUID registers

    - Avoid warning on hardware cache line size greater than
    ARCH_DMA_MINALIGN if the system is fully coherent

    - arm64 do_page_fault() and hugetlb cleanups

    - Refactor set_pte_at() to avoid redundant READ_ONCE(*ptep)

    - Ignore ACPI 5.1 FADTs reported as 5.0 (infer from the
    'arm_boot_flags' introduced in 5.1)

    - CONFIG_RANDOMIZE_BASE now enabled in defconfig

    - Allow the selection of ARM64_MODULE_PLTS, currently only done via
    RANDOMIZE_BASE (and an erratum workaround), allowing modules to spill
    over into the vmalloc area

    - Make ZONE_DMA32 configurable

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (54 commits)
    perf: arm_spe: Enable ACPI/Platform automatic module loading
    arm_pmu: acpi: spe: Add initial MADT/SPE probing
    ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens
    ACPI/PPTT: Modify node flag detection to find last IDENTICAL
    x86/entry: Simplify _TIF_SYSCALL_EMU handling
    arm64: rename dump_instr as dump_kernel_instr
    arm64/mm: Drop [PTE|PMD]_TYPE_FAULT
    arm64: Implement panic_smp_self_stop()
    arm64: Improve parking of stopped CPUs
    arm64: Expose FRINT capabilities to userspace
    arm64: Expose ARMv8.5 CondM capability to userspace
    arm64: defconfig: enable CONFIG_RANDOMIZE_BASE
    arm64: ARM64_MODULES_PLTS must depend on MODULES
    arm64: bpf: do not allocate executable memory
    arm64/kprobes: set VM_FLUSH_RESET_PERMS on kprobe instruction pages
    arm64/mm: wire up CONFIG_ARCH_HAS_SET_DIRECT_MAP
    arm64: module: create module allocations without exec permissions
    arm64: Allow user selection of ARM64_MODULE_PLTS
    acpi/arm64: ignore 5.1 FADTs that are reported as 5.0
    arm64: Allow selecting Pseudo-NMI again
    ...

    Linus Torvalds
     

05 Jul, 2019

1 commit

  • Neoverse-N1 affected by #1349291 may report an Uncontained RAS Error
    as Unrecoverable. The kernel's architecture code already considers
    Unrecoverable errors as fatal as without kernel-first support no
    further error-handling is possible.

    Now that KVM attributes SError to the host/guest more precisely
    the host's architecture code will always handle host errors that
    become pending during world-switch.
    Errors misclassified by this errata that affected the guest will be
    re-injected to the guest as an implementation-defined SError, which can
    be uncontained.

    Until kernel-first support is implemented, no workaround is needed
    for this issue.

    Signed-off-by: James Morse
    Signed-off-by: Marc Zyngier

    James Morse
     

28 Jun, 2019

1 commit


25 Jun, 2019

2 commits

  • ARMv8.5 introduces the FRINT series of instructions for rounding floating
    point numbers to integers. Provide a capability to userspace in order to
    allow applications to determine if the system supports these instructions.

    Signed-off-by: Mark Brown
    Acked-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Mark Brown
     
  • ARMv8.5 adds new instructions XAFLAG and AXFLAG to translate the
    representation of the results of floating point comparisons between the
    native ARM format and an alternative format used by some software. Add
    a hwcap allowing userspace to determine if they are present, since we
    referred to earlier CondM extensions as FLAGM call these extensions
    FLAGM2.

    Signed-off-by: Mark Brown
    Acked-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Mark Brown
     

15 Jun, 2019

1 commit

  • The documentation is in a format that is very close to ReST format.

    The conversion is actually:
    - add blank lines in order to identify paragraphs;
    - fixing tables markups;
    - adding some lists markups;
    - marking literal blocks;
    - adjust some title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

13 Jun, 2019

1 commit

  • The in-memory representation of SVE and FPSIMD registers is
    different: the FPSIMD V-registers are stored as single 128-bit
    host-endian values, whereas SVE registers are stored in an
    endianness-invariant byte order.

    This means that the two representations differ when running on a
    big-endian host. But we blindly copy data from one representation
    to another when converting between the two, resulting in the
    register contents being unintentionally byteswapped in certain
    situations. Currently this can be triggered by the first SVE
    instruction after a syscall, for example (though the potential
    trigger points may vary in future).

    So, fix the conversion functions fpsimd_to_sve(), sve_to_fpsimd()
    and sve_sync_from_fpsimd_zeropad() to swab where appropriate.

    There is no common swahl128() or swab128() that we could use here.
    Maybe it would be worth making this generic, but for now add a
    simple local hack.

    Since the byte order differences are exposed in ABI, also clarify
    the documentation.

    Cc: Alex Bennée
    Cc: Peter Maydell
    Cc: Alan Hayward
    Cc: Julien Grall
    Fixes: bc0ee4760364 ("arm64/sve: Core task context handling")
    Fixes: 8cd969d28fd2 ("arm64/sve: Signal handling support")
    Fixes: 43d4da2c45b2 ("arm64/sve: ptrace and ELF coredump support")
    Signed-off-by: Dave Martin
    [will: Fix typos in comments and docs spotted by Julien]
    Signed-off-by: Will Deacon

    Dave Martin
     

23 May, 2019

2 commits

  • 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: Marc Zyngier
    Signed-off-by: Will Deacon

    Marc Zyngier
     
  • 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:
    Cc: Marc Zyngier
    Cc: Catalin Marinas
    Signed-off-by: Will Deacon

    Will Deacon
     

18 May, 2019

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "ARM:
    - support for SVE and Pointer Authentication in guests
    - PMU improvements

    POWER:
    - support for direct access to the POWER9 XIVE interrupt controller
    - memory and performance optimizations

    x86:
    - support for accessing memory not backed by struct page
    - fixes and refactoring

    Generic:
    - dirty page tracking improvements"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (155 commits)
    kvm: fix compilation on aarch64
    Revert "KVM: nVMX: Expose RDPMC-exiting only when guest supports PMU"
    kvm: x86: Fix L1TF mitigation for shadow MMU
    KVM: nVMX: Disable intercept for FS/GS base MSRs in vmcs02 when possible
    KVM: PPC: Book3S: Remove useless checks in 'release' method of KVM device
    KVM: PPC: Book3S HV: XIVE: Fix spelling mistake "acessing" -> "accessing"
    KVM: PPC: Book3S HV: Make sure to load LPID for radix VCPUs
    kvm: nVMX: Set nested_run_pending in vmx_set_nested_state after checks complete
    tests: kvm: Add tests for KVM_SET_NESTED_STATE
    KVM: nVMX: KVM_SET_NESTED_STATE - Tear down old EVMCS state before setting new state
    tests: kvm: Add tests for KVM_CAP_MAX_VCPUS and KVM_CAP_MAX_CPU_ID
    tests: kvm: Add tests to .gitignore
    KVM: Introduce KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2
    KVM: Fix kvm_clear_dirty_log_protect off-by-(minus-)one
    KVM: Fix the bitmap range to copy during clear dirty
    KVM: arm64: Fix ptrauth ID register masking logic
    KVM: x86: use direct accessors for RIP and RSP
    KVM: VMX: Use accessors for GPRs outside of dedicated caching logic
    KVM: x86: Omit caching logic for always-available GPRs
    kvm, x86: Properly check whether a pfn is an MMIO or not
    ...

    Linus Torvalds
     

03 May, 2019

1 commit


01 May, 2019

1 commit


30 Apr, 2019

1 commit


24 Apr, 2019

3 commits

  • The interaction between the exclude_{host,guest} flags,
    exclude_{user,kernel,hv} flags and presence of VHE can result in
    different exception levels being filtered by the ARMv8 PMU. As this
    can be confusing let's document how they work on arm64.

    Signed-off-by: Andrew Murray
    Reviewed-by: Suzuki K Poulose
    Acked-by: Will Deacon
    Signed-off-by: Marc Zyngier

    Andrew Murray
     
  • Now that the building blocks of pointer authentication are present, lets
    add userspace flags KVM_ARM_VCPU_PTRAUTH_ADDRESS and
    KVM_ARM_VCPU_PTRAUTH_GENERIC. These flags will enable pointer
    authentication for the KVM guest on a per-vcpu basis through the ioctl
    KVM_ARM_VCPU_INIT.

    This features will allow the KVM guest to allow the handling of
    pointer authentication instructions or to treat them as undefined
    if not set.

    Necessary documentations are added to reflect the changes done.

    Reviewed-by: Dave Martin
    Signed-off-by: Amit Daniel Kachhap
    Cc: Mark Rutland
    Cc: Marc Zyngier
    Cc: Christoffer Dall
    Cc: kvmarm@lists.cs.columbia.edu
    Signed-off-by: Marc Zyngier

    Amit Daniel Kachhap
     
  • This patch provides support for reporting the presence of SVE2 and
    its optional features to userspace.

    This will also enable visibility of SVE2 for guests, when KVM
    support for SVE-enabled guests is available.

    Signed-off-by: Dave Martin
    Signed-off-by: Will Deacon

    Dave Martin
     

16 Apr, 2019

2 commits

  • ARMv8.5 builds upon the ARMv8.2 DC CVAP instruction by introducing a DC
    CVADP instruction which cleans the data cache to the point of deep
    persistence. Let's expose this support via the arm64 ELF hwcaps.

    Signed-off-by: Andrew Murray
    Reviewed-by: Dave Martin
    Signed-off-by: Will Deacon

    Andrew Murray
     
  • As we will exhaust the first 32 bits of AT_HWCAP let's start
    exposing AT_HWCAP2 to userspace to give us up to 64 caps.

    Whilst it's possible to use the remaining 32 bits of AT_HWCAP, we
    prefer to expand into AT_HWCAP2 in order to provide a consistent
    view to userspace between ILP32 and LP64. However internal to the
    kernel we prefer to continue to use the full space of elf_hwcap.

    To reduce complexity and allow for future expansion, we now
    represent hwcaps in the kernel as ordinals and use a
    KERNEL_HWCAP_ prefix. This allows us to support automatic feature
    based module loading for all our hwcaps.

    We introduce cpu_set_feature to set hwcaps which complements the
    existing cpu_have_feature helper. These helpers allow us to clean
    up existing direct uses of elf_hwcap and reduce any future effort
    required to move beyond 64 caps.

    For convenience we also introduce cpu_{have,set}_named_feature which
    makes use of the cpu_feature macro to allow providing a hwcap name
    without a {KERNEL_}HWCAP_ prefix.

    Signed-off-by: Andrew Murray
    [will: use const_ilog2() and tweak documentation]
    Signed-off-by: Will Deacon

    Andrew Murray
     

04 Apr, 2019

1 commit

  • HiSilicon erratum 162001800 describes the limitation of
    SMMUv3 PMCG implementation on HiSilicon Hip08 platforms.

    On these platforms, the PMCG event counter registers
    (SMMU_PMCG_EVCNTRn) are read only and as a result it
    is not possible to set the initial counter period value
    on event monitor start.

    To work around this, the current value of the counter
    is read and used for delta calculations. OEM information
    from ACPI header is used to identify the affected hardware
    platforms.

    Signed-off-by: Shameer Kolothum
    Reviewed-by: Hanjun Guo
    Reviewed-by: Robin Murphy
    Acked-by: Lorenzo Pieralisi
    [will: update silicon-errata.txt and add reason string to acpi match]
    Signed-off-by: Will Deacon

    Shameer Kolothum
     

11 Mar, 2019

1 commit

  • Pull arm64 updates from Catalin Marinas:

    - Pseudo NMI support for arm64 using GICv3 interrupt priorities

    - uaccess macros clean-up (unsafe user accessors also merged but
    reverted, waiting for objtool support on arm64)

    - ptrace regsets for Pointer Authentication (ARMv8.3) key management

    - inX() ordering w.r.t. delay() on arm64 and riscv (acks in place by
    the riscv maintainers)

    - arm64/perf updates: PMU bindings converted to json-schema, unused
    variable and misleading comment removed

    - arm64/debug fixes to ensure checking of the triggering exception
    level and to avoid the propagation of the UNKNOWN FAR value into the
    si_code for debug signals

    - Workaround for Fujitsu A64FX erratum 010001

    - lib/raid6 ARM NEON optimisations

    - NR_CPUS now defaults to 256 on arm64

    - Minor clean-ups (documentation/comments, Kconfig warning, unused
    asm-offsets, clang warnings)

    - MAINTAINERS update for list information to the ARM64 ACPI entry

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (54 commits)
    arm64: mmu: drop paging_init comments
    arm64: debug: Ensure debug handlers check triggering exception level
    arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals
    Revert "arm64: uaccess: Implement unsafe accessors"
    arm64: avoid clang warning about self-assignment
    arm64: Kconfig.platforms: fix warning unmet direct dependencies
    lib/raid6: arm: optimize away a mask operation in NEON recovery routine
    lib/raid6: use vdupq_n_u8 to avoid endianness warnings
    arm64: io: Hook up __io_par() for inX() ordering
    riscv: io: Update __io_[p]ar() macros to take an argument
    asm-generic/io: Pass result of I/O accessor to __io_[p]ar()
    arm64: Add workaround for Fujitsu A64FX erratum 010001
    arm64: Rename get_thread_info()
    arm64: Remove documentation about TIF_USEDFPU
    arm64: irqflags: Fix clang build warnings
    arm64: Enable the support of pseudo-NMIs
    arm64: Skip irqflags tracing for NMI in IRQs disabled context
    arm64: Skip preemption when exiting an NMI
    arm64: Handle serror in NMI context
    irqchip/gic-v3: Allow interrupts to be set as pseudo-NMI
    ...

    Linus Torvalds
     

01 Mar, 2019

1 commit

  • On the Fujitsu-A64FX cores ver(1.0, 1.1), memory access may cause
    an undefined fault (Data abort, DFSC=0b111111). This fault occurs under
    a specific hardware condition when a load/store instruction performs an
    address translation. Any load/store instruction, except non-fault access
    including Armv8 and SVE might cause this undefined fault.

    The TCR_ELx.NFD1 bit is used by the kernel when CONFIG_RANDOMIZE_BASE
    is enabled to mitigate timing attacks against KASLR where the kernel
    address space could be probed using the FFR and suppressed fault on
    SVE loads.

    Since this erratum causes spurious exceptions, which may corrupt
    the exception registers, we clear the TCR_ELx.NFDx=1 bits when
    booting on an affected CPU.

    Signed-off-by: Zhang Lei
    [Generated MIDR value/mask for __cpu_setup(), removed spurious-fault handler
    and always disabled the NFDx bits on affected CPUs]
    Signed-off-by: James Morse
    Tested-by: zhang.lei
    Signed-off-by: Catalin Marinas

    Zhang Lei