Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp848379rwr; Thu, 27 Apr 2023 08:53:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Bud3GDI29erwXZ+alKDed75J94LltT4jYfhsQ/U0odTjS9Nfik3Np+oLikBv6He1lAm90 X-Received: by 2002:a17:902:e850:b0:1a9:71d3:2b60 with SMTP id t16-20020a170902e85000b001a971d32b60mr2537809plg.0.1682610788328; Thu, 27 Apr 2023 08:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610788; cv=none; d=google.com; s=arc-20160816; b=HWK3XCNVPq0/RKcWVUL5WZ7XLYdQ9dkuXmg8G6vphkzsd3fcp2hndB2VrsNFs5HuTo unGpfLydy9iyhsldtvaRle51EU9LZBTQrx/AmSZiXEUxY9OEXmIa/uyt20JHHzFN2F3n 6+VGd07w7VAG5ybkRI9bTHy2zCmssy0awWWJpLnh/iO09svLhIrA4r6895uzvEe5NqPa sJXJUlrt0PnpQm8pqzAZu/oZf1eDRPE6tUaHdnQOeI3MQisZYfLOod2MORdFhNIdT2q4 TbmvQaXxfQJUbnmNh7Oya+p+stDkdW1vxBEJeAdZ/GZXqQAElKApMbaZ6sEBgp/kyURq 5fGw== 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=rLnHmWZiDRx/47T3FdBG9AXXOazmeAcrHvB7s9w9Q2M=; b=cjUSKQCnsV7hrfkJkoFUqshV7ESMxjQhOx26at9P0Q/CnqTn0Tr8LcRkQ0suk84i4i HSJqqrQapwMVlaFjVXzPNM+wHiuZO1s2iBbQMEA3Ci/+RkbEhxhu29Y8ax8tIKFyRtwh Y8FkuC0fwbJ1pMJ0mBi0DFuz6SFgQqJhFNitnpCReclZzVDo+gw/wZVFz6J1Dme7m4Y9 RlPQRI1WAlod9w8nmuf+tI3LqnLOrbgDLPcU2d5nqRO6QQforqlVFZphda/tDO0FQ58o xK8Kv+uj+esn/efwyR9PLSFE8H0eSLVLD6601Ykscznf4jA3cKJoVQROmtBcoMsZjv1K T6+Q== 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 g11-20020a1709026b4b00b0019e95180a08si18972209plt.59.2023.04.27.08.52.53; Thu, 27 Apr 2023 08:53:08 -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 S244046AbjD0Pqu (ORCPT + 99 others); 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 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 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