From patchwork Mon Oct 17 14:53:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 3538 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1494212wrs; Mon, 17 Oct 2022 07:58:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67JyR45B0nvJHD++MpYEFCueZI3T7WUO/aBfw1sbK3ajcaYyQRxH7484JDTzkEJ2hOGR6J X-Received: by 2002:a17:90a:9ec:b0:20a:e8e0:3f60 with SMTP id 99-20020a17090a09ec00b0020ae8e03f60mr13792594pjo.100.1666018701107; Mon, 17 Oct 2022 07:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666018701; cv=none; d=google.com; s=arc-20160816; b=kYTmDmj5oWOOAUZvW4BkCG0XTrQo8+YLpJN7FqGVj+ZAzX581WnuMVxFAio2QMrEqC kpxFQBvdboPXdBp92sW0dqBPHGPRMuiEurxzAb4ZBF//LSn3PW6rbP9w1SlpQdY5qJu0 KsZKWlYvz2qW8FQf0h58iefGYiDj5gU/2roi8fiXdsIojUxTN65hF7u1Jx2FvosB3P4K c6SuKPcl2NNWuunyE81npXAgxbl2/FXDuTjsIgtXM4x80fn6IJNSi9ypFJuh/Bdn2tNu cyWDVCv7veLKfRMHYDpALzWfwwMU7OS0nOWlb3O8cssLh31Z6xeR7aM2v2xDw++e9FRu 4Qzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=yg47wEtGmxkn7LmYA5aeq8v92KRiwHDl65auQo/fnA4=; b=zD7o4hIVcpolSiOBFSbvRt/4XZbXYuD7z/lnc/Ds911dwPhBwMADUbP9qeAP67fDMF 2j7V5Xqnij5vDis7xJl4d8iIHaP7Ln879YgwLlLMPSCISUYtouQODo5h6Fxkl60ImZLZ R18HcgerYlkfF86+iNRc5iM/HPmKRo4wJnSmrM84qNvBaEGYM/Khl6g52ShjOc4fqBw1 8MmxpVsCdjfDtsdBerhWPjAsUf0E4FmlRGH3sg5z2ZAar60zjHOhjtEzqIwwr5MrrF6t FzoJYYoVf4vbUQhdij6ycXfFxCjmfAGxsQwsq3SPRZlUsY4jMz1cHLWDg9mmIkaK0PZg 68OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=h4RQC2Ps; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=J1JoldzR; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q29-20020a635c1d000000b0046249619a7fsi12336187pgb.553.2022.10.17.07.58.08; Mon, 17 Oct 2022 07:58:21 -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=h4RQC2Ps; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=J1JoldzR; 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 S231290AbiJQOzL (ORCPT + 99 others); Mon, 17 Oct 2022 10:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbiJQOyB (ORCPT ); Mon, 17 Oct 2022 10:54:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1A9668CF0; Mon, 17 Oct 2022 07:53:59 -0700 (PDT) Date: Mon, 17 Oct 2022 14:53:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666018432; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yg47wEtGmxkn7LmYA5aeq8v92KRiwHDl65auQo/fnA4=; b=h4RQC2PscyhAGH9fRVCpHwKRAfe5ifmNZK7lKYSMpQVDXvYf9C0QTkW8esY50FgwLNMBgx yiyitvQF0fEh9zs1jkvoPpqGD+J+YnZVs0SUIurdc2c593pxjPp00KHX9piovG7Us31f5j XZIpjLA4gtipFp7tKh27INQS4J9gRPByPiAvZxCqZkN38qWWCEkeVAy7bv6peDlRA0VAcJ grQT2Y9i6vRzSl1DnTeY9XB0glTIL7gOBadfHWJoiKq5eLajaWES/euV11s5zT3VgDDbUB 4tHSF/TJc9qbm/PfzTiHkYJdx5sTdpTFDs88u06tIQVUJxs7Ft5MuB6sx08mCw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666018432; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yg47wEtGmxkn7LmYA5aeq8v92KRiwHDl65auQo/fnA4=; b=J1JoldzRUDJAuoQbH2tAo0Yc2ib82CWk7oTQZL6h0XeDg+EudnT0qwqJRsXfK9vYXvNkrb CO+ZmSEkFMmWDBBQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/Kconfig: Add CONFIG_CALL_THUNKS Cc: Thomas Gleixner , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220915111146.849523555@infradead.org> References: <20220915111146.849523555@infradead.org> MIME-Version: 1.0 Message-ID: <166601843147.401.3646706448544046869.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746947225558185808?= X-GMAIL-MSGID: =?utf-8?q?1746947225558185808?= The following commit has been merged into the x86/core branch of tip: Commit-ID: 8f7c0d8b23c3f5f740a48db31ebadef28af17a22 Gitweb: https://git.kernel.org/tip/8f7c0d8b23c3f5f740a48db31ebadef28af17a22 Author: Thomas Gleixner AuthorDate: Thu, 15 Sep 2022 13:11:17 +02:00 Committer: Peter Zijlstra CommitterDate: Mon, 17 Oct 2022 16:41:10 +02:00 x86/Kconfig: Add CONFIG_CALL_THUNKS 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) Link: https://lore.kernel.org/r/20220915111146.849523555@infradead.org --- arch/x86/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f408fa8..e18963e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2446,6 +2446,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 FUNCTION_ALIGNMENT_16B + menuconfig SPECULATION_MITIGATIONS bool "Mitigations for speculative execution vulnerabilities" default y