Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 20 Aug 2018 20:06:19 -0000 Received: from userp2120.oracle.com ([156.151.31.85]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1frqRN-0004Xz-QD for speck@linutronix.de; Mon, 20 Aug 2018 22:06:18 +0200 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w7KK3QBV174531 for ; Mon, 20 Aug 2018 20:06:11 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2kxc3qgj3t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 20 Aug 2018 20:06:11 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w7KK6930004893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 20 Aug 2018 20:06:10 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w7KK69nN005031 for ; Mon, 20 Aug 2018 20:06:09 GMT Date: Mon, 20 Aug 2018 16:06:08 -0400 From: Konrad Rzeszutek Wilk Subject: [MODERATED] Memory isolation on processes running in isolcpus. Linus, please read. Message-ID: <20180820200608.GD29187@char.us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: Hi, All, I am thinking to bring this up on linux-mm and kvm-devel mailing lis= t but before I go that route I wanted to make sure we are all on the same page(s). 1). Linus, you are cool with the idea of having further kernel page isola= tion which Julian captured rather nicely: =E2=80=9CSpecifically, while being in the context of process A, memory of= process B should not be visible in the kernel. =E2=80=9C=20 And how it is done, well, that may take a while. Asking this as this feature only impacts cloud vendors and we are not forefront on your mind, and if you think "Heck no!" then we can save a lo= t of time on by not focusing on something you are not OK with. 2). And folks are OK if this conversation starts on linux-mm/kvm-devel w= ith conversation _without_ mentioning the in-depth worry we have about Spectr= e_v1 + L1TF mix? In terms of "how "to make this work could we piggyback on the fact that n= ot all memory needs an =E2=80=98struct page=E2=80=99 and expand on that? That is could we remove most (run-time) of the =E2=80=98struct page=E2=80= =99 in use in the kernel, similar to how NV-DIMM was done where there was no =E2=80=98struc= t page=E2=80=99 for MMIO regions? If so, could we piggyback on that and declare swaths of mem= ory as this until an process is created and then use it? Like on-demand 'struct = page' creation. Then whenever an process is created/scheduled on a CPU we have per-cpu ke= rnel page-tables that only cover the __START_KERNEL to __end, _and_ any memory= for the process that is running on it currently? Obviously if a process switches off the CPU we need to tear this structur= e and recreate it on another CPU - which is why this all would only be used on processes that are in the isolcpus part?