From: "Arnd Bergmann" <arnd@arndb.de>
To: "Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Richard Fung" <richardfung@google.com>
Cc: "Eric Biggers" <ebiggers@kernel.org>,
"Arnd Bergmann" <arnd@kernel.org>,
"Miklos Szeredi" <miklos@szeredi.hu>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] fuse: fs-verity: aoid out-of-range comparison
Date: Thu, 04 Jun 2026 21:48:43 +0200 [thread overview]
Message-ID: <65434490-978a-412d-b88e-3dff3bc75164@app.fastmail.com> (raw)
In-Reply-To: <aiG4suLcgILS8Hha@black.igk.intel.com>
On Thu, Jun 4, 2026, at 19:41, Andy Shevchenko wrote:
> On Thu, Aug 01, 2024 at 10:45:01AM -0700, Richard Fung wrote:
>> > I think this was just defensive coding to ensure that the assignment to
>> > iov_len can't overflow regardless of the type of digest_size
>>
>> I agree with this. Removing it sounds good to me
>
> Where we are with this? I have just stumbled over this issue yesterday when
> tried to have `make W=1` clean build of fs/.
I have nine of these in my randconfig build tree tree at the moment, and
with my patches I get a clean build with the warning enabled, I sent
these patches when I first came across them, usually after a code change,
though some of them may be old:
drivers/block/rbd.c:6079:17: error: result of comparison of constant 2305843009213693948 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
net/ipv4/tcp_output.c:188:3: error: result of comparison of constant -1 with expression of type 'u8' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
drivers/infiniband/core/uverbs_ioctl.c:90:39: error: result of comparison of constant 65536 with expression of type 'u16' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
drivers/clk/actions/owl-pll.c:182:2: error: result of comparison of constant 2000 with expression of type 'u8' (aka 'unsi
gned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
arch/arm/mach-omap2/wd_timer.c:89:3: error: result of comparison of constant 2000 with expression of type 'u8' (aka 'unsi
gned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
fs/fuse/ioctl.c:130:18: error: result of comparison of constant 18446744073709551611 with expression of type '__u16' (aka
'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1630:32: error: result of comparison of constant 65536 with expression of type '
u16' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
arch/riscv/errata/sifive/errata.c:29:14: error: result of comparison of constant 9223372036854775815 with expression of t
ype 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
arch/riscv/errata/sifive/errata.c:42:14: error: result of comparison of constant 9223372036854775815 with expression of t
ype 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb202.c:17:37: error: result of comparison of constant 4503599627370495 with expre
ssion of type 'dma_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
If you think there is a chance to enable it by default soon, I can
try to see which ones are still required and send them again.
Arnd
next prev parent reply other threads:[~2026-06-04 19:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 14:27 Arnd Bergmann
2024-08-01 0:35 ` Nathan Chancellor
2024-08-01 1:09 ` Eric Biggers
2024-08-01 17:45 ` Richard Fung
2026-06-04 17:41 ` Andy Shevchenko
2026-06-04 19:48 ` Arnd Bergmann [this message]
2026-06-05 20:43 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65434490-978a-412d-b88e-3dff3bc75164@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andriy.shevchenko@intel.com \
--cc=arnd@kernel.org \
--cc=ebiggers@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=miklos@szeredi.hu \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=richardfung@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®