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: <065b8a56-9546-b2d2-695c-7d56df0eab6d@control.lth.se>
Date:   Thu, 24 Nov 2022 10:12:10 +0100
From:   Anders Blomdell <anders.blomdell@...trol.lth.se>
To:     Chuck Lever III <chuck.lever@...cle.com>,
        Benjamin Coddington <bcodding@...hat.com>
CC:     Jeff Layton <jlayton@...nel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Anna Schumaker <anna@...nel.org>,
        Trond Myklebust <trond.myklebust@...merspace.com>
Subject: Re: Kernel 6.0.5 breaks virtual machines that boot from nfs mounted
 qcow2 images



On 2022-11-23 18:57, Anders Blomdell wrote:
> 
> 
> On 2022-11-23 18:51, Chuck Lever III wrote:
>>
>>> On Nov 23, 2022, at 12:49 PM, Benjamin Coddington <bcodding@...hat.com> wrote:
>>>
>>> On 23 Nov 2022, at 5:08, Anders Blomdell wrote:
>>>
>>>> Our problems turned out to be a fallout of Al Viros's splice rework, where nfsd reads with non-zero offsets and not ending
>>>> on a page boundary failed to remap the last page. I belive that this is a decent fix for that problem (tested on v6.1-rc6,
>>>> 6.0.7 and 6.0.9)
>>>>
>>>> ---- 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;
>>>
>>>
>>> Does anyone have insight into how we could possibly have caught this in testing?
>>
>> Was also wondering this. I had though fstests (via fsx) would have exercised
>> this usage scenario.
> My guess is that one has to look very hard at qcow2 handling in qemu...
aio_read seems to trigger the problem, but there is a lot of buffering going on that I don't understand
(e.g even short aio_reads leads to 16384 bytes read)

/Anders
-- 
Anders Blomdell                  Email: anders.blomdell@...trol.lth.se
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118
SE-221 00 Lund, Sweden

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ