lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR21MB151319DCEC69835549413643CE3C9@DM6PR21MB1513.namprd21.prod.outlook.com>
Date:   Thu, 3 Jun 2021 19:01:27 +0000
From:   Long Li <longli@...rosoft.com>
To:     "longli@...uxonhyperv.com" <longli@...uxonhyperv.com>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>
CC:     Jens Axboe <axboe@...nel.dk>,
        Johannes Thumshirn <johannes.thumshirn@....com>,
        Pavel Begunkov <asml.silence@...il.com>,
        Ming Lei <ming.lei@...hat.com>, Tejun Heo <tj@...nel.org>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Jeffle Xu <jefflexu@...ux.alibaba.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH] block: return the correct first bvec when checking for
 gaps

Hi,

Please discard this patch as it's from a wrong work branch. The patch is not complete. I'll resubmit.

Long

> -----Original Message-----
> From: longli@...uxonhyperv.com <longli@...uxonhyperv.com>
> Sent: Thursday, June 3, 2021 11:47 AM
> To: linux-block@...r.kernel.org
> Cc: Long Li <longli@...rosoft.com>; Jens Axboe <axboe@...nel.dk>;
> Johannes Thumshirn <johannes.thumshirn@....com>; Pavel Begunkov
> <asml.silence@...il.com>; Ming Lei <ming.lei@...hat.com>; Tejun Heo
> <tj@...nel.org>; Matthew Wilcox (Oracle) <willy@...radead.org>; Jeffle Xu
> <jefflexu@...ux.alibaba.com>; linux-kernel@...r.kernel.org;
> stable@...r.kernel.org
> Subject: [PATCH] block: return the correct first bvec when checking for gaps
> 
> From: Long Li <longli@...rosoft.com>
> 
> After commit 07173c3ec276 ("block: enable multipage bvecs"), a bvec can
> have multiple pages. But bio_will_gap() still assumes one page bvec while
> checking for merging. This causes data corruption on drivers relying on the
> correct merging on virt_boundary_mask.
> 
> Fix this by returning the bvec for multi-page bvec.
> 
> Cc: Jens Axboe <axboe@...nel.dk>
> Cc: Johannes Thumshirn <johannes.thumshirn@....com>
> Cc: Pavel Begunkov <asml.silence@...il.com>
> Cc: Ming Lei <ming.lei@...hat.com>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>
> Cc: Jeffle Xu <jefflexu@...ux.alibaba.com>
> Cc: linux-kernel@...r.kernel.org
> Cc: stable@...r.kernel.org
> Fixes: 07173c3ec276 ("block: enable multipage bvecs")
> Signed-off-by: Long Li <longli@...rosoft.com>
> ---
>  include/linux/bio.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/bio.h b/include/linux/bio.h index
> a0b4cfdf62a4..e89242a53bbc 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -271,7 +271,7 @@ static inline void bio_clear_flag(struct bio *bio,
> unsigned int bit)
> 
>  static inline void bio_get_first_bvec(struct bio *bio, struct bio_vec *bv)  {
> -	*bv = bio_iovec(bio);
> +	*bv = mp_bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter);
>  }
> 
>  static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv)
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ