Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp484727imm; Wed, 22 Aug 2018 07:34:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYbI2xTLJ1PjlUHZ+kVvA+Goq4lft8XwGCLonqba1zDc/RYF9wTGMgV+qNS7ViBoFVaFgk5 X-Received: by 2002:a63:fc05:: with SMTP id j5-v6mr2227303pgi.1.1534948497736; Wed, 22 Aug 2018 07:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534948497; cv=none; d=google.com; s=arc-20160816; b=00LqQ6XNVx7+Lld0POcNGl/dxQdyv2SGx8wTPtYsfos7zWRbfb5M9sBOZYWv3MS/Dp n7muIEn70YXdyiS7LtwiMllXK1mxhFmM91YaGPhQlBTaQGoi1ZgwMyS5uqm+5Ab9lrHx QOp94WFBzxjYt3lcHQ0CO1ztwYkVjnZ3tOHuRf8SBt25OFqnoQGBuRUzBeiRh0r7h2Ua kegtZQ3CNYJdM2USOVtNVjhhiqvZixhTBPcebNHovEfeC/w5cV77Mc0EnoGNC80PAEvV Wts9T7WcBkoZlmZxfib1cEO6vLFL8+3SX6YoIWzy0necwAQZfnkBySzy8m4yAk51QXYU rNPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=1SDKLNzSyj8xOwIVfYVd0QgaiIjTSnBiUTw+pmXl/wA=; b=rsuF7tHzSoCc8bFyGbL0qIeKKF9/qNOiJjArGR+6iZOTqopg/HfpX+kPOFQupPGb2Y ohZZqFb6/Z8b9dBSCfH3s2VLLp2mdTeZGwRTfLfQkU1BKKGyiPSd60SNt3inT1TUqeUV csz6qVoI5f2tl1YJxlfh5ChowOmG+mujrmUYyuHwrahcMxsvMYZaUhehU5YkhIbeu/M+ cpsKVLboz939bvOw3h8foMX7lMHjBHC80gBPQHtybpp9VNY9i+ZmnPLk5jKMG6eLpCvz VPhGgIHEG91LkG4wgMFhG13/9fxpv/jTd4v9i+XmyA5j1k2D9D/RquoPyEVtLv8/laOv 8JnQ== ARC-Authentication-Results: i=1; mx.google.com; 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 g22-v6si1686966pfb.136.2018.08.22.07.34.42; Wed, 22 Aug 2018 07:34:57 -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; 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 S1729135AbeHVR57 (ORCPT + 99 others); Wed, 22 Aug 2018 13:57:59 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:34883 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728207AbeHVR57 (ORCPT ); Wed, 22 Aug 2018 13:57:59 -0400 Received: by mail-qt0-f193.google.com with SMTP id f19-v6so839460qtf.2 for ; Wed, 22 Aug 2018 07:32:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1SDKLNzSyj8xOwIVfYVd0QgaiIjTSnBiUTw+pmXl/wA=; b=ku93J6yvcgyyGLS7pYmDbSLVouQlrrFjXUb1ZRTdAlDj45yIKGK1x8pkN/towJKI53 0W9a5U/6xRoY9JwXlAEf2HIq+m2WBWQ7GhNVzH6Ytxi3nRGMuyAD68Zrl4cqYzA9ujGe 55fAtZGqwNdeCmESPKtQZfboJvchJxacqOHq1dZ/ph2xcYzQ44AwYa/JjdeIBj6Mw8Fw 5eJ4TICAdkKR7Y+qh2NE5EkR4qSwA96jwP7BtmRvwjdewr2CwoJDvK7lLvhl+McKOATl 2HScBFH2FG7sS3C4Qjxq1WUhKumcokd9lDa09a7TOREQdZYO8vInZO1X68Mddg/mpY6I magg== X-Gm-Message-State: AOUpUlEYQJYyeROiiWePO7rwlIWAbvCeXjy305QJ37+OI4wLoeMtuyK9 /F4TgojFgB93X1t8rD7ai8ThJgEjF9NaC6HhE6s= X-Received: by 2002:a0c:8b67:: with SMTP id d39-v6mr50550447qvc.180.1534948369919; Wed, 22 Aug 2018 07:32:49 -0700 (PDT) MIME-Version: 1.0 References: <20180821222416.7771-1-stefan@agner.ch> In-Reply-To: From: Arnd Bergmann Date: Wed, 22 Aug 2018 16:32:33 +0200 Message-ID: Subject: Re: [PATCH] ARM: use choice for kernel unwinders To: Stefan Agner Cc: Russell King - ARM Linux , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 22, 2018 at 12:02 PM Arnd Bergmann wrote: > > On Wed, Aug 22, 2018 at 12:24 AM Stefan Agner wrote: > > > > While in theory multiple unwinders could be compiled in, it does > > not make sense in practise. Use a choice to make the unwinder > > selection mutually exclusive and mandatory. > > > > Already before this commit it has not been possible to deselect > > FRAME_POINTER. Remove the obsolete comment. > > > > Furthermore, to produce a meaningful backtrace with FRAME_POINTER > > enabled the kernel needs a specific function prologue: > > mov ip, sp > > stmfd sp!, {fp, ip, lr, pc} > > sub fp, ip, #4 > > > > To get to the required prologue gcc uses apcs and no-sched-prolog. > > This compiler options are not available on clang, and clang is not > > able to generate the required prologue. Make the FRAME_POINTER > > config symbol depending on !clang. > > > > Suggested-by: Arnd Bergmann > > Signed-off-by: Stefan Agner > > Looks ok to me. I've added it to my randconfig test environment, you > will hear from me within a day if I run into build regressions. I needed a small hunk to avoid a warning: WARNING: unmet direct dependencies detected for FRAME_POINTER Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS [=n] Selected by [y]: - LOCKDEP [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] && !MIPS && !PPC && !ARM_UNWIND [=n] && !S390 && !MICROBLAZE && !ARC && !X86 - UNWINDER_FRAME_POINTER [=y] && && !THUMB2_KERNEL [=n] && !CC_IS_CLANG [=n] diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 6e27419b90c0..08f914be6248 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -57,6 +57,7 @@ choice config UNWINDER_FRAME_POINTER bool "Frame pointer unwinder" depends on !THUMB2_KERNEL && !CC_IS_CLANG + select ARCH_WANT_FRAME_POINTERS select FRAME_POINTER help This option enables the frame pointer unwinder for unwinding