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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 55CF0C433B4 for ; Thu, 1 Apr 2021 19:52:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11063610CB for ; Thu, 1 Apr 2021 19:52:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234346AbhDATws (ORCPT ); Thu, 1 Apr 2021 15:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234062AbhDATws (ORCPT ); Thu, 1 Apr 2021 15:52:48 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D85C0613E6; Thu, 1 Apr 2021 12:52:48 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id i144so2993910ybg.1; Thu, 01 Apr 2021 12:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6rLJO2qOQCmv43yggqJui07r0xIuScXCZxDCUdyUn7M=; b=TOEDxWCkX681s5an22WhRMuwcTT2+/fKX90dTWYF6s4lkKoJBtVuoM0O3YO/gxwTYT aA7xOAUULR5yDTeNy/8EUyyC3aAOF8nSxlgc6bDFVDbM0WEApdF9NwMJgP1wbu9laeFq /OdCz1d9g1tMIXx1kZ9NLHp0dVTXMFOlF68UDiTE+sj86Jqv/1ajU3V9Qk8ziFgz2VkV C0R4aJcLNe3tJRPlWz4XI8YVwi+3ux7qHsRAYsHdlRRxSYth2QKMalA+bGSsQZLDcFEy mHr7RK75q4o/vKlTgoLmTdjxCYSkVOAk1lmauhgSgwOqf4n5TSyguiJ6v4tZ/VOwFSZ+ QJdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6rLJO2qOQCmv43yggqJui07r0xIuScXCZxDCUdyUn7M=; b=AsMzXgL2BB7XPlpG1nQ+ch1TpaGKdIoqwOU92oEm7DXRp3yOqsePOKL2mjUudDHMHt A9+pxk9+JQ5ifClEWzw1RJSfrAmgt6UUud/ollmqWNd9iEXSDk2OIzDmla3lc/AlO5Ao hMY8Evd1zKyI5svEHGmkgiYOIXnNpHMhBtCUB704JdGbtO/lGRg8deogB82HSoSt7xhK aCIfBrFL3dF7VglVmN8pyhgiS3KrlwXfqJzuBedwRCKCUIq65z3kS6toFj5AWIoekT6F Qdzg2DQC2WFcWbcDZKs0tNdcbaYx9F+DKb+A1My//Dra8smBBgSBONRxf6fEhRaZCzCT Vslw== X-Gm-Message-State: AOAM5306fFld6GOPvZhzPr2qrAOJzW5OcpRV7P+8xe8qZCw1q1aAv+2f OwGZjtV76RaBM55dkCgIxKbQO4U/zCanMhbGxK4= X-Google-Smtp-Source: ABdhPJzC8WBOpKivYaPjYAir0511bvJqxJPjbgtuOH4SC8e7wYQj414ANxs4gwFfHwsRJB+YccNPeuHSmHZVV0V6U18= X-Received: by 2002:a25:6d83:: with SMTP id i125mr13758065ybc.27.1617306767826; Thu, 01 Apr 2021 12:52:47 -0700 (PDT) MIME-Version: 1.0 References: <20210325015124.1543397-1-kafai@fb.com> <20210329012437.somtubekt2dqzz3x@kafai-mbp.dhcp.thefacebook.com> <20210329190851.2vy4yfrbfgiypxuz@kafai-mbp.dhcp.thefacebook.com> <20210401195126.uohtumhvd6fxig5c@kafai-mbp.dhcp.thefacebook.com> In-Reply-To: <20210401195126.uohtumhvd6fxig5c@kafai-mbp.dhcp.thefacebook.com> From: Andrii Nakryiko Date: Thu, 1 Apr 2021 12:52:37 -0700 Message-ID: Subject: Re: [PATCH v2 bpf-next 00/14] bpf: Support calling kernel function To: Martin KaFai Lau Cc: Lorenz Bauer , Cong Wang , Alexei Starovoitov , bpf , Alexei Starovoitov , Daniel Borkmann , kernel-team , Linux Kernel Network Developers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Thu, Apr 1, 2021 at 12:51 PM Martin KaFai Lau wrote: > > On Tue, Mar 30, 2021 at 11:44:39PM -0700, Andrii Nakryiko wrote: > > On Mon, Mar 29, 2021 at 12:11 PM Martin KaFai Lau wrote: > > > > > > On Mon, Mar 29, 2021 at 05:06:26PM +0100, Lorenz Bauer wrote: > > > > On Mon, 29 Mar 2021 at 02:25, Martin KaFai Lau wrote: > > > > > > > > > > > > > > > > > > > > > # pahole --version > > > > > > > > v1.17 > > > > > > > > > > > > > > That is the most likely reason. > > > > > > > In lib/Kconfig.debug > > > > > > > we have pahole >= 1.19 requirement for BTF in modules. > > > > > > > Though your config has CUBIC=y I suspect something odd goes on. > > > > > > > Could you please try the latest pahole 1.20 ? > > > > > > > > > > > > Sure, I will give it a try tomorrow, I am not in control of the CI I ran. > > > > > Could you also check the CONFIG_DYNAMIC_FTRACE and also try 'y' if it > > > > > is not set? > > > > > > > > I hit the same problem on newer pahole: > > > > > > > > $ pahole --version > > > > v1.20 > > > > > > > > CONFIG_DYNAMIC_FTRACE=y resolves the issue. > > > Thanks for checking. > > > > > > pahole only generates the btf_id for external function > > > and ftrace-able function. Some functions in the bpf_tcp_ca_kfunc_ids list > > > are static (e.g. cubictcp_init), so it fails during resolve_btfids. > > > > > > I will post a patch to limit the bpf_tcp_ca_kfunc_ids list > > > to CONFIG_DYNAMIC_FTRACE. I will address the pahole > > > generation in a followup and then remove this > > > CONFIG_DYNAMIC_FTRACE limitation. > > > > We should still probably add CONFIG_DYNAMIC_FTRACE=y to selftests/bpf/config? > I thought the tracing tests have been requiring this already. Together with Yeah, I didn't mean that your feature suddenly requires that, it was always a requirement before, but we always forget to add it to config and then some users are periodically tripped up by this. > the new kfunc call, it may be good to make it explicit in selftests/bpf/config. > I can post a diff.