From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753291AbdDKSan (ORCPT ); Tue, 11 Apr 2017 14:30:43 -0400 Received: from resqmta-ch2-12v.sys.comcast.net ([69.252.207.44]:44590 "EHLO resqmta-ch2-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210AbdDKSal (ORCPT ); Tue, 11 Apr 2017 14:30:41 -0400 Date: Tue, 11 Apr 2017 13:30:33 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Kees Cook cc: Andrew Morton , Pekka Enberg , David Rientjes , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: Add additional consistency check In-Reply-To: <20170331164028.GA118828@beast> Message-ID: References: <20170331164028.GA118828@beast> Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfJC/Pjhf2JFfSHZyZy4fJkClZPv4fy16K7D/CrAyirA2I3zgmd9nne+nKLSnHsq8hBWlCUup7TA8ggHVVYNqF3qo9szW6xjlQ0v9YAulrsOlqm6CyMtV 6eg2xqelg61f9mvQD9iJ50t/IqUji96vpagU+is/xRQyzyLYpe02aGF+PKc77a9x6Ds8yo8FskweYJnDKn/hcf08513bKVzTfDGQAGUvXcvu/iw4e5TSXiS4 6ZYKM53FogSs/4snZkevQOWOPEG46GefAa6Q7+CG+GiaA0vf15PSAo96KFY6NbP3AN3EbnX+/P7RcAjrtao1erzW1YUqygBp2e2knv+TljBs+f86cLUShJ7Y PBv8Ql9D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 Mar 2017, Kees Cook wrote: > As found in PaX, this adds a cheap check on heap consistency, just to > notice if things have gotten corrupted in the page lookup. Ok this only affects kmem_cache_free() and not kfree(). For kmem_cache_free() we already have a lot of stuff in the hotpath due to cgruops. If you want this also for kfree() then we need a separate patch. Also for kmem_cache_free(): Here we always have a slab cache and thus we could check the flags that could modify what behavior we want. Acked-by: Christoph Lameter