Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1209158yba; Sun, 14 Apr 2019 03:48:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5WLHz01iilSMCRQG3g2LhngE1NXecSBTvrB0QL3hvPl6+eKGldcXpEOTi8V11fqbaEqmB X-Received: by 2002:a62:5797:: with SMTP id i23mr66914082pfj.12.1555238915968; Sun, 14 Apr 2019 03:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555238915; cv=none; d=google.com; s=arc-20160816; b=K3Wtpwsbzuo9s28QkROh0q57LCkulC1AKhnV8uTBi0Kz64xtbYORbK51ED1/k6N30i vPawXxFDonV+jVaw8+k1QdhOgjtZAohbMX+OzIX/yyb2xGc6yUQ3b5s6xTEUMq3EMJ+v OabmRry7DSCi20H+i+FwOPuPVsKvu8ROITk3+NURTNVzkU5UTumKpVJdwCQURPruY0EM mrG804fHGvWhH1S2QKldV09L9ISW5zV96cKp/vgeIDzOxe/DD/4ewZzGCWgHLIZA7Fbj fIDN0mrr+vZeI04ZfFwHb8S4La6ILvTDWlQhQPxdxMBzTlPLu8cAhPbl/6JknDq/dS1L 0h9w== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=MMOUfWqXsblfOHqRIZjkNJDlswyPBaTyeP6kn9xkGkU=; b=SnLHxC/E7bQQtOIiTyRSwSNuyy+Cwwc4Ghm6qPQmOGGIvlvdWlOmSV08QfpXJgNOzM CDNgONXjwwIumcjZZEppSMhunsfNCtOH3otkN6rQ+q/RNgD6tQ+kMnH68DdZaXXi8t66 H/gdR6gsKsQjd+8RwhR9+uWAYKPihww9kCPP1+PhzQLovWvQA93yC+C9itN3ytjCfvxH FCpIpOuycmdn9ZAvkALBrf9TXtTEKN702oSkeqcmmj4AoBF+aekFUIYH0r4gzbO12A+p 7UFhbvqRWGEP/HTJ8niCAWG5iMIlX8B5Gnw6CICsTr289pu0CvFK9TcIkJG3pchoWb7f 4lyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="qJbS/wbQ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si41296934pgb.532.2019.04.14.03.48.19; Sun, 14 Apr 2019 03:48:35 -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="qJbS/wbQ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726968AbfDNKrL (ORCPT + 99 others); Sun, 14 Apr 2019 06:47:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:60034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725681AbfDNKrL (ORCPT ); Sun, 14 Apr 2019 06:47:11 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 BDBA220848; Sun, 14 Apr 2019 10:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555238830; bh=Q/iW8KXrTCP1yOHKTs5MY3WThmjAYJS3G/J6OzgP1gU=; h=Date:From:To:Cc:Subject:From; b=qJbS/wbQGWOBdCaKCJxZYScVOLgN4Jt3D9ajCo7XIgie97i96TitrUE1sf+eHIbUT 4/Tmts7nC/wPClRvvZmEek6FTCHKwrfAI8LP7MKrrTjbQVKbx6N7B0q+Kl8/FXQ4Wy BTi4E7W5jCG2H/Q1a6W4WsyUIlprXcMmMxOrnpKY= Date: Sun, 14 Apr 2019 19:47:05 +0900 From: Masami Hiramatsu To: Steven Rostedt , Stefan Agner , Arnd Bergmann , Masahiro Yamada Cc: Russell King , linux-arm-kernel@lists.infradead.org, naresh.kamboju@linaro.org, linux-kernel@vger.kernel.org Subject: Kconfig dependency issue on function-graph tracer and frame pointer on arm Message-Id: <20190414194705.2e10802aca2df36c8f27f349@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Recently, Naresh reported that the function-graph tracer on the latest kernel crashes on arm. I could reproduce it and bisected. I finally found the commit f9b58e8c7d03 ("ARM: 8800/1: use choice for kernel unwinders") was the first bad commit. Actually, this commit is just changing Kconfig for making kernel unwinder choosable. However, as a side effect, this makes CONFIG_FRAME_POINTER=n by default even if CONFIG_FUNCTION_GRAPH_TRACER=y. (Note that function-graph tracer implementation on arm depends on FRAME_POINTER.) This seems odd, because the commit introduced below code +choice + prompt "Choose kernel unwinder" + default UNWINDER_ARM if AEABI && !FUNCTION_GRAPH_TRACER + default UNWINDER_FRAME_POINTER if !AEABI || FUNCTION_GRAPH_TRACER + help So, it seems UNWINDER_FRAME_POINTER is used if FUNCTION_GRAPH_TRACER=y. However, it seems not working. (I guess this is a wrong syntax for Kconfig) Moreover, since this just setting default value, there seems no direct dependency to FRAME_POINTER from FUNCTION_GRAPH_TRACER. I guess user can change it... I made a fix below (which I tested). This is ugly (arch specific dependency in generic part) but works. It enables both of FRAME_POINTER and UNWINDER_ARM. However I still have some questions. - Is above choice+default a correct syntax for Kconfig? (Masahiro?) - Can UNWINDER_ARM work with FRAME_POINTER? (Arnd?) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 5e3de28c7677..f79c54680f3b 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -160,6 +160,7 @@ config FUNCTION_GRAPH_TRACER depends on HAVE_FUNCTION_GRAPH_TRACER depends on FUNCTION_TRACER depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE + select ARCH_WANT_FRAME_POINTERS if ARM default y help Enable the kernel to trace a function at both its return Thank you, -- Masami Hiramatsu