Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp16107pxb; Mon, 8 Feb 2021 13:50:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqd6gjWfDPvh81Oc195DOugquVv1R4Jaz7AAlLZ2NHejpEKIyWWQy5dLPEIWzWMZQQGDKc X-Received: by 2002:a17:907:3f29:: with SMTP id hq41mr19121357ejc.227.1612821027407; Mon, 08 Feb 2021 13:50:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612821027; cv=none; d=google.com; s=arc-20160816; b=sWBOUPeoasxcIYIhl1R2POLhvGV1wjLUKOAi6IIre1H/zQI6iF4Mq9WukRwSjJ5LfB gCYrTTAwYc2/cbJx226D/DLXVEDVGApM2LbrfyjVx8szicbW/lCyoOwpO6SSr5NEK7yU 06KIHIzTxLy5KQJRR7NSYy77y6nACFpj/xBrKfhFlPqWl7mIwZd0NrpDdMwfauRvMayq JT8bLTWncK/5WWLYfCnVVYiko16gLgZcvHA1zXo3ziobUkP/bz9eJ4xD3VhC3CvnZ2o2 mKKOaJj4QkQQ30opnXHV/WrinwQhIi2S0HQuDaw27RKeJpC5T0t4i6e2lRd6uJW21lxF uoeg== 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=RzDFH8ZAs6GTD6bYgEx9Voc6bt+zjji2UkydZwvsUK0=; b=GokEzckggxzT0twe7sSKyJ6dameXEgVKYXvsDQeXQjumtAEXZ6RsmBRczSQXrk6n9U SF+ITdtVVZkgpo7uhLn1npHu3rXM01NVT7lwShZ9IS80oyaGdygC4KtYd5qUc7GO/bX4 aha+vvoCpoPq3PKItvgIJLXTNrm6hniwAs0KOcIwnpED5FIs7gxMUEqmofTYUjybkLJa N57buGw6fQ/2Ht+0H6dXULti7MNX9pW+bNkFNj7l1lO9OUNUMDHgGuug3mdn3Mc6oz57 tZgiS4A6t9tm7DEO8KJiDdIWoSnSSK1tjQ7N5aTta//nrqUorcLiS9hg7PEB6XTAVh7y kiRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qL100s6m; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si6307053ejc.356.2021.02.08.13.50.02; Mon, 08 Feb 2021 13:50:27 -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=@kernel.org header.s=k20201202 header.b=qL100s6m; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237029AbhBHVrw (ORCPT + 99 others); Mon, 8 Feb 2021 16:47:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:36220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236288AbhBHV3s (ORCPT ); Mon, 8 Feb 2021 16:29:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A648464E6F; Mon, 8 Feb 2021 21:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612819747; bh=BHP7iz8fCkGAAZDbGkYOw5wU43VUzE8VWkEzgL/I5DY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qL100s6mgIPyUjqubn6qZY/kMCsj1KEQZdirnkXADWmg0iVj7hfwIQ3IyHN4+oznZ sKVq1m3+0ySh0eOSN1oIzlM8FbtudrJ3CE2DwvdNGhMPCh3lBCQg2N+kNymfamdpqT XCPvnHR85Ke8iqXZ+XZTaKdCsMDq3TH8SWa1ajgh8qTJqRGpTRsgpXnc3gRC7gshD4 AXtH79cnaN9/ayJxdS78B84cPXS5Rtc2XoOXe9toc6RfKcnPk7iQVK9JPIdZqSYlwY nUdImrFVP5JU69KSlGnPav89Q/NWipnWsKDgUR1IQOb4hc851nIVO3OzJ5l3fxoOYv 1GdeKPuy4OdKA== Date: Mon, 8 Feb 2021 23:28:51 +0200 From: Mike Rapoport To: Michal Hocko 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 , 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: <20210208212851.GY242749@kernel.org> References: <20210208084920.2884-1-rppt@kernel.org> <20210208084920.2884-9-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 11:18:37AM +0100, 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? As David already said, hibernation does not care about mlocked memory, so this feature requires a special handling. -- Sincerely yours, Mike.