Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753215AbeADUsV (ORCPT + 1 other); Thu, 4 Jan 2018 15:48:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46152 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752486AbeADUsU (ORCPT ); Thu, 4 Jan 2018 15:48:20 -0500 Date: Thu, 4 Jan 2018 21:48:18 +0100 From: Andrea Arcangeli To: Greg KH Cc: Tim Chen , Thomas Gleixner , Andy Lutomirski , Linus Torvalds , Dave Hansen , Andi Kleen , Arjan Van De Ven , linux-kernel@vger.kernel.org, David Woodhouse Subject: Re: [PATCH 5/7] x86: Use IBRS for firmware update path Message-ID: <20180104204818.GR13348@redhat.com> References: <8d3710432534b27d224283557c4629cd1aa5b0ea.1515086770.git.tim.c.chen@linux.intel.com> <20180104200515.GC30228@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180104200515.GC30228@kroah.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 04 Jan 2018 20:48:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 09:05:15PM +0100, Greg Kroah-Hartman wrote: > On Thu, Jan 04, 2018 at 09:56:46AM -0800, Tim Chen wrote: > > From: David Woodhouse > > > > We are impervious to the indirect branch prediction attack with retpoline > > but firmware won't be, so we still need to set IBRS to protect > > firmware code execution when calling into firmware at runtime. > > Wait, what? > > Maybe it's just the wine from dinner talking, but if the firmware has > issues, we have bigger things to worry about here, right? It already > handed over the "chain of trust" to us, so we have already implicitly > trusted that the firmware was correct here. So why do we need to do > anything about firmware calls in this manner? > > Or am I totally missing something else here? Reptoline-only case there. BIOS isn't built with reptoline. Kernel is trusted too but it can be tricked unless built with reptoline. If reptoline wasn't used IBRS would already be set and no issue would materialize in the BIOS. This is just a fallout of the reptoline being used, which requires to close holes here and there by using IBRS where reptoline alone can't reach.