[<prev] [next>] [day] [month] [year] [list]
Message-Id: <7c08c18c742415f32e022c43614a274135e79012.1430387496.git.daniel@iogearbox.net>
Date: Thu, 30 Apr 2015 11:56:32 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: hpa@...ux.intel.com
Cc: linux-kernel@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>,
Pranith Kumar <bobby.prani@...il.com>,
Ingo Molnar <mingo@...nel.org>,
mancha security <mancha1@...o.com>
Subject: [PATCH v2] 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, so a revert of that cleanup would be
the safest option, imho, as it has been like this since pre git
times.
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@...ux.intel.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: mancha security <mancha1@...o.com>
---
v1->v2:
- fixed the wrong commit hash in 1st occurence of commit msg
- rest as is, also kept Pranith's Reviewed-by tag
include/linux/compiler-intel.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h
index ba147a1..5529c52 100644
--- a/include/linux/compiler-intel.h
+++ b/include/linux/compiler-intel.h
@@ -13,9 +13,12 @@
/* Intel ECC compiler doesn't support gcc specific asm stmts.
* It uses intrinsics to do the equivalent things.
*/
+#undef barrier
#undef RELOC_HIDE
#undef OPTIMIZER_HIDE_VAR
+#define barrier() __memory_barrier()
+
#define RELOC_HIDE(ptr, off) \
({ unsigned long __ptr; \
__ptr = (unsigned long) (ptr); \
--
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