Commit graph

21532 commits

Author SHA1 Message Date
Florian Mayer
ede8b7e39d Merge "Allow Java domains to be Perfetto producers." 2019-10-16 12:37:09 +00:00
Gavin Corkery
59c02dc100 Merge "Add label for persist.pm.mock-upgrade" 2019-10-16 09:39:10 +00:00
Jeffrey Vander Stoep
dc560e0921 Merge "untrusted_app_25: remove access to net.dns properties" 2019-10-16 08:57:57 +00:00
Inseob Kim
eb1144f296 Merge "Fix treble sysprop neverallow rules on system_ext" 2019-10-16 07:43:33 +00:00
Treehugger Robot
f0a9150deb Merge "file_contexts: Include legacy /system/vendor paths" 2019-10-16 06:53:13 +00:00
Inseob Kim
e2ef86fc9e Fix treble sysprop neverallow rules on system_ext
Bug: 131162102
Bug: 142684203
Test: m sepolicy_tests
Change-Id: Ib21adee404a1ee7d57bc9ff54f3ae1831cdf3b81
2019-10-16 14:14:12 +09:00
Henry Fang
b3f755fbb4 Merge "Update sepolicy to support cas@1.2" 2019-10-16 02:00:38 +00:00
Ram Muthiah
dd8bc1b897 Merge "Revert "sepolicy: rework ashmem_device permissions"" 2019-10-15 22:14:55 +00:00
Ram Muthiah
f2d5dad65c Merge "Revert "sepolicy: fix zygote JIT permissions w.r.t. ashmem"" 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
Orion Hodson
09d9076513 Revert "sepolicy: fix zygote JIT permissions w.r.t. ashmem"
This reverts commit 7120b72a9b.

Reason for revert: http://b/142742451

Change-Id: Ib857e0a56a83c0466b92f944421e3bd11c9279b4
2019-10-15 21:15:44 +00:00
Jeff Vander Stoep
28903d9829 untrusted_app_25: remove access to net.dns properties
Bug: 33308258
Test: build
Test: atest CtsSelinuxTargetSdk25TestCases
Change-Id: I0bd3dc60dd95e9fb621933f45115a42bbcbc2ccc
2019-10-15 21:17:29 +02:00
Tri Vo
0ba37c9e81 Merge "bug_map: track mediaswcodec ashmem denial" 2019-10-15 17:08:43 +00:00
Tri Vo
145130670f bug_map: track mediaswcodec ashmem denial
Bug: 142679232
Test: n/a
Change-Id: Ie6a8e65ad175e2c2ab444381d3b05d0191cc0302
2019-10-15 09:57:55 -07:00
Inseob Kim
dfc6975e5a Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW" 2019-10-15 01:29:06 +00:00
Henry Fang
b418dd991a Update sepolicy to support cas@1.2
Test: Manual
bug: 141783130
Change-Id: I973cb5d59d74c495eea18f4865baf0bd6f55e2fb
2019-10-14 17:37:17 -07: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
4d067e8bc7 Merge "Property contexts for ro.sanitize.*" 2019-10-14 21:44:09 +00: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
Treehugger Robot
e1aa506b0d Merge "overlayfs: deflake presubmit tests" 2019-10-14 10:52:53 +00:00
Jeff Vander Stoep
ee036a9fc4 overlayfs: deflake presubmit tests
Bug: 142390309
Test: build
Change-Id: Ibf12d5acba39436cf79b7eb3a1fbadb2296b68c4
2019-10-14 11:20:50 +02: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
41b4194982 Merge "Ignore the denial due to vendor_misc_writer reading DT fstab." 2019-10-11 18:15:01 +00:00
Suren Baghdasaryan
2596545a86 Merge "Allow vendor to configure new lmkd properties" 2019-10-11 14:30:46 +00: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
David Anderson
0fb0781fb6 Merge "Add sepolicy for IBootControl 1.1 and the default HAL." 2019-10-10 19:19:49 +00: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
Treehugger Robot
1ba6df36a9 Merge "Fix file_contexts for flattened apexes" 2019-10-10 08:41:52 +00:00
Jooyung Han
e2c256cadb Fix file_contexts for flattened apexes
APEX modules can be configured with apex_name and file_contexts
properties.
- apex_name overrides the activation point
  for example, if apex_name is 'foo', it will be flattened under
  /system/apex/foo even if its name is 'bar'.
- file_contexts overrides file_contexts filename
  for example, it file_contexts is 'foo',
  /system/sepolicy/apex/foo-file_contexts should be used even if its
  name is 'bar'.

Previously, file_contexts files for flattened apexes are assumed to have
names like "/system/sepolicy/apex/<apex_name>-file_contexts". But, as
described above, calculating <apex_name> from file entries might be
wrong

Now, it relies on Soong's makevar APEX_FILE_CONTEXTS_INFOS which is list of
<apex_name>:<file_contexts> pairs.

Bug: 123314817
Bug: 142300241
Test: add apex module(foo) with apex_name:bar and file_contexts:baz
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m file_contexts.bin
Test: check intermediate files for file_contexts
Change-Id: I3793c0f01469baaa0ddb1965093a56304a10e99c
2019-10-10 12:51:43 +09:00
Treehugger Robot
4eca6c49c8 Merge "vibrator: Allow Server-to-Client Callbacks" 2019-10-09 01:21:23 +00:00
Treehugger Robot
ceebbfaba2 Merge "Allow dumpstate to access PSI statistics" 2019-10-08 21:39:11 +00:00
David Anderson
549e3c6d91 Add sepolicy for IBootControl 1.1 and the default HAL.
Bug: 138861550
Test: manual test
Change-Id: Ibc9a55266a2726cb8dc8550be0264db30b66109e
2019-10-08 14:24:38 -07:00
Pete Bentley
21c0347803 Merge "Make ro.boringcrypto.hwrand public readable, vendor init settable." 2019-10-08 18:42:21 +00:00
Tri Vo
7120b72a9b sepolicy: fix zygote JIT permissions w.r.t. ashmem
zygote now allocates JIT memory using libcutils API (aosp/1135101)
instead of going to /dev/ashmem directly, which requires execute
permissions to ashmem_libcutils_device.

Bug: 134434505
Test: boot crosshatch
Change-Id: I0a54d64bd4656fafd2f03701d7828cfa94c08f04
2019-10-08 11:31:46 -07: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
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
Ashwini Oruganti
8491445d63 Merge "Show bug_map links on user builds" 2019-10-07 16:37:35 +00:00
Bill Peckham
0109fb24fc Merge "Moving recovery resources from /system to /vendor" 2019-10-05 03:14:12 +00: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
Ashwini Oruganti
76beaface5 Show bug_map links on user builds
Android.mk now includes the SELinux denial metadata on user builds.

Bug: 141695494
Test: Generated a tracked denial on a user build and verified that the
bug number shows up in the logs.

Change-Id: I908c08e0d6542fa248d7c798c20a66027f39c390
2019-10-04 10:28:56 -07:00
Bowgo Tsai
7c4150c5d2 Allowing product sepolicy to be empty
Some targets just need to extend product context files, e.g.,
file_contexts, service_contexts, etc., without adding any
product-specific policy files, e.g., *.te files. Or just need to
add private product sepolicy without adding public product sepolicy.

Currently, this will lead to build errors. This CL allows
product_sepolicy.cil and the product mapping file to be empty.

It's now also possible to just set PRODUCT_PRIVATE_POLICY
without setting PRODUCT_PUBLIC_POLICY.

Bug: 131193755
Test: Only adds product private sepolicy, then `mmma system/sepolicy`
Change-Id: Ifed5af7413b2a1e20a0628518582615708c8c31a
2019-10-04 08:27:58 +00:00
Bowgo Tsai
ac3812518c Allowing system_ext sepolicy to be empty
Some targets just need to extend system_ext context files, e.g.,
file_contexts, service_contexts, etc., without adding any system_ext
policy files, e.g., *.te files.

Currently, this will lead to build errors. This CL allows
system_ext_sepolicy.cil and the system_ext mapping file
to be empty.

It's now also possible to just set BOARD_PLAT_PRIVATE_SEPOLICY_DIR
without setting BOARD_PLAT_PUBLIC_SEPOLICY_DIR.

Bug: 137712473
Bug: 141880898
Test: Only adds system_ext context files without policy files (e.g., *.te),
      then `mmma system/sepolicy` can build pass
Change-Id: I72849f2d4aa43e5296cd15c07a8fd058186a6376
2019-10-04 08:27:39 +00:00
Tri Vo
f53c57287d Merge "sepolicy: fix missing label on vendor_service_contexts" 2019-10-03 22:29:53 +00:00
Colin Cross
3f1999778c Merge "Follow introduction of InstallPath and InstallInRoot" 2019-10-03 21:50:56 +00:00
Felix
e6a3c9929b file_contexts: Include legacy /system/vendor paths
Probably flew under the radar because Google only tests on devices that
include devices with a physical /vendor partition.

Test: "make selinux_policy", confirm correct labels on a legacy device

Change-Id: I1aa856c6e3774912d1f4c0a09bbc2d174016f59d
Signed-off-by: Felix <google@ix5.org>
2019-10-03 22:34:19 +02:00
Tri Vo
e10ff1e709 Merge "sepolicy: allow zygote to use ashmem fds" 2019-10-03 19:43:48 +00:00