Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8240224rwb; Tue, 13 Dec 2022 04:08:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf7bfqXpSo0NAoWrVuNmjHWmdlM1eUnnYubVybeAzG4DLHWo+FDIkDnV2LL0RFk4Mx1f+fPV X-Received: by 2002:a17:907:a64c:b0:7c1:64dc:ac3c with SMTP id vu12-20020a170907a64c00b007c164dcac3cmr9629761ejc.59.1670933336499; Tue, 13 Dec 2022 04:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670933336; cv=none; d=google.com; s=arc-20160816; b=at4BZDjZfbWjWyit0wqmoFkiC3f8HOGpIRbu/jB2RcjMeVSD2I9I63bxOa7QyOg1qH T40NLeX0GiiWekt8nqH9Fp57k3y4DFKf1oidbsJJQnT896twV7pQ+QEMPQOYiIJkrG0c 0pzavHn/LT4pYjh5lcb1FhIC+/nHq+R9UFdfahHRyaMo+YMq7TzOcxRsmYpx6o7Db/CL HCRgIIVnE7Cyz3iLOi24tgOwFUcfLXODZ2AxWftg/1ecHIDjd3P2/bv9vQUBGNyToj+K MoObXJ1VlYhtOKyxNae07N8j6yY4fWxjuDlK9QLGB4eeofkeubFbf/yQai1wQSQeiLhM 3EJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fPKso9vUmXgpa+m1I1ZxxGX7EiGbysxBp6/Ib9xFFHs=; b=DslOKE22tqGCKD45rvwyFqyRo9LtCg/3QdRHfQurNC/HrjkFwTrSLtU4vPlhUdnJAC jY06Prhae4UO1XscTnFd3tGUL3CaUryWTa/1b1gTGrlRfIGOOG95sBO6UHm6tkYOSnZN ITEqRBAj5KOwYXsnb0MgfMbwwyU0zjWXQdB3V8aSiPvuFtUCF0tZXoUe53dJ/PzjHXZN QFi70duZkuXVaVRVw48O9V2uY8oous+v0l3HX8+izEnq4e7V5ClbQyt3FFwu6+geqnxj 5eq2PwDNCikyjRjPepu0XoymUwK3zQwMgj5/4VbfbvgG9KNXVRCUE/G3SczqEQ1b8QIK 3lLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y4Uia4vz; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w28-20020a50d79c000000b0045d050f0fa3si8997753edi.565.2022.12.13.04.08.37; Tue, 13 Dec 2022 04:08:56 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=Y4Uia4vz; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235165AbiLMLgc (ORCPT + 73 others); Tue, 13 Dec 2022 06:36:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235122AbiLMLgO (ORCPT ); Tue, 13 Dec 2022 06:36:14 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AE491B9C7 for ; Tue, 13 Dec 2022 03:36:13 -0800 (PST) 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 13FDCB81189 for ; Tue, 13 Dec 2022 11:36:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A31EC433D2; Tue, 13 Dec 2022 11:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670931370; bh=EEs6Mg/sfionQP7S0xqd9qRSjYMzb50AzeLFtoibb38=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y4Uia4vz6ZrDjEJndsHjuxlMYImiRUf2YysatZDeEeJfhcMBwgAnMFDBBHj3GDiGI yPmaELiRVXq9iYDQf/Sfrz7RXKiOzJTMWer7onCopp/XCoLuBbXk6BBStzdn9qAqd5 C5f6tVBXNST0Q/eYq5aJGrOd+x/uDHxtoT2LGbxs+fceIASjTU+XxK0iB+2+RQd3H6 XTSjcK4/L8+P1+rVgLJRA3pyVthAMDOaK2DjZoyHPRTJ/0QJbvPXJNtwPwvIt82yYt Zi56tJa6/+/cAwYC45RtbAeBEvNNWOnMEowSk8stcRwRGXCSVrLBKpDfcf3I1Mwbg1 9Pbcvrluuw4pQ== Date: Tue, 13 Dec 2022 11:36:05 +0000 From: Will Deacon To: Mark Rutland Cc: Steven Rostedt , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, samitolvanen@google.com, keescook@chromium.org, mhiramat@kernel.org Subject: Re: [PATCH] ftrace: Allow WITH_ARGS flavour of graph tracer with shadow call stack Message-ID: <20221213113604.GA5719@willie-the-truck> References: <20221209143402.3332369-1-ardb@kernel.org> <20221209165139.37d033ee@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-7.1 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 On Mon, Dec 12, 2022 at 10:36:23AM +0000, Mark Rutland wrote: > On Fri, Dec 09, 2022 at 04:51:39PM -0500, Steven Rostedt wrote: > > On Fri, 9 Dec 2022 14:40:25 +0000 > > Mark Rutland wrote: > > > > > On Fri, Dec 09, 2022 at 03:34:02PM +0100, Ard Biesheuvel wrote: > > > > The recent switch on arm64 from DYNAMIC_FTRACE_WITH_REGS to > > > > DYNAMIC_FTRACE_WITH_ARGS failed to take into account that we currently > > > > require the former in order to allow the function graph tracer to be > > > > enabled in combination with shadow call stacks. This means that this is > > > > no longer permitted at all, in spite of the fact that either flavour of > > > > ftrace works perfectly fine in this combination. > > > > > > > > Given that arm64 is the only arch that implements shadow call stacks in > > > > the first place, let's update the condition to just reflect the arm64 > > > > change. When other architectures adopt shadow call stack support, this > > > > can be revisited if needed. > > > > > > > > Signed-off-by: Ard Biesheuvel > > > > > > My bad; sorry about this, and thanks for the fix! > > > > > > Acked-by: Mark Rutland > > > > > > We should probably also add: > > > > > > Fixes: 26299b3f6ba26bfc ("ftrace: arm64: move from REGS to ARGS") > > > > Actually, I believe it is: > > > > Fixes: ddc9863e9e90 ("scs: Disable when function graph tracing is enabled") > > Ah; it's slightly more subtle since these were on different branches that got > merged. Either's correct in its own branch, and the merge is where things went > wrong. > > I think the overall least confusing thing is to bite the bullet and list both > REGS and ARGS, i.e. > > depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER > > ... and for the fixes tag have: > > Fixes: ddc9863e9e90 ("scs: Disable when function graph tracing is enabled") > > That way the commit is correct regardless of the REGS -> ARGS conversion, and > will work if backported independently. Ard -- please can you respin as per Mark's suggestion above? I can then send it as a fix later this week. Cheers, Will