Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752675AbeAJSbx (ORCPT + 1 other); Wed, 10 Jan 2018 13:31:53 -0500 Received: from resqmta-po-05v.sys.comcast.net ([96.114.154.164]:56730 "EHLO resqmta-po-05v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbeAJSbv (ORCPT ); Wed, 10 Jan 2018 13:31:51 -0500 Date: Wed, 10 Jan 2018 12:31:47 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Kees Cook cc: linux-kernel@vger.kernel.org, David Windsor , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Laura Abbott , Ingo Molnar , Mark Rutland , linux-mm@kvack.org, linux-xfs@vger.kernel.org, Linus Torvalds , Alexander Viro , Andy Lutomirski , Christoph Hellwig , "David S. Miller" , "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 05/36] usercopy: WARN() on slab cache usercopy region violations In-Reply-To: <1515531365-37423-6-git-send-email-keescook@chromium.org> Message-ID: References: <1515531365-37423-1-git-send-email-keescook@chromium.org> <1515531365-37423-6-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: MS4wfI0pO/kHlA47MTv6sAfejZcTjDhr3kjdVY/eK/k5vJ1brAVUKWOtwhfxhwM3tRl6tZcbmqOlG02nZkq+EcaoZmkjDx+L31L/JgNqP4JrSbcuwP/TPTn0 yTleRXzhEQT0JB72pGzN56c2cw4Z2xKJ13hQ962masfFbC2vsVeG7aHoUZLm8gH9S+UaoGi9pajvZTuts6AtRyrOcLDk27QhXFD6jtjGjO/FaWE3SSMRX+38 PBdUEBGnHOSNH8o/qSmk8ZeLVl74OagoG6epAJGZEC+3vWpI1HUjka87S722bRGKz9kgPVEqurAs/HVyuNmTUcJ5h4TYd0uOgzpvvlSoiDL1Z77SvzJJ7/GV mthSc+ezR2BsaoPl5ab2vs1YUnsq7XGkBZrrNK9LoA3jLq0O7mY15QhRpb78M4Kc8PFkfQwDAkX0cZ3J/sVu/I0XpxNDeIuDyoY6kWxqt2onKDBChEDI87Zo 7v6H8UTNgAfn5p66DrmTZk+Ahqay3v5cu+lx4yRKQ+A1kkcsxEeuXDDWl45ZEUqAa/y0ulUvibAQc6Lj6aM2Zs7JdzOTlTk7xrdyWgAvvT2aLwgiJ/U1hIdB lTLhS1z+2jtgBs2RaToWWWXG2n+9LGF+ZMUCUJrWa1a7SDhDtMSqbCBiwbcI5ENyRGhomic93JI4vsxP9FAKC/I1cqhAg7zzriQPT99Yfo1wk97YnveQ2fXR I6mLpr3zCWH/GpGL/cQybDvNKf6D9WeWxCqwqEYpFOFYINbqPdEZtiwCKsLTdtFQUbNbKPPh9t91aDRbDQicmZTydo60kxQAlR1EdHEklr5DrSyTyrP7+lVz rS2uJWo81njcMGwYOi1kDlC7f5KiOgEHlgn4vDOHWmeYQ/+Kcgv0gILQeQkVTEnlPax0E6nF0lPA3T8H4RDMAGcFfNidD0MLHrvbpi1PVJi5W9c8iHRz6hPO h+oCsMk0nV1ciM2RFIEnLeYIYyZ1lVuA6BUN2xeOw7cZKC67qJFY3FVEpm6qtAh6ZbwSG4qbAnt7lYiQn63gcEUSRN4SYQLHrqsaF+dckYrI50apalTj7WBa kdRScSQ5y/vFiiFX6zc7HbCjh/j9wJOI6PW3ufv44ctCwfFx80DAzyr/8S0d1i5MC5/54ukkLSFY09OJvrO9B65f1d9Bt/5kwCQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, 9 Jan 2018, Kees Cook wrote: > @@ -3823,11 +3825,9 @@ int __check_heap_object(const void *ptr, unsigned long n, struct page *page, Could we do the check in mm_slab_common.c for all allocators and just have a small function in each allocators that give you the metadata needed for the object? > + * carefully audit the whitelist range). > + */ > int report_usercopy(const char *name, const char *detail, bool to_user, > unsigned long offset, unsigned long len) > { Should this not be added earlier?