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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 5025CC54FCC for ; Tue, 21 Apr 2020 04:32:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 135B922209 for ; Tue, 21 Apr 2020 04:32:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IbqY0T41" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 135B922209 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A39A38E0005; Tue, 21 Apr 2020 00:32:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EA648E0003; Tue, 21 Apr 2020 00:32:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D9368E0005; Tue, 21 Apr 2020 00:32:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0243.hostedemail.com [216.40.44.243]) by kanga.kvack.org (Postfix) with ESMTP id 722218E0003 for ; Tue, 21 Apr 2020 00:32:55 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2A3B552C0 for ; Tue, 21 Apr 2020 04:32:55 +0000 (UTC) X-FDA: 76730591910.24.paper61_53a658819d90e X-HE-Tag: paper61_53a658819d90e X-Filterd-Recvd-Size: 5686 Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Apr 2020 04:32:54 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id o7so9224997oif.2 for ; Mon, 20 Apr 2020 21:32:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UPMkss+54nGeDEwUR0+B1eg0ik2cEEjdyo7gLfq4mZQ=; b=IbqY0T412B5N50cDtGLuhIl6vaYmZdIMd0m1/R6Fcn20HYyASzEQ1E7QtlJ4KvkHwq gzhwt90fkvp/7TN/oNLEWhoRq2KL9ehdgZYRewt72o6jkGANG58IEUQVq00ia1w47dCZ h352h3Djs6eTkfrNf0nxfAb/8ZCDM7STlW9uevFruo6RhtaGdiiFNNA3Bmg3TCzP11sf 2DOXpBEUNBV5GjRgZA1ia9wJMLfyzur1fOuo3ieqwFLd9gTkl2RnkqdEA4jRH2qymeHt wnMbqs/iXd9WAv8bqmj657w2nitRplahkeNP8ovn3aGLvFL890z70UWAfDKp/oG/HyMd KuWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UPMkss+54nGeDEwUR0+B1eg0ik2cEEjdyo7gLfq4mZQ=; b=bprwEwxXs5tPGmgatGP3TSZeRni8OcKcQqt8dBRIatrTPDT6jXS1qcVyGz3HeggVoq bECcofF1neSQru9+0aC5YL8hcIrgkN6YHghfbtlIuyuSEfGuqmgKgAoCXvTHNeXna17X 1cI+h2M/NbophVgOZNO8QeSgHaczciMgwe04U+bYl9PL2HzeJsbx6NR8dVxueY81fMR4 uT0hx+1KxQg8do4i6CPnoXYv+88+Dq6WYnhkRTu/RfEPflf75tLfZzEaMFQNgRRq1LO0 hSYmX4zRHE7D4DBMcS2BouTB/yU/lkAmCozqzxCRcN6w4m8tgd5BvIRT1ab7dSQEjmGv v71g== X-Gm-Message-State: AGi0PubKWs3gieMzX1nWWtDQO5i/0BHiraLBSDc33z6sTxdWvoKAWNRR SHA7OvmkkTFkZzld3NXpdEo= X-Google-Smtp-Source: APiQypJ6BCzvMaYmwECLmlhAdgsbT8Tp8b6yZlEFnUnaUHlK6Cj8w3aKn0UQZxsETngzkzn06ylZcA== X-Received: by 2002:aca:4d47:: with SMTP id a68mr1979522oib.60.1587443573940; Mon, 20 Apr 2020 21:32:53 -0700 (PDT) Received: from ubuntu-s3-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id q15sm471569otk.78.2020.04.20.21.32.53 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Apr 2020 21:32:53 -0700 (PDT) Date: Mon, 20 Apr 2020 21:32:51 -0700 From: Nathan Chancellor To: Andrew Morton Cc: Masahiro Yamada , Michal Marek , Arnd Bergmann , Steven Rostedt , Ingo Molnar , Jason Baron , Catalin Marinas , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH 0/6] Silence some instances of -Wtautological-compare and enable globally Message-ID: <20200421043251.GA4996@ubuntu-s3-xlarge-x86> References: <20200219045423.54190-1-natechancellor@gmail.com> <20200420210332.7ff9652c8bdca7fb91ccfb0c@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200420210332.7ff9652c8bdca7fb91ccfb0c@linux-foundation.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Andrew, On Mon, Apr 20, 2020 at 09:03:32PM -0700, Andrew Morton wrote: > On Tue, 18 Feb 2020 21:54:17 -0700 Nathan Chancellor wrote: > > > Hi everyone, > > > > This patch series aims to silence some instances of clang's > > -Wtautological-compare that are not problematic and enable it globally > > for the kernel because it has a bunch of subwarnings that can find real > > bugs in the kernel such as > > https://lore.kernel.org/lkml/20200116222658.5285-1-natechancellor@gmail.com/ > > and https://bugs.llvm.org/show_bug.cgi?id=42666, which was specifically > > requested by Dmitry. > > > > The first patch adds a macro that casts the section variables to > > unsigned long (uintptr_t), which silences the warning and adds > > documentation. > > > > Patches two through four silence the warning in the places I have > > noticed it across all of my builds with -Werror, including arm, arm64, > > and x86_64 defconfig/allmodconfig/allyesconfig. There might still be > > more lurking but those will have to be teased out over time. > > > > Patch six finally enables the warning, while leaving one of the > > subwarnings disabled because it is rather noisy and somewhat pointless > > for the kernel, where core kernel code is expected to build and run with > > many different configurations where variable types can be different > > sizes. > > > > For some reason none of these patches apply. Not sure why - prehaps > something in the diff headers. > > Anyway, the kmemleak.c code has recently changed in ways which impact > these patches. Please take a look at that, redo, retest and resend? > > Thank you for doubling back around to this but we are good here. These warnings have all been fixed in Linus' tree without the need for the first patch in the series. For those curious: 63174f61dfaef ("kernel/extable.c: use address-of operator on section symbols") bf2cbe044da27 ("tracing: Use address-of operator on section symbols") 8306b057a85ec ("lib/dynamic_debug.c: use address-of operator on section symbols") b0d14fc43d392 ("mm/kmemleak.c: use address-of operator on section symbols") afe956c577b2d ("kbuild: Enable -Wtautological-compare") Cheers, Nathan