lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211214143422.kux4euw6f6vy5fm4@apollo.legion>
Date:   Tue, 14 Dec 2021 20:04:22 +0530
From:   Kumar Kartikeya Dwivedi <memxor@...il.com>
To:     Maxim Mikityanskiy <maximmi@...dia.com>
Cc:     bpf@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        Florian Westphal <fw@...len.de>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        netdev@...r.kernel.org, netfilter-devel@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 9/9] selftests/bpf: Add test for unstable CT
 lookup API

On Tue, Dec 14, 2021 at 07:43:13PM IST, Maxim Mikityanskiy wrote:
> On 2021-12-10 15:02, Kumar Kartikeya Dwivedi wrote:
> > This tests that we return errors as documented, and also that the kfunc
> > calls work from both XDP and TC hooks.
> >
> > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
> > ---
> > [...]
> > +
> > +#define nf_ct_test(func, ctx)                                                  \
> > +	({                                                                     \
> > +		struct bpf_ct_opts opts_def = { .l4proto = IPPROTO_TCP,        \
> > +						.netns_id = -1 };              \
>
> I noticed that when CONFIG_NF_CONNTRACK=m, struct bpf_ct_opts doesn't get
> added to vmlinux.h. What is the right way to get definitions of structs from
> modules in BPF programs? Are they supposed to be part of vmlinux.h?
>

Right, you'll have to do:
# bpftool btf dump file /sys/kernel/btf/nf_conntrack format c > vmlinux.h
after loading the module. This will have the definitions for vmlinux BTF +
nf_conntrack BTF.

> [...]

--
Kartikeya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ