Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Connectivity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Connectivity
Commits
05463943
Commit
05463943
authored
1 year ago
by
Maciej Żenczykowski
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "BpfHandler: U requires 4.14+, V requires 4.19+" into main
parents
043bcd45
c2dd01c7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
netd/BpfHandler.cpp
+13
-0
13 additions, 0 deletions
netd/BpfHandler.cpp
with
13 additions
and
0 deletions
netd/BpfHandler.cpp
+
13
−
0
View file @
05463943
...
...
@@ -76,6 +76,19 @@ static Status checkProgramAccessible(const char* programPath) {
}
static
Status
initPrograms
(
const
char
*
cg2_path
)
{
// This code was mainlined in T, so this should be trivially satisfied.
if
(
!
modules
::
sdklevel
::
IsAtLeastT
())
abort
();
// S requires eBPF support which was only added in 4.9, so this should be satisfied.
if
(
!
bpf
::
isAtLeastKernelVersion
(
4
,
9
,
0
))
abort
();
// U bumps the kernel requirement up to 4.14
if
(
modules
::
sdklevel
::
IsAtLeastU
()
&&
!
bpf
::
isAtLeastKernelVersion
(
4
,
14
,
0
))
abort
();
// V bumps the kernel requirement up to 4.19
if
(
modules
::
sdklevel
::
IsAtLeastV
()
&&
!
bpf
::
isAtLeastKernelVersion
(
4
,
19
,
0
))
abort
();
// U mandates this mount point (though it should also be the case on T)
if
(
modules
::
sdklevel
::
IsAtLeastU
()
&&
!!
strcmp
(
cg2_path
,
"/sys/fs/cgroup"
))
abort
();
unique_fd
cg_fd
(
open
(
cg2_path
,
O_DIRECTORY
|
O_RDONLY
|
O_CLOEXEC
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment