[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d975d54abdfc_35a52afafc1345bcdb@john-XPS-13-9370.notmuch>
Date: Fri, 04 Oct 2019 07:55:16 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Alexei Starovoitov <ast@...com>,
Andrii Nakryiko <andrii.nakryiko@...il.com>,
John Fastabend <john.fastabend@...il.com>
Cc: Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH bpf-next 1/2] libbpf: stop enforcing kern_version,
populate it for users
Alexei Starovoitov wrote:
> On 10/4/19 7:32 AM, Andrii Nakryiko wrote:
> >> If we are not going to validate the section should we also skip collect'ing it?
> > Well, if user supplied version, we will parse and use it to override
> > out prepopulated one, so in that sense we do have validation.
> >
> > But I think it's fine just to drop it altogether. Will do in v3.
> >
>
> what about older kernel that still enforce it?
> May be populate it in bpf_attr while loading, but
> don't check it in elf from libbpf?
Yeah, guess I wasn't thinking clearly this morning. The way my BPF progs
are currently written we use the version section to populate the kver.
Easy enough to change though if we think its cleaner to use an attribute
to set it. Actually, seems better to pass via bpf_attr IMO because
currently we use defines to populate the version which is a bit ugly.
Powered by blists - more mailing lists