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 v0 1/2] exfat: add volume limit bounds checks
Date: Thu, 30 Apr 2026 18:17:56 +0900	[thread overview]
Message-ID: <70c86ffd-b0ff-477f-965b-b144faf80f22@dev.snart.me> (raw)
In-Reply-To: <PUZPR04MB6316951E45F7BC9A02E490FE81352@PUZPR04MB6316.apcprd04.prod.outlook.com>

On 4/30/26 16:52, Yuezhang.Mo@sony.com wrote:
>> +	/* Actually try reading the last sector to see if it's within the blockdev bounds */
>> +	bh = sb_bread(sb, last_sector);
>> +	if (bh == NULL) {
>> +		exfat_err(sb, "last sector read failed : %lld", last_sector);
>> +		return -EIO;
>> +	}
>> +	brelse(bh);
> Instead of checking by reading the last sector, we can use bdev_nr_sectors() to 
> get the actual size of the volume.
Agreed. No need for exFAT to actually inspect the data at the last
sector, unlike XFS. Monkey see, monkey doo.



      reply	other threads:[~2026-04-30  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 16:08 [PATCH v0 1/2] exfat: add volume limit bounds checks David Timber
2026-04-29 16:08 ` [PATCH v0 2/2] exfat: print warning upon block size calibration David Timber
2026-04-30  7:52 ` [PATCH v0 1/2] exfat: add volume limit bounds checks Yuezhang.Mo
2026-04-30  9: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=70c86ffd-b0ff-477f-965b-b144faf80f22@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