Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754746Ab2BBQ2d (ORCPT ); Thu, 2 Feb 2012 11:28:33 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57413 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946Ab2BBQ2c (ORCPT ); Thu, 2 Feb 2012 11:28:32 -0500 Date: Thu, 2 Feb 2012 17:28:30 +0100 (CET) From: Michael Matz To: Aldy Hernandez Cc: Linus Torvalds , Jakub Jelinek , Torvald Riegel , Jan Kara , LKML , linux-ia64@vger.kernel.org, dsterba@suse.cz, ptesarik@suse.cz, rguenther@suse.de, gcc@gcc.gnu.org Subject: Re: Memory corruption due to word sharing In-Reply-To: <874nv9qlau.fsf@houston.quesejoda.com> Message-ID: References: <20120201151918.GC16714@quack.suse.cz> <1328118174.15992.6206.camel@triegel.csb> <20120201194025.GG6148@sunsite.ms.mff.cuni.cz> <20120201201631.GW18768@tyan-ft48-01.lab.bos.redhat.com> <874nv9qlau.fsf@houston.quesejoda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 718 Lines: 23 Hi, On Thu, 2 Feb 2012, Aldy Hernandez wrote: > > Seriously - is there any real argument *against* just using the base > > type as a hint for access size? > > If I'm on the hook for attempting to fix this again, I'd also like to > know if there are any arguments against using the base type. Sure. Simplest example: struct s {int i:24;} __attribute__((packed)). You must access only three bytes, no matter what. The basetype (int) is four bytes. Ciao, Michael. -- 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/