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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <A81AF482-D4FE-4449-B42F-FA31651F93BD@oracle.com>
Date:   Wed, 23 Nov 2022 17:54:37 +0000
From:   Chuck Lever III <chuck.lever@...cle.com>
To:     Anders Blomdell <anders.blomdell@...trol.lth.se>
CC:     Jeff Layton <jlayton@...nel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH 1/1] Make nfsd_splice_actor work with reads with a
 non-zero offset that doesn't end on a page boundary



> On Nov 23, 2022, at 12:50 PM, Anders Blomdell <anders.blomdell@...trol.lth.se> wrote:
> 
> Make nfsd_splice_actor work with reads with a non-zero offset that doesn't end on a page boundary.
> 
> This was found when virtual machines with nfs-mounted qcow2 disks failed to boot properly (originally found
> on v6.0.5, fix also needed and tested on v6.0.9 and v6.1-rc6).
> 
> Signed-off-by: Anders Blomdell <anders.blomdell@...trol.lth.se>
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2142132
> Fixes: bfbfb6182ad1 "nfsd_splice_actor(): handle compound pages"
> Cc: stable@...r.kernel.org # v6.0+
> 
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -873,7 +873,7 @@ nfsd_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
>        unsigned offset = buf->offset;
>         page += offset / PAGE_SIZE;
> -       for (int i = sd->len; i > 0; i -= PAGE_SIZE)
> +       for (int i = sd->len + offset % PAGE_SIZE; i > 0; i -= PAGE_SIZE)
>                svc_rqst_replace_page(rqstp, page++);
>        if (rqstp->rq_res.page_len == 0)        // first call
>                rqstp->rq_res.page_base = offset % PAGE_SIZE;

Thanks. I actually find Al's suggestion (posted in the other thread)
preferable. Can you test that and repost? I will then apply the fix
immediately to nfsd's for-rc tree.


--
Chuck Lever



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ