Commit Graph

20823 Commits

Author SHA1 Message Date
Jiyong Park
825b11ef6f Merge "Don't use apexd when TARGET_FLATTEN_APEX == true" 2019-05-29 16:12:05 +00:00
Jooyung Han
749cf93ae8 Test files on intermediates dir, not on /system
*_context_test / sepolicy_tests / treble_sepolicy_tests_* /
sepolicy_freeze_test files are installed on /system/etc.

By being FAKE modules, test files are not installed on target.

Additionally, we need to set up dependency from droidcore to
selinux_policy to make tests run on normal builds (m).

Bug: 133460071
Test: m & see if tests run and no test files on /system/etc
Test: m selinux_policy & see if tests run
Change-Id: Icacf004d5c1c8ec720c7cedef7bae8aa648cbe49
2019-05-30 01:05:43 +09:00
Dan Willemsen
9d06a8f594 Fix missing rename of all_keys -> all_plat_keys
Bug: 130111713
Test: treehugger
Change-Id: I38f7bd45bb2ec9cfef35384b23811cf6ec15cac2
2019-05-29 04:05:02 +00:00
Tri Vo
9c253a7a5a Merge "Revert "Add 29.0 mapping files"" am: 6d47c27458
am: a0f8c64834

Change-Id: Ia077642a42c86a970335e97b4129b637ce2c9a9f
2019-05-28 18:29:16 -07:00
Tri Vo
afc37a9832 [automerger skipped] Merge "Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts"" am: bf5ef59e10 -s ours
am: a9c2be6942 -s ours
am skip reason: subject contains skip directive

Change-Id: If1052345efe3bbbbd1276bbb5b08b0898c9a5e4b
2019-05-28 18:29:12 -07:00
Tri Vo
a0f8c64834 Merge "Revert "Add 29.0 mapping files""
am: 6d47c27458

Change-Id: If5332090c9cf35f4b489e014cc73c295ffb74834
2019-05-28 18:24:14 -07:00
Tri Vo
a9c2be6942 [automerger skipped] Merge "Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts""
am: bf5ef59e10 -s ours
am skip reason: subject contains skip directive

Change-Id: I328a192c81de22b0bb5c6e790140ddd7f6ddac65
2019-05-28 18:24:10 -07:00
Tri Vo
6d47c27458 Merge "Revert "Add 29.0 mapping files"" 2019-05-29 01:12:15 +00:00
Tri Vo
bf5ef59e10 Merge "Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts"" 2019-05-29 01:12:15 +00:00
Tri Vo
8043136f7f Revert "Add 29.0 mapping files"
This reverts commit 5702e9d758.

Reason for revert: breaks build

Change-Id: I2a1772545ec4aae8723ecce93c9bf9d49e905986
2019-05-29 01:10:07 +00:00
Tri Vo
9ea0af1e9a Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts"
This reverts commit bc8dc3aa9d.

Reason for revert: breaks build

Change-Id: I4163392f3a0f56add59d0d2a1d2695cee09cc32e
2019-05-29 01:09:16 +00:00
Tri Vo
f8433484fa Merge changes from topic "29_mapping" am: da3fbc60cc
am: c00dd3a1ea

Change-Id: Ia075ae7e61a73d244ab03678238240cd5617b556
2019-05-28 17:17:57 -07:00
Tri Vo
49c0dbf910 [automerger skipped] DO NOT MERGE Fake 29.0 sepolicy prebuilts am: bc8dc3aa9d -s ours
am: 2eafe8d7fb -s ours
am skip reason: subject contains skip directive

Change-Id: I0535d07e42826936cd7a81db45ce709c6bd47799
2019-05-28 17:17:53 -07:00
Tri Vo
c00dd3a1ea Merge changes from topic "29_mapping"
am: da3fbc60cc

Change-Id: I4bc844582f8825496b92b9adc7477c21bf460905
2019-05-28 17:13:58 -07:00
Tri Vo
2eafe8d7fb [automerger skipped] DO NOT MERGE Fake 29.0 sepolicy prebuilts
am: bc8dc3aa9d -s ours
am skip reason: subject contains skip directive

Change-Id: Ifea7cf5ca926ab930b1bd73525a2e6c4319f13f2
2019-05-28 17:13:53 -07:00
Tri Vo
da3fbc60cc Merge changes from topic "29_mapping"
* changes:
  Add 29.0 mapping files
  DO NOT MERGE Fake 29.0 sepolicy prebuilts
2019-05-29 00:02:14 +00:00
Jiyong Park
04d2392c35 Don't use apexd when TARGET_FLATTEN_APEX == true
/system/apex/com.android.runtime is labeled as runtime_apex_dir
and init is allowed to mount on it.

When TARGET_FLATTEN_APEX is true (= ro.apex.updatable is unset or set to
false), apexd is not used to activate the built-in flattened APEXes.
Init simply bind-mounts /system/apex to /apex.

However, there is a special case here. The runtime APEX is installed as
either /system/apex/com.android.runtime.debug or
/system/apex/com.android.runtime.release, whereas it should be activated
on /apex/com.android.runtime - without the .debug or .release suffix.
To handle that case, the build system creates an empty directory
/system/apex/com.android.runtime and the .debug or .release directory
is bind-mounted to the empty directory by init at runtime.

Bug: 132413565
Test: marlin is bootable
Merged-In: I3fde5ff831429723fecd1fa5c10e44f636a63f09
Change-Id: I3fde5ff831429723fecd1fa5c10e44f636a63f09
(cherry picked from commit 99902a175b)
2019-05-29 07:06:28 +09:00
David Anderson
51fae66027 Allow init to mkdir inside /data/gsi.
Bug: 133435561
Test: adb shell gsi_tool install
Change-Id: Iaa610c72d8098e157bb89e321624369f86f4ea19
Merged-In: Iaa610c72d8098e157bb89e321624369f86f4ea19
2019-05-28 13:42:42 -07:00
David Anderson
e79bc46748 Merge "Allow init to mkdir inside /data/gsi." am: e93049f9f1
am: 36b2737cd0

Change-Id: I19d53e2cc0910749bdb95968a03a074a8cc092d7
2019-05-28 08:18:19 -07:00
David Anderson
36b2737cd0 Merge "Allow init to mkdir inside /data/gsi."
am: e93049f9f1

Change-Id: Ib8a1cc1a930a44a692a761d7a383d06aa6e03ada
2019-05-28 08:13:20 -07:00
David Anderson
e93049f9f1 Merge "Allow init to mkdir inside /data/gsi." 2019-05-28 14:58:40 +00:00
Tri Vo
5702e9d758 Add 29.0 mapping files
Steps taken to produce the mapping files:

1. Add prebuilts/api/29.0/[plat_pub_versioned.cil|vendor_sepolicy.cil]
plat_pub_versioned.cil contains all public attributes and types from Q
Leave vendor_sepolicy.cil is empty.

2. Add new file private/compat/29.0/29.0.cil by doing the following:
- copy /system/etc/selinux/mapping/29.0.cil from pi-dev aosp_arm64-eng
device to private/compat/29.0/29.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 29 sepolicy.
Find all such types using treble_sepolicy_tests_29.0 test.
- for all these types figure out where to map them by looking at
28.0.[ignore.]cil files and add approprite entries to 29.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_29.0 and installs
29.0.cil mapping file onto the device.

Bug: 133155528
Bug: 133196056
Test: m treble_sepolicy_tests_29.0
Test: m 29.0_compat_test
Test: m selinux_policy
Change-Id: I59f6251e9baa6527a358dec024e9fae62388db2b
2019-05-26 14:28:40 -07:00
Tri Vo
bc8dc3aa9d DO NOT MERGE Fake 29.0 sepolicy prebuilts
I took current AOSP policy as base, then removed sepolicy so that the
set of type and attributes was a subset of types and attributes in Q
sepolicy, with exception of those that have not yet been cleand up in
current AOSP:

mediaswcodec_server
netd_socket
mediaextractor_update_service
thermalserviced
thermalserviced_exec

Bug: 133196056
Test: n/a
Change-Id: I2cbe749777684146114c89e1e6fc3f07400c0ae5
2019-05-26 14:19:26 -07:00
Alistair Strachan
e3a474fa2f [automerger skipped] Merge "Fix selinux denials when applying updates in recovery." into qt-dev
am: 4cd2db897d -s ours
am skip reason: change_id Id03a658aac69b8d20fa7bb758530a4469c75cf9c with SHA1 115aafa7ab is in history

Change-Id: Iceb2da88dfbc0051e682acac49ced7551d44539f
2019-05-24 16:33:04 -07:00
David Anderson
7538088d31 [automerger skipped] Fix selinux denials when applying updates in recovery.
am: 115aafa7ab -s ours
am skip reason: change_id Id03a658aac69b8d20fa7bb758530a4469c75cf9c with SHA1 d431c2bfe5 is in history

Change-Id: I68d9b145d17d69b158e0ae7dd1a1055f0b64907f
2019-05-24 16:00:04 -07:00
Alistair Strachan
4cd2db897d Merge "Fix selinux denials when applying updates in recovery." into qt-dev 2019-05-24 17:50:56 +00:00
Anton Hansson
3236d886e3 Merge "sepolicy: Add policy for migrate_legacy_obb_data.sh" into qt-dev
am: 097f48c810

Change-Id: Id7d5d98047f69f55d60bc8b8c4769e7f191ab7d7
2019-05-24 04:24:54 -07:00
Anton Hansson
097f48c810 Merge "sepolicy: Add policy for migrate_legacy_obb_data.sh" into qt-dev 2019-05-24 11:06:50 +00:00
Pawin Vongmasa
e7e6fffb86 Merge "Properly define hal_codec2 and related policies" into qt-dev
am: cf48bfd082

Change-Id: I974ad8ddfa1c1ec9bacc120e6f892ed0e760df57
2019-05-24 00:33:45 -07:00
TreeHugger Robot
cf48bfd082 Merge "Properly define hal_codec2 and related policies" into qt-dev 2019-05-24 07:21:23 +00:00
Nick Kralevich
404c2a8ca6 Merge "drop "allow healthd self:process execmem;"" am: b693197a34
am: 9cd511256f

Change-Id: I33eb83860dec230f72ad48a97032cb28bf357036
2019-05-23 22:16:26 -07:00
Max Dashouk
3c473d6ee8 [automerger skipped] Allows StatsCompanionService to pipe data to statsd.
am: d0482ba4ba -s ours
am skip reason: change_id I9e5f0a9d501a6728af3f27241300b3bb5c5c2123 with SHA1 febfa8f22d is in history

Change-Id: I42e840f32da0b707d0efe8d2c90f4d4856dae40e
2019-05-23 18:11:07 -07:00
Nick Kralevich
9cd511256f Merge "drop "allow healthd self:process execmem;""
am: b693197a34

Change-Id: Ic97cd9d84294849827f377d7db5edf3c40cb350b
2019-05-23 17:16:02 -07:00
David Anderson
77d1d35db7 Merge "Fix selinux denials when applying updates in recovery." am: 0f0fbd44f9
am: 6ae2f8fdd2

Change-Id: I34b531c710fbdf83f7911f8dd2a4e6343d47ec8b
2019-05-23 17:08:03 -07:00
Treehugger Robot
b693197a34 Merge "drop "allow healthd self:process execmem;"" 2019-05-23 22:17:31 +00:00
David Anderson
6ae2f8fdd2 Merge "Fix selinux denials when applying updates in recovery."
am: 0f0fbd44f9

Change-Id: I302dcd183e098bea74d1024e24942d7175fda084
2019-05-23 13:46:08 -07:00
David Anderson
0b1094cc23 Allow init to mkdir inside /data/gsi.
Bug: 133435561
Test: adb shell gsi_tool install
Change-Id: Iaa610c72d8098e157bb89e321624369f86f4ea19
2019-05-23 13:45:00 -07:00
Max Dashouk
d0482ba4ba Allows StatsCompanionService to pipe data to statsd.
Bug: 132444397
Test: manually tested with ag/7555609

Change-Id: I9e5f0a9d501a6728af3f27241300b3bb5c5c2123
Merged-In: I9e5f0a9d501a6728af3f27241300b3bb5c5c2123
(cherry picked from commit febfa8f22d)
2019-05-23 20:35:34 +00:00
David Anderson
115aafa7ab Fix selinux denials when applying updates in recovery.
These lines are copied from update_engine.te, and are needed to update
dynamic partitions in recovery.

Bug: 132943965
Test: sideload OTA on cuttlefish
Change-Id: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
Merged-In: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
2019-05-23 13:20:03 -07:00
David Anderson
0f0fbd44f9 Merge "Fix selinux denials when applying updates in recovery." 2019-05-23 20:15:45 +00:00
Nikita Ioffe
bbc8ddb784 [automerger skipped] Merge "selinux: Allow dumpstate send signals to vold" am: 7c3f77da18
am: dcdc08cf48 -s ours
am skip reason: change_id I0ebf7f171d854b9aaf894ccb8c7a5f68f18e692b with SHA1 f7c3d19d29 is in history

Change-Id: I79d7b6af42bd35f890fb9c363a674a477f874848
2019-05-23 13:14:57 -07:00
Nick Kralevich
b192f0e7c7 drop "allow healthd self:process execmem;"
The execmem capability indicates that the processes creates anonymous
executable memory, which is most commonly used for JITing functionality.
All of the healthd executable code comes from the filesystem, and
healthd does not rely on JITing or loading code from non-file based
sources, so this permission is unnecessary.

Bug: 32659667
Test: compiles and boots
Change-Id: Ifb2b68625b191cb002dbb134cace6ddd215236e8
2019-05-23 11:17:21 -07:00
Nikita Ioffe
dcdc08cf48 Merge "selinux: Allow dumpstate send signals to vold"
am: 7c3f77da18

Change-Id: I07b42cda4fa13f57bd37afcdd16951293ef01c03
2019-05-23 11:13:33 -07:00
Nikita Ioffe
7c3f77da18 Merge "selinux: Allow dumpstate send signals to vold" 2019-05-23 17:14:48 +00:00
Narayan Kamath
0574e4cdab sepolicy: Add policy for migrate_legacy_obb_data.sh
.. and let installd execute it. Required to migrate legacy obb contents

Bug: 129167772
Test: make

Change-Id: I35d35016680379e3a9363408704ee890a78a9748
2019-05-23 17:26:08 +01:00
Pawin Vongmasa
609c243dd0 Properly define hal_codec2 and related policies
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice

Bug: 131677974
Change-Id: I59c3d225499a8c53c2ed9f3bd677ff3d7423990b
2019-05-23 03:53:47 -07:00
Tri Vo
2a510b9d98 Merge "sepolicy: allow hal_omx to access audio devices" into qt-dev
am: ab2e89a695

Change-Id: I13ba841855501390680b242e2c08bd369956f7dc
2019-05-22 16:15:40 -07:00
David Anderson
d431c2bfe5 Fix selinux denials when applying updates in recovery.
These lines are copied from update_engine.te, and are needed to update
dynamic partitions in recovery.

Bug: 132943965
Test: sideload OTA on cuttlefish
Change-Id: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
2019-05-22 15:52:03 -07:00
Tri Vo
ab2e89a695 Merge "sepolicy: allow hal_omx to access audio devices" into qt-dev 2019-05-22 21:49:49 +00:00
Alec Mouri
264eff1efe Merge "Add support_kernel_idle_timer to sepolicy" into qt-dev
am: 63ab8cd63c

Change-Id: I3edcc2b1c2e49d7222d9a90a90832ca67f9b06df
2019-05-22 14:29:22 -07:00