Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751724AbbEDVwl (ORCPT ); Mon, 4 May 2015 17:52:41 -0400 Received: from r00tworld.com ([212.85.137.150]:52260 "EHLO r00tworld.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbbEDVwU (ORCPT ); Mon, 4 May 2015 17:52:20 -0400 From: "PaX Team" To: Anisse Astier Date: Mon, 04 May 2015 23:50:14 +0200 MIME-Version: 1.0 Subject: Re: [PATCH v2 2/4] mm/page_alloc.c: add config option to sanitize freed pages Reply-to: pageexec@freemail.hu CC: Andrew Morton , Mel Gorman , "Kirill A. Shutemov" , David Rientjes , Alan Cox , Linus Torvalds , Peter Zijlstra , Brad Spengler , Kees Cook , Andi Kleen , linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-ID: <5547E996.30078.8008582@pageexec.freemail.hu> In-reply-to: <1430774218-5311-3-git-send-email-anisse@astier.eu> References: <1430774218-5311-1-git-send-email-anisse@astier.eu>, <1430774218-5311-3-git-send-email-anisse@astier.eu> X-mailer: Pegasus Mail for Windows (4.70) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.12 (r00tworld.com [212.85.137.150]); Mon, 04 May 2015 23:50:32 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 999 Lines: 24 On 4 May 2015 at 23:16, Anisse Astier wrote: > @@ -960,9 +966,15 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags, > kernel_map_pages(page, 1 << order, 1); > kasan_alloc_pages(page, order); > > +#ifndef CONFIG_SANITIZE_FREED_PAGES > + /* SANITIZE_FREED_PAGES relies implicitly on the fact that pages are > + * cleared before use, so we don't need gfp zero in the default case > + * because all pages go through the free_pages_prepare code path when > + * switching from bootmem to the default allocator */ > if (gfp_flags & __GFP_ZERO) > for (i = 0; i < (1 << order); i++) > clear_highpage(page + i); > +#endif this hunk should not be applied before the hibernation fix otherwise bisect will break. -- 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/