Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp705491img; Fri, 22 Mar 2019 07:00:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8npmwszUkA9XKzFQq+BW+iy3kZVNeqStPf2lyRpXnHCmSjfiblRBxFolhUdnwM0PAittS X-Received: by 2002:a63:5415:: with SMTP id i21mr9043247pgb.106.1553263202583; Fri, 22 Mar 2019 07:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553263202; cv=none; d=google.com; s=arc-20160816; b=TN/wRQ1HNkijuVZPf9rgThcc3J8RUseNUOOLnLvELZHUzuBbJamWHhRLd/AndIB99k /K7yc8ajM1WOW/B0jOLTTd6saQ5DHV7ImlTM7kCwAysHDEu1UpjqyKqHCJa8Z/wYp7gU hOENBQkwQNLHsFAutOgqPkQhbNX7GG79ZDQMNDBZR9QTLUSkBiflQh0XLqU7EwIsKrSE vd73ZNyyhF3W3rwuyfvLANysnhlP4MMJ7FNEFuOCRwult8xsewEWiRm0eXpXVG/R/Phw jT3UIvqIkPC1v1QCSKEqdQVdR6l/nUT8/ZHDWQVox8jc8vD6Ozp3fCzOGEf0zZwpunWh kCww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=YJDxHNaqkaKZ9MORW/0o5+vv/jLbHGCobfTlqfu+2pM=; b=jyYT3SYr12bYb8lC+UR/9gCscyZR62gOGSXfzUJ14aO8T7XIhE2Bal5grS/qLClKxg T0DxHM+m7BOcFox0et6qFFkBqtVo3mcnXKxHjp3D7udOOnoysNEXL6dgPUn0kIRgIXJH N9oGwp9zd/8JShRMcTVP1kyQaVrjJIBwz/QbOWrMJVijt0v/YPB5l+Uu4BqGQQQxfny6 RgNEt1LrUXEkBMhUlLMX9NFmbIGC8iR7rzl9SpHlXQkxMx/0D2g7kRYElNsH8yGtIAtq P6JDMwx163lccr/m1NNV4Ey9BcE4NmtfAzF/xlOap/CCW9Sfe4gzrDu8VInH+/yNGrbo Vlvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si7312637plb.148.2019.03.22.06.59.47; Fri, 22 Mar 2019 07:00:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727752AbfCVN7K (ORCPT + 99 others); Fri, 22 Mar 2019 09:59:10 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44123 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727487AbfCVN7K (ORCPT ); Fri, 22 Mar 2019 09:59:10 -0400 Received: by mail-qk1-f195.google.com with SMTP id y5so1229030qkc.11 for ; Fri, 22 Mar 2019 06:59:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YJDxHNaqkaKZ9MORW/0o5+vv/jLbHGCobfTlqfu+2pM=; b=UCJgC/5LLFnQsi5gknY3LhazPCQpaYfQJfgKHPYZ63RLV2tDKccZILaiy9TXdp5COk 1jELeciXMnUP7ECEa0lLR+NNtusuJwTjOQXAWUnoufHePYJiytNGBVfb/3glBDKLxQwb +WYF+On6QtJE8kvtxATvOOkpzNADE/CsZXeNfQVsaxEWCHlSxspiu4PxpZTYihDRn/OB zPP+We3GiyC/F+pdYHcBPMimqxUHRs3fzR8vuaTkv+ad4eMCAo/4JjVK4o5yq0Lp7nrr SghTSjUwObk7UozDUB8LJTKV/mttS2oG1jwQzxpTomHj99lzH8yJLKBHcr1Fw/GjgaVG ae5g== X-Gm-Message-State: APjAAAVkgxN5faVQeo0o+NGn4CMrHDTXk/zHwR7coRvzW1MySraWAjCM S+I5Z4y6LiwiP8KVGwTgcwzXbrWE2+d9pvkz+mk= X-Received: by 2002:ae9:dec2:: with SMTP id s185mr7341041qkf.107.1553263149203; Fri, 22 Mar 2019 06:59:09 -0700 (PDT) MIME-Version: 1.0 References: <20190321220009.29334-1-andi@firstfloor.org> <20190321220009.29334-2-andi@firstfloor.org> In-Reply-To: <20190321220009.29334-2-andi@firstfloor.org> From: Arnd Bergmann Date: Fri, 22 Mar 2019 14:58:51 +0100 Message-ID: Subject: Re: [PATCH 01/17] kbuild: Disable -Waddress-of-packed-member for gcc 9 To: Andi Kleen Cc: "the arch/x86 maintainers" , Andrew Morton , Linux Kernel Mailing List , Andi Kleen , Masahiro Yamada Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 21, 2019 at 11:00 PM Andi Kleen wrote: > > From: Andi Kleen > > This warning is very noisy in a default build with gcc 9. > Move it into W=2 only. > > Cc: arnd@arndb.de > Cc: Masahiro Yamada > Signed-off-by: Andi Kleen I think W=2 is too aggressive. On many architectures, this finds real bugs and the false positives tend to be trivial to fix (by removing the bogus __packed annotation), which improves the generated code in the process. Moving it to W=1 for the moment is probably fine, but ideally I think we should fix the kernel to behave according to the C standard. Arnd > --- > Makefile | 1 + > scripts/Makefile.extrawarn | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/Makefile b/Makefile > index 71c2c482e2a2..78efbb172991 100644 > --- a/Makefile > +++ b/Makefile > @@ -676,6 +676,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) > KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) > KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) > KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) > +KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) > > ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE > KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > index 768306add591..ed974a0f4a47 100644 > --- a/scripts/Makefile.extrawarn > +++ b/scripts/Makefile.extrawarn > @@ -43,6 +43,7 @@ warning-2 += $(call cc-option, -Wmissing-field-initializers) > warning-2 += $(call cc-option, -Wsign-compare) > warning-2 += $(call cc-option, -Wmaybe-uninitialized) > warning-2 += $(call cc-option, -Wunused-macros) > +warning-2 += $(call cc-option, -Waddress-of-packed-member) > > warning-3 := -Wbad-function-cast > warning-3 += -Wcast-qual > -- > 2.20.1 >