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 7E36FC6FA82 for ; Mon, 26 Sep 2022 15:46:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236298AbiIZPqw (ORCPT ); Mon, 26 Sep 2022 11:46:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234827AbiIZPqR (ORCPT ); Mon, 26 Sep 2022 11:46:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D9E23BA for ; Mon, 26 Sep 2022 07:31:37 -0700 (PDT) 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 DD605B80AB8 for ; Mon, 26 Sep 2022 14:31:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40EE9C433C1; Mon, 26 Sep 2022 14:31:34 +0000 (UTC) Date: Mon, 26 Sep 2022 10:32:42 -0400 From: Steven Rostedt To: Zheng Yejian Cc: , Subject: Re: [PATCH] ftrace: Properly unset FTRACE_HASH_FL_MOD Message-ID: <20220926103242.6d0fc1ea@gandalf.local.home> In-Reply-To: <20220926152008.2239274-1-zhengyejian1@huawei.com> References: <20220926152008.2239274-1-zhengyejian1@huawei.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Sep 2022 15:20:08 +0000 Zheng Yejian wrote: > When executing following commands like what document said, but the log > "#### all functions enabled ####" was not shown as expect: > 1. Set a 'mod' filter: > $ echo 'write*:mod:ext3' > /sys/kernel/tracing/set_ftrace_filter > 2. Invert above filter: > $ echo '!write*:mod:ext3' >> /sys/kernel/tracing/set_ftrace_filter > 3. Read the file: > $ cat /sys/kernel/tracing/set_ftrace_filter > > By some debugging, I found that flag FTRACE_HASH_FL_MOD was not unset > after inversion like above step 2 and then result of ftrace_hash_empty() > is incorrect. > > Cc: stable@vger.kernel.org > Fixes: 8c08f0d5c6fb ("ftrace: Have cached module filters be an active filter") > Signed-off-by: Zheng Yejian Thanks, this definitely looks like a bug. I'll be reviewing these patches later this week. -- Steve