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>] [day] [month] [year] [list]
Date:	Sun, 5 May 2013 23:31:18 +0200
From:	Helge Deller <deller@....de>
To:	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	linux-parisc@...r.kernel.org,
	linux-security-module@...r.kernel.org, dhowells@...hat.com
Subject: [PATCH] kernel/modsign_certificate.S: fix build on parisc
 architecture

Module signing functionality breaks the kernel build on parisc with the
following error: 

kernel/built-in.o: In function `load_module_signing_keys':
kernel/modsign_pubkey.c:67: undefined reference to `modsign_certificate_list_end'
kernel/modsign_pubkey.c:66: undefined reference to `modsign_certificate_list'
make[3]: *** [vmlinux] Error 1

The reason why the build fails is because on parisc assembly syntax is
different than on other architectures. Most importantly, a semicolon
marks the start of a comment, while exclamation marks separates
statements.

Currently the GLOBAL(name) macro uses a semicolon to separate the .globl
and the ASM_SYMBOL() statements. On PA-RISC the semicolon will now just
strip the ASM_SYMBOL() statements since it thinks it is a comment and as
such the modsign_certificate_list/modsign_certificate_list_end symbols
will not get defined and will not be in the vmlinux binary.

Fix this problem by adding an own implementation for GLOBAL() on the
PARISC architecture.

Signed-off-by: Helge Deller <deller@....de>

diff --git a/kernel/modsign_certificate.S b/kernel/modsign_certificate.S
index 246b4c6..9b9c2ab 100644
--- a/kernel/modsign_certificate.S
+++ b/kernel/modsign_certificate.S
@@ -7,9 +7,17 @@
 #define ASM_SYMBOL(sym) PASTE(SYMBOL_PREFIX, sym)
 #endif
 
-#define GLOBAL(name)	\
-	.globl ASM_SYMBOL(name);	\
+#if defined(__hppa__)
+ /* HPPA/PA-RISC assembly is special: comments start with semicolon
+  * and exclamation marks separates statements. */
+ #define GLOBAL(name)	\
+	.globl ASM_SYMBOL(name) ! \
 	ASM_SYMBOL(name):
+#else
+ #define GLOBAL(name)	\
+	.globl ASM_SYMBOL(name) ; \
+	ASM_SYMBOL(name):
+#endif
 
 	.section ".init.data","aw"
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ