Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3898509pxb; Mon, 8 Feb 2021 03:01:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2Tk7VmTrdD9UfRVTY2+x2N3nWfDr8T2GPZB/nZ/hq15MrpsjjcqW4SIBUiwKP9s4h4cnd X-Received: by 2002:a17:906:35d7:: with SMTP id p23mr15948338ejb.362.1612782069050; Mon, 08 Feb 2021 03:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612782069; cv=none; d=google.com; s=arc-20160816; b=pYAeLLUsivqJac1sVWbBxIo5xxeRj5YWSdV1RfKVAT+2MRZ5wPuCy7e3JS6NilScv8 Ag1Q4o6te/Thnnktw2tWuVmv50q4pbyXhwn/pceaYRaXVllaWYMF/CqKsdxDPQQnDnyq h4sdth6GhCcNVarOfUJzbLMLH4EITjDojzsEOpA47IPr6wQ17DXnkz99IYmEdaZp/AXV OOwaZCm0J7OxR470JjINV35TOaA52qhptRzmRG8iw00Kb8QF2aDKVQ9Wf/VghtKW5FSH 6djjUzDiIqq6cUNfF0SAyXbO4CFcMPp4JzlBRcGGeRInwztUwOR87cvVhotNCHhijOBN 6/zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HqDzYZJj1JL8yulwepFTzNw6Mh0UlkDMkwLo91us+Nw=; b=aAP8afVuLalBbiSPXeXR3j9AkdE0XDzNh9kGmYauwqYiaUTQ5grxqtG2RI7UsZCfw/ 8JnLvwqvhe7QpFDhE2P33BCyxRkCdYQbJxUINJru2f5Fo2XlrHTKcSy7dRHB45wzU5zr ui77PBh+f8wBUSMwWeZ4Yp1QG9NSn9XHgc90Grxmxv6zfNFt6luEQlZvWoF5eI4z2Nta N84qTwXQJyxwZqACvYmv4FKRD7XmqN3sEixeKMdfATC6dg7nIHJTblFQuITLIOgRqL4h mlKHi610ZMJGHWATVpxkrj3g5kUDjsuy7sZD5S8jV1z74Aim9YOB64B6ftGmKro/SrH+ 03Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=NW6cSXQt; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si14615336edi.293.2021.02.08.03.00.41; Mon, 08 Feb 2021 03:01:09 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=NW6cSXQt; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231466AbhBHK7j (ORCPT + 99 others); Mon, 8 Feb 2021 05:59:39 -0500 Received: from mx2.suse.de ([195.135.220.15]:52294 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232478AbhBHKwc (ORCPT ); Mon, 8 Feb 2021 05:52:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1612781506; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HqDzYZJj1JL8yulwepFTzNw6Mh0UlkDMkwLo91us+Nw=; b=NW6cSXQt5vKQIC6IyRBjI03RsTggfacnmMQkPXVlyHTYQnhUREooi7Orv+OqfRI7917Lxz 3nZxkT5RnnKOC3tcopxasEwHneBW4NQ+AZ2h7Uzl6P3ycEWbNjYfJ5Lj058U4V6l82Ro1L 1F8EZ3u1FlnDVFRaGEZB3SZ5/MOrsnY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0DE41AC6E; Mon, 8 Feb 2021 10:51:46 +0000 (UTC) Date: Mon, 8 Feb 2021 11:51:45 +0100 From: Michal Hocko To: David Hildenbrand Cc: Mike Rapoport , Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , 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: References: <20210208084920.2884-1-rppt@kernel.org> <20210208084920.2884-9-rppt@kernel.org> <38c0cad4-ac55-28e4-81c6-4e0414f0620a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <38c0cad4-ac55-28e4-81c6-4e0414f0620a@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 08-02-21 11:32:11, David Hildenbrand wrote: > On 08.02.21 11:18, Michal Hocko wrote: > > On Mon 08-02-21 10:49:18, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > 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. > > > > > > Prevent hibernation whenever there are active secret memory users. > > > > Does this feature need any special handling? As it is effectivelly > > unevictable memory then it should behave the same as other mlock, ramfs > > which should already disable hibernation as those cannot be swapped out, > > no? > > > > Why should unevictable memory not go to swap when hibernating? We're merely > dumping all of our system RAM (including any unmovable allocations) to swap > storage and the system is essentially completely halted. > My understanding is that mlock is never really made visible via swap storage. -- Michal Hocko SUSE Labs