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