Fix haveProgTestRun on kernel version 5.15.65 #788
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A recent patch0 to the kernel prevents bpf_prog_test_run_skb() from running the bpf program with with an empty skb. This makes the existing feature check fail, so to fix it an additional byte of input data is needed.
I tried tracing through the kernel code, and to be honest I'm only partially confident that I understand the issue. I can't quite find the place where the
skb->len
is getting reset to zero, because before the call toconvert___skb_to_skb()
is a call to__skb_put()
with the size of the input data. The patch I linked is essentially a good guess at the root cause.I am confident that this issue is introduced in 5.15.65 (changelog).
I did take the time to build 5.15.64 and run the test above; it passed without this patch.
That test also passes on 5.15.65 with this patch applied. It looks like the CI for this repo won't catch the issue because it is pinned to 5.15.19 (ref).