Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp469849yba; Wed, 15 May 2019 04:41:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHqkdyV7Ha82/3FHShdF31uOQYT4cDRE0dTO8hdwewXkKgdJJYirC1DbmzEFFdWH7qe8O7 X-Received: by 2002:a17:902:b606:: with SMTP id b6mr44358904pls.100.1557920485705; Wed, 15 May 2019 04:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557920485; cv=none; d=google.com; s=arc-20160816; b=n0WJ6TxtG5YFxu8kOtTYcGjHGX38SZfSNjqYZW1H0OTw6Ijal6O5hoZbYpvXDNkYrs TZzPc6u2vs4ngpBDTOEey9SbFsOX4LqewQENVa7CLNHqE/AuH5ySE8VlqGBJXnPB+9zE WztizlMICEGE3YSfb6zHcTJZFqj51EqilyXejtxCGT5Fsnwojv3SBk6pp+FBs8TarOVa yNmljO7bKdV07a96VR1rXlJor3DGG5ertPTL4oFww9PCH98aHtfPKtnhnOYtPQ/S9Kmm qvIfHxuQfl4J8trHMBZ4cToweqtfbc1BpC/rkdsE38mZlG9bqz7RqyduSSo/JGBIU6en z0Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9FirH3rHoX53/OK+uxmszKX4ef3cpEQR8bXB+4emXWI=; b=z50EheziGv2qbiKZ8Kfuxy9OtK/5EqAfPFOWRsD6TPB/BhhrfDZlv1q4AmwN5NwbtR aPID23KMByIR4Mdlh1IHpXIF7FeaJlZ4zjxXIKj0ZzDMKp74kNYP8n0J1ioOqHR9aoWO ZjJCCmOxs0KiBaoVxdhWZpsorg8jJFhSJPuVN/cTYTju2qDYBqU8HEtDzQT7gg9RXOCn 862xBb6dgOp+7yaWkbb1sQabLGyxfowYPGiS1P3G3vHtxDTZDsAoVq2C+dbbx/e2PtoX bGA3ISjIvIwMGTLudW4qD1Un3FlARzZBO+OyKCLEKsjtlPyRHayZcouCZxviu6LMKgL5 oVww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cuqhsiFC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si1599989pgs.17.2019.05.15.04.41.11; Wed, 15 May 2019 04:41:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cuqhsiFC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732352AbfEOLbS (ORCPT + 99 others); Wed, 15 May 2019 07:31:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:43014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732587AbfEOLbQ (ORCPT ); Wed, 15 May 2019 07:31:16 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A693C206BF; Wed, 15 May 2019 11:31:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919876; bh=oHXUAOsbOGuTuFUb/ynXgCuDOCmUrG66929WmRtc8iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cuqhsiFC6IMSYw+PGdm1s1/pmycBzdK8HytjeoLFO6YsD9+6KDprG6StQXBlBiXU1 irxBLsB5zHkrV926XJbbh+5q4CL5x7VUNDBULDTJtYoCgvWMcH+OA9IbgTGLeVErq6 pJ8yOzRneJpfoRH4TbPfqGHS2AKnGBwfq3y6wBCg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masami Hiramatsu , Russell King , Sasha Levin Subject: [PATCH 5.0 083/137] ARM: fix function graph tracer and unwinder dependencies Date: Wed, 15 May 2019 12:56:04 +0200 Message-Id: <20190515090659.543869830@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 503621628b32782a07b2318e4112bd4372aa3401 ] 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: Sasha Levin --- arch/arm/Kconfig | 2 +- arch/arm/Kconfig.debug | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e5d56d9b712c2..3b353af9c48dc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -69,7 +69,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_GCC_PLUGINS select HAVE_GENERIC_DMA_COHERENT diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 6d6e0330930b5..e388af4594a6e 100644 --- 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 -- 2.20.1