Commit graph

854 commits

Author SHA1 Message Date
Ilya Matyukhin
897649d663 Merge "Add AuthService to sepolicy" am: 517fee8781 am: d854f82473
am: f88a909596

Change-Id: Ieca7cfa00f7d266536cec5f8b939fc6c4ebb847c
2019-11-18 14:12:09 -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
Neil Fuller
62cc0ac95c Merge "Add new time zone detection service" am: e2aabe5012 am: d1a14b0f19
am: c0060d68cf

Change-Id: If61a394582953066ea2b67cdf42add3dcdaa54da
2019-11-15 12:26:01 -08: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
Tri Vo
919a70fc0c Merge "system_suspend access to suspend, wakeup stats" am: af9214d16a am: 6ca1772af9
am: 5f7f92be8c

Change-Id: Ief88a1f4e26113491583745739c0f9abe49e7763
2019-11-08 14:40:31 -08: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
Sudheer Shanka
87c4b370b4 Merge "Add a new system service "blob_store"." am: 426f2e77c0 am: 55f9229ec4
am: 82d84402f6

Change-Id: I653c2604b40662ecf8ad8a06ff1d363b6c6fb7da
2019-11-07 10:40:00 -08:00
Sudheer Shanka
426f2e77c0 Merge "Add a new system service "blob_store"." 2019-11-07 18:04:24 +00:00
Steven Moreland
231958e28d Merge "stable aidl vibrator policy" am: a71c74c188 am: 416aa29a30
am: 685d10c87f

Change-Id: Icbdf813b1317d3cbdec4547f2d832432763bb222
2019-11-01 14:54:22 -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
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
Igor Murashkin
3b86eb0fc6 Merge "sepolicy: Add iorap_prefetcherd rules" am: 91e58ac87b am: fb035ca15e am: 43cfefea63
am: cf3914fca9

Change-Id: Ifdbf6d6d87558f9175dd25191c9ecb87cd259391
2019-10-23 12:02:28 -07:00
Steven Moreland
4e267b9629 Merge "Service context for servicemanager." am: 3057643aef am: a756a73b3d am: 216bbfa2fe
am: 9c90230245

Change-Id: I749ad521ba8b1c395ba8f63f25da1869c3cbdbc7
2019-10-23 10:49:26 -07:00
Treehugger Robot
91e58ac87b Merge "sepolicy: Add iorap_prefetcherd rules" 2019-10-23 17:46:42 +00: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
Shafik Nassar
c7b215411b Merge "Add native flags namespace storage_native_boot" am: 6ff3c39b1f am: 7dc75acdbd am: 9f5929c7e9
am: c6b761ed7a

Change-Id: Ief3a588603df7c198319e1a0142e65a6c0eedae2
2019-10-17 09:31:57 -07:00
Shafik Nassar
6ff3c39b1f Merge "Add native flags namespace storage_native_boot" 2019-10-17 16:00:20 +00:00
Jeff Vander Stoep
2f1f222716 Merge "netlink_route_socket: add new nlmsg_readpriv perm" am: b49018d29c am: 8ec6fca5d2 am: ff1d7c535b
am: aa88b57cf5

Change-Id: Id4e80375e4c5b599b10a6f432d7278d618bd9d2d
2019-10-17 01:38:17 -07: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
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
Gavin Corkery
aa887d1c50 Merge "Add label for persist.pm.mock-upgrade" am: 59c02dc100 am: 15c1b4f94b am: a0d892ebdc
am: 5d246260b1

Change-Id: I47ce32c387f6a038ae3043101959bce3ea2f8ea7
2019-10-16 03:12:45 -07:00
Gavin Corkery
59c02dc100 Merge "Add label for persist.pm.mock-upgrade" 2019-10-16 09:39:10 +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
Bill Peckham
05fd2e52b9 Merge "Moving recovery resources from /system to /vendor" am: 0109fb24fc am: 62b54c4f8e am: dcdb3ebbf0
am: 8ee0b85f2a

Change-Id: I2db7b19266d4c75367b8399e07cd4d9c33549fa3
2019-10-04 20:45:05 -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
Roshan Pius
3b0e6fdb83 Merge "wifi_stack: Move to network_stack process" am: 2a6c860a94 am: 40230546d1 am: 8645ca1b08
am: 45dd910236

Change-Id: Ide0223e0a7897426a1ee236a255c43ccee9494c7
2019-10-02 21:54:53 -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
Pierre-Hugues Husson
f81a678922 Merge "Mark mediacodec_2{6,7,8} as hal_omx_server" am: cc3f943436 am: 0608b6cdfb am: 95dbe16e99
am: 03f2bb6792

Change-Id: I80da7dd1e53602019a7caf22158c16a4cde27f13
2019-10-01 19:28:00 -07:00
Treehugger Robot
cc3f943436 Merge "Mark mediacodec_2{6,7,8} as hal_omx_server" 2019-10-02 01:50:32 +00:00
Pete Bentley
640b026a96 Merge "SEPolicy changes to allow vendor BoringSSL self test." am: 977b097fbf am: 916829611c am: f84fd9549b
am: f958188ede

Change-Id: I954d82f7dee0c9b3ce32ba6112c0945c26fae89f
2019-10-01 16:17:05 -07:00
Treehugger Robot
977b097fbf Merge "SEPolicy changes to allow vendor BoringSSL self test." 2019-10-01 22:38:19 +00:00
Pierre-Hugues Husson
1019870fba Mark mediacodec_2{6,7,8} as hal_omx_server
The commit 7baf725ea6 broke OMX on O/O-MR1(/P?) vendors.
Previous to this commit, all OMX codecs had to use "mediacodec" type,
after this commit, omx codecs just had to get hal_omx_server attribute.
This commit left to the vendor the charge of adding "hal_omx_server"
attribute to mediacodec.

However this can't work on non-Q vendors.

On P vendor, versioned_plat_pub contains the appdomain <=> mediacodec
allows, so OMX isn't technically broken on those devices.
But to ensure it won't break in the future, mark 28's mediacodec as
hal_omx_server as well

This fixes broken OMX decoding on O/O-MR1 vendors, failing with the
following denial:
avc: denied { call } for comm=4E444B204D65646961436F6465635F scontext=u:r:platform_app:s0:c512,c768 tcontext=u:r:mediacodec:s0 tclass=binder permissive=0

Bug: 141186440

Change-Id: I018f8d9aabc77e7ea86ca14734b1ab2edfdf8ed1
2019-10-01 20:48:01 +00:00
Tri Vo
a53cbc3e46 Merge "sepolicy: remove ashmemd" am: b398dbb9ea am: 5e7b366c16 am: 606fce3011
am: 78a5a2d4ad

Change-Id: I6220f15bc0f708a10bead4589e609bb020692f6f
2019-10-01 09:57:52 -07:00
Pete Bentley
90eb9b0e04 SEPolicy changes to allow vendor BoringSSL self test.
Introduces new domain vendor_boringssl_self_test and runs
/vendor/bin/boringssl_self_test(32|64) in it. New domain
required because boringssl_self_test needs to be in
coredomain in order to reboot the device, but vendor code
may not run in coredomain.

Bug: 141150335
Test: flashall && manually verify no selinux errors logged and that
    four flag files are created in /dev/boringssl, two by the
    system self tests and two by the vendor.

Change-Id: I46e2a5ea338eddacdfd089f696295dbd16795c5a
2019-10-01 14:14:36 +01:00
Tri Vo
bfcddbe25e sepolicy: remove ashmemd
Bug: 139855428
Test: m selinux_policy
Change-Id: I8d7f66b16be025f7cb9c5269fae6fd7540c2fdc9
2019-09-27 17:43:53 +00:00
Tri Vo
b23ec2efab Merge "sepolicy: ashmem entry point for libcutils" am: e612ecd6ed am: e570bf7ea4 am: 76333c6b08
am: 498c8fb53f

Change-Id: Ib3eb8d7f37bb94ec6363e6a77e2bdf04663300b0
2019-09-26 12:08:42 -07:00
Tri Vo
a7f61021b7 sepolicy: ashmem entry point for libcutils
This duplicated ashmem device is intended to replace ashmemd.

Ashmem fd has a label of the domain that opens it. Now with ashmemd
removed, ashmem fds can have labels other than "ashmemd", e.g.
"system_server". We add missing permissions to make ashmem fds usable.

Bug: 139855428
Test: boot device
Change-Id: Iec8352567f1e4f171f76db1272935eee59156954
2019-09-25 11:26:18 -07:00
Paul Crowley
c387c431f6 Merge "Root of /data belongs to init (re-landing)" am: 535d297a5f am: e38973665a am: 4eae854baf
am: edfba917f4

Change-Id: I81a595572ca0f1c4163913e4911c62da5d953983
2019-09-09 21:52:16 -07:00
Paul Crowley
aed0f76ee9 Root of /data belongs to init (re-landing)
Give /data itself a different label to its contents, to ensure that
only init creates files and directories there.

This change originally landed as aosp/1106014 and was reverted in
aosp/1116238 to fix b/140402208. aosp/1116298 fixes the underlying
problem, and with that we can re-land this change.

Bug: 139190159
Bug: 140402208
Test: aosp boots, logs look good
Change-Id: I1a366c577a0fff307ca366a6844231bcf8afe3bf
2019-09-09 14:42:01 -07:00
Tobias Thierer
a95a382f66 Merge "SEPolicy for boringssl_self_test." am: 02924043e3 am: 8b6e14f3c9 am: 444e8290c1
am: 96d9bacb4a

Change-Id: Icec8d7280ac24e6122de2f141023464590778f22
2019-09-07 17:32:53 -07:00
Tobias Thierer
02924043e3 Merge "SEPolicy for boringssl_self_test." 2019-09-07 23:46:00 +00:00
Paul Crowley
113798d5c8 Merge "Revert "Root of /data belongs to init"" am: 9aa263055b am: 881da26ad5 am: 080f736255
am: b2779012bf

Change-Id: I20462df554425a49ada80ab0de714376b85a7989
2019-09-06 17:09:06 -07:00
Treehugger Robot
9aa263055b Merge "Revert "Root of /data belongs to init"" 2019-09-06 23:13:48 +00:00
Paul Crowley
d98e311952 Revert "Root of /data belongs to init"
This reverts commit 206b6535f1.

Reason for revert: Droidfood is blocked
Bug: 140402208
Change-Id: I1d1eb014747ba5c5bb656342e53b8c4e434878d1
2019-09-06 19:59:17 +00:00
Martin Stjernholm
b0dc8b18a8 Merge "Rename the context for the ART APEX." am: 53f223346d am: d3455b0c7d am: e1ea1481ec am: 77c8abc7e7
am: fbc77ffdea

Change-Id: If5b3a235c71efeb24d82a7ddfd55322edc31190b
2019-09-06 08:29:06 -07:00
Martin Stjernholm
d7951d2647 Rename the context for the ART APEX.
Test: Boot (with default flattened APEXes)
Bug: 135753770
Change-Id: I551e88a250d3bd891f63a6bccee0682d0d0de7cf
2019-09-05 19:49:05 +01:00
Tobias Thierer
353ad0fd47 SEPolicy for boringssl_self_test.
This CL adds hand-written SELinux rules to:
 - define the boringssl_self_test security domain
 - label the corresponding files at type boringssl_self_test_marker
   and boringssl_self_test_exec.
 - define an automatic transition from init to boringssl_self_test
   domains, plus appropriate access permissions.

Bug: 137267623
Test: When run together with the other changes from draft CL topic
      http://aosp/q/topic:bug137267623_bsslselftest, check that:
      - both /dev/boringssl/selftest/* marker files are
        present after the device boots.
      - Test: after the boringssl_self_test{32,64} binaries have
        run, no further SELinux denials occur for processes
        trying to write the marker file.

Change-Id: I77de0bccdd8c1e22c354d8ea146e363f4af7e36f
2019-09-05 02:40:57 +01:00