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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 44F24CA9EC0 for ; Mon, 28 Oct 2019 20:23:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 13E5121721 for ; Mon, 28 Oct 2019 20:23:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13E5121721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B1D016B0008; Mon, 28 Oct 2019 16:23:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ACD356B000C; Mon, 28 Oct 2019 16:23:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9E3056B0275; Mon, 28 Oct 2019 16:23:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id 758286B0008 for ; Mon, 28 Oct 2019 16:23:47 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id CF8B78249980 for ; Mon, 28 Oct 2019 20:23:46 +0000 (UTC) X-FDA: 76094319252.17.badge08_20ec6c221da41 X-HE-Tag: badge08_20ec6c221da41 X-Filterd-Recvd-Size: 2889 Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Oct 2019 20:23:46 +0000 (UTC) Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1iPBXp-0006Lq-Li; Mon, 28 Oct 2019 20:23:17 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1iPBXp-0005JX-J5; Mon, 28 Oct 2019 21:23:17 +0100 From: Florian Weimer To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Dave Hansen , James Bottomley , Peter Zijlstra , Steven Rostedt , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-api@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, Mike Rapoport Subject: Re: [PATCH RFC] mm: add MAP_EXCLUSIVE to create exclusive user mappings References: <1572171452-7958-1-git-send-email-rppt@kernel.org> <87d0eieb0i.fsf@mid.deneb.enyo.de> <385EB6D4-A1B0-4617-B256-181AA1C3BDE3@kernel.org> Date: Mon, 28 Oct 2019 21:23:17 +0100 In-Reply-To: <385EB6D4-A1B0-4617-B256-181AA1C3BDE3@kernel.org> (Mike Rapoport's message of "Sun, 27 Oct 2019 13:00:13 +0200") Message-ID: <87h83s62mi.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain 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: * Mike Rapoport: > On October 27, 2019 12:30:21 PM GMT+02:00, Florian Weimer > wrote: >>* Mike Rapoport: >> >>> The patch below aims to allow applications to create mappins that >>have >>> pages visible only to the owning process. Such mappings could be used >>to >>> store secrets so that these secrets are not visible neither to other >>> processes nor to the kernel. >> >>How is this expected to interact with CRIU? > > CRIU dumps the memory contents using a parasite code from inside the > dumpee address space, so it would work the same way as for the other > mappings. Of course, at the restore time the exclusive mapping should > be recreated with the appropriate flags. Hmm, so it would use a bounce buffer to perform the extraction? >>> I've only tested the basic functionality, the changes should be >>verified >>> against THP/migration/compaction. Yet, I'd appreciate early feedback. >> >>What are the expected semantics for VM migration? Should it fail? > > I don't quite follow. If qemu would use such mappings it would be able > to transfer them during live migration. I was wondering if the special state is supposed to bubble up to the host eventually.