From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C76E1C43460 for ; Tue, 18 May 2021 10:27:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 76EF46108D for ; Tue, 18 May 2021 10:27:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76EF46108D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 165CF6B0087; Tue, 18 May 2021 06:27:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1143F6B0088; Tue, 18 May 2021 06:27:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5B168D0001; Tue, 18 May 2021 06:27:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id B2EEE6B0087 for ; Tue, 18 May 2021 06:27:19 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 55496999D for ; Tue, 18 May 2021 10:27:19 +0000 (UTC) X-FDA: 78153974598.02.E29402E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf18.hostedemail.com (Postfix) with ESMTP id C4C8C2000260 for ; Tue, 18 May 2021 10:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621333638; 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=Th9b0uelp+zuS5Dolk9edCcQodErGvwWmi6QbbSzCQ8=; b=hu4cwNlgqIF9y6apOx12S2Ln9ed/WSIc5qETK3CNvMU7q+r+gTr9soTYGttRGNOEuNjaSM pif+hPFuDmB8R2mJotHO4CzpzJhMpNxX4EHGbSKhfFIAr+uY9x3aA88hXNFEMEcnWGVn3z Gw01N0VUayxiTcznVWu9omKv/9drT/I= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-83-1XwGNdv2M1mPDZiCDtNVnw-1; Tue, 18 May 2021 06:27:16 -0400 X-MC-Unique: 1XwGNdv2M1mPDZiCDtNVnw-1 Received: by mail-wr1-f70.google.com with SMTP id u5-20020adf9e050000b029010df603f280so5350256wre.18 for ; Tue, 18 May 2021 03:27:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Th9b0uelp+zuS5Dolk9edCcQodErGvwWmi6QbbSzCQ8=; b=ISi3r2gqAmruojwl8A8AwXkaSvseg5LNdBPMofFGNncQDp1L7unyPBWH3p20laVkzK qp4aOGFoEhtYYIfh+yVnUmtzqSJnK8IVHBjGHUVz1l7NsBP+puHEYxTZg2JYkxnB2mKD EokNpNf3/OZadCCLf0XIJKFZTyt4lVnCPpnAkY0GvmcTiz+T8A5LLDV+xiX0Te85SF+8 c9ONss3P6b4ZDMvl2d1nxEbdiXE3CdfoLeb8tp3C58BGRQtA1VPEQQGtAv/ESg80iraw q8qkYPi/CwdfUw0R3sj5nRu6AL0WmgMzlHexHY0h8qYlGRPKnaawF+VBxxIcigwsHVmx PvRg== X-Gm-Message-State: AOAM530odLYWebImA8RqbPoZJaA0wEJJDNE8GZDnf7POWWyxRt8Al+/E VqFHgTG9dCMRoXbcmEVtTM8OwfGyr4VNxA6vi3oILDBNuIpM/p92e3gDgEM2HNIT9S2UdCE2FvD 3rNSeB0k4pWo= X-Received: by 2002:a05:600c:35cc:: with SMTP id r12mr4525790wmq.157.1621333635655; Tue, 18 May 2021 03:27:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL+bP4BGJ/+tDiLE4ZHcq1wv671RbTKwVIAcgFztdQnfjanbuq/Gm2r3B/QzaKSEduy6Y9Cg== X-Received: by 2002:a05:600c:35cc:: with SMTP id r12mr4525739wmq.157.1621333635433; Tue, 18 May 2021 03:27:15 -0700 (PDT) Received: from [192.168.3.132] (p5b0c64fd.dip0.t-ipconnect.de. [91.12.100.253]) by smtp.gmail.com with ESMTPSA id z3sm1173826wrq.42.2021.05.18.03.27.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 May 2021 03:27:15 -0700 (PDT) Subject: Re: [PATCH v19 6/8] PM: hibernate: disable when there are active secretmem users To: Mark Rutland , 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" , Hagen Paul Pfeifer , Ingo Molnar , James Bottomley , Kees Cook , "Kirill A. Shutemov" , Matthew Wilcox , Matthew Garrett , Michal Hocko , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , "Rafael J. Wysocki" , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , Yury Norov , 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 References: <20210513184734.29317-1-rppt@kernel.org> <20210513184734.29317-7-rppt@kernel.org> <20210518102424.GD82842@C02TD0UTHF1T.local> From: David Hildenbrand Organization: Red Hat Message-ID: <47d0e5b1-ffee-d694-4865-8718619c1be0@redhat.com> Date: Tue, 18 May 2021 12:27:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210518102424.GD82842@C02TD0UTHF1T.local> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hu4cwNlg; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf18.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C4C8C2000260 X-Stat-Signature: 9g7twmddhbpnaggo8r43famm33tzx5fm X-HE-Tag: 1621333637-100023 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 18.05.21 12:24, Mark Rutland wrote: > On Thu, May 13, 2021 at 09:47:32PM +0300, 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. > > Have we thought about how this is going to work in practice, e.g. on > mobile systems? It seems to me that there are a variety of common > applications which might want to use this which people don't expect to > inhibit hibernate (e.g. authentication agents, web browsers). > > Are we happy to say that any userspace application can incidentally > inhibit hibernate? It's worth noting that secretmem has to be explicitly enabled by the admin to even work. -- Thanks, David / dhildenb