From: Damien Le Moal <dlemoal@kernel.org>
To: ZHOU Jiaxiang <26066541r@connect.polyu.hk>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
"Martin K . Petersen" <mkp@kernel.org>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 2/2] scsi: sd_zbc: reject disks with too many zones
Date: Sat, 12 Sep 2026 08:25:22 +0900 [thread overview]
Message-ID: <540d0904-0e9a-4b34-bc6f-b4f31f3cb3fa@kernel.org> (raw)
In-Reply-To: <20260911144614.39553-3-26066541r@connect.polyu.hk>
On 9/11/26 23:46, ZHOU Jiaxiang wrote:
> sd_zbc_read_zones() computes the number of zones with 64-bit
> arithmetic and stores the result in the unsigned int nr_zones field
> of struct zoned_disk_info, silently truncating counts that exceed 32
> bits. The truncated count is later used to size per-zone resources,
> while the device may still report more zones than fit.
>
> Reject such devices at scan time: more than 4 billion zones is not
> realistic for any medium that exists today, and accepting the
> truncated count produces inconsistent zone bookkeeping.
>
> Signed-off-by: ZHOU Jiaxiang <26066541r@connect.polyu.hk>
This needs a Fixes tag.
With that added, please feel free to add:
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-09-11 23:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 14:46 [PATCH v2 0/2] block/scsi: fix zones_cond out-of-bounds write on zone report ZHOU Jiaxiang
2026-09-11 14:46 ` [PATCH v2 1/2] block: " ZHOU Jiaxiang
2026-09-11 14:46 ` [PATCH v2 2/2] scsi: sd_zbc: reject disks with too many zones ZHOU Jiaxiang
2026-09-11 23:25 ` Damien Le Moal [this message]
2026-09-11 14:58 ` [PATCH v2 0/2] block/scsi: fix zones_cond out-of-bounds write on zone report Johannes Thumshirn
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=540d0904-0e9a-4b34-bc6f-b4f31f3cb3fa@kernel.org \
--to=dlemoal@kernel.org \
--cc=26066541r@connect.polyu.hk \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.