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:	Tue, 10 Jun 2014 15:21:18 -0600 (MDT)
From:	Keith Busch <keith.busch@...el.com>
To:	Jens Axboe <axboe@...com>
cc:	Keith Busch <keith.busch@...el.com>,
	Matias Bjørling <m@...rling.me>,
	"willy@...ux.intel.com" <willy@...ux.intel.com>,
	"sbradshaw@...ron.com" <sbradshaw@...ron.com>,
	"tom.leiming@...il.com" <tom.leiming@...il.com>,
	"hch@...radead.org" <hch@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>
Subject: Re: [PATCH v7] NVMe: conversion to blk-mq

On Tue, 10 Jun 2014, Jens Axboe wrote:
> On 06/10/2014 03:10 PM, Keith Busch wrote:
>> On Tue, 10 Jun 2014, Jens Axboe wrote:
>>> On 06/10/2014 01:29 PM, Keith Busch wrote:
>>>> I have two devices, one formatted 4k, the other 512. The 4k is used as
>>>> the TEST_DEV and 512 is used as SCRATCH_DEV. I'm always hitting a BUG
>>>> when
>>>> unmounting the scratch dev in xfstests generic/068. The bug looks like
>>>> nvme was trying to use an SGL that doesn't map correctly to a PRP.
>>>
>>> I'm guessing it's some of the coalescing settings, since the driver is
>>> now using the generic block rq mapping.
>>
>> Ok, sounds right. I mentioned in a way earlier review it doesn't look
>> like a request that doesn't conform to a PRP list would get split anymore,
>> and this test seems to confirm that.
>>
>> Can we create something that will allow a driver to add DMA constraints to
>> a request queue with the rules of a PRP list?
>
> I haven't even looked at the rules - can you briefly outline them? From
> a quick look, seems it does prp chaining for every 512 entries. But
> nvme_setup_prps() looks like voodoo to an uninitiated, it could have
> used a comment or two :-)

Yeah, nvme_setup_prps is probably the least readable code in this driver.
Maybe some comments are in order here...

There are two rules for an SGL to be mappable to a PRP:

1. Every element must have zero page offset, except the first.

2. Every element must end on a page boundary, except the last.
--
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