Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935010AbeAKRHD (ORCPT + 1 other); Thu, 11 Jan 2018 12:07:03 -0500 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:41080 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932752AbeAKRG7 (ORCPT ); Thu, 11 Jan 2018 12:06:59 -0500 Date: Thu, 11 Jan 2018 11:06:56 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake 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 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfKf2iktqMcc0kuCBLCgmWHObwpBDw1NKKm2gRcUX1mkHGxc3avhLsQORMySsvvXSGmlrJIzndU5sFygWT1eu+GtORdzGcMuZsrqqpJYlVRqK5h8/xcuA x7VIZyZ+GQLFqby5jiR8IvVMqxviqll0VSV4Y0ybwnTCVmVEIMym0qggalQDTXJ9uVw5IjpJcvMbqTUpiS2wVmrApjRHTCqYQX4Pk5ueLa8FxBOpRCfgO0LA yJp2cuYRL+gHpoUlvXBxrm5L2oDgdOvVdlSaAsQFK+gBzQ6GTn/XKiKpgHQ6FM7+Dpma2i0nc06MexpwaJI6bnXaedma86ZOq3MS73D8nTZQMv/uR0qlcnpt Hjc/6/nIDI3yZrzQdGJor2T4NhLrx2Q2J1xC96Ht9NGHtOBl8djO/xNmmLvtPnzePN1GeeFzKgrq4l1jE6ESrrWU7DJW20n+y/1KBLLu3tYMuhHEG1V8X0e0 5V9fmyXls9AsnbERUed0l+5T9ILEFbItQ8N9PMcF4QTBrlf/YbfbtY9QThBEr3gXNcSNBuPDlv1QA9eLFMCfh3rjdqufP2fvrdc+X4S788guyrViXKMMoQ+o DbCPLkw8UM6fU7d8wxTxdZFKEZO0MgwL56MZ2gtYcoNFNhj4HYfLyb6pBWmQA2eccuEZFO+1f+EQFBKYzakxTiErTFkaa/lEb3nPqoky4QtStPi0wcphWv2T XA33A+c2ggd1TaQUuaUk6hx64uuI6i2vqkPCQKlLMuxhN+jriUFLX02N/sk5Hv9OwVcHicGuLGc2FP0NTnZG8ji7gO4V+bfHXCPPzW03vxpfREgRYEPTbCZN qhNBm0Z/M0m47xGzOicLJWvyX+WbG4Q/WLE2DkZLceh8u2OyxfKRrl3v2gNeHQp281OdRKEMxs9X7Zxv5pLKT67i34+dQ3crpTWNFGg/gomJsHYy24C/ozTW kc1JQ3Tp2tQMmMyoWThp4qIDDfBHPna29fNVDstogES60nL2T9nGJIN4J+0OIoowYRTd7w== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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?