Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3902538pxb; Mon, 8 Feb 2021 03:06:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVxwP+Y8QY+rg6VpppO/PwbloLUQ9fihkAufL8pCe3wtuRkV8HUCNu+zuv1wVMW/WVTrRF X-Received: by 2002:aa7:c98e:: with SMTP id c14mr13181446edt.213.1612782405892; Mon, 08 Feb 2021 03:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612782405; cv=none; d=google.com; s=arc-20160816; b=MBm6xAJm86B99KQsQY1bCcZHF8sCZBNLBDIi9EXYgKfNQI6oXsELUaRdEMh3NscQKK cct6Oo0BKXto8ZONIPB+oTxsaC++gUWeIXgD6U4sE/DA7SN2is6don+tif2ckF5hKuHW 9pAJL2ugh81deVL2bBA1RptPB5mIVjAgGzUT4Hp8pDNtNaHZCKqYN4brD0/srTKXq2Ue SsBawdVCB17wuYNLzi4LPGRrlWowcD2X6sEBc0Hf4OT+SAopzwKBMaHrueHjIB8/4+aR PZ9+7SFS4hHr0k7jXXFyX8PE8Nuh67BYN7+xFjwoVQkmRqqXhfD9Q6R9jZTrmGRv2b1o VtnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=IunSUa46r+GP3FYouMvaCEPySjJrYeeUPt7PmYPR+8g=; b=BnmIlAODSj+xm43Q6YPnpmAmXAeMAsRMj9SLimzdh4iyJ3zwGf75y9R6tRBKR+pnWd iH+t/4FGZpLOQFK8lSxwBYuwWEcvafmnHuuNAiNJfe6I7fdLh94mUILiU6iD1a/bRBHY pn8Sp2Bz1ZFomQ6GwxorkIGltxl6QloMqRSsJIWaTkP6EOjCMDV5T9MDZGTlLiiZD5EV vSpsfQ+m7YINi07lInB8IlvMkmEIzpSqPE+rLsv2a6jBsxIJ0PFkBwmG9AuQmDyJQjp+ V/psrV3U1TOsjHk2GEQTDsuwT12DAOcJAIg6hV2Kunrez804AilZKK71B/YuvqFiFmKA aOng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TZbwc0RL; 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=NONE sp=NONE dis=NONE) header.from=redhat.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.06.21; Mon, 08 Feb 2021 03:06: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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TZbwc0RL; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232979AbhBHLDV (ORCPT + 99 others); Mon, 8 Feb 2021 06:03:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43751 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232789AbhBHKzw (ORCPT ); Mon, 8 Feb 2021 05:55:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612781655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IunSUa46r+GP3FYouMvaCEPySjJrYeeUPt7PmYPR+8g=; b=TZbwc0RLMWV4ZhPQR1uw/L4D+gfZUpZ2pzIAlsPMHt8jR7dN/9qwWFZvcr9ZXWVtfnchGo gs0Wyb/FJUK+qFZG9JHdhHAlXATJ7aBURUe+2nd3ekwJSN2xnCT9bEcAsRt+tvukY2zeqP yL0s+ktLiPjXOx/ENE/HgmQdtgexXu0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-148-Lv4C8j0qObOwhL8hIdcnfA-1; Mon, 08 Feb 2021 05:54:11 -0500 X-MC-Unique: Lv4C8j0qObOwhL8hIdcnfA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A0119CC62A; Mon, 8 Feb 2021 10:54:06 +0000 (UTC) Received: from [10.36.113.240] (ovpn-113-240.ams2.redhat.com [10.36.113.240]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB0CB57; Mon, 8 Feb 2021 10:53:58 +0000 (UTC) Subject: Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users To: Michal Hocko 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 References: <20210208084920.2884-1-rppt@kernel.org> <20210208084920.2884-9-rppt@kernel.org> <38c0cad4-ac55-28e4-81c6-4e0414f0620a@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Mon, 8 Feb 2021 11:53:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.02.21 11:51, Michal Hocko wrote: > 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. "Using swap storage for hibernation" and "swapping at runtime" are two different things. I might be wrong, though. -- Thanks, David / dhildenb