From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 333D4C433EF for ; Wed, 27 Apr 2022 01:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356834AbiD0Bmk (ORCPT ); Tue, 26 Apr 2022 21:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356817AbiD0Bmj (ORCPT ); Tue, 26 Apr 2022 21:42:39 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A851301A4 for ; Tue, 26 Apr 2022 18:39:30 -0700 (PDT) Received: from kwepemi500023.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kp1ZC3vGGzGpVS; Wed, 27 Apr 2022 09:36:51 +0800 (CST) Received: from kwepemm600010.china.huawei.com (7.193.23.86) by kwepemi500023.china.huawei.com (7.221.188.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 27 Apr 2022 09:39:27 +0800 Received: from [10.67.110.237] (10.67.110.237) by kwepemm600010.china.huawei.com (7.193.23.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 27 Apr 2022 09:39:27 +0800 Subject: Re: [PATCH] tracing: Reset the function filter after completing trampoline/graph selftest To: Steven Rostedt CC: , , References: <20220418073958.104029-1-lihuafei1@huawei.com> <20220425185859.29e8f9d8@gandalf.local.home> <20220426113114.2005b94f@gandalf.local.home> From: Li Huafei Message-ID: <407b6387-c4a1-830d-00d1-21cbac133843@huawei.com> Date: Wed, 27 Apr 2022 09:39:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20220426113114.2005b94f@gandalf.local.home> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.67.110.237] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600010.china.huawei.com (7.193.23.86) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/4/26 23:31, Steven Rostedt wrote: > On Tue, 26 Apr 2022 16:00:35 +0800 > Li Huafei wrote: > >>> No need for all the 'goto reset_filter', if this function fails, then the >>> tracer is disabled, and there's no reason to clear the filter. In fact, it >> Thank you for the review. I see that we will disable function_graph tracer: >> >>      /* Stop it if we failed */ >>      if (ret) >>            ftrace_graph_stop(); >> >> But there is no function tracer disabled. Am I missing something that >> would disable the function tracer? > No, but if we are triggering these, then something really bad has happened, > and function tracer is possibly corrupted too, or should not be trusted. > >> >>> may cause a crash (because something bad happened). >> Yes, so should we kill ftrace when the function_graph test fails? > No, but the system should be fixed. These should never trigger on any > production system, because it means something really bad is happening and > we do not know what. > > Not resetting the filters may even be useful in debugging it. So that's > another reason to not do so. That makes sense.  I will remove all "goto reset_filter" from the error path and only reset the filter when the test passes. Thanks, Huafei > > -- Steve > .