Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3172168ybi; Sun, 14 Jul 2019 08:07:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXLe7AmnkAAeUijAtPvN84c8NcR4GGI0onWSwN9ozO3OF+BNUTtYhltiW1XUJ+CMSzi5jk X-Received: by 2002:a63:ef4b:: with SMTP id c11mr20154857pgk.129.1563116870222; Sun, 14 Jul 2019 08:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563116870; cv=none; d=google.com; s=arc-20160816; b=oR0QIo1K/mDs32gLNgAl0rvANOHNm7ymMpMMzapJ1NQy2kAtAiFjqQsFtE0iu7PJzy GaC0L2RsIch9lvf963CKh/b2vKbf1ZN0S/AYUEb1uh8JEhklt37xAdO4SUcZl36Q+xyY qKdGseKLplmaflJCr7xMLxj40DDpOJF+C9y8epfLNAV+z8CcqTkpL5P8HTUvwRg5AEZ5 7pwqabCd9yn6S8qiK1k6SjVX+44ifnMXPnyweH24HxLQ0SDz/vhQkr5R0uCNOhK2och0 k7U4P2omHw5ozGEOxlrL07n3NLq78IVjv6foOtMepTSVnwJg9BhsE5zY+8sB/0MVnzEN DyjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+PBL1d5NY2furvJE2bI/Vh3LWLA1dlGy0hD3nqDGxC8=; b=bwALRDhQ6mHharYqdsYF0EsJ3/q8G/FqXMRRJ04XfCGdEefmMHoDL1RxOE3HKBw60i 8f90POZEQ3epNEYA23+uPUobkVqWByCKa06RUoGUKw+a0X3HBUwx5UmxMNivEG6LNwuu O0SMQgvfntH2nnSUjMNz6cPaKYwiG4khmaGaap/f8UJzN6WB2pyRQLCCl3Tmd14jaQAX TqALSP58HBLBik06rSyegver0KIJTE72U1za9H1tpWe1uiS6xRdMB3rkgICmRrHZKxs/ 6yZJr8jsGfto3SDZ60F2OYDwz1lF1mhRgxQ/DelRqva3dhy8Pnu2nMT4TEk7ZK03Qms/ Xx2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v0TmOJxy; 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 p4si14550047pgh.350.2019.07.14.08.07.31; Sun, 14 Jul 2019 08:07:50 -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=v0TmOJxy; 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 S1728546AbfGNPG3 (ORCPT + 99 others); Sun, 14 Jul 2019 11:06:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:56550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728146AbfGNPG3 (ORCPT ); Sun, 14 Jul 2019 11:06:29 -0400 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 348EE217D8 for ; Sun, 14 Jul 2019 15:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563116788; bh=9v0TSmLCn8TjvoXn1mqXdhjjoJsiEcxlv4LvLVZbR0I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=v0TmOJxy83Vs7zwskqPZknhJBHliByWQ9slt88eUlJmFucrdhem7QgBNJjIHsEncL 7r1MjLILZtAzjraM7v/6sOCnRImcX93hQrOaGfUCyDDn0RQY7log3hDh3/ibKrYXJj SPkMGaiBSRrNaF/5iAD/xywYdZdj9CsvNJiGqkvg= Received: by mail-wm1-f48.google.com with SMTP id g67so8673571wme.1 for ; Sun, 14 Jul 2019 08:06:28 -0700 (PDT) X-Gm-Message-State: APjAAAUB6IhdKFvSLhtAnY6CWqENLtORMQSzxVc+U42eBU7471fBFeu1 Fj4+HcleCsifEQK4qA1TmFwb8hNRHlty77kdnIG2YQ== X-Received: by 2002:a1c:9a53:: with SMTP id c80mr18654369wme.173.1563116786554; Sun, 14 Jul 2019 08:06:26 -0700 (PDT) MIME-Version: 1.0 References: <1562855138-19507-1-git-send-email-alexandre.chartre@oracle.com> <5cab2a0e-1034-8748-fcbe-a17cf4fa2cd4@intel.com> <61d5851e-a8bf-e25c-e673-b71c8b83042c@oracle.com> <20190712125059.GP3419@hirez.programming.kicks-ass.net> <3ca70237-bf8e-57d9-bed5-bc2329d17177@oracle.com> <20190712190620.GX3419@hirez.programming.kicks-ass.net> In-Reply-To: <20190712190620.GX3419@hirez.programming.kicks-ass.net> From: Andy Lutomirski Date: Sun, 14 Jul 2019 08:06:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v2 00/27] Kernel Address Space Isolation To: Peter Zijlstra Cc: Alexandre Chartre , Thomas Gleixner , Dave Hansen , Paolo Bonzini , Radim Krcmar , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , Andrew Lutomirski , kvm list , X86 ML , Linux-MM , LKML , Konrad Rzeszutek Wilk , jan.setjeeilers@oracle.com, Liran Alon , Jonathan Adams , Alexander Graf , Mike Rapoport , Paul Turner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 12, 2019 at 12:06 PM Peter Zijlstra wrote: > > On Fri, Jul 12, 2019 at 06:37:47PM +0200, Alexandre Chartre wrote: > > On 7/12/19 5:16 PM, Thomas Gleixner wrote: > > > > Right. If we decide to expose more parts of the kernel mappings then that's > > > just adding more stuff to the existing user (PTI) map mechanics. > > > > If we expose more parts of the kernel mapping by adding them to the existing > > user (PTI) map, then we only control the mapping of kernel sensitive data but > > we don't control user mapping (with ASI, we exclude all user mappings). > > > > How would you control the mapping of userland sensitive data and exclude them > > from the user map? Would you have the application explicitly identify sensitive > > data (like Andy suggested with a /dev/xpfo device)? > > To what purpose do you want to exclude userspace from the kernel > mapping; that is, what are you mitigating against with that? Mutually distrusting user/guest tenants. Imagine an attack against a VM hosting provider (GCE, for example). If the overall system is well-designed, the host kernel won't possess secrets that are important to the overall hosting network. The interesting secrets are in the memory of other tenants running under the same host. So, if we can mostly or completely avoid mapping one tenant's memory in the host, we reduce the amount of valuable information that could leak via a speculation (or wild read) attack to another tenant. The practicality of such a scheme is obviously an open question.