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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 45730C43461 for ; Fri, 4 Sep 2020 19:39:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C0B68208CA for ; Fri, 4 Sep 2020 19:39:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y1o6AU6w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0B68208CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0D75F6B0037; Fri, 4 Sep 2020 15:39:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 088B66B005A; Fri, 4 Sep 2020 15:39:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE0046B005C; Fri, 4 Sep 2020 15:39:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id D74EC6B0037 for ; Fri, 4 Sep 2020 15:39:26 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8EE483633 for ; Fri, 4 Sep 2020 19:39:26 +0000 (UTC) X-FDA: 77226393132.22.rake31_020b196270b4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 2817718038E68 for ; Fri, 4 Sep 2020 19:39:26 +0000 (UTC) X-HE-Tag: rake31_020b196270b4 X-Filterd-Recvd-Size: 3983 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Sep 2020 19:39:25 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 5ABFD214D8 for ; Fri, 4 Sep 2020 19:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599248364; bh=RmjdF/oHJi/3WsNTWPfXAZJjc7dD4QJxqtKHWGFhaY4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Y1o6AU6wnE4cKa2sVTMvvF98GBPa3kf10zb2k9OyNzsTlvAeCnLsXrxLX5Yl5+PsV DNWxaKPe/hkRRTQHxA1IrPwYyXRbq5uBF69CbAz5jm0qhHf4Wlp59wTni/lzhEHCW1 /4dky9yz5LnF7ZO2jDJt/om5NUG2Li4Xvq7Q+c1c= Received: by mail-wm1-f43.google.com with SMTP id o21so7443992wmc.0 for ; Fri, 04 Sep 2020 12:39:24 -0700 (PDT) X-Gm-Message-State: AOAM532YTS5rSmSLrXgUttvvKVB/LSgDlxn2pvshaYcmcVRAeeYTnVlU Hisgy755TOlDqGra+RUnIcX3EFw4R2vhSr27YzOgWw== X-Google-Smtp-Source: ABdhPJy6MrVLj8wN3xqE2lrca40RAAU/O1tF0PzE0euj/LnWCHYniQ59ghbEpr8F38RNHijEoqwiOEfzuzwZPhNNQmg= X-Received: by 2002:a05:600c:4104:: with SMTP id j4mr8778079wmi.36.1599248362720; Fri, 04 Sep 2020 12:39:22 -0700 (PDT) MIME-Version: 1.0 References: <20200904113116.20648-1-alazar@bitdefender.com> In-Reply-To: <20200904113116.20648-1-alazar@bitdefender.com> From: Andy Lutomirski Date: Fri, 4 Sep 2020 12:39:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RESEND RFC PATCH 0/5] Remote mapping To: =?UTF-8?Q?Adalbert_Laz=C4=83r?= Cc: Linux-MM , Linux API , Andrew Morton , Alexander Graf , Stefan Hajnoczi , Jerome Glisse , Paolo Bonzini , =?UTF-8?B?TWloYWkgRG9uyJt1?= , Mircea Cirjaliu , Andy Lutomirski , Arnd Bergmann , Sargun Dhillon , Aleksa Sarai , Oleg Nesterov , Jann Horn , Kees Cook , Matthew Wilcox , Christian Brauner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 2817718038E68 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: On Fri, Sep 4, 2020 at 4:41 AM Adalbert Laz=C4=83r = wrote: > > This patchset adds support for the remote mapping feature. > Remote mapping, as its name suggests, is a means for transparent and > zero-copy access of a remote process' address space. > access of a remote process' address space. > I think this is very clever, but I find myself wondering what happens if people start trying to abuse this by, for example, setting up a remote mapping pointing to fun regions like userfaultfd or another remote mapping. I'm a little concerned that it's actually too clever and that maybe a more straightforward solution should be investigated. I personally rather dislike the KVM model in which the guest address space mirrors the host (QEMU) address space rather than being its own thing. In particular, the current model means that extra-special-strange mappings like SEV-encrypted memory are required to be present in the QEMU page tables in order for the guest to see them. (If I had noticed that last bit before it went upstream, I would have NAKked it. I would still like to see it deprecated and ideally eventually removed from the kernel. We have absolutely no business creating incoherent mappings like this.) --Andy