Commit graph

468 commits

Author SHA1 Message Date
Treehugger Robot
9e607fa973 Merge "Add wificond service fuzzer to bindings" am: 34814e6d48 am: 5ed2584008 am: 1e8251cd60 am: 0aff4d4a79 am: 99b5189803 am: d5cb271637
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2611796

Change-Id: Id9ee6ff4a951c2cf2f339e9fe9f7b2907d9f1415
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 22:40:41 +00:00
Pawan Wagh
38cfa74af2 Add credstore service fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: Ie47e0e7a479f130935ada52a28d4e26e3bf07041
2023-06-08 21:28:46 +00:00
Treehugger Robot
0aff4d4a79 Merge "Add wificond service fuzzer to bindings" am: 34814e6d48 am: 5ed2584008 am: 1e8251cd60
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2611796

Change-Id: Ieca50440bfed78bd54f5550454cf55d4eb0df510
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 20:35:22 +00:00
Treehugger Robot
34814e6d48 Merge "Add wificond service fuzzer to bindings" 2023-06-08 18:30:49 +00:00
Steven Moreland
7f50f46f4d Merge "sepolicy: take sepolicy split in .mk" am: 394de71b25 am: 4f8749fb39 am: 41dee692bc am: 2d3ec65eab am: 979237002d am: 9c763bea9c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2608418

Change-Id: I7a230f35ea1516350e6a141b62029d8a8da7d5ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 02:45:31 +00:00
Steven Moreland
2d3ec65eab Merge "sepolicy: take sepolicy split in .mk" am: 394de71b25 am: 4f8749fb39 am: 41dee692bc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2608418

Change-Id: I0b3d3aaffefb25d74bbb5085a5c1766afb0f8570
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 00:28:19 +00:00
Steven Moreland
394de71b25 Merge "sepolicy: take sepolicy split in .mk" 2023-06-05 23:08:24 +00:00
Pawan Wagh
526efb51a5 Add wificond service fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: I471296a8b33862199ce9c27fca7ceae2db8105ea
2023-06-03 01:29:14 +00:00
Steven Moreland
721f5af6a3 sepolicy: take sepolicy split in .mk
This value is always set to true in the core build
system. Removing reads of it so we can mark it as
obsolete.

Bug: 257176017
Test: build
Change-Id: Ie7a72496bd4712583944ed833cd4364c5e3c520b
2023-06-02 16:14:17 +00:00
Pawan Wagh
94b5d92bcb Add media extractor service fuzzer to bindings am: 7f90d50ae0 am: 0e74d4e69e am: bb06602cc1 am: e0260436a3 am: 3edb02fcd8 am: 8c5017d143
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2600804

Change-Id: Ia5b571f71554dd75cd81407d16b904822b80ae28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 13:55:32 +00:00
Pawan Wagh
e0260436a3 Add media extractor service fuzzer to bindings am: 7f90d50ae0 am: 0e74d4e69e am: bb06602cc1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2600804

Change-Id: I073576df149593ff8a71b7b208a1c7d67229da31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 11:16:53 +00:00
Pawan Wagh
7f90d50ae0 Add media extractor service fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: I660c54df153993056668b6774d177072d8eadc3b
2023-05-31 01:19:21 +00:00
Pawan Wagh
e76d6207d8 Merge "Add media metrics aidl fuzzer to bindings" am: 144cad1b19 am: cf26f9e29b am: 31fe43e0da am: a4a07e3fb4 am: 161ff34d1c am: 057ad9d7e4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2601825

Change-Id: I53388ce116ffaede74e309885efdc5de31b103b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 07:10:09 +00:00
Pawan Wagh
a4a07e3fb4 Merge "Add media metrics aidl fuzzer to bindings" am: 144cad1b19 am: cf26f9e29b am: 31fe43e0da
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2601825

Change-Id: I070aa4b459e0953e3f502fb0b1daab4e8329aefe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 00:53:20 +00:00
Pawan Wagh
144cad1b19 Merge "Add media metrics aidl fuzzer to bindings" 2023-05-24 23:01:42 +00:00
Pawan Wagh
d25d64796d Add media metrics aidl fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: I6c645bf89fdded1dffdba8d40889eeb20b0734e1
2023-05-23 22:55:15 +00:00
Treehugger Robot
042c9c1737 Merge "Parallelize singleton execution." am: bcb0e13831 am: ff97fdff7e am: 6ec2ab500f am: a251f9a6bb am: ef1d5673ac am: 231b8d66c1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2593085

Change-Id: I8d8335f3c5b3b0eb82e51c24eee25bef64103895
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 20:17:41 +00:00
Treehugger Robot
a251f9a6bb Merge "Parallelize singleton execution." am: bcb0e13831 am: ff97fdff7e am: 6ec2ab500f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2593085

Change-Id: I629bb1e0770857d15d8a8febee705a5131ef08cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 19:00:24 +00:00
Treehugger Robot
1d88c50d4b Merge "Add installd service fuzzer to bindings" am: ae5be3dd8e am: a310d36da8 am: 6dc5922c2a am: 7337112178 am: a0eb10e733 am: b031963dd2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2595030

Change-Id: Ia7144bac234ccabc6f6f3e55f94f26ff632ee7f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 21:35:13 +00:00
Treehugger Robot
7337112178 Merge "Add installd service fuzzer to bindings" am: ae5be3dd8e am: a310d36da8 am: 6dc5922c2a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2595030

Change-Id: I939b50cc2db4f7ee42a3fe8c7a8c1c6abcbfe1a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 19:27:33 +00:00
LaMont Jones
3ee898434c Parallelize singleton execution.
Bug: 281536768
Test: manual, presubmits
Change-Id: I35fe5f4ce5732942399edf0d68e561039d7c253d
2023-05-19 18:19:28 +00:00
Treehugger Robot
ae5be3dd8e Merge "Add installd service fuzzer to bindings" 2023-05-19 17:21:07 +00:00
Pawan Wagh
acfbdcfae7 Add Camera service fuzzers to bindings am: c22df151ea am: f1063bac96 am: 40e8686279 am: 623c34140a am: 3eb905ebfd am: 27ada9df5f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2597151

Change-Id: Ib19a6b4a529dfb7b2370e4e3b0eb631105bd1a34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 03:59:13 +00:00
Pawan Wagh
623c34140a Add Camera service fuzzers to bindings am: c22df151ea am: f1063bac96 am: 40e8686279
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2597151

Change-Id: I397a9101ade5e1368962389d60394fbd1b1eacd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 01:44:00 +00:00
Pawan Wagh
c22df151ea Add Camera service fuzzers to bindings
Test: m
Bug: 232439428
Change-Id: I7b2f535d4731503ea23de5b143e49bd41b6a5c71
2023-05-18 18:39:32 +00:00
Pawan Wagh
34885a15a2 Merge "Add Suspend service fuzzers to bindings" am: c3fd0b60d8 am: cb01a56d01 am: 19cc928a78 am: c17d4cdbe5 am: 88c59499c0 am: 3a55a53d29
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2587575

Change-Id: I6d81c875eab11ffdb55b95f1453175c84dbbacf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 03:48:41 +00:00
Weilin Xu
378f325a1d Merge "Add broadcast radio AIDL HAL fuzzer binding" 2023-05-18 00:43:46 +00:00
Pawan Wagh
c17d4cdbe5 Merge "Add Suspend service fuzzers to bindings" am: c3fd0b60d8 am: cb01a56d01 am: 19cc928a78
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2587575

Change-Id: Ic2bfff2aea2c9dfcc0bec93346d6a0c4af2f9c1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 23:16:41 +00:00
Pawan Wagh
c3fd0b60d8 Merge "Add Suspend service fuzzers to bindings" 2023-05-17 21:17:48 +00:00
Pawan Wagh
c5eac2875b Add installd service fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: I62f23f0e4a6e760be3bbab6c2af428f47285f588
2023-05-17 20:35:44 +00:00
Weilin Xu
8411ca54f5 Add broadcast radio AIDL HAL fuzzer binding
Ignore-AOSP-First: service not landed in AOSP yet
Bug: 246857025
Test: m
Change-Id: I0e8e3ae0cdef1c4a6bca5ff6de7d02cf901b9a95
2023-05-17 17:31:00 +00:00
Pawan Wagh
5fdf17c01a Merge "Add incidentd_service_fuzzer to bindings" am: 8169c8fdd5 am: 2070ddc86e am: e602d8d9b2 am: 02929fc8f9 am: 1e76c3ff11 am: 58ec424a6b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2589492

Change-Id: Ifd2ed04498a96235f594b15f5529d0014aeaff09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 01:25:36 +00:00
Pawan Wagh
02929fc8f9 Merge "Add incidentd_service_fuzzer to bindings" am: 8169c8fdd5 am: 2070ddc86e am: e602d8d9b2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2589492

Change-Id: I803e0c0fa9c5f5c01774f2d4e0753c75793f7952
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 23:38:20 +00:00
Pawan Wagh
8169c8fdd5 Merge "Add incidentd_service_fuzzer to bindings" 2023-05-16 21:43:42 +00:00
Pawan Wagh
6d8487370b Add incidentd_service_fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: I9d91a50af04a18d61c05f88a05e22bbb0920058a
2023-05-16 00:53:11 +00:00
Pawan Wagh
251da94ec2 Merge "Add gpu_service_fuzzer to bindings" am: c9d2b575fc am: a10aea7bc8 am: a7270f7524 am: f28f614343 am: 5d34f64f86 am: 1539d8d199
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2587312

Change-Id: Id20bc2442bf19ab011ba00a08f8e69bd8843028a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 00:23:05 +00:00
Pawan Wagh
f28f614343 Merge "Add gpu_service_fuzzer to bindings" am: c9d2b575fc am: a10aea7bc8 am: a7270f7524
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2587312

Change-Id: I5f1b7ae705875be36f9210c666f0da332d7e981f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 22:33:27 +00:00
Pawan Wagh
a9d3164472 Add Suspend service fuzzers to bindings
Test: m
Bug: 232439428
Change-Id: I43b2926c4db076a89f17d8856f4fdec9c4594c05
2023-05-12 23:41:17 +00:00
Pawan Wagh
68efd7ab8c Add gpu_service_fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: If6da70d7eeeb686eebf69afcca2fa1213a1d8bf6
2023-05-12 21:50:14 +00:00
Inseob Kim
0fbb5cc09c Use target specific intermediate paths am: 6c6f53b1a8 am: 01cf7fedc3 am: da9ba4e30c am: 4e554b8023 am: d4fef92541
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2563992

Change-Id: If7a4256e521a34ec4f6bd97e8895cf0c543f3322
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28 01:07:40 +00:00
Thiébaud Weksteen
9e873385ff Merge "Remove comments in service_contexts" am: 97a5408aca am: 7d9b05e014 am: ebe909c195 am: f5d8bbb320 am: 667316c930
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2564530

Change-Id: I3be01d0897e4a230db12dd5397ed1c3175fb64a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28 00:44:23 +00:00
Inseob Kim
4e554b8023 Use target specific intermediate paths am: 6c6f53b1a8 am: 01cf7fedc3 am: da9ba4e30c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2563992

Change-Id: I9ad490bf13aafb24c00185dbd995e6e57c0679bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-27 18:12:53 +00:00
Thiébaud Weksteen
f5d8bbb320 Merge "Remove comments in service_contexts" am: 97a5408aca am: 7d9b05e014 am: ebe909c195
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2564530

Change-Id: Iee037919d9ca5ee962aef517ff628a5e9e6e4452
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-27 18:01:13 +00:00
Pawan Wagh
b28419ea18 Merge "Add gatekeeperd_service_fuzzer to bindings" am: 94b3f498cd am: 541170435e am: ecc8b0e33b am: cde5152f6e am: e8f2a72e03
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2553744

Change-Id: Ief55f5659e1993ef9a3b28fd1f4ebdfe683c1f8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-27 09:22:04 +00:00
Pawan Wagh
cde5152f6e Merge "Add gatekeeperd_service_fuzzer to bindings" am: 94b3f498cd am: 541170435e am: ecc8b0e33b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2553744

Change-Id: I0debe5e07a4e5ae5ccc7b4dec480692c8d8a24f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-27 08:03:36 +00:00
Inseob Kim
6c6f53b1a8 Use target specific intermediate paths
This won't be harmful and this can help reduce rebuilding sepolicy
artifacts upon lunch target change.

Bug: 279524023
Test: m selinux_policy
Change-Id: I859de6dc0ac1958b44d847159904960bd7f9a0c2
2023-04-27 11:11:48 +09:00
Thiébaud Weksteen
97a5408aca Merge "Remove comments in service_contexts" 2023-04-26 23:42:00 +00:00
Steven Moreland
bcf3c206b6 Merge "aidl_lazy_test: additional service context" am: d8b05e70bf am: b5a4c528f7 am: 7537e74b96 am: dc10d40add am: f9cba81ea1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2564270

Change-Id: Idf7edc880c5b56ad76d168d41355210d3315f243
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 23:09:26 +00:00
Steven Moreland
dc10d40add Merge "aidl_lazy_test: additional service context" am: d8b05e70bf am: b5a4c528f7 am: 7537e74b96
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2564270

Change-Id: I049e98038884725e7c31150f12ebe4520be1080e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 21:46:23 +00:00
Pawan Wagh
94b3f498cd Merge "Add gatekeeperd_service_fuzzer to bindings" 2023-04-26 19:37:15 +00:00
Steven Moreland
d8b05e70bf Merge "aidl_lazy_test: additional service context" 2023-04-26 18:45:50 +00:00
Thiébaud Weksteen
74482f5328 Remove comments in service_contexts
Commit b554e59 converted the build rules of contexts to Soong.
Previously, both services_contexts and hwservice_contexts were stripped
of comments. This is useful as a CTS test (testAospServiceContexts)
ensures that the device service_contexts matches AOSP. Restore the
previous behaviour.

Bug: 279384270
Test: m selinux_policy; diff plat_service_contexts; no more comments
Change-Id: Id0245efacf4e4b123f805869d95bacf804ccb915
2023-04-26 13:46:59 +10:00
Pawan Wagh
1448dfafdc Merge "Adding storaged fuzzers" am: ef3bc95afc am: 562a20b95f am: 2517fd240d am: 7550c6b385 am: 29a2b93896
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2559890

Change-Id: If346805aca62f85afb9ec802eb799b7d2ea21904
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 02:25:45 +00:00
Steven Moreland
295e68f238 aidl_lazy_test: additional service context
A lazy service shouldn't quit when it has clients, but
sometimes it needs to, such as when the device is
shutting down, so we test that it works.

In Android U, I broke this behavior, and it was caught
by other tests. However, now we have test support
for this directly in aidl_lazy_test.

No fuzzer, because this is a test service only, so it's
low-value.

Bug: 279301793
Bug: 278337172
Bug: 277886514
Bug: 276536663
Bug: 278117892
Test: aidl_lazy_test
Change-Id: I36b2602bb87b56ba1eb72420c7fdd60ff1fa14e2
2023-04-26 00:41:05 +00:00
Pawan Wagh
7550c6b385 Merge "Adding storaged fuzzers" am: ef3bc95afc am: 562a20b95f am: 2517fd240d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2559890

Change-Id: I2d1709fa73ad0755477059901099793beb0e2e43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 00:37:44 +00:00
Pawan Wagh
2d184d2885 Adding storaged fuzzers
Test: m
Bug: 232439428
Change-Id: I0be9260ecdbdf8e48905869cc4da2efade651ba8
2023-04-24 23:18:34 +00:00
Pawan Wagh
ac031bff46 Add gatekeeperd_service_fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: Icc93e0fa7df8c74b2330b97055b3f159b8e1a9a9
2023-04-21 23:11:04 +00:00
Yu Shan
a664e29f3f Merge "Define sepolicy for ivn HAL." am: 9861e84085 am: 506e69012d am: 78ca38f285 am: 36370a80be am: f45aa9f7b1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2530161

Change-Id: I35c83ef50ed99ff3210fdfae1bf5be28aaecac94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 04:00:49 +00:00
Yu Shan
36370a80be Merge "Define sepolicy for ivn HAL." am: 9861e84085 am: 506e69012d am: 78ca38f285
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2530161

Change-Id: I5802fb2e124cfab86869d0c123f5b6d670e5c8d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 02:44:59 +00:00
Yu Shan
9eb72464b5 Define sepolicy for ivn HAL.
Test: manually verify ivn HAL on gcar_emu.
Bug: 274139217
Change-Id: Ie12dccb723078d83b561c152cc4458e52c0f8090
2023-04-10 17:42:51 -07:00
Pawan Wagh
afff53fe00 Merge "Adding ResourceManagerService fuzzers" 2023-04-09 01:53:59 +00:00
Pawan Wagh
80cd20677d Adding ResourceManagerService fuzzers
Test: m
Bug: 232439428
Ignore-AOSP-First: resourcemanager_service_fuzzer is being added
in internal due to differences in source directory. This rule needs
fuzzer to present in current source tree to avoid build failure.

Change-Id: I44a5a9a980b142841b79354d103adab1aaa7afc3
2023-04-06 20:26:01 +00:00
Treehugger Robot
1b51c1f8e1 Merge "Add sepolicy rules for CpuMonitorService." am: 1ab1f7cd01 am: dac8bace6d am: c202f26753
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2497975

Change-Id: I5dbbd3d496afc934e1f3c4fb3253f857b3df1aac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 22:13:51 +00:00
Lakshman Annadorai
124be07e24 Add sepolicy rules for CpuMonitorService.
Change-Id: Icda952c148150e4d7824e303d163996679a0f36b
Test: m
Bug: 242722241
2023-03-27 16:29:09 +00:00
Tri Vo
26c4ed9d40 Merge "Remove RemoteProvisioner and remoteprovisioning services" am: 0099ba37f3 am: 45734ff4a7 am: ddc3df3035
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2488295

Change-Id: I46b1309c166d253a0c132c4c70fea547f2fe2619
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 19:05:42 +00:00
Tri Vo
4bb2d30701 Remove RemoteProvisioner and remoteprovisioning services
Bug: 273325840
Test: keystore2_test
Change-Id: I295ccdda5a3d87b568098fdf97b0ca5923e378bf
2023-03-14 15:45:35 -07:00
Pawan Wagh
d5e720b7f0 Merge "Adding netd and authorization fuzzers to bindings" am: 6ad15b7c74 am: 194ea6e259 am: 48d7cb584e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2478135

Change-Id: Ib680e81344d6e89c73c4986f87056aac3e2863ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:31:01 +00:00
Pawan Wagh
6ad15b7c74 Merge "Adding netd and authorization fuzzers to bindings" 2023-03-10 20:11:33 +00:00
Pawan Wagh
9f5825c863 Adding netd and authorization fuzzers to bindings
Test: m
Bug: 232439428
Change-Id: Ic0d94e7e6a89992619fe87f58737efddffc91408
2023-03-08 18:37:58 +00:00
Cole Faust
e906aaec21 Replace SortedStringKeys with SortedKeys am: 22f253cdfc am: de73e80b8e am: 22b9246143
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2463524

Change-Id: I747491ba1293adfae5df6f358ee991cd7480ce3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 01:06:37 +00:00
Cole Faust
22f253cdfc Replace SortedStringKeys with SortedKeys
SortedStringKeys is deprecated.

Bug: 193460475
Test: presubmits
Change-Id: I8b0f62964c078ab1d29c27df8ccddf05bd171c23
2023-03-01 11:00:15 -08:00
Pawan Wagh
7928aa63ff Adding resolv_service_fuzzer to bindings am: 3e019dd623 am: 5f14440b76 am: 9d745aa5aa
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2444083

Change-Id: I7fb753983a53919be3252822e4926f499cf7c351
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 00:00:53 +00:00
Pawan Wagh
3e019dd623 Adding resolv_service_fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: Idcef29b9a42ff701f38fc3bcc83fd92f6bd1a1c1
2023-02-17 23:20:42 +00:00
Pawan Wagh
3935f50a8d Merge "Adding fuzzer entries for drmmanager and vold" am: 9bc9a63b68 am: 20f7c87041 am: c2fbe131f6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2438893

Change-Id: Ibc9387f9216ac61c47592b997caff08f1b3b3b26
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-16 03:05:21 +00:00
Pawan Wagh
61e77a8759 Adding fuzzer entries for drmmanager and vold
Test: m
Bug: 232439428
Change-Id: I99879c0cfa71bfce44be3b080ca97934bdfa3100
2023-02-15 21:40:27 +00:00
Pedro Loureiro
efd12cc5bf Merge "Add SEPolicy for device config service" am: 43b0b8a65c am: 14060332c7 am: fe0ce26f53
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2430374

Change-Id: Ic9b09bf6e69fcec9e8f35de48be914f332bd45b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 14:03:59 +00:00
Pedro Loureiro
58847ab171 Add SEPolicy for device config service
A new mainline module that will have the device config logic requires a new service (device_config_updatable).

Bug: 252703257

Test: manual because logic that launches service is behind flag

Change-Id: I4ffba0c7d2afc44af8438b7d84d836e42388bd7d
2023-02-13 09:37:12 +00:00
Brian Julian
3e91bef971 Merge "Backports sepolicy for AltitudeService to T." am: f388934ffe am: e346f2fe80 am: 0966a7e8a3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2406792

Change-Id: I942be729355e8a833f3fdca7023f2eba4d09ac6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-08 19:38:08 +00:00
Brian Julian
32b0a39d27 Backports sepolicy for AltitudeService to T.
Test: VtsHalAltitudeServiceTargetTest
Bug: 265013616
Change-Id: I8eb6af8b9350e0d021ef781eb9f3776b4adf3b7f
Merged-In: I8eb6af8b9350e0d021ef781eb9f3776b4adf3b7f
2023-02-07 19:38:17 +00:00
Karthik Mahesh
4ccdb766a4 Merge "Add sepolicy for ODP system server service." am: 4fd76147c4 am: 4fc055b5cd am: 5fe0aaca94
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2402876

Change-Id: I8af698adfffd3b336217f9ae4f9d3fa8b87f3e22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-02 21:47:26 +00:00
Karthik Mahesh
52e5914ca4 Add sepolicy for ODP system server service.
Bug: 236174677
Test: build
Change-Id: Ief208b795dd05ddaa406f50a5fa91f46fe52fd71
2023-02-01 22:27:36 -08:00
Lorenzo Colitti
0aa28bc420 Merge "Update SEPolicy for Tetheroffload AIDL" am: b8194ca7fb am: d842a85d44 am: 96c4f6591c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2355402

Change-Id: Iee354556ed20f847f84672d0032cb45f2326f3b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-18 01:21:56 +00:00
Lorenzo Colitti
b8194ca7fb Merge "Update SEPolicy for Tetheroffload AIDL" 2023-01-18 00:04:51 +00:00
Thomas Nguyen
32e98f7b65 Add IRadioSatellite context am: 3445819d5a am: 8e04681736 am: 79a56bccb8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2380860

Change-Id: Id173536288cc8c643154091b07798bc326867a74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-12 05:41:14 +00:00
Thomas Nguyen
3445819d5a Add IRadioSatellite context
Bug: 260644201
Test: atest VtsHalRadioTargetTes

Change-Id: I43555e1f076cdf96fb0b7805cd664d7ba6798aec
2023-01-10 18:27:41 +00:00
Nathalie Le Clair
6ab4000288 Merge "HDMI: Refactor HDMI packages" am: 98e20da831 am: b1b7c91270 am: 410ee2e7b1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2353483

Change-Id: Iebc38ccef625de72fdb585b27ffec979c5c6596f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-10 17:50:39 +00:00
Nathalie Le Clair
98e20da831 Merge "HDMI: Refactor HDMI packages" 2023-01-10 17:05:17 +00:00
Treehugger Robot
13d814b459 Merge "Add newline between contexts inputs" am: 17ac4a53f8 am: 95b80b7322 am: 1c650edd1a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2375548

Change-Id: Ib87543854ff33b46bf5636f83ea86fdf6a94a2eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-06 04:20:48 +00:00
Inseob Kim
35e9d41af3 Add newline between contexts inputs
Bug: 263818248
Test: manual
Change-Id: I0ae98aac5044e42c8c6bf2bb1a3183510ec734de
2023-01-04 15:27:32 +09:00
Treehugger Robot
064b0e451b Merge "EARC: Add Policy for EArc Service" am: 6baccc1d8e am: 1791ca2220 am: 5efaa62b95
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2320410

Change-Id: Iba53b7a01332976ef1fdf36a0c736aaebba9348a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 05:02:45 +00:00
Treehugger Robot
6baccc1d8e Merge "EARC: Add Policy for EArc Service" 2023-01-04 03:30:47 +00:00
KH Shi
8ae99b5e5f Update SEPolicy for Tetheroffload AIDL
Bug: b/205762647
Test: m
Change-Id: Iaf87e8a64a4a1af20f54e3c09c31d051acf549a1
2023-01-04 11:28:47 +08:00
Venkatarama Avadhani
5a86d5f3f3 HDMI: Refactor HDMI packages
Organize the HDMI packages into CEC, EArc and connection under a common
hdmi package.

Bug: 261729059
Test: atest vts_treble_vintf_framework_test
      atest vts_treble_vintf_vendor_test
Change-Id: Ief5bff996028775ea355b392a4028a091fb83b99
2022-12-27 18:15:26 +05:30
Venkatarama Avadhani
0f0861af8f EARC: Add Policy for EArc Service
Test: atest vts_treble_vintf_framework_test
      atest vts_treble_vintf_vendor_test
Bug: 240388105
Change-Id: I561f647a68553fa0134f2e1bd65b0f18dd1785f1
2022-12-27 18:11:36 +05:30
Treehugger Robot
4ddb01576e Merge "Add SELinux policy for sound dose HAL" am: 62894399c3 am: f6872e0ea8 am: 9db7dccfe4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2361860

Change-Id: I5e51556a15e00da894b8f7660954717d3fcaaeda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-19 21:19:24 +00:00
Vlad Popa
48dd5f7ac4 Add SELinux policy for sound dose HAL
Note that this HAL is meant only as a workaround until the OEMs will
switch to the AIDL audio HAL.

Test: bluejay-userdebug
Bug: 257937004
Change-Id: Id01da9606f73354a01a94aace8a8966a09038fda
2022-12-16 21:42:06 +01:00
Calvin Pan
8aae52f1bc Merge "Add grammatical_inflection service" am: f56dfeb2d4 am: ecdc4715bc am: 2a53d04c95
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2352743

Change-Id: I1bb81cf69f539049cee1e7afd2b61247f79af6a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 10:15:27 +00:00
Calvin Pan
f56dfeb2d4 Merge "Add grammatical_inflection service" 2022-12-15 07:38:01 +00:00
Avichal Rakesh
72ea9c9983 Merge "cameraservice: Add selinux policy for vndk cameraservice." am: 95ecfc2f33 am: 5e5c23595e am: 062567b1b3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2346843

Change-Id: I706d6ce19cba7633e998b1287250b6927bf795ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 00:47:46 +00:00
Avichal Rakesh
95ecfc2f33 Merge "cameraservice: Add selinux policy for vndk cameraservice." 2022-12-14 22:49:47 +00:00
Avichal Rakesh
0febfbd952 cameraservice: Add selinux policy for vndk cameraservice.
This CL adds a new cameraservice type to allow vendor clients of
cameraservice to query and find the stable cameraservice
implementation.

Bug: 243593375
Test: Manually tested that cameraservice can register a vendor facing
      instance.
Change-Id: I61499406d4811c898719abcb89c51b4b8a29f4a7
2022-12-14 20:46:43 +00:00
Calvin Pan
a9b1c2299c Add grammatical_inflection service
This new service is exposed by system_server and available to all apps.

Bug: 259175720
Test: atest and check the log
Change-Id: I522a3baab1631589bc86fdf706af745bb6cf9f03
2022-12-14 05:22:53 +00:00
Pomai Ahlo
df3dd86f94 Merge "[ISap hidl2aidl] Update ISap in sepolicy" am: ab3a546000 am: 0824aff623 am: f2be496223
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2339122

Change-Id: Ia7b450f3a130465e63c1771114e27abd0acc5b14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 22:19:59 +00:00
Pomai Ahlo
ab3a546000 Merge "[ISap hidl2aidl] Update ISap in sepolicy" 2022-12-13 20:57:24 +00:00
Treehugger Robot
7eaa454dca Merge "Add all supported instance names for audio IModule" am: ffae136437 am: 7ea2e57cb2 am: 13fe16936e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2336911

Change-Id: I9cce4e6a310eefabd0e46a7b05460ee6c2d4c803
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 20:15:04 +00:00
Treehugger Robot
1043456d8c Merge "sepolicy: Add Bluetooth AIDL" am: 8cce74d7e0 am: 920af49203 am: f97fd45474
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2238140

Change-Id: Ie5597ee415918d1aa8449f1937ac5168bfabc26e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 20:14:36 +00:00
Treehugger Robot
ffae136437 Merge "Add all supported instance names for audio IModule" 2022-12-13 19:30:00 +00:00
Treehugger Robot
8cce74d7e0 Merge "sepolicy: Add Bluetooth AIDL" 2022-12-13 18:26:03 +00:00
Mikhail Naganov
2293f5eb0b Add all supported instance names for audio IModule
In AIDL, there is no 'factory' interface for retrieving
modules, instead each module is registered individually
with the ServiceManager.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I55cdae0640171379cda33de1534a8dc887583197
2022-12-13 01:17:46 +00:00
Chris Weir
4bead1ab07 Merge "SEPolicy for AIDL CAN HAL" am: caf905ff3c am: e640405f81 am: 448cfc4fb0
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2291528

Change-Id: I6403f38f89da90d3ca9fb285f100c3831b35b021
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-12 12:58:48 +00:00
Pomai Ahlo
5f4421fae5 [ISap hidl2aidl] Update ISap in sepolicy
Change instances of android.hardware.radio.sim.ISap to android.hardware.radio.sap.ISap

ISap is no longer going to be with IRadioSim in the sim
directory.  It will be in its own sap directory.

Test: m
Bug: 241969533
Change-Id: I362a0dc6e4b81d709b24b2fa2d879814ab232ad4
2022-12-10 01:13:13 +00:00
Chris Weir
caf905ff3c Merge "SEPolicy for AIDL CAN HAL" 2022-12-09 22:09:12 +00:00
Chris Weir
eee59458c2 SEPolicy for AIDL CAN HAL
CAN HAL moving to AIDL, SEPolicy will need to be adjusted.

Bug: 170405615
Test: AIDL CAN HAL VTS
Change-Id: I0d238d38aebb5895ae27fcb52cf43cd481327421
2022-12-09 11:00:10 -08:00
Pomai Ahlo
1bae94773e Merge "[ISap hidl2aidl] Add ISap to sepolicy" am: 90d117d661 am: 992b8aa2f3 am: be4f240892
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2329593

Change-Id: I746bfd8f6866c070c889e4482a5cba4016b1cf91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 18:41:42 +00:00
Pomai Ahlo
90d117d661 Merge "[ISap hidl2aidl] Add ISap to sepolicy" 2022-12-08 17:32:38 +00:00
Treehugger Robot
8696a544e8 Merge "Add permissions for remote_provisioning service" am: 61d823f9c7 am: aeaf422fe5 am: e3df03bc24
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2263548

Change-Id: I160a31da6e765e050c0278b8851a4f241619a951
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 18:57:57 +00:00
Charlie Wang
c1bbeb20bd Merge "SELinux policy changes for Wearable Sensing APIs." 2022-12-07 14:09:46 +00:00
Seth Moore
3accea479a Add permissions for remote_provisioning service
Bug: 254112668
Test: manual + presubmit
Change-Id: I54d56c34ad4a8199b8aa005742faf9e1e12583c3
2022-12-06 08:46:20 -08:00
Jiyong Park
ef56721555 Add permissive_domains_on_user_builds to se_policy_binary
In Android, we don't allow any domain to be permissive in user builds.
However, in Microdroid permissive domains should be allowed even in user
builds because fully debuggable VMs (where adb root is supported) can be
created there.

This change adds a new property `permissive_domains_on_user_builds` to
the `se_policy_binary` module as a controlled way of adding exceptions
to the enforcement.

Bug: 259729287
Test: m. This CL doesn't add any exception.
Change-Id: I2ae240e92dfdeadd827f027534e3e11ce4534240
2022-12-06 10:41:29 +09:00
Pomai Ahlo
ff82b77ae8 [ISap hidl2aidl] Add ISap to sepolicy
Test: m
Bug: 241969533
Change-Id: If9b67605481132d2908adae9fa1f9b1501c37ea0
2022-12-05 16:23:25 -08:00
Charlie Wang
bf61b00eb7 SELinux policy changes for Wearable Sensing APIs.
API changes are in ag/20407841. Please note we're still going through
security reviews here: b/249996246 and will incorporate feedback as we
go through the process. These selinux policies will enable the
WearableSensingService to run and unblock upstream development work.

Test: Ensure no build failures, ensure no SecurityException on boot
Bug: 249135378, 244181656
Ignore-AOSP-First: to prevent new feature leak.
Change-Id: I597827766cc3ed68ae65fb177f518eaf874f1eda
2022-12-05 09:20:14 -08:00
Myles Watson
671a0c3bda sepolicy: Add Bluetooth AIDL
Bug: 205758693
Test: manual - boot local image with Cuttlefish
Change-Id: Ic0c5408d83f8c352b72f79e9024212c7ff0c84c1
2022-12-02 13:08:26 -08:00
Steven Moreland
c3802445d0 Merge "sepolicy for SE HAL" 2022-11-29 22:30:40 +00:00
Devin Moore
371f7a448e Add AIDL sensorservice's new fuzzer to the mapping
Test: atest libsensorserviceaidl_fuzzer
Bug: 205764765
Change-Id: I6b81f110df4573e135746c9d2031d2469bcc43fc
2022-11-18 19:32:50 +00:00
Devin Moore
45d8baf70d Merge "Add sepolicy for new AIDL sensorservice" 2022-11-18 19:21:47 +00:00
Steven Moreland
4c6586817a sepolicy for SE HAL
Bug: 205762050
Test: N/A
Change-Id: I76cd5ebc4d0e456a3e4f1aa22f5a932fb21f6a23
2022-11-15 22:41:09 +00:00
Devin Moore
e714ba95ed Add sepolicy for new AIDL sensorservice
Test: boot cuttlefish and check for avc denials
Bug: 205764765
Change-Id: Ie9d02b43250ca3c5f642b2d87d2a5b532a9b5195
2022-11-14 17:26:24 +00:00
Sandeep Dhavale
d64fb55474 Merge "Fastboot AIDL Sepolicy changes" 2022-11-10 18:29:00 +00:00
Sandeep Dhavale
f0ea953e60 Fastboot AIDL Sepolicy changes
Bug: 205760652
Test: Build & flash
Change-Id: I2709c5cc2ca859481aac6fecbc99fe30a52a668b
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
2022-11-09 22:21:27 +00:00
Lakshman Annadorai
4d277b7baa Revert "Add sepolicies for CPU HAL."
This reverts commit f4ab6c9f3c.

Reason for revert: CPU HAL is no longer required because the CPU frequency sysfs files are stable Linux Kernel interfaces and could be read directly from the framework.

Change-Id: I8e992a72e59832801fc0d8087e51efb379d0398f
2022-11-09 16:47:07 +00:00
Lakshman Annadorai
f4ab6c9f3c Add sepolicies for CPU HAL.
Change-Id: Ia091bf8f597a25351b5ee33b2c2afc982f175d51
Test: Ran `m; emulator; adb logcat -b all -d > logcat.txt;`
      and verified CPU HAL is running without any sepolicy violation.
Bug: 252883241
2022-11-04 18:13:00 +00:00
Pawan Wagh
704df9c0e5 Use EXCEPTION_NO_FUZZER as default in fuzzer bindings
Bug: 257294037
Test: m
Change-Id: Iadc5cb3dde2a2b990e028e63a0cac8c5bdf6a0e4
2022-11-03 20:54:33 +00:00
Steven Moreland
e5ff93de78 Merge "Adding trusty-confirmationui service fuzzer binding." 2022-11-01 17:04:48 +00:00
Treehugger Robot
e6a43ec4c9 Merge "Add selinux rules for android.hardware.usb.gadget.IUsbGadget AIDL migration" 2022-10-27 14:03:48 +00:00
Ricky Niu
fc1463c164 Add selinux rules for android.hardware.usb.gadget.IUsbGadget AIDL migration
Covers the rules needed for the default AIDL implementation.

10-26 10:22:42.408   448   448 I auditd  : type=1400 audit(0.0:95): avc: denied { read } for comm="android.hardwar" name="interrupts" dev="proc" ino=4026531995 scontext=u:r:hal_usb_gadget_default:s0 tcontext=u:object_r:proc_interrupts:s0 tclass=file permissive=0

Bug: 218791946
Test: reboot and check if AIDL service is running.

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I8bdab3a682398f3c7e825a8894f45af2a9b6c199
2022-10-27 15:42:56 +08:00
Rajesh Nyamagoud
f9fed0102e Adding trusty-confirmationui service fuzzer binding.
Bug: b/205760172
Test: m
Change-Id: I448fcaf2c9440689312e273c608b44f415ccf1f4
2022-10-25 17:11:05 +00:00
Gabriel Biren
b7e21bcfe7 Merge "Add SeLinux policy for WiFi Vendor HAL AIDL service." 2022-10-25 17:03:10 +00:00
Henry Fang
0c3f615602 Merge "Allow CAS AIDL sample HAL" 2022-10-25 16:38:20 +00:00
Wenhao Wang
e825ad2a62 Add sepolicy for background_install_control service
The background_install_control service is going to detect
background installed apps and provide the list of such apps.

Bug: 244216300
Test: manual
Change-Id: I6500f29ee063da4a3bc18e109260de419dd39218
2022-10-24 11:26:35 -07:00
Gabriel Biren
e310ef8163 Add SeLinux policy for WiFi Vendor HAL AIDL service.
Bug: 205044134
Test: Manual - reboot phone and check if AIDL
      service is running.
Change-Id: I242e6ef860d2defdb0ab0a3d649b2a4e3f0de5a6
2022-10-19 16:34:56 +00:00
Treehugger Robot
4a5c2dee68 Merge "Add policies for new services HDMI and HDMICEC" 2022-10-19 02:58:03 +00:00
Pawan Wagh
59f3e11574 Merge "Revert "Revert "Updating exisiting fuzzers in fuzzer bindings""" 2022-10-17 16:21:46 +00:00
Hunsuk Choi
0c00096874 Merge "Add IRadioIms and IImsMedia context" 2022-10-17 06:13:01 +00:00
Pawan Wagh
fe3d48f3fb Revert "Revert "Updating exisiting fuzzers in fuzzer bindings""
This reverts commit e3245a40df.

Reason for revert: Check for missing dependency is added now. It should fix builds on master-art branch.
Bug: 253648584
Change-Id: I1ecd4521a1038ace711a4abeb0964b764ad5bc94
2022-10-14 18:51:34 +00:00
Hunsuk Choi
24abed20f5 Add IRadioIms and IImsMedia context
Bug: 216387835
Test: build & flash
Change-Id: I7eb3a45e1b13ca702e6bab7e152c4b4722ceccdd
(cherry picked from commit 26a4cc08701586459e1042604a204f6485c27d08)
Merged-In: I7eb3a45e1b13ca702e6bab7e152c4b4722ceccdd
2022-10-13 06:17:30 +00:00
Pawan Wagh
54eebadb3e sepolicy : check if missing dependencies are allowed
Panic only if missing dependencies are not allowed while checking
fuzzer bindings. This fix should breakages on branches like master-art
where SOONG_ALLOW_MISSING_DEPENDENCIES is set.

Bug: 246590424
Test: m
Change-Id: I0f908f27de5f761495848f461c7d479117f9feda
2022-10-12 22:32:58 +00:00
Shraddha Basantwani
bacf949002 Allow CAS AIDL sample HAL
Bug: 230377377, 227673974
Test: manual
Change-Id: Ied6822d8114404b85dbed56ae4806de1bfb43e54
2022-10-12 19:42:20 +05:30
Venkatarama Avadhani
38ff3b4115 Add policies for new services HDMI and HDMICEC
Test: atest vts_treble_vintf_framework_test
      atest vts_treble_vintf_vendor_test
Change-Id: Ic2c0525368218e207be236d073a3fe736151c43f
2022-10-10 15:40:42 +05:30
Nicolas Geoffray
e3245a40df Revert "Updating exisiting fuzzers in fuzzer bindings"
This reverts commit f38fb73371.

Bug: 246590424

Reason for revert: Breaks projects which don't include a full tree (eg master-art)

Change-Id: I2a87bde5e959e9a700f0569d2ccf7894ea3dc7ab
2022-10-09 13:28:05 +00:00
Pawan Wagh
431ef36077 Merge "Updating exisiting fuzzers in fuzzer bindings" 2022-10-07 21:27:19 +00:00
Pawan Wagh
f38fb73371 Updating exisiting fuzzers in fuzzer bindings
Bug: 246590424
Test: m
Change-Id: I327a9d86b68b00e64ce0fd87395037c641fb5901
2022-10-07 19:04:17 +00:00
Peiyong Lin
33e03e09b4 Merge "Update SEPolicy for Thermal AIDL" 2022-10-07 04:00:17 +00:00
Peiyong Lin
4a5d0f13c4 Update SEPolicy for Thermal AIDL
Bug: b/205762943
Test: build and boot
Change-Id: I301b85dafbf8fbb1c4be388aa0291e22f4717c99
2022-10-05 00:55:20 +00:00
Steven Moreland
07c5387324 Merge "hidl2aidl: sepolicy changes for confirmationui aidl" 2022-10-03 19:10:31 +00:00
Subrahmanyaman
745efb4ced hidl2aidl: sepolicy changes for confirmationui aidl
Sepolicy changes for confirmationui while converting from hidl
to aidl.

Bug: b/205760172
Test: run vts -m VtsHalConfirmationUIV1_0Target
Change-Id: Ib21038fd89789755b978489f5293725b221d86c4
2022-09-23 19:00:15 +00:00
Amos Bianchi
3189fafa2a Add sepolicy for new module.
Bug: b/241442337
Test: TH
Change-Id: Ia58e2d4b205638509545a0a2c356cd68862beb1f
2022-09-23 10:40:47 -07:00
Vikram Gaur
f4382c5391 Merge "Add SELinux policy changes for rkpd" 2022-09-23 09:33:45 +00:00
Vikram Gaur
d25c80a951 Add SELinux policy changes for rkpd
This is a part of changes to bring up Remote Key Provisioning Daemon
module. See packages/modules/RemoteKeyProvisioning for more info.

Change-Id: Iae4e98176491637acb03e2e09b9d8dbc269be616
Test: atest rkpd_client_test
2022-09-23 05:09:00 +00:00
Yu Shan
e799e9284c Merge "Create selinux policy for remoteaccess HAL." 2022-09-22 01:17:00 +00:00
Weilin Xu
52546635b2 Applying new IBroadcastRadio AIDL
Update Sepolicy for AIDL broadcast radio HAL. Ignore
fuzzer default AIDL implementation for now.

Bug: 170336130
Test: m -j
Change-Id: Ie55c08c6a721de1f8dc40acc81de68565f99f7d7
2022-09-21 23:17:20 +00:00
Steven Moreland
5043c02262 Merge "hidl2aidl: conversion of gatekeeper hidl to aidl" 2022-09-21 21:26:01 +00:00
Reema Bajwa
396d34b7c8 Merge "Add SELinux changes for Credential Manager Service in system server Test: Built & Deployed on device locally." 2022-09-21 17:34:09 +00:00
Yu Shan
05a7389aa9 Create selinux policy for remoteaccess HAL.
Will add fuzzer once the service is implemented.

Test: Run remoteaccess HAL on gcar_emu. Verify the service is running.
Bug: 241483300
Change-Id: I01b31a88414536ddd90f9098f422ae43a48cf726
2022-09-20 18:09:49 -07:00
Anna Zhuravleva
2864a66331 Add sepolicy for Health Connect system service.
Add selinux policy so the healthconnect system service
can be accessed by other processes.

Bug: 246961138
Test: build
Change-Id: I37e0e7f1a2b4696b18f8876a107c509d2906e850
2022-09-20 17:14:35 +00:00
Reema Bajwa
5b57bfaf7e Add SELinux changes for Credential Manager Service in system server
Test: Built & Deployed on device locally.

Change-Id: I892107ed528e0ca7435aa29a0fa1e6dbf4f225c5
2022-09-19 17:51:06 +00:00
Subrahmanyaman
1d2a3fedcc hidl2aidl: conversion of gatekeeper hidl to aidl
Conversion of the gatekeeper hidl interface to stable aidl interface.

Bug: 205760843
Test: run vts -m VtsHalGatekeeperTarget
Change-Id: I44f554e711efadcd31de79b543f42c0afb27c23c
2022-09-19 17:43:26 +00:00
Pawan
0ecf99def5 sepolicy : Recommend fuzzers for new services
Adding soong module and tool to check if there is fuzzer present
for every service in private/service_contexts. Whenever a service is
added, its is recommended to update
$ANDROID_BUILD_TOP/system/sepolicy/soong/build/service_fuzzer_bindings.go
with service name and its corresponding fuzzer.

Test: m
Bug: 242104782
Change-Id: Id9bc45f50bebf464de7c91c7469d4bb6ff153ebd
2022-09-13 18:18:46 +00:00
Treehugger Robot
3da6089241 Merge "Add go.mod for build/soong" 2022-08-19 18:44:18 +00:00
Inseob Kim
79fdbeb1ce Reorganize Android.bp files and modules
Test: build and boot
Change-Id: Id8a1a2faecf37de81b91e2669f6afa4cbe91443c
2022-08-17 09:50:22 +09:00
Inseob Kim
6d79030d0c Build mac_permissions.xml with Soong
Bug: 33691272
Test: build and compare
Change-Id: Iacbd5bcf77f0b1c0b5e2c6691efb4c62bc78fdf8
2022-08-17 09:49:35 +09:00
Sasha Smundak
43e9a404bf Add go.mod for build/soong
Test: treehugger
Change-Id: Id69d6cb94cff7efd082a127ea6def7db6c5422fc
2022-08-11 17:18:13 -07:00
Sandro
143988dedb Add apex_sepolicy targets for running go/seamendc
This is a roll-forward of some of the changes rolled back in
aosp/2170746. I am rolling forward in smaller chunks so that it is
easier to identify and avoid possible breakages.

Bug: 236691128
Test: atest SeamendcHostTest
Change-Id: Ibe451325d471fe04cd52683ba90a22543fa84c7c
2022-08-09 09:33:09 +00:00
Lokesh Gidra
1269a179ac Revert "Move parts of sdk_sandbox from private to apex policy"
Revert "Add java SeamendcHostTest in cts"

Revert submission 2111065-seamendc

Reason for revert: b/240731742, b/240462388 and b/240463116
Reverted Changes:
I3ce2845f2:Move parts of sdk_sandbox from private to apex pol...
I0c10106e2:Add java SeamendcHostTest in cts

Test: revert cl
Change-Id: If9981796694b22b7cbfe1368cd815889c741e69d
2022-08-03 14:24:04 +00:00
sandrom
e6971f1330 Move parts of sdk_sandbox from private to apex policy
Bug: 236691128
Test: atest SeamendcHostTest

Change-Id: I3ce2845f259afb29b80e2d9b446aa94e64ef8902
2022-07-27 13:39:06 +00:00
Inseob Kim
1e796342aa Fix policy file order for hal_attributes
Partners should be able to add hal_attributes to system_ext or product's
public/attributes file. However, if system_ext or product's
public/attributes contain any domain sets, numbers for base_typeattr
become inconsistent. It's because the order is now:

    ...
    te_macros
    attributes
    ioctl_defines
    ioctl_macros
    *.te
    roles_decl
    ...

That is, system_ext/public/attributes and product/public/attributes are
included prior to system/sepolicy/**/*.te. Thus, plat_sepolicy.cil and
system_ext_sepolicy.cil/product_sepolicy.cil can conflict.

This change fixes this issue by making attributes and *.te files have
the same rank. This way, system_ext/public/attributes is included after
system/sepolicy/**/*.te.

Bug: 234137981
Test: m selinux_policy after adding hal_attribute to
      system_ext/public/attributes
Change-Id: I85e1f6b8e4ab47c723724684d1938297a3305fe8
2022-06-09 11:26:35 +09:00
Inseob Kim
4196403c36 Replace se_filegroup to se_build_files
se_build_files is a replacement for se_filegroup module. se_build_files
can be used with the normal Soong convention ":module_name{.tag}" by
implementing android.OutputFileProducer. It's better than implementing
ad-hoc logics across various modules, which is the case for se_filegroup
module.

Test: build and boot
Change-Id: Ic0e34549601eb043145e433055f5a030eaf4347e
2022-04-23 01:47:40 +09:00
Inseob Kim
6e384f3a4b Add mls_cats property to se_policy_conf
To support overriding mls_num_cats for devices which don't need MLS

Bug: 223596384
Test: build
Change-Id: I007d3bab51e0aa67b14c2af1e92bee1d644ef4c7
2022-03-10 13:15:05 +09:00
Inseob Kim
c7596c4e61 Build vndservice_contexts with Android.bp
Bug: 33691272
Test: boot a device which uses vndservice_contexts
Change-Id: I28c36b74d4176954099f3b7e80a4869b7c44640f
2022-03-02 17:26:44 +09:00
Treehugger Robot
8e6b55a13d Merge "Remove compat test from treble sepolicy tests" 2022-02-17 01:26:04 +00:00
Treehugger Robot
8817edcbb4 Merge "Revert^2 "Migrate contexts tests to Android.bp"" 2022-02-16 04:23:47 +00:00
Inseob Kim
73f43ff847 Remove compat test from treble sepolicy tests
Treble sepolicy tests check whether previous versions are compatible to
ToT sepolicy or not. treble_sepolicy_tests_for_release.mk implements it,
but it also includes a compat test whether ToT sepolicy + {ver} mapping
+ {ver} plat_pub_versioned.cil can be built together or not. We
definitely need such tests, but we already have a test called "compat
test" which does exactly that, and testing it again with Treble sepolicy
tests is just redundant. The only difference between those two is that
Treble sepolicy tests can also test system_ext and product compat files,
which was contributed by a partner.

The ultimate goal here is to migrate *.mk to Soong, thus merging these
two tests (compat, Treble) into one. As we've already migrated the
compat test to Soong, this change removes the compat test part from
treble sepolicy tests. Instead, the compat test will be extended so it
can test system_ext and product compat files too.
prebuilts/api/{ver}/plat_pub_versioned.cil and
prebuilts/api/{ver}/vendor_sepolicy.cil are also removed as they aren't
used anymore: vendor_sepolicy.cil is an empty stub, and
plat_pub_versioned.cil can be built from the prebuilt source files.

Bug: 33691272
Test: m selinux_policy
Change-Id: I72f5ad0e8bbe6a7c0bbcc02f0f902b953df6ff1a
2022-02-16 04:09:29 +00:00
Inseob Kim
b5e235346e Revert^2 "Migrate contexts tests to Android.bp"
This reverts commit baa93cc651.

Reason for revert: amlogic build fixed

Change-Id: I8b046dc810d47a2d87012f02a668873889fce705
2022-02-16 02:26:11 +00:00
Inseob Kim
6c5fa54a8b Fix se_policy_conf file output stem
OutputFileProducer interface has been returning "conf", not the
designated stem.

Test: try including se_policy_conf module as other module's srcs
Change-Id: I17de5e10ed9bd1d45dc9a8b1be11ea6f5290c179
2022-02-09 23:35:43 +09:00
Thiébaud Weksteen
9ebf0c8ecf Split sepolicy_neverallow rule
sepolicy_neverallow is based on a combination of calling checkpolicy
followed by sepolicy-analyze. If the first tool fails, the error message
associated with the second is returned, which is misleading.

Separate both part of the rule using a new build command.

Bug: 175911415
Test: Modify policy to trigger neverallow (checkpolicy); no misleading
    messages from sepolicy-analyze
Change-Id: I5977ced23dee09a28c7df334e4790d212e0db0c1
2022-01-28 13:51:36 +11:00
Treehugger Robot
dd75a576c5 Merge "Remove deprecated ToMakePath calls" 2022-01-19 10:07:45 +00:00
Inseob Kim
baa93cc651 Revert "Migrate contexts tests to Android.bp"
This reverts commit f612656adf.

Reason for revert: breaking amlogic build

Change-Id: I129b5cb74259c9c028483e84c9b2ac3597c24701
2022-01-14 06:13:28 +00:00
Inseob Kim
f612656adf Migrate contexts tests to Android.bp
Now that we have sepolicy module in Android.bp, we can migrate contexts
tests. Also vendor_service_contexts_test will be run, as we now include
vendor_service_contexts unconditionally.

Unfortunately, vendor_service_contexts_test is now broken, due to a
malformed type hal_power_stats_vendor_service. We will temporarily
exempt the type from the test, to speed up migrating to Android.bp.

Bug: 33691272
Test: m selinux_policy and see tests running
Test: add a malformed type other than hal_power_stats_vendor_service and
      run tests
Change-Id: Ic60eb38b9a7c79006f0b5ff4453768e03006604b
2022-01-14 10:59:59 +09:00
Colin Cross
6c7f937235 Remove deprecated ToMakePath calls
ToMakePath is a noop now, remove the calls to it.

Bug: 204136549
Test: m checkbuild
Change-Id: I01b865614f50a57ab357c5ffb8843ebcb382df20
2022-01-11 19:35:43 -08:00
Inseob Kim
483c0b3a7d Merge "Migrate seapp_contexts to Android.bp" 2022-01-10 11:15:28 +00:00
Inseob Kim
16d3be3dac Migrate sepolicy compat test to Android.bp
compat_test tests whether {ver}.compat.cil is compatible to current
policy or not. This commit migrates all tests into a single module named
"sepolicy_compat_tests".

A minor issue is also resolved with this migration. Suppose that the
vendor's speolicy version is {VER}. Then the following cil files are
compiled in runtime.

- system/etc/selinux/plat_sepolicy.cil
- system/etc/selinux/mapping/{VER}.cil
- system/etc/selinux/mapping/{VER}.compat.cil (optional)
- system_ext/etc/selinux/system_ext_sepolicy.cil (optional)
- system_ext/etc/selinux/mapping/{VER}.cil (optional)
- system_ext/etc/selinux/mapping/{VER}.compat.cil (optional)
- product/etc/selinux/product_sepolicy.cil (optional)
- product/etc/selinux/mapping/{VER}.cil (optional)
- product/etc/selinux/mapping/{VER}.compat.cil (optional)
- vendor/etc/selinux/vendor_sepolicy.cil
- vendor/etc/selinux/plat_pub_versioned.cil
- odm/etc/selinux/odm_sepolicy.cil (optional)

That is, the vendor policy of version {VER} (vendor_sepolicy.cil,
plat_pub_versioned.cil, and odm_sepolicy.cil) is required to be
compatible only to {VER}.compat.cil. So, the vendor policy is included
only to $(BOARD_SEPOLICY_VERS)_compat_test. The other tests will be
built only with platform side policies.

Bug: 33691272
Test: boot
Test: manually edit {ver}.compat.cil files and try build
Change-Id: I16b30a9171f10ee8f08fc03b7bd7c047eec12b19
2022-01-07 18:53:46 +09:00
Inseob Kim
2dac267dae Migrate seapp_contexts to Android.bp
Bug: 33691272
Test: build and boot
Test: atest SELinuxHostTest#testValidSeappContexts
Change-Id: I86f9d010d1628f9756cc152b4ee74dea1b9ff955
2021-12-29 17:54:57 +09:00
Inseob Kim
24401df041 Rename neverallow_test.go to sepolicy_neverallow
Because Go command line tooling assumes *_test.go files are tests and
not package sources.

Test: build
Change-Id: Ie332b89140b93c4ea448009cafa2556ef888497c
2021-12-29 04:58:17 +00:00
Inseob Kim
5bbcd68dcc Build recovery policy with Android.bp
Bug: 33691272
Test: enter recovery mode
Change-Id: Ifc38ed99e6615431d81ade76ec10ea4d34fbbf90
2021-12-28 17:51:51 +09:00
Inseob Kim
0de7fcc33a Migrate neverallow tests to Android.bp
A new module type se_neverallow_test is added, to migrate
sepolicy_neverallow modules. se_neverallow_test is affected by
SELINUX_IGNORE_NEVERALLOWS.

Bug: 33691272
Test: m selinux_policy
Test: intentionally create neverallow violations and m selinux_policy
Change-Id: I1582353f99f064ff78f3c547a0c13f2b772d54df
2021-12-28 10:23:22 +09:00
Inseob Kim
6d3d5a6daf Fix contexts modules to use android:"path"
For now, contexts modules have been using se_filegroup modules, which
makes the build system logic unnecessarily complex. This change
refactors it to se_build_files modules and normal `android:"path"`
logic.

Test: build and boot
Change-Id: I52e557e2dc8300186869a97fddfd3a74183473f7
2021-12-23 21:36:27 +09:00
Inseob Kim
3d5f9256a4 Perform permissive check on se_policy_binary
sepolicy is a module which outputs precompiled sepolicy and performs
permissive domain check on user builds. se_policy_binary module is
updated so it checks permissive domain in user builds.

sepolicy module is removed since we don't need it anymore. Instead,
precompiled_sepolicy is used.

Bug: 33691272
Test: build
Test: add "permissive adbd;" and build on aosp_arm64-user
Change-Id: I3dcf0c32d2fc1312dfceeee74894c08b38395d19
2021-12-23 21:34:29 +09:00
Inseob Kim
3ac62fe9f6 Build vendor/odm sepolicies with Android.bp
The following files are built with Android.bp:
- vendor_sepolicy.cil
- odm_sepolicy.cil
- prebuilt_sepolicy

Also, prebuilt_policy.mk is removed as it's now redundant.

Bug: 33691272
Test: build and compare artifacts
Test: build with rvc-dev sepolicy
Change-Id: I7bf79c9c85c63cd942b36f7cf5ddda1860626c0b
2021-12-20 21:16:39 +09:00
Inseob Kim
95249165b5 Merge "Fix vendor contexts files in mixed build" 2021-12-10 12:13:36 +00:00
Inseob Kim
0a707fadb2 Refactor Android.bp build modules for readability
When we compile sepolicy files into a cil file, we first gather all
sepolicy files to create a conf file, and then convert the conf file to
a cil file with checkpolicy. The problem is that checkpolicy is
sensitive to the input order; the conf file should contain statements in
a specific order: classes, initial_sid, access vectors, macros, mls,
etc.

This restriction has made Android.bp migration difficult, and we had to
create a magical module called "se_build_files" to correctly include
source files in the designated order. It works, but significant
readability problem has happened. For example, when we write
":se_build_files{.system_ext_public}", how can we easily figure out that
the tag actually includes plat public + system_ext public + reqd mask,
without taking a look at the build system code?

This change refactors the se_build_files module and se_policy_conf
module, so we can easily see the desginated files for each module, just
like we did in the Android.mk. se_policy_conf module now stably sorts
source files in an order which will make checkpolicy happy.
se_build_files module is also refactored, so one tag can represent
exactly one set of policy files, rather than doing magical works behind
the scene. For example, system_ext public policy module is changed from:

se_policy_conf {
    name: "system_ext_pub_policy.conf",
    // se_build_files automatically adds plat public and reqd mask
    srcs: [":se_build_files{.system_ext_public}"],
}

to:

se_policy_conf {
    name: "system_ext_pub_policy.conf",
    // se_policy_conf automatically sorts the input files
    srcs: [
        ":se_build_files{.plat_public}",
        ":se_build_files{.system_ext_public}",
        ":se_build_files{.reqd_mask}",
    ],
}

Bug: 209933272
Test: build and diff before/after
Change-Id: I97a76ed910645c1607d913fd646c27e87af0afd3
2021-12-10 00:31:53 +09:00
Inseob Kim
7174ffec38 Fix vendor contexts files in mixed build
BOARD_PLAT_VENDOR_POLICY should be used for all vendor stuff, when in
mixed sepolicy build (BOARD_SEPOLICY_VERS != PLATFORM_SEPOLICY_VERSION).
This fixes an issue that system/sepolicy/vendor has been incorrectly
used in mixed sepolicy build.

Bug: 205924657
Test: Try AOSP + rvc-dev mixed sepolicy build
1) copy cuttlefish sepolicy prebuilts from rvc-dev branch.
2) set prebuilt variables:
  - BOARD_PLAT_VENDOR_POLICY
  - BOARD_REQD_MASK_POLICY
  - BOARD_(SYSTEM_EXT|PRODUCT)_PRIVATE_PREBUILT_DIRS
  - BOARD_SEPOLICY_VERS
3) lunch aosp_cf_x86_64_phone-userdebug; m selinux_policy
4) compare $OUT/vendor/etc/selinux with rvc-dev's artifacts.

Change-Id: I2ed1e25255c825c24dab99ae4903328b0400c414
2021-12-09 19:03:35 +09:00
Thiébaud Weksteen
b05a1a1f75 Migrate build/ to Python 3
Test: mm
Bug: 200119288
Change-Id: I0594074b9a74ec7272da325232e7bd8ec0ec705b
2021-12-08 10:03:00 +11:00
Yuntao Xu
42e732c861 Split property/file/service contexts modules
1. Splitted plat_property_contexts, plat_file_contexts, and
plat_service_contexts so they can be included by the
CtsSecurityHostTestCases module.

2. Add temporary seapp_contexts Soong module, which are needed by the
CtsSecurityHostTestCases, and makefile_goal is an interim solution before
migrating both of them to Soong.

Bug: 194096505
Test: m CtsSecurityHostTestCases
Change-Id: I99ba55b1a89f196b3c8504e623b65960a9262165
2021-11-19 18:23:12 +09:00
Vova Sharaienko
919fa4f9fc Merge "Revert "Split property and file contexts modules"" 2021-11-18 17:56:09 +00:00
Vova Sharaienko
bec08097c9 Revert "Split property and file contexts modules"
Revert "Convert security/Android.mk to Android.bp"

Revert "Add seapp_contexts to allowlist of makefile goal"

Revert submission 1795972-Convert security/Android.mk to Android.bp

Reason for revert: http://b/206976319 Broken build 7928060 on aosp-master on sdk_arm64-sdk
Reverted Changes:
I0e0e7f677:Split property and file contexts modules
I5596d6f00:Add seapp_contexts to allowlist of makefile goal
If685e5ccc:Convert security/Android.mk to Android.bp

Change-Id: Ibbca0a17886d15b3fd7ecaf974a06df7107fd9aa
2021-11-18 17:29:01 +00:00
Yuntao Xu
1b76673577 Merge "Split property and file contexts modules" 2021-11-18 17:05:46 +00:00
Yi-Yo Chiang
2c18965e27 Treblelize bug_map: split bug_map to multiple partitions
* plat_bug_map: Platform-specific bug_map definitions.
* system_ext_bug_map: Product-specific bug_map definitions.
* vendor_bug_map: SOC-specific bug_map definitions.

Bug: 177977370
Test: Boot and check auditd logs
Change-Id: I6f26b421acfd060e8abb8e4e812c0f422cc6757b
2021-11-08 22:44:34 +08:00
Inseob Kim
1b965988b7 Split property and file contexts modules
1. Splitted plat_property_contexts and plat_file_contexts so that they
can be included by the CtsSecurityHostTestCases module;
2. Add temporary seapp_contexts Soong module, which are needed by the
CtsSecurityHostTestCases, and makefile_goal is an interim solution before
migrating both of them to Soong.

Bug: 194096505
Test: m CtsSecurityHostTestCases
Change-Id: I0e0e7f6778d42ab2fdae3a181f40216fe6719e7c
2021-11-08 15:44:29 +09:00
Colin Cross
f82aed0daa Don't use AndroidMkEntries.Custom
There's nothing special in the Custom method supplied, replace it
with normal AndroidMkEntries fields.

Bug: 204136549
Test: m checkbuild
Change-Id: I624005d2ee313aaa60397749b0726e393a842618
2021-11-04 17:25:55 -07:00
Inseob Kim
b9d0511de4 Add se_policy_binary module
se_policy_binary module compiles cil files to sepolicy binary file.

Bug: 33691272
Test: build
Change-Id: Id20183d0ac797fc68356feaad9df0d0bccc81c14
2021-09-27 13:13:46 +00:00
Inseob Kim
d58166165a Migrate freeze test to Soong
Bug: 33691272
Test: m selinux_policy on sc-dev
Change-Id: Ie536d885034e5d888f1329ac189fd0bf9723a6c4
2021-09-16 05:08:56 +00:00
Paul Duffin
532bde121b Stop using deprecated functionality for managing path deps
This change stops using deprecated functionality and migrates this
repository's custom Soong code to support current practices to manage
path property related dependencies. i.e. when a property includes
something that looks like ":module".

ExtractSourcesDeps has been deprecated in favor of tagging properties
with `android:"path"` which will cause the pathDepsMutator to add the
dependencies automatically.

android.SourceDepTag has been deprecated as the underlying type needs
to be changed and this will no longer work for its current uses.

* ctx.GetDirectDepWithTag(moduleName, android.SourceDepTag) will not
  work to retrieve a reference to the module dependency added for
  path properties. GetModuleFromPathDep(ctx, moduleName, "") must be
  used instead.

* depTag == android.SourceDepTag can no longer be used to check to
  see if depTag was used to add a module dependency for a module
  reference in a path property without any output tag.
  IsSourceDepTagWithOutputTag(depTag, "") must be used instead.

Bug: 193228441
Test: m nothing
Change-Id: I307039612f0f2a541ac7dbfddd052ef78c290f60
2021-07-09 23:15:17 +01:00
Inseob Kim
31db274078 Call SkipInstall before InstallFile
InstallFile skips install only if SkipInstall is called before
InstallFile.

Bug: 190442286
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: Ic497e34816ea5ac23be45e34c242b59bf1a01e28
2021-06-08 10:31:09 +09:00
Yo Chiang
bb8d0050d9 Merge "Revert "se_compat_cil: Prepend generated files with a header"" 2021-05-12 05:35:51 +00:00
Yo Chiang
7c3ecf1356 Revert "se_compat_cil: Prepend generated files with a header"
This reverts commit b44e506223.

Reason for revert: secilc is fixed by aosp/1701846, so the workaround is no longer needed

Bug: 183362912
Test: S GSI on R CF boot test
Change-Id: Ic73c7cea1ebe42b483049cbc29f192e738748894
2021-05-12 01:54:27 +00: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
Inseob Kim
6cc75f4587 Revert^4 "Build userdebug_plat_sepolicy.cil with Android.bp"
This reverts commit a46d61cd3f.

Reason for revert: fixed debug_ramdisk partition problem

Change-Id: If2350f115f5ff74ee50dac4e5a87c4d171067282
2021-04-30 14:53:25 +09:00
Inseob Kim
1c056b1ad0 Add sepolicy_vers for plat_sepolicy_vers.txt
plat_sepolicy_vers.txt stores the version of vendor policy. This change
adds sepolicy_vers module to migrate plat_sepolicy_vers.txt to
Android.bp.

- Device's plat_sepolicy_vers: should be BOARD_SEPOLICY_VERS
- Microdroid's plat_sepolicy_vers: should be PLATFORM_SEPOLICY_VERSION
because all microdroid artifacts are bound to platform

Bug: 33691272
Test: boot device && boot microdroid
Change-Id: Ida293e1cb785b44fa1d01543d52d3f8e15b055c2
2021-04-30 00:17:39 +09:00
Hridya Valsaraju
7362f58895 Merge changes from topic "revert-1668411-MWQWEZISXF"
* changes:
  Revert "Add a neverallow for debugfs mounting"
  Revert "Add neverallows for debugfs access"
  Revert "Exclude vendor_modprobe from debugfs neverallow restrictions"
  Revert "Check that tracefs files are labelled as tracefs_type"
2021-04-23 22:06:31 +00:00
Hridya Valsaraju
f9dbb72654 Revert "Add a neverallow for debugfs mounting"
Revert submission 1668411

Reason for revert: Suspect for b/186173384
Reverted Changes:
Iaa4fce9f0:Check that tracefs files are labelled as tracefs_t...
I743a81489:Exclude vendor_modprobe from debugfs neverallow re...
I63a22402c:Add neverallows for debugfs access
I289f2d256:Add a neverallow for debugfs mounting

Change-Id: Ie04d7a4265ace43ba21a108af85f82ec137c6af0
2021-04-23 16:38:20 +00:00
Treehugger Robot
f02af9d91c Merge "Revert^3 "Build userdebug_plat_sepolicy.cil with Android.bp"" 2021-04-23 13:09:24 +00:00
Inseob Kim
a46d61cd3f Revert^3 "Build userdebug_plat_sepolicy.cil with Android.bp"
e10ceab330

Change-Id: Ia1b38d6b709edb0e819ea4700e70ba68b1b61332
2021-04-22 23:14:58 +00:00
Florian Mayer
e10ceab330 Revert^2 "Build userdebug_plat_sepolicy.cil with Android.bp"
0177004c7f

Change-Id: I40aa5025d487922decd9909c0d35c9e3a6b8dd61
2021-04-22 16:38:47 +00:00
Bowgo Tsai
0177004c7f Revert "Build userdebug_plat_sepolicy.cil with Android.bp"
This reverts commit 57b64bd282.

Because it breaks the usage of boot-debug.img and
vendor_boot-debug.img.

Bug: 185970130
Bug: 185990198
Test: make bootimage_debug
Change-Id: I2c7c4f9954540a9be301b3ed0a6c2f0af2019803
2021-04-22 09:55:21 +08:00
Hridya Valsaraju
1c3d898d87 Add a neverallow for debugfs mounting
Android R launching devices and newer must not ship with debugfs
mounted. For Android S launching devices and newer, debugfs must only be
mounted in userdebug/eng builds by init(for boot time initializations)
and dumpstate(for grabbing debug information from debugfs). This patch
adds a neverallow statement that prevents processes other than init
from being provided access to mount debugfs in non-user builds
when the flag PRODUCT_SET_DEBUGFS_RESTRICTIONS is set to true.

Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS
Bug: 184381659
Change-Id: I289f2d25662a78678929e29f83cb31cebd8ca737
2021-04-21 14:13:02 -07:00
Treehugger Robot
8d2bfafcf5 Merge "Build userdebug_plat_sepolicy.cil with Android.bp" 2021-04-15 05:22:35 +00:00
Yo Chiang
466964d401 Merge "se_compat_cil: Prepend generated files with a header" 2021-04-14 08:30:38 +00:00
Yi-Yo Chiang
b44e506223 se_compat_cil: Prepend generated files with a header
to ensure the file size is greater than 0, as secilc cannot handle
zero-sized cil files.

Fixes: 185256986
Bug: 183362912
Test: Forrest re-run broken test
Change-Id: Ief3039d38728fbeff67c6e39d6b15bddb006e5f8
2021-04-14 07:41:23 +00:00
Yo Chiang
86a8275378 Merge "Remove references to BOARD_PLAT_{PUBLIC,PRIVATE}_SEPOLICY_DIR" 2021-04-14 06:55:59 +00:00
Inseob Kim
57b64bd282 Build userdebug_plat_sepolicy.cil with Android.bp
Bug: 33691272
Test: build and see $OUT/debug_ramdisk
Change-Id: I7994857a3dd4e54f2c2d35ff8e362ecae93ea7a2
2021-04-14 15:54:26 +09:00
Yi-Yo Chiang
41c34d6a70 Add se_compat_cil module
Installs backwards compatibility cil files.

Bug: 183362912
Test: Presubmit
Test: Add a $(ver).compat.cil under SYSTEM_EXT_PRIVATE_SEPOLICY_DIR and
  verify the file is installed under /system_ext/etc/selinux/mapping/
Change-Id: I5e2c6b8dfa8df431edfe96f29daae463b130367f
2021-04-13 02:58:21 +08:00
Yi-Yo Chiang
40073d4c7f Remove references to BOARD_PLAT_{PUBLIC,PRIVATE}_SEPOLICY_DIR
These variables are deprecated.

Bug: 183362912
Test: Presubmit; Noop
Change-Id: I80db5342044a06feb1451fbe661989fe4d191e74
2021-04-12 20:01:35 +08:00
Inseob Kim
39fbcf7c96 Add plat_vendor tag to se_build_files for microdroid
plat_vendor tag consists of vendor available policies in system/sepolicy
directory, and is for minimized vendor policies.

Bug: 33691272
Test: boot microdroid
Change-Id: Icb3c1be02ee41b526d7d95f0053e56bf8b34f49d
2021-04-05 09:50:47 +00:00
Inseob Kim
ebe6f385da Add se_versioned_policy module
se_versioned_policy module wraps version_sepolicy and generates mapping
files with Android.bp.

Bug: 33691272
Test: build
Change-Id: Iaba499db39b1214ef7b1f59c58232ec85d7c3bcb
2021-03-25 16:41:53 +09:00
Inseob Kim
4360c1975f Add target_with_dexpreopt option to policy
It was missing when migrating definitions.mk to Android.bp module.

Test: m selinux_policy on sc-arc
Change-Id: I3c943440295bc9064d50e1a2f9025715c76b539e
2021-03-23 20:52:53 +09:00
Inseob Kim
df1a0dee63 Add se_policy_cil module to build cil policy
This adds a new module se_policy_cil. It will consume the policy.conf
file (usually built with se_policy_conf) and outputs a compiled cil
policy file, which will be shipped to devices.

Bug: 33691272
Test: try building se_policy_cil from se_policy_conf
Change-Id: I7a33ab6cb5978e1a7d991be7514305c5e9f8159b
2021-03-18 19:54:30 +09:00
Inseob Kim
7e8bd1e657 Add se_policy_conf module to build policy.conf
This adds a new soong module that transforms selinux policy files to
policy.conf file. It uses m4 macro with various variables, and replaces
transform-policy-to-conf macro in system/sepolicy/definitions.mk.

The module will be used when building:
- policy cil files shipped to the device
- CTS tests that needs general_policy.conf

Bug: 33691272
Test: try building se_policy_conf with se_build_files
Change-Id: Ie1082a8193c2205992b425509b9d5bfa4b495b2f
2021-03-18 19:52:09 +09:00
Inseob Kim
619e4a7a82 Add se_build_files module
se_build_files module globs given srcs from sepolicy directories and
acts as a filegroup with the following tags, which can be used to build
system side policy files.

- plat
- plat_public
- system_ext
- system_ext_public
- product
- product_public
- reqd_mask

se_build_files module acts like the build_policy macro in Android.mk.
Normal genrule module can't easily handle that, because both file order
and directory order matter.

Support for vendor/odm is to be added in the future.

Bug: 33691272
Test: inspect se_build_files with above tags and compare it to ninja
Change-Id: Id7c57b01c78fc14ac5e8eeeb074a6fc21d271e84
2021-03-16 10:22:09 +09:00
Inseob Kim
2bcc045724 Check vendor_property_contexts namespaces
For devices launching with Android Q or later, vendor_property_contexts
and odm_property_contexts should only contain vendor and odm properties.
This checks property_contexts files in build time.

To temporarily disable this check, users can set
BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE := true in BoardConfig.mk. But
VTS is still enforced, so users will have to fix the violations anyway.

Bug: 175526482
Test: m vendor_property_contexts after making violations
Change-Id: I99d6fff9033d78e1d276eed2682a2719dab84ae2
2021-02-17 12:41:38 +09:00
Bob Badour
601ebb43a3 [LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy
Added SPDX-license-identifier-Apache-2.0 to:
  build/Android.bp
  build/soong/Android.bp
  tests/Android.bp
  tools/Android.bp

Added SPDX-license-identifier-Apache-2.0 legacy_unencumbered to:
  Android.bp
  Android.mk
  compat.mk
  contexts_tests.mk
  mac_permissions.mk
  seapp_contexts.mk
  treble_sepolicy_tests_for_release.mk

Added legacy_unencumbered to:
  apex/Android.bp
  tools/sepolicy-analyze/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I1ab286543ef1bdcb494cf74f2b35e35a08225d28
2021-02-05 01:28:24 -08:00
Inseob Kim
fa6fe474f0 Remove mutator and use standard variant functions
As image variants are now supported directly by android.Module, this
removes a custom mutator in selinux_contexts and uses image variant
functions in android.Module.

InRecovery and InstallInRecovery may be confusing. But refactoring it is
out of scope for this CL.

Test: compare out/soong/build.ninja before and after
Change-Id: I9ebf665a1d50d24bb4e5568a4fd1af4c4eb02c90
2021-02-03 10:53:18 +09:00
Inseob Kim
3a3539a27b Allow sysprop library API files to be missing
If sysprop library contains only internal properties, the API txt file
will be empty. This allows the API files to be missing in such cases to
turn off API-Review bit.

Bug: 177036449
Test: manual test
Change-Id: I9792e46ce6d19e65ee83cb055f76069063bec281
2021-01-15 18:10:29 +09:00
Bob Badour
4eeb6a2eac Revert^2 "Export soong license data to make."
56f419d6c8

Change-Id: I5eebdea9dc8b6f3be1cda23225733df0d78cbbdc
2021-01-06 20:50:49 -08:00
Bob Badour
1135fd71cd Merge "Revert "Export soong license data to make."" 2021-01-06 19:17:44 +00:00
Jerome Gaillard
56f419d6c8 Revert "Export soong license data to make."
Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I9af3727fba03f6b40cd6d77c7e259ef4c9b7f29d
2021-01-06 19:00:05 +00:00
Bob Badour
c182ed7f74 Merge "Export soong license data to make." 2021-01-06 18:08:06 +00:00
Inseob Kim
8ada8a7c1b Support building mixed versions of sepolicy
Now newer system policy and older vendor policy can be built together by
setting following variables:

- BOARD_SEPOLICY_VERS
- BOARD_REQD_MASK_POLICY (copy of older system/sepolicy/reqd_mask)
- BOARD_PLAT_VENDOR_POLICY (copy of older system/sepolicy/vendor)
- BOARD_(SYSTEM_EXT|PRODUCT)_(PUBLIC|PRIVATE)_PREBUILT_DIRS (copy of
  older system_ext and product policies)

Bug: 168159977
Test: try normal build and mixed build
Test: boot and check selinux denials
Change-Id: Ie239580433ffd293fa6891cd665fb5ef83c0a14f
2021-01-06 10:46:15 +09:00
Bob Badour
bd8ca4af30 Export soong license data to make.
Bug: 151953481
Bug: 151177513
Bug: 67772237
Change-Id: I656486070103a2aeaab0e8cbfb3a0af097af8aa8
2021-01-05 08:42:48 -08:00
Colin Cross
242c8bc876 Follow argument changes to RuleBuilder
Pass pctx and ctx to NewRuleBuilder instead of RuleBuilder.Build,
and don't pass ctx to RuleBuilderCommand.BuiltTool.  Follows the
changes in I63e6597e19167393876dc2259d6f521363b7dabc.

Test: m checkbuild
Change-Id: I372e8ecc3c4ea7ca8f66a8e1054eddd1a9af9dbd
2020-11-30 20:22:31 -08:00
Treehugger Robot
9a0cff4756 Merge "build: Rename Plat->SystemExt*SepolicyDirs" 2020-10-12 03:49:24 +00:00
Janis Danisevskis
c40681f1b5 Add libselinux keystore_key backend.
We add a new back end for SELinux based keystore2_key namespaces.
This patch adds the rump policy and build system infrastructure
for installing keystore2_key context files on the target devices.

Bug: 158500146
Bug: 159466840
Test: None
Change-Id: I423c9e68ad259926e4a315d052dfda97fa502106
Merged-In: I423c9e68ad259926e4a315d052dfda97fa502106
2020-08-05 16:11:48 +00:00