Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp227305imn; Wed, 3 Aug 2022 01:05:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Xpu3awASUMcTvHipVG6r7OO6Q5TP0lNBLt+gqDEN134eH/0a97FCueJoaRZxDdxHdiI7l X-Received: by 2002:a05:6402:1d4e:b0:43d:9822:b4d1 with SMTP id dz14-20020a0564021d4e00b0043d9822b4d1mr14856611edb.212.1659513927598; Wed, 03 Aug 2022 01:05:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659513927; cv=none; d=google.com; s=arc-20160816; b=oR2e085aS5n6fRhiSgdb5/nqhAjA8SE2Y9Tc0fZ5iuTxzHDmcOqDOLen7ZsewROxDu 70rFRrq6GMNHyB97Po/qU0SnKuY2BWR57oObJCjdNCxls5e9bV1cNsOhPcN1hA2D4hJG Zjc3VmYmCjAZoNfd5/htt0zMZpwLXGk4Kt0vLDHWOsqRGITM2qyzF+9QjSFajx/QYwb/ p1VVp4pLAosF1xkX6LJw8KDTyBt+2asLPYlLDbg4evG1mvMtelQ3wGuZLeFq45UnbbLn jztfADWVmYuGJR53vqeBQKbj56KtkyIDl4UDVeC+eEweJjL0XGz58wqrprW54Avjxwqm qxKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=dlzjMvdxHZr3wJ0ux9kQ0Lvo6AT9nnrD4nXVK3eGOeo=; b=DiexqCONT+PR+lvnRnzpC4jJ84Cj4Ed62zKRwonJE8MsJw60iU7WglJhmGlKOm3vIX sus0EErEaSAuxUmYd2YNonVHV3Rn9ReI3VIc2JOG8Utg/fcUDc2ighknDXSpl64L92SF TKDCBUmVOE8GW8MOx2UzowK0bcUeNMmlp/Ya3tlH0bOMou/Ip14e8LhJNP6a15Oh6N+F 8yN165nz8S7Svrb97i7s6Og8Wj1fAaQbRi8L5hO9Yad7/hPdk7gPKuJQR6OLN5pnovqw KTkr0Ri/SC3uJTPptnIT5LO6WeMk4WY7xaR6NKhkIxRspKn4azwVW+T9nDVcg7IvDvQC JbWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rLKhQqgt; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=6YtScFnQ; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a056402278a00b0043dcc0dea2esi6762086ede.212.2022.08.03.01.05.00; Wed, 03 Aug 2022 01:05:27 -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=@linutronix.de header.s=2020 header.b=rLKhQqgt; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=6YtScFnQ; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235785AbiHCHuX (ORCPT + 99 others); Wed, 3 Aug 2022 03:50:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234663AbiHCHuW (ORCPT ); Wed, 3 Aug 2022 03:50:22 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB4E89FDE; Wed, 3 Aug 2022 00:50:20 -0700 (PDT) Date: Wed, 3 Aug 2022 09:50:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1659513019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dlzjMvdxHZr3wJ0ux9kQ0Lvo6AT9nnrD4nXVK3eGOeo=; b=rLKhQqgtu+QGgGq/PvU09fcWl3eYD5euXHH2NBkJPq4Sx20Xbf6JXJliBOzPDPUEpzoXlD q8fWAkLhNI4eR/Pyf7+bWGHWrI5T3DqNVzInJBSFXRC18/3fhqZHEMGMsLtwAUl4pDCBQF tFK4Uj4+l9MHMGzX7UGQMGJAymkACLEYHUPGZPCITvuNKK40kpgZG3qkClw5PKKSnC0Ytz fX8oNFINxG/PS4Vg5IUQpHq5v1pt/umxXyaVwQLj41PULo+myYbXy7J/6p3/mlYGPCztj/ U3r3QAM3BBWQiZ0TvjRYSX6Ayl/g7M9c+HVG3OjgrR3DKSMMbcYf/RGR1nfo5w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1659513019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dlzjMvdxHZr3wJ0ux9kQ0Lvo6AT9nnrD4nXVK3eGOeo=; b=6YtScFnQEjbBynP9OgEGNh/qIPZ3U1P17gqzwAqNtmXM6AhHbTDTIGkKvxlQcToVjLbyaZ uBddK5mFRwJX2dDQ== From: Sebastian Andrzej Siewior To: Anand Je Saipureddy , "Luis Claudio R. Goncalves" , Clark Williams Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, cminyard@mvista.com, psiddaiah@mvista.com Subject: Re: [PATCH] ftrace: Fix improper usage of __trace_stack() function. Message-ID: References: <20220723064943.16532-1-s.anandje1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220723064943.16532-1-s.anandje1@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 2022-07-23 12:19:43 [+0530], Anand Je Saipureddy wrote: > In kernel/trace/trace_events_trigger.c --> stacktrace_trigger() --> > __trace_stack() is not defined as per the function definition. > > With commit edbaaa13a660 > ("tracing: Merge irqflags + preemt counter, add RT bits") > the irqflags(flags) and preemption counter(preempt_count()) are > now should be evaluated early by tracing_gen_ctx(). > > This patch replaces the irqflags and preemption counter > with tracing_gen_ctx(). > > Fixes: 5e8446e3820c ("tracing: Dump stacktrace trigger to the corresponding instance") > Signed-off-by: Anand Je Saipureddy > Reviewed-by: Corey Minyard Please use [PATCH RT v5.10] in the future. Luis, could you please pick it up? > --- > kernel/trace/trace_events_trigger.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c > index 75fef9fcfd0f..3c6229f16e81 100644 > --- a/kernel/trace/trace_events_trigger.c > +++ b/kernel/trace/trace_events_trigger.c > @@ -1220,12 +1220,10 @@ stacktrace_trigger(struct event_trigger_data *data, void *rec, > struct ring_buffer_event *event) > { > struct trace_event_file *file = data->private_data; > - unsigned long flags; > > - if (file) { > - local_save_flags(flags); > - __trace_stack(file->tr, STACK_SKIP, preempt_count()); > - } else > + if (file) > + __trace_stack(file->tr, tracing_gen_ctx(), STACK_SKIP); > + else > trace_dump_stack(STACK_SKIP); > } > Sebastian