From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBA79C433E6 for ; Mon, 22 Feb 2021 18:27:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B2E564DDA for ; Mon, 22 Feb 2021 18:27:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B2E564DDA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=srcf.ucam.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 97A766B0071; Mon, 22 Feb 2021 13:27:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 92D606B0073; Mon, 22 Feb 2021 13:27:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 819B96B0074; Mon, 22 Feb 2021 13:27:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 6D0B66B0071 for ; Mon, 22 Feb 2021 13:27:22 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3BD6A8777 for ; Mon, 22 Feb 2021 18:27:22 +0000 (UTC) X-FDA: 77846736324.07.290E115 Received: from cavan.codon.org.uk (cavan.codon.org.uk [176.126.240.207]) by imf14.hostedemail.com (Postfix) with ESMTP id 47D37C00041B for ; Mon, 22 Feb 2021 18:27:13 +0000 (UTC) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 2000340A21; Mon, 22 Feb 2021 18:27:18 +0000 (UTC) Date: Mon, 22 Feb 2021 18:27:18 +0000 From: Matthew Garrett To: Mike Rapoport Cc: Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , David Hildenbrand , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Michal Hocko , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org, Hagen Paul Pfeifer , Palmer Dabbelt Subject: Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users Message-ID: <20210222182718.GA15105@codon.org.uk> References: <20210208084920.2884-1-rppt@kernel.org> <20210208084920.2884-9-rppt@kernel.org> <20210222073452.GA30403@codon.org.uk> <20210222102359.GE1447004@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210222102359.GE1447004@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Stat-Signature: sw98sy51mhwuzhfr5s661qr91aotq5kx X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 47D37C00041B Received-SPF: none (codon.org.uk>: No applicable sender policy available) receiver=imf14; identity=mailfrom; envelope-from=""; helo=cavan.codon.org.uk; client-ip=176.126.240.207 X-HE-DKIM-Result: none/none X-HE-Tag: 1614018433-733691 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Feb 22, 2021 at 12:23:59PM +0200, Mike Rapoport wrote: > On Mon, Feb 22, 2021 at 07:34:52AM +0000, Matthew Garrett wrote: > > On Mon, Feb 08, 2021 at 10:49:18AM +0200, Mike Rapoport wrote: > > > > > It is unsafe to allow saving of secretmem areas to the hibernation > > > snapshot as they would be visible after the resume and this essentially > > > will defeat the purpose of secret memory mappings. > > > > Sorry for being a bit late to this - from the point of view of running > > processes (and even the kernel once resume is complete), hibernation is > > effectively equivalent to suspend to RAM. Why do they need to be handled > > differently here? > > Hibernation leaves a copy of the data on the disk which we want to prevent. Who are you worried about seeing it, and at what points in time?