lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211115064128.9896-1-rdunlap@infradead.org>
Date:   Sun, 14 Nov 2021 22:41:28 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     linux-kernel@...r.kernel.org
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>, linux-sh@...r.kernel.org,
        Paul Mundt <lethal@...ux-sh.org>
Subject: [PATCH 1/2] sh: mcount.S: fix build error when PRINTK is not enabled

Fix a build error in mcount.S when CONFIG_PRINTK is not enabled.
Fixes this build error:

sh2-linux-ld: arch/sh/lib/mcount.o: in function `stack_panic':
(.text+0xec): undefined reference to `dump_stack'

Fixes: e460ab27b6c3e ("sh: Fix up stack overflow check with ftrace disabled.")
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Cc: Rich Felker <dalias@...c.org>
Cc: linux-sh@...r.kernel.org
Cc: Paul Mundt <lethal@...ux-sh.org>
---
Possibly even more of this function should conditionally not be built...

 arch/sh/lib/mcount.S |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20211112.orig/arch/sh/lib/mcount.S
+++ linux-next-20211112/arch/sh/lib/mcount.S
@@ -257,9 +257,11 @@ return_to_handler:
 #ifdef CONFIG_STACK_DEBUG
 	.globl	stack_panic
 stack_panic:
+#ifdef CONFIG_PRINTK
 	mov.l	.Ldump_stack, r0
 	jsr	@r0
 	 nop
+#endif
 
 	mov.l	.Lpanic, r0
 	jsr	@r0
@@ -277,8 +279,10 @@ stack_panic:
 	.long	panic
 .Lpanic_s:
 	.long	.Lpanic_str
+#ifdef CONFIG_PRINTK
 .Ldump_stack:
 	.long	dump_stack
+#endif
 
 	.section	.rodata
 	.align 2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ