From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Lameter Subject: Re: [PATCH 02/38] usercopy: Enhance and rename report_usercopy() Date: Thu, 11 Jan 2018 11:06:56 -0600 (CST) Message-ID: References: <1515636190-24061-1-git-send-email-keescook@chromium.org> <1515636190-24061-3-git-send-email-keescook@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1515636190-24061-3-git-send-email-keescook@chromium.org> Sender: owner-linux-mm@kvack.org To: Kees Cook Cc: linux-kernel@vger.kernel.org, Linus Torvalds , David Windsor , Alexander Viro , Andrew Morton , 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.orglin List-Id: linux-arch.vger.kernel.org On Wed, 10 Jan 2018, Kees Cook wrote: > diff --git a/mm/slab.h b/mm/slab.h > index ad657ffa44e5..7d29e69ac310 100644 > --- a/mm/slab.h > +++ b/mm/slab.h > @@ -526,4 +526,10 @@ static inline int cache_random_seq_create(struct kmem_cache *cachep, > static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } > #endif /* CONFIG_SLAB_FREELIST_RANDOM */ > > +#ifdef CONFIG_HARDENED_USERCOPY > +void __noreturn usercopy_abort(const char *name, const char *detail, > + bool to_user, unsigned long offset, > + unsigned long len); > +#endif > + > #endif /* MM_SLAB_H */ This code has nothing to do with slab allocation. Move it into include/linux/uaccess.h where the other user space access definitions are? -- 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 resqmta-ch2-02v.sys.comcast.net ([69.252.207.34]:42290 "EHLO resqmta-ch2-02v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932789AbeAKRG7 (ORCPT ); Thu, 11 Jan 2018 12:06:59 -0500 Date: Thu, 11 Jan 2018 11:06:56 -0600 (CST) From: Christopher Lameter Subject: Re: [PATCH 02/38] usercopy: Enhance and rename report_usercopy() In-Reply-To: <1515636190-24061-3-git-send-email-keescook@chromium.org> Message-ID: References: <1515636190-24061-1-git-send-email-keescook@chromium.org> <1515636190-24061-3-git-send-email-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-arch-owner@vger.kernel.org List-ID: To: Kees Cook Cc: linux-kernel@vger.kernel.org, Linus Torvalds , David Windsor , Alexander Viro , Andrew Morton , 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, linux-mm@kvack.org, kernel-hardening@lists.openwall.com Message-ID: <20180111170656.5Bd0iTwSnPypuzIkGRdDkbW-RoDL9FHjya0svCGhFWs@z> On Wed, 10 Jan 2018, Kees Cook wrote: > diff --git a/mm/slab.h b/mm/slab.h > index ad657ffa44e5..7d29e69ac310 100644 > --- a/mm/slab.h > +++ b/mm/slab.h > @@ -526,4 +526,10 @@ static inline int cache_random_seq_create(struct kmem_cache *cachep, > static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } > #endif /* CONFIG_SLAB_FREELIST_RANDOM */ > > +#ifdef CONFIG_HARDENED_USERCOPY > +void __noreturn usercopy_abort(const char *name, const char *detail, > + bool to_user, unsigned long offset, > + unsigned long len); > +#endif > + > #endif /* MM_SLAB_H */ This code has nothing to do with slab allocation. Move it into include/linux/uaccess.h where the other user space access definitions are?