Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8943770rwi; Tue, 25 Oct 2022 12:59:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Ofaz7/xaFcLAIkpZAPVAqynmtAcOXGHOQPjF/XnQ7rrXvlNL9lbBtSFJY7Kpafx1UqT0m X-Received: by 2002:a17:907:5cb:b0:791:96ec:f436 with SMTP id wg11-20020a17090705cb00b0079196ecf436mr35334325ejb.100.1666727943239; Tue, 25 Oct 2022 12:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666727943; cv=none; d=google.com; s=arc-20160816; b=P+Bf1crGn4iMfeBBr8rvABta5jVOctvgPaa8ckQ6/3JaIq+5GlwI4623XXSFjTE69X 8SBA/9BnETGOFdFvxSX8DNwlISuKRbdAjen5duTgMFjQt+JpVAQ6/lTZF6ZQ8xeBvt5w 8XNWAmFXeyFeyklp99J7vgiT6mPSCodD7KXpzOT/Tl0KirvaX0qdRIaMhQhsDNqxkKkk j6NzzQdSSZPOf5npmPw3ETWZvSbYmPQYWXD7ukUBAJzw2s3S0EXB0ejwlMdEjMZ1A6yt bWieDe/0bVa2H72TMm2oyQe+YqD2Oc566O+3sh/+Kl7RwazwbhALsOysv94WYOAo0ONZ TJEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=25qw2GDUdBjXNVN2llD3TiYv8fWu8bz2tfuYAi1Rx70=; b=j9a3lV8A7weNOkZeHGbgnehZk4gSbfLaqpFgJjGtxnUTWWGuamIp4lj+wAFKf87G/T qXPPdpV0g/j3SrzWzTAZ409ymaZMA5gmAtMORCxzZZfV32l1CZviBYHEk02C5l2gAXOc Hqo28sEnUvijbOA+4I7Wx/zFcd6Z1Uw9xiLoxDGjW2fmOKhGDEdUeizwRAOJbl68MESz Euem2JoB+Ph3/HrvX+k757cEZwuCDkyACPx1PgFbobeL+UT2G9aaNMhcremqwcLoXpVx q66caWlvPvpU4tdyZ7/nBMKNj6eMTn5RjtEE+98XTCi8/jwQsDUoi4oPQGBE3iBo4hjz HhlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=K9qM46o2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a1709063e5200b007313312730esi3045194eji.85.2022.10.25.12.58.45; Tue, 25 Oct 2022 12:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=K9qM46o2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232546AbiJYT5I (ORCPT + 65 others); Tue, 25 Oct 2022 15:57:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232334AbiJYT5H (ORCPT ); Tue, 25 Oct 2022 15:57:07 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 202EE5B122; Tue, 25 Oct 2022 12:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=25qw2GDUdBjXNVN2llD3TiYv8fWu8bz2tfuYAi1Rx70=; t=1666727826; x=1667937426; b=K9qM46o25/YYEqGSqIIsxc2LOF1atygdWZtg2cw2yN07eod +pS3FRAbPRb5ITMtiClVp6kchZmkBBCQYB42SLdZ8iLRMN4bHKh3t/WiCMpk3wscsbYhxAfYhulho NZG9lQ7FpJQ4RHUvN5d4juP4Q2zLs5STqpSnZ7q5WIvgKhbFG33q6MTrQCEyjvTZYeMm3h5KUBa75 0qvvcO/8dr13sA4bSo2WEEM8nWktbFUVTyraapzn6qCh2MVpaLTeBhWSwgApE71WsE/wQJoDfv/1A tK3aVpZ4GlloWm/Z7MU3S1XsWdVTBUIveJtqmSXFDEaTYfVoveyNK0aamyWS9/Kg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1onQ2B-00GR5Q-1J; Tue, 25 Oct 2022 21:56:23 +0200 Message-ID: Subject: Re: [RFC PATCH 0/2] Branch Target Injection (BTI) gadget in minstrel From: Johannes Berg To: Pawan Gupta , Peter Zijlstra Cc: scott.d.constable@intel.com, daniel.sneddon@linux.intel.com, Jakub Kicinski , dave.hansen@intel.com, Paolo Abeni , antonio.gomez.iglesias@linux.intel.com, "David S. Miller" , Eric Dumazet , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, gregkh@linuxfoundation.org, netdev@vger.kernel.org Date: Tue, 25 Oct 2022 21:56:21 +0200 In-Reply-To: <20221025193845.z7obsqotxi2yiwli@desk> References: <20221025193845.z7obsqotxi2yiwli@desk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 2022-10-25 at 12:38 -0700, Pawan Gupta wrote: >=20 > > And how is sprinking random LFENCEs around better than running with > > spectre_v2=3Deibrs,retpoline which is the current recommended mitigatio= n > > against all this IIRC (or even eibrs,lfence for lesser values of > > paranoia). >=20 > Its a trade-off between performance and spot fixing (hopefully handful > of) gadgets. Even the gadget in question here is not demonstrated to be > exploitable. If this scenario changes, polluting the kernel all over is > definitely not the right approach. >=20 Btw, now I'm wondering - you were detecting these with the compiler based something, could there be a compiler pass to insert appropriate things, perhaps as a gcc plugin or something? Now honestly I have no idea if it's feasible, but since you're detecting it that way, and presumably then we'd have to maintain the detection and run it regularly to make sure that (a) things didn't bitrot and the gadget is still there, and (b) no new places show up ... perhaps the better way would be to combine both? johannes