Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965335AbeAJELE (ORCPT + 1 other); Tue, 9 Jan 2018 23:11:04 -0500 Received: from mail-io0-f171.google.com ([209.85.223.171]:39442 "EHLO mail-io0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965314AbeAJELD (ORCPT ); Tue, 9 Jan 2018 23:11:03 -0500 X-Google-Smtp-Source: ACJfBosQojY4Sj3QMRKGBJZjeBYXvra41TrwCi20Y/p53mXYDZebYNQwddTGp4Y1VGsmWnR/gRZhPQQDmkXp1NK8WXQ= MIME-Version: 1.0 In-Reply-To: References: <20180110010652.404145126@linutronix.de> <20180110011350.855878109@linutronix.de> From: Justin Forbes Date: Tue, 9 Jan 2018 22:11:02 -0600 Message-ID: Subject: Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code To: Dave Hansen Cc: Thomas Gleixner , LKML , Linus Torvalds , x86@kernel.org, Peter Zijlstra , Borislav Petkov , David Woodhouse , Tim Chen , Andrea Arcangeli , Andi Kleen , Greg KH , Andy Lutomirski , Arjan Van De Ven Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 9, 2018 at 8:02 PM, Dave Hansen wrote: > On 01/09/2018 05:06 PM, Thomas Gleixner wrote: >> --- a/arch/x86/kernel/cpu/bugs.c >> +++ b/arch/x86/kernel/cpu/bugs.c >> @@ -79,6 +79,7 @@ enum spectre_v2_mitigation_cmd { >> SPECTRE_V2_CMD_RETPOLINE, >> SPECTRE_V2_CMD_RETPOLINE_GENERIC, >> SPECTRE_V2_CMD_RETPOLINE_AMD, >> + SPECTRE_V2_CMD_IBRS, >> }; > > A few nits on this: > > IBRS should not default on anywhere, which goes double when retpolines > are available. > > I think I'd also prefer that we separate the IBRS and retpoline enabling > so that you can do both if you want. They do nearly the same thing in > practice, but I can't convince myself that you never ever need IBRS once > retpolines are in place. Fairly strong agreement here. IBRS being separately configurable gives us an option for the paranoid, and allows distros to ship with it off by default.