Fix bpf selftests build failure after v5.15.139 update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Roxana Nicolescu |
Bug Description
SRU justification
[Impact]
Upstream v5.15.139 (#lp2049432) brought commit
"selftests/bpf: Test tail call counting with bpf2bpf and data on stack"
that affects one of the bpf kselftests (tailcall_
because LIBBPF_OPTS macro does not exists, it does not compile. Error below.
[Fix]
Initially, I thought cherry-picking commit
"libbpf: Rename DECLARE_LIBBPF_OPTS into LIBBPF_OPTS" would be the best,
but upstream stable just reverted the commit that broke it. Hence the fix
consists of cherry-picking this commit from stable upstream 5.15.49:
Commit 62900d358c48 (Revert "selftests/bpf: Test tail call counting with bpf2bpf and data on stack")
[Test]
This should be solved soon, but compileselftests debian rule does not
compile bpf selftests.
I tested it by using our regression testing tooling, but same results can
be achieved by running:
$ make -C linux/tools/
from the linux tree directory
Without the fix, it fails to compile:
/root/
/root/
822 | LIBBPF_
| ^~~~~~~~~~~
| LIBBPF_API
/root/
822 | LIBBPF_
| ^~~~~~~~~~~~~~~~~
/root/
/root/
822 | LIBBPF_
| ^~~~~
/root/
823 | .data_in = &pkt_v4,
| ^
make[1]: *** [Makefile:471: /root/autotest/
make: *** [Makefile:172: all] Error 2
With the fix, it compiles.
[Regression potential]
The only place this is being used is selftests, so the risk is very low.
CVE References
tags: | added: sru-20240205 |
Changed in linux (Ubuntu): | |
status: | New → Invalid |
Changed in linux (Ubuntu Jammy): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Roxana Nicolescu (roxanan) |
description: | updated |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Jammy): | |
status: | In Progress → Fix Committed |
tags: |
added: verification-done-focal-linux-aws-5.15 verification-done-jammy-linux verification-done-jammy-linux-aws-fips removed: verification-needed-focal-linux-aws-5.15 verification-needed-jammy-linux verification-needed-jammy-linux-aws-fips |
Also sent en email to stable upstream to include the fix in 5.15 branch.