Commit graph

16067 commits

Author SHA1 Message Date
Jiyong Park
90b21ee4b4 init is a dynamic executable
init is now a dynamic executable. So it has to be able to execute the
dynamic linker (/system/bin/linker) and shared libraries (e.g.,
/system/lib/libc.so). Furthermore, when in recovery mode, the files are
all labeled as rootfs - because the recovery ramdisk does not support
xattr, so files of type rootfs is allowed to be executed.

Do the same for kernel and ueventd because they are executing the init
executable.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Change-Id: Ic6225bb8e129a00771e1455e259ff28241b70396
2018-06-14 01:56:36 +09:00
padarshr
44ae7c2ccb Add ueventd to mnt_vendor_file neverallow exemption list
Legacy hardware and code still depends on the ueventd helpers to
locate the firmware supported files which are on new mount path
labeled with mnt_vendot_file. For ueventd helper to work we need dir search
and read permission on this new label so moving ueventd to exempted list.

Already ueventd has the vendor_file_type read access.

Bug:110083808

Change-Id: Ia15cc39ecef9e29b4f1f684efdddbeb78b427988
2018-06-13 17:20:34 +05:30
Mark Salyzyn
6b2715cc0d Merge "persist.sys.boot.reason is cleared once read by bootstat"
am: 752bde548f

Change-Id: Ifbd311d8425fcd9caffe61c41400fbbfedb356c7
2018-06-12 14:10:01 -07:00
Treehugger Robot
752bde548f Merge "persist.sys.boot.reason is cleared once read by bootstat" 2018-06-12 19:19:57 +00:00
Steven Moreland
c31109b8bd Make hal_allocator use hal_attribute_hwservice.
am: 9099638815

Change-Id: I8a7bc7088823a3fe0f5f2f9768d95510cab45293
2018-06-11 20:50:26 -07:00
Steven Moreland
9099638815 Make hal_allocator use hal_attribute_hwservice.
If you can get or serve the hal allocator interface,
you should be a hal_allocator_client or
hal_allocator_server.

Bug: 80319537
Test: boot aosp_walleye and (sanity) take photos
Change-Id: Iea14c67c4aa56df7a74ebdb17e99b78b1d3aa105
2018-06-11 14:44:12 -07:00
Neil Fuller
60d79e487b Allow telephony to call system service
The timedetector_service will be called from the
telephony process

Bug: 78217059
Test: build / local testing with a client
Change-Id: I25dfa4daabaa80e6b5e697ad1b1e2f7f72377702
2018-06-11 21:27:17 +01:00
Mark Salyzyn
a1bce77973 persist.sys.boot.reason is cleared once read by bootstat
To ensure a surprise reboot does not take the last boot reason on
face value especially if coming from more than one boot sessions ago.
We shift and clear the value from persist.sys.boot.reason to
sys.boot.reason.last and establish a correct last reboot reason in
the canonical sys.boot.reason property.  As a result, the power
manager should read the canonical sys.boot.reason for a definitive
result rather than relying on the possibly incorrect values in the
persistent storage.  sys.boot.reason should be a core property as
it represents the canonical boot reason API.

Test: compile
Bug: 86671991
Bug: 63736262
Change-Id: If3742c487d6c0ab69c464f056bf48c786b66a945
2018-06-11 09:30:25 -07:00
Xin Li
9e1bcf3107 Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Bug: 79597307
Change-Id: Id75dd160e87f283c9d3efc8878c2c464397edc39
2018-06-08 11:09:27 -07:00
Jiyong Park
bacf36480d adbd is allowed to execute shell in recovery mode
The shell is now available directly in the recovery ramdisk. We no
longer need to mount system.img to /system as the recovery ramdisk is
self-contained. However, there is a problem that every file in the
ramdisk is labeled as rootfs because the ramdisk does not support xattr.

This CL adds several recovery-only rules that are required to make the
recovery ramdisk self-contained. Most importantly, adbd is allowed to
domain_trans to shell. Also shell is allowe to execute files of type
rootfs. Finally, the recovery is allowed to mount on tmpfs since it now
mounts system.img to /mnt/system.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: `adb root && adb shell` and then
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: If21b069aee63541344a5ca8939fb9a46ffef4d3e
2018-06-09 02:23:10 +09:00
Neil Fuller
4a77ea5eb3 Merge "Remove references to common_time / commontime" am: 44b86a3e5e
am: 304857d8be

Change-Id: I9d93260c280e8981a051bc4651a4a4942288acfe
2018-06-07 13:18:23 -07:00
Neil Fuller
304857d8be Merge "Remove references to common_time / commontime"
am: 44b86a3e5e

Change-Id: I37d4b227e898d5989e7c2eab7ef06d0b629066ca
2018-06-07 09:53:01 -07:00
Neil Fuller
44b86a3e5e Merge "Remove references to common_time / commontime" 2018-06-07 15:50:06 +00:00
Steven Moreland
150268e531 Merge "Make hal_configstore consistent." am: a74708966a
am: a4748147d1

Change-Id: I9a371e468c27b2493eee268827b601281e4608a1
2018-06-07 08:23:03 -07:00
Steven Moreland
a4748147d1 Merge "Make hal_configstore consistent."
am: a74708966a

Change-Id: I2903e9407ee1ee0230e4f2da3a902e58701a41f8
2018-06-07 08:18:05 -07:00
Steven Moreland
a74708966a Merge "Make hal_configstore consistent." 2018-06-07 15:10:22 +00:00
Jiyong Park
850c81311c [automerger skipped] Merge "add extended_core_property_type" am: 7d63911ace
am: 19d59696ff  -s ours

Change-Id: Ifb814c8866b5a09778095f57f1edabd3c8d0a1b6
2018-06-07 00:21:58 -07:00
Jiyong Park
19d59696ff Merge "add extended_core_property_type"
am: 7d63911ace

Change-Id: I3b08c8b272945202503d0e242d06c48bb27ac02b
2018-06-07 00:00:41 -07:00
Treehugger Robot
7d63911ace Merge "add extended_core_property_type" 2018-06-07 06:08:48 +00:00
Tri Vo
972e06de59 Mechanism to exclude neverallows from *TS. am: 77c44fc420
am: 66e7d2b063

Change-Id: Idd27b85bc97a79ff434412cbbeee74082907553d
2018-06-06 20:46:43 -07:00
Tri Vo
66e7d2b063 Mechanism to exclude neverallows from *TS.
am: 77c44fc420

Change-Id: Ibb9186cf7476e6b55de760105ea23a569ffbb580
2018-06-06 17:12:07 -07:00
Tri Vo
77c44fc420 Mechanism to exclude neverallows from *TS.
build_test_only is used to denote rules that should not verified
as part of compliance testing.

Use this macro to exclude neverallow rules which we want to check as
part of build, but not CTS.

Bug: 80499271
Test: SELinuxNeverallowRulesTest on walleye has no more failure of type
"Type or attribute * used in neverallow undefined in policy being checked."
Number of failing test cases is reduced by 142.
Test: policy.conf used to check neverallows at build-time still retains
all neverallow rules.
Change-Id: I5f1b383d9096bb5a7b8c0f1bc008b5dd07419580
2018-06-06 14:51:39 -07:00
Steven Moreland
fdc9f48414 Merge changes from topic "b80319537" am: 0578a39451
am: 337c0969f0

Change-Id: I7d20e245851c049db4217b762acd8b6c71fbfe8c
2018-06-06 13:15:28 -07:00
Jeff Vander Stoep
d1f07835a7 Merge "Deprivilege haiku" am: 59f8e75a5d
am: b204ad930c

Change-Id: I23dd498f88e5d4fbff520defeef5baf7329e9ea4
2018-06-06 13:15:09 -07:00
Steven Moreland
ac88cb6101 Make hal_configstore consistent.
Previously, supposedly, each individual client of configstore
was supposed to add the add_hwservice attribute itself to get
ahold of the specific sub-interface of configstore relevant to
it. However, there is only one configstore interface,
ISurfaceFlingerConfigs.

From this point onward, the configstore hal is to be thought of
as specifically relating to surface flinger. Other properties
may be added as other attributes/packages.

For instance, if we want a configstore entry for 'IFooConfig',
then we would add the configuration to one of the following
packages:
- android.hardware.foo@X.Y (to the interface itself)
- android.hardware.foo.config@X.Y (to a configuration of the interface)
- android.hardware.configstore.foo@X.Y (as a sub-interface of configstore)

and then it could be associated with the sepolicy attributes
(respectively):
- hal_foo
- hal_foo_config (or just hal_foo if they are 1-1)
- hal_configstore_foo

The specific pattern to be followed irrelevant to this CL
and subject to future discussion, the point being that we're going
to have a separate sepolicy attribute (and package, although this
isn't strictly necessary) for each separate domain's configuration.

Fixes: 109806245
Test: boot walleye, check for denials
Change-Id: If661e3fca012017a6c854fe3f02df4b779d514df
2018-06-06 13:01:17 -07:00
Steven Moreland
337c0969f0 Merge changes from topic "b80319537"
am: 0578a39451

Change-Id: I8a96c42221a241c761bdfa3d1b98dbdfd6b0dae3
2018-06-06 12:04:05 -07:00
Jeff Vander Stoep
b204ad930c Merge "Deprivilege haiku"
am: 59f8e75a5d

Change-Id: I0a45a6b5bd657c1c76668704a2283316deada6d1
2018-06-06 12:03:43 -07:00
Treehugger Robot
0578a39451 Merge changes from topic "b80319537"
* changes:
  hal_attribute_hwservice_client drop '_client'
  hal_attribute_hwservice_client += add_hwservice
2018-06-06 18:25:00 +00:00
Treehugger Robot
59f8e75a5d Merge "Deprivilege haiku" 2018-06-06 17:18:07 +00:00
Steven Moreland
9234e00daf hal_attribute_hwservice_client drop '_client'
Since this attribute just associates a hal_attribute
with a given hwservice in the standard way.

Bug: 80319537
Test: boot + sanity + test for denials
Change-Id: I545de165515387317e6920ce8f5e8c491f9ab24e
2018-06-06 09:30:18 -07:00
Steven Moreland
343e24a1be hal_attribute_hwservice_client += add_hwservice
For sanity, this makes 'hal_attribute_hwservice_client'
be associated with a specific hwservice thus making things
consistent.

After this change, only configstore, hal_allocator, and the
fwk_* services are inconsistent with all other HALs.

Bug: 80319537
Test: boot device, sanity tests, check for denials
Change-Id: Ibffc65c9567a429e07a3dc4dd41117738459dc2a
2018-06-06 09:25:52 -07:00
Neil Fuller
c9fa040d1c Remove references to common_time / commontime
This change removes references to the common time management
service.

Bug: 80462439
Test: build / boot
Merged-In: I2c8fca44fe05e3a35f5580d23e23a4c033075613
Change-Id: I2c8fca44fe05e3a35f5580d23e23a4c033075613
2018-06-06 17:02:44 +01:00
Jiyong Park
4e7545c44d resolve merge conflicts of 430b4b8294 to pi-dev-plus-aosp
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I54259100d731eef267f34cc12d0cbc9e200143ac
2018-06-06 13:15:28 +09:00
Joel Galenson
f41d85ca64 Merge "Allow ephemeral_app to execute system_file." into pi-dev
am: 398f72e3fd

Change-Id: Ib41908cbbf800bc1f3c2c4f639ab11c4b900d638
2018-06-05 21:07:16 -07:00
Tom Cherry
430b4b8294 Merge "neverallow coredomain from writing vendor properties"
am: e5616f0d24

Change-Id: I7768020d6a664b5e863775059a472d6b583d684a
2018-06-05 21:05:38 -07:00
Treehugger Robot
e5616f0d24 Merge "neverallow coredomain from writing vendor properties" 2018-06-06 03:54:11 +00:00
TreeHugger Robot
398f72e3fd Merge "Allow ephemeral_app to execute system_file." into pi-dev 2018-06-06 03:31:50 +00:00
Tri Vo
986f9ef5f3 Merge "Revert "Remove neverallow coredomain to set vendor prop."" into pi-dev
am: c75bef086f

Change-Id: If12976c0cd028c2e4cb35323019d953221998f30
2018-06-05 19:48:45 -07:00
Tri Vo
c75bef086f Merge "Revert "Remove neverallow coredomain to set vendor prop."" into pi-dev 2018-06-06 02:07:50 +00:00
Joel Galenson
f2afca7cf0 Allow ephemeral_app to execute system_file.
Bug: 109653662
Test: Build policy.
Change-Id: I6c71a8bc24d7a144b801d16f1bcad31fb8f2aba5
2018-06-05 17:56:30 -07:00
Steven Moreland
d02807110f [automerger skipped] Merge "Add context for ro.boot.product.hardware.sku." am: 8169f6b6ae
am: fdb8ba5dc5  -s ours

Change-Id: I7036d9b9083052cebba94905c9acb38f1f8b99d8
2018-06-05 15:34:12 -07:00
Jeff Vander Stoep
7a5c3aef17 [automerger skipped] Merge "ephemeral_app: disallow access to qtaguid files" into pi-dev
am: c0ee12ea82  -s ours

Change-Id: Ib0b4b3a62b29bcede49b202f1be3fdb814696026
2018-06-05 15:01:13 -07:00
Steven Moreland
fdb8ba5dc5 Merge "Add context for ro.boot.product.hardware.sku."
am: 8169f6b6ae

Change-Id: Ibad32696a84290e0a8745c1ecfaaeac0e710392f
2018-06-05 14:54:33 -07:00
TreeHugger Robot
c0ee12ea82 Merge "ephemeral_app: disallow access to qtaguid files" into pi-dev 2018-06-05 21:14:18 +00:00
Steven Moreland
8169f6b6ae Merge "Add context for ro.boot.product.hardware.sku." 2018-06-05 21:08:41 +00:00
Wale Ogunwale
dcf42c11f4 Merge "Added sepolicy for activity_task service" am: 2b7fbbe917
am: 93c6a36b07

Change-Id: If0038600c1fe4c97f55b3a09038586546ab1647c
2018-06-05 09:17:45 -07:00
Wale Ogunwale
93c6a36b07 Merge "Added sepolicy for activity_task service"
am: 2b7fbbe917

Change-Id: I6a9301aa288cdea401a16b5e51d815d3488f5a79
2018-06-05 09:13:21 -07:00
Treehugger Robot
2b7fbbe917 Merge "Added sepolicy for activity_task service" 2018-06-05 16:02:51 +00:00
Steven Moreland
68e58a474b Merge "Find hal_foo_hwservice -> you are hal_foo_client." am: 58f4c6f01b
am: 0b783e875a

Change-Id: I6d760e257df73b8bf065563c9a1949cd8edca54a
2018-06-05 08:33:57 -07:00
Steven Moreland
0b783e875a Merge "Find hal_foo_hwservice -> you are hal_foo_client."
am: 58f4c6f01b

Change-Id: I4e0467ba1c655be90eefc65dc3ebc96822aaa960
2018-06-05 08:30:19 -07:00