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]
Date:	Wed, 29 Sep 2010 11:19:18 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	richard -rw- weinberger <richard.weinberger@...il.com>
Cc:	Janjaap Bos <janjaap@....nl>, tj@...nel.org, axboe@...nel.dk,
	mike.miller@...com, user-mode-linux-devel@...ts.sourceforge.net,
	adrian@...en.demon.co.uk, jdike@...toit.com,
	LKML <linux-kernel@...r.kernel.org>, grant.likely@...retlab.ca,
	Geert.Uytterhoeven@...ycom.com, Chris Frey <cdfrey@...rsquare.net>
Subject: Re: [uml-devel] [REGRESSION] um: ubd: block layer issue (Was: ext3
 filesystem corruption in user mode linux)

On Tue, Sep 28, 2010 at 23:19, richard -rw- weinberger
<richard.weinberger@...il.com> wrote:
> On Tue, Sep 28, 2010 at 10:37 PM, Geert Uytterhoeven
> <geert@...ux-m68k.org> wrote:
>>
>> This changeset from 2007 indeed moved the update of req->sector.
>>
>> However, in the new code, before or after applying your patch, there's no update
>> of req->sector anymore. Everything is done in local variables.
>>
>> Is it possible that we only need the hunk below to fix the corruption?
>
> Yes, it seems so. So far all my test cases work fine.
> I'll submit a patch in a few minutes.

Thanks, good to know!

>> | diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
>> | index 5ff5546..655ed9e 100644
>> | --- a/arch/um/drivers/ubd_kern.c
>> | +++ b/arch/um/drivers/ubd_kern.c
>> | @@ -746,8 +746,12 @@ static int ubd_open_dev(struct ubd *ubd_dev)
>> |       }
>> |       ubd_dev->fd = fd;
>> |
>> | +     /* A setting higher than 1 sector currently (v2.6.33) generates
>> | +     data loss, both for raw and cow ubd. */
>> | +     blk_queue_max_sectors(ubd_dev->queue, 1 * sizeof(long));
>> | +     blk_queue_max_phys_segments(ubd_dev->queue, 1 * sizeof(long));
>> | +
>> |       if(ubd_dev->cow.file != NULL){
>> | -             blk_queue_max_sectors(ubd_dev->queue, 8 * sizeof(long));
>> |
>> |               err = -ENOMEM;
>> |               ubd_dev->cow.bitmap = vmalloc(ubd_dev->cow.bitmap_len);

So we can no longer process more than one sector? Why?

Could it be 4d6c84d91d1a539ebc47d1a36a35e9390ba11fdc (ubd: cleanup
completion path),
which is one of the three commits you pointed out?

Before 4d6c84d91d1a539ebc47d1a36a35e9390ba11fdc, blk_end_request() was
only called when
rq->nr_sectors reached zero.
Now it's called for each part.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ