Commit graph

6834 commits

Author SHA1 Message Date
Michael Ayoubi
880e0ee101 Merge "Change dck properties to int" 2021-05-27 00:35:30 +00:00
Andrew Walbran
04e6256c94 Merge "Rename VirtManager to VirtualizationService." 2021-05-26 21:43:54 +00:00
Michael Ayoubi
c14bc7ef3c Change dck properties to int
Change dck r2/r3 properties to wcc levels.

Bug: 186488185
Test: Confirm GMSCore access

Signed-off-by: Michael Ayoubi <mayoubi@google.com>
Change-Id: I9aab231d3e4bb7bd696e26652b9215d91d07b8b3
2021-05-26 15:04:02 +00:00
Jiyong Park
6645ad3b1f Add rules for microdroid_launcher
Microdroid_launcher is an executable in microdroid. It's role is to load
a shared library in an APK that is shared from the host Android and
execute it by calling an entry point (android_native_main) in it.

For now, it is executed from shell, but will eventually be executed from
a binder service (which also is running in microdroid) called
microdroid_manager.

Bug: 188513012
Test: atest MicrodroidHostTestCases
Change-Id: I150a958c1ed0e3e960f4b4b577e808e54e898644
2021-05-25 17:22:01 +09:00
Jiyong Park
cf1eb370d8 Allow zipfuse to mount /dev/vd* on /mnt/apk
zipfuse is a FUSE implementation that runs in microdroid. In the virtual
machine, it reads a block device (/dev/vd* via the symlink
/dev/block/by-name/microdroid-apk) whose content is read from an apk
in the host side. Then the makes the entries in the zip file (apk is
also a zip) as regular files in the virtual machine.

Note that the filesystem is mounted as default 'fuse:filesystem' because
it's mounted without the `fcontext` option, which is due to the libfuse
library we are importing from crosvm (b/188400186).

Bug: 188388851
Test: atest MicrodroidHostTestCases
Change-Id: Ide9bac88088535f4f335f2725fa929d23015e6e1
2021-05-25 14:10:55 +09:00
Michael Ayoubi
20af5f1e4e Merge "Add DCK eligibility properties" 2021-05-25 01:06:03 +00:00
Calin Juravle
11c6d45e7c Merge "Add SELinux context for pm.dexopt.cmdline property" 2021-05-24 15:06:35 +00:00
Michael Ayoubi
77c10eff1e Add DCK eligibility properties
Bug: 186488185
Test: Confirm GMSCore access
Change-Id: I20baf5c9ae9fbebc9e43d2798401ad49776fb74a
2021-05-21 23:31:09 +00:00
Calin Juravle
aca5d73453 Add SELinux context for pm.dexopt.cmdline property
Test: boot
Bug: 188655918
Change-Id: I4e5bd0e0c72adc76017f15c35df5c373fb2bf220
2021-05-21 14:48:14 +00:00
Andrew Walbran
4b80a3fc3d Rename VirtManager to VirtualizationService.
Bug: 188042280
Test: atest VirtualizationTestCases
Change-Id: Ia46a0dda923cb30382cbcba64aeb569685041d2b
2021-05-21 14:47:30 +00:00
Thiébaud Weksteen
a1be68e451 Merge "Add transfer permission to wait_for_keymaster" 2021-05-21 13:27:11 +00:00
Andrew Walbran
e6e25ba2f9 Merge "Set sepolicy for VirtualizationService data directory and mk_cdisk." 2021-05-21 09:33:31 +00:00
Thiébaud Weksteen
eb353bc228 Add transfer permission to wait_for_keymaster
Bug: 188809569
Test: m sepolicy
Change-Id: I79ead2fdf258f824ef9b0bf13c8179a6b819ccd7
2021-05-21 09:18:08 +02:00
Svet Ganov
365c57f338 Allow mediaserver/audioserver to access permission checker service
bug: 158792096

Test: atest CtsMediaTestCases
      atest CtsPermissionTestCases
      atest CtsPermission2TestCases
      atest CtsPermission3TestCases
      atest CtsPermission4TestCases

Change-Id: I392c87f0a85a09d891bceaaefeae1b3f9acff55a
2021-05-20 19:07:29 +00:00
Andrew Walbran
654c5b0ea8 Set sepolicy for VirtualizationService data directory and mk_cdisk.
Bug: 184131523
Test: atest VirtualizationTestCases
Test: flashed on VIM3L and ran microdroid manually
Change-Id: I6d1b69b63debf44431cd542a0ee85748fcc4191b
2021-05-20 15:00:49 +00:00
Hangyu Kuang
f7578e0b04 Merge "Allow mediaserver start transcoding service." 2021-05-18 06:13:17 +00:00
hkuang
de370e5161 Allow mediaserver start transcoding service.
Bug: 187271658
Test: atest MediaTranscodeManagerTest; unit tests
Change-Id: I847a83ec3e0d852266b7b0c624767e72d48b45d5
2021-05-17 13:52:38 -07:00
Christian Wailes
82ce869794 Merge "Added SELinux context for dalvik.vm.dexopt.thermal-cutoff property" 2021-05-17 16:15:40 +00:00
Bram Bonné
40bf1a6a70 Merge "Enforce RTM_GETLINK restrictions on all apps" 2021-05-17 13:28:28 +00:00
liuyg
04c85dcfc4 Revert "Allow the MediaProvider app to set FUSE passthrough property"
This reverts commit c1e2918fd9.

Reason for revert: Build broke

Change-Id: I4b95e977cf66c586b0d0b465f1b3654c01074152
2021-05-13 18:18:28 +00:00
Alessio Balsini
c1e2918fd9 Allow the MediaProvider app to set FUSE passthrough property
Allow the MediaProvider app to write the system property
fuse.passthrough.enabled in case FUSE passthrough is enabled.
The need for this additional system property is due to the ScopedStorage
CTS tests that are assuming FUSE passtrhough is always on for devices
supporting it, but there may be some cases (e.g., GSI mixed builds)
where this is not possible true and the feature is disabled at runtime,
thus causing the tests to fail.
This additional system property is only set when FUSE passthrough is
actually being used by the system.

Bug: 186635810
Test: CtsScopedStorageDeviceOnlyTest
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I623042d67399253a9167188c3748d93eb0f2d41f
2021-05-13 17:38:16 +00:00
Nikita Ioffe
4274f98522 Add neverallow rules around who can mount/unmount /apex
Test: m
Bug: 188002184
Change-Id: I8f46896edbee7b68df6f1e3008ff4141df164e4c
2021-05-13 13:05:58 +01:00
Chris Wailes
2e44672a75 Added SELinux context for dalvik.vm.dexopt.thermal-cutoff property
Test: Boot
Bug: 165935246
Change-Id: I266623fab1053ad1e058f041ccbe39880d74b768
2021-05-12 17:23:49 -07:00
Shawn Willden
4361ef2724 Merge "TEMP" 2021-05-11 22:53:43 +00:00
Max Bires
2189a1a447 TEMP
Have system server add keystore2 stacktraces for ANR reporting

Test: ANR something
Bug: 184006658
Change-Id: I75892479cb59a8ae79cb9555b731dce479175aff
2021-05-11 22:52:05 +00:00
JJ Lee
dcc9b45e3b Add ro.audio.offload_wakelock to audio_config_prop
Add ro.audio.offload_wakelock to audio_config_prop to allow
AudioFlinger to read this property.

Bug: 178789331
Test: build pass, property can be successfully set and read
Signed-off-by: JJ Lee <leejj@google.com>
Change-Id: I4650e03eb0a406b7531c08001adcfebe822bd75b
2021-05-10 14:36:15 +08:00
David Anderson
deef325f8f Merge "Allow fastbootd to mount /metadata in recovery." 2021-05-06 17:34:08 +00:00
Treehugger Robot
9395fb4b78 Merge "Add profile saver properties to selinux rules" 2021-05-06 16:01:15 +00:00
Nathalie Le Clair
ce32e9bcdb Merge "Add existing ro.hdmi sysprop to sepolicy" 2021-05-06 06:30:30 +00:00
Calin Juravle
4e3599e2f9 Add profile saver properties to selinux rules
Test: manual

Bug: 184714236
Bug: 185979271
Change-Id: I5135e182ba26150cd917ded72d2af72c1c5b15a1
2021-05-05 17:12:22 -07:00
David Anderson
018004d9d1 Allow fastbootd to mount /metadata in recovery.
It is important that fastbootd is able to mount /metadata in recovery, in
order to check whether Virtual A/B snapshots are present. This is
enabled on userdebug builds, but currently fails on user builds.

Fixes:

        audit: type=1400 audit(7258310.023:24): avc:  denied  { mount } for pid=511 comm="fastbootd" name="/" dev="sda15" ino=2 scontext=u:r:fastbootd:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=0

Bug: 181097763
Test: fastboot flash on user build
Change-Id: I1abeeaa3109e08755a1ba44623a46b12d9bfdedc
2021-05-05 16:37:56 -07:00
Hridya Valsaraju
b99176333a Merge "Allow multiple heaps to use the system-secure vendor heap category" 2021-05-05 20:10:50 +00:00
Hridya Valsaraju
f35c70b0dd Merge changes If26ba23d,Ibea38822
* changes:
  Revert "Revert "Exclude vendor_modprobe from debugfs neverallow restrictions""
  Revert "Revert "Add neverallows for debugfs access""
2021-05-05 17:31:35 +00:00
Eric Biggers
740f9b72fa Merge "Allow dumpstate to signal keystore to dump its stack" 2021-05-05 16:16:15 +00:00
Nathalie Le Clair
f696109b23 Add existing ro.hdmi sysprop to sepolicy
Bug: 186998799
Test: make
Change-Id: If99e3c029b992cea5b4af1b4f062d3b19e601df9
2021-05-05 09:06:09 +02:00
Songchun Fan
633f7ca868 [sepolicy] allow system server to read incfs metrics from sysfs
Address denial messages like:

05-05 05:02:21.480  1597  1597 W Binder:1597_12: type=1400 audit(0.0:140): avc: denied { read } for name="reads_delayed_min" dev="sysfs" ino=107358 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

BUG: 184844615
Test: atest android.cts.statsdatom.incremental.AppErrorAtomTests#testAppCrashOnIncremental
Change-Id: I201e27e48a08f99f41a030e06c6f22518294e056
2021-05-04 22:56:41 -07:00
Hridya Valsaraju
498318cc65 Revert "Revert "Exclude vendor_modprobe from debugfs neverallow restrictions""
This reverts commit 231c04b2b9.

Now that b/186727553 is fixed, it should be safe to revert this revert.

Test: build
Bug: 184381659
Change-Id: If26ba23df19e9854a121bbcf10a027c738006515
2021-05-04 22:07:08 -07:00
Hridya Valsaraju
23f9f51fcd Revert "Revert "Add neverallows for debugfs access""
This reverts commit e95e0ec0a5.

Now that b/186727553 is fixed, it should be safe to revert this revert.

Test: build
Bug: 184381659
Change-Id: Ibea3882296db880f5cafe4f9efa36d79a183c8a1
2021-05-04 22:06:46 -07:00
Eric Biggers
f9519a6d3f Allow dumpstate to signal keystore to dump its stack
This is needed to debug hangs in keystore2.

Restricted to debuggable builds for now.

Bug: 186879912
Test: 'adb bugreport', then find the stack traces for keystore2 in the
      "VM TRACES JUST NOW" section of the main bugreport file.
Change-Id: I4434cab7e79cb4aae8bbb2e3a8abff02e0073c13
2021-05-04 21:09:35 -07:00
Lalit Maganti
6c03124c3c Merge "sepolicy: allow traced_probes to access statsd socket" 2021-05-04 19:04:45 +00:00
Treehugger Robot
22c7415dbf Merge "Revert "Revert "Add a neverallow for debugfs mounting""" 2021-05-04 16:58:40 +00:00
Alex Hong
ec6d12f2bf Label the odm_dlkm properties in "odm_dlkm/etc/build.prop"
Test: make selinux_policy
Bug: 185920634
Change-Id: I09eec15a8a2e2b2f64075f148b414bf89f8ebcd6
2021-05-04 16:06:50 +08:00
Hridya Valsaraju
15f0f9234c Give mediatranscoding access to the DMA-BUF system heap
Fixes the following denials:

avc: denied { getattr } for path="/dev/dma_heap/system" dev="tmpfs"
ino=534 scontext=u:r:mediatranscoding:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=0

Bug: 185867872
Test: No more DMA-BUF heap related denials from
CtsMediaTranscodingTestCases

Change-Id: I45b57b45e0db996f08b82618dcd085ba0f7e6ef6
2021-05-03 16:49:16 -07:00
Hridya Valsaraju
a2a2d9cbbd Add missing permissions for Cuttlefish to support GSI testing
Once b/186727553 is fixed, booting GSI on cuttlefish will no longer load
cuttlefish's system_ext sepolicy. These domains are all private and
hence the permissions are being added to system/sepolicy to avoid
making them public(especially mediatranscoding that was changed from
public to private in Android S).

Test: build, boot
Change-Id: I4a78030015fff147545bb627c9e62afbd0daa9d7
2021-05-03 16:49:07 -07:00
Hridya Valsaraju
a885dd84c7 Revert "Revert "Add a neverallow for debugfs mounting""
This reverts commit f9dbb72654.
Issues with GSI testing fixed with
https://android-review.googlesource.com/c/platform/build/+/1686425/

Bug: 184381659
Test: manual
Change-Id: Icd07430c606e294dfaad2fc9b37d34e3dae8cbfc
2021-05-02 21:41:53 -07:00
Shawn Willden
bdc4f744da Merge "Allowing userdebug/eng builds crash dump access to ks" 2021-04-30 22:19:04 +00:00
Max Bires
f09391624a Allowing userdebug/eng builds crash dump access to ks
This will make debugging of keystore issues in dogfood populations much
easier than it previously was, as developers will have detailed crash
dump reporting on any issues that do occur.

Bug: 186868271
Bug: 184006658
Test: crash dumps appear if keystore2 explodes
Change-Id: Ifb36cbf96eb063c9290905178b2fdc5934050b99
2021-04-30 18:50:54 +00:00
Songchun Fan
979a1f8f34 [sepolicy] allow system_server to ioctl INCFS_IOC_GET_LAST_READ_ERROR
Solves the denial message like:

04-30 03:54:46.972 21944 21944 I Binder:21944_17: type=1400 audit(0.0:502): avc: denied { ioctl } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F6170705F766D646C3133352F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 ioctlcmd=0x6727 scontext=u:r:system_server:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1

BUG: 184844615
Test: manual
Change-Id: I3ef32613de348bca1d58cddf4ec1296d4828b51a
2021-04-30 16:46:06 +00:00
Orion Hodson
86e3ac05e6 Merge "app_zygote.te: allow reading and searching the ART module dalvik-cache" 2021-04-30 14:22:10 +00:00
Bram Bonné
a4433b4397 Enforce RTM_GETLINK restrictions on all apps
Extend existing restrictions targeting only apps with API level >= 30 to
all apps.

To be merged when automerge to sc-dev ends.

Bug: 170188668
Test: atest bionic-unit-tests-static
Test: atest NetworkInterfaceTest
Test: Connect to Wi-Fi network
Test: atest CtsSelinuxTargetSdk27TestCases
Test: atest CtsSelinuxTargetSdk28TestCases
Test: atest CtsSelinuxTargetSdk29TestCases
Test: atest CtsSelinuxTargetSdkCurrentTestCases
Change-Id: Ibd6b9f1e23f12320f3bec782cdd7a6837013597a
2021-04-30 15:48:09 +02:00