Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70911C27C7C for ; Mon, 20 Feb 2023 19:15:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232198AbjBTTPJ (ORCPT ); Mon, 20 Feb 2023 14:15:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233235AbjBTTPG (ORCPT ); Mon, 20 Feb 2023 14:15:06 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B86C21EBEA for ; Mon, 20 Feb 2023 11:14:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 81B36B80DC5 for ; Mon, 20 Feb 2023 19:09:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AA77C433D2; Mon, 20 Feb 2023 19:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676920151; bh=bhNIobQbVGcXtF02rL+clFkrFHheOF5W60xYcWPqN2g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jQwyJZKg/TcLRuwH/pddgabF6QELoOe0ei/u9uSNu4O23gBqCMKG09emLnN0oA1PK HVyisfSuTuSuxuX+/mWMy2sEqktEA4X8iMIuSjgbNmkU8+/sSOuvy3wWMf7BUt3LUo bBpmsVxyWvM4JOLOQiF/8YQ/zhTfBtVY0R//bfOVMS7YhuynCxI6nugS7IgM20EobT 7UzSezwvGkMO/sfSx/Hb8wmSClGYbknz6Q6oUrvyuPb/49fq++0VOFF2tD2jKQD5VO cP2fxAwdqJMzr0MkNeGPs8xd0Gb6Qf7ppwZtAz4TZbn0MaxBUpSexjEcXn35OWvKjj qFZtHKOsY2bBg== Date: Mon, 20 Feb 2023 11:09:08 -0800 From: Josh Poimboeuf To: Borislav Petkov Cc: KP Singh , linux-kernel@vger.kernel.org, pjt@google.com, evn@google.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, peterz@infradead.org, pawan.kumar.gupta@linux.intel.com, kim.phillips@amd.com, alexandre.chartre@oracle.com, daniel.sneddon@linux.intel.com, =?utf-8?B?Sm9zw6k=?= Oliveira , Rodrigo Branco , Alexandra Sandulescu , Jim Mattson Subject: Re: [PATCH] x86/bugs: Allow STIBP with IBRS Message-ID: <20230220190908.gfd2c4tuzeb7cft6@treble> References: <20230220120127.1975241-1-kpsingh@kernel.org> <20230220121350.aidsipw3kd4rsyss@treble> <20230220163442.7fmaeef3oqci4ee3@treble> <20230220175929.2laflfb2met6y3kc@treble> <20230220182717.uzrym2gtavlbjbxo@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 20, 2023 at 07:34:59PM +0100, Borislav Petkov wrote: > Drop stable@ again. > > On Mon, Feb 20, 2023 at 10:27:17AM -0800, Josh Poimboeuf wrote: > > IBRS is only enabled in kernel space. Since it's not enabled in user > > space, user space isn't protected from indirect branch prediction > > attacks from a sibling CPU thread. > > > > Allow STIBP to be enabled to protect against such attacks. > > > > Fixes: 7c693f54c873 ("x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS") > > Yah, look at that one: > > commit 7c693f54c873691a4b7da05c7e0f74e67745d144 > Author: Pawan Gupta > Date: Tue Jun 14 23:15:55 2022 +0200 > > x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS > > Extend spectre_v2= boot option with Kernel IBRS. > > [jpoimboe: no STIBP with IBRS] > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I'm assuming this was supposed to mean no STIBP in *kernel mode* when > IBRS is selected? No it was supposed to be "no STIBP with *eIBRS*". > In user mode, STIBP should be selectable as we disable IBRS there. > > Close? > > If so, pls document it too while at it: > > Documentation/admin-guide/hw-vuln/spectre.rst > > because we will be wondering next time again. > > Like we wonder each time this madness is being touched. ;-( As far as I can tell, that document was never updated to describe spectre_v2=ibrs in the first place. That would be a whole 'nother patch which I'm not volunteering for. Nice try ;-) -- Josh