Commit Graph

5352 Commits

Author SHA1 Message Date
Treehugger Robot
fa7898c3b6 Merge "Set odm and vendor build.version.incremental to be publicly readable" 2019-12-11 03:50:54 +00:00
Automerger Merge Worker
86dcbf3a24 Merge "Move linker config under /linkerconfig" am: cd74ef82fd am: 6814c41c12
Change-Id: I77dbd9e3b00551963e5baa458b276b952994b520
2019-12-11 03:19:32 +00:00
Kiyoung Kim
cd74ef82fd Merge "Move linker config under /linkerconfig" 2019-12-11 02:55:06 +00:00
Steven Moreland
a22a305e34 Merge "Allow dumping vibrator HAL." am: 596f644c2d
am: aea57e6e3a

Change-Id: Ib78c4cc69d13af73f24989b8f995f936627e1413
2019-12-10 09:58:18 -08:00
Treehugger Robot
596f644c2d Merge "Allow dumping vibrator HAL." 2019-12-10 17:47:35 +00:00
Kenny Root
c11be97479 Merge "Support Resume on Reboot" am: 6a9f7b265a
am: 25e571fa5d

Change-Id: Idc6f9729dad5fcaa326ed64739208e07310d4b53
2019-12-10 05:08:43 -08:00
Oli Lan
54d30430bd Add type for directories containing snapshots of apex data. am: 91ce5b9c22
am: 78a00c556b

Change-Id: Ieb1fab19a3ce74e20836760b1304b46cedfc7e56
2019-12-10 05:07:24 -08:00
Oli Lan
cc0bc809b3 Add type for APEX data directories. am: 79b4e1af4a
am: fdf1a21ef8

Change-Id: Ib8842598021a17f1e710b63426867f86481b735e
2019-12-10 05:07:21 -08:00
Kenny Root
6a9f7b265a Merge "Support Resume on Reboot" 2019-12-10 12:59:35 +00:00
Kenny Root
76ea325a3d Support Resume on Reboot
When an OTA is downloaded, the RecoverySystem can be triggered to store
the user's lock screen knowledge factor in a secure way using the
IRebootEscrow HAL. This will allow the credential encrypted (CE)
storage, keymaster credentials, and possibly others to be unlocked when
the device reboots after an OTA.

Bug: 63928581
Test: make
Test: boot emulator with default implementation
Test: boot Pixel 4 with default implementation
Change-Id: I1f02e7a502478715fd642049da01eb0c01d112f6
2019-12-09 14:25:04 -08:00
Steven Moreland
7ebce7d666 Allow dumping vibrator HAL.
Was missing permission to write to dumpstate's file, so this was failing
to dump.

Fixes: 145776393
Test: bugreport now shows:
-------------------------------------------------------------------------------
DUMP OF SERVICE android.hardware.vibrator.IVibrator/default:
HIDL:
...

Kernel:
...

(note, will fix 'HIDL' reference from AIDL HAL separately).

Change-Id: I5fbd55a4dbbd31a9c08260a247559e3dbd9a4046
2019-12-09 11:17:55 -08:00
Oli Lan
91ce5b9c22 Add type for directories containing snapshots of apex data.
This adds a new apex_rollback_data_file type for the snapshots (backups)
of APEX data directories that can be restored in the event of a rollback.

Permission is given for apexd to create files and dirs in those directories
and for vold_prepare_subdirs to create the directories.

See go/apex-data-directories for details.

Bug: 141148175
Test: Built and flashed, checked directory was created with the correct
type.

Change-Id: I94b448dfc096e5702d3e33ace6f9df69f58340fd
2019-12-09 11:16:24 +00:00
Oli Lan
79b4e1af4a Add type for APEX data directories.
This adds a new apex_module_data_file type for the APEX data directories
under /data/misc/apexdata and /data/misc_[de|ce]/<u>/apexdata.

Permission is given for vold to identify which APEXes are present and
create the corresponding directories under apexdata in the ce/de user
directories.

See go/apex-data-directories.

Bug: 141148175
Test: Built & flashed, checked directories were created.
Change-Id: I95591e5fe85fc34f7ed21e2f4a75900ec2cfacfa
2019-12-09 11:14:38 +00:00
Hridya Valsaraju
004539ef7c Add sepolicy for binderfs
/dev/binder, /dev/hwbinder and /dev/vndbinder are relocating
to /dev/binderfs/binder /dev/binderfs/hwbinder and
/dev/binderfs/vndbinder. This patch adds the sepolicy to
allow the switch.

The following are some of the denials that get taken care of by this
patch(there are too many to copy).

audit(1575835230.863:16): avc: denied { search } for comm="servicemanager" name="/" dev="binder" ino=1 scontext=u:r:servicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir permissive=1
audit(1575835230.863:16): avc: denied { read } for comm="servicemanager" name="binder" dev="binder" ino=4 scontext=u:r:servicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.863:17): avc: denied { write } for comm="servicemanager" name="binder" dev="binder" ino=4 scontext=u:r:servicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.863:17): avc: denied { open } for comm="servicemanager" path="/dev/binderfs/binder" dev="binder" ino=4 scontext=u:r:servicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.863:18): avc: denied { ioctl } for comm="servicemanager" path="/dev/binderfs/binder" dev="binder" ino=4 ioctlcmd=0x6209 scontext=u:r:servicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.863:19): avc: denied { map } for comm="servicemanager" path="/dev/binderfs/binder" dev="binder" ino=4 scontext=u:r:servicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.867:20): avc: denied { search } for comm="vndservicemanag" name="/" dev="binder" ino=1 scontext=u:r:vndservicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir permissive=1
audit(1575835230.867:20): avc: denied { read } for comm="vndservicemanag" name="vndbinder" dev="binder" ino=6 scontext=u:r:vndservicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.867:21): avc: denied { write } for comm="vndservicemanag" name="vndbinder" dev="binder" ino=6 scontext=u:r:vndservicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.867:21): avc: denied { open } for comm="vndservicemanag" path="/dev/binderfs/vndbinder" dev="binder" ino=6 scontext=u:r:vndservicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.867:22): avc: denied { ioctl } for comm="vndservicemanag" path="/dev/binderfs/vndbinder" dev="binder" ino=6 ioctlcmd=0x6209 scontext=u:r:vndservicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.867:23): avc: denied { map } for comm="vndservicemanag" path="/dev/binderfs/vndbinder" dev="binder" ino=6 scontext=u:r:vndservicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=chr_file permissive=1
audit(1575835230.871:25): avc: denied { search } for comm="hwservicemanage" name="/" dev="binder" ino=1 scontext=u:r:hwservicemanager:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir permissive=1
audit(1575835238.351:72): avc: denied { search } for comm="android.hardwar" name="proc" dev="binder" ino=1048586 scontext=u:r:hal_configstore_default:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir permissive=1

Test: boots without any issues when binderfs in enabled.
Bug: 136497735

Change-Id: Ib0f8f2156c960eb7b394dd7c79ae96c7da8bc213
2019-12-08 13:14:04 -08:00
Srinivas Paladugu
4a1cb969cc Merge "Add property to skip idle for zram writeback" am: ecb84f87d8
am: c4f03ef938

Change-Id: Id4d41afe0f057b0f97c80bb11953f7d74baedf99
2019-12-06 16:43:18 -08:00
Treehugger Robot
ecb84f87d8 Merge "Add property to skip idle for zram writeback" 2019-12-07 00:12:04 +00:00
Jaegeuk Kim
79b654075f Merge "block: allow init.rc to tune max discard size" am: aec7c5fed4
am: 58b6f699b6

Change-Id: I42e5cc444dfcdc86bf533bae2d65fc25cc128f07
2019-12-06 14:09:02 -08:00
Jaegeuk Kim
aec7c5fed4 Merge "block: allow init.rc to tune max discard size" 2019-12-06 21:59:19 +00:00
Song Pan
2a12b1c3f1 Merge "Add sepolicy for AppIntegrityService." am: 09ecf475e9
am: 007ce1a1b1

Change-Id: I2474d9ef684c42e3fbd5d3414693d9e079ee7c60
2019-12-06 10:47:45 -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
Treehugger Robot
09ecf475e9 Merge "Add sepolicy for AppIntegrityService." 2019-12-06 18:37:02 +00:00
Tomasz Wasilczyk
a3ee0701c4 Merge "Allow vendor-init selecting Vehicle HAL instance to use." am: e7f2a17b2e
am: 638c43b624

Change-Id: I8de6182a65a20322a501d4b1381f09a90fc0a0e3
2019-12-06 09:23:20 -08:00
Tomasz Wasilczyk
e7f2a17b2e Merge "Allow vendor-init selecting Vehicle HAL instance to use." 2019-12-06 16:55:48 +00:00
Srinivas Paladugu
7e31e9e541 Add property to skip idle for zram writeback
Vendors should be able set this property

Bug: 141756630
Test: Device boots up and zram writeback works
Change-Id: I0618df43579b3b63510df84e88bbcfd5e00abb16
2019-12-06 08:34:04 -08:00
Anton Hansson
216d4f07fb Merge "Add sepolicy for sdkext module prop" am: 902f4fe2e6
am: ae699a1b3c

Change-Id: I8561be8f30bfc43c9c4b19e1cb54de2c95e4f682
2019-12-06 03:28:46 -08:00
Anton Hansson
902f4fe2e6 Merge "Add sepolicy for sdkext module prop" 2019-12-06 11:13:03 +00:00
Mark Chien
27f29c4cb0 Merge "[Tether15] Allow system app to find TetheringManager" am: b1e670c24c
am: d0ba68b2bb

Change-Id: I097f578abbc81deee1072be1efeed288a34e67e0
2019-12-05 19:46:33 -08:00
Treehugger Robot
b1e670c24c Merge "[Tether15] Allow system app to find TetheringManager" 2019-12-06 03:32:50 +00:00
Tomasz Wasilczyk
d9999bebc9 Allow vendor-init selecting Vehicle HAL instance to use.
Bug: 143779011
Test: added PRODUCT_PROPERTY_OVERRIDES for ro.vehicle.hal
Change-Id: I01ec302f3aedae0b021aa34952805e764d45f431
2019-12-05 08:49:49 -08:00
Victor Hsieh
8fbd3fed28 Merge "sepolicy: allow rules for apk verify system property" am: 4c8a849f25
am: 9aeed582b3

Change-Id: Iff494086e2a4d068d07f50e31f17b48e205bb353
2019-12-05 08:19:47 -08:00
Treehugger Robot
4c8a849f25 Merge "sepolicy: allow rules for apk verify system property" 2019-12-05 16:08:37 +00:00
Anton Hansson
e822545909 Add sepolicy for sdkext module prop
Add a domain for derive_sdk which is allowed to set
persist.com.android.sdkext.sdk_info, readable by all
apps (but should only be read by the BCP).

Bug: 137191822
Test: run derive_sdk, getprop persist.com.android.sdkext.sdk_info
Change-Id: I389116f45faad11fa5baa8d617dda30fb9acec7a
2019-12-05 14:11:50 +00:00
Song Pan
8be46bf2e0 Add sepolicy for AppIntegrityService.
CL that adds the service: http://ag/9554748

BUG:145674997
Test: Manually flash the device. Without this change, the devices goes into a
bootloop (http://gpaste/5033431010377728) if I uncommit the guard in
http://ag/c/platform/frameworks/base/+/9652133/21/services/core/java/com/android/server/integrity/AppIntegrityManagerService.java

Change-Id: Ib2daf9191900d94abeae207e18a77a5914d14783
2019-12-05 12:22:51 +00:00
Kiyoung Kim
00cf2fbe50 Move linker config under /linkerconfig
Currently linker config locates under /dev, but this makes some problem
in case of using two system partitions using chroot. To match system
image and configuration, linker config better stays under /linkerconfig

Bug: 144966380
Test: m -j passed && tested from cuttlefish
Change-Id: Iea67663442888c410f29f8dd0c44fe49e3fcef94
2019-12-05 12:42:29 +09:00
chrisweir
cd40aa0ab7 Modify SEPolicy to support SLCAN
SLCAN setup requires certain ioctls and read/write operations to
certain tty's. This change allows the HAL to set up SLCAN devices while
complying with SEPolicy.

In addition to adding support for SLCAN, I've also included permissions
for using setsockopt. In order for the CAN HAL receive error frames from
the CAN bus controller, we need to first set the error mask and filter
via setsockopt.

Test: manual
Bug: 144458917
Bug: 144513919
Change-Id: I63a48ad6677a22f05d50d665a81868011c027898
2019-12-04 14:06:09 -08:00
Jaegeuk Kim
a47abdbe16 block: allow init.rc to tune max discard size
Init.rc requires to limit max discard to avoid long latencies.

Change-Id: Idf3b295ac15efd5edf979ca896fdf826b9fc3c99
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-12-04 12:26:19 -08:00
Inseob Kim
a92f9c0761 Merge "Fix vendor defining macros and neverallows" am: 54072d9a73
am: 2ca36f84d7

Change-Id: Ib65b5e902aba6876d68adcc9b390dbbbf3f24542
2019-12-04 08:44:37 -08:00
Hangyu Kuang
f5cdcb839b Merge "MediaTranscodingService: Add sepolicy for MediaTranscodingService." am: 4c1e76adcb
am: ddbfbea526

Change-Id: I881f49fe6556e9a0d75f0ea1b9d6c34b61695f0c
2019-12-04 08:44:24 -08:00
Ashwini Oruganti
9c7fc7e270 Merge "Audit binder_call rule for priv_app in update_engine.te" am: 53e3983923
am: 2e1fd3129a

Change-Id: Ife6573e6b5440fb04d8fcc8a6a4d47e56a01f011
2019-12-04 08:44:06 -08:00
Treehugger Robot
54072d9a73 Merge "Fix vendor defining macros and neverallows" 2019-12-04 01:12:15 +00:00
Hangyu Kuang
4c1e76adcb Merge "MediaTranscodingService: Add sepolicy for MediaTranscodingService." 2019-12-03 23:55:20 +00:00
Ashwini Oruganti
c116142d2e Audit binder_call rule for priv_app in update_engine.te
We've moved GMS core to its own domain, and this permission should no
longer be applied to the broader priv_app domain.

Before we delete the rule, we are auditing it to see if any other
privapps need it.

Bug: 142672293
Test: TH
Change-Id: I29c29739f4c3caf5d24361b69adc584047da0ef0
2019-12-03 14:02:57 -08:00
Ashwini Oruganti
742291c42f Merge "Allow update_engine to call gmscore_app" am: f651f6efc6
am: 7cde5b6c31

Change-Id: I2c093da9e4079d7f8e4e9ef04f46cab77a716cd4
2019-12-03 12:35:39 -08:00
Ashwini Oruganti
ae7297b7da Allow update_engine to call gmscore_app
We need this permission now that GMS core runs in its own domain and not
in the priv_app domain.

Bug: 145379440
Bug: 142672293
Test: TH
Change-Id: Idc4bf6863ba767d287c218c07d0eb5aebbe50f91
2019-12-03 11:13:51 -08:00
Victor Hsieh
8b65b0b12d sepolicy: allow rules for apk verify system property
ro.apk_verity.mode was introduced in P on crosshatch. This change
changes the label from default_prop to a new property, apk_verity_prop.

ro.apk_verity.mode is set by vendor_init per build.prop, in order to
honor Treble split.  It is also read by system_server and installd
currently.

Test: verify functioning without denials in dmesg
Bug: 142494008
Bug: 144164497
Change-Id: I1f24513d79237091cf30025bb7ca63282e23c739
2019-12-03 10:09:35 -08:00
Inseob Kim
b4baf73477 Fix vendor defining macros and neverallows
init and dumpstate should be able to access all properties, but they are
in coredomain, so neverallow rules for vendor properties should be
changed in order to avoid conflicts.

Bug: 145339613
Test: add vendor_internal_prop manually and build.
Change-Id: If582870f855e4444f8ac0d091696c0c7fd833791
2019-12-03 18:42:12 +09:00
Hangyu Kuang
ee3a8ea798 MediaTranscodingService: Add sepolicy for MediaTranscodingService.
Bug:145233472
Test: Build and flash the phone.
"adb shell dumpsys -l | grep media" shows media.transcoding service.

Change-Id: I48a42e7b595754989c92a8469eb91360ab6db7c6
2019-12-02 13:57:28 -08:00
Mark Chien
9dfaa7dcc6 [Tether15] Allow system app to find TetheringManager
Bug: 144320246
Test: -build, flash, boot
      -OFF/ON hotspot

Change-Id: I8ce7ac5eb8198f0df4a2da426e3c56e8915e746a
2019-12-02 18:01:33 +08:00
Hsin-Yi Chen
26f34a497b Set odm and vendor build.version.incremental to be publicly readable
VTS and CTS-on-GSI report the device's ro.odm.build.version.incremental
or ro.vendor.build.version.incremental. The properties need to be
readable without root privilege.

Test: adb shell getprop ro.odm.build.version.incremental
Bug: 145255132
Change-Id: Ibb71185888cce022cb3a9be3e6fb2199d5f438d9
2019-11-28 08:41:37 +00:00
Roshan Pius
e156b817e0 Merge changes Ifa33dae9,I69ccc6af,Ibb4db9d9 am: d16a3968f3
am: 34c69ae8eb

Change-Id: I16c8728dcbf2268abb2cd7c424ff7d31ff5f4b8a
2019-11-26 16:50:30 -08:00
Treehugger Robot
d16a3968f3 Merge changes Ifa33dae9,I69ccc6af,Ibb4db9d9
* changes:
  Revert "sepolicy: Permission changes for new wifi mainline module"
  Revert "wifi_stack: Move to network_stack process"
  Revert "sepolicy(wifi): Allow audio service access from wifi"
2019-11-27 00:41:35 +00:00
David Sehr
76e3137eca Merge "Revert^2 "SELinux policy for system server JVMTI"" am: 453ed17a61
am: b08791945a

Change-Id: I9c9700032c2d8893d1f431b2791413eb8a35d1f2
2019-11-26 14:28:44 -08:00
David Sehr
453ed17a61 Merge "Revert^2 "SELinux policy for system server JVMTI"" 2019-11-26 22:19:11 +00:00
Robert Shih
c2a7283f4d Merge "allow mediaserver to access drm hidl" am: 487411abab
am: caefd4cdc3

Change-Id: Icbaa5bdb8fb8e04724365e9a486be284947be013
2019-11-25 17:48:35 -08:00
David Sehr
fa67ec4126 Revert^2 "SELinux policy for system server JVMTI"
This reverts commit baa06ee2cd.

Reason for revert: Added missing property name in vendor_init.te.

Bug: none
Test: none (other than neverallow checking)
Change-Id: I9e93bf4ea6ca3a4634f8f4cbce2f13c5f410883b
2019-11-25 15:53:52 -08:00
Robert Shih
cc8a4d3bf2 allow mediaserver to access drm hidl
Previously mediaserver could only access hidl via mediadrmserver.
Required because mediadrmserver will be removed in R.

Bug: 134787536
Bug: 144731879
Test: MediaPlayerDrmTest
Change-Id: If0ae1453251e88775a43750e24f7dac198294780
2019-11-25 11:24:44 -08:00
Ashwini Oruganti
5ceab87cc4 Merge "Create a separate SELinux domain for gmscore" am: 8f079fb0e2
am: f1c2a3821e

Change-Id: Ie4349ba18f905c642fef395fa4f7b9aa354c230a
2019-11-25 09:12:02 -08:00
Ashwini Oruganti
8f079fb0e2 Merge "Create a separate SELinux domain for gmscore" 2019-11-25 16:59:10 +00:00
Martijn Coenen
fe9054ddd0 Merge changes Ide8fc07c,Ia1f51db4 am: d1460a1111
am: 6f6f3e04a8

Change-Id: I3df31bd507e9e63da492ebd4e946996c4aba0348
2019-11-23 01:20:25 -08:00
Martijn Coenen
d1460a1111 Merge changes Ide8fc07c,Ia1f51db4
* changes:
  Allow vold to mount on top of /data/media.
  Revert "Temporarily relax Zygote storage mounting rules."
2019-11-23 09:10:34 +00:00
Mathieu Chartier
de62147e94 Merge "Revert "Remove ability to set profilebootimage and profilesystemserver"" am: c075ef38d4
am: 41337fa284

Change-Id: Ie53607baa18be515c4d0e670fd6b52ff8cb0bd38
2019-11-22 15:12:25 -08:00
Mathieu Chartier
c075ef38d4 Merge "Revert "Remove ability to set profilebootimage and profilesystemserver"" 2019-11-22 22:52:45 +00:00
Raman Tenneti
b87ed99bc4 Merge "Revert submission" am: 9f793aff87
am: 2159cbe2cd

Change-Id: I570b6b5adf816ef4003b7440daeef8e7dc1ca29a
2019-11-22 13:57:40 -08:00
Raman Tenneti
baa06ee2cd Revert submission
Reason for revert: BUG: 145006573

Change-Id: I87f640383ab0fc4005ce31f938e81dcfa6572058
2019-11-22 21:07:49 +00:00
David Sehr
a3d4afe94d Merge "SELinux policy for system server JVMTI property" am: c0bb680fee
am: ddb207c7c0

Change-Id: I5283a4ee7941f366f46b8288b43860d45ba23f59
2019-11-22 10:46:50 -08:00
Ashwini Oruganti
c46a7bc759 Create a separate SELinux domain for gmscore
This change creates a gmscore_app domain for gmscore. The domain is
currently in permissive mode (for userdebug and eng builds), while we
observe the SELinux denials generated and update the gmscore_app rules
accordingly.

Bug: 142672293
Test: Flashed a device with this build and verified
com.google.android.gms runs in the gmscore_app domain. Tested different
flows on the Play Store app, e.g., create a new account, log in, update
an app, etc. and verified no new denials were generated.
Change-Id: Ie5cb2026f1427a21f25fde7e5bd00d82e859f9f3
2019-11-22 10:39:19 -08:00
Roshan Pius
d804a76d03 Revert "sepolicy: Permission changes for new wifi mainline module"
This reverts commit 3aa1c1725e.

Reason for revert: Wifi services no longer plan to be a separate
APK/process for mainline. Will instead become a jar loaded from Apex.

Bug: 144722612
Test: Device boots up & connects to wifi networks
Change-Id: Ifa33dae971dccfd5d14991727e2f27d2398fdc74
2019-11-22 09:49:32 -08:00
Roshan Pius
a483b5df72 Revert "wifi_stack: Move to network_stack process"
This reverts commit 1086c7d71d.

Reason for revert: Wifi services no longer plan to be a separate
APK/process for mainline. Will instead become a jar loaded from Apex.

Bug: 144722612
Test: Device boots up & connects to wifi networks
Change-Id: I69ccc6afbe15db88f516cdc64e13d8cfdb0c743c
2019-11-22 09:48:54 -08:00
Martijn Coenen
313cff7687 Allow vold to mount on top of /data/media.
For performance reasons, we want to bind-mount parts of the lower
filesystem on top of /data/media.

Bug: 137890172
Test: No denials when mounting
Change-Id: Ide8fc07cdeb6a6816585af1582bee69bc68043af
2019-11-22 16:02:07 +01:00
David Sehr
38f6e59bd6 SELinux policy for system server JVMTI property
Add the SELinux policy to implement a no-write persistent property
controlling whether to launch a JVMTI agent in the system server.

Bug: none
Test: none (other than the neverallow)
Change-Id: Ic70ee5b05c5507b4159ef4c825a360be47bc02b0
2019-11-21 15:50:37 -08:00
Nikita Ioffe
afa9a3034e Merge "Add selinux rules for userspace reboot related properties" am: a0bba66aac
am: dd0c37574b

Change-Id: Ibd5221289c2148b07616c592004b27857cec4c48
2019-11-20 05:19:47 -08:00
Nikita Ioffe
a0bba66aac Merge "Add selinux rules for userspace reboot related properties" 2019-11-20 13:04:16 +00:00
Terry Wang
26143a074b Merge "Add a new system service for app search management." am: a7795f5e77
am: be06865242

Change-Id: I44978742061d5176a24c92c69314bdaf28bf5c72
2019-11-19 16:07:21 -08:00
Orion Hodson
25c09758b0 Merge "Add property contexts for dex2oat cpu-set properties" am: abb7024a1e
am: 54578ef845

Change-Id: Ib4a46c8af6ba58cbeef0c33d4435521d7f36cd71
2019-11-19 15:27:42 -08:00
Terry Wang
a7795f5e77 Merge "Add a new system service for app search management." 2019-11-19 22:06:20 +00:00
Nikita Ioffe
7065e46b5d Add selinux rules for userspace reboot related properties
By default sys.init.userspace_reboot.* properties are internal to
/system partition. Only exception is
sys.init.userspace_reboot.in_progress which signals to all native
services (including vendor ones) that userspace reboot is happening,
hence it should be a system_public_prop.

Only init should be allowed to set userspace reboot related properties.

Bug: 135984674
Test: builds
Test: adb reboot userspace
Change-Id: Ibb04965be2d5bf6e81b34569aaaa1014ff61e0d3
2019-11-19 17:41:28 +00:00
Orion Hodson
abb7024a1e Merge "Add property contexts for dex2oat cpu-set properties" 2019-11-19 07:34:13 +00:00
Terry Wang
9a2296252f Add a new system service for app search management.
This change app-search-service to sepolicy system service.

Bug: 142567528
Test: Manual
Change-Id: Ife7b09365d667da0ad370e586af828f8f4423660
2019-11-18 16:06:58 -08:00
Tianjie Xu
cb198e1e7f Merge "Add a new context for property ota.warm_reset" am: a54c82a1fc
am: 07234a1ced

Change-Id: I4dd54c9350b0cd481f2f4d0772b6351ed9ce6f30
2019-11-18 15:43:15 -08:00
Tianjie Xu
a54c82a1fc Merge "Add a new context for property ota.warm_reset" 2019-11-18 23:15:43 +00:00
Ilya Matyukhin
f88a909596 Merge "Add AuthService to sepolicy" am: 517fee8781
am: d854f82473

Change-Id: I1ac9b9880b3facfbf771ca8cfdf539227dd63f7c
2019-11-18 14:03:17 -08:00
Ilya Matyukhin
517fee8781 Merge "Add AuthService to sepolicy" 2019-11-18 20:45:38 +00:00
Ilya Matyukhin
d2309dafcb Add AuthService to sepolicy
AuthService is introduced in ag/9700446.

Bug: 141025588
Test: can successfully publish AuthService with publishBinderService(...)
Change-Id: I0f9fceac0c555d05a29467e4ab1380f389b60af4
2019-11-16 02:24:30 +00:00
Mathieu Chartier
7e5e99fcf8 Revert "Remove ability to set profilebootimage and profilesystemserver"
The ability to set these properties is required by the
profilebootclasspath Android products.

Also fixed renamed property.

Bug: 139883463
Test: manually verified

This reverts commit 3079462443.

Change-Id: I7e8fceb974f34ea584799dd3e458279adee53e11
2019-11-15 13:20:25 -08:00
Neil Fuller
c0060d68cf Merge "Add new time zone detection service" am: e2aabe5012
am: d1a14b0f19

Change-Id: Ie97847b6d20183d098524579017970a287a7c0ab
2019-11-15 12:19:43 -08:00
Treehugger Robot
e2aabe5012 Merge "Add new time zone detection service" 2019-11-15 19:55:49 +00:00
Neil Fuller
dcda8d0bb7 Add new time zone detection service
Add entries necessary for the new time zone detection service.

Bug:140712361
Test: See related frameworks/base change
Change-Id: Ide4244104e2add843c1d699d528328dd71a6b525
2019-11-15 13:33:23 +00:00
Orion Hodson
7b2ee48cd2 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
Test: Run installd tests with new properties defined in target mk file.
Change-Id: Idcbb1332aa9c18f6082b827eae0334d063644a41
2019-11-15 13:18:18 +00:00
David Anderson
00b6e912f3 Merge "Allow recovery and fastbootd to interact with libfiemap." am: 899d721779
am: 5bf15403b3

Change-Id: I9f3bf579b2441668a0df17b18da2719ba9922b1a
2019-11-14 20:42:40 -08:00
Tianjie Xu
f5ddc0444b Add a new context for property ota.warm_reset
The property is set to inform kernel to do a warm_reset on the next
reboot. This is useful to persist the logs to debug device boot
failures. More details in http://go/rvc-ota-persist-logs.

The property is set to 1 by update_engine after an OTA. And it's set to
0 by update_verifier or vold after we mark the current slot boot
successful.
The property is read by vendor_init. And according to its value,
vendor_init writes a particular sysfs file to schedule a warm reset
on the following reboot.

Without the new context, the denial message says:
[   13.423163] audit: type=1107 audit(1746393.166:8): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc:  denied  { read } for property=ota.warm_reset pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0'
[   23.096497] init: Unable to set property 'OTA.warm_reset' from uid:0 gid:2001 pid:841: SELinux permission check failed
[   23.096574] type=1107 audit(1573768000.668:42): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=OTA.warm_reset pid=841 uid=0 gid=2001 scontext=u:r:update_verifier:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0'
[   23.108430] update_verifier: Failed to reset the warm reset flag

Bug: 143489994
Test: check the property can be set by update_engine, and read by vendor_init
Change-Id: I87c12a53a138b72ecfed3ab6a4d846c20f5a8484
2019-11-14 15:24:25 -08:00
David Anderson
b45bbe2e55 Allow recovery and fastbootd to interact with libfiemap.
In normal Android, libsnapshot interacts with libfiemap over binder (via
IGsid). There is no binder in recovery, so instead, we directly link to
the library and therefore need appropriate sepolicy changes.

Bug: 139154945
Test: no denials in recovery or fastbootd
Change-Id: I356d7b5b906ac198e6f32c4d0cdd206c97faeb84
2019-11-13 18:46:57 -08:00
Wenjie Zhou
2b166ca17b Merge "Enable incidentd access to ro.serialno" am: b438d4527a
am: 37c87d6f51

Change-Id: I82242c65514a39853f3d678b570015ad7e90037f
2019-11-08 17:15:17 -08:00
Wenjie Zhou
b438d4527a Merge "Enable incidentd access to ro.serialno" 2019-11-09 01:05:18 +00:00
Tri Vo
5f7f92be8c Merge "system_suspend access to suspend, wakeup stats" am: af9214d16a
am: 6ca1772af9

Change-Id: I9b8a82c9b55af8548e481ac6ae12d1011bec2da5
2019-11-08 14:35:47 -08:00
zhouwenjie
c8ae8fa616 Enable incidentd access to ro.serialno
incident report contains similar data as in a bugreport, but in proto
format. Currently ro.serialno is not captured due to selinux settings.

Test: adb shell incident -p LOCAL 1000
Bug: 143372261
Change-Id: I6a89308c1347fba2ce4f7b469f9a02b119d4aeb7
2019-11-08 14:09:52 -08:00
Tri Vo
af9214d16a Merge "system_suspend access to suspend, wakeup stats" 2019-11-08 21:58:33 +00:00
Suren Baghdasaryan
b0730cd136 Merge "allow init to communicate with lmkd and lmkd to kill native processes" am: 812f7da4dc
am: b7203825f2

Change-Id: I37ca584c2d94741bd7bd491e96576458316b7f79
2019-11-08 09:54:07 -08:00
Suren Baghdasaryan
812f7da4dc Merge "allow init to communicate with lmkd and lmkd to kill native processes" 2019-11-08 17:25:10 +00:00
Tri Vo
5f1ac02157 system_suspend access to suspend, wakeup stats
Android is moving away from debugfs. Information from /d/wakeup_sources
and /d/suspend_stats is now also exposed in sysfs under
/sys/class/wakeup/* and /sys/power/suspend_stats/* respectively:

  https://lkml.org/lkml/2019/7/31/1349
  https://lkml.org/lkml/2019/8/6/1275

Allow SystemSuspend to read those sysfs nodes.

One caveat is that /sys/class/wakeup/wakeupN can be a symlink to a
device-specific location. In this case, device sepolicy should label
that the files appropriately. This is similar to how device policy
applies "sysfs_net" and "sysfs_batteryinfo" labels.

Bug: 144095608
Bug: 129087298
Test: boot cuttlefish; system_suspend is able to read
/sys/power/suspend_stats/* and /sys/class/wakeup/*
Change-Id: I350c88a271c0f422d0557aeb5e05e1537dc97bc9
2019-11-07 13:50:32 -08:00
Eric Laurent
a64570c5bb Merge "audioserver: allow audioserver to generate audio HAL tombstones" am: 8751aa64d7
am: 13f4f2ddee

Change-Id: I3e64cf792b0dbbe4e48c4103367a9c684e5c499d
2019-11-07 10:55:08 -08:00
Sudheer Shanka
82d84402f6 Merge "Add a new system service "blob_store"." am: 426f2e77c0
am: 55f9229ec4

Change-Id: I192fc9fdc3660901d19fb5104f2ba6f9663bd88b
2019-11-07 10:32:20 -08:00
Eric Laurent
8751aa64d7 Merge "audioserver: allow audioserver to generate audio HAL tombstones" 2019-11-07 18:20:19 +00:00
Suren Baghdasaryan
ee57f177d8 allow init to communicate with lmkd and lmkd to kill native processes
init should register native services with lmkd so that they can be killed
when necessary. Allow init to communicate with lmkd over dedicated socket
the same way AMS does. Allow lmkd to kill and manipulate native processes
that were registered with lmkd.

Bug: 129011369
Test: boot and verify native service registration
Test: verify lmkd can kill registered native processes using lmkd_unit_test
Change-Id: Idfc814bd08115c548e97f11a6bdb006790cbb4ed
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-11-07 18:19:44 +00:00
Sudheer Shanka
426f2e77c0 Merge "Add a new system service "blob_store"." 2019-11-07 18:04:24 +00:00
Ram Muthiah
eefd3f436b Update kernel permissions to pass libdm snapshot unit test am: b46ef107f9
am: 1e26f6b72b

Change-Id: If3ad04d047cb4ae2a89afb0b27fa9e7daec6beda
2019-11-06 15:44:46 -08:00
Ram Muthiah
b46ef107f9 Update kernel permissions to pass libdm snapshot unit test
Bug: 143654050
Test: libdm_test
Change-Id: I671937b3f3144066bf3529e11ad19a73b0eb685e
2019-11-05 23:54:29 +00:00
Eric Laurent
685eab6ca2 audioserver: allow audioserver to generate audio HAL tombstones
Allow audioserver to signal audio HAL processes and
generate tombstones in case of watchdog restart.

Bug: 141528385
Test: Force watchdog and verify tombstone creation
Change-Id: I39bb4a63aa93efab68baad3890b8f49fc5f79ead
2019-11-04 18:05:28 -08:00
Yifan Hong
369d49b485 Merge "Allow charger to open health passthrough HAL" am: 242dbece51
am: 7143e1c106

Change-Id: I93043b78ac89ea7c40547300df5a697e06947cbc
2019-11-01 17:08:06 -07:00
Yifan Hong
242dbece51 Merge "Allow charger to open health passthrough HAL" 2019-11-01 23:46:31 +00:00
Steven Moreland
685d10c87f Merge "stable aidl vibrator policy" am: a71c74c188
am: 416aa29a30

Change-Id: Idf57558173f171f9cde4d9538614511b2bb30fcc
2019-11-01 14:47:22 -07:00
Steven Moreland
a71c74c188 Merge "stable aidl vibrator policy" 2019-11-01 21:09:52 +00:00
Tom Cherry
24eaeeac0e logpersist is now a shell script, so give it the appropriate permissions am: bf2f37325b
am: b314448fa9

Change-Id: Icba8c6805ae794df3d2bb5fecc38bba6581f14b6
2019-10-31 07:07:36 -07:00
Tom Cherry
bf2f37325b logpersist is now a shell script, so give it the appropriate permissions
Test: logcatd / logpersist work
Change-Id: Id283e24b0b48ddfa056ff842eecb51ee52b44c5e
2019-10-30 13:54:35 -07:00
Roshan Pius
b3ab6f59f1 Merge "sepolicy: Move wifi keystore HAL service to wificond" am: 8e9b37da04
am: 6ac2e87eb5

Change-Id: I7a0d3bf5eab7a17969a9100f20a9b911cc0294fc
2019-10-29 16:48:51 -07:00
Steven Moreland
d87649c645 stable aidl vibrator policy
Bug: 141828236
Test: boot, dumpsys -l
Change-Id: Id3fc8724238883116e840794309efbf6c91226c9
2019-10-29 16:39:55 -07:00
Roshan Pius
8e9b37da04 Merge "sepolicy: Move wifi keystore HAL service to wificond" 2019-10-29 23:09:12 +00:00
Sudheer Shanka
c9d3f222e7 Add a new system service "blob_store".
Bug: 143559646
Test: manual
Change-Id: Id13566e9efc815f4a6ebb7228a1145aa91d6d526
2019-10-29 15:34:11 -07:00
Paul Crowley
547221bc54 Merge "Replace "flags" property with "options" with same format as fstab" am: 6cbb3368df am: 6c8488686f
am: 88704fb3a1

Change-Id: I3ad8a3cba1142bbe02d2328a054cf1fa0cbc70b1
2019-10-28 21:15:16 -07:00
Paul Crowley
6cbb3368df Merge "Replace "flags" property with "options" with same format as fstab" 2019-10-29 02:00:36 +00:00
Adam Shih
99a7e22f7a Merge "allow vendor to minimize area of module_load" am: 9911bd8929 am: 64085f6f5c
am: 468e2874ec

Change-Id: I5f988c2c659de8d9afe29ffee61ce3e57dfd058f
2019-10-28 18:53:49 -07:00
Adam Shih
9911bd8929 Merge "allow vendor to minimize area of module_load" 2019-10-29 01:29:45 +00:00
Roshan Pius
31f511ae08 sepolicy: Move wifi keystore HAL service to wificond
Bug: 142969896
Test: Verified connecting to passpoint networks.
Change-Id: Iac72b13e24f45bbf834d698cfcfd0fe9177a80d3
Merged-In: Iac72b13e24f45bbf834d698cfcfd0fe9177a80d3
2019-10-28 14:06:17 -07:00
Adam Shih
712f0f3cac allow vendor to minimize area of module_load
Vendor can only do module load in vendor_file, which is a large area.
Changing vendor_file to vendor_file_type allows vendor to use different
labels and restrict it to smaller area.

Bug: 143338171
Change-Id: If8e0c088f2d49b7fbffff062dcae3b4084016b03
2019-10-28 09:26:48 +00:00
Paul Crowley
dddf492468 Replace "flags" property with "options" with same format as fstab
Bug: 143307095
Test: Set override, check policy is as expected with sm set-virtual-disk

Change-Id: I78b36295141db43ae3e910c654696d3e36a24734
2019-10-24 23:26:02 -07:00
Evgenii Stepanov
8443da5df2 Revert "Property contexts for ro.sanitize.*"
am: a235dde1cc

Change-Id: Ib5e996f37be9b02c4b1ccc2989cc971272da6543
2019-10-24 21:32:27 -07: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
Igor Murashkin
fb035ca15e Merge "sepolicy: Add iorap_prefetcherd rules"
am: 91e58ac87b

Change-Id: I0555da9b952836983cd55d0f8204437acfe8edf2
2019-10-23 11:10:37 -07:00
Treehugger Robot
91e58ac87b Merge "sepolicy: Add iorap_prefetcherd rules" 2019-10-23 17:46:42 +00:00
Steven Moreland
a756a73b3d Merge "Service context for servicemanager."
am: 3057643aef

Change-Id: I20b88ff67fe91b4ccb63bfee2173595ff4ab194c
2019-10-23 10:16:20 -07:00
Steven Moreland
3057643aef Merge "Service context for servicemanager." 2019-10-23 17:02:08 +00:00
Igor Murashkin
9f74a428c4 sepolicy: Add iorap_prefetcherd rules
/system/bin/iorapd fork+execs into /system/bin/iorap_prefetcherd during
startup

See also go/android-iorap-security for the design doc

Bug: 137403231
Change-Id: Ie8949c7927a98e0ab757bc46230c589b5a496360
2019-10-22 12:45:46 -07:00
Inseob Kim
6b8fdd3587 Merge "Fix BUILD_BROKEN documentation"
am: 037299c998

Change-Id: Ie6323b62b78b94313ad2b753613c8abaedbee801
2019-10-17 20:03:26 -07:00
Treehugger Robot
037299c998 Merge "Fix BUILD_BROKEN documentation" 2019-10-18 02:39:48 +00:00
Yifan Hong
e84ea187c1 Allow charger to open health passthrough HAL
Test: charger mode
Bug: 142286265

Change-Id: I75910cec415595ac9b503358ac4984ef478e44ad
2019-10-17 16:35:43 -07:00
Shafik Nassar
7dc75acdbd Merge "Add native flags namespace storage_native_boot"
am: 6ff3c39b1f

Change-Id: Ie423e7d184a1dc7eaf77a063ecfe84c392222d66
2019-10-17 09:14:03 -07:00
Shafik Nassar
6ff3c39b1f Merge "Add native flags namespace storage_native_boot" 2019-10-17 16:00:20 +00:00
Chiachang Wang
89094f5ee4 Merge "Add permission for NetworkStack updatability"
am: 336b68d68e

Change-Id: Id06682bad930233ea332c2ed7af5ccc555872893
2019-10-17 05:59:02 -07:00
Chiachang Wang
336b68d68e Merge "Add permission for NetworkStack updatability" 2019-10-17 12:34:42 +00:00
Inseob Kim
a6d5d515c9 Fix BUILD_BROKEN documentation
BoardConfig.mk should be the file on which BUILD_BROKEN_* is assigned.

Bug: 131162102
Test: N/A
Change-Id: I511dd72075d7c539503ab0b24d897cf3aff51b5b
2019-10-17 19:29:39 +09:00
Inseob Kim
acbf9cce3d Merge "Make public for exported properties on old devices"
am: fc7d6c1865

Change-Id: I0d24efb05ec642348bdddc994d1cc56dfca4add3
2019-10-17 01:49:56 -07:00
Treehugger Robot
fc7d6c1865 Merge "Make public for exported properties on old devices" 2019-10-17 08:37:40 +00:00
Jeff Vander Stoep
8ec6fca5d2 Merge "netlink_route_socket: add new nlmsg_readpriv perm"
am: b49018d29c

Change-Id: I794a9f4cded994a185d83ed90718ce75e0ae2eae
2019-10-17 01:15:06 -07:00
Treehugger Robot
b49018d29c Merge "netlink_route_socket: add new nlmsg_readpriv perm" 2019-10-17 07:27:21 +00:00
Inseob Kim
1f2b784403 Make public for exported properties on old devices
Properties which are already allowed to be written by vendor_init can't
be internal or restricted prop. This sets the properties as public
except for forbidden ones on vendor_init.te.

Bug: 131162102
Test: system/sepolicy/tools/build_policies.sh
Change-Id: Icc1e813e78a48856adee26fb20f01300713e1d30
2019-10-17 14:56:56 +09:00
Steven Moreland
48fbbbeae2 Service context for servicemanager.
Create a service context for manager itself and allow servicemanager to
register itself. This is so that tools like dumpsys can reference
servicemanager the same way they would reference other services.

That things can still get ahold of the servicemanager directly via
libbinder APIs since it is a context manager.

Bug: 136027762
Test: dumpsys -l
Change-Id: If3d7aa5d5284c82840ed1877b969572ce0561d2e
2019-10-16 16:31:42 -07:00
Orion Hodson
d0bca46b8d Merge "Reland "sepolicy: rework ashmem_device permissions""
am: b4d7815fe4

Change-Id: I1a336f45c45463a541701d9c45d71461b9d48697
2019-10-16 08:24:59 -07:00
Florian Mayer
7d03a6c615 Merge "Allow Java domains to be Perfetto producers."
am: ede8b7e39d

Change-Id: I3343286515322836de24dc2a08b344698ebc75e6
2019-10-16 08:24:28 -07:00
Jeff Vander Stoep
fb69c8e64f netlink_route_socket: add new nlmsg_readpriv perm
Used when mapping RTM_GETLINK messages to this new permission.

Users of netlink_route_sockets that do not use the net_domain()
macro will need to grant this permission as needed. Compatibility
with older vendor images is preserved by granting all vendor domains
access to this new permission in *.compat.cil files.

Bug: 141455849
Test: build (this change is a no-op without kernel changes)
Change-Id: I18f1c9fc958120a26b7b3bea004920d848ffb26e
2019-10-16 16:14:16 +02:00
Orion Hodson
b4d7815fe4 Merge "Reland "sepolicy: rework ashmem_device permissions"" 2019-10-16 12:56:59 +00:00
Florian Mayer
ede8b7e39d Merge "Allow Java domains to be Perfetto producers." 2019-10-16 12:37:09 +00:00
Gavin Corkery
15c1b4f94b Merge "Add label for persist.pm.mock-upgrade"
am: 59c02dc100

Change-Id: Ie663035b0e340a13b166dbfc044b849facdbfd89
2019-10-16 02:52:30 -07:00
Gavin Corkery
59c02dc100 Merge "Add label for persist.pm.mock-upgrade" 2019-10-16 09:39:10 +00:00
Ram Muthiah
589d2c1248 Merge "Revert "sepolicy: rework ashmem_device permissions""
am: dd8bc1b897

Change-Id: I024791f60a72b8ef2c54c08996ac2004135da286
2019-10-15 15:34:49 -07:00
Tri Vo
b554a950f4 Reland "sepolicy: rework ashmem_device permissions"
Only allow apps targetting < Q and ephemeral apps to open /dev/ashmem.
Ephemeral apps are not distinguishable based on target API. So allow
ephemeral_app to open /dev/ashmem for compatibility reasons.

For sake of simplicity, allow all domains /dev/ashmem permissions other
than "open". Reason being that once we can remove "open" access
everywhere, we can remove the device altogether along with  other
permission.

Bug: 134434505
Test: boot crosshatch; browse internet, take picture;
no ashmem_device denials

Change-Id: Ie2464c23d799550722580a21b4f6f344983b43ba
2019-10-15 22:27:28 +00:00
Ram Muthiah
dd8bc1b897 Merge "Revert "sepolicy: rework ashmem_device permissions"" 2019-10-15 22:14:55 +00:00
Orion Hodson
5527d706c7 Revert "sepolicy: rework ashmem_device permissions"
This reverts commit d9dcea570c.

Reason for revert: http://b/142742451

Change-Id: If46d6dcbb5df21bad8b6a8215d8c21c6b6733476
2019-10-15 21:16:06 +00:00
Inseob Kim
a7e339155e Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW"
am: dfc6975e5a

Change-Id: I7a971421a4d87a99b61e74b6b2ea6397831f57a1
2019-10-14 18:55:45 -07:00
Inseob Kim
dfc6975e5a Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW" 2019-10-15 01:29:06 +00:00
Inseob Kim
ed59c22ffc Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
A new sysprop neverallow rules are mandatory only for devices launching
with R or later. For devices already launched, neverallow rules can be
relaxed with adding following line to BoardConfig.mk:

BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true

Bug: 131162102
Test: Set PRODUCT_SHIPPING_API_LEVEL := 30 and try building with
changing some system_public_prop to system_internal_prop
Test: m cts sepolicy_tests

Change-Id: Id978b4d81a8683a57304bb639961105e2d91fa9a
Merged-In: Id978b4d81a8683a57304bb639961105e2d91fa9a
(cherry picked from commit 3be11e7abb)
2019-10-15 09:25:57 +09: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
Evgenii Stepanov
7b49c478c8 Merge "Property contexts for ro.sanitize.*"
am: 4d067e8bc7

Change-Id: I3e4c7ae4a785dc3654b8f161f6330d1236e82159
2019-10-14 15:00:49 -07:00
Evgenii Stepanov
4d067e8bc7 Merge "Property contexts for ro.sanitize.*" 2019-10-14 21:44:09 +00:00
Tri Vo
4d6e203124 sepolicy: rework ashmem_device permissions
am: d9dcea570c

Change-Id: I4dc8dc1eacdadebac31485a5786881dd41e80c88
2019-10-14 13:08:15 -07:00
Tri Vo
bb77532a38 Merge changes from topic "ashmem_sepolicy"
* changes:
  sepolicy: fix zygote JIT permissions w.r.t. ashmem
  sepolicy: rework ashmem_device permissions
2019-10-14 19:33:24 +00:00
Gavin Corkery
b2f34bfa5a Add label for persist.pm.mock-upgrade
This property is used for testing purposes when verifying the
behavior when an OTA occurs. It should be readable by the
system server, and be settable by the shell.

Test: Set property from shell, read with PackageManager
Bug: 140992644
Change-Id: I39ad9b7961208f02fa45011215c2ff5ac03b7380
2019-10-14 18:09:11 +01:00
Chiachang Wang
e063585bbf Add permission for NetworkStack updatability
NetworkStack will need to use netlink_tcpdiag_socket to get tcp
info. In order to support updatability for NetworkStack as it's
a mainline module, get the information from kernel directly to
reduce the dependecy with framework.

Test: Build and test if NetworkStack can get the tcp_info without
SEPolicy exception
Bug: 136162280

Change-Id: I8f584f27d5ece5e97090fb5fafe8c70c5cbbe123
2019-10-12 21:21:10 +09:00
Evgenii Stepanov
bc9e5f710e Property contexts for ro.sanitize.*
Bug: 142430632
Test: adb shell getprop ro.sanitize.hwaddress in hwasan build

Change-Id: I8e0fa0e6c865d18b94ffbdb6a0dddb1817adb364
2019-10-11 17:00:26 -07:00
Tao Bao
497cdfc183 Merge "Ignore the denial due to vendor_misc_writer reading DT fstab."
am: 41b4194982

Change-Id: I8057043199e00a279a4425bf98e3121e3ad8de46
2019-10-11 11:36:45 -07:00
Tao Bao
41b4194982 Merge "Ignore the denial due to vendor_misc_writer reading DT fstab." 2019-10-11 18:15:01 +00:00
Suren Baghdasaryan
19a44df5ef Merge "Allow vendor to configure new lmkd properties"
am: 2596545a86

Change-Id: I55a028cc5bb4083fe020688840c98c310e7de437
2019-10-11 07:47:09 -07:00
Tao Bao
68a88d4c5c Ignore the denial due to vendor_misc_writer reading DT fstab.
This CL addresses the following denial, when vendor_misc_writer tries to
read DT fstab (i.e. device tree fstab) for /misc entry.

avc: denied { search } for comm="misc_writer" name="android" dev="sysfs" ino=17456 scontext=u:r:vendor_misc_writer:s0 tcontext=u:object_r:sysfs_dt_firmware_android:s0 tclass=dir

DT fstab was used for devices shipped prior to Q, for early-mounting
partitions (e.g. /system, /vendor, /product), which has been disallowed
for Q launch devices. vendor_misc_writer is a new module added since Q,
so it doesn't need to worry about the legacy code path; in practice
there's no benefit of putting /misc entry into DT fstab either.

Bug: 134122603
Test: Build and flash taimen with the change that enables
      vendor_misc_writer. Check that it no longer gives the above denial
      during boot.
Change-Id: Id2fb206706f7cd19a4cde2701e4155bfc03f01b4
2019-10-10 22:17:53 -07:00
Suren Baghdasaryan
dc727308ed Allow vendor to configure new lmkd properties
Newly added ro.lmk.psi_partial_stall_ms, ro.lmk.psi_complete_stall_ms,
ro.lmk.thrashing_limit and ro.lmk.thrashing_limit_decay should be
configurable by vendors.

Bug: 132642304
Change-Id: Ifd3513c78e75d77be8d7c3594bef48ea27cc80b3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-10-10 10:11:24 -07:00
Florian Mayer
5e52281372 Allow Java domains to be Perfetto producers.
This is needed to get Java heap graphs.

Test: flash aosp; profile system_server with setenforce 1

Bug: 136210868

Change-Id: I87dffdf28d09e6ce5f706782422510c615521ab3
2019-10-10 10:40:26 +01:00
Harpreet \"Eli\" Sangha
0d6b2c6c28 Merge "vibrator: Allow Server-to-Client Callbacks"
am: 4eca6c49c8

Change-Id: I67259f7db24a623917171b790a03dc3ed8c2dddf
2019-10-08 18:54:01 -07:00
Treehugger Robot
4eca6c49c8 Merge "vibrator: Allow Server-to-Client Callbacks" 2019-10-09 01:21:23 +00:00
Minchan Kim
3df8036007 Merge "Allow dumpstate to access PSI statistics"
am: ceebbfaba2

Change-Id: Ie0431f1fb523ac12e288c6bfd0d783037a3713b2
2019-10-08 14:55:10 -07:00
Treehugger Robot
ceebbfaba2 Merge "Allow dumpstate to access PSI statistics" 2019-10-08 21:39:11 +00:00
Pete Bentley
26449951ab Merge "Make ro.boringcrypto.hwrand public readable, vendor init settable."
am: 21c0347803

Change-Id: I46cea2b9701ecf12d365ed71d2e38c77bb90ce16
2019-10-08 11:59:28 -07:00
Pete Bentley
21c0347803 Merge "Make ro.boringcrypto.hwrand public readable, vendor init settable." 2019-10-08 18:42:21 +00:00
Pete Bentley
aa3aee5f03 Make ro.boringcrypto.hwrand public readable, vendor init settable.
https://boringssl-review.googlesource.com/c/boringssl/+/38024 will
introduce a feature allowing vendors finer grained control over
BoringSSL's random source by setting a system property.

The property needs to be settable from vendor init and readable by all
processes on the device.

As BoringSSL will be in a mainline module, we need to provide a
non-source code way of allowing vendor customisations.

Bug: 142129238
Test: Observe property is settable from /vendor/default.prop and
      readable by non-root, non-vendor processes.

Change-Id: I4c20349f1b2ab2f51ac11ec552b99b1e15b14dd8
2019-10-08 16:42:48 +01:00
Harpreet \"Eli\" Sangha
4b3e0dd957 vibrator: Allow Server-to-Client Callbacks
Test: Manually
Change-Id: I475efc5a7fe4c95408a9c5d1f99feb8d73afd20a
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-10-08 11:45:52 +09:00
Tri Vo
d9dcea570c sepolicy: rework ashmem_device permissions
Only allow apps targetting < Q and ephemeral apps to open /dev/ashmem.
Ephemeral apps are not distinguishable based on target API. So allow
ephemeral_app to open /dev/ashmem for compatibility reasons.

For sake of simplicity, allow all domains /dev/ashmem permissions other
than "open". Reason being that once we can remove "open" access
everywhere, we can remove the device altogether along with  other
permission.

Bug: 134434505
Test: boot crosshatch; browse internet, take picture;
no ashmem_device denials
Change-Id: Ib4dddc47fcafb2697795538cdf055f305fa77799
2019-10-07 14:13:35 -07:00
Eric Biggers
6c8a49e1d4 Merge changes from topic "fscrypt-key-mgmt-improvements"
am: 0c8a90693a

Change-Id: I7b47cb2251dc2d8db8898b2d4bfe205b288e8558
2019-10-07 12:27:04 -07:00
Eric Biggers
7f8f4688dd Allow vold to use new ioctls to add/remove fscrypt keys
am: 36ae6631e3

Change-Id: I6c6977b2446e9e107b4d2afb6242fea9ade8be81
2019-10-07 12:26:58 -07:00
Eric Biggers
0c8a90693a Merge changes from topic "fscrypt-key-mgmt-improvements"
* changes:
  Export vold ro.crypto.volume.flags property
  Allow vold to use new ioctls to add/remove fscrypt keys
2019-10-07 19:09:44 +00:00
Bill Peckham
62b54c4f8e Merge "Moving recovery resources from /system to /vendor"
am: 0109fb24fc

Change-Id: I0edc114adac26c0c9c7fd2287246bb080fc6a466
2019-10-04 20:24:10 -07:00
Bill Peckham
d0dc1a057d Moving recovery resources from /system to /vendor
This change is part of a topic that moves the recovery resources from the
system partition to the vendor partition, if it exists, or the vendor directory
on the system partition otherwise. The recovery resources are moving from the
system image to the vendor partition so that a single system image may be used
with either an A/B or a non-A/B vendor image. The topic removes a delta in the
system image that prevented such reuse in the past.

The recovery resources that are moving are involved with updating the recovery
partition after an update. In a non-A/B configuration, the system boots from
the recovery partition, updates the other partitions (system, vendor, etc.)
Then, the next time the system boots normally, a script updates the recovery
partition (if necessary). This script, the executables it invokes, and the data
files that it uses were previously on the system partition. The resources that
are moving include the following.

* install-recovery.sh
* applypatch
* recovery-resource.dat (if present)
* recovery-from-boot.p (if present)

This change includes the sepolicy changes to move the recovery resources from
system to vendor. The big change is renaming install_recovery*.te to
vendor_install_recovery*.te to emphasize the move to vendor. Other changes
follow from that. The net result is that the application of the recovery patch
has the same permissions that it had when it lived in system.

Bug: 68319577
Test: Ensure that recovery partition is updated correctly.
Change-Id: If29cb22b2a7a5ce1b25d45ef8635e6cb81103327
2019-10-04 14:40:27 -07:00
shafik
55a54d3ff9 Add native flags namespace storage_native_boot
Grant SEPolicy write permissions for device_config_storage_native_boot.

Test: build and flash - device successfully boots
Bug: 140803239
Change-Id: I6e4f5889aee9384b47faacb31e2b1938250428ef
2019-10-04 11:05:48 +00:00
Tri Vo
c24e2c948e Merge "sepolicy: fix missing label on vendor_service_contexts"
am: f53c57287d

Change-Id: Icb60566c41dd480bd82c84023aab0790862ae8e7
2019-10-03 15:53:20 -07:00
Tri Vo
f53c57287d Merge "sepolicy: fix missing label on vendor_service_contexts" 2019-10-03 22:29:53 +00:00
Yifan Hong
c030cf0783 Merge changes Idfe99d40,I3cba28cc,Ibd53cacb
am: 8cbaad3e4c

Change-Id: If40031b0df402f251c563828ced9313e8bbeb616
2019-10-03 12:17:14 -07:00
Yifan Hong
8cbaad3e4c Merge changes Idfe99d40,I3cba28cc,Ibd53cacb
* changes:
  Add rules for snapshotctl
  dontaudit update_engine access to gsi_metadata_file.
  update_engine: rules to apply virtual A/B OTA
2019-10-03 18:58:07 +00:00
Roshan Pius
40230546d1 Merge "wifi_stack: Move to network_stack process"
am: 2a6c860a94

Change-Id: I9f80399527a7e24881f4cf4f094d251dfda66d34
2019-10-02 21:30:47 -07:00
Yifan Hong
a4b3e6f62a dontaudit update_engine access to gsi_metadata_file.
update_engine tries to determine the parent path for all devices (e.g.
/dev/block/by-name) by reading the default fstab and looking for the misc
device. ReadDefaultFstab() checks whether a GSI is running by checking
gsi_metadata_file. We never apply OTAs when GSI is running, so just deny
the access.

Test: no selinux denials
Fixes: 139283697

Change-Id: I3cba28ccb6871b328ab697a4a8f3476ac72f7bed
2019-10-02 12:46:47 -07:00
Yifan Hong
07a99e16e4 update_engine: rules to apply virtual A/B OTA
- /data/gsi/ota/* now has the type ota_image_data_file. At runtime
  during an OTA, update_engine uses libsnapshot to talk to gsid
  to create these images as a backing storage of snapshots. These
  "COW images" stores the changes update_engine has applied to
  the partitions.
  If the update is successful, these changes will be merged to the
  partitions, and these images will be teared down. If the update
  fails, these images will be deleted after rolling back to the
  previous slot.

- /metadata/gsi/ota/* now has the type ota_metadata_file. At runtime
  during an OTA, update_engine and gsid stores update states and
  information of the created snapshots there. At next boot, init
  reads these files to re-create the snapshots.

Beside these assignments, this CL also allows gsid and update_engine
to have the these permissions to do these operations.

Bug: 135752105
Test: apply OTA, no failure
Change-Id: Ibd53cacb6b4ee569c33cffbc18b1b801b62265de
2019-10-02 12:46:47 -07:00
Roshan Pius
1086c7d71d wifi_stack: Move to network_stack process
The wifi stack APK will run inside the network_stack process. So, move
the sepolicy rules for wifi stack inside the network stack rules.

Bug: 135691051
Test: Manual tests
- manual connect to wifi networks
- Remove networks
Test: Will send for ACTS wifi regression testing
Change-Id: I9d5da80852f22fa1d12b2dbbc76b9e06c1275310
(cherry-picked from b83abf7af3df64e0d3c1b22548f2344b55aece28)
2019-10-02 11:49:43 -07:00
Tri Vo
3e70db526e sepolicy: fix missing label on vendor_service_contexts
Vendors can publish services with servicemanager only on non-Treble
builds. vendor_service_contexts is not meant to be read by
servicemanager.

5bccbfefe4/public/servicemanager.te (22)

Bug: 141333155
Test: create /vendor/etc/selinux/vendor_service_contexts and make sure it is
correctly labeled.
Change-Id: Ib68c50e0cdb2c39f0857a10289bfa26fa11b1b3c
2019-10-01 15:23:27 -07:00
Minchan Kim
8dfe383b2a Allow dumpstate to access PSI statistics
dumpstate need to access /proc/pressure/{cpu,mem,io}

Bug: 141884936
Test: adb bugreport and check bugreport file includes PSI metric
Change-Id: I01e7376206c07c1700d6ffe3690d61a1db8dfe84
Signed-off-by: Minchan Kim <minchan@google.com>
2019-10-01 14:43:55 -07:00
Suren Baghdasaryan
106b148713 Merge "sepolicy: Allow lmkd access to vmstat file"
am: 5bccbfefe4

Change-Id: Ie929291631bbc833e2f1097b6247b8e4ea1941a1
2019-10-01 09:45:13 -07:00
Tri Vo
5e7b366c16 Merge "sepolicy: remove ashmemd"
am: b398dbb9ea

Change-Id: Iffeae17a6f216727f5d8a2aa16a989808e8bf125
2019-10-01 09:40:09 -07:00