From: Matthew Wilcox <willy@infradead.org>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
linux-mm@kvack.org, Kent Overstreet <kent.overstreet@linux.dev>
Subject: Re: [PATCH 3/4] mm: Support only one page_type per page
Date: Fri, 1 Aug 2025 15:27:44 +0100 [thread overview]
Message-ID: <aIzO4OLr1GPK2RMm@casper.infradead.org> (raw)
In-Reply-To: <6feb2506-aaa6-479f-a7e3-b4503b7d6ffc@huawei.com>
On Fri, Aug 01, 2025 at 04:13:33PM +0800, Kefeng Wang wrote:
> On 2025/8/1 10:43, Matthew Wilcox wrote:
> > On Wed, Aug 28, 2024 at 11:35:28AM +0800, Kefeng Wang wrote:
> > > There are some UBSAN warning about __folio_set_##fname/__SetPage##uname,
> > >
> > > UBSAN: shift-out-of-bounds in ../include/linux/page-flags.h:998:1
> > > left shift of 240 by 24 places cannot be represented in type 'int'
> >
> > I can't reproduce this. I know Andrew merged this patch in, but I
> > tried backing it out and enabling UBSAN and it doesn't show up for me.
> > Relevant part of .config:
> >
> > CONFIG_ARCH_HAS_UBSAN=y
> > CONFIG_UBSAN=y
> > CONFIG_UBSAN_TRAP=y
> > CONFIG_CC_HAS_UBSAN_BOUNDS_STRICT=y
> > CONFIG_UBSAN_BOUNDS=y
> > CONFIG_UBSAN_BOUNDS_STRICT=y
> > CONFIG_UBSAN_SHIFT=y
> > # CONFIG_UBSAN_DIV_ZERO is not set
> > CONFIG_UBSAN_BOOL=y
> > CONFIG_UBSAN_ENUM=y
> > # CONFIG_TEST_UBSAN is not set
> >
> > (I tried CONFIG_UBSAN_TRAP both on and off)
>
> Hi Matthrew, I work on arm64, so the above OOB should occur on arm64,
> I remember the OOB appears on linux-next, but I tried last kernel and
> some old kernel version, but can't reproduce this too, it was too long ago,
> maybe gcc version related or some other changes...
Yes, I can't reproduce it either with an arm64 build. I'll ignore this
issue in my refactoring, and if it pops up again, we'll deal with it.
next prev parent reply other threads:[~2025-08-01 14:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 17:39 [PATCH 0/4] Increase the number of bits available in page_type Matthew Wilcox (Oracle)
2024-08-21 17:39 ` [PATCH 1/4] printf: Remove %pGt support Matthew Wilcox (Oracle)
2024-08-21 21:00 ` David Hildenbrand
2024-08-21 21:08 ` Matthew Wilcox
2024-08-21 17:39 ` [PATCH 2/4] mm: Introduce page_mapcount_is_type() Matthew Wilcox (Oracle)
2024-08-21 21:01 ` David Hildenbrand
2024-08-21 17:39 ` [PATCH 3/4] mm: Support only one page_type per page Matthew Wilcox (Oracle)
2024-08-21 21:05 ` David Hildenbrand
2024-08-28 3:35 ` Kefeng Wang
2025-08-01 2:43 ` Matthew Wilcox
2025-08-01 2:49 ` Kent Overstreet
2025-08-01 8:13 ` Kefeng Wang
2025-08-01 14:27 ` Matthew Wilcox [this message]
2025-08-02 2:00 ` Kefeng Wang
2024-08-21 17:39 ` [PATCH 4/4] zsmalloc: Use all available 24 bits of page_type Matthew Wilcox (Oracle)
2024-08-21 21:06 ` David Hildenbrand
2024-08-21 21:15 ` [PATCH 0/4] Increase the number of bits available in page_type Kent Overstreet
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=aIzO4OLr1GPK2RMm@casper.infradead.org \
--to=willy@infradead.org \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-mm@kvack.org \
--cc=wangkefeng.wang@huawei.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;
as well as URLs for NNTP newsgroup(s).