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
7e1d3882
Commit
7e1d3882
authored
7 years ago
by
Treehugger Robot
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Sepolicy: Update rules for perfprofd"
parents
6413f9da
e40d6760
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
private/domain.te
+1
-1
1 addition, 1 deletion
private/domain.te
public/domain.te
+2
-0
2 additions, 0 deletions
public/domain.te
public/perfprofd.te
+29
-1
29 additions, 1 deletion
public/perfprofd.te
with
32 additions
and
2 deletions
private/domain.te
+
1
−
1
View file @
7e1d3882
...
...
@@ -72,7 +72,7 @@ full_treble_only(`
userdebug_or_eng(`-atrace')
-dumpstate
-init
-perfprofd
userdebug_or_eng(`
-perfprofd
')
-shell
-vendor_init
} debugfs_tracing:file no_rw_file_perms;
...
...
This diff is collapsed.
Click to expand it.
public/domain.te
+
2
−
0
View file @
7e1d3882
...
...
@@ -762,6 +762,7 @@ full_treble_only(`
-idmap
-init
-installd
userdebug_or_eng(`-perfprofd')
-postinstall_dexopt
-system_server
-vendor_init
...
...
@@ -774,6 +775,7 @@ full_treble_only(`
-idmap
-init
-installd
userdebug_or_eng(`-perfprofd')
-postinstall_dexopt
-system_server
-vendor_init
...
...
This diff is collapsed.
Click to expand it.
public/perfprofd.te
+
29
−
1
View file @
7e1d3882
...
...
@@ -33,9 +33,26 @@ userdebug_or_eng(`
# perfprofd inspects /sys/power/wake_unlock
wakelock_use(perfprofd);
# perfprofd looks at thermals.
allow perfprofd sysfs_thermal:dir r_dir_perms;
# perfprofd checks power_supply.
r_dir_file(perfprofd, sysfs_batteryinfo)
# simpleperf reads kernel notes.
allow perfprofd sysfs_kernel_notes:file r_file_perms;
# Simpleperf & perfprofd query a range of proc stats.
allow perfprofd proc_loadavg:file r_file_perms;
allow perfprofd proc_stat:file r_file_perms;
allow perfprofd proc_modules:file r_file_perms;
# simpleperf writes to perf_event_paranoid under /proc.
allow perfprofd proc_perf:file write;
# Simpleperf: kptr_restrict. This would be required to dump kernel symbols.
dontaudit perfprofd proc_security:file *;
# simpleperf uses ioctl() to turn on kernel perf events measurements
allow perfprofd self:global_capability_class_set sys_admin;
...
...
@@ -49,9 +66,20 @@ userdebug_or_eng(`
# simpleperf needs open/read any file that turns up in a profile
# to see whether it has a build ID
allow perfprofd exec_type:file r_file_perms;
# App & ART artifacts.
r_dir_file(perfprofd, apk_data_file)
r_dir_file(perfprofd, dalvikcache_data_file)
# Vendor libraries.
r_dir_file(perfprofd, vendor_file)
# Vendor apps.
r_dir_file(perfprofd, vendor_app_file)
# simpleperf will set security.perf_harden to enable access to perf_event_open()
set_prop(perfprofd, shell_prop)
# simpleperf examines debugfs on startup to collect tracepoint event types
allow perfprofd debugfs_tracing:file r_file_perms;
r_dir_file(perfprofd, debugfs_tracing)
allow perfprofd debugfs_tracing_debug:file r_file_perms;
# simpleperf is going to execute "sleep"
allow perfprofd toolbox_exec:file rx_file_perms;
...
...
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