From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jessica Clarke <jrtc27@jrtc27.com>,
kernel test robot <lkp@intel.com>,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-riscv@lists.infradead.org, linux-rdma@vger.kernel.org,
linux-pci@vger.kernel.org, linux-parport@lists.infradead.org,
linux-omap@vger.kernel.org, linux-mm@kvack.org,
linux-fbdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
dri-devel@lists.freedesktop.org, bpf@vger.kernel.org,
amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org
Subject: Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d
Date: Thu, 26 May 2022 18:03:05 +0300 [thread overview]
Message-ID: <20220526150305.GH2168@kadam> (raw)
In-Reply-To: <Yo+OiR6abzVksVTM@casper.infradead.org>
On Thu, May 26, 2022 at 03:28:25PM +0100, Matthew Wilcox wrote:
> On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote:
> > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote:
> > > Bizarre this started showing up now. The recent patch was:
> > >
> > > - info->alloced += compound_nr(page);
> > > - inode->i_blocks += BLOCKS_PER_PAGE << compound_order(page);
> > > + info->alloced += folio_nr_pages(folio);
> > > + inode->i_blocks += BLOCKS_PER_PAGE << folio_order(folio);
> > >
> > > so it could tell that compound_order() was small, but folio_order()
> > > might be large?
> >
> > The old code also generates a warning on my test system. Smatch thinks
> > both compound_order() and folio_order() are 0-255. I guess because of
> > the "unsigned char compound_order;" in the struct page.
>
> It'd be nice if we could annotate that as "contains a value between
> 1 and BITS_PER_LONG - PAGE_SHIFT". Then be able to optionally enable
> a checker that ensures that's true on loads/stores. Maybe we need a
> language that isn't C :-P Ada can do this ... I don't think Rust can.
Machine Parsable Comments. It's a matter of figuring out the best
format and writing the code.
In Smatch, I have table of hard coded return values in the format:
<function> <old return> <new hard coded return>
https://github.com/error27/smatch/blob/master/smatch_data/db/kernel.return_fixes
I don't have code to handle something like BITS_PER_LONG or PAGE_SHIFT.
To be honest, Smatch code always assumes that PAGE_SIZE is 4096 but I
should actually look it up... It's not impossible to do. The GFP_KERNEL
values changed enough so that I eventually made that look up the actual
defines.
I also have a table in the database where I could edit the values of
(struct page)->compound_order.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: alsa-devel@alsa-project.org, linux-fbdev@vger.kernel.org,
kernel test robot <lkp@intel.com>,
kvm@vger.kernel.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, linux-staging@lists.linux.dev,
bpf@vger.kernel.org, dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org, linux-mm@kvack.org,
amd-gfx@lists.freedesktop.org, linux-pci@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-omap@vger.kernel.org, Jessica Clarke <jrtc27@jrtc27.com>,
linux-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-parport@lists.infradead.org
Subject: Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d
Date: Thu, 26 May 2022 18:03:05 +0300 [thread overview]
Message-ID: <20220526150305.GH2168@kadam> (raw)
In-Reply-To: <Yo+OiR6abzVksVTM@casper.infradead.org>
On Thu, May 26, 2022 at 03:28:25PM +0100, Matthew Wilcox wrote:
> On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote:
> > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote:
> > > Bizarre this started showing up now. The recent patch was:
> > >
> > > - info->alloced += compound_nr(page);
> > > - inode->i_blocks += BLOCKS_PER_PAGE << compound_order(page);
> > > + info->alloced += folio_nr_pages(folio);
> > > + inode->i_blocks += BLOCKS_PER_PAGE << folio_order(folio);
> > >
> > > so it could tell that compound_order() was small, but folio_order()
> > > might be large?
> >
> > The old code also generates a warning on my test system. Smatch thinks
> > both compound_order() and folio_order() are 0-255. I guess because of
> > the "unsigned char compound_order;" in the struct page.
>
> It'd be nice if we could annotate that as "contains a value between
> 1 and BITS_PER_LONG - PAGE_SHIFT". Then be able to optionally enable
> a checker that ensures that's true on loads/stores. Maybe we need a
> language that isn't C :-P Ada can do this ... I don't think Rust can.
Machine Parsable Comments. It's a matter of figuring out the best
format and writing the code.
In Smatch, I have table of hard coded return values in the format:
<function> <old return> <new hard coded return>
https://github.com/error27/smatch/blob/master/smatch_data/db/kernel.return_fixes
I don't have code to handle something like BITS_PER_LONG or PAGE_SHIFT.
To be honest, Smatch code always assumes that PAGE_SIZE is 4096 but I
should actually look it up... It's not impossible to do. The GFP_KERNEL
values changed enough so that I eventually made that look up the actual
defines.
I also have a table in the database where I could edit the values of
(struct page)->compound_order.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jessica Clarke <jrtc27@jrtc27.com>,
kernel test robot <lkp@intel.com>,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-riscv@lists.infradead.org, linux-rdma@vger.kernel.org,
linux-pci@vger.kernel.org, linux-parport@lists.infradead.org,
linux-omap@vger.kernel.org, linux-mm@kvack.org,
linux-fbdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
dri-devel@lists.freedesktop.org, bpf@vger.kernel.org,
amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org
Subject: Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d
Date: Thu, 26 May 2022 18:03:05 +0300 [thread overview]
Message-ID: <20220526150305.GH2168@kadam> (raw)
In-Reply-To: <Yo+OiR6abzVksVTM@casper.infradead.org>
On Thu, May 26, 2022 at 03:28:25PM +0100, Matthew Wilcox wrote:
> On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote:
> > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote:
> > > Bizarre this started showing up now. The recent patch was:
> > >
> > > - info->alloced += compound_nr(page);
> > > - inode->i_blocks += BLOCKS_PER_PAGE << compound_order(page);
> > > + info->alloced += folio_nr_pages(folio);
> > > + inode->i_blocks += BLOCKS_PER_PAGE << folio_order(folio);
> > >
> > > so it could tell that compound_order() was small, but folio_order()
> > > might be large?
> >
> > The old code also generates a warning on my test system. Smatch thinks
> > both compound_order() and folio_order() are 0-255. I guess because of
> > the "unsigned char compound_order;" in the struct page.
>
> It'd be nice if we could annotate that as "contains a value between
> 1 and BITS_PER_LONG - PAGE_SHIFT". Then be able to optionally enable
> a checker that ensures that's true on loads/stores. Maybe we need a
> language that isn't C :-P Ada can do this ... I don't think Rust can.
Machine Parsable Comments. It's a matter of figuring out the best
format and writing the code.
In Smatch, I have table of hard coded return values in the format:
<function> <old return> <new hard coded return>
https://github.com/error27/smatch/blob/master/smatch_data/db/kernel.return_fixes
I don't have code to handle something like BITS_PER_LONG or PAGE_SHIFT.
To be honest, Smatch code always assumes that PAGE_SIZE is 4096 but I
should actually look it up... It's not impossible to do. The GFP_KERNEL
values changed enough so that I eventually made that look up the actual
defines.
I also have a table in the database where I could edit the values of
(struct page)->compound_order.
regards,
dan carpenter
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: alsa-devel@alsa-project.org, linux-fbdev@vger.kernel.org,
kernel test robot <lkp@intel.com>,
kvm@vger.kernel.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, linux-staging@lists.linux.dev,
bpf@vger.kernel.org, dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org, linux-mm@kvack.org,
amd-gfx@lists.freedesktop.org, linux-pci@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-omap@vger.kernel.org, Jessica Clarke <jrtc27@jrtc27.com>,
linux-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-parport@lists.infradead.org
Subject: Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d
Date: Thu, 26 May 2022 18:03:05 +0300 [thread overview]
Message-ID: <20220526150305.GH2168@kadam> (raw)
In-Reply-To: <Yo+OiR6abzVksVTM@casper.infradead.org>
On Thu, May 26, 2022 at 03:28:25PM +0100, Matthew Wilcox wrote:
> On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote:
> > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote:
> > > Bizarre this started showing up now. The recent patch was:
> > >
> > > - info->alloced += compound_nr(page);
> > > - inode->i_blocks += BLOCKS_PER_PAGE << compound_order(page);
> > > + info->alloced += folio_nr_pages(folio);
> > > + inode->i_blocks += BLOCKS_PER_PAGE << folio_order(folio);
> > >
> > > so it could tell that compound_order() was small, but folio_order()
> > > might be large?
> >
> > The old code also generates a warning on my test system. Smatch thinks
> > both compound_order() and folio_order() are 0-255. I guess because of
> > the "unsigned char compound_order;" in the struct page.
>
> It'd be nice if we could annotate that as "contains a value between
> 1 and BITS_PER_LONG - PAGE_SHIFT". Then be able to optionally enable
> a checker that ensures that's true on loads/stores. Maybe we need a
> language that isn't C :-P Ada can do this ... I don't think Rust can.
Machine Parsable Comments. It's a matter of figuring out the best
format and writing the code.
In Smatch, I have table of hard coded return values in the format:
<function> <old return> <new hard coded return>
https://github.com/error27/smatch/blob/master/smatch_data/db/kernel.return_fixes
I don't have code to handle something like BITS_PER_LONG or PAGE_SHIFT.
To be honest, Smatch code always assumes that PAGE_SIZE is 4096 but I
should actually look it up... It's not impossible to do. The GFP_KERNEL
values changed enough so that I eventually made that look up the actual
defines.
I also have a table in the database where I could edit the values of
(struct page)->compound_order.
regards,
dan carpenter
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jessica Clarke <jrtc27@jrtc27.com>,
kernel test robot <lkp@intel.com>,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-riscv@lists.infradead.org, linux-rdma@vger.kernel.org,
linux-pci@vger.kernel.org, linux-parport@lists.infradead.org,
linux-omap@vger.kernel.org, linux-mm@kvack.org,
linux-fbdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
dri-devel@lists.freedesktop.org, bpf@vger.kernel.org,
amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org
Subject: Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d
Date: Thu, 26 May 2022 18:03:05 +0300 [thread overview]
Message-ID: <20220526150305.GH2168@kadam> (raw)
In-Reply-To: <Yo+OiR6abzVksVTM@casper.infradead.org>
On Thu, May 26, 2022 at 03:28:25PM +0100, Matthew Wilcox wrote:
> On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote:
> > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote:
> > > Bizarre this started showing up now. The recent patch was:
> > >
> > > - info->alloced += compound_nr(page);
> > > - inode->i_blocks += BLOCKS_PER_PAGE << compound_order(page);
> > > + info->alloced += folio_nr_pages(folio);
> > > + inode->i_blocks += BLOCKS_PER_PAGE << folio_order(folio);
> > >
> > > so it could tell that compound_order() was small, but folio_order()
> > > might be large?
> >
> > The old code also generates a warning on my test system. Smatch thinks
> > both compound_order() and folio_order() are 0-255. I guess because of
> > the "unsigned char compound_order;" in the struct page.
>
> It'd be nice if we could annotate that as "contains a value between
> 1 and BITS_PER_LONG - PAGE_SHIFT". Then be able to optionally enable
> a checker that ensures that's true on loads/stores. Maybe we need a
> language that isn't C :-P Ada can do this ... I don't think Rust can.
Machine Parsable Comments. It's a matter of figuring out the best
format and writing the code.
In Smatch, I have table of hard coded return values in the format:
<function> <old return> <new hard coded return>
https://github.com/error27/smatch/blob/master/smatch_data/db/kernel.return_fixes
I don't have code to handle something like BITS_PER_LONG or PAGE_SHIFT.
To be honest, Smatch code always assumes that PAGE_SIZE is 4096 but I
should actually look it up... It's not impossible to do. The GFP_KERNEL
values changed enough so that I eventually made that look up the actual
defines.
I also have a table in the database where I could edit the values of
(struct page)->compound_order.
regards,
dan carpenter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-05-26 15:03 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 21:35 [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d kernel test robot
2022-05-25 21:35 ` kernel test robot
2022-05-25 21:35 ` kernel test robot
2022-05-25 21:35 ` kernel test robot
2022-05-25 21:35 ` kernel test robot
2022-05-25 21:50 ` Andrew Morton
2022-05-25 21:50 ` Andrew Morton
2022-05-25 21:50 ` Andrew Morton
2022-05-25 21:50 ` Andrew Morton
2022-05-25 21:50 ` Andrew Morton
2022-05-25 22:07 ` Jessica Clarke
2022-05-25 22:07 ` Jessica Clarke
2022-05-25 22:07 ` Jessica Clarke
2022-05-25 22:07 ` Jessica Clarke
2022-05-25 22:20 ` Andrew Morton
2022-05-25 22:20 ` Andrew Morton
2022-05-25 22:20 ` Andrew Morton
2022-05-25 22:20 ` Andrew Morton
2022-05-25 22:20 ` Andrew Morton
2022-05-26 1:16 ` Matthew Wilcox
2022-05-26 1:16 ` Matthew Wilcox
2022-05-26 1:16 ` Matthew Wilcox
2022-05-26 1:16 ` Matthew Wilcox
2022-05-26 1:16 ` Matthew Wilcox
2022-05-26 8:48 ` Dan Carpenter
2022-05-26 8:48 ` Dan Carpenter
2022-05-26 8:48 ` Dan Carpenter
2022-05-26 8:48 ` Dan Carpenter
2022-05-26 8:48 ` Dan Carpenter
2022-05-26 14:28 ` Matthew Wilcox
2022-05-26 14:28 ` Matthew Wilcox
2022-05-26 14:28 ` Matthew Wilcox
2022-05-26 14:28 ` Matthew Wilcox
2022-05-26 14:28 ` Matthew Wilcox
2022-05-26 15:03 ` Dan Carpenter [this message]
2022-05-26 15:03 ` Dan Carpenter
2022-05-26 15:03 ` Dan Carpenter
2022-05-26 15:03 ` Dan Carpenter
2022-05-26 15:03 ` Dan Carpenter
2022-05-26 8:19 ` Dan Carpenter
2022-05-26 8:19 ` Dan Carpenter
2022-05-26 8:19 ` Dan Carpenter
2022-05-26 8:19 ` Dan Carpenter
2022-05-26 8:19 ` Dan Carpenter
2022-05-26 8:32 ` Arnd Bergmann
2022-05-26 8:32 ` Arnd Bergmann
2022-05-26 8:32 ` Arnd Bergmann
2022-05-26 8:32 ` Arnd Bergmann
2022-05-26 8:32 ` Arnd Bergmann
2022-06-16 5:11 ` Chen, Rong A
2022-06-16 5:11 ` Chen, Rong A
2022-06-16 5:11 ` Chen, Rong A
2022-06-16 5:11 ` Chen, Rong A
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=20220526150305.GH2168@kadam \
--to=dan.carpenter@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bpf@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jrtc27@jrtc27.com \
--cc=kvm@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-parport@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=willy@infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.