From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH v6 11/13] kvm, x86: update spectre-v1 mitigation Date: Wed, 31 Jan 2018 09:07:10 +0100 (CET) Message-ID: References: <151727412964.33451.17213780323040673404.stgit@dwillia2-desk3.amr.corp.intel.com> <151727419015.33451.13762926723789552997.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Dan Williams Cc: Ingo Molnar , linux-arch , Kernel Hardening , Andrew Honig , Linux Kernel Mailing List , Greg KH , Paolo Bonzini , Alan Cox , Linus Torvalds , Jim Mattson List-Id: linux-arch.vger.kernel.org On Tue, 30 Jan 2018, Dan Williams wrote: > On Mon, Jan 29, 2018 at 5:03 PM, Dan Williams wrote: > > Commit 75f139aaf896 "KVM: x86: Add memory barrier on vmcs field lookup" > > added a raw 'asm("lfence");' to prevent a bounds check bypass of > > 'vmcs_field_to_offset_table'. We can save an lfence in this path and > > just use the common array_index_nospec() helper designed for these types > > of fixes. > > > > Cc: Andrew Honig > > Cc: Jim Mattson > > Acked-by: Paolo Bonzini > > Signed-off-by: Dan Williams > > > Hi Thomas, > > I notice this one missing from -tip, I suspect because of the > collision with the raw 'lfence' that is in current mainline? No > worries, I'll send a rebased fixup to Paolo directly once > array_idx_nospec() goes upstream. It did not apply for that reason and I'm still trying to keep x86/pti as clean as it goes to keep GregKHs backporting hell somehow under control. Sorry, I wanted to reply on that, but then my brain shut down after pushing it out. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Galois.linutronix.de ([146.0.238.70]:45729 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752558AbeAaIHT (ORCPT ); Wed, 31 Jan 2018 03:07:19 -0500 Date: Wed, 31 Jan 2018 09:07:10 +0100 (CET) From: Thomas Gleixner Subject: Re: [PATCH v6 11/13] kvm, x86: update spectre-v1 mitigation In-Reply-To: Message-ID: References: <151727412964.33451.17213780323040673404.stgit@dwillia2-desk3.amr.corp.intel.com> <151727419015.33451.13762926723789552997.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dan Williams Cc: Ingo Molnar , linux-arch , Kernel Hardening , Andrew Honig , Linux Kernel Mailing List , Greg KH , Paolo Bonzini , Alan Cox , Linus Torvalds , Jim Mattson Message-ID: <20180131080710.6s3q0a3AssU7rfnSpiKrzO0iD5K0jiG9s5LizFkvWHM@z> On Tue, 30 Jan 2018, Dan Williams wrote: > On Mon, Jan 29, 2018 at 5:03 PM, Dan Williams wrote: > > Commit 75f139aaf896 "KVM: x86: Add memory barrier on vmcs field lookup" > > added a raw 'asm("lfence");' to prevent a bounds check bypass of > > 'vmcs_field_to_offset_table'. We can save an lfence in this path and > > just use the common array_index_nospec() helper designed for these types > > of fixes. > > > > Cc: Andrew Honig > > Cc: Jim Mattson > > Acked-by: Paolo Bonzini > > Signed-off-by: Dan Williams > > > Hi Thomas, > > I notice this one missing from -tip, I suspect because of the > collision with the raw 'lfence' that is in current mainline? No > worries, I'll send a rebased fixup to Paolo directly once > array_idx_nospec() goes upstream. It did not apply for that reason and I'm still trying to keep x86/pti as clean as it goes to keep GregKHs backporting hell somehow under control. Sorry, I wanted to reply on that, but then my brain shut down after pushing it out. Thanks, tglx