Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7311839rwi; Mon, 24 Oct 2022 12:46:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6sYEteunjouw0yfzwKki52xIrYlz1QAlcha0kh0K15ix0KBH1yh1JLMep9NjwevBFswpi8 X-Received: by 2002:a17:907:6d11:b0:78d:cce7:2bd5 with SMTP id sa17-20020a1709076d1100b0078dcce72bd5mr28702600ejc.43.1666640796332; Mon, 24 Oct 2022 12:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666640796; cv=none; d=google.com; s=arc-20160816; b=s80Tc73KpZa1cGqCT8N6CYmCIMdTgwPkw7aEIuJ7yj4fn9B7fcZff/NnmSv+28jWGC 8kQwH3/A+reYe3jZmeIQ0u19qe2c/SCIc5paHddQbXM7nmzfsPCONmTqqv4j9nndt+oL 6lKGsToy/Cdj6UYZ3DOQ9nGmlbb3M4oQS25q5jm9AccAOsFMlf/sTg7NLHLhIoYGghxy Ajm36O+2/mcTOZZF5/Gt6Ntx5688GjA68kKiOzjEqDeHLyyFxp7X9wbRER8oE9hI/00g vNxO/49lYW77tgx8Sw/TFgEajrALDGDPLg57BJ5V5h+dafWolFJKiQM6BB4k6zxvqT5f JpCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p/lcatgRWi+8tsmXslWyRyjXl8E6kTIOym4FOfEI2Bg=; b=SF1b15ySxA7NGD/Kg+xBGlKLYuk5sF6JeqLOZwNteJcm6O5CfS0vAZw+TpRarQpXqA kAnW9tIRgQ2OJQIbK5gVHXTeuvsRkK/eStMDy0BZN4AwzlIdqFSocQ6xhLKH09EIsomh PuoggQX3c1czfWMPZSaTEalrcbYcs1EXUrlWGHPU7dywQUpT6KFDgRZXkaitQAQJkQq0 W+28J/+8UeSJcJj4vCI2RYJKeakTtGoNznFSMh07EDTXBJm4YYPfBKcwiO2GOIKTRT+G nULylrHFNiIw/0v+vVl3K38YoFcIj4Q6HxEuVkhOJk3RQW5I7bL/3tfzMtCvQmSXeKx4 h0MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cbLxqiRy; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k19-20020aa7c393000000b0045829a1c0b3si542495edq.251.2022.10.24.12.46.03; Mon, 24 Oct 2022 12:46:36 -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=@linuxfoundation.org header.s=korg header.b=cbLxqiRy; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbiJXTmj (ORCPT + 99 others); Mon, 24 Oct 2022 15:42:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233460AbiJXTl3 (ORCPT ); Mon, 24 Oct 2022 15:41:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1CF8263F15; Mon, 24 Oct 2022 11:11:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1889DB811D8; Mon, 24 Oct 2022 11:55:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45F5BC433C1; Mon, 24 Oct 2022 11:55:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612515; bh=ijZSo/cdeKszAc/rK+X/Vy4APaR0n/bBdD5341uT48Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cbLxqiRytFYmBfMT0SQFBhg0c52p8/tNcljVufLmg5LiJFNMAYpjSJvqJH5HeELSS FoHpNFhWB2pTo7Qn+hbV4Qrthd/fholl2W7hn9SC25MtaW4CGZC8kn8nWaSnlNDHwX sotujj+18nlNQeVd2sGt2XYyNIAJ98WDinRaAz50= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masami Hiramatsu , Russell King , Sebastian Andrzej Siewior , Danilo Cezar Zanella Subject: [PATCH 4.19 003/229] ARM: fix function graph tracer and unwinder dependencies Date: Mon, 24 Oct 2022 13:28:42 +0200 Message-Id: <20221024112959.221989184@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Russell King commit 503621628b32782a07b2318e4112bd4372aa3401 upstream. Naresh Kamboju recently reported that the function-graph tracer crashes on ARM. The function-graph tracer assumes that the kernel is built with frame pointers. We explicitly disabled the function-graph tracer when building Thumb2, since the Thumb2 ABI doesn't have frame pointers. We recently changed the way the unwinder method was selected, which seems to have made it more likely that we can end up with the function- graph tracer enabled but without the kernel built with frame pointers. Fix up the function graph tracer dependencies so the option is not available when we have no possibility of having frame pointers, and adjust the dependencies on the unwinder option to hide the non-frame pointer unwinder options if the function-graph tracer is enabled. Reviewed-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Signed-off-by: Russell King Signed-off-by: Sebastian Andrzej Siewior Reported-by: Danilo Cezar Zanella Signed-off-by: Greg Kroah-Hartman --- arch/arm/Kconfig | 2 +- arch/arm/Kconfig.debug | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -68,7 +68,7 @@ config ARM select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU select HAVE_EXIT_THREAD select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) - select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) + select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL && !CC_IS_CLANG) select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) select HAVE_FUTEX_CMPXCHG if FUTEX select HAVE_GCC_PLUGINS --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -47,8 +47,8 @@ config DEBUG_WX choice prompt "Choose kernel unwinder" - default UNWINDER_ARM if AEABI && !FUNCTION_GRAPH_TRACER - default UNWINDER_FRAME_POINTER if !AEABI || FUNCTION_GRAPH_TRACER + default UNWINDER_ARM if AEABI + default UNWINDER_FRAME_POINTER if !AEABI help This determines which method will be used for unwinding kernel stack traces for panics, oopses, bugs, warnings, perf, /proc//stack, @@ -65,7 +65,7 @@ config UNWINDER_FRAME_POINTER config UNWINDER_ARM bool "ARM EABI stack unwinder" - depends on AEABI + depends on AEABI && !FUNCTION_GRAPH_TRACER select ARM_UNWIND help This option enables stack unwinding support in the kernel