Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967050AbbDXVis (ORCPT ); Fri, 24 Apr 2015 17:38:48 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:36746 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965514AbbDXVir (ORCPT ); Fri, 24 Apr 2015 17:38:47 -0400 Date: Fri, 24 Apr 2015 14:38:44 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Anisse Astier cc: Andrew Morton , Mel Gorman , "Kirill A. Shutemov" , Alan Cox , Linus Torvalds , Peter Zijlstra , PaX Team , Brad Spengler , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm/page_alloc.c: add config option to sanitize freed pages In-Reply-To: <1429909549-11726-3-git-send-email-anisse@astier.eu> Message-ID: References: <1429909549-11726-1-git-send-email-anisse@astier.eu> <1429909549-11726-3-git-send-email-anisse@astier.eu> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1287 Lines: 32 On Fri, 24 Apr 2015, Anisse Astier wrote: > diff --git a/mm/Kconfig b/mm/Kconfig > index 390214d..cb2df5f 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -635,3 +635,15 @@ config MAX_STACK_SIZE_MB > changed to a smaller value in which case that is used. > > A sane initial value is 80 MB. > + > +config SANITIZE_FREED_PAGES > + bool "Sanitize memory pages after free" > + default n > + help > + This option is used to make sure all pages freed are zeroed. This is > + quite low-level and doesn't handle your slab buffers. > + It has various applications, from preventing some info leaks to > + helping kernel same-page merging in virtualised environments. > + Depending on your workload, it will reduce performance of about 3%. > + > + If unsure, say N. Objection to allowing this without first enabling some other DEBUG config option, it should never be a standalone option, but also to pretending to have any insight into what the performance degredation of it will be. On my systems, this would be _massive_. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/