Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3879816rwd; Mon, 22 May 2023 23:05:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Pi91t2hU35rZQEL1nl1PK6x76R6EwivjlKJAARVDjgRsAybe9YuLwCFknGLB67ZWC+T61 X-Received: by 2002:a05:6a20:840a:b0:10b:5347:304 with SMTP id c10-20020a056a20840a00b0010b53470304mr7261206pzd.7.1684821914793; Mon, 22 May 2023 23:05:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684821914; cv=none; d=google.com; s=arc-20160816; b=r67Be7IyDm2DZ6aKDC7sdH44nLsr/UoBeYp2ng+6fAGkmE1MwmdUlIrXLKESp0Mohj QUZq8/dQw9afDSsnsv8sg8YHFVM9/ZEd/L616fpj2Ur4RsO+fSJW+4DqWm9wHyDcdNC5 D/fIeNL7CUC96km4hf1Qp3R4uWTI1T0gkOgBywkwhNIQuWVNXwPud+r8nRSCCrEvY0Qt cTHg4xP8PIu3P2HQAslwLmyRz76c/psVoxZAEPK5+yA8N6Ddk0g8sdogoCv0iKyjBMdQ iwTK6YLMZaGHW39pKdRz02bcF1c4zlHf9CovFeFBPa/hU/xAdEqYVeoQwMVLUxh7JFOM xEeA== 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 :dkim-signature; bh=86rxpioyGP3VxSSbC86V2ZNQ6/1PWnN4jhS/SIBMtuk=; b=zTsVXlE7VHuJesXsMSc8UX9I+ojJS8rty8Yk98vhYxn6+TUUtAqCa95V1RDl87S9VT ixV+zn74tyg/RxvMVtQiI8exT9UeOyCSS9IRZp1HIrV2F+483y0AQtAn2Lj24AwjYOWn rlXWtjO6x+PoY+EX1+iWJSdWm6R39Sdarki9/dqSNcCCJ9Xo35aDD8AkmZFk2q4FaeG4 fqD/vhITuV7QYZ2HDE87m2Ck6dH7oziuvGIPcdQwFR5AMN2LFYFaxDP/Fms/vHYM6kUN yRhxJGEuIFSP9gBYFioLjkyfJ2U/fIjyOek91og1EoyAQk97Y1tTQBNtktZdvJFqpBws xCBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WG9yX0Id; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r28-20020a638f5c000000b0053eedcc504esi1080851pgn.373.2023.05.22.23.04.59; Mon, 22 May 2023 23:05:14 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WG9yX0Id; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231730AbjEWFaj (ORCPT + 99 others); Tue, 23 May 2023 01:30:39 -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 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, 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)