From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 8213C6B0069 for ; Fri, 9 Sep 2016 14:29:51 -0400 (EDT) Received: by mail-wm0-f72.google.com with SMTP id g141so19647585wmd.0 for ; Fri, 09 Sep 2016 11:29:51 -0700 (PDT) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com. [2a00:1450:400c:c09::229]) by mx.google.com with ESMTPS id ql8si4146209wjc.120.2016.09.09.11.29.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 11:29:50 -0700 (PDT) Received: by mail-wm0-x229.google.com with SMTP id b187so45508727wme.1 for ; Fri, 09 Sep 2016 11:29:50 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1473410612-6207-1-git-send-email-anisse@astier.eu> References: <1473410612-6207-1-git-send-email-anisse@astier.eu> From: Kees Cook Date: Fri, 9 Sep 2016 11:29:49 -0700 Message-ID: Subject: Re: [PATCH] PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Anisse Astier , Laura Abbott Cc: Linux-MM , Linux PM list , "Kirill A . Shutemov" , Mel Gorman , "Rafael J . Wysocki" , Alan Cox , Andi Kleen , Andrew Morton , Brad Spengler , Dave Hansen , David Rientjes , Jianyu Zhan , Len Brown , Linus Torvalds , Mathias Krause , Michal Hocko , PaX Team , Pavel Machek , Peter Zijlstra , Vlastimil Babka , Yves-Alexis Perez , LKML On Fri, Sep 9, 2016 at 1:43 AM, Anisse Astier wrote: > PAGE_POISONING_ZERO disables zeroing new pages on alloc, they are > poisoned (zeroed) as they become available. > In the hibernate use case, free pages will appear in the system without > being cleared, left there by the loading kernel. > > This patch will make sure free pages are cleared on resume when > PAGE_POISONING_ZERO is enabled. We free the pages just after resume > because we can't do it later: going through any device resume code might > allocate some memory and invalidate the free pages bitmap. > > Thus we don't need to disable hibernation when PAGE_POISONING_ZERO is > enabled. > > Signed-off-by: Anisse Astier > Cc: Kirill A. Shutemov > Cc: Laura Abbott > Cc: Mel Gorman > Cc: Rafael J. Wysocki Cool! Reviewed-by: Kees Cook -Kees -- Kees Cook Nexus Security -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org