1. 28 Aug, 2019 1 commit
    • Mark Rutland's avatar
      arm64: kpti: ensure patched kernel text is fetched from PoU · f32c7a8e
      Mark Rutland authored
      While the MMUs is disabled, I-cache speculation can result in
      instructions being fetched from the PoC. During boot we may patch
      instructions (e.g. for alternatives and jump labels), and these may be
      dirty at the PoU (and stale at the PoC).
      
      Thus, while the MMU is disabled in the KPTI pagetable fixup code we may
      load stale instructions into the I-cache, potentially leading to
      subsequent crashes when executing regions of code which have been
      modified at runtime.
      
      Similarly to commit:
      
        8ec41987 ("arm64: mm: ensure patched kernel text is fetched from PoU")
      
      ... we can invalidate the I-cache after enabling the MMU to prevent such
      issues.
      
      The KPTI pagetable fixup code itself should be clean to the PoC per the
      boot protocol, so no maintenance is required for this code.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      f32c7a8e
  2. 21 Aug, 2019 2 commits
    • Masahiro Yamada's avatar
      arm64: add arch/arm64/Kbuild · 6bfa3134
      Masahiro Yamada authored
      Use the standard obj-y form to specify the sub-directories under
      arch/arm64/. No functional change intended.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      6bfa3134
    • James Morse's avatar
      arm64: entry: Move ct_user_exit before any other exception · 2671828c
      James Morse authored
      When taking an SError or Debug exception from EL0, we run the C
      handler for these exceptions before updating the context tracking
      code and unmasking lower priority interrupts.
      
      When booting with nohz_full lockdep tells us we got this wrong:
      | =============================
      | WARNING: suspicious RCU usage
      | 5.3.0-rc2-00010-gb4b5e9dcb11b-dirty #11271 Not tainted
      | -----------------------------
      | include/linux/rcupdate.h:643 rcu_read_unlock() used illegally wh!
      |
      | other info that might help us debug this:
      |
      |
      | RCU used illegally from idle CPU!
      | rcu_scheduler_active = 2, debug_locks = 1
      | RCU used illegally from extended quiescent state!
      | 1 lock held by a.out/432:
      |  #0: 00000000c7a79515 (rcu_read_lock){....}, at: brk_handler+0x00
      |
      | stack backtrace:
      | CPU: 1 PID: 432 Comm: a.out Not tainted 5.3.0-rc2-00010-gb4b5e9d1
      | Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno De8
      | Call trace:
      |  dump_backtrace+0x0/0x140
      |  show_stack+0x14/0x20
      |  dump_stack+0xbc/0x104
      |  lockdep_rcu_suspicious+0xf8/0x108
      |  brk_handler+0x164/0x1b0
      |  do_debug_exception+0x11c/0x278
      |  el0_dbg+0x14/0x20
      
      Moving the ct_user_exit calls to be before do_debug_exception() means
      they are also before trace_hardirqs_off() has been updated. Add a new
      ct_user_exit_irqoff macro to avoid the context-tracking code using
      irqsave/restore before we've updated trace_hardirqs_off(). To be
      consistent, do this everywhere.
      
      The C helper is called enter_from_user_mode() to match x86 in the hope
      we can merge them into kernel/context_tracking.c later.
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Fixes: 6c81fe79 ("arm64: enable context tracking")
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      2671828c
  3. 20 Aug, 2019 2 commits
    • Will Deacon's avatar
      Revert "init/Kconfig: Fix infinite Kconfig recursion on PPC" · 2d122942
      Will Deacon authored
      This reverts commit 71c67a31.
      
      Commit 117acf5c ("powerpc/Makefile: Always pass --synthetic to nm if
      supported") removed the only conditional definition of $(NM), so we can
      revert our temporary bodge to avoid Kconfig recursion and go back to
      passing $(NM) through to the 'tools-support-relr.sh' when detecting
      support for RELR relocations.
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      2d122942
    • Michael Ellerman's avatar
      powerpc/Makefile: Always pass --synthetic to nm if supported · 117acf5c
      Michael Ellerman authored
      Back in 2004 we added logic to arch/ppc64/Makefile to pass
      the --synthetic option to nm, if it was supported by nm.
      
      Then in 2005 when arch/ppc64 and arch/ppc were merged, the logic to
      add --synthetic was moved inside an #ifdef CONFIG_PPC64 block within
      arch/powerpc/Makefile, and has remained there since.
      
      That was fine, though crufty, until recently when a change to
      init/Kconfig added a config time check that uses $(NM). On powerpc
      that leads to an infinite loop because Kconfig uses $(NM) to calculate
      some values, then the powerpc Makefile changes $(NM), which Kconfig
      notices and restarts.
      
      The original commit that added --synthetic simply said:
        On new toolchains we need to use nm --synthetic or we miss code
        symbols.
      
      And the nm man page says that the --synthetic option causes nm to:
        Include synthetic symbols in the output. These are special symbols
        created by the linker for various purposes.
      
      So it seems safe to always pass --synthetic if nm supports it, ie. on
      32-bit and 64-bit, it just means 32-bit kernels might have more
      symbols reported (and in practice I see no extra symbols). Making it
      unconditional avoids the #ifdef CONFIG_PPC64, which in turn avoids the
      infinite loop.
      Debugged-by: default avatarPeter Collingbourne <pcc@google.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      117acf5c
  4. 15 Aug, 2019 1 commit
  5. 14 Aug, 2019 2 commits
    • Kees Cook's avatar
      arm64/efi: Move variable assignments after SECTIONS · 90776dd1
      Kees Cook authored
      It seems that LLVM's linker does not correctly handle variable assignments
      involving section positions that are updated during the SECTIONS
      parsing. Commit aa69fb62 ("arm64/efi: Mark __efistub_stext_offset as
      an absolute symbol explicitly") ran into this too, but found a different
      workaround.
      
      However, this was not enough, as other variables were also miscalculated
      which manifested as boot failures under UEFI where __efistub__end was
      not taking the correct _end value (they should be the same):
      
      $ ld.lld -EL -maarch64elf --no-undefined -X -shared \
      	-Bsymbolic -z notext -z norelro --no-apply-dynamic-relocs \
      	-o vmlinux.lld -T poc.lds --whole-archive vmlinux.o && \
        readelf -Ws vmlinux.lld | egrep '\b(__efistub_|)_end\b'
      368272: ffff000002218000     0 NOTYPE  LOCAL  HIDDEN    38 __efistub__end
      368322: ffff000012318000     0 NOTYPE  GLOBAL DEFAULT   38 _end
      
      $ aarch64-linux-gnu-ld.bfd -EL -maarch64elf --no-undefined -X -shared \
      	-Bsymbolic -z notext -z norelro --no-apply-dynamic-relocs \
      	-o vmlinux.bfd -T poc.lds --whole-archive vmlinux.o && \
        readelf -Ws vmlinux.bfd | egrep '\b(__efistub_|)_end\b'
      338124: ffff000012318000     0 NOTYPE  LOCAL  DEFAULT  ABS __efistub__end
      383812: ffff000012318000     0 NOTYPE  GLOBAL DEFAULT 15325 _end
      
      To work around this, all of the __efistub_-prefixed variable assignments
      need to be moved after the linker script's SECTIONS entry. As it turns
      out, this also solves the problem fixed in commit aa69fb62, so those
      changes are reverted here.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/634
      Link: https://bugs.llvm.org/show_bug.cgi?id=42990Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      90776dd1
    • Mark Brown's avatar
      arm64: Clarify when cpu_enable() is called · 38d16667
      Mark Brown authored
      Strengthen the wording in the documentation for cpu_enable() to make it
      more obvious to readers not already familiar with the code when the core
      will call this callback and that this is intentional.
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      [will: minor tweak to emphasis in the comment]
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      38d16667
  6. 13 Aug, 2019 4 commits
  7. 07 Aug, 2019 4 commits
    • Julien Grall's avatar
      arm64/ptrace: Fix typoes in sve_set() comment · 08f103b9
      Julien Grall authored
      The ptrace trace SVE flags are prefixed with SVE_PT_*. Update the
      comment accordingly.
      Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
      Signed-off-by: default avatarJulien Grall <julien.grall@arm.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      08f103b9
    • Miles Chen's avatar
      arm64: mm: print hexadecimal EC value in mem_abort_decode() · 2951d5ef
      Miles Chen authored
      This change prints the hexadecimal EC value in mem_abort_decode(),
      which makes it easier to lookup the corresponding EC in
      the ARM Architecture Reference Manual.
      
      The commit 1f9b8936 ("arm64: Decode information from ESR upon mem
      faults") prints useful information when memory abort occurs. It would
      be easier to lookup "0x25" instead of "DABT" in the document. Then we
      can check the corresponding ISS.
      
      For example:
      Current	info	  	Document
      		  	EC	Exception class
      "CP15 MCR/MRC"		0x3	"MCR or MRC access to CP15a..."
      "ASIMD"			0x7	"Access to SIMD or floating-point..."
      "DABT (current EL)" 	0x25	"Data Abort taken without..."
      ...
      
      Before:
      Unable to handle kernel paging request at virtual address 000000000000c000
      Mem abort info:
        ESR = 0x96000046
        Exception class = DABT (current EL), IL = 32 bits
        SET = 0, FnV = 0
        EA = 0, S1PTW = 0
      Data abort info:
        ISV = 0, ISS = 0x00000046
        CM = 0, WnR = 1
      
      After:
      Unable to handle kernel paging request at virtual address 000000000000c000
      Mem abort info:
        ESR = 0x96000046
        EC = 0x25: DABT (current EL), IL = 32 bits
        SET = 0, FnV = 0
        EA = 0, S1PTW = 0
      Data abort info:
        ISV = 0, ISS = 0x00000046
        CM = 0, WnR = 1
      
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Acked-by: default avatarMark Rutland <Mark.rutland@arm.com>
      Signed-off-by: default avatarMiles Chen <miles.chen@mediatek.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      2951d5ef
    • Qian Cai's avatar
      arm64/prefetch: fix a -Wtype-limits warning · b99286b0
      Qian Cai authored
      The commit d5370f75 ("arm64: prefetch: add alternative pattern for
      CPUs without a prefetcher") introduced MIDR_IS_CPU_MODEL_RANGE() to be
      used in has_no_hw_prefetch() with rv_min=0 which generates a compilation
      warning from GCC,
      
      In file included from ./arch/arm64/include/asm/cache.h:8,
                     from ./include/linux/cache.h:6,
                     from ./include/linux/printk.h:9,
                     from ./include/linux/kernel.h:15,
                     from ./include/linux/cpumask.h:10,
                     from arch/arm64/kernel/cpufeature.c:11:
      arch/arm64/kernel/cpufeature.c: In function 'has_no_hw_prefetch':
      ./arch/arm64/include/asm/cputype.h:59:26: warning: comparison of
      unsigned expression >= 0 is always true [-Wtype-limits]
      _model == (model) && rv >= (rv_min) && rv <= (rv_max);  \
                              ^~
      arch/arm64/kernel/cpufeature.c:889:9: note: in expansion of macro
      'MIDR_IS_CPU_MODEL_RANGE'
      return MIDR_IS_CPU_MODEL_RANGE(midr, MIDR_THUNDERX,
             ^~~~~~~~~~~~~~~~~~~~~~~
      
      Fix it by converting MIDR_IS_CPU_MODEL_RANGE to a static inline
      function.
      Signed-off-by: default avatarQian Cai <cai@lca.pw>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      b99286b0
    • Will Deacon's avatar
      init/Kconfig: Fix infinite Kconfig recursion on PPC · 71c67a31
      Will Deacon authored
      Commit 5cf896fb ("arm64: Add support for relocating the kernel with
      RELR relocations") introduced CONFIG_TOOLS_SUPPORT_RELR, which checks
      for RELR support in the toolchain as part of the kernel configuration.
      During this procedure, "$(NM)" is invoked to see if it supports the new
      relocation format, however PowerPC conditionally overrides this variable
      in the architecture Makefile in order to pass '--synthetic' when
      targetting PPC64.
      
      This conditional override causes Kconfig to recurse forever, since
      CONFIG_TOOLS_SUPPORT_RELR cannot be determined without $(NM) being
      defined, but that in turn depends on CONFIG_PPC64:
      
        $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-
        scripts/kconfig/conf  --syncconfig Kconfig
        scripts/kconfig/conf  --syncconfig Kconfig
        scripts/kconfig/conf  --syncconfig Kconfig
        [...]
      
      In this particular case, it looks like PowerPC may be able to pass
      '--synthetic' unconditionally to nm or even drop it altogether. While
      that is being resolved, let's just bodge the RELR check by picking up
      $(NM) directly from the environment in whatever state it happens to be
      in.
      
      Cc: Peter Collingbourne <pcc@google.com>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Suggested-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      71c67a31
  8. 05 Aug, 2019 14 commits
    • Peter Collingbourne's avatar
      arm64: Add support for relocating the kernel with RELR relocations · 5cf896fb
      Peter Collingbourne authored
      RELR is a relocation packing format for relative relocations.
      The format is described in a generic-abi proposal:
      https://groups.google.com/d/topic/generic-abi/bX460iggiKg/discussion
      
      The LLD linker can be instructed to pack relocations in the RELR
      format by passing the flag --pack-dyn-relocs=relr.
      
      This patch adds a new config option, CONFIG_RELR. Enabling this option
      instructs the linker to pack vmlinux's relative relocations in the RELR
      format, and causes the kernel to apply the relocations at startup along
      with the RELA relocations. RELA relocations still need to be applied
      because the linker will emit RELA relative relocations if they are
      unrepresentable in the RELR format (i.e. address not a multiple of 2).
      
      Enabling CONFIG_RELR reduces the size of a defconfig kernel image
      with CONFIG_RANDOMIZE_BASE by 3.5MB/16% uncompressed, or 550KB/5%
      compressed (lz4).
      Signed-off-by: default avatarPeter Collingbourne <pcc@google.com>
      Tested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      5cf896fb
    • Geert Uytterhoeven's avatar
      arm64: Move TIF_* documentation to individual definitions · 66cbdf5d
      Geert Uytterhoeven authored
      Some TIF_* flags are documented in the comment block at the top, some
      next to their definitions, some in both places.
      
      Move all documentation to the individual definitions for consistency,
      and for easy lookup.
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      66cbdf5d
    • Junhua Huang's avatar
      arm64: mm: free the initrd reserved memblock in a aligned manner · 13776f9d
      Junhua Huang authored
      We should free the initrd reserved memblock in an aligned manner,
      because the initrd reserves the memblock in an aligned manner
      in arm64_memblock_init().
      Otherwise there are some fragments in memblock_reserved regions
      after free_initrd_mem(). e.g.:
      /sys/kernel/debug/memblock # cat reserved
         0: 0x0000000080080000..0x00000000817fafff
         1: 0x0000000083400000..0x0000000083ffffff
         2: 0x0000000090000000..0x000000009000407f
         3: 0x00000000b0000000..0x00000000b000003f
         4: 0x00000000b26184ea..0x00000000b2618fff
      The fragments like the ranges from b0000000 to b000003f and
      from b26184ea to b2618fff should be freed.
      
      And we can do free_reserved_area() after memblock_free(),
      as free_reserved_area() calls __free_pages(), once we've done
      that it could be allocated somewhere else,
      but memblock and iomem still say this is reserved memory.
      
      Fixes: 05c58752 ("arm64: To remove initrd reserved area entry from memblock")
      Signed-off-by: default avatarJunhua Huang <huang.junhua@zte.com.cn>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      13776f9d
    • Will Deacon's avatar
      arm64: io: Relax implicit barriers in default I/O accessors · 22ec7161
      Will Deacon authored
      The arm64 implementation of the default I/O accessors requires barrier
      instructions to satisfy the memory ordering requirements documented in
      memory-barriers.txt [1], which are largely derived from the behaviour of
      I/O accesses on x86.
      
      Of particular interest are the requirements that a write to a device
      must be ordered against prior writes to memory, and a read from a device
      must be ordered against subsequent reads from memory. We satisfy these
      requirements using various flavours of DSB: the most expensive barrier
      we have, since it implies completion of prior accesses. This was deemed
      necessary when we first implemented the accessors, since accesses to
      different endpoints could propagate independently and therefore the only
      way to enforce order is to rely on completion guarantees [2].
      
      Since then, the Armv8 memory model has been retrospectively strengthened
      to require "other-multi-copy atomicity", a property that requires memory
      accesses from an observer to become visible to all other observers
      simultaneously [3]. In other words, propagation of accesses is limited
      to transitioning from locally observed to globally observed. It recently
      became apparent that this change also has a subtle impact on our I/O
      accessors for shared peripherals, allowing us to use the cheaper DMB
      instruction instead.
      
      As a concrete example, consider the following:
      
      	memcpy(dma_buffer, data, bufsz);
      	writel(DMA_START, dev->ctrl_reg);
      
      A DMB ST instruction between the final write to the DMA buffer and the
      write to the control register will ensure that the writes to the DMA
      buffer are observed before the write to the control register by all
      observers. Put another way, if an observer can see the write to the
      control register, it can also see the writes to memory. This has always
      been the case and is not sufficient to provide the ordering required by
      Linux, since there is no guarantee that the master interface of the
      DMA-capable device has observed either of the accesses. However, in an
      other-multi-copy atomic world, we can infer two things:
      
        1. A write arriving at an endpoint shared between multiple CPUs is
           visible to all CPUs
      
        2. A write that is visible to all CPUs is also visible to all other
           observers in the shareability domain
      
      Pieced together, this allows us to use DMB OSHST for our default I/O
      write accessors and DMB OSHLD for our default I/O read accessors (the
      outer-shareability is for handling non-cacheable mappings) for shared
      devices. Memory-mapped, DMA-capable peripherals that are private to a
      CPU (i.e. inaccessible to other CPUs) still require the DSB, however
      these are few and far between and typically require special treatment
      anyway which is outside of the scope of the portable driver API (e.g.
      GIC, page-table walker, SPE profiler).
      
      Note that our mandatory barriers remain as DSBs, since there are cases
      where they are used to flush the store buffer of the CPU, e.g. when
      publishing page table updates to the SMMU.
      
      [1] https://git.kernel.org/linus/4614bbdee357
      [2] https://www.youtube.com/watch?v=i6DayghhA8Q
      [3] https://www.cl.cam.ac.uk/~pes20/armv8-mca/Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      22ec7161
    • Mark Brown's avatar
      arm64: Remove unused cpucap_multi_entry_cap_cpu_enable() · 2f8f180b
      Mark Brown authored
      The function cpucap_multi_entry_cap_cpu_enable() is unused, remove it to
      avoid any confusion reading the code and potential for bit rot.
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      2f8f180b
    • Will Deacon's avatar
      arm64: sysreg: Remove unused and rotting SCTLR_ELx field definitions · 73961dc1
      Will Deacon authored
      Our SCTLR_ELx field definitions are somewhat over-engineered in that
      they carefully define masks describing the RES0/RES1 bits and then use
      these to construct further masks representing bits to be set/cleared for
      the _EL1 and _EL2 registers.
      
      However, most of the resulting definitions aren't actually used by
      anybody and have subsequently started to bit-rot when new fields have
      been added by the architecture, resulting in fields being part of the
      RES0 mask despite being defined and used elsewhere.
      
      Rather than fix up these masks, simply remove the unused parts entirely
      so that we can drop the maintenance burden. We can always add things
      back if we need them in the future.
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      73961dc1
    • Will Deacon's avatar
      arm64: esr: Add ESR exception class encoding for trapped ERET · 332e5281
      Will Deacon authored
      The ESR.EC encoding of 0b011010 (0x1a) describes an exception generated
      by an ERET, ERETAA or ERETAB instruction as a result of a nested
      virtualisation trap to EL2.
      
      Add an encoding for this EC and a string description so that we identify
      it correctly if we take one unexpectedly.
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarMarc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      332e5281
    • Chuhong Yuan's avatar
      arm64: Replace strncmp with str_has_prefix · b3e089cd
      Chuhong Yuan authored
      In commit b6b27355
      ("tracing: Use str_has_prefix() instead of using fixed sizes")
      the newly introduced str_has_prefix() was used
      to replace error-prone strncmp(str, const, len).
      Here fix codes with the same pattern.
      Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      b3e089cd
    • Lorenzo Pieralisi's avatar
      ACPI/IORT: Rename arm_smmu_v3_set_proximity() 'node' local variable · 3e77eeb7
      Lorenzo Pieralisi authored
      Commit 36a2ba07 ("ACPI/IORT: Reject platform device creation on NUMA
      node mapping failure") introduced a local variable 'node' in
      arm_smmu_v3_set_proximity() that shadows the struct acpi_iort_node
      pointer function parameter.
      
      Execution was unaffected but it is prone to errors and can lead
      to subtle bugs.
      
      Rename the local variable to prevent any issue.
      Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
      Reported-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Hanjun Guo <guohanjun@huawei.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      3e77eeb7
    • Masahiro Yamada's avatar
      arm64: remove unneeded uapi/asm/stat.h · b717480f
      Masahiro Yamada authored
      stat.h is listed in include/uapi/asm-generic/Kbuild, so Kbuild will
      automatically generate it.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      b717480f
    • Bhupesh Sharma's avatar
      arm64/kexec: Use consistent convention of initializing 'kxec_buf.mem' with KEXEC_BUF_MEM_UNKNOWN · c19d050f
      Bhupesh Sharma authored
      With commit b6664ba4 ("s390, kexec_file: drop arch_kexec_mem_walk()"),
      we introduced the KEXEC_BUF_MEM_UNKNOWN macro. If kexec_buf.mem is set
      to this value, kexec_locate_mem_hole() will try to allocate free memory.
      
      While other arch(s) like s390 and x86_64 already use this macro to
      initialize kexec_buf.mem with, arm64 uses an equivalent value of 0.
      Replace it with KEXEC_BUF_MEM_UNKNOWN, to keep the convention of
      initializing 'kxec_buf.mem' consistent across various archs.
      
      Cc: takahiro.akashi@linaro.org
      Cc: james.morse@arm.com
      Reviewed-by: default avatarMatthias Brugger <mbrugger@suse.com>
      Signed-off-by: default avatarBhupesh Sharma <bhsharma@redhat.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      c19d050f
    • Mark Rutland's avatar
      arm64: remove pointless __KERNEL__ guards · b907b80d
      Mark Rutland authored
      For a number of years, UAPI headers have been split from kernel-internal
      headers. The latter are never exposed to userspace, and always built
      with __KERNEL__ defined.
      
      Most headers under arch/arm64 don't have __KERNEL__ guards, but there
      are a few stragglers lying around. To make things more consistent, and
      to set a good example going forward, let's remove these redundant
      __KERNEL__ guards.
      
      In a couple of cases, a trailing #endif lacked a comment describing its
      corresponding #if or #ifdef, so these are fixes up at the same time.
      
      Guards in auto-generated crypto code are left as-is, as these guards are
      generated by scripting imported from the upstream openssl project
      scripts. Guards in UAPI headers are left as-is, as these can be included
      by userspace or the kernel.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      b907b80d
    • Julien Thierry's avatar
      arm64: Remove unused assembly macro · c8785794
      Julien Thierry authored
      As of commit 4141c857 ("arm64: convert
      raw syscall invocation to C"), moving syscall handling from assembly to
      C, the macro mask_nospec64 is no longer referenced.
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarJulien Thierry <julien.thierry@arm.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      c8785794
    • Linus Torvalds's avatar
      Linux 5.3-rc3 · e21a712a
      Linus Torvalds authored
      e21a712a
  9. 04 Aug, 2019 10 commits