[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjskbRYLW9MdSbiumhs4stYY_evRvdSkaHKtrf3mqpF7g@mail.gmail.com>
Date: Tue, 23 Aug 2022 19:16:13 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Bart Van Assche <bvanassche@....org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@....de>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Jens Axboe <axboe@...nel.dk>
Subject: Re: [for-linus][PATCH 01/10] tracing: Suppress sparse warnings
triggered by is_signed_type()
On Tue, Aug 23, 2022 at 7:09 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> I'll take a look, but there's an unrelated problem:
> ANY ordered comparisons should spew warnings on bitwise
In the general case, absolutely.
But we have two special values that are the same in any bit ordering:
-1 and 0 (all bits set and no bits set). And yes, my patch verifies
that.
See commit 18f17cde ("allow restricted ordered compares with
unrestricted values") in that same tree.
That said, even those are strictly speaking only well-defined in
*unsigned* compares, so I guess we should add that - if you have a
*signed* bitwise thing, even those aren't well-defined to compare
against.
Now, I don't think signed bitwise types make much sense, and I
certainly hope we don't have them in the kernel, but yes, it is
probably worth adding that check too.
Of course, that check then depends on getting the signedness right for
bitwise types, which is exactly the problem I wanted you to look at ;)
Linus
Powered by blists - more mailing lists