Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423180AbbD2Oma (ORCPT ); Wed, 29 Apr 2015 10:42:30 -0400 Received: from www62.your-server.de ([213.133.104.62]:53807 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031308AbbD2Om1 (ORCPT ); Wed, 29 Apr 2015 10:42:27 -0400 From: Daniel Borkmann To: hpa@linux.intel.com Cc: linux-kernel@vger.kernel.org, Daniel Borkmann , Pranith Kumar , Ingo Molnar , mancha security Subject: [PATCH] compiler-intel: fix wrong compiler barrier() macro Date: Wed, 29 Apr 2015 16:42:19 +0200 Message-Id: X-Mailer: git-send-email 1.9.3 X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1840 Lines: 50 Cleanup commit 23ebdedc67e ("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, meaning, the actual barrier() macro from compiler-gcc.h with inline asm is still in place when __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 Cc: Pranith Kumar Cc: H. Peter Anvin Cc: Ingo Molnar Cc: mancha security --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/