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]
Date:	Wed, 1 May 2013 22:04:17 +0100
From:	James Hogan <james.hogan@...tec.com>
To:	<torvalds@...ux-foundation.org>
CC:	<linux-kernel@...r.kernel.org>,
	James Hogan <james.hogan@...tec.com>,
	"Al Viro" <viro@...iv.linux.org.uk>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Mike Frysinger <vapier@...too.org>,
	<uclinux-dist-devel@...ckfin.uclinux.org>
Subject: [PATCH] linkage.h: fix build breakage due to symbol prefix handling

Al's commit e1b5bb6d1236d4ad2084c53aa83dde7cdf6f8eea ("consolidate
cond_syscall and SYSCALL_ALIAS declarations") broke the build on
blackfin and metag due to the following code:

  #ifndef SYMBOL_NAME
  #ifdef CONFIG_SYMBOL_PREFIX
  #define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x
  #else
  #define SYMBOL_NAME(x) x
  #endif
  #endif
  #define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x))

__stringify literally stringifies CONFIG_SYMBOL_PREFIX ##x, so you get
lines like this in kernel/sys_ni.s:

  .weak CONFIG_SYMBOL_PREFIXsys_quotactl
  .set CONFIG_SYMBOL_PREFIXsys_quotactl,CONFIG_SYMBOL_PREFIXsys_ni_syscall

The patches in Rusty's modules-next tree such as "CONFIG_SYMBOL_PREFIX:
cleanup." clean up the whole mess around symbol prefixes, so this patch
just attempts to fix the build in the mean time. The intermediate
definition of SYMBOL_NAME above isn't used and is incorrect when
CONFIG_SYMBOL_PREFIX is defined as CONFIG_SYMBOL_PREFIX is a quoted
string literal, so define __SYMBOL_NAME directly depending on
CONFIG_SYMBOL_PREFIX.

Signed-off-by: James Hogan <james.hogan@...tec.com>
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Mike Frysinger <vapier@...too.org>
Cc: uclinux-dist-devel@...ckfin.uclinux.org
---
 include/linux/linkage.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 829d66c..de09dec 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -15,14 +15,11 @@
 #define asmlinkage CPP_ASMLINKAGE
 #endif
 
-#ifndef SYMBOL_NAME
 #ifdef CONFIG_SYMBOL_PREFIX
-#define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x
+#define __SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX __stringify(x)
 #else
-#define SYMBOL_NAME(x) x
+#define __SYMBOL_NAME(x) __stringify(x)
 #endif
-#endif
-#define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x))
 
 #ifndef cond_syscall
 #define cond_syscall(x) asm(".weak\t" __SYMBOL_NAME(x) \
-- 
1.8.1.2


--
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