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 A287BC77B73 for ; Thu, 27 Apr 2023 15:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243525AbjD0Pqu (ORCPT ); Thu, 27 Apr 2023 11:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232698AbjD0Pqs (ORCPT ); Thu, 27 Apr 2023 11:46:48 -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 B312A2D72; Thu, 27 Apr 2023 08:46:47 -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 510CF63E0B; Thu, 27 Apr 2023 15:46:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0265C433EF; Thu, 27 Apr 2023 15:46:44 +0000 (UTC) Date: Thu, 27 Apr 2023 11:46:43 -0400 From: Steven Rostedt To: Yafang Shao Cc: Alexei Starovoitov , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Masami Hiramatsu , bpf , linux-trace-kernel@vger.kernel.org, LKML Subject: Re: [PATCH bpf-next 5/6] bpf: Improve tracing recursion prevention mechanism Message-ID: <20230427114643.1e3e52aa@gandalf.local.home> In-Reply-To: References: <20230417154737.12740-1-laoar.shao@gmail.com> <20230417154737.12740-6-laoar.shao@gmail.com> <20230427092628.21fd23e4@gandalf.local.home> <20230427111842.2e40fe3c@gandalf.local.home> <20230427113602.0e49c0d1@gandalf.local.home> 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-trace-kernel@vger.kernel.org On Thu, 27 Apr 2023 23:43:35 +0800 Yafang Shao wrote: > > > I thought that the whole point of this exercise was because the > > > migrate_disable() itself could be traced (or call something that can), and > > > that's outside of prog->active protection. Which the test_recursion_*() > > > code was created for. > > > > Not sure where did this come from. > > migrate_enable/disable were added to deny list back in 2021. > > Hi Alexei, > > Don't be uneasy. It is not good to play word games. > What Steven really meant is the preempt_count_{sub, add}. > Anyway thanks Steven for the help with this exercise. Right, it was the "(or call something that can)" part that this came from. As Yafang said, migrate_disable() calls preempt_count_add() (on some configs) which is traced by ftrace, and thus traced by bpf. Or was that added to the deny list? I think that was one of the solutions as well. -- Steve