Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752832Ab0HWCfz (ORCPT ); Sun, 22 Aug 2010 22:35:55 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:55479 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752080Ab0HWCfw (ORCPT ); Sun, 22 Aug 2010 22:35:52 -0400 Date: Sun, 22 Aug 2010 19:36:09 -0700 (PDT) Message-Id: <20100822.193609.35028164.davem@davemloft.net> To: xiaosuo@gmail.com Cc: arnd@arndb.de, eric.dumazet@gmail.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] net: define __packed for the userspace code From: David Miller In-Reply-To: References: <20100822.183624.28802617.davem@davemloft.net> X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1115 Lines: 29 From: Changli Gao Date: Mon, 23 Aug 2010 10:29:49 +0800 > Do you mean that use the __attribute__((packed)) annotation in all of > these files: > > localhost linux # grep "\<__packed\>" usr/include/ -r | uniq > usr/include/linux/if_hippi.h:} __packed; > usr/include/linux/if_fddi.h:} __packed; > usr/include/linux/nbd.h:} __packed; > usr/include/linux/ncp.h:} __packed; > usr/include/linux/rfkill.h:} __packed; > usr/include/linux/if_pppox.h:} __packed; > usr/include/linux/phonet.h:} __packed; > usr/include/linux/ipv6.h:} __packed; /* required for some archs */ > usr/include/linux/ipv6.h:} __packed; > usr/include/linux/if_ether.h:} __packed; It seems so, yes. There is no way that anybody has tried to compile anything in userspace using these headers with the __packed usage there. If they would, they would surely see a compile failure. -- 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/