Received: by 10.223.176.46 with SMTP id f43csp2730154wra; Thu, 25 Jan 2018 14:22:03 -0800 (PST) X-Google-Smtp-Source: AH8x227nACVyHJFHmAGNaohdmyLVf3+skv59P2IaXrpc2/NfE3x7sGgHu+lfvvHqx5z/C/qsEOwp X-Received: by 10.98.205.72 with SMTP id o69mr14919768pfg.104.1516918923832; Thu, 25 Jan 2018 14:22:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516918923; cv=none; d=google.com; s=arc-20160816; b=0p6WEBO1VGxUQ1mEsryf0JbDwg3pN399QNiG14v6O0yzzT8wJUcCuIzf2XaDT82bXz fWof++HIRzSEAbtMG8McvD7XuSyWh4Gr+PMCmWz9kW04QcUjx/QE/d3pveFlPTuQr/OF ch9ZyKH+5qw/MMHkiWuD1oFv+u2pGhPuCzb4CHBdcK/TBv6MDCP+d+b7WMLCC9xzRIWD 5pTyjHmWv8AH5JUJXracSrzeqhSEDnEp6ueKLY3Qg0niqkBzqDQvJhEDL0KVGiNm+CjH tXAUDznHbjPRQzbeCVp/U4zWocSrofShTWxBIqXHh1FHP19KiMq+PkSrImPtxang/7lf eC6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=2DEnHoV5vUSARJDDWz9rKZjutaekAPvmQQJUm0UcNuM=; b=H7UTsnFnzzKp3TlYOyd4ZuWhf8dFO2wfaKKgQVntID2k4IWqdLchl0wZsg+OcgSG6D TulZxsr3jxf1/hM4UtrZZkNW7AcYaBvIb1bpA4tMd0j0CWorqHTVvcZd9WpnaMPIvZmG IWJZ0bjrzAhZswzrtL9Vyt/aiAU/4PGAf7fvN0CJvjJzel8NhG1CEqi/MAGg8MEV767C GoOT2lkcqYRhTWFUtTjkOg0geFq0RFF1yfc+MbxhVPoxqdjN0Luvo1jZCpKtD30QcFWs GB08BEPtHadBdUFdJdnabaVo10upCkkERkegbDIQaxnGrhnRqfI2sFbANIpY4jqazj/T 8XGg== ARC-Authentication-Results: i=1; mx.google.com; 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 p10-v6si2629590plo.810.2018.01.25.14.21.48; Thu, 25 Jan 2018 14:22:03 -0800 (PST) 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; 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 S1751643AbeAYWUx (ORCPT + 99 others); Thu, 25 Jan 2018 17:20:53 -0500 Received: from mga03.intel.com ([134.134.136.65]:35278 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513AbeAYWUv (ORCPT ); Thu, 25 Jan 2018 17:20:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2018 14:20:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,413,1511856000"; d="scan'208";a="26395293" Received: from ray.jf.intel.com (HELO [10.7.201.17]) ([10.7.201.17]) by orsmga001.jf.intel.com with ESMTP; 25 Jan 2018 14:20:50 -0800 Subject: Re: [RFC 09/10] x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation To: Liran Alon , dwmw2@infradead.org References: <6c16fc37-bdf2-4925-8114-14f5a08c07e3@default> Cc: labbott@redhat.com, luto@kernel.org, Janakarajan.Natarajan@amd.com, torvalds@linux-foundation.org, bp@suse.de, asit.k.mallick@intel.com, rkrcmar@redhat.com, karahmed@amazon.de, hpa@zytor.com, mingo@redhat.com, jun.nakajima@intel.com, x86@kernel.org, ashok.raj@intel.com, arjan.van.de.ven@intel.com, tim.c.chen@linux.intel.com, pbonzini@redhat.com, ak@linux.intel.com, linux-kernel@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de, gregkh@linuxfoundation.org, mhiramat@kernel.org, arjan@linux.intel.com, thomas.lendacky@amd.com, dan.j.williams@intel.com, joro@8bytes.org, kvm@vger.kernel.org, aarcange@redhat.com From: Dave Hansen Message-ID: <199a5883-42c7-d25c-0756-c3d4dcdc63ff@intel.com> Date: Thu, 25 Jan 2018 14:20:49 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <6c16fc37-bdf2-4925-8114-14f5a08c07e3@default> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/23/2018 03:13 AM, Liran Alon wrote: > Therefore, breaking KASLR. In order to handle this, every exit from > kernel-mode to user-mode should stuff RSB. In addition, this stuffing > of RSB may need to be done from a fixed address to avoid leaking the > address of the RSB stuffing itself. With PTI alone in place, I don't see how userspace could do anything with this information. Even if userspace started to speculate to a kernel address, there is nothing at the kernel address to execute: no TLB entry, no PTE to load, nothing. You probably have a valid point about host->guest, though.