linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: geert+renesas@glider.be (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: head-common.S: Clear lr before jumping to start_kernel()
Date: Tue,  3 Oct 2017 17:23:04 +0200	[thread overview]
Message-ID: <1507044184-27152-1-git-send-email-geert+renesas@glider.be> (raw)

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 <ard.biesheuvel@linaro.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Commit 9520b1a1b5f7a348 is in arm/for-next.

 arch/arm/kernel/head-common.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index a25027b87a6024b9..21dde771a7dd8d14 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -114,6 +114,7 @@ __mmap_switched:
 	str	r8, [r2]			@ Save atags pointer
 	cmp	r3, #0
 	strne	r10, [r3]			@ Save control register values
+	mov	lr, #0
 	b	start_kernel
 ENDPROC(__mmap_switched)
 
-- 
2.7.4

             reply	other threads:[~2017-10-03 15:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 15:23 Geert Uytterhoeven [this message]
2017-10-03 15:37 ` [PATCH] ARM: head-common.S: Clear lr before jumping to start_kernel() Nicolas Pitre
2017-10-03 18:11   ` Geert Uytterhoeven
2017-10-03 18:15     ` Geert Uytterhoeven
2017-10-03 18:15       ` Geert Uytterhoeven
2017-10-10 20:33         ` Tony Lindgren
2017-10-12 10:23           ` Russell King - ARM Linux
2017-10-12 12:34             ` Geert Uytterhoeven
2017-10-12 15:25             ` Nicolas Pitre
2017-10-14 14:14               ` Russell King - ARM Linux
2017-10-14 14:17                 ` Russell King - ARM Linux
2017-10-14 15:49                   ` Nicolas Pitre
2017-10-14 18:20                     ` Russell King - ARM Linux
2017-10-15  8:04                 ` Geert Uytterhoeven
2017-10-16 12:29                   ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507044184-27152-1-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).