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, 26 Nov 2014 09:10:59 -0500
From:	Mike Snitzer <snitzer@...hat.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	"Michael S. Tsirkin" <mst@...hat.com>, axboe@...nel.dk,
	linux-kernel@...r.kernel.org, martin.petersen@...cle.com,
	hch@...radead.org, dm-devel@...hat.com
Subject: Re: virtio_blk: fix defaults for max_hw_sectors and max_segment_size

On Wed, Nov 26 2014 at 12:58am -0500,
Rusty Russell <rusty@...tcorp.com.au> wrote:

> Mike Snitzer <snitzer@...hat.com> writes:
> > On Thu, Nov 20 2014 at  3:30pm -0500,
> > Michael S. Tsirkin <mst@...hat.com> wrote:
> >
> >> On Thu, Nov 20, 2014 at 02:00:59PM -0500, Mike Snitzer wrote:
> >> > virtio_blk incorrectly established -1U as the default for these
> >> > queue_limits.  Set these limits to sane default values to avoid crashing
> >> > the kernel.
> > ...
> >> > Attempting to mkfs.xfs against a thin device from this thin-pool quickly
> >> > resulted in fs/direct-io.c:dio_send_cur_page()'s BUG_ON.
> >> 
> >> Why exactly does it BUG_ON?
> >> Did some memory allocation fail?
> >
> > No idea, kernel log doesn't say.. all it has is "kernel BUG" pointing to
> > fs/direct-io.c:dio_send_cur_page()'s BUG_ON.
> >
> > I could dig deeper on _why_ but honestly, there really isn't much point.
> 
> There is *always* a point in understanding the code you are modifying.

Yes, I agree (and understanding the BUG in question will be pursued).
But in the context of the patch I proposed it was irrelevent.
virtio-blk still _should_ fix its limits to reflect those of the block
device it stacks on.  My patch was a stop-gap until proper virtio-blk
protocol extensions were added.  But you don't seem inclined to care.

> > virtio-blk doesn't get to live in fantasy-land just because it happens
> > to think it is limitless.
> 
> Calm down please.

Sure, but it'd have helped if virtio-blk developers demonstrated
acknowledgement that a stacking block driver should stack the limits of
the underlying device.  Instead you decided to trim all related portions
of my reply to mst that were measured and helpful.

> We don't have a sector limit.  We have a segment limit, which is set
> above this line.

Then at a minimum max_hw_sectors should reflect that segment limit.

But again, the underlying device has limits that should be stacked up.
Why is that irrelevent to virtio-blk?  Plus, this is a matter of not
allowing a user to shoot themselves in the foot by fiddling with
traditional block limits only to find in some kernel (*cough* RHEL6)
they result in BUG.

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