Received: by 2002:a05:6520:3645:b029:c0:f950:43e0 with SMTP id l5csp458615lki; Mon, 22 Feb 2021 10:29:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoyjuCanqHRnbtqenxbMB7yXX1QWnibMeADzA/wW35/jwVn7PTSiIuQgymM0HkkkZ9ko8r X-Received: by 2002:aa7:c704:: with SMTP id i4mr19303651edq.95.1614018585992; Mon, 22 Feb 2021 10:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614018585; cv=none; d=google.com; s=arc-20160816; b=rtuTqN5FeTwVBkaYOZWKC0adJWplGfSnpYGslRaH4Zsi7Y5ANtNjU3XH2t542IF3ih ZUfzdjGyyQJ2kPHikxabLUNNiymAjF1fl2YXnTIsDm2ZH44tuopAqVqvbTP3WQiv/0SE RG0+nMNqTrqPze0zqRJnnX4cFriwcICEiYd2n2NKtFeYu2F8LlOWmX8J4ZCjdklMBgxQ N8vh5+H+FkdSTEMv7kMfA2j//cOPRvRjuD21mmCHhzAuC+oGTG1UxO740X689HbfRf8U Hv+wugUk2/VMFYwW/yU0ctetw2szNkf7iy9BxKoU4hBwt6or9pakRJOO4FP0shhrF40r zp3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=TLvam5jMLvyp0bQ30/h4tFXXhE6XV91dL55z8l0S9w8=; b=DukQA4JLsIvrZfIgAfym4gAcpFkly0IbRIBIahAV6KKT1sDBwQUoKreq2MWDuUWXX7 esxDiYsE8ZDFuB7JoCI395sRNRmaFi6MywZID+QFQnkLPL0zixe5dX7ypLg5Jakr8rTz /LuQ13AkzHs9lxbb8FhxL0Lqo+PXeJ/1xhW+kBLFOzSAwMVIEmNCblZCFxkxo2KYyvAh OJsOFuK42H57uJD6vh+24HhZ9CsuMXaU7KuWuIAlMkzW9Bf0+a8RPzdLQa+KaC8NQN1r +fA5Evlqg+EnVMZxITfoFx+ujGAIsxLrdSfH2+R+lgeJ6vpF+f/qR5JYqteR+J2wydah h/OQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si5262204ejy.279.2021.02.22.10.29.22; Mon, 22 Feb 2021 10:29:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232524AbhBVS2k (ORCPT + 99 others); Mon, 22 Feb 2021 13:28:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbhBVS2B (ORCPT ); Mon, 22 Feb 2021 13:28:01 -0500 Received: from cavan.codon.org.uk (cavan.codon.org.uk [IPv6:2a00:1098:84:22e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A89AFC06178A; Mon, 22 Feb 2021 10:27:19 -0800 (PST) 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?