-
Notifications
You must be signed in to change notification settings - Fork 165
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
fix(modern_ebpf): address verifier issues on kernel versions >=6.12.0
#2172
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Andrea Terzolo <[email protected]>
Signed-off-by: Andrea Terzolo <[email protected]>
Signed-off-by: Andrea Terzolo <[email protected]>
Signed-off-by: Andrea Terzolo <[email protected]>
Please double check driver/API_VERSION file. See versioning. /hold |
Please note: all kernel versions |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2172 +/- ##
=======================================
Coverage 74.82% 74.82%
=======================================
Files 254 254
Lines 33510 33510
Branches 5746 5745 -1
=======================================
+ Hits 25073 25074 +1
+ Misses 8437 8436 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This PR revealed that
|
X64 kernel testing matrix
ARM64 kernel testing matrix
|
8378c25
to
df4c79e
Compare
Signed-off-by: Andrea Terzolo <[email protected]>
df4c79e
to
fefd513
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM label has been added. Git tree hash: 365ac9f3ee2cccf9f1daadef2b89e5026f27c57f
|
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area driver-modern-bpf
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
With the new kernel version 6.12.0 something in the tail call management is changed again. In 6.11.y it was possible to share tail calls between sys_enter and sys_exit programs, starting from
6.12-rc1
this is no longer possible.Using bpftrace we can see that the
attach_proto
of the 2 programs was identical in 6.11.y but is now changed insudo /usr/local/bin/bpftrace -e 'fentry:bpf_prog_map_compatible /comm == "main" / { printf("map_attach_proto: %p, func attach proto: %p\n", args->map->owner.attach_func_proto, args->fp->aux->attach_func_proto ); }'
6.11.10
6.12.1
It is not clear if this is intentional or just a consequence of some other patches, I need to dig more into this. BTW on our side, the fix is quite simple -> avoid tail table shared among ebpf programs with different
attach_proto
.This patch moves
HOTPLUG
DROP_E
DROP_X
tail calls only in the sys_exit flow and dedicates a tail table to them.The hotplug was already managed only in exit after #2150
The only functional change of this PR is that
DROP_E
andDROP_X
are sent only by sys_exit and not by sys_enter but this should change nothing for the userspace.To easily recognize this issue, this is the verifier error:
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: