Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4460150imm; Mon, 20 Aug 2018 16:42:19 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzWkw5MsnXY6rwVERB3LRImIYDbLD9zxr8RTeV7lLknA68JP+VoKpy4vY4zm7Hee4ctGrE3 X-Received: by 2002:a63:9f0a:: with SMTP id g10-v6mr45295268pge.324.1534808539260; Mon, 20 Aug 2018 16:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534808539; cv=none; d=google.com; s=arc-20160816; b=ILDVaUaVEgC0cn2Kl4cCi1naCDVLTMUa112mAEnZheFc/UF7WezJOiyaVHirhvI14U gwxXYdPpDhZMvc0pdtTkAuHU3/J1GrRt5BCk/StE9bQYzAjokwGGO6lvDVzliZroHwQr /Ai+Jc595ZYboiJ83ueklzHBkRga/4352GTLrfbPKzIPVKG6CbIXUa6iV8wGw2lcbd72 7vWUvWdbwVI4Dk4I/ltVgpAqpiHy2C8wiT7Uc5gL3dBRkT1CsvivG9M/hKQy5O4J559o 55f6VpdxPK0k0FQtuEEZMD+EhnWhOdd4vYWxkiXLG8srfLhiQ5jI8ggf6/SyqWStJ2ip 00zA== 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 :arc-authentication-results; bh=VjEsfVyuJd5rTmCZtHxvtZNrn1SA283X6hI5rQe2lQo=; b=ytGJeanRHE1AktQeZqUcdsBIoM7p7Q7HCpXpJd120pkRN8A7rgZ6gM+4VSrvPhmUmM s+I7IXwJ+5sOgg1b8A1w3TNklV2Ps/q2FHyA0fTnJBMMFR89fgSevLPORpz1J778/d3y AGpfBCEpURdHAP5NmC9hlov+WqbncrWs/HCG/E5bGKw64V0shMXRj+/9QRIHaJqrqxsS RQR4lg5YAiyhoc9B+xA9Ft8rWVDk5hbO6XAdEf11UoBWxizn1JH4YnoNXhIRnO4Haa/q ZlpUCR9al4SEtKdDMd3POYcoohnhIof08LE2eZ8ORtY46fcUi/M3z1ev6uIL48nuaYNq Ktaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=O2QqAI3a; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j33-v6si4064988pgm.111.2018.08.20.16.41.41; Mon, 20 Aug 2018 16:42:19 -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=@linux-foundation.org header.s=google header.b=O2QqAI3a; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726783AbeHUC4X (ORCPT + 99 others); Mon, 20 Aug 2018 22:56:23 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36128 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726681AbeHUC4X (ORCPT ); Mon, 20 Aug 2018 22:56:23 -0400 Received: by mail-it0-f67.google.com with SMTP id p81-v6so1813158itp.1 for ; Mon, 20 Aug 2018 16:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VjEsfVyuJd5rTmCZtHxvtZNrn1SA283X6hI5rQe2lQo=; b=O2QqAI3a+2jjZqZ4G4h7BPBiicivLZk9zK/jp9w214sxJFIh8D0gI+l97txYufz399 F1rxIcBH6j1Sl6fUc5Nuhr5Hp0PiNSK+JDRh71yCeGmd2ecaeAT+uaWYcs9eO5dcVX59 Kg4FOTCP+zusP2MPu4EyLchE90sM/bPP2hNFY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VjEsfVyuJd5rTmCZtHxvtZNrn1SA283X6hI5rQe2lQo=; b=WClezOi6P/+LD7PqlGC60j+pw6z84Widfib+FBYxqd+7oUs0QKZfsq2gPmQ9EwNHx3 xPj61JT4AjfIebiTMWcmfjvqLpjPfCwfcUbp06OX+8pOXbuXg/VgNWkcuWwYSW0aftd+ MDaxNu5i5S5kZWL73yIlLH94ho+S1SlQTEavtTB4zn5TqJOXen1A/qATMfx10qBaQiu4 WdrmeWqXCEM7UEAnIdeAmdt832rZKj+kFJXEYyEbiPWOYCRioogpKvi1rcs9rQx+cLmd kXtD+d7Eq/y/lqdD6DPbTKL3z9fdIEsqAjhItu4o0dX4Ss4UDRk+lq0tUqCQwn2U/RQH ya7A== X-Gm-Message-State: APzg51CO5CzddKhiTVIlKTNG0SJ8syMKBI5BjYmlEH+KOk0er9yzs419 30fj6x0LMhP2bXhOYoIa/IbfADfwUvZomu/WXJI= X-Received: by 2002:a24:1d0c:: with SMTP id 12-v6mr1231580itj.9.1534808322488; Mon, 20 Aug 2018 16:38:42 -0700 (PDT) MIME-Version: 1.0 References: <20180820212556.GC2230@char.us.oracle.com> <1534801939.10027.24.camel@amazon.co.uk> <20180820223557.GC16961@cisco.cisco.com> <1534806880.10027.29.camel@infradead.org> In-Reply-To: From: Linus Torvalds Date: Mon, 20 Aug 2018 16:38:31 -0700 Message-ID: Subject: Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU) To: Dave Hansen Cc: David Woodhouse , Tycho Andersen , Konrad Rzeszutek Wilk , juerg.haefliger@hpe.com, deepa.srinivasan@oracle.com, Jim Mattson , Andrew Cooper , Linux Kernel Mailing List , Boris Ostrovsky , linux-mm , Thomas Gleixner , joao.m.martins@oracle.com, pradeep.vincent@oracle.com, Andi Kleen , Khalid Aziz , kanth.ghatraju@oracle.com, Liran Alon , Kees Cook , jsteckli@os.inf.tu-dresden.de, Kernel Hardening , chris.hyser@oracle.com, Tyler Hicks , John Haxby , Jon Masters 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 Mon, Aug 20, 2018 at 4:27 PM Dave Hansen wrote: > > You're right that we could have a full physmap that we switch to for > kmap()-like access to user pages. But, the real problem is > transitioning pages from kernel to user usage since it requires shooting > down the old kernel mappings for those pages in some way. You might decide that you simply don't care enough, and are willing to leave possible stale TLB entries rather than shoot things down. Then you'd still possibly see user pages in the kernel map, but only for a fairly limited time, and only until the TLB entry gets re-used for other reasons. Even with kernel page table entries being marked global, their lifetime in the TLB is likely not very long, and definitely not long enough for some user that tries to scan for pages. Linus