Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp680891imi; Thu, 21 Jul 2022 08:54:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s4ZQqh2ekva6KSg9zC1mHPhy2DJu1hsEFuXDjonn8MicDQFUwFR/e1/QC9BGCnDRooyKUs X-Received: by 2002:a17:907:8a1d:b0:72b:9e7b:802a with SMTP id sc29-20020a1709078a1d00b0072b9e7b802amr41711083ejc.189.1658418884388; Thu, 21 Jul 2022 08:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658418884; cv=none; d=google.com; s=arc-20160816; b=pPHj1Qp+tBz3xPyc3vTc86Ct8O2fV+vzwwRspOgs1NR+vm2V+iXJsw8/YQZureCwIz /fdL2jSnGaTEN3/dWja0aopUwiZMUB+W+1lQgk2nJt2v7vysOyXECXkUUhmN/fpgSSOk yL7FAewC72SgnYiXbsZXNsi0WuA7tVVEz3a00Acj83xRrs6w3hwXbEbzNn5IpkqwMn1H Q9TWKuLXGfgqS6tPrD8FunkRJDOvW42+P9v4KAGZyeVqTJyKOtBhVCWNyZb2dw1U8bmn 5wU4hpiAk3Y92MHVWbUi7prNbxOAs/1ec3cwseGww1RvDUmAFf5wRbOeRcLrOjP/E8uu 0DXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rLfnvkjaobAC6YLduwkWXLzhvxELO1p0olRpTPrMu3E=; b=MbNp5fucucLb+LwSntfzD1QKW9n1PBvHgGdcKpMGGdWS1VPcPxfRNL7F4rmDKocDD9 JZlzAzhjGtlothvDFNkNVBNt70DSX++tWMlN7l4PnF3wDo8QbKLFog5RfuLNBA7oEduh 4n0psLa6O6J7SrgThjjryvz4eGIO9FozEo0LFSy/LWOYL5vTcjd5B/g0fcFZmisoIzPa UlPipgG0Se/QJxdgvRdZas+b+2FhSL5WP9LuzgVAM6MSCP6w27XG7knqkXYSIQawwzx8 d2aA/Nszw+p6llZbk2NaJn19Ohw3XcRadD1yhsn8S137m0SRgAaFPV30yxhRhBL+sR9a qDDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rere9p3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g13-20020a056402320d00b0043bca28111bsi945857eda.612.2022.07.21.08.54.19; Thu, 21 Jul 2022 08:54:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rere9p3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbiGUPKd (ORCPT + 99 others); Thu, 21 Jul 2022 11:10:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229758AbiGUPKb (ORCPT ); Thu, 21 Jul 2022 11:10:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1D2027CF9; Thu, 21 Jul 2022 08:10:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 76BD061213; Thu, 21 Jul 2022 15:10:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F63EC341C6; Thu, 21 Jul 2022 15:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658416229; bh=npRLRf/sAWAclkJPA3+ZSmi54RNpxH5tLibZRtjDSNY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rere9p3lBvtpZ9MeZTafEhmVfofSA3t2r8VgSgJEjOhdUrv1ijFE31fCt4OYKWPgA b8NFzdM2pVEWVPCgaIQY1oNAcTXmd4LkollZj1bkNlKmvAOsXFrqMnT3G5/D+e6CfF LZVnNzMUOEZbFRLFnN9N/xN3RaaKZ3EcIAUMXjlHnBb6p2JJjD6kRzi3/DaiDL9SwP caJcjxLJMIFzwFu6ELaumXHc+dh/u2cACYc2OzMCJQOJMVXIuI0D0YL5K7+ntUQ2WK XEWk5QF1Edn9DxdibrCNjD+50/U6ZXzDJKDExFlC7PEyNkMrdnofXJDy2HjE7sSdw+ pNLqBGXbjSWlw== Date: Thu, 21 Jul 2022 08:10:27 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Masahiro Yamada , Tom Rix , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Justin Stitt Subject: Re: [PATCH] Makefile.extrawarn: re-enable -Wformat for clang Message-ID: References: <20220720232332.2720091-1-justinstitt@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 21, 2022 at 07:27:34AM -0700, Nick Desaulniers wrote: > On Wed, Jul 20, 2022 at 4:23 PM Justin Stitt wrote: > > > > There's been an ongoing mission to re-enable the -Wformat warning for > > Clang. A previous attempt at enabling the warning showed that there were > > many instances of this warning throughout the codebase. The sheer amount > > of these warnings really polluted builds and thus -Wno-format was added > > to _temporarily_ toggle them off. > > > > After many patches the warning has largely been eradicated for x86, > > x86_64, arm, and arm64 on a variety of configs. The time to enable the > > warning has never been better as it seems for the first time we are > > ahead of them and can now solve them as they appear rather than tackling > > from a backlog. > > > > As to the root cause of this large backlog of warnings, Clang seems to > > pickup on some more nuanced cases of format warnings caused by implicit > > integer conversion as well as default argument promotions from > > printf-like functions. > > > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/378 > > Suggested-by: Nick Desaulniers > > Signed-off-by: Justin Stitt > > --- > > Previous attempt: (https://patchwork.kernel.org/project/linux-kbuild/patch/20190201210853.244043-1-jflat@chromium.org/) > > > > Note: > > For this patch to land on its feet, the plethora of supporting patches that > > fixed various -Wformat warnings need to be picked up. Thanfully, a lot > > of them have! > > > > Here are the patches still waiting to be picked up: > > * https://lore.kernel.org/all/20220718230626.1029318-1-justinstitt@google.com/ > > * https://lore.kernel.org/all/20220711222919.2043613-1-justinstitt@google.com/ > > Hi Masahiro, Nathan, and Tom, > What are your thoughts for _when_ in the release cycle this should be > picked up? I worry that if we don't remove this soon, we will > backslide, and more -Wformat issues will crop up making removing this > in the future like digging in sand. Justin has chased down many > instances of this warning, and I'm happy to help clean up fallout from > landing this. Let me do a series of builds with the two patches above against next-20220721 to see if there are any instances of this warning across the less frequently tested architectures then I will review/ack this. I don't think we need to worry much about backslide, as -Wformat is enabled with W=1, which the 0day folks already test with, so new instances of this warning should get reported to the authors when they are introduced so they can be fixed immediately. However, I would still like to see this applied sooner rather than later, although I would also like us to be completely warning clean before doing so, especially with -Werror now being selected with all{mod,yes}config. -rc8 is this Sunday and final should be July 31st so I think this could be applied at some point between those two dates then maybe sent to Linus for a late pull request once all other trees have been merged but that is ultimately up to Masahiro. Cheers, Nathan > > > > scripts/Makefile.extrawarn | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > > index f5f0d6f09053..9bbaf7112a9b 100644 > > --- a/scripts/Makefile.extrawarn > > +++ b/scripts/Makefile.extrawarn > > @@ -47,7 +47,6 @@ else > > > > ifdef CONFIG_CC_IS_CLANG > > KBUILD_CFLAGS += -Wno-initializer-overrides > > -KBUILD_CFLAGS += -Wno-format > > KBUILD_CFLAGS += -Wno-sign-compare > > KBUILD_CFLAGS += -Wno-format-zero-length > > KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) > > -- > > 2.37.0.170.g444d1eabd0-goog > > > > > -- > Thanks, > ~Nick Desaulniers