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.