[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKXa3Nwn_Mz09MPW@kbusch-mbp>
Date: Wed, 20 Aug 2025 08:25:32 -0600
From: Keith Busch <kbusch@...nel.org>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: Keith Busch <kbusch@...a.com>, linux-block@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
snitzer@...nel.org, axboe@...nel.dk, dw@...idwei.uk,
brauner@...nel.org, hch@....de, martin.petersen@...cle.com,
djwong@...nel.org, linux-xfs@...r.kernel.org,
viro@...iv.linux.org.uk
Subject: Re: [PATCHv3 1/8] block: check for valid bio while splitting
On Wed, Aug 20, 2025 at 04:02:31PM +0900, Damien Le Moal wrote:
> On 8/20/25 1:49 AM, Keith Busch wrote:
> > {
> > struct bio_vec bv, bvprv, *bvprvp = NULL;
> > struct bvec_iter iter;
> > unsigned nsegs = 0, bytes = 0;
> >
> > bio_for_each_bvec(bv, bio, iter) {
> > + if (bv.bv_offset & lim->dma_alignment || bv.bv_len & len_align)
>
> Shouldn't this be:
>
> if (bv.bv_offset & len_align || bv.bv_len & len_align)
>
> ?
No, we alwqys need to validate the address offset against the dma
alignment. The length is not validated for passthrough commands though,
so different masks for each so they can be independently set.
Powered by blists - more mailing lists