Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1851331rdb; Sun, 4 Feb 2024 04:20:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXDoMWcjgL9JXXrSpkhTpJWrr+cgl/lHYQ+BNyugpiRPGXOkCIE9+qvo5V2YFsKi8zrDrY X-Received: by 2002:a17:903:94d:b0:1d9:69bb:3b2b with SMTP id ma13-20020a170903094d00b001d969bb3b2bmr7308108plb.25.1707049215410; Sun, 04 Feb 2024 04:20:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707049215; cv=pass; d=google.com; s=arc-20160816; b=TBlw5mjugPflQ9o4EjJYDAR1I+hEBbjEiHqDylJ5+oQFv+yLgbZYrCHBAf6sn8opU1 KK8JyCVTZ5WibAZfLiqrfE9Amhs2LieltVSBUJlEj4acwmfhuVR4eXmcjV9Hn3dRbQBZ wP3jJqGrShBoIQTIVghGEEQMnbP5LZlhHtCu+kLdxTthwqHWBaPhiTxr6XfRqk2cxnnJ kg4X2JHdJdun8ysjmABObiAFP2GuBUtb/o9/gW+ippcpGB/MY0i2TQST4FEDOYc5Kxy6 Tij3IKLqB5aLqevSrXiSMP+0qKVF9qVEk5thJU6HLyabixl2eSDfrWFTbUsklkEwHcIs Jlpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=+HpezjwNAWaS09QOPt1Suyxpj5qI2h3ZRHPTeCFoBKs=; fh=izxk5GsaDBEnZvaJkcrNrWGCf7pGB8Mxy2lWagQX8tU=; b=Sbhha0YL+tCHNORmkyJZeZP4s1FJCBxJIRJYUsU1eqfKVieHdVtLO/Sy3/8fHp+94Z 77WhjxWovlo2ni2D+UKI+nKU5B2+L9IAIQC5S/9RhHoStKGEjAcUwLn9n7Naptfzutm2 fdWNnGGhiRBudl6wpANUcFgn5O1tqFt5QAzIlh8hbvuaaEVX9MTNxco2CWMZoma/iYl6 dlBzJ5RPsAXQ/M/eQjzlcbB6A0rf1FAEtbS7ZZqOri9rIfsxuDwbsviktpPKnLxIumWL OTzkOZOBjFoEtRi16bRaslt4XSMaC0cFwmrRunye71qHgSLvRU9G5dIKbiweonXxHANA u/7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KzuwQi07; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51632-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51632-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCX4Fp8+3SM4vtmK8OdwiMxH9ylv5FqvH4Gh3ouy6HbvgVsRDnPbCCbABOsKiVqzzAUFRq5e6qtVqwsPxD/LiZdXvrKRWxMHCzaY+3eBEQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f2-20020a170902ff0200b001d904d7c449si4597255plj.271.2024.02.04.04.20.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 04:20:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51632-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KzuwQi07; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51632-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51632-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 00B96283187 for ; Sun, 4 Feb 2024 12:20:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44CA922338; Sun, 4 Feb 2024 12:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KzuwQi07" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72DC722325 for ; Sun, 4 Feb 2024 12:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707049208; cv=none; b=CfeGljtfQi5hFQx4TH86GiYzWBP0qNQT5pHXT0tukRgBtFNXsFHKUXthB2dqtQVGGQGsQL+c2arZGXE/CEzCp0Fx2T/7GyPxpldrx2WoyQizO9JprLaDM7fmFnnZZ/R5uHjmEaaqiVMHu0/n8Sps9BqpXn6YYK8oDtg1nfzYzAA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707049208; c=relaxed/simple; bh=MjKwZovmZ5kVOTYgFx5syEe4MSxQyg3TO0GlyMpv9x8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=QyDqiAtetU9LM3OStksvQ1sW/zOu8dszo/zBP0/VeR7UfLdqPdaiYehaUbofeQl93D34azyg/fAqxtJOyBIHTPMuwZ8eU3CGZMhJw69ShumprVIRgtaGmXJhEIM4T/DNdoDzN3HaJfWI1iZivS2aPe7LU8qCgg7ZQTjDfkrHUEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KzuwQi07; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82DB4C433F1; Sun, 4 Feb 2024 12:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707049208; bh=MjKwZovmZ5kVOTYgFx5syEe4MSxQyg3TO0GlyMpv9x8=; h=From:To:Cc:Subject:Date:From; b=KzuwQi07A15IyLk0/OZ8dhh/n+/YG3pjC6SE2AU+6MlC2vfC7IAmcfbUa1miuNCcC PYDp5pq6YBEB+h44kLlJf03VKMIhkcaS4Kh3Nx8ZmuKfyY0SWjhdbJnSgqnSh8KZ/X SCBLdTcSvIYe3FT0/pzIp0jHPbDU7MjLFBAg2DpzJo7F1w7WjzCMwNXn9NvA+Gg+lc XsH74wucBiSiWKyBdfOdEd67zvvjPqZ9TV5yEWFFAcvu3aus5gXBxg9HkEwYU/JNYa eKoSNxF26kB5uyolA4WsPk4N8w7Yjbs0Wct4sek6gZ1m6oJ/sLS9AJfuP5WF4sLbIv iisfrI6DkbVKA== From: Masahiro Yamada To: x86@kernel.org Cc: Josh Poimboeuf , Masahiro Yamada , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y Date: Sun, 4 Feb 2024 21:20:03 +0900 Message-Id: <20240204122003.53795-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit It took me some time to understand the purpose of the tricky code at the end of arch/x86/Kconfig.debug. Without it, the following would be shown: WARNING: unmet direct dependencies detected for FRAME_POINTER because commit 81d387190039 ("x86/kconfig: Consolidate unwinders into multiple choice selection") removed 'select ARCH_WANT_FRAME_POINTERS'. The correct and more straightforward approach should have been to move it where 'select FRAME_POINTER' is located. Several architectures properly handle the conditional selection of ARCH_WANT_FRAME_POINTERS. For example, 'config UNWINDER_FRAME_POINTER' in arch/arm/Kconfig.debug. Signed-off-by: Masahiro Yamada --- arch/x86/Kconfig.debug | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index c5d614d28a75..74777a97e394 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -248,6 +248,7 @@ config UNWINDER_ORC config UNWINDER_FRAME_POINTER bool "Frame pointer unwinder" + select ARCH_WANT_FRAME_POINTERS select FRAME_POINTER help This option enables the frame pointer unwinder for unwinding kernel @@ -271,7 +272,3 @@ config UNWINDER_GUESS overhead. endchoice - -config FRAME_POINTER - depends on !UNWINDER_ORC && !UNWINDER_GUESS - bool -- 2.40.1