Netdev List
 help / color / mirror / Atom feed
From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: Alexander Egorenkov <egorenar@linux.ibm.com>
Cc: Alexander.Egorenkov@ibm.com, andrii@kernel.org, ast@kernel.org,
	bpf@vger.kernel.org, brouer@redhat.com, daniel@iogearbox.net,
	fw@strlen.de, iii@linux.ibm.com, john.fastabend@gmail.com,
	kafai@fb.com, maximmi@nvidia.com, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, pablo@netfilter.org,
	songliubraving@fb.com, toke@redhat.com, yhs@fb.com
Subject: Re: [PATCH bpf-next v8 00/10] Introduce unstable CT lookup helpers
Date: Sat, 19 Feb 2022 13:50:37 +0530	[thread overview]
Message-ID: <20220219082037.ow2kbq5brktf4f2u@apollo.legion> (raw)
In-Reply-To: <878ru7qp98.fsf@oc8242746057.ibm.com>

On Sat, Feb 19, 2022 at 01:09:15PM IST, Alexander Egorenkov wrote:
>
> Hi Kartikeya,
>
> sorry if i wasn't clear in my first message but just to be sure
> we have no misunderstandings :)
>
> .BTF sections work on s390x with linux-next and nf_conntrack as well if
> the corresponding .BTF section is a part of the kernel module itself.
> I tested it myself by building a linux-next kernel and testing it with a
> KVM guest, i'm able to load nf_conntrack and it works.
>
> In contrast, in the case where the corresponding .BTF section is separate
> from the kernel module nf_conntrack, it fails with the message i
> provided in the first email.
>
> Therefore, my question is, does BTF for kernel modules work if the
> corresponding BTF section is NOT a part of the kernel module but instead
> is stored within the corresponding debuginfo file
> /usr/lib/debug/lib/modules/*/kernel/net/netfilter/nf_conntrack.ko.debug ?
>

Ah, I see, thanks for the clarification.

Currently module BTF is parsed during module load, so unless we can extend the
kernel to pass BTF from a separate debuginfo during modprobe, and associate it
with the loaded module, it won't work. You also won't be able to make the kfunc
call from BPF program, as it would require module BTF fd during prog load.

Still, we can probably remove the error and return 0 when btf == NULL, even if
Kconfig option CONFIG_DEBUG_INFO_BTF is set. I was assuming it would never be
the case that the option is set and btf is not available after successful
parsing, but clearly that is wrong.

If the BPF maintainers agree this is ok, feel free to send a fix to remove the
error.

> Thanks
> Regards
> Alex
>
>
>

--
Kartikeya

  reply	other threads:[~2022-02-19  8:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 16:39 [PATCH bpf-next v8 00/10] Introduce unstable CT lookup helpers Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 01/10] bpf: Fix UAF due to race between btf_try_get_module and load_module Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 02/10] bpf: Populate kfunc BTF ID sets in struct btf Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 03/10] bpf: Remove check_kfunc_call callback and old kfunc BTF ID API Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 04/10] bpf: Introduce mem, size argument pair support for kfunc Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 05/10] bpf: Add reference tracking support to kfunc Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 06/10] net/netfilter: Add unstable CT lookup helpers for XDP and TC-BPF Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 07/10] selftests/bpf: Add test for unstable CT lookup API Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 08/10] selftests/bpf: Add test_verifier support to fixup kfunc call insns Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests Kumar Kartikeya Dwivedi
2022-05-26  1:22   ` Benjamin Poirier
2022-05-26  5:15     ` Kumar Kartikeya Dwivedi
2022-05-26  6:19       ` Benjamin Poirier
2022-01-14 16:39 ` [PATCH bpf-next v8 10/10] selftests/bpf: Add test for race in btf_try_get_module Kumar Kartikeya Dwivedi
2022-01-18 22:52   ` Alexei Starovoitov
2022-02-18 20:19 ` [PATCH bpf-next v8 00/10] Introduce unstable CT lookup helpers Alexander Egorenkov
2022-02-18 22:20   ` Kumar Kartikeya Dwivedi
2022-02-19  7:39     ` Alexander Egorenkov
2022-02-19  8:20       ` Kumar Kartikeya Dwivedi [this message]
2022-02-20  1:13       ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220219082037.ow2kbq5brktf4f2u@apollo.legion \
    --to=memxor@gmail.com \
    --cc=Alexander.Egorenkov@ibm.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=egorenar@linux.ibm.com \
    --cc=fw@strlen.de \
    --cc=iii@linux.ibm.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=maximmi@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox