Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3577732ybg; Mon, 28 Oct 2019 15:16:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBSNKDUKFgRbSjMjhngvyh5sT2CuBqzuW56mK6VcfIWgIzEFOGCcjqw0GUn75aLAea7OZW X-Received: by 2002:a05:6402:1255:: with SMTP id l21mr22301857edw.41.1572300992488; Mon, 28 Oct 2019 15:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572300992; cv=none; d=google.com; s=arc-20160816; b=Ft3bOuyBX38Da8DkuM7Hfr7b4S6NpAbpbtAg4EepFjVvbsNwHPhyAvse+y1n0xk3F1 2M27mVsSmgHyIHZdcckVGBx4RwdpEPhzQe5m85mcgQUc/hMglO7G4YbgQwuTmIP5Lrvb epXhHlaMaT+P1qbrFLLrPtIwGRsNgjUjVlsp2Gvs7mvoI2rNj3q0f5zSg3GO+58kTWvS TR7sr7fAq6QBxgYm1YUL4D0e7Vx5hs0kg0VrynA1LfGoqwdW+GbZ+h4XDItqvRDGNjzm fIiKOTxDuXrs/aWIrMr3Zn12A7wdST0p4pdE27AHoepAC1NhGc/zwO7GHAVBHIr1Iy6F eDAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=HPxEAelfjjerdLWo4t6Pa9TV59qfl5/Ah99h/j9wtFw=; b=zkXAkvSHO9/vZFRTaP/0my4UdQSKcdxFdW27PFG4doYqKDXv782WCAs4V2UA44CATu 76Gdbtyx9hc94RwDAjg1N+f5nDK1F0PwWHBg6rpo/LjR5HAccbBHU3v8G+hBCcj7+G36 tll3rJDYQPu42DLwMjJGGO6Dvq9rKfpJOmdyAms8uOH23UlA8dnNG0T9cq4lnocKBDy3 4Q8xp9tuDHlv7unKPACOiruws3/VgJLIC2f9fivi36ydIw2iHI3btvv55uT9EzTWPij9 VCGrzMZuQMhV/FjwIobtusGzdeMcILTvgA1x/B8k9w9L0ETQnVFuEpMReAHrZjH/UpnZ r9kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi17si2315987edb.430.2019.10.28.15.16.08; Mon, 28 Oct 2019 15:16:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733098AbfJ1UXZ (ORCPT + 99 others); Mon, 28 Oct 2019 16:23:25 -0400 Received: from albireo.enyo.de ([37.24.231.21]:46696 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727802AbfJ1UXY (ORCPT ); Mon, 28 Oct 2019 16:23:24 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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.