Commit graph

20431 commits

Author SHA1 Message Date
Orion Hodson
23098ec3bb Add property contexts for dex2oat cpu-set properties
New properties are:

 dalvik.vm.dex2oat-cpu-set [default compiler thread affinity]
 dalvik.vm.boot-dex2oat-cpu-set [compiler thread affinity for boot]
 dalvik.vm.image-dex2oat-cpu-set [thread affinity recompiling the boot image]

Bug: 141446571
Bug: 149395059
Test: Run installd tests with new properties defined in target mk file.
Change-Id: Idcbb1332aa9c18f6082b827eae0334d063644a41
(cherry picked from commit 7b2ee48cd2)
2020-03-05 08:48:53 +00:00
Alex Hong
1dd6321a00 Update Q sepolicy prebuilt
This updates 29.0 api for dumpstate restart control property contexts

Bug: 147730517
Change-Id: I0aa7450dc0fb34de321cf8d2ba357b2ecabbcf43
2020-02-11 13:53:22 +08:00
Wei Wang
5927933c70 Fix: dumpstate HAL service property context
http://aosp/678384 changed property format

Fixes: 137695210
Bug: 147730517
Test: inject timeout and take BR see dumpstate restarted
Change-Id: Ie24e2d42e92410a935ca4c9364b476d72aa459f3
Merged-In: Ie24e2d42e92410a935ca4c9364b476d72aa459f3
(cherry picked from commit 046c510402)
2020-02-10 14:20:14 +00:00
Jaegeuk Kim
028f2c3453 Merge "block: allow init.rc to tune max discard size" into qt-qpr1-dev 2020-02-01 01:49:24 +00:00
Jaegeuk Kim
2b1e595e8f block: allow init.rc to tune max discard size
Init.rc requires to limit max discard to avoid long latencies.

Bug: 148209614
Change-Id: Idf3b295ac15efd5edf979ca896fdf826b9fc3c99
Merged-In: Idf3b295ac15efd5edf979ca896fdf826b9fc3c99
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-01-23 20:02:58 +00:00
TreeHugger Robot
2192ec6223 Merge "Allow adb start/stop mdnsd via ctl.start/stop" into qt-qpr1-dev 2020-01-17 18:31:09 +00:00
Changyeon Jo
60c4276c15 Allow adb start/stop mdnsd via ctl.start/stop
Bug: 128345139
Test: make selinux_policy
Change-Id: I477d6d94c16974f23f703d5f334ef108279ab3bb
Signed-off-by: Changyeon Jo <changyeon@google.com>
(cherry picked from commit cfeaa1c664)
2020-01-16 08:26:51 -08:00
Jeff Vander Stoep
2951b4859d system_server: TelephonyManager reads /proc/cmdline
Bug: 124466646
Test: build
Change-Id: Ib4868826eb153543c65503bfb4d3623c4158ffae
(cherry picked from commit 29b76e2ceec2ab1e04715657a79b6544afdf09c9)
2020-01-15 13:43:33 -08:00
TreeHugger Robot
49807a6c26 Merge "Allow adb forward to traced consumer socket" into qt-qpr1-dev 2020-01-11 00:32:36 +00:00
Hector Dearman
c0bad7b98f Allow adb forward to traced consumer socket
Currently shell can connect to the traced_consumer_socket allowing it to
configure/start/stop and collect traces. This allows a host tool (e.g. Android Studio or
https://ui.perfetto.dev) to connect to the device via adb and collect traces. It would
be better if rather than executing shell commands the host tool could directly communicate
with the consumer socket. This is possible using adb forward:

adb forward tcp:9903 localfilesystem:/dev/socket/traced_consumer

However in this case adbd is connecting to the socket - not shell.

This CL allows adbd to connect to the socket which allows host tools to collect
traces without having to do everything though shell commands.

Note that this patch also has additional change on prebuilts in order to
backport.

Denial:
08-30 11:28:05.809 10254 10254 W adbd    : type=1400 audit(0.0:1129): avc: denied { write } for name="traced_consumer" dev="tmpfs" ino=6719 scontext=u:r:adbd:s0 tcontext=u:object_r:traced_consumer_socket:s0 tclass=sock_file permissive=0

Test: Cherry pick CL to master, make, flash
adb logcat | grep denied
adb forward tcp:9903 localfilesystem:/dev/socket/traced_consumer

Bug: b/139536756
Change-Id: Ie08e687c0b06d0e1121009e8cd70319a8f907ae2
(cherry-picked from commit b56a49d979)
2020-01-10 09:17:27 -08:00
Yiwei Zhang
b5c47df035 Revert "Revert "Allow dumpstate to dumpsys gpu""
This reverts commit 6daec46264.

Reason for revert: b/147458874

Bug: 132402890
Test: build passes on coral-userdebug

Change-Id: Ibcbc06e99561be424aa953e62985abb5b5864c56
2020-01-09 18:51:24 -08:00
Yiwei Zhang
6daec46264 Revert "Allow dumpstate to dumpsys gpu"
This reverts commit 979f5a44bf.

Reason for revert: b/147458874

Change-Id: Id8a9d7e50dbd3f293e01ab6277e9e54a8ed7619d
2020-01-10 02:05:58 +00:00
Yiwei Zhang
979f5a44bf Allow dumpstate to dumpsys gpu
Bug: 132402890
Test: adb bugreport and verify dumpsys gpu is included.
Change-Id: Ib145937889f9616a0dcdabb7b58839fb715bf6c3
2020-01-09 15:31:59 -08:00
Eric Jeong
4c06707b5e Allow vendor_init to modify pm.dexopt.disable_bg_dexopt
- Android Auto has disabled background dexopt (b/142753051).
- The modification is in car_base.mk which is included by vendor device
file.
- So, vendor_init needs to be able to modify
pm.dexopt.disable_bg_dexopt property.

Bug: 145348176
Test: Check pm.dexopt.disable_bg_dexopt is set to true in Android Auto
device.

Cherry-Picked-From: 03b1992d0bf363e438b0fd7efca1e2a1d7249320
Change-Id: I84d19ea62f1abe1bf9206a60ca103614616e312b
2019-12-06 10:40:12 -08:00
Florian Mayer
d77fec4796 Allow shell to unlink perfetto_traces_data_file.
Bug: 141704436
Test:
blueline:/ $ ls -lZa /data/misc/perfetto-traces
total 186
drwxrwx-wx  2 root   shell u:object_r:perfetto_traces_data_file:s0    3488 2019-09-30 14:12 .
drwxrwx--t 46 system misc  u:object_r:system_data_file:s0             3488 2019-09-30 14:08 ..
-rw-------  1 shell  shell u:object_r:perfetto_traces_data_file:s0  180467 2019-09-30 14:12 profile-shell
blueline:/ $ rm /data/misc/perfetto-traces/profile-shell
rm ro /data/misc/perfetto-traces/profile-shell (y/N):y
blueline:/ $ ls -lZa /data/misc/perfetto-traces
total 6
drwxrwx-wx  2 root   shell u:object_r:perfetto_traces_data_file:s0  3488 2019-09-30 14:13 .
drwxrwx--t 46 system misc  u:object_r:system_data_file:s0           3488 2019-09-30 14:08 ..
blueline:/ $

Cherry pick of c069bc134e

Change-Id: Ia710068c3cca53a415347fb0a7064740e500d15d
Merged-In: Ia710068c3cca53a415347fb0a7064740e500d15d
2019-10-29 10:32:35 +00:00
Evgenii Stepanov
a235dde1cc Revert "Property contexts for ro.sanitize.*"
This reverts commit df186a0a67.

Reason for revert: breaks sepolicy_freeze_test

Change-Id: I3e91b590873f211863b15758b6903328e90ab869
2019-10-25 03:58:20 +00:00
Evgenii Stepanov
df186a0a67 Property contexts for ro.sanitize.*
Bug: 142430632
Bug: 142681453
Test: adb shell getprop ro.sanitize.hwaddress in hwasan build

Change-Id: I8e0fa0e6c865d18b94ffbdb6a0dddb1817adb364
Merged-In: I8e0fa0e6c865d18b94ffbdb6a0dddb1817adb364
(cherry picked from commit bc9e5f710e)
2019-10-14 17:03:51 -07:00
Paul Crowley
859f9211d8 Allow toolbox to rm -rf /data/per_boot
Bug: 140882488
Test: create files and dirs in /data/per_boot, check they're removed.
Cherry-Picked-From: 2367ba358f
Merged-In: Idf0ba09cbe51cbff6a7b2a464c4651a1f7fcf343
Change-Id: Idf0ba09cbe51cbff6a7b2a464c4651a1f7fcf343
2019-09-17 18:44:13 +00:00
Roland Levillain
d8a9a493c5 Allow dexoptanalyzer to mmap files with Linux 4.14+ that it can already access.
SELinux has a separate file mmap permission in 4.14+ kernels. Add this
to dexoptanalyzer(d) in cases where it could already access files (in
particular, secondary dex files).

Addresses denials of the form:

  avc: denied { map } for […] path="/data/data/[…]" […]
  scontext=u:r:dexoptanalyzer:s0 tcontext=u:object_r:app_data_file:s0

(cherry picked from commit c72b7d1731)

Test: Reproduce steps in bug 138683603 on a device with a 4.14+ kernel
      and check the absence of SELinux denials
Bug: 138683603

Change-Id: Ieba53eb431c0ba3914dcb5e5abdae667bd063555
2019-09-13 13:45:40 +01:00
Daniel Solomon
8e65285ec5 selinux: Update Q sepolicy prebuilt
am: 3248182855

Change-Id: I35a78cd9208439c9fc89c20ea546081fb5d4b4f2
2019-08-26 23:44:02 -07:00
Tri Vo
0a436f1b4b selinux: tag gpu_service as app_api_service
am: 32f279c096

Change-Id: I03466cdb7fe4c3c5c52a8e57d0cd5cd394ee0dfe
2019-08-26 23:43:56 -07:00
Daniel Solomon
3248182855 selinux: Update Q sepolicy prebuilt
Tag gpu_service as app_api_service. This is the corresponding api 29.0
change to the public service.te from commit aosp/1105058
(I30a951cd712b0ae4aacd2c4d6d42e74fac5c0707).

Bug: 139685237
Test: m selinux_policy
Change-Id: Ia23cdd5f59b40a3e99cae424d9cf41d5e7442631
2019-08-21 17:10:37 -07:00
Tri Vo
32f279c096 selinux: tag gpu_service as app_api_service
gpu_service is already accessible to untrusted 3p apps aosp/898376.
Otherwise, vendor apps can't access gpu_service.

Bug: 139685237
Test: m selinux_policy
Change-Id: I30a951cd712b0ae4aacd2c4d6d42e74fac5c0707
2019-08-21 16:59:55 -07:00
Carmen Jackson
afac97a16d Allow Traceur to record the suspend_resume trace event
This should be available in user and userdebug builds.

Bug: 137289935
Test: Alongside atrace changes, recorded a trace using Traceur and
verified that the tracepoints were included in the recorded trace in
both user and userdebug builds.

Change-Id: I6131557bdd0a298be9e75b39759599b189b9b988
Merged-In: I6131557bdd0a298be9e75b39759599b189b9b988
2019-08-13 17:13:00 +00:00
Ady Abraham
74395f1ff4 Merge "Add ro.surface_flinger.set_display_power_timer_ms to sepolicy" into qt-r1-dev 2019-07-16 22:40:52 +00:00
Daniel Rosenberg
640ead1a51 Merge "sepolicy: Adjust policy for migrate_legacy_obb_data.sh" into qt-dev
am: a85c5360ab

Change-Id: I9cf4bf773a5c7d36922bb590f74e283c565673c8
2019-07-15 13:21:54 -07:00
Daniel Rosenberg
a85c5360ab Merge "sepolicy: Adjust policy for migrate_legacy_obb_data.sh" into qt-dev 2019-07-15 19:56:35 +00:00
Daniel Rosenberg
793dc8f8da sepolicy: Adjust policy for migrate_legacy_obb_data.sh
Required to check if migration is necessary and migrate obb contents

Bug: 136199978
Test: make
Change-Id: I23890e4eeea1da7791e25ce5c9584b1abe94f440
2019-07-12 16:35:20 -07:00
Ady Abraham
40909f65a6 Add ro.surface_flinger.set_display_power_timer_ms to sepolicy
Bug: 135550670
Test: Boot with SELinux enforcing
Change-Id: I61c30abc39909a263a2c402a5c0eb1de570748bb
2019-07-12 12:43:25 -07:00
Thierry Strudel
d519b1ca7c Merge "SF: enable device-specific dataspace for color space agnostic surfaces" into qt-r1-dev 2019-07-09 00:15:22 +00:00
Yichi Chen
39efa50184 SF: enable device-specific dataspace for color space agnostic surfaces
To reduce the DPU loading in color conversion, we enable device-specific
dataspace for color space agnostic surfaces. Since the type of surfaces
usually provide gray-level surfaces to users, it can be acceptable to
ignore the color conversion on them.

Bug: 134783740
Bug: 135140940
Test: Check ScreenDecorOverlays in expected dataspace
Test: Play HDR video on C2 and check dataspace
Change-Id: Ief32f0ff3867b2e154fecd6c9ebd6610b0e6ed11
2019-07-03 20:24:42 +08:00
Sidath Senanayake
b1d6eb979e Allow perfetto to access gpu_frequency tracepoint in user
am: 9bfaa1c4dd

Change-Id: Ie0ec9a00dab4c2d8aea365fb95b708aee8ef09d0
2019-07-02 13:00:52 -07:00
Sidath Senanayake
9bfaa1c4dd Allow perfetto to access gpu_frequency tracepoint in user
This will allow Perfetto to capture GPU frequency changes
on the target, which is useful to graphics developers
using Perfetto to profile graphics HW usage.

This change also updates the private prebuilt at version
29.0 to match the update.

Bug: 136062452
Merged-In: Idb7870b2f674f1359ef3b4487dbeff190b394248
Change-Id: Ib98ba10d96caa199d7030be3a17148045576a80c
2019-06-28 20:13:05 +01:00
Todd Kennedy
efc2dbb26e Allow rule to let settings access apex files
am: 9067699d9d

Change-Id: Id3541133ffa48e7685f8e8195f5c585ea8fe9630
2019-06-28 10:32:32 -07:00
Todd Kennedy
9067699d9d Allow rule to let settings access apex files
In order to show licensing information, we need to read it from
an asset stored in the .apex file.

Bug: 135183006
Test: Manual; settings can access apex files stored on /data
Change-Id: I71fbde6e295d9c890c9b9b0449e5150834a6680e
Merged-In: I71fbde6e295d9c890c9b9b0449e5150834a6680e
2019-06-27 11:32:49 -07:00
Oliver Nguyen
75f2c87c8a Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev
am: 72a75ffe19

Change-Id: I86d660a7402876aa9bfad72ef6c6e75771f376cd
2019-06-20 15:38:24 -07:00
Oliver Nguyen
72a75ffe19 Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev 2019-06-20 19:07:41 +00:00
Kevin Chyn
20ca587019 Add rules to dump hal traces
am: 6d976f4d5d

Change-Id: I7077ceb75ff9e5c4d13acebbffe03089b9952a99
2019-06-19 18:39:21 -07:00
Pirama Arumuga Nainar
b65824642b In native coverage builds, allow all domains to access /data/misc/trace
Bug: http://b/135139675

Coverage files are written to /data/misc/trace (governed by the
method_trace_data_file selinux type).  Allow all domains to access
(create directories, access files) this directory when native coverage
is enabled (by setting NATIVE_COVERAGE to true) in an userdebug or eng
build.

Also relax neverallow constraints to allow access to
method_trace_data_file for native coverage builds.

Test: Build 32-bit cuttlefish with coverage:
          m NATIVE_COVERAGE=true COVERAGE_PATHS="*"
      and verify that there are no selinux denials in kernel log and
      logcat.

Change-Id: I3fe7c77612854b9de7de7a0ddd5cbf44a2f5c21e
(cherry picked from commit ce9c0c5a5f)
2019-06-19 16:27:17 -07:00
Kevin Chyn
6d976f4d5d Add rules to dump hal traces
Test: manual
Bug: 126802513

Change-Id: If037483f305e161a158e30f6322d5e25b7770952
2019-06-19 19:55:14 +00:00
TreeHugger Robot
9af52722db Merge "Add power stats HAL to ANR list" into qt-r1-dev 2019-06-19 18:53:05 +00:00
Benjamin Schwartz
8273f1915f Add power stats HAL to ANR list
Bug: 135111122
Test: Ran "adb shell am hang" and verified that power.stats HAL
information is in /data/anr/<anr_file>
Change-Id: I60a6191626a20c737124033e8ad453fa91425e39
2019-06-19 15:36:22 +00:00
Tao Bao
83e9579663 Merge "Add persist.sys.theme." into qt-dev
am: 890dba4999

Change-Id: I7071270ce19cc650663f196de839e82e793ee206
2019-06-18 20:25:28 -07:00
Tao Bao
890dba4999 Merge "Add persist.sys.theme." into qt-dev 2019-06-19 00:36:03 +00:00
Hridya Valsaraju
866a5773aa Add permission required by libdm_test
am: 9bb71537ac

Change-Id: I868d3dafeb1a584aeb047c03b9ec2d916d5102b4
2019-06-17 20:57:33 -07:00
Hridya Valsaraju
9bb71537ac Add permission required by libdm_test
This CL fixes the following denials during libdm_test
that is part of VTS.

avc: denied { read } for comm="loop1" path=2F6D656D66643A66696C655F32202864656C6574656429
dev="tmpfs" ino=97742 scontext=u:r:kernel:s0 tcontext=u:object_r:appdomain_tmpfs:s0
tclass=file permissive=0
W loop1   : type=1400 audit(0.0:371): avc: denied { read } for
path=2F6D656D66643A66696C655F32202864656C6574656429 dev="tmpfs" ino=97742 scontext=u:r:kernel:s0
tcontext=u:object_r:appdomain_tmpfs:s0 tclass=file permissive=0

Bug: 135004816
Test: adb shell libdm_test
Change-Id: Ifb6d58ee6f032cdf3952a05667aa8696d6e2a2fa
2019-06-17 22:46:03 +00:00
Tao Bao
75182a1ea6 Add persist.sys.theme.
This property will be set by system_server (to indicate the currently
selected theme for device), and can be accessed by vendor init.rc.

avc:  denied  { read } for property=persist.sys.theme pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:theme_prop:s0 tclass=file

Bug: 113028175
Test: Set a vendor init trigger that waits on `persist.sys.theme`. Check
      that the trigger fires without denial.
Change-Id: Ibb4e392d5059b76059f36f7d11ba82cd65cbe970
2019-06-17 10:48:21 -07:00
Jeff Vander Stoep
e774de4d2d Merge "system_server_startup: allow SIGCHLD to zygote" into qt-dev
am: 6dc831d2fb

Change-Id: I5c25362defcc65fc762f04842754fcc0479ed056
2019-06-15 17:45:02 -07:00
TreeHugger Robot
6dc831d2fb Merge "system_server_startup: allow SIGCHLD to zygote" into qt-dev 2019-06-16 00:29:00 +00:00
Jeff Vander Stoep
e0d9e50c96 system_server_startup: allow SIGCHLD to zygote
avc: denied { sigchld } for comm="main"
scontext=u:r:system_server_startup:s0 tcontext=u:r:zygote:s0
tclass=process permissive=0

Test: build
Bug: 134496658
Change-Id: I98c106b17ba1740f953c3108bd0fc927c150096f
(cherry picked from commit 67dc274f87)
2019-06-14 16:56:05 -07:00