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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 B964DC31E50 for ; Sun, 16 Jun 2019 22:18:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A60E2084B for ; Sun, 16 Jun 2019 22:18:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560723501; bh=O1ycWhUilyVeZV1l4Vcdv51ZM55dvixJqHvFqBWW/UQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=M0gBMJRF19btwhTEmkcf2GZcfi7v6jpNREOyeoL25Vxo7xEdJz9etQNTyi8/X/BwX CS9kIE1ViK/GvT1ti0hoa8bK3E+I6n2YQeob/YTNtY9OxhLlUF9IfjHkZAvLxSDkZ1 FgP1GcG/cfhVaY8ddrvBSrP4fX64EmEZ0rVSNvZg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727490AbfFPWSO (ORCPT ); Sun, 16 Jun 2019 18:18:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:41942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727410AbfFPWSO (ORCPT ); Sun, 16 Jun 2019 18:18:14 -0400 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 82CC22133D for ; Sun, 16 Jun 2019 22:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560723493; bh=O1ycWhUilyVeZV1l4Vcdv51ZM55dvixJqHvFqBWW/UQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uPTQWy7A2IaMi2VBKyydX6tBMS0ETwgHQLORn92D5Ob77cz9VH+Q0CCsmmQuAjDST Wlrjhv1YwjNqUQj+5SQpca8XI46FMMLkmV/MP22m2HnBN6RXFL9a06Y8VMioCARb0h eq9dGVqnSe0ejcfAgRvWxQLa0KPBAe617qplclt0= Received: by mail-wm1-f43.google.com with SMTP id s15so7109769wmj.3 for ; Sun, 16 Jun 2019 15:18:13 -0700 (PDT) X-Gm-Message-State: APjAAAX28VLyn9qW5l4HaIUVm6xW6QjV3cD9S9qlwN1+GVvUKL+4/ECU K15JxEZm3OHou9wviy1Vanl963jScW0I3EcoooNUDw== X-Google-Smtp-Source: APXvYqzLtLrlyAc4h7N2S7ze6VO2usm4Gpw8733KZc+aAYCc4lsGwCtnws1ou95toQgBrBXzSaYCX/qQON0xFktvLrY= X-Received: by 2002:a1c:6242:: with SMTP id w63mr17250060wmb.161.1560723492077; Sun, 16 Jun 2019 15:18:12 -0700 (PDT) MIME-Version: 1.0 References: <20190612170834.14855-1-mhillenb@amazon.de> In-Reply-To: From: Andy Lutomirski Date: Sun, 16 Jun 2019 15:18:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 00/10] Process-local memory allocations for hiding KVM secrets To: Thomas Gleixner Cc: Dave Hansen , Marius Hillenbrand , kvm list , LKML , Kernel Hardening , Linux-MM , Alexander Graf , David Woodhouse , "the arch/x86 maintainers" , Andy Lutomirski , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 14, 2019 at 7:21 AM Thomas Gleixner wrote: > > On Wed, 12 Jun 2019, Andy Lutomirski wrote: > > > On Jun 12, 2019, at 12:55 PM, Dave Hansen wro= te: > > > > > >> On 6/12/19 10:08 AM, Marius Hillenbrand wrote: > > >> This patch series proposes to introduce a region for what we call > > >> process-local memory into the kernel's virtual address space. > > > > > > It might be fun to cc some x86 folks on this series. They might have > > > some relevant opinions. ;) > > > > > > A few high-level questions: > > > > > > Why go to all this trouble to hide guest state like registers if all = the > > > guest data itself is still mapped? > > > > > > Where's the context-switching code? Did I just miss it? > > > > > > We've discussed having per-cpu page tables where a given PGD is only = in > > > use from one CPU at a time. I *think* this scheme still works in suc= h a > > > case, it just adds one more PGD entry that would have to context-swit= ched. > > > > Fair warning: Linus is on record as absolutely hating this idea. He mig= ht > > change his mind, but it=E2=80=99s an uphill battle. > > Yes I know, but as a benefit we could get rid of all the GSBASE horrors i= n > the entry code as we could just put the percpu space into the local PGD. > I have personally suggested this to Linus on a couple of occasions, and he seemed quite skeptical.