Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4171860ybg; Tue, 29 Oct 2019 03:16:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6v0uYnf0z3RRdOgB3xHqDP6gvKs5jH0PzPXSg+DUv03QMRlbDf8eFPrSt/hLWbX2dbTQa X-Received: by 2002:a50:f699:: with SMTP id d25mr24257170edn.72.1572344196004; Tue, 29 Oct 2019 03:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572344195; cv=none; d=google.com; s=arc-20160816; b=xr5sGdAzg5BDm5myzpVA1tAZLXvvW3AdhAZjd9hW2WoggnXZ5yGX6UX4hWDHJPBjDc qhWFoDuSU55LsKB5VAoyBZXF0Bzp4tSVVY86PfYzhnoTXI4xwulMs185cFwOLls1F0PH ijCQwk4U6lo2p/weL+aj+TltML26P0jTDaYg2SCdIGwyrRUCyEEJ0Y6Feyvxln/zJzNo M/x4dtEpwcGa6loCiXuqIKaX6STNUuRUpFO5Prw+SexmjC8I0qDgl/SXMj+mnir+adYP NQM4jJYnJGJaqm7P35ws6mvXWzXeRcHQs39JBnmyXGxe2abNblTmT6KbPRoo1h5+Mzu8 dvjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hUFJJVx8SiF8/TNYOQflI+M8x9o1YLtuVNzclFiWRwk=; b=IudFXxzfvL45zRX6pOgWWEY5jgU6+HNKswCd9hxPv25dZKGSc8sFIUPoWlXpZFUeOW dGuxYp1udNMgGbeScXDxbSH/L5oqkL/Mdw59QpvXm6HkRnT51+45Hi2W97Gg4ihWKQ60 kbD78HimkbcGxAvZeNHtVUx/OTIeLnBilDfIc/F2QA3FHTUPTrm46MNmvgkkilwuBqVQ BIUqpxXIwx1keCQfXo0y+oSz3ZyEs6HzxEz/2zxZvXueLu5lC4nOTTmHVmgUBftjU7fb HRzaFeMGfsGu9nidDv7ACWMTNBkq+n3omRdb43zWWKkGGom7/HkAGVVenmZtDBGfBV+L 1NQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XIQpQH93; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j43si9686449ede.239.2019.10.29.03.16.12; Tue, 29 Oct 2019 03:16:35 -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; dkim=pass header.i=@kernel.org header.s=default header.b=XIQpQH93; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730424AbfJ2JCL (ORCPT + 99 others); Tue, 29 Oct 2019 05:02:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:51578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727933AbfJ2JCL (ORCPT ); Tue, 29 Oct 2019 05:02:11 -0400 Received: from rapoport-lnx (190.228.71.37.rev.sfr.net [37.71.228.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3456620717; Tue, 29 Oct 2019 09:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572339726; bh=bOYMkrPnkSbi4aKQxcu6uc3pK8uAB8m/hoLokCCVXGU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XIQpQH93iGh9XKVRHrIjP5M0pKowp+j/DYe81iC7yDYP/yrQaFN3kQc70I446NNUA BFUwORbg2S1M1iQn+NkCvD1RLPVb2El1M1GCKPrABFs1gae9RsnIF4s7m6xaIrnC7B 2HPKTrYTdAhNRLx9kbkBmdZdMtgF9gkcj5QemTgA= Date: Tue, 29 Oct 2019 10:01:58 +0100 From: Mike Rapoport To: Florian Weimer 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 Message-ID: <20191029090158.GB18773@rapoport-lnx> References: <1572171452-7958-1-git-send-email-rppt@kernel.org> <87d0eieb0i.fsf@mid.deneb.enyo.de> <385EB6D4-A1B0-4617-B256-181AA1C3BDE3@kernel.org> <87h83s62mi.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h83s62mi.fsf@mid.deneb.enyo.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 28, 2019 at 09:23:17PM +0100, Florian Weimer wrote: > * 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? At first I thought that CRIU would extract the memory contents from these mappings just as it does now using vmsplice(). But it seems that such mappings won't play well with pipes, so CRIU will need a bounce buffer indeed. > >>> 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. Well, that was not intended. -- Sincerely yours, Mike.