From nobody Mon Apr 6 21:32:20 2026 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 7B0CDECAAD5 for ; Fri, 2 Sep 2022 14:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236313AbiIBObg (ORCPT ); Fri, 2 Sep 2022 10:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236085AbiIBO1g (ORCPT ); Fri, 2 Sep 2022 10:27:36 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ECCE158199 for ; Fri, 2 Sep 2022 06:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=/Fb9zUxhEEbcmp5Brb1qrwIPV90iUAqtYDCEw6WSBXI=; b=hKiXy0u9hoSBZF8nc2DmAek7xT TEFVtr6iI17ckJ00gdUCFKOkzxud2RS2pcRnzx+7yRivbNAjWM9jEaIjPkzI2sYFPxL4RyBYyBgVU dHM8aIxF/6VZ6DDtvX1rsU4hdUf6X+XN9TLDCay5I+u9LOIDZcoMakow3Q4CzDCy6EftPPysqztP4 aP6P5RmQ7VfzKVLHpab6CV6lJOkt5i8BV718IltoWTNNLqKNHPYkZ97oDVVzPJ/m0D5157rfAE+Nn S5Zok8o+Y5aNEW0O3IWboq7C53rBPnQek/Of8ePpXDZqaGz/S91hQ89ukinIHcdOlRQaFFFi3P+Kn P5aYbL3w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU77N-008g8V-6c; Fri, 02 Sep 2022 13:53:58 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 35D4F302A1D; Fri, 2 Sep 2022 15:53:54 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 280222B8EF7FC; Fri, 2 Sep 2022 15:53:53 +0200 (CEST) Message-ID: <20220902130950.308238294@infradead.org> User-Agent: quilt/0.66 Date: Fri, 02 Sep 2022 15:07:03 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, x86@kernel.org, Linus Torvalds , Tim Chen , Josh Poimboeuf , Andrew Cooper , Pawan Gupta , Johannes Wikner , Alyssa Milburn , Jann Horn , "H.J. Lu" , Joao Moreira , Joseph Nuzman , Steven Rostedt , Juergen Gross , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , K Prateek Nayak , Eric Dumazet Subject: [PATCH v2 38/59] x86/Kconfig: Add CONFIG_CALL_THUNKS References: <20220902130625.217071627@infradead.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Thomas Gleixner In preparation for mitigating the Intel SKL RSB underflow issue in software, add a new configuration symbol which allows to build the required call thunk infrastructure conditionally. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2432,6 +2432,13 @@ config CC_HAS_SLS config CC_HAS_RETURN_THUNK def_bool $(cc-option,-mfunction-return=3Dthunk-extern) =20 +config HAVE_CALL_THUNKS + def_bool y + depends on RETHUNK && OBJTOOL + +config CALL_THUNKS + def_bool n + menuconfig SPECULATION_MITIGATIONS bool "Mitigations for speculative execution vulnerabilities" default y