Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3890287pxb; Mon, 8 Feb 2021 02:45:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwduszjufRWAh6KDwnU4cLiWiYUcXxkkKdZdGgjrUYLZfxkd0jgvoV83R4rdiU0CLfnsZ/B X-Received: by 2002:a17:906:a28a:: with SMTP id i10mr16395089ejz.422.1612781143462; Mon, 08 Feb 2021 02:45:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612781143; cv=none; d=google.com; s=arc-20160816; b=DzO0+ZUO6b0TEt3ijokdOISODObmZ7miBCAHAhxjOqAB/wYFgOUDd4wsReZ7cWV0yj N5kN+YbeBX40JhtgmIE7ibK7plLjRJphdddudWhfRjO7Tr0bttZINDGnFbKjE44EDHWE 0R6EV0u1CYKoDmxPxamsLmN9cIiomXMqaSzK6JJZU9IZichBPskEwH59i4PYPrGUQH8B PhCCSSh0uH6/Yj1kbiRH3anOxCTlJshoVbYqsGdd9kge1NvOYHrN8E4CAQBm/qGcGdUb n6Hc4dba4K3Z5ugdKww3kQj9zIURndBozS0rwYyGCOUW5Ye+Osn7E1/MGhvg+EefI1mr 1DwA== 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=gTqE4GAwIRRw8Nu7Vah8lYA78avuk6Kq3uIkNKISp9U=; b=ZDZLWoKnDNphM8zOQekXeVIP4P/ZaWkZtNwQxV4IaI2m+rFbEZssTcICMmSX8mfsWN PwWFCBceScTcaYKZ3Q6nptyxz/IHp+9A9CmQm10PM40vwk9ZBJuU5v+yCMhIUMFB9k8e 0DPqUvl+c0Fu90vz8nnNQxZbffFfvn/fWbVZ7Gxoen7+xJos8UG6I17pBhh2RITP6gkP HwQYz+S4mY7cHf3iO0ttNM4a5+8D8tN88YxfkaxZbV48LcoLxUkVsAkIyS2Rd1FTKphj 7BOFLnVn6+vGnjW91/xD+qxjTg9THcl3w1/MsoWM4ShybrwFfrRAIXjgj096rul7WQph sJ0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SREtDrSM; 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 c5si11916894edk.64.2021.02.08.02.45.18; Mon, 08 Feb 2021 02:45:43 -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=SREtDrSM; 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 S232708AbhBHKnQ (ORCPT + 99 others); Mon, 8 Feb 2021 05:43:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47593 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232330AbhBHKeC (ORCPT ); Mon, 8 Feb 2021 05:34:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612780356; 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=gTqE4GAwIRRw8Nu7Vah8lYA78avuk6Kq3uIkNKISp9U=; b=SREtDrSMxvS8bZqrF3nPI2eX301bODYy+p2eWNfPi9VQychFQSGs3suFhP+a9NrNyAeUMJ /B1KF0bA1OHewhykKyyQPUfUk/RXqkciOFPHQsbuDG1pmVa7LXKzVluOQ0x59COgwgAJ3G JLO/LFizdJPe5ctXDJ3ptYoZHgRGO48= 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-281-shzg6BOVMaWLsYhbKcL92A-1; Mon, 08 Feb 2021 05:32:32 -0500 X-MC-Unique: shzg6BOVMaWLsYhbKcL92A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E0C4835E20; Mon, 8 Feb 2021 10:32:27 +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 8816A5D9DD; Mon, 8 Feb 2021 10:32:13 +0000 (UTC) Subject: Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users To: Michal Hocko , Mike Rapoport Cc: 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> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <38c0cad4-ac55-28e4-81c6-4e0414f0620a@redhat.com> Date: Mon, 8 Feb 2021 11:32:11 +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.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Thanks, David / dhildenb