An error occurred fetching the project authors.
  1. 01 May, 2019 1 commit
  2. 20 Mar, 2019 1 commit
  3. 06 Mar, 2019 1 commit
  4. 28 Feb, 2019 1 commit
    • Zhang Lei's avatar
      arm64: Add workaround for Fujitsu A64FX erratum 010001 · 3e32131a
      Zhang Lei authored
      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: default avatarZhang Lei <zhang.lei@jp.fujitsu.com>
      [Generated MIDR value/mask for __cpu_setup(), removed spurious-fault handler
       and always disabled the NFDx bits on affected CPUs]
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Tested-by: default avatarzhang.lei <zhang.lei@jp.fujitsu.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      3e32131a
  5. 20 Feb, 2019 1 commit
  6. 13 Feb, 2019 3 commits
  7. 06 Feb, 2019 1 commit
  8. 21 Jan, 2019 1 commit
  9. 28 Dec, 2018 1 commit
  10. 21 Dec, 2018 1 commit
  11. 20 Dec, 2018 1 commit
  12. 13 Dec, 2018 2 commits
  13. 12 Dec, 2018 2 commits
    • Ard Biesheuvel's avatar
      arm64: enable per-task stack canaries · 0a1213fa
      Ard Biesheuvel authored
      This enables the use of per-task stack canary values if GCC has
      support for emitting the stack canary reference relative to the
      value of sp_el0, which holds the task struct pointer in the arm64
      kernel.
      
      The $(eval) extends KBUILD_CFLAGS at the moment the make rule is
      applied, which means asm-offsets.o (which we rely on for the offset
      value) is built without the arguments, and everything built afterwards
      has the options set.
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      0a1213fa
    • Robin Murphy's avatar
      arm64: Add memory hotplug support · 4ab21506
      Robin Murphy authored
      Wire up the basic support for hot-adding memory. Since memory hotplug
      is fairly tightly coupled to sparsemem, we tweak pfn_valid() to also
      cross-check the presence of a section in the manner of the generic
      implementation, before falling back to memblock to check for no-map
      regions within a present section as before. By having arch_add_memory(()
      create the linear mapping first, this then makes everything work in the
      way that __add_section() expects.
      
      We expect hotplug to be ACPI-driven, so the swapper_pg_dir updates
      should be safe from races by virtue of the global device hotplug lock.
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      4ab21506
  14. 11 Dec, 2018 1 commit
    • Arnd Bergmann's avatar
      arm64: fix ARM64_USER_VA_BITS_52 builds · 4d08d20f
      Arnd Bergmann authored
      In some randconfig builds, the new CONFIG_ARM64_USER_VA_BITS_52
      triggered a build failure:
      
      arch/arm64/mm/proc.S:287: Error: immediate out of range
      
      As it turns out, we were incorrectly setting PGTABLE_LEVELS here,
      lacking any other default value.
      This fixes the calculation of CONFIG_PGTABLE_LEVELS to consider
      all combinations again.
      
      Fixes: 68d23da4 ("arm64: Kconfig: Re-jig CONFIG options for 52-bit VA")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      4d08d20f
  15. 10 Dec, 2018 4 commits
  16. 06 Dec, 2018 4 commits
  17. 01 Dec, 2018 2 commits
  18. 29 Nov, 2018 1 commit
    • Catalin Marinas's avatar
      arm64: Add workaround for Cortex-A76 erratum 1286807 · ce8c80c5
      Catalin Marinas authored
      On the affected Cortex-A76 cores (r0p0 to r3p0), if a virtual address
      for a cacheable mapping of a location is being accessed by a core while
      another core is remapping the virtual address to a new physical page
      using the recommended break-before-make sequence, then under very rare
      circumstances TLBI+DSB completes before a read using the translation
      being invalidated has been observed by other observers. The workaround
      repeats the TLBI+DSB operation and is shared with the Qualcomm Falkor
      erratum 1009
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      ce8c80c5
  19. 23 Nov, 2018 3 commits
  20. 20 Nov, 2018 1 commit
    • Ard Biesheuvel's avatar
      arm64: mm: apply r/o permissions of VM areas to its linear alias as well · c55191e9
      Ard Biesheuvel authored
      On arm64, we use block mappings and contiguous hints to map the linear
      region, to minimize the TLB footprint. However, this means that the
      entire region is mapped using read/write permissions, which we cannot
      modify at page granularity without having to take intrusive measures to
      prevent TLB conflicts.
      
      This means the linear aliases of pages belonging to read-only mappings
      (executable or otherwise) in the vmalloc region are also mapped read/write,
      and could potentially be abused to modify things like module code, bpf JIT
      code or other read-only data.
      
      So let's fix this, by extending the set_memory_ro/rw routines to take
      the linear alias into account. The consequence of enabling this is
      that we can no longer use block mappings or contiguous hints, so in
      cases where the TLB footprint of the linear region is a bottleneck,
      performance may be affected.
      
      Therefore, allow this feature to be runtime en/disabled, by setting
      rodata=full (or 'on' to disable just this enhancement, or 'off' to
      disable read-only mappings for code and r/o data entirely) on the
      kernel command line. Also, allow the default value to be set via a
      Kconfig option.
      Tested-by: default avatarLaura Abbott <labbott@redhat.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      c55191e9
  21. 31 Oct, 2018 2 commits
  22. 19 Oct, 2018 1 commit
    • Christoph Hellwig's avatar
      arm64: use the generic swiotlb_dma_ops · 886643b7
      Christoph Hellwig authored
      Now that the generic swiotlb code supports non-coherent DMA we can switch
      to it for arm64.  For that we need to refactor the existing
      alloc/free/mmap/pgprot helpers to be used as the architecture hooks,
      and implement the standard arch_sync_dma_for_{device,cpu} hooks for
      cache maintaincance in the streaming dma hooks, which also implies
      using the generic dma_coherent flag in struct device.
      
      Note that we need to keep the old is_device_dma_coherent function around
      for now, so that the shared arm/arm64 Xen code keeps working.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      886643b7
  23. 03 Oct, 2018 1 commit
    • Arnd Bergmann's avatar
      arm64: arch_timer: avoid unused function warning · 040f3401
      Arnd Bergmann authored
      arm64_1188873_read_cntvct_el0() is protected by the correct
      CONFIG_ARM64_ERRATUM_1188873 #ifdef, but the only reference to it is
      also inside of an CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND section,
      and causes a warning if that is disabled:
      
      drivers/clocksource/arm_arch_timer.c:323:20: error: 'arm64_1188873_read_cntvct_el0' defined but not used [-Werror=unused-function]
      
      Since the erratum requires that we always apply the workaround
      in the timer driver, select that symbol as we do for SoC
      specific errata.
      
      Fixes: 95b861a4 ("arm64: arch_timer: Add workaround for ARM erratum 1188873")
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      040f3401
  24. 01 Oct, 2018 1 commit
  25. 27 Sep, 2018 1 commit
    • Ard Biesheuvel's avatar
      arm64/kernel: jump_label: Switch to relative references · c296146c
      Ard Biesheuvel authored
      On a randomly chosen distro kernel build for arm64, vmlinux.o shows the
      following sections, containing jump label entries, and the associated
      RELA relocation records, respectively:
      
        ...
        [38088] __jump_table      PROGBITS         0000000000000000  00e19f30
             000000000002ea10  0000000000000000  WA       0     0     8
        [38089] .rela__jump_table RELA             0000000000000000  01fd8bb0
             000000000008be30  0000000000000018   I      38178   38088     8
        ...
      
      In other words, we have 190 KB worth of 'struct jump_entry' instances,
      and 573 KB worth of RELA entries to relocate each entry's code, target
      and key members. This means the RELA section occupies 10% of the .init
      segment, and the two sections combined represent 5% of vmlinux's entire
      memory footprint.
      
      So let's switch from 64-bit absolute references to 32-bit relative
      references for the code and target field, and a 64-bit relative
      reference for the 'key' field (which may reside in another module or the
      core kernel, which may be more than 4 GB way on arm64 when running with
      KASLR enable): this reduces the size of the __jump_table by 33%, and
      gets rid of the RELA section entirely.
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-s390@vger.kernel.org
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Jessica Yu <jeyu@kernel.org>
      Link: https://lkml.kernel.org/r/20180919065144.25010-4-ard.biesheuvel@linaro.org
      c296146c
  26. 21 Sep, 2018 1 commit
    • James Morse's avatar
      arm64: Kconfig: Remove ARCH_HAS_HOLES_MEMORYMODEL · 8a695a58
      James Morse authored
      include/linux/mmzone.h describes ARCH_HAS_HOLES_MEMORYMODEL as
      relevant when parts the memmap have been free()d. This would
      happen on systems where memory is smaller than a sparsemem-section,
      and the extra struct pages are expensive. pfn_valid() on these
      systems returns true for the whole sparsemem-section, so an extra
      memmap_valid_within() check is needed.
      
      On arm64 we have nomap memory, so always provide pfn_valid() to test
      for nomap pages. This means ARCH_HAS_HOLES_MEMORYMODEL's extra checks
      are already rolled up into pfn_valid().
      
      Remove it.
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      8a695a58