Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp634473rwe; Thu, 25 Aug 2022 06:45:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR642QxuzhfAnzwq5R8S9Wi6Jv4NsirvZ/L4QHXfdasobFmadMAQtHMYYMiPQGS4IDe35WVY X-Received: by 2002:a17:907:a424:b0:73d:7f49:390b with SMTP id sg36-20020a170907a42400b0073d7f49390bmr2772840ejc.20.1661435114557; Thu, 25 Aug 2022 06:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661435114; cv=none; d=google.com; s=arc-20160816; b=WIW7dKlVVR/VqQjBFQvhCf4d9SbQf7QlPO9r7V+khSEBxkzso+gv3z/kyLdNBMMNAU 4i1j2i0NMGIMTH4OXkyrrcnackQLL8LxvCZ3Yej+tgeI/AgE/j8O3YcP6kNp0VBG5GqP AGgE3ebOOsljXF42oSDkIJMB3BqX1TJm+8tosmprdaELJO2lGQ7DjstmD+1RGqHQ9Opg 91Klj11oSb1mI7hjxGQFmt5PhANhXsW1712p8ArIw81YcncfabB38pJCYnOHRYu4iYzQ WCil5n8mL2pMvUAwZAci6Fzy6lLY6O6GcKCqwyPq202Cr2dFLE6eXTiKYA9Bv9EMLz3F nRtw== 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:date:dkim-signature; bh=tB9lZlEpaTpauWX08ilgdGkVQfIwbOMu2sfyE552IJk=; b=VxRVpR2zJ3RIha/yS+xbjXMXeDB7Lu1EmJ7bif1xUFGh3k5NCd0/SncUgoSCMX+p6s stzxyfHwlB62snQ0imFRkPurq8U7R6Xw1S3pKUNT2Pre9T9n8GeUD/kiL7IRbSy4BpXu Y7/lJmZNC8e/2fCUe5/lItqsHe7DdtiK9CvXmhyV7P9eOvntjign8kvLYY8Zs+0HLAHI 7dKsDHdF/lEdndyDGgZeT6FNHtnpDemmP/W5nI72smpamFVl2zOJuMUZIRbPgvbTVh6r CxERlhFHbCFcNi93RyTrPx4LWiRaqNqRsXYk+uy8207UdPxzDb5Mwz9E/KmO3faPGYwD 2C5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+nsqiwe; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a50998e000000b00445f2dfacaasi5874321edb.614.2022.08.25.06.44.48; Thu, 25 Aug 2022 06:45:14 -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=@redhat.com header.s=mimecast20190719 header.b=g+nsqiwe; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241940AbiHYNlr (ORCPT + 99 others); Thu, 25 Aug 2022 09:41:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241688AbiHYNln (ORCPT ); Thu, 25 Aug 2022 09:41:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DDD7ABF21 for ; Thu, 25 Aug 2022 06:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661434899; 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=tB9lZlEpaTpauWX08ilgdGkVQfIwbOMu2sfyE552IJk=; b=g+nsqiwefLzEPyPNAAMEOYxIMkmKtUtvG2Bc542nFAdicLWX1uOq0IzVxIBwUmjcVH6dH5 YbUldD+ee1YL1eFHN2QIef8a4WzGyD5RHeL7uTCvBddP8/6KowTTc9nE2drdiXrRS95Q3e WHMRYMlnXO/+BLopuYCrQTVut11xfYo= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-9-w1r1YX8QMCOMmCZwGaRoOg-1; Thu, 25 Aug 2022 09:41:38 -0400 X-MC-Unique: w1r1YX8QMCOMmCZwGaRoOg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 23EB01C01B42; Thu, 25 Aug 2022 13:41:38 +0000 (UTC) Received: from localhost (unknown [10.22.33.213]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68DB21415117; Thu, 25 Aug 2022 13:41:37 +0000 (UTC) Date: Thu, 25 Aug 2022 10:41:36 -0300 From: "Luis Claudio R. Goncalves" To: Sebastian Andrzej Siewior Cc: Anand Je Saipureddy , Clark Williams , 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=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Wed, Aug 03, 2022 at 09:50:17AM +0200, Sebastian Andrzej Siewior wrote: > 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? Added to the list. And thank you for spotting this change, I missed that in my earlier sweep. Luis > > --- > > 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 > ---end quoted text---