From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [kernel-hardening] [PATCH 09/38] usercopy: Mark kmalloc caches as usercopy caches Date: Wed, 29 Jan 2020 09:09:39 -0800 Message-ID: <20200129170939.GA4277@infradead.org> References: <1515636190-24061-10-git-send-email-keescook@chromium.org> <9519edb7-456a-a2fa-659e-3e5a1ff89466@suse.cz> <201911121313.1097D6EE@keescook> <201911141327.4DE6510@keescook> <202001271519.AA6ADEACF0@keescook> <5861936c-1fe1-4c44-d012-26efa0c8b6e7@de.ibm.com> <202001281457.FA11CC313A@keescook> <6844ea47-8e0e-4fb7-d86f-68046995a749@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <6844ea47-8e0e-4fb7-d86f-68046995a749@de.ibm.com> Sender: linux-kernel-owner@vger.kernel.org To: Christian Borntraeger Cc: Christopher Lameter , Kees Cook , Jiri Slaby , Julian Wiedmann , Ursula Braun , Alexander Viro , linux-kernel@vger.kernel.org, David Windsor , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-xfs@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Christoph Hellwig , "David S. Miller" , Laura Abbott , Mark Rutland , "Martin K. Petersen" List-Id: linux-arch.vger.kernel.org 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? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 29 Jan 2020 09:09:39 -0800 From: Christoph Hellwig Subject: Re: [kernel-hardening] [PATCH 09/38] usercopy: Mark kmalloc caches as usercopy caches Message-ID: <20200129170939.GA4277@infradead.org> References: <1515636190-24061-10-git-send-email-keescook@chromium.org> <9519edb7-456a-a2fa-659e-3e5a1ff89466@suse.cz> <201911121313.1097D6EE@keescook> <201911141327.4DE6510@keescook> <202001271519.AA6ADEACF0@keescook> <5861936c-1fe1-4c44-d012-26efa0c8b6e7@de.ibm.com> <202001281457.FA11CC313A@keescook> <6844ea47-8e0e-4fb7-d86f-68046995a749@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6844ea47-8e0e-4fb7-d86f-68046995a749@de.ibm.com> Sender: owner-linux-mm@kvack.org To: Christian Borntraeger Cc: Christopher Lameter , Kees Cook , Jiri Slaby , Julian Wiedmann , Ursula Braun , Alexander Viro , linux-kernel@vger.kernel.org, David Windsor , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-xfs@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Christoph Hellwig , "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 , linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org, kernel-hardening@lists.openwall.com, Vlastimil Babka , Michal Kubecek List-ID: Message-ID: <20200129170939.E7detbzIL9mG5Kw1rDCqtkDXIilM5rcY6gmIKYaWOhE@z> 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?