Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp92138rwb; Mon, 26 Sep 2022 09:41:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7aGxc74cNUUF6AMc/XA+8qPx6gC2Ab19Od5eXbOksFazaBwQqEZBDWE2WVVHLgaJxSIW0B X-Received: by 2002:a62:2503:0:b0:538:426a:af11 with SMTP id l3-20020a622503000000b00538426aaf11mr24799670pfl.22.1664210467574; Mon, 26 Sep 2022 09:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664210467; cv=none; d=google.com; s=arc-20160816; b=SUlHyiCAgkvbCT2yXGqgNQDAL18rLpt0fvh9U9RULuNysCd2Z3bUQqLxYAmHysGaB1 JgtyEcxIvLgxgEzVNrBvjJbGlVQ75t/W5gbrE1Ae3R5EO6GfTVQMSr7OxKTAFiE5c7Xa QKDbRk/ZNwKPXbN0ekVg1HSguvXChUVWCCkwtXzEy/ztrMF/hgdD+tXmmf9+hN9AGMnB 7Q24TO9lImUDSGLuzbB47tmm3BDBSwUQ9mSQdzkpgZ7ycmjKuFbFzqBLoLl9PVwyq/Um VwiWlzbyiDIHBng9QR/wS19NbhBNXRhBz0jK/Eenq8yQtJt8yDsH5UUtIy/sPsxQ1JoW cxUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=wpj+Od1fPRSMS1w3lqve7MECJyPzyiORGj5AvtXw708=; b=pOqMBX2NTO/Oa3rkuXy/F7qMQDem2HkX4KQilMIypXFhL6/4pv6c+PxLzTh0QEF2EA zCNsSrziUf1jpckZLEY3poLm8YWBAOJKYvSceuLOiepSq1xdbrP1SgMR/Mpnd2J8+4b6 PmRmTXj0yVstqwnWNA2fk4VNHSwBQjPLEE3Uxlxlv24YS+oKa3k66pvw/MdBOfjvfrRi 06bin8ZDUnd6dOlD0UOUPgeXYlPP5NSf55eQ8QdVEITkpLHOzdFmGQA7PuZAqxb1Y+lb Y7FwFg/CFwnIB4OpKQx892GMM5c7HMMkYVTKyDNjg6yHau8So3sUU8VayFv7crWfqxp8 Q3RA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a637447000000b00429f4b62461si17164639pgn.431.2022.09.26.09.40.56; Mon, 26 Sep 2022 09:41:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236293AbiIZPqv (ORCPT + 99 others); Mon, 26 Sep 2022 11:46:51 -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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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, 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