From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4B06C43381 for ; Fri, 22 Mar 2019 16:58:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB94A2190A for ; Fri, 22 Mar 2019 16:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728316AbfCVQ62 (ORCPT ); Fri, 22 Mar 2019 12:58:28 -0400 Received: from mga05.intel.com ([192.55.52.43]:20435 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727058AbfCVQ61 (ORCPT ); Fri, 22 Mar 2019 12:58:27 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2019 09:58:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="133875258" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by fmsmga008.fm.intel.com with ESMTP; 22 Mar 2019 09:58:25 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id CBD29300E46; Fri, 22 Mar 2019 09:58:26 -0700 (PDT) Date: Fri, 22 Mar 2019 09:58:26 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Arnd Bergmann , Andi Kleen , the arch/x86 maintainers , Andrew Morton , Linux Kernel Mailing List , Masahiro Yamada Subject: Re: [PATCH 01/17] kbuild: Disable -Waddress-of-packed-member for gcc 9 Message-ID: <20190322165826.GE24002@tassilo.jf.intel.com> References: <20190321220009.29334-1-andi@firstfloor.org> <20190321220009.29334-2-andi@firstfloor.org> <20190322163954.GG7905@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190322163954.GG7905@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Lol... we're actively moving away from the C standard on many places. Yes and also packed is not part of the C standard. > Why does the silly compiler think it is a problem to take the address of > a member of a packed structure? That sounds like something that's > perfectly fine and useful. Probably because a pointer reference doesn't do whatever magic may be needed on architectures with poor misalignment handling. In theory you would need memcpy(). In practice it's likely a lot of false positives, like the architectures with poor misalignment handling are usually in SOCs without PCI and they don't have the devices with the problematic drivers. -Andi