From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.62.27 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795991762; b=1WDxyF4xBWkSJbjB6vV+NG1fwthXNqHZlWZ1bInFkOekhnB3VardNgc+6GmJkW0nQalz jU76XuvkzT+eWDN2bsCVNutvlMlIu9XcVfFijvauA6d5+6t4/QDWrmnXp0BMoiPYleZav MtDEjJiZ/bDr8IGgWbGLetPTETh8ux/aEGSA3EA+MzFlRzLN/sY6QO2dW7fEAS6noRzXU UktOzxXd7tOD0PMb17hF28hD3SM5fgqKgxjEb5aS4ubQ7dFiWbG1gBgxd/kDI6xN9nJNp 7PgCU+V4LtXiWPpHeQWmnzJuTDf0j35y4s9CNuklP57VD6N3qLvvbjwKsJvHZTWxqXg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795991762; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy:X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=QtTUOT03bSM1RO1wUc4y5Jz02FzUYRQ42LegAoxo6N0=; b=uUJiUoT/tF1JZhusgmP6JaaObSqNHiOBovlN6I6rlvlV+nCHErEmWd76RMnS/kgIOV3/ L+dEdOphi9Hm7Q5/dTd/Xuzz4zXm5XTkFkNGhxF/4A+O8nnJNjp2/LBO6VmEvlFo4dKiU Ut7Ho+YefGCJXxTx6dcggOtHt3jnLxteYcofvEbcs/bhcMiXICQ8ns4Ty37ddw1Ig49fm rNo+6BlSfivxmJJwMhH7T/u1klBEz4SPjurdRIvYAn3Z21ScZGIqoI5lWWANqt/cN3snU EmV6wksM6Fz0TWXO8XRvhYap3/R4YchS2d+eaTs9jOZvMssIx+6QeYlAZv0sT5TeFDQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b="aa/hEGqn"; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.62.27 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011027.outbound.protection.outlook.com [52.101.62.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79431606A31C for ; Sun, 29 Nov 2026 22:36:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 79431606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=aa/hEGqn ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N7XVTUkJr33jsfmhO51Z3kGUg54zma0uRmZGzOJtWgCfH7oztd4P5C/yOV2exJgQ7WbJDqqQhSj6GBRmZQ+kcCb+zew/K8okiQe9EGzexJQ1JNTi1hxYfDvcFaOxfzPXGpCLoufysGJrgdVpRNDKNpya+3ENk2PMx2gwfIPcOgI74eUwnA2tDVcbOsjis0J3AkFj88OSngv/rKBOfU4lPev94Obpdnt+R/4JPHWWWZa+UZ7xerqKAh9KifnSk00ka8hfkxnRPske7HVzhPGo9QUyUFKKupyjRn/czwLKvvkefzp40V4vYUWy0JgBzQ3OYeWmOSjWPeS86h11YFVXPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QtTUOT03bSM1RO1wUc4y5Jz02FzUYRQ42LegAoxo6N0=; b=e+L82lHF/58P8byRXk+RlK05VmNEwJNg3KHfemON7EiJOdk6CQ0PuchLlOI0aAkV95HXge9I7Ia5tqIJmSBxMfYLdDcEZEH/ZDsffjo8SAlJKwITF3fg1UM/JBA1umrmDJ56chgSLh3knzVm07Y9usZPVTiXntfIt14LbpqybzEdM/px2IY525a84K4zlcD5wv2UUxdqeEaUKpImoD8+ZBwy+RhCfvzNSug+sc0pwNHBSWjaws2vwouuJb2MSNbKv1LRPj5wtj5s0hHAse2ECNVTY4oNN2Emx1zXwlA3Ag6WeUimgKCvVVYDgJ7r6Ar4ulMVAFtJY3DzK5DSZs8Aew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QtTUOT03bSM1RO1wUc4y5Jz02FzUYRQ42LegAoxo6N0=; b=aa/hEGqn0kWtl+ZhREMOuiJ2CWfkaWHYNUK0/LqzgGr+QRde3KhrWT1p6YLMzITxYbfb2JdKOBvUHj88f2TNGX6nH7K+Iaj/OtVa78ziBZmjILfQXf37scPv07E4piOx8v7mnwHw8BxlLSpNUOriWmrhesqqk6pz+oRh8g561aE= Received: from DM6PR11CA0047.namprd11.prod.outlook.com (2603:10b6:5:14c::21) by PH0PR12MB8151.namprd12.prod.outlook.com (2603:10b6:510:299::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.12; Sun, 29 Nov 2026 22:35:47 +0000 Received: from CY7PEPF000000F3.namprd05.prod.outlook.com (2603:10b6:5:14c:cafe::44) by DM6PR11CA0047.outlook.office365.com (2603:10b6:5:14c::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.662.12 via Frontend Transport; Sun, 29 Nov 2026 22:35:47 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by CY7PEPF000000F3.mail.protection.outlook.com (10.167.247.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Sun, 29 Nov 2026 22:35:46 +0000 Received: from BLRKPRNAYAK.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Sun, 29 Nov 2026 16:35:42 -0600 From: K Prateek Nayak To: Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , the arch/x86 maintainers , CC: Andy Lutomirski , Peter Zijlstra , Rick Edgecombe , Andrew Cooper , Kees Cook , Pawan Gupta , K Prateek Nayak Subject: [RFC PATCH 19/27] x86/shstk: Remove profiling related dependencies for KERN_SHADOW_STACK Date: Sun, 29 Nov 2026 22:29:44 +0000 Message-ID: <20261129222953.9124-20-kprateek.nayak@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261129222953.9124-1-kprateek.nayak@amd.com> References: <20261129222953.9124-1-kprateek.nayak@amd.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY7PEPF000000F3:EE_|PH0PR12MB8151:EE_ X-MS-Office365-Filtering-Correlation-Id: b3fb2b42-fd26-4f7b-3b20-08df4e691c8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|82310400026|36860700016|1800799024|23010399003|5023799004|11063799006|261009223027099003|18002099003|22082099003|3023799007|10067099003|56012099006|261026121527099003|261102123227099003|261021121427099003|261021123027099003; X-Microsoft-Antispam-Message-Info: kyZVbXsNgZKudB1Uy01/qZd0BrpMO/Fm+mrVFlopoy7UJK9Ap68jmD0u8FDUcJdKpSzug+yOlvVfX/sEhLNZ4B7CLewtBiNPgVwUnfW90Ua8a7tA9Q1yGg0iIu/tquPWfZ4SsA3aIxAom4hGGQJH2SBWQ4EHKsJ3d6aoj+VZPtJZs9O4vSJ22vpp/fv2Vg8LtLdwEcs5+7nqlDbWcPLaMUsNBbMPAV/GkKDpGOJrbt9fL0gfX4dED2mU4FFnmj3waU7mz9TEZPIEeHEpLsyy7tOv8NA9nRS5IDVWmEYNNQFenT88eiSTUzUnXOU1wBlm3qpJ05Cjwf+sLubwTPllo0xdDdktsxaHy+vOX7M1azKuNMI0mEVEyrHQkn4STJzpmWqM64Oq0duHbudNwbhte13Qkr9k/CP1WjXjcJ5/Z12WRB+T+jeciNuym8aFvLZ+vhQ3AzP7ATkqQidpSZNW1+YfC58GFEmDo7rPD1dZT7lWLi+muM/0qA9uC3Bme6kTBDkPB+Wp0UAj/gKgtrigeORF2cAdwz1YTIud1YJd085d7IZ7WAyq18mVnGMalDE7ovMtDvePjlPHSri9zXWSigntfc6KK5/ckbBLM/IxaCSTOWgSpG064VtIkxddMIs/YQ9Fg649sIg28u0CEYboCrBXpE6MTxJ2mGi0UEK3DImt2K4rtjseSVzpn+raXXOd X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(7416014)(82310400026)(36860700016)(1800799024)(23010399003)(5023799004)(11063799006)(261009223027099003)(18002099003)(22082099003)(3023799007)(10067099003)(56012099006)(261026121527099003)(261102123227099003)(261021121427099003)(261021123027099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MrUTj0WeDn23VzBsTe8M7IQxlTAIzm+4Vi1IIqo3lqekL/GNsTqE52/y7pijVfDpQa7Xuaw/tBXXnf2ozHuV5+7HhVZBW3OkFSOpWgGmJoRHQmaZNRE8noTo8al4YZN/MJfpdRV0iI5fuo4xtPWrcEWHYIbKRxDbzaENcPaa8WG0SXCGPuaxa/nv4vDwXQGkEDtT6zvCDFuOhodUr8pULRgHEGLqhFWnKRay6EJShRKgNCdwPS4P9imIohSEO0fV4LFkR6UaEbOZzqaWKkVozKQFeC8rosmkFwhp2JmtO3cwXUDlPN/vo1+IRQ3rrnIOjQcqVbbjgiHwdiYa76YNKOKYKHGwvO5osw22P54Ew+a5UfTQdCRjiEB90YBckVxevp6/eEb5dwVl4OWyibyfSyY2FKizTlq5zGKWzYuNDquaJvBWHy77o0NpG4gwMurb X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2026 22:35:46.6685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3fb2b42-fd26-4f7b-3b20-08df4e691c8f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY7PEPF000000F3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8151 Ftrace, optprobes, kprobes, rethooks, livepatch (ftrace direct call), error injection, and BPF JIT have now been adjusted to handle shadow stacks for control-flow changes. Remove the config dependencies to allow building CONFIG_KERN_SHADOW_STACK with the above configs enabled. Signed-off-by: K Prateek Nayak --- arch/x86/Kconfig | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 559b9bc95c38..21f2b41043f4 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1907,34 +1907,6 @@ config X86_KERN_SHADOW_STACK depends on VMAP_STACK depends on AS_WRUSS select X86_CET - # Replaces return addresses on the stack with return_to_handler, - # and return_to_handler itself returns with a retpoline-style - # "call; mov %rdi,(%rsp); ret". - depends on !FUNCTION_GRAPH_TRACER - # kprobe_emulate_call(), kprobe_emulate_ret() and - # kprobe_emulate_call_indirect() emulate CALL and RET by moving - # the return address on the regular stack only. KRETPROBES and - # OPTPROBES hang off this symbol as well. - depends on !KPROBES - # arch_rethook_trampoline() is a return address hijack: the - # probed function RETs to the trampoline instead of its caller. - # FPROBE selects RETHOOK. - depends on !RETHOOK - depends on !FPROBE - # klp_ftrace_handler() redirects execution by changing the - # ftrace_regs IP. ftrace_regs_caller writes that IP into the - # return slot and RETs to it, but the shadow stack still holds - # the original address. - depends on !LIVEPATCH - # override_function_with_return() points regs->ip at - # just_return_func, a bare RET that pops the probed function's - # return address without the function's own RET ever running. - depends on !FUNCTION_ERROR_INJECTION - # BPF trampolines with BPF_TRAMP_F_SKIP_FRAME do "add $8,%rsp; ret" - # to return to the grandparent. bpf_throw() unwinds BPF frames by - # walking the stack and resuming at the exception callback with - # the unwound RSP, skipping the intervening RETs. - depends on !BPF_JIT # relocate_kernel() switches CR3 and CR4 with a shadow stack live # and uses "pushq $0 ... ret" as the handoff into purgatory. It # needs S_CET.SH_STK_EN cleared first, which nothing does yet. -- 2.43.0