diff options
author | John Fastabend <john.fastabend@gmail.com> | 2019-10-18 17:41:26 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-10-18 21:59:10 +0300 |
commit | 54b8625cd940b6baace0bd9b1cf26b2de68ba307 (patch) | |
tree | e517117cf0d42f411d157ae982ef736059dcf891 /scripts | |
parent | 1f5343c0ae9673543055e9794362766e1f0ed163 (diff) | |
download | linux-54b8625cd940b6baace0bd9b1cf26b2de68ba307.tar.xz |
bpf, libbpf: Add kernel version section parsing back
With commit "libbpf: stop enforcing kern_version,..." we removed the
kernel version section parsing in favor of querying for the kernel
using uname() and populating the version using the result of the
query. After this any version sections were simply ignored.
Unfortunately, the world of kernels is not so friendly. I've found some
customized kernels where uname() does not match the in kernel version.
To fix this so programs can load in this environment this patch adds
back parsing the section and if it exists uses the user specified
kernel version to override the uname() result. However, keep most the
kernel uname() discovery bits so users are not required to insert the
version except in these odd cases.
Fixes: 5e61f27070292 ("libbpf: stop enforcing kern_version, populate it for users")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/157140968634.9073.6407090804163937103.stgit@john-XPS-13-9370
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions