Skip to content

Commit 90c65f1

Browse files
Merge changes Ieee1d7de,Ie7780128 into rvc-dev am: f885ab3 am: b393f60
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/11956180 Change-Id: I3193d54ecc40200b7cdda33ce9550cd13d989e1f
2 parents 02887bf + b393f60 commit 90c65f1

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

prebuilts/api/30.0/private/adbd.te

+5
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ r_dir_file(adbd, apk_data_file)
180180

181181
allow adbd rootfs:dir r_dir_perms;
182182

183+
# Allow killing child "perfetto" binary processes, which auto-transition to
184+
# their own domain. Allows propagating termination of "adb shell perfetto ..."
185+
# invocations.
186+
allow adbd perfetto:process signal;
187+
183188
# Allow to pull Perfetto traces.
184189
allow adbd perfetto_traces_data_file:file r_file_perms;
185190
allow adbd perfetto_traces_data_file:dir r_dir_perms;

prebuilts/api/30.0/private/perfetto.te

+10
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ allow perfetto devpts:chr_file rw_file_perms;
4747
allow perfetto incident_service:service_manager find;
4848
binder_call(perfetto, incidentd)
4949

50+
# perfetto log formatter calls isatty() on its stderr. Denial when running
51+
# under adbd is harmless. Avoid generating denial logs.
52+
dontaudit perfetto adbd:unix_stream_socket getattr;
53+
dontauditxperm perfetto adbd:unix_stream_socket ioctl unpriv_tty_ioctls;
54+
# As above, when adbd is running in "su" domain (only the ioctl is denied in
55+
# practice).
56+
dontauditxperm perfetto su:unix_stream_socket ioctl unpriv_tty_ioctls;
57+
# Similarly, CTS tests end up hitting a denial on shell pipes.
58+
dontauditxperm perfetto shell:fifo_file ioctl unpriv_tty_ioctls;
59+
5060
###
5161
### Neverallow rules
5262
###

private/adbd.te

+5
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ r_dir_file(adbd, apk_data_file)
180180

181181
allow adbd rootfs:dir r_dir_perms;
182182

183+
# Allow killing child "perfetto" binary processes, which auto-transition to
184+
# their own domain. Allows propagating termination of "adb shell perfetto ..."
185+
# invocations.
186+
allow adbd perfetto:process signal;
187+
183188
# Allow to pull Perfetto traces.
184189
allow adbd perfetto_traces_data_file:file r_file_perms;
185190
allow adbd perfetto_traces_data_file:dir r_dir_perms;

private/perfetto.te

+10
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ allow perfetto devpts:chr_file rw_file_perms;
4747
allow perfetto incident_service:service_manager find;
4848
binder_call(perfetto, incidentd)
4949

50+
# perfetto log formatter calls isatty() on its stderr. Denial when running
51+
# under adbd is harmless. Avoid generating denial logs.
52+
dontaudit perfetto adbd:unix_stream_socket getattr;
53+
dontauditxperm perfetto adbd:unix_stream_socket ioctl unpriv_tty_ioctls;
54+
# As above, when adbd is running in "su" domain (only the ioctl is denied in
55+
# practice).
56+
dontauditxperm perfetto su:unix_stream_socket ioctl unpriv_tty_ioctls;
57+
# Similarly, CTS tests end up hitting a denial on shell pipes.
58+
dontauditxperm perfetto shell:fifo_file ioctl unpriv_tty_ioctls;
59+
5060
###
5161
### Neverallow rules
5262
###

0 commit comments

Comments
 (0)