Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 29 Jan 2020 18:19:56 +0100
From: Christian Borntraeger <>
To: Christoph Hellwig <>
Cc: Christopher Lameter <>, Kees Cook <>,
        Jiri Slaby <>, Julian Wiedmann <>,
        Ursula Braun <>,
        Alexander Viro
 <>,, David Windsor <>,
        Pekka Enberg <>,
        David Rientjes <>,
        Joonsoo Kim <>,
        Andrew Morton <>,,,
        Linus Torvalds <>,
        Andy Lutomirski <>,
        "David S. Miller" <>,
        Laura Abbott <>, Mark Rutland <>,
        "Martin K. Petersen" <>,
        Paolo Bonzini <>,
        Christoffer Dall <>,
        Dave Kleikamp <>, Jan Kara <>,
        Luis de Bethencourt <>,
        Marc Zyngier
 <>, Rik van Riel <>,
        Matthew Garrett <>,,,,, Vlastimil Babka <>,
        Michal Kubecek <>
Subject: Re: [PATCH 09/38] usercopy: Mark kmalloc caches as
 usercopy caches

On 29.01.20 18:09, Christoph Hellwig wrote:
> On Wed, Jan 29, 2020 at 06:07:14PM +0100, Christian Borntraeger wrote:
>>> DMA can be done to NORMAL memory as well.
>> Exactly. 
>> I think iucv uses GFP_DMA because z/VM needs those buffers to reside below 2GB (which is ZONA_DMA for s390).
> The normal way to allocate memory with addressing limits would be to
> use dma_alloc_coherent and friends.  Any chance to switch iucv over to
> that?  Or is there no device associated with it?

There is not necessarily a device for that. It is a hypervisor interface (an
instruction that is interpreted by z/VM). We do have the netiucv driver that
creates a virtual nic, but there is also AF_IUCV which works without a device.

But back to the original question: If we mark kmalloc caches as usercopy caches,
we should do the same for DMA kmalloc caches. As outlined by Christoph, this has
nothing to do with device DMA.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.