From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C2171B8F1; Tue, 23 May 2023 05:30:26 +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) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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)