Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp114952rwe; Tue, 23 Aug 2022 19:51:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR6tvY+m0lKwGz99uQhs2WXbVE59SCqzCe+HnWeOeANmpCoD7Edk63/Yrwo2rOK6d/iZQHNG X-Received: by 2002:a17:906:ef90:b0:730:9cd8:56d7 with SMTP id ze16-20020a170906ef9000b007309cd856d7mr1468958ejb.94.1661309503249; Tue, 23 Aug 2022 19:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661309503; cv=none; d=google.com; s=arc-20160816; b=jVL1npXd0e7KX4mhIW1ynOqfQRxPAdXgJVCLGrGPeKXNJxWdcdmxxHIg2FKOWufAYP 54V4RhuWiAXo16AFYbenMfY8KwXNajqHz/8ZdG50NZqx4CBRgB/UYMdXfowpA5xr0hpj gU4lkOqmWUbXQvsWRQtWIcpQ3U8yv1PU42NLVbzuqHwyFzfs4U4vLFswbWl8GGY77xbz BM1XoMvtPDDJg1yQ7GZLN0RNX0vjDiSfbqegsz7BW0mDG0anorhXexlQ5fwqZYNZ5HZ0 afFlTig+elVUrjuTv3dHc5Pmi98cAZieJnDcvfZdnAnDEvOXDfSxGBn3tyrp1/M4b3FY 9i0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IJecDar43kdupdb0naFO7jk1K+JciYxqU4t2RPnE8WY=; b=hT6gqZ/D3b1VSxHXu9RKHlsvmhxcOYqvLj3NGeAVlfWOBv6+7LFrez40/MsLhtPyEo VcE6+8Nd0g6VW0YX9pRY5bMC2sbRjNIuJm/fpt4Dgdk0z0iMgytkEViDKTpnvaoWTY1a h0GNsFoMlVQUoAqN5b+Fqt+55irO9nm6KwtYtgHDp71a8ULNzK1Li4/hu0jDtftAPnlr xfV9xYF7MTI9NnaWfG0vXBZD6G5FcS4O/fIveKY0sgPS1x+74/6dYnP3TDMiPI+uR/zF UhTFPp27VUwPxbExzD36Wy9AI5NEigPqNwdMK4TFniP4DMlCr8CWfVxN/d9HEtVwaBZx 6jFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=WYX5v4Bq; 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=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m23-20020a50d7d7000000b0044637388fb5si2924080edj.234.2022.08.23.19.51.17; Tue, 23 Aug 2022 19:51:43 -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=@linux.org.uk header.s=zeniv-20220401 header.b=WYX5v4Bq; 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=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233749AbiHXCJS (ORCPT + 99 others); Tue, 23 Aug 2022 22:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbiHXCJQ (ORCPT ); Tue, 23 Aug 2022 22:09:16 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 099F678204 for ; Tue, 23 Aug 2022 19:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IJecDar43kdupdb0naFO7jk1K+JciYxqU4t2RPnE8WY=; b=WYX5v4BqwzrvznlNhWXpD3EZMk 1zq/VDNKJEgwGO8KzRxpLvhHeFs3SRaokPhCh0Ky7ec0rQrFalCT5sVD/TQLkamtSXNqouMXRffBO z6fhzXdkWuP20iNAqgGdI0yzEGeMmml6XqwpfhW6ViTgM/6jXBnsRrqdc6pGS8vAom4+17cA4NZHx VVv8MvFrAWGy5f7htaO8a1MccdHabW6c8RXeuAPax6oCX+QPoeSxOCPUHUsKMGlA8v/6Y+4ohpF4G 2TCrsGHtETU+GGTYTbhfFHgeDkFX+aEvgesvMgZYPEi5cVw2z48KisoxjX9eoRvaD56geUyCIE1+m I/tKblIA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oQfpM-007cKy-10; Wed, 24 Aug 2022 02:09:08 +0000 Date: Wed, 24 Aug 2022 03:09:07 +0100 From: Al Viro To: Linus Torvalds Cc: Bart Van Assche , Rasmus Villemoes , Steven Rostedt , linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Christoph Hellwig , Luc Van Oostenryck , Jens Axboe Subject: Re: [for-linus][PATCH 01/10] tracing: Suppress sparse warnings triggered by is_signed_type() Message-ID: References: <20220821000737.328590235@goodmis.org> <20220821000844.510643400@goodmis.org> <5700ac75-f6a9-877e-4011-9b314f12b5ab@acm.org> <02daa3d6-2847-d7e0-e23e-411076c6d4db@rasmusvillemoes.dk> <0163b361-14bf-7b4c-751a-14f1a004b1a9@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Tue, Aug 23, 2022 at 04:57:00PM -0700, Linus Torvalds wrote: > On Tue, Aug 23, 2022 at 4:18 PM Linus Torvalds > wrote: > > > > Can you try the sparse version at > > > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/sparse.git > > > > which I just set up temporarily with some patches of mine. > > Ugh, and while testing this with sparse, I noticed that sparse itself > got that whole 'is_signed_type()' check wrong. > > The sparse fix was to remove one line of code, but that one worries > me, because that one line was clearly very intentional: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/sparse.git/commit/?id=7e5f1c2eba1426e414698071dd0de7d039eb385d > > Adding Al, since he's actually the original source of that bitwise > code (and did a lot of other sparse code on the type handling and > preprocessor side in particular). Ouch... That'll take quite a bit of swap-in (and digging through the old notes). I'll take a look, but there's an unrelated problem: ANY ordered comparisons should spew warnings on bitwise And we really want that to happen - things like #define MASK cpu_to_le32(1023) if (foo->len > MASK) return -EINVAL; something(le32_to_cpu(foo->len)); should trigger warnings and I have seen real bugs of that sort. So I'm not sure how is that supposed to work without sparse getting loudly unhappy. Al, going to look through that thread and then try to reconstruct sparse-related notes...