Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
84ae2d24
Commit
84ae2d24
authored
7 years ago
by
Robert Benea
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "sepolicy: fix support for lmkd"
parents
c1acc983
86cb5215
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
private/file_contexts
+1
-0
1 addition, 0 deletions
private/file_contexts
public/device.te
+1
-0
1 addition, 0 deletions
public/device.te
public/domain.te
+4
-0
4 additions, 0 deletions
public/domain.te
public/init.te
+1
-0
1 addition, 0 deletions
public/init.te
public/lmkd.te
+5
-0
5 additions, 0 deletions
public/lmkd.te
with
12 additions
and
0 deletions
private/file_contexts
+
1
−
0
View file @
84ae2d24
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
/dev/cam u:object_r:camera_device:s0
/dev/cam u:object_r:camera_device:s0
/dev/console u:object_r:console_device:s0
/dev/console u:object_r:console_device:s0
/dev/cpuctl(/.*)? u:object_r:cpuctl_device:s0
/dev/cpuctl(/.*)? u:object_r:cpuctl_device:s0
/dev/memcg(/.*)? u:object_r:memcg_device:s0
/dev/device-mapper u:object_r:dm_device:s0
/dev/device-mapper u:object_r:dm_device:s0
/dev/eac u:object_r:audio_device:s0
/dev/eac u:object_r:audio_device:s0
/dev/event-log-tags u:object_r:runtime_event_log_tags_file:s0
/dev/event-log-tags u:object_r:runtime_event_log_tags_file:s0
...
...
This diff is collapsed.
Click to expand it.
public/device.te
+
1
−
0
View file @
84ae2d24
...
@@ -21,6 +21,7 @@ type rtc_device, dev_type;
...
@@ -21,6 +21,7 @@ type rtc_device, dev_type;
type vold_device, dev_type;
type vold_device, dev_type;
type console_device, dev_type;
type console_device, dev_type;
type cpuctl_device, dev_type;
type cpuctl_device, dev_type;
type memcg_device, dev_type;
type fscklogs, dev_type;
type fscklogs, dev_type;
type full_device, dev_type;
type full_device, dev_type;
# GPU (used by most UI apps)
# GPU (used by most UI apps)
...
...
This diff is collapsed.
Click to expand it.
public/domain.te
+
4
−
0
View file @
84ae2d24
...
@@ -226,6 +226,10 @@ with_asan(`allow domain system_data_file:dir getattr;')
...
@@ -226,6 +226,10 @@ with_asan(`allow domain system_data_file:dir getattr;')
### neverallow rules
### neverallow rules
###
###
# Don't allow others to access memcg.
neverallow { domain -init -lmkd -shell -ueventd } memcg_device:dir *;
neverallow { domain -init -lmkd -ueventd } memcg_device:file *;
# All socket ioctls must be restricted to a whitelist.
# All socket ioctls must be restricted to a whitelist.
neverallowxperm domain domain:socket_class_set ioctl { 0 };
neverallowxperm domain domain:socket_class_set ioctl { 0 };
...
...
This diff is collapsed.
Click to expand it.
public/init.te
+
1
−
0
View file @
84ae2d24
...
@@ -77,6 +77,7 @@ allow init tmpfs:dir mounton;
...
@@ -77,6 +77,7 @@ allow init tmpfs:dir mounton;
allow init cgroup:dir create_dir_perms;
allow init cgroup:dir create_dir_perms;
r_dir_file(init, cgroup)
r_dir_file(init, cgroup)
allow init cpuctl_device:dir { create mounton };
allow init cpuctl_device:dir { create mounton };
allow init memcg_device:dir { create mounton };
# /config
# /config
allow init configfs:dir mounton;
allow init configfs:dir mounton;
...
...
This diff is collapsed.
Click to expand it.
public/lmkd.te
+
5
−
0
View file @
84ae2d24
...
@@ -21,6 +21,9 @@ allow lmkd system_server:file write;
...
@@ -21,6 +21,9 @@ allow lmkd system_server:file write;
r_dir_file(lmkd, sysfs_type)
r_dir_file(lmkd, sysfs_type)
allow lmkd sysfs_lowmemorykiller:file w_file_perms;
allow lmkd sysfs_lowmemorykiller:file w_file_perms;
allow lmkd memcg_device:dir search;
allow lmkd memcg_device:file rw_file_perms;
# Send kill signals
# Send kill signals
allow lmkd appdomain:process sigkill;
allow lmkd appdomain:process sigkill;
...
@@ -32,6 +35,8 @@ allow lmkd self:capability sys_nice;
...
@@ -32,6 +35,8 @@ allow lmkd self:capability sys_nice;
allow lmkd proc_zoneinfo:file r_file_perms;
allow lmkd proc_zoneinfo:file r_file_perms;
r_dir_file(lmkd, cgroup)
### neverallow rules
### neverallow rules
# never honor LD_PRELOAD
# never honor LD_PRELOAD
...
...
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