Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elf: Apply same kern_version.SUBLEVEL clamping as done by kernel #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dverbeir
Copy link

ELF BPF module loading is failing on kernel 4.19.222 (and probably similar fails on 4.14.252) because of the clamping done on the kern_version SUBLEVEL value (clamped to 255 starting at 222). The library must do the same in order to avoid failing the kernel version check in the BPF syscall.

When SUBLEVEL of the kernel version approaches 255, it is clamped to 255
to avoid impacting the PATCHLEVEL. This is introduced in different versions
depending on the branch. For example, for 4.19 kernel see the following
commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a256aac5b7000

In order to avoid failing the kernel version check in the BPF syscall, the
library must apply the same clamping.

Signed-off-by: David Verbeiren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant