Skip to content

Commit a2aeaea

Browse files
committed
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
2 parents f66062c + 35b6b28 commit a2aeaea

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

Documentation/arm64/pointer-authentication.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,10 @@ The number of bits that the PAC occupies in a pointer is 55 minus the
5353
virtual address size configured by the kernel. For example, with a
5454
virtual address size of 48, the PAC is 7 bits wide.
5555

56-
Recent versions of GCC can compile code with APIAKey-based return
57-
address protection when passed the -msign-return-address option. This
58-
uses instructions in the HINT space (unless -march=armv8.3-a or higher
59-
is also passed), and such code can run on systems without the pointer
60-
authentication extension.
56+
When ARM64_PTR_AUTH_KERNEL is selected, the kernel will be compiled
57+
with HINT space pointer authentication instructions protecting
58+
function returns. Kernels built with this option will work on hardware
59+
with or without pointer authentication support.
6160

6261
In addition to exec(), keys can also be reinitialized to random values
6362
using the PR_PAC_RESET_KEYS prctl. A bitmask of PR_PAC_APIAKEY,

arch/arm64/kernel/entry-ftrace.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,17 @@
7777
.endm
7878

7979
SYM_CODE_START(ftrace_regs_caller)
80+
#ifdef BTI_C
81+
BTI_C
82+
#endif
8083
ftrace_regs_entry 1
8184
b ftrace_common
8285
SYM_CODE_END(ftrace_regs_caller)
8386

8487
SYM_CODE_START(ftrace_caller)
88+
#ifdef BTI_C
89+
BTI_C
90+
#endif
8591
ftrace_regs_entry 0
8692
b ftrace_common
8793
SYM_CODE_END(ftrace_caller)

arch/arm64/kernel/machine_kexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ int machine_kexec_post_load(struct kimage *kimage)
147147
if (rc)
148148
return rc;
149149
kimage->arch.ttbr1 = __pa(trans_pgd);
150-
kimage->arch.zero_page = __pa(empty_zero_page);
150+
kimage->arch.zero_page = __pa_symbol(empty_zero_page);
151151

152152
reloc_size = __relocate_new_kernel_end - __relocate_new_kernel_start;
153153
memcpy(reloc_code, __relocate_new_kernel_start, reloc_size);

0 commit comments

Comments
 (0)