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]
Date:	Wed, 25 Mar 2009 12:04:01 +0100
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Manuel Lauss <mano@...rinelk.homelinux.net>
Cc:	Pierre Ossman <drzeus@...eus.cx>, linux-kernel@...r.kernel.org
Subject: Re: MMC layer regression with single-block controllers

On Wed, Mar 25 2009, Manuel Lauss wrote:
> Hello Pierre, Jens,
> 
> On Tue, Mar 24, 2009 at 09:01:38PM +0100, Pierre Ossman wrote:
> > On Mon, 23 Mar 2009 10:28:02 +0100
> > Manuel Lauss <mano@...rinelk.homelinux.net> wrote:
> > 
> > > Hello Pierre,
> > > 
> > > Since about 2.6.28-rc1, I hit the following BUG_ON() in mmc/core.c
> > > (line 155):
> > > 
> > >         if (mrq->data) {
> > >                 BUG_ON(mrq->data->blksz > host->max_blk_size);
> > > >>>>>>>>>       BUG_ON(mrq->data->blocks > host->max_blk_count);  <<<<<<
> > >                 BUG_ON(mrq->data->blocks * mrq->data->blksz >
> > >                         host->max_req_size);
> > > 
> > > It's easy to reproduce; just set your favorite host controllers'
> > > mmc->max_blk_cnt to 1 (or anything smaller than 4).  As far as I can
> > > tell it was introduced with some block layer changes before 2.6.28-rc1
> > > was released.
> > > 
> > 
> > Ouch. Have you determined that it is the block layer that isn't
> > respecting its settings? If so, the we probably need to notify Jens
> > Axboe.
> 
> (Added Jens to CC).
> 
> Yes, it seems the block layer doesn't honor the one-sector request made
> in drivers/mmc/card/queue.c:187 (and 161).  The debug log says:
> 
> mmc0: new SD card at address aaaa
> blk_queue_max_sectors: set to minimum 8
> mmc0: starting CMD16 arg 00000200 flags 00000095
> mmc0: req done (CMD16): 0: 00000900 00000000 00000000 00000000
> mmcblk0: mmc0:aaaa SD01G 968 MiB
>  mmcblk0:<7>mmc0: starting CMD18 arg 00000000 flags 000000b5
> mmc0:     blksz 512 blocks 8 flags 00000200 tsac 100 ms nsac 0
> mmc0:     CMD12 arg 00000000 flags 0000049d
> ------------[ cut here ]------------
> kernel BUG at /mnt/work/sh7760/kernel/linux-2.6.git/drivers/mmc/core/core.c:155!
> 
> 
> This "blk_queue_max_sectors: set to minimum 8" is what's haunting my
> mmc host driver (hardware has enormous problems doing multiblock writes,
> hence the limitation to a single block per request).

Well, as the warning tells you, it's not supported. But that doesn't
mean you can't do single sector transfers and complete the IO when you
have done all of them.

-- 
Jens Axboe

--
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