Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
a0f0e9df
Unverified
Commit
a0f0e9df
authored
Feb 19, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpf: comment bpf_cgroup_devices_update()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
60532b18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
cgroup2_devices.c
src/lxc/cgroups/cgroup2_devices.c
+14
-0
No files found.
src/lxc/cgroups/cgroup2_devices.c
View file @
a0f0e9df
...
@@ -619,6 +619,20 @@ bool bpf_cgroup_devices_attach(struct cgroup_ops *ops,
...
@@ -619,6 +619,20 @@ bool bpf_cgroup_devices_attach(struct cgroup_ops *ops,
return
log_trace
(
true
,
"Attached bpf program"
);
return
log_trace
(
true
,
"Attached bpf program"
);
}
}
/*
* TODO: Clarify semantics.
* Specifically, when a user switches the type of device program, i.e. switches
* from blocking all devices by default to allowing all devices by default or
* vica versa do we reactivate the devices we have recorded so far or not?
* Specific example: The user configures a device program that blocks all
* devices by default apart from a small list of devices such as /dev/zero and
* /dev/null. Now the user switches to a device program that allows all devices
* by default. Naturally we skip all specific devices since they are
* encompassed in the global allow rule. But now assume the user switches back
* to a device program that blocks all devices by default. Do we reactivate the
* previously specific allowed devices, i.e. do we grant access to /dev/zero
* and /dev/null? My gut feeling is no, but I'm not sure.
*/
bool
bpf_cgroup_devices_update
(
struct
cgroup_ops
*
ops
,
bool
bpf_cgroup_devices_update
(
struct
cgroup_ops
*
ops
,
struct
bpf_devices
*
bpf_devices
,
struct
bpf_devices
*
bpf_devices
,
struct
device_item
*
new
)
struct
device_item
*
new
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment