Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754522Ab2BBJ35 (ORCPT ); Thu, 2 Feb 2012 04:29:57 -0500 Received: from esgaroth.petrovitsch.at ([78.47.184.11]:6096 "EHLO esgaroth.petrovitsch.priv.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754069Ab2BBJ3z (ORCPT ); Thu, 2 Feb 2012 04:29:55 -0500 X-DKIM: Sendmail DKIM Filter v2.8.3 unknown-host q129SfjO013928 Subject: RE: Memory corruption due to word sharing From: Bernd Petrovitsch To: "Boehm, Hans" Cc: Linus Torvalds , Torvald Riegel , Jan Kara , LKML , "linux-ia64@vger.kernel.org" , "dsterba@suse.cz" , "ptesarik@suse.cz" , "rguenther@suse.de" , "gcc@gcc.gnu.org" Date: Thu, 02 Feb 2012 10:28:42 +0100 In-Reply-To: References: <20120201151918.GC16714@quack.suse.cz> <1328118174.15992.6206.camel@triegel.csb> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.3 (3.0.3-1.fc15) Content-Transfer-Encoding: 7bit Message-ID: <1328174924.12177.17.camel@thorin> Mime-Version: 1.0 X-DCC-wuwien-Metrics: esgaroth.petrovitsch.priv.at; whitelist Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1085 Lines: 26 On Mit, 2012-02-01 at 21:04 +0000, Boehm, Hans wrote: [...] > The C11 memory model potentially adds overhead in only two cases: > > 1. When current code involves touching a field that wouldn't otherwise > be touched. There are odd cases in which this measurably slows down > code, but I think all agree that we need it. In addition to > bitfields, it can affect speculatively promoting a value to a register > in a loop, which at least older versions of gcc also do. Just adding an -f option for this and/or activating it only for -O5 (or whatever the highest level is) and - in case that feature is activated - emit warnings if bitfields (and/or any other data types that might be affected)? Kind regards, Bernd -- Bernd Petrovitsch Email : bernd@petrovitsch.priv.at LUGA : http://www.luga.at -- 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/