From: "Darrick J. Wong" <djwong@kernel.org>
To: Carlos Maiolino <cem@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
aalbersh@kernel.org, david@fromorbit.com, hubjin657@outlook.com,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH] metadump: catch used extent array overflow
Date: Wed, 12 Nov 2025 08:36:08 -0800 [thread overview]
Message-ID: <20251112163608.GZ196370@frogsfrogsfrogs> (raw)
In-Reply-To: <t2d73maqm4uxsipsacb423dcsg3u6dy3gty3u34wlj3zp4xfgw@lalkwdrmkj2b>
On Tue, Nov 11, 2025 at 04:10:57PM +0100, Carlos Maiolino wrote:
> On Tue, Nov 11, 2025 at 06:19:50AM -0800, Christoph Hellwig wrote:
> > On Tue, Nov 11, 2025 at 03:10:57PM +0100, cem@kernel.org wrote:
> > > - int used = nex * sizeof(struct xfs_bmbt_rec);
> > > + xfs_extnum_t used = nex * sizeof(struct xfs_bmbt_rec);
> >
> > used really isn't a xfs_extnum_t, so you probably just want to use an
> > undecored uint64_t.
>
> Fair enough. Thanks!
Does check_mul_overflow work for this purpose?
--D
> >
> > Otherwise this looks good.
>
next prev parent reply other threads:[~2025-11-12 16:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 14:10 [PATCH] metadump: catch used extent array overflow cem
2025-11-11 14:19 ` Christoph Hellwig
2025-11-11 15:10 ` Carlos Maiolino
2025-11-12 16:36 ` Darrick J. Wong [this message]
2025-11-12 16:39 ` Christoph Hellwig
2025-11-13 11:09 ` Carlos Maiolino
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=20251112163608.GZ196370@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@kernel.org \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=hubjin657@outlook.com \
--cc=linux-xfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox