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  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:   Thu, 30 Aug 2018 13:17:40 -0600
From:   Logan Gunthorpe <>
To:     Jens Axboe <>,,,,,,
Cc:     Stephen Bates <>,
        Christoph Hellwig <>,
        Keith Busch <>,
        Sagi Grimberg <>,
        Bjorn Helgaas <>,
        Jason Gunthorpe <>,
        Max Gurtovoy <>,
        Dan Williams <>,
        Jérôme Glisse <>,
        Benjamin Herrenschmidt <>,
        Alex Williamson <>,
        Christian König <>
Subject: Re: [PATCH v5 07/13] block: Add PCI P2P flag for request queue and
 check support for requests

On 30/08/18 01:11 PM, Jens Axboe wrote:
> On 8/30/18 12:53 PM, Logan Gunthorpe wrote:
>> QUEUE_FLAG_PCI_P2P is introduced meaning a driver's request queue
>> supports targeting P2P memory.
>> When a request is submitted we check if PCI P2PDMA memory is assigned
>> to the first page in the bio. If it is, we ensure the queue it's
>> submitted to supports it, and enforce REQ_NOMERGE.
> I think this belongs in the caller - both the validity check, and
> passing in NOMERGE for this type of request. I don't want to impose
> this overhead on everything, for a pretty niche case.

Well, the point was to prevent driver writers from doing the wrong
thing. The WARN_ON would be a bit pointless in the driver if we rely on
the driver to either do the right thing or add the WARN_ON themselves.

If I'm going to change anything I'd drop the warning entirely and move
the NO_MERGE back into the caller...

Note: the check will be compiled out if the kernel does not support PCI P2P.


Powered by blists - more mailing lists