Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1866367imw; Sat, 16 Jul 2022 17:18:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vAdnYQs4Qcfbtid9TpGvMRpi66z7FuIx7UfVZZTf3KfvdqVQ0qWW++W8wViKoZ8J99kppe X-Received: by 2002:a63:f746:0:b0:419:c3bc:417c with SMTP id f6-20020a63f746000000b00419c3bc417cmr12400628pgk.78.1658017126820; Sat, 16 Jul 2022 17:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658017126; cv=none; d=google.com; s=arc-20160816; b=CLDKiA5Z9er3mt9Ygn+lqJVzID4DI3WkBFyw3XtRJu+co8o/8ChNOrH7RovLxBEhJj 8OrBtfY9IZOcwAUo+Ls4tTAZMSHuEbG4CJnAai8sdvyInHaIUfni9zkFgMeYmBZyykGv lLED3eS9SUhEJLCaysRc6JuUqGgRZlNlXZTZanQYXM2qXwYqkCw7MYmKyutkIJLlL+/+ mi3m8CVW8yaxrhWCLR++hlA/ubRqLqhKQu/mge2H1Qncyas6SRSEIx8hs8OWEIp2xhqy 7MiOAyAjois0yyPUfU1/W7pf4xQpmC/bBu5k8mf5DoIr1rhroQVN6fBz5LhdDNLJC5ia iGUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=QqAiRodBnzoFq0Uv7yhac721jXiH8ElvZylHXExmCIo=; b=K/QfCsdggJ4Z8LLQBtr1JRDL9SEyXJa9wes3hEKyQMSzFrUBdkK7CX0k+Wvpy5AqAc Qdufu+iqS/gkSQwibO2euIPOgUaAGYYEEnEqsPFgeqA2hdW6NT0b+pReupQBQFZUg+24 SY1ieaBpB5T3SM7mJGMbtI8/8LDx39nA6uAzhsO9kKUmDYNMC18mt7muQ4fQk5j1ncnC XTICJ6IkX5DBrM14s+afgwVdRYws9VxI0Xisstr0FsAqKzPE5Qw+zs4l1il3rT1m0GQ1 6UD3duKOWyohF3gQX4IZHRGywQp7ft/HqnvCiE6XaiHwWhfbEhif+GC7P1ptIjxCumSf UFYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rc1Ng1Bc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g17-20020a056a001a1100b005251a325ea0si8398691pfv.269.2022.07.16.17.18.01; Sat, 16 Jul 2022 17:18:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linutronix.de header.s=2020 header.b=rc1Ng1Bc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232453AbiGPXSM (ORCPT + 99 others); Sat, 16 Jul 2022 19:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232621AbiGPXRo (ORCPT ); Sat, 16 Jul 2022 19:17:44 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123AA23BCD for ; Sat, 16 Jul 2022 16:17:34 -0700 (PDT) Message-ID: <20220716230953.500517388@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1658013452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=QqAiRodBnzoFq0Uv7yhac721jXiH8ElvZylHXExmCIo=; b=rc1Ng1Bc0mSzCZ/ImhA9uf8toqbfvxb+B6ftlfcWG2JyuRJudFt2g7sSsCzqjtYkEj14DI QPvFMvBcJb6wRR9dqB9aD2kkVIg5F5z9es74kovLN9hxHidtN5xAH9bmqFnm6X4hHfMaHe GyyETPaiceyyDHB1Evwmp4Qyc4aHqJqIINX5CrbDAArAGTNzkzyAwKZIdF+6KRcCC7a4MP AMHMu/jbLzNJAuQJVaQxOZB3TTeX8yCJTzCewDNIrG+X2ndUPEPKOg65QPP4Idi8ZBdtJE AFdrioCjAKEUF1y2Ccxcg22gBstUtfw4QMup4ftqKotH9l/IOiBKUsOqzUMNyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1658013452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=QqAiRodBnzoFq0Uv7yhac721jXiH8ElvZylHXExmCIo=; b=h3EmeZaBUFDKVEHqcnwlhn/N/0VIM4S+ifGV9IOeuhi+KU5NpQAvw512pb2glCrTBLzpD9 g7STLvCrOC9Cz0Aw== From: Thomas Gleixner To: LKML Cc: 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 Subject: [patch 14/38] x86/Kconfig: Add CONFIG_CALL_THUNKS References: <20220716230344.239749011@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Sun, 17 Jul 2022 01:17:32 +0200 (CEST) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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-kernel@vger.kernel.org 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 --- arch/x86/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2439,6 +2439,14 @@ config CC_HAS_SLS config CC_HAS_RETURN_THUNK def_bool $(cc-option,-mfunction-return=thunk-extern) +config HAVE_CALL_THUNKS + def_bool y + depends on RETHUNK && OBJTOOL + +config CALL_THUNKS + def_bool n + select MODULE_ALLOC + menuconfig SPECULATION_MITIGATIONS bool "Mitigations for speculative execution vulnerabilities" default y