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] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=NiB4hoA5Y8kbR7R8B+J-jJXAHGSu5JdOLSQsj@mail.gmail.com>
Date:	Tue, 28 Sep 2010 21:52:01 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Janjaap Bos <janjaap@....nl>
Cc:	richard -rw- weinberger <richard.weinberger@...il.com>,
	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 19:07, Janjaap Bos <janjaap@....nl> wrote:
> See attached patch, and earlier message posted in March 2010 on uml user
> list. We are out of maintainer...

Thanks for the patch!

| --- a/arch/um/drivers/ubd_kern.c
| +++ b/arch/um/drivers/ubd_kern.c
| @@ -1223,7 +1227,7 @@ static void do_ubd_request(struct request_queue *q)
|       struct io_thread_req *io_req;
|       struct request *req;
|       sector_t sector;
| -     int n;
| +     int n, last_sectors;
|
|       while(1){
|               struct ubd *dev = q->queuedata;
| @@ -1239,9 +1243,12 @@ static void do_ubd_request(struct request_queue *q)
|
|               req = dev->request;
|               sector = blk_rq_pos(req);
| +             last_sectors = 0;
|               while(dev->start_sg < dev->end_sg){
|                       struct scatterlist *sg = &dev->sg[dev->start_sg];
|
| +                     sector += last_sectors;
| +                     last_sectors = 0;
|                       io_req = kmalloc(sizeof(struct io_thread_req),
|                                        GFP_ATOMIC);
|                       if(io_req == NULL){
| @@ -1253,7 +1260,7 @@ static void do_ubd_request(struct request_queue *q)
|                                       (unsigned long long)sector << 9,
|                                       sg->offset, sg->length, sg_page(sg));
|
| -                     sector += sg->length >> 9;
| +                     last_sectors = sg->length >> 9;
|                       n = os_write_file(thread_fd, &io_req,
|                                         sizeof(struct io_thread_req *));
|                       if(n != sizeof(struct io_thread_req *)){

However, I'm wondering what difference this part makes?

> On Tue, 2010-09-28 at 18:16 +0200, richard -rw- weinberger wrote:
>> Hi Tejun!
>>
>> Chris Frey ran into some problems with ext3 on UML.
>> See: http://marc.info/?i=20100924041410.GA18040%20()%20foursquare%20!%20net
>>
>> I can reproduce this issue with any file system on Linux >= 2.6.31.
>> There seems to be a serious problem with the block layer on UML.
>> Under high load any file system gets corrupted.
>>
>> The regression was most likely introduced with this three changes:
>> 83096ebf1263b2c1ee5e653ba37d993d02e3eb7b (block: convert to pos and
>> nr_sectors accessors)
>> f81f2f7c9fee307e371f37424577d46f9eaf8692 (ubd: drop unnecessary
>> rq->sector manipulation)
>> 4d6c84d91d1a539ebc47d1a36a35e9390ba11fdc (ubd: cleanup completion path)
>>
>> Maybe only f81f2f7 is the bad one. They depend on each and I don't
>> know all the internals...

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