U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: "U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Simon Glass" <simon.glass@canonical.com>,
	"Jixiong Hu" <Jixiong.Hu@mediatek.com>,
	"Marek Vasut" <marek.vasut+renesas@mailbox.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Uma Shankar" <uma.shankar@samsung.com>,
	"Łukasz Majewski" <l.majewski@samsung.com>
Subject: Re: [PATCH] RFC: ext4: Add a few overflow checks in the writing code
Date: Wed, 9 Apr 2025 17:40:06 -0600	[thread overview]
Message-ID: <20250409234006.GG5495@bill-the-cat> (raw)
In-Reply-To: <20250409210245.540952-1-sjg@chromium.org>

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

On Wed, Apr 09, 2025 at 03:02:37PM -0600, Simon Glass wrote:

> From: Simon Glass <simon.glass@canonical.com>
> 
> Some memory allocations make use of data from the disk, so add some
> overflow checks.
> 
> Adjust LOG2_BLOCK_SIZE() so it is easier to read.
> 
> Note: This is a trial to help figure out the best way to deal with these
> sorts of things. Feedback welcome.
> 
> Signed-off-by: Simon Glass <simon.glass@canonical.com>
> ---
> 
>  fs/ext4/ext4_write.c | 24 ++++++++++++++++++++----
>  include/ext_common.h |  3 +--
>  2 files changed, 21 insertions(+), 6 deletions(-)

I'd like to see us grab the current include/linux/overflow.h from the
Linux kernel and make use of that rather than further call the built-ins
directly. But yes, we should do something here in general.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2025-04-09 23:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 21:02 [PATCH] RFC: ext4: Add a few overflow checks in the writing code Simon Glass
2025-04-09 23:40 ` Tom Rini [this message]

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=20250409234006.GG5495@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=Jixiong.Hu@mediatek.com \
    --cc=l.majewski@samsung.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=richard@nod.at \
    --cc=simon.glass@canonical.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=uma.shankar@samsung.com \
    --cc=xypron.glpk@gmx.de \
    /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