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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08BEFC48BCF for ; Wed, 9 Jun 2021 14:19:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D64126136D for ; Wed, 9 Jun 2021 14:19:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235098AbhFIOVe (ORCPT ); Wed, 9 Jun 2021 10:21:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42054 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234221AbhFIOV1 (ORCPT ); Wed, 9 Jun 2021 10:21:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623248373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kmD730iRSU6aUNsHZzCL77C0ovVNCiGac/cSq4aisgE=; b=Vnr9hGOyfxgeNYx5hSE5CIuCUO50rwPUal/d6uA1vxJNwbPjijxOTUuTFJjV3XLW10p/Ms Dt98VZd2P5Rsg5NFBJ9ES6XA8gEyU5MHuQht4GUoXOYc5cL9euVADY769/9NHG1BYa+e/q VACjtx7o4lSFC579tCmcfKI24MRyAAs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-152-qSjCf0m1NeWyJai4VScf5A-1; Wed, 09 Jun 2021 10:19:29 -0400 X-MC-Unique: qSjCf0m1NeWyJai4VScf5A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ACB7E802575; Wed, 9 Jun 2021 14:19:27 +0000 (UTC) Received: from krava (unknown [10.40.195.97]) by smtp.corp.redhat.com (Postfix) with SMTP id C02D29CA0; Wed, 9 Jun 2021 14:19:24 +0000 (UTC) Date: Wed, 9 Jun 2021 16:19:23 +0200 From: Jiri Olsa To: Andrii Nakryiko Cc: Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , "Steven Rostedt (VMware)" , Networking , bpf , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Daniel Xu , Viktor Malik Subject: Re: [PATCH 14/19] libbpf: Add btf__find_by_pattern_kind function Message-ID: References: <20210605111034.1810858-1-jolsa@kernel.org> <20210605111034.1810858-15-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jun 09, 2021 at 03:59:47PM +0200, Jiri Olsa wrote: SNIP > > > + > > > + /* When the pattern does not start with wildcard, treat it as > > > + * if we'd want to match it from the beginning of the string. > > > + */ > > > > This assumption is absolutely atrocious. If we say it's regexp, then > > it has to always be regexp, not something based on some random > > heuristic based on the first character. > > > > Taking a step back, though. Do we really need to provide this API? Why > > applications can't implement it on their own, given regexp > > functionality is provided by libc. Which I didn't know, actually, so > > that's pretty nice, assuming that it's also available in more minimal > > implementations like musl. > > > > so the only purpose for this function is to support wildcards in > tests like: > > SEC("fentry.multi/bpf_fentry_test*") > > so the generic skeleton attach function can work.. but that can be > removed and the test programs can be attached manually through some > other attach function that will have list of functions as argument nah, no other attach function is needed, we have that support now in link_create ready to use ;-) sry jirka