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 3A459C43603 for ; Tue, 18 May 2021 10:27:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20EB061002 for ; Tue, 18 May 2021 10:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348496AbhERK2h (ORCPT ); Tue, 18 May 2021 06:28:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:34793 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348485AbhERK2g (ORCPT ); Tue, 18 May 2021 06:28:36 -0400 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-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-152-0-_bdxyuNfaFJZDaH82B8g-1; Tue, 18 May 2021 06:27:16 -0400 X-MC-Unique: 0-_bdxyuNfaFJZDaH82B8g-1 Received: by mail-wm1-f72.google.com with SMTP id n127-20020a1c27850000b02901717a27c785so391790wmn.9 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=BSk2wjesizRln7LKmXKka5d2yq1iWd2eaaHaA9VYbK5AtwKZ9bRPbaVV8XLJ+nk9Yh PcjR4b05oBBSz8yG04saoVcxDK3GCyCQ56+v3SpBJ+Z2DAb5LLvWODU7hVxw/oCjafDY oMPexKxQZBYJFFfFxdEkqhbR8lkKGeej/BYjJMm/P4UK2CzLHBy4q6bdWpCw3S7QJxcm px6tuKGMySyl6GVJKbTs6ZNU3oginGo8mC3/cphBIB3qbo7mGYNxV7hhmCWP9tS67cMw L3tUKBZIJAuvjza3eUkoZFpc+WbBuS6d2O7kOjm0OQFrz3vy5btILSc4IcyXl27ZTnZg KeKQ== X-Gm-Message-State: AOAM530KJ85TIYYXdNJTvahvDCBBwUya1d07lJaNCFVCGFsdo8OlV3GX u4VJVW4JauUK32KQYPmurIZx646HdxyoYB2vF31oePP03TdONGOSBd1iKbUtJglCQl8mVmDv8nu qikJ+Q2RP+W4w/ZtzZmDsM35d X-Received: by 2002:a05:600c:35cc:: with SMTP id r12mr4525760wmq.157.1621333635631; 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 0886AC433ED for ; Tue, 18 May 2021 10:29:36 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F5F16108D for ; Tue, 18 May 2021 10:29:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F5F16108D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=34YG6uMxU4ogkwb+Pn96e2rxv7IhJC5tWpfpyK4NiPs=; b=mum8FzPosd76LQ+jKzGueIjph Jo4gazcbsusL6JCmMWJoctes8Mpv3pD2wBHqaDvz4zXdWdO1wDtsPMye3/dK08TeSKAPQng73J+3P xVQ5c3d/ZqA0598VlIho6EmUfUc1LNalSmSioaJsH+ripd14fhh0g43AxoI2439wzNqVzmG7SV1l5 7osFpe+UODVoIm0qzY4FRFyu1DnC7RWYtT0YSw2pdykbzHWJiesa0JBAYFypc9b6QnzKrt/R7Na73 rSjAXkUWerGTJsIIbwJ6ldcIJOyvHplZwaS2WopkpbDkSCSu/S8OOo1k1ORB0M8JyOPCnf+0K0qnZ 058Iti5ug==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liwyU-000NpA-U0; Tue, 18 May 2021 10:29:19 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwwe-000NMh-5L for linux-riscv@desiato.infradead.org; Tue, 18 May 2021 10:27:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=Th9b0uelp+zuS5Dolk9edCcQodErGvwWmi6QbbSzCQ8=; b=xcSTsYObqqsyI3h815JUq7S7lf BUJ8rPL83YRaBp5DMP0XeIsISdUYSkDMfkJr+UHNQ51zu6y5qgwj1kAJemu/gnh7Lv7QYzuct6LJs Np6oBLAp6C1DqvN0ayt/5F3//Yz5C6lX8NzpjFnlUzAevwqUCsC5sRQSVj7NhtsUAK9P/3rwunLdB 4NjMoxyih2rddPncvNHh3gxoNNa4+Gm/E9zf6L9HwgzpMlu8gxcrSwhSXTk7Z85GZjSViNz2HbLlL oNcxajeHkJRbSXxnLfjZgxowcdgGiHm1DqOBpjOMMZFwtw30b2N8E+6dHjztqZ8Pt9u/as0owUH3p X8z61Viw==; Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwwb-00EZ0P-Bx for linux-riscv@lists.infradead.org; Tue, 18 May 2021 10:27:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621333640; 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=URi9Ua7Tc6lEMq6no4Vox78W0PP/jkxc3q6km7Ba2NiTJ4nzxL0Fj7IsAUSJneaKmttOZl Xu+DcrTw60gx9SoNvWstLZ5m8sWc8mQt0HXE+QLa/fYnL43bYMNGqktHtc7gzwORG8uG7X 2BQuBHMOmNZr0XWk6aBfWsVzDIU4awE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-e3PmckmcOh6-NrVkv3EfxQ-1; Tue, 18 May 2021 06:27:16 -0400 X-MC-Unique: e3PmckmcOh6-NrVkv3EfxQ-1 Received: by mail-wm1-f71.google.com with SMTP id 12-20020a1c010c0000b0290176491efde9so392864wmb.4 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=AuiCQUDvxSvxYJxlIKENn2Ij0QqggNqesC1iLvmtXbcgiJv5MmtDKGfguBNiXQjmBw CONgDJdQ+eHevmiBkN7ONHFPBGxS1/QPPp+CugOu4M6AaPeplAojUBtE5YM0nhrNuzVe ns6vgdb2UWZdiOtaiM3K+6LDWzzbwdzWGvvCLHmxegl0nmk4pEG4SS2QvK/1AJMgkTJO csaSbgm+gekrbiQ0f6zHiJ5vIRlTvWfU7nXhfZaWxiuWw54M6MS63ZxaErF5/qdcxSwg Sj1tFLqmzIBX7PwL/YJovCifVFc9L1aFBxPPqJDKARn8okFvrvxFnE6PiPiNN7SBa5jl eDXQ== X-Gm-Message-State: AOAM533yfKKy1OlOg99QmRGK4J2VZoOdPRKVKsCMan01RwSw0fb8PIbv 55+IxSjqr1aUXMjdx7DsoMWT9uC1FLvSe2DGghgBmfHRSHF3QpeAZ46iWhm3qONjYJkboFZ+a39 oJi9Ns9exSpf7bKqfQR28e9zF0PDM X-Received: by 2002:a05:600c:35cc:: with SMTP id r12mr4525772wmq.157.1621333635631; 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> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_032721_493180_B187B50E X-CRM114-Status: GOOD ( 17.65 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 B8751C433B4 for ; Tue, 18 May 2021 10:27:22 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7925B61002 for ; Tue, 18 May 2021 10:27:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7925B61002 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 49D16100F2242; Tue, 18 May 2021 03:27:22 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=david@redhat.com; receiver= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DC739100EB35A for ; Tue, 18 May 2021 03:27:19 -0700 (PDT) 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-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-194-EwjSMdHCMS6ZfwlHUOd_bA-1; Tue, 18 May 2021 06:27:17 -0400 X-MC-Unique: EwjSMdHCMS6ZfwlHUOd_bA-1 Received: by mail-wm1-f72.google.com with SMTP id b128-20020a1c1b860000b029015b52bdb65aso393165wmb.5 for ; Tue, 18 May 2021 03:27:17 -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=QUSx7qqcc9HLaRjy9f01BDZaZ8WkvPer1jdLeqAenI2ha7u47KKesxHaiaSDvIvOBc AwT1wZthr7ZoBeSP79bv3wq7O3QdVLyP7yu22WxkKP7bdfnuehJ0CFM7mjZsOCZpSclV f4ZKn63qb9suRsFXmo6i08e/2lYmAAtMeVIgSyyo6PmmoGdl5vFEp8vJ8qz7Zj/YBAva o6/4907qiJJZ+DsuDr6178v6z7SY73jomZOw7AyJ8CIsqsxlDXVtzmMYZNcEgJe03sCT J92TextPjGflQo8EX1mMMhXQP2WnMQeRS/+rQEJdiYpftoL35Hg+QuJvtOc3XB28rS4o i8mQ== X-Gm-Message-State: AOAM532OKN5h0ldaPSg+yKqXpT3JIXM8s+4bi4kYrkWux3vBt1q1Ovn1 Up44hH1t7rq05oT58wa9Ug+wiuRb9V/1whLJkVuLRsBslkzHtHCmGwA1rjGfB1uU+N5rYuLIDIC 4ujf54Fe7aFqZrt1+UszK X-Received: by 2002:a05:600c:35cc:: with SMTP id r12mr4525895wmq.157.1621333636757; Tue, 18 May 2021 03:27:16 -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 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> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Message-ID-Hash: HFQUJXED4NHFE57FTMJLIUPHMPEEMLNF X-Message-ID-Hash: HFQUJXED4NHFE57FTMJLIUPHMPEEMLNF X-MailFrom: david@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , 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 X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit 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 _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org 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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 23C54C433B4 for ; Tue, 18 May 2021 10:30:29 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A42AD611BF for ; Tue, 18 May 2021 10:30:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A42AD611BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UrCtcijp355BonwoafhFzhxtVN/AjgOTQRrjdDwswzc=; b=i0n5C+BeuS1m5LQ16SFhOiRma oS2kHCCaF8PocfQss56JWsIyKfTgFb5v5VZk1VzLmzoqtQlj6kIw0BZ5oRNetuE3z21tJWBsyB505 STkAPM7iZLF4zLE70u8gv5xQZEyRYIDsaW3I2V46aQ1bKosFjFLREsEVinaEWz0yiBa+IU8TCF3jK +ScIhtRoWSv2M5fDxANL3BU/Nc4po4Jqb5f7jtHoB3AFToOCZbGiurga86Pdf/40hEK1gTRDT3LAh 9kFFijELK4SmlepKZvrKOIE5NlATV28xjPin93mKIbD2B5og5L05GlNC/aJgXyityqEJ/K7z9uEUu gqA+NSo8g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liwxo-000Nei-1A; Tue, 18 May 2021 10:28:36 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwwe-000NMg-4D for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 10:27:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=Th9b0uelp+zuS5Dolk9edCcQodErGvwWmi6QbbSzCQ8=; b=xcSTsYObqqsyI3h815JUq7S7lf BUJ8rPL83YRaBp5DMP0XeIsISdUYSkDMfkJr+UHNQ51zu6y5qgwj1kAJemu/gnh7Lv7QYzuct6LJs Np6oBLAp6C1DqvN0ayt/5F3//Yz5C6lX8NzpjFnlUzAevwqUCsC5sRQSVj7NhtsUAK9P/3rwunLdB 4NjMoxyih2rddPncvNHh3gxoNNa4+Gm/E9zf6L9HwgzpMlu8gxcrSwhSXTk7Z85GZjSViNz2HbLlL oNcxajeHkJRbSXxnLfjZgxowcdgGiHm1DqOBpjOMMZFwtw30b2N8E+6dHjztqZ8Pt9u/as0owUH3p X8z61Viw==; Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwwb-00EZ0O-A0 for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 10:27:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621333640; 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=URi9Ua7Tc6lEMq6no4Vox78W0PP/jkxc3q6km7Ba2NiTJ4nzxL0Fj7IsAUSJneaKmttOZl Xu+DcrTw60gx9SoNvWstLZ5m8sWc8mQt0HXE+QLa/fYnL43bYMNGqktHtc7gzwORG8uG7X 2BQuBHMOmNZr0XWk6aBfWsVzDIU4awE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-443-E-rj4qoFO_K3njnVlt91OA-1; Tue, 18 May 2021 06:27:16 -0400 X-MC-Unique: E-rj4qoFO_K3njnVlt91OA-1 Received: by mail-wm1-f71.google.com with SMTP id l15-20020a1ced0f0000b029017140e7436dso231399wmh.2 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=BGYDENwSIJ7EKa+Ia12SlAqBgIQi/m3Lgztr3VDauJl/JIK8hD7mbByrcvadMST6hI gCfHn7sQAfaWBIg4NxZ8YBpw4IaBnk8fuCCtG2J29QyvezjcsHoHCXf10wSCrqaejkbs Fuwx0JWR4k8vyuMCWWr+bx8RHNAkoqWThle2LZCyWmMZrLqct4EqtvS2LNWd+nagIh4F wTw1xgLSqH4o0EWmH+fC3OoUWCrez+K9udERI3BIOnQt30kToz0LMxAvMDejLQiwvOqY jqpCiOqA1Z8hdmPLdF9LM8yZMTXcEpQz/PZ2e8LS41bfcPfDIjdjXvo1w79i62ir2Yr3 yLNA== X-Gm-Message-State: AOAM532u367VCV6j1vbp5f7n5dfl8vEa7nTajMWkE9aPwX2tRDfX4Rvq pbZ7gkKmQ7BHWijHgeBZmYG4dKh6L9NFtkhHCeGCElWOev+IyLjwJmM3x+VJkDAqoxVFclS0K1C Usl7YsvSzMoRM3zEwQKvnTBmnt/cE2M54dj0= X-Received: by 2002:a05:600c:35cc:: with SMTP id r12mr4525771wmq.157.1621333635631; 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> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_032721_433613_7962EFCA X-CRM114-Status: GOOD ( 19.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel