[<prev] [next>] [day] [month] [year] [list]
Message-Id: <3c0951961cddae824af45c989159d857dc995002.1432082622.git.daniel@iogearbox.net>
Date: Wed, 20 May 2015 02:53:52 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>,
Pranith Kumar <bobby.prani@...il.com>,
"H. Peter Anvin" <hpa@...or.com>,
mancha security <mancha1@...o.com>
Subject: [PATCH akpm] compiler-intel: fix wrong compiler barrier() macro
Cleanup commit 73679e508201 ("compiler-intel.h: Remove duplicate
definition") removed the double definition of __memory_barrier()
intrinsics.
However, in doing so, it also removed the preceding #undef barrier
by accident, meaning, the actual barrier() macro from compiler-gcc.h
with inline asm is still in place as __GNUC__ is provided.
Subsequently, barrier() can never be defined as __memory_barrier()
from compiler.h since it already has a definition in place and if
we trust the comment in compiler-intel.h, ecc doesn't support gcc
specific asm statements.
I don't have an ecc at hand (unsure if that's still used in the
field?) and only found this by accident during code review, a revert
of that cleanup would be simplest option.
Fixes: 73679e508201 ("compiler-intel.h: Remove duplicate definition")
Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
Reviewed-by: Pranith Kumar <bobby.prani@...il.com>
Cc: Pranith Kumar <bobby.prani@...il.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: mancha security <mancha1@...o.com>
---
Only resending fix for Andrew's tree, rebased.
include/linux/compiler-intel.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h
index 0c9a2f2..d4c7113 100644
--- a/include/linux/compiler-intel.h
+++ b/include/linux/compiler-intel.h
@@ -13,10 +13,12 @@
/* Intel ECC compiler doesn't support gcc specific asm stmts.
* It uses intrinsics to do the equivalent things.
*/
+#undef barrier
#undef barrier_data
#undef RELOC_HIDE
#undef OPTIMIZER_HIDE_VAR
+#define barrier() __memory_barrier()
#define barrier_data(ptr) barrier()
#define RELOC_HIDE(ptr, off) \
--
1.9.3
--
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