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: <20080411050019.GC27073@phobos.i.cabal.ca>
Date:	Fri, 11 Apr 2008 01:00:20 -0400
From:	Kyle McMartin <kyle@...artin.ca>
To:	torvalds@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, roland@...hat.com
Subject: [PATCH] reorganize <linux/linkage.h>

Commit 54a015104136974262afa4b8ddd943ea70dec8a2 adds some new magic
asmlinkage_protect gizmo, but that can only be used from C code, not
assembly. Protect relevant bits of <linux/linkage.h> with !__ASSEMBLY__
so this can't leak into assembly source.

Fixes a couple build errors on my boxes,
  AS      arch/parisc/kernel/pacache.o
In file included from arch/parisc/kernel/pacache.S:40:
include/linux/linkage.h:34: error: syntax error in macro parameter list
make[1]: *** [arch/parisc/kernel/pacache.o] Error 1

(__ALIGN gets used in both kernel and assembly context, so make sure it
is outside of the ifdeffery.)

Signed-off-by: Kyle McMartin <kmcmartin@...hat.com>
---
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index b163c5c..e848f74 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -3,6 +3,13 @@
 
 #include <asm/linkage.h>
 
+#ifndef __ALIGN
+#define __ALIGN		.align 4,0x90
+#define __ALIGN_STR	".align 4,0x90"
+#endif
+
+#if !defined(__ASSEMBLY__)
+
 #ifdef __cplusplus
 #define CPP_ASMLINKAGE extern "C"
 #else
@@ -34,12 +41,11 @@
 # define asmlinkage_protect(n, ret, args...)	do { } while (0)
 #endif
 
-#ifndef __ALIGN
-#define __ALIGN		.align 4,0x90
-#define __ALIGN_STR	".align 4,0x90"
-#endif
+#define NORET_TYPE    /**/
+#define ATTRIB_NORET  __attribute__((noreturn))
+#define NORET_AND     noreturn,
 
-#ifdef __ASSEMBLY__
+#else
 
 #define ALIGN __ALIGN
 #define ALIGN_STR __ALIGN_STR
@@ -80,10 +86,6 @@
   END(name)
 #endif
 
-#endif
-
-#define NORET_TYPE    /**/
-#define ATTRIB_NORET  __attribute__((noreturn))
-#define NORET_AND     noreturn,
+#endif /*__ASSEMBLY__*/
 
 #endif
--
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