From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934108AbeALPlM convert rfc822-to-8bit (ORCPT + 1 other); Fri, 12 Jan 2018 10:41:12 -0500 Received: from smtp-out4.electric.net ([192.162.216.185]:58002 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933947AbeALPlK (ORCPT ); Fri, 12 Jan 2018 10:41:10 -0500 From: David Laight To: 'Christopher Lameter' , Kees Cook CC: "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 , Alexander Viro , Andy Lutomirski , Christoph Hellwig , "David S. Miller" , Laura Abbott , Mark Rutland , "Martin K. Petersen" , Paolo Bonzini , Christian Borntraeger , 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" Subject: RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting Thread-Topic: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting Thread-Index: AQHTikEtMNMFXqei5U6RoRU5MJZk06NwWf7g Date: Fri, 12 Jan 2018 15:10:42 +0000 Message-ID: References: <1515531365-37423-1-git-send-email-keescook@chromium.org> <1515531365-37423-5-git-send-email-keescook@chromium.org> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Christopher Lameter > Sent: 10 January 2018 18:28 > On Tue, 9 Jan 2018, Kees Cook wrote: > > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t usersize, > > + void (*ctor)(void *)); > > Hmmm... At some point we should switch kmem_cache_create to pass a struct > containing all the parameters. Otherwise the API will blow up with > additional functions. Or add an extra function to 'configure' the kmem_cache with the extra parameters. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting Date: Fri, 12 Jan 2018 15:10:42 +0000 Message-ID: References: <1515531365-37423-1-git-send-email-keescook@chromium.org> <1515531365-37423-5-git-send-email-keescook@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "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 , Alexander Viro , Andy Lutomirski , Christoph Hellwig , "David S. Miller" , Laura Abbott , Mark Rutland , "Martin K. Petersen" , Paolo Bonzini , Christian Borntraeger , Christoffer Dall , Dave Kleikamp , Jan Kara To: 'Christopher Lameter' , Kees Cook Return-path: In-Reply-To: Content-Language: en-US Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org From: Christopher Lameter > Sent: 10 January 2018 18:28 > On Tue, 9 Jan 2018, Kees Cook wrote: >=20 > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t usersize, > > + void (*ctor)(void *)); >=20 > Hmmm... At some point we should switch kmem_cache_create to pass a struct > containing all the parameters. Otherwise the API will blow up with > additional functions. Or add an extra function to 'configure' the kmem_cache with the extra parameters. David -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: David Laight To: 'Christopher Lameter' , Kees Cook CC: "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 , Alexander Viro , Andy Lutomirski , Christoph Hellwig , "David S. Miller" , Laura Abbott , Mark Rutland , "Martin K. Petersen" , Paolo Bonzini , Christian Borntraeger , 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" Subject: RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting Date: Fri, 12 Jan 2018 15:10:42 +0000 Message-ID: References: <1515531365-37423-1-git-send-email-keescook@chromium.org> <1515531365-37423-5-git-send-email-keescook@chromium.org> In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: From: Christopher Lameter > Sent: 10 January 2018 18:28 > On Tue, 9 Jan 2018, Kees Cook wrote: >=20 > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t usersize, > > + void (*ctor)(void *)); >=20 > Hmmm... At some point we should switch kmem_cache_create to pass a struct > containing all the parameters. Otherwise the API will blow up with > additional functions. Or add an extra function to 'configure' the kmem_cache with the extra parameters. David -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out4.electric.net ([192.162.216.184]:58564 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934192AbeALPsm (ORCPT ); Fri, 12 Jan 2018 10:48:42 -0500 From: David Laight Subject: RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting Date: Fri, 12 Jan 2018 15:10:42 +0000 Message-ID: References: <1515531365-37423-1-git-send-email-keescook@chromium.org> <1515531365-37423-5-git-send-email-keescook@chromium.org> In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: 'Christopher Lameter' , Kees Cook Cc: "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 , Alexander Viro , Andy Lutomirski , Christoph Hellwig , "David S. Miller" , Laura Abbott , Mark Rutland , "Martin K. Petersen" , Paolo Bonzini , Christian Borntraeger , 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" From: Christopher Lameter > Sent: 10 January 2018 18:28 > On Tue, 9 Jan 2018, Kees Cook wrote: > > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t usersize, > > + void (*ctor)(void *)); > > Hmmm... At some point we should switch kmem_cache_create to pass a struct > containing all the parameters. Otherwise the API will blow up with > additional functions. Or add an extra function to 'configure' the kmem_cache with the extra parameters. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Date: Fri, 12 Jan 2018 15:10:42 +0000 Message-ID: References: <1515531365-37423-1-git-send-email-keescook@chromium.org> <1515531365-37423-5-git-send-email-keescook@chromium.org> In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [kernel-hardening] RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting To: 'Christopher Lameter' , Kees Cook Cc: "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 , Alexander Viro , Andy Lutomirski , Christoph Hellwig , "David S. Miller" , Laura Abbott , Mark Rutland , "Martin K. Petersen" , Paolo Bonzini , Christian Borntraeger , 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" List-ID: From: Christopher Lameter > Sent: 10 January 2018 18:28 > On Tue, 9 Jan 2018, Kees Cook wrote: >=20 > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t usersize, > > + void (*ctor)(void *)); >=20 > Hmmm... At some point we should switch kmem_cache_create to pass a struct > containing all the parameters. Otherwise the API will blow up with > additional functions. Or add an extra function to 'configure' the kmem_cache with the extra parameters. David