From 95e1ca79d814998877462707f8789b1094d627da Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 5 Aug 2020 16:35:51 +0200 Subject: [PATCH] 4.14-stable patches added patches: arm-8702-1-head-common.s-clear-lr-before-jumping-to-start_kernel.patch --- ...ar-lr-before-jumping-to-start_kernel.patch | 45 +++++++++++++++++++ queue-4.14/series | 1 + 2 files changed, 46 insertions(+) create mode 100644 queue-4.14/arm-8702-1-head-common.s-clear-lr-before-jumping-to-start_kernel.patch diff --git a/queue-4.14/arm-8702-1-head-common.s-clear-lr-before-jumping-to-start_kernel.patch b/queue-4.14/arm-8702-1-head-common.s-clear-lr-before-jumping-to-start_kernel.patch new file mode 100644 index 00000000000..405a6addb4a --- /dev/null +++ b/queue-4.14/arm-8702-1-head-common.s-clear-lr-before-jumping-to-start_kernel.patch @@ -0,0 +1,45 @@ +From 59b6359dd92d18f5dc04b14a4c926fa08ab66f7c Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Tue, 3 Oct 2017 19:14:38 +0100 +Subject: ARM: 8702/1: head-common.S: Clear lr before jumping to start_kernel() + +From: Geert Uytterhoeven + +commit 59b6359dd92d18f5dc04b14a4c926fa08ab66f7c upstream. + +If CONFIG_DEBUG_LOCK_ALLOC=y, the kernel log is spammed with a few +hundred identical messages: + + unwind: Unknown symbol address c0800300 + unwind: Index not found c0800300 + +c0800300 is the return address from the last subroutine call (to +__memzero()) in __mmap_switched(). Apparently having this address in +the link register confuses the unwinder. + +To fix this, reset the link register to zero before jumping to +start_kernel(). + +Fixes: 9520b1a1b5f7a348 ("ARM: head-common.S: speed up startup code") +Suggested-by: Ard Biesheuvel +Signed-off-by: Geert Uytterhoeven +Acked-by: Nicolas Pitre +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +Signed-off-by: Nick Desaulniers + +--- + arch/arm/kernel/head-common.S | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/kernel/head-common.S ++++ b/arch/arm/kernel/head-common.S +@@ -101,6 +101,7 @@ __mmap_switched: + str r2, [r6] @ Save atags pointer + cmp r7, #0 + strne r0, [r7] @ Save control register values ++ mov lr, #0 + b start_kernel + ENDPROC(__mmap_switched) + diff --git a/queue-4.14/series b/queue-4.14/series index aca1e7a717d..ffb8c559293 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -5,3 +5,4 @@ random-fix-circular-include-dependency-on-arm64-after-addition-of-percpu.h.patch random32-remove-net_rand_state-from-the-latent-entropy-gcc-plugin.patch random32-move-the-pseudo-random-32-bit-definitions-to-prandom.h.patch ext4-fix-direct-i-o-read-error.patch +arm-8702-1-head-common.s-clear-lr-before-jumping-to-start_kernel.patch -- 2.47.3