[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220219082037.ow2kbq5brktf4f2u@apollo.legion>
Date: Sat, 19 Feb 2022 13:50:37 +0530
From: Kumar Kartikeya Dwivedi <memxor@...il.com>
To: Alexander Egorenkov <egorenar@...ux.ibm.com>
Cc: Alexander.Egorenkov@....com, andrii@...nel.org, ast@...nel.org,
bpf@...r.kernel.org, brouer@...hat.com, daniel@...earbox.net,
fw@...len.de, iii@...ux.ibm.com, john.fastabend@...il.com,
kafai@...com, maximmi@...dia.com, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, pablo@...filter.org,
songliubraving@...com, toke@...hat.com, yhs@...com
Subject: Re: [PATCH bpf-next v8 00/10] Introduce unstable CT lookup helpers
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
Powered by blists - more mailing lists