[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250218195343.10fa6eb9@pumpkin>
Date: Tue, 18 Feb 2025 19:53:43 +0000
From: David Laight <david.laight.linux@...il.com>
To: Alexandre Ghiti <alex@...ti.fr>
Cc: Christoph Hellwig <hch@....de>, kernel test robot <lkp@...el.com>,
oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org, Carlos
Maiolino <cem@...nel.org>, "Darrick J. Wong" <djwong@...nel.org>,
linux-riscv@...ts.infradead.org
Subject: Re: fs/xfs/xfs_buf.c:1534 xfs_buf_submit_bio() warn: unsigned '_x'
is never less than zero.
On Mon, 17 Feb 2025 13:06:49 +0100
Alexandre Ghiti <alex@...ti.fr> wrote:
> Hi Christoph,
>
> On 17/02/2025 10:24, Christoph Hellwig wrote:
> > On Mon, Feb 17, 2025 at 01:53:08PM +0800, kernel test robot wrote:
> >> New smatch warnings:
> >> fs/xfs/xfs_buf.c:1534 xfs_buf_submit_bio() warn: unsigned '_x' is never less than zero.
> > Looks like this is an issue in the riscv virt_to_page implementation
> > which also shows up in various other places. Any chance this could get
> > fixed in the riscv code?
>
>
> To me, the only test that could give rise to this warning is the last
> part of:
>
> #define is_linear_mapping(x) \
> ((x) >= PAGE_OFFSET && (!IS_ENABLED(CONFIG_64BIT) || (x) < PAGE_OFFSET + KERN_VIRT_SIZE))
>
> But given that the config is a 32-bit config, it should not be evaluated
> at all.
>
> Could that be a false-positive and then an issue in smatch?
It's not managing to try to build when:
#define PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
is zero?
I think that is supposed to be (near) the user-kernel boundary.
So probably 0x80000000 or 0xc0000000.
(or 0xe0000000 for some old sparc32)
David
Powered by blists - more mailing lists