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 E95FFC7EE23 for ; Tue, 23 May 2023 05:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232721AbjEWFal (ORCPT ); Tue, 23 May 2023 01:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234548AbjEWFa3 (ORCPT ); Tue, 23 May 2023 01:30:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B00107; Mon, 22 May 2023 22:30:27 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 697C262F11; Tue, 23 May 2023 05:30:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30185C433EF; Tue, 23 May 2023 05:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684819826; bh=rjc69szkCt6G0ExxvDAbrVBLWQIt7SwJLYPVYIPI4QU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WG9yX0IdVLkpv7kkfjV7ZB9LeCtEx/3kz0Il1BuXlHMQzvp09tlbmWiaueL92Xwd6 VmyFVOWc4Nn9p1IHFwEqvLQ1F1COuXtVZ8lhO0LzUyCxhYM7RtEcvRGLSss0vpdL5C gTs3Kk8t5o5JybPEqR1LFZOeVwsP/eUx67QDxp0+B49Ur4qbNGCj8LrWNqCRRtoowD 1xHIR7KvoNFPFZrrNb8XnvCXn+78Cs2/Egmf5TloucuLh3JcwgZ6Q4SGUVESZVepA+ zGPGoCQ2OipP9Sxghmh1fW2Vg/PkqQfYdsPZEPOLD3nmmTFxsmdEmb6SYop5WlwhE7 qxwurPTIq4ydg== Date: Tue, 23 May 2023 13:30:19 +0800 From: Masami Hiramatsu (Google) To: Ze Gao Cc: Jiri Olsa , Yonghong Song , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Hao Luo , John Fastabend , KP Singh , Martin KaFai Lau , Masami Hiramatsu , Song Liu , Stanislav Fomichev , Steven Rostedt , Yonghong Song , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, kafai@fb.com, kpsingh@chromium.org, netdev@vger.kernel.org, paulmck@kernel.org, songliubraving@fb.com, Ze Gao Subject: Re: Message-Id: <20230523133019.ce19932f89585eb10d092896@kernel.org> In-Reply-To: References: <20220515203653.4039075-1-jolsa@kernel.org> <20230520094722.5393-1-zegao@tencent.com> X-Mailer: Sylpheed 3.8.0beta1 (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, 22 May 2023 10:07:42 +0800 Ze Gao wrote: > Oops, I missed that. Thanks for pointing that out, which I thought is > conditional use of rcu_is_watching before. > > One last point, I think we should double check on this > "fentry does not filter with !rcu_is_watching" > as quoted from Yonghong and argue whether it needs > the same check for fentry as well. rcu_is_watching() comment says; * if the current CPU is not in its idle loop or is in an interrupt or * NMI handler, return true. Thus it returns *fault* if the current CPU is in the idle loop and not any interrupt(including NMI) context. This means if any tracable function is called from idle loop, it can be !rcu_is_watching(). I meant, this is 'context' based check, thus fentry can not filter out that some commonly used functions is called from that context but it can be detected. Thank you, > > Regards, > Ze -- Masami Hiramatsu (Google)