Commit a2aeaeab authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:
 "Three arm64 fixes for -rc4.

  One of them is just a trivial documentation fix, whereas the other two
  address a warning in the kexec code and a crash in ftrace on systems
  implementing BTI.

  The latter patch has a couple of ugly ifdefs which Mark plans to clean
  up separately, but as-is the patch is straightforward for backporting
  to stable kernels.

  Summary:

   - Add missing BTI landing instructions to the ftrace*_caller
     trampolines

   - Fix kexec() WARN when DEBUG_VIRTUAL is enabled

   - Fix PAC documentation by removing stale references to compiler
     flags"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: ftrace: add missing BTIs
  arm64: kexec: use __pa_symbol(empty_zero_page)
  arm64: update PAC description for kernel
parents f66062c7 35b6b28e
...@@ -53,11 +53,10 @@ The number of bits that the PAC occupies in a pointer is 55 minus the ...@@ -53,11 +53,10 @@ The number of bits that the PAC occupies in a pointer is 55 minus the
virtual address size configured by the kernel. For example, with a virtual address size configured by the kernel. For example, with a
virtual address size of 48, the PAC is 7 bits wide. virtual address size of 48, the PAC is 7 bits wide.
Recent versions of GCC can compile code with APIAKey-based return When ARM64_PTR_AUTH_KERNEL is selected, the kernel will be compiled
address protection when passed the -msign-return-address option. This with HINT space pointer authentication instructions protecting
uses instructions in the HINT space (unless -march=armv8.3-a or higher function returns. Kernels built with this option will work on hardware
is also passed), and such code can run on systems without the pointer with or without pointer authentication support.
authentication extension.
In addition to exec(), keys can also be reinitialized to random values In addition to exec(), keys can also be reinitialized to random values
using the PR_PAC_RESET_KEYS prctl. A bitmask of PR_PAC_APIAKEY, using the PR_PAC_RESET_KEYS prctl. A bitmask of PR_PAC_APIAKEY,
......
...@@ -77,11 +77,17 @@ ...@@ -77,11 +77,17 @@
.endm .endm
SYM_CODE_START(ftrace_regs_caller) SYM_CODE_START(ftrace_regs_caller)
#ifdef BTI_C
BTI_C
#endif
ftrace_regs_entry 1 ftrace_regs_entry 1
b ftrace_common b ftrace_common
SYM_CODE_END(ftrace_regs_caller) SYM_CODE_END(ftrace_regs_caller)
SYM_CODE_START(ftrace_caller) SYM_CODE_START(ftrace_caller)
#ifdef BTI_C
BTI_C
#endif
ftrace_regs_entry 0 ftrace_regs_entry 0
b ftrace_common b ftrace_common
SYM_CODE_END(ftrace_caller) SYM_CODE_END(ftrace_caller)
......
...@@ -147,7 +147,7 @@ int machine_kexec_post_load(struct kimage *kimage) ...@@ -147,7 +147,7 @@ int machine_kexec_post_load(struct kimage *kimage)
if (rc) if (rc)
return rc; return rc;
kimage->arch.ttbr1 = __pa(trans_pgd); kimage->arch.ttbr1 = __pa(trans_pgd);
kimage->arch.zero_page = __pa(empty_zero_page); kimage->arch.zero_page = __pa_symbol(empty_zero_page);
reloc_size = __relocate_new_kernel_end - __relocate_new_kernel_start; reloc_size = __relocate_new_kernel_end - __relocate_new_kernel_start;
memcpy(reloc_code, __relocate_new_kernel_start, reloc_size); memcpy(reloc_code, __relocate_new_kernel_start, reloc_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment