Linux filesystem development
 help / color / mirror / Atom feed
From: David Timber <dxdt@dev.snart.me>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>,
	Namjae Jeon <linkinjeon@kernel.org>,
	Sungjong Seo <sj1557.seo@samsung.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v1 1/3] exfat: add volume limit bounds checks
Date: Mon, 11 May 2026 08:17:54 +0900	[thread overview]
Message-ID: <91382b9c-52bb-41c7-9ccd-9045a1827b89@dev.snart.me> (raw)
In-Reply-To: <PUZPR04MB63168F494EE6F2061377420D813C2@PUZPR04MB6316.apcprd04.prod.outlook.com>

On 5/7/26 21:04, Yuezhang.Mo@sony.com wrote:
> I checked the code further and found that exfat_zeroed_cluster()
> already has a similar check, but it is only for directories and
> does not check the size of the block device.
>
> I think we should also add a check here, similar to the check
> in exfat_zeroed_cluster(), to check if the last cluster exceeds
> the device size. This way, the check will apply to both files and
> directories, and the check in exfat_zeroed_cluster() will no
> longer be needed.
Valid points. Redundant checks hurt consistency.

The existing checks can be changed to WARN_ON() later on, but I think
the priority for now should be preventing silent data loss from users
inadvertenly mounting a truncated volume.

Let's see if there are more checks like these in the codebase.

      reply	other threads:[~2026-05-10 23:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 12:28 [PATCH v1 1/3] exfat: add volume limit bounds checks David Timber
2026-05-05 12:28 ` [PATCH v1 2/3] exfat: print warning upon block size calibration David Timber
2026-05-05 12:28 ` [PATCH v1 3/3] exfat: fix memory leak (upcase table) David Timber
2026-05-07 12:04   ` Yuezhang.Mo
2026-05-10 23:10     ` David Timber
2026-05-07 12:04 ` [PATCH v1 1/3] exfat: add volume limit bounds checks Yuezhang.Mo
2026-05-10 23:17   ` David Timber [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=91382b9c-52bb-41c7-9ccd-9045a1827b89@dev.snart.me \
    --to=dxdt@dev.snart.me \
    --cc=Yuezhang.Mo@sony.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sj1557.seo@samsung.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