Commit graph

323 commits

Author SHA1 Message Date
Inseob Kim
5b98e30451 Merge "Simplify out path of checked vendor property_contexts" into main 2023-11-17 02:24:33 +00:00
Matt Stokes
61ba09b9a8 Merge "Revert "Allow system_server to communicate with virtual_camera"" into main 2023-11-16 18:58:19 +00:00
Matt Stokes
76a62dfb3e Revert "Allow system_server to communicate with virtual_camera"
This reverts commit 45f1ecee7a.

Reason for revert: <Droid TestMonitor b/311401010>

Change-Id: I82716e9d52a66018c5e7d7d13c8292d7d19f253c
2023-11-16 17:42:25 +00:00
Luca Stefani
0b2d711423 Simplify out path of checked vendor property_contexts
Using Join with the fully fledged input path as string
breaks setting a custom $OUT_DIR

Test: export OUT_DIR=`pwd`/out_custom && m nothing
Change-Id: Ie5043c0eb8e5f854be0d0d318008ea24f3d94c09
2023-11-16 17:50:56 +01:00
Ján Sebechlebský
4b16e566e1 Merge "Allow system_server to communicate with virtual_camera" into main 2023-11-16 11:20:43 +00:00
Vadim Caen
45f1ecee7a Allow system_server to communicate with virtual_camera
and consitently name service and process as "virtual_camera" (with
underscore)

Test: Cts VirtalCameraTest
Bug: 270352264
Change-Id: I2c6c0c03aab47aa1795cbda19af25e6661a0bf4a
2023-11-14 15:27:57 +01:00
Treehugger Robot
3f92c1beb3 Merge "Revert "Revert^2 "[avf][rkp] Allow virtualizationservice to regi..."" into main 2023-11-14 02:41:56 +00:00
Alan Stokes
18bcf12fbb Revert "Revert^2 "[avf][rkp] Allow virtualizationservice to regi..."
Revert submission 2812456-revert-2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ-PAWNEHUQBT

Reason for revert: SELinux denials: b/310744536

Reverted changes: /q/submissionid:2812456-revert-2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ-PAWNEHUQBT

Change-Id: I88b5f03dccb1b4ab906afde7d66853e816cce7f1
2023-11-14 01:40:53 +00:00
Alice Wang
dd034824b1 Merge "Revert^2 "[avf][rkp] Allow virtualizationservice to register RKP HAL"" into main 2023-11-13 21:33:49 +00:00
David Drysdale
e7ba3d04e6 Merge "Add the fuzzer for IAuthGraphKeyExchange" into main 2023-11-10 06:55:25 +00:00
Treehugger Robot
66551aa50f Merge changes Ia1c6d00b,I9b3460aa into main
* changes:
  Add macros to flag-guard te and contexts files
  Support passing flag parameters to M4
2023-11-09 14:16:56 +00:00
Hasini Gunasinghe
11e86d28b2 Add the fuzzer for IAuthGraphKeyExchange
Update service_fuzzer_bindings.go with IAuthGraphKeyExchange fuzzer.

Test: N/A
Change-Id: I88e0d72d81be2f982a02a81656f98368edaefc30
2023-11-09 07:24:54 +00:00
Inseob Kim
085f22f82d Add macros to flag-guard te and contexts files
This adds two macros which can be used in te files and contexts files.

* is_flag_enabled(flag_name, codes)
* is_flag_disabled(flag_name, codes)

Also flag-guarding requires to process input files before any
validations. Property contexts test and seapp contexts test are
modified a little to handle that.

Bug: 306563735
Test: build with manual guarding
Change-Id: Ia1c6d00b7aab0da3901c19f16d553153aace018c
2023-11-09 16:05:17 +09:00
Inseob Kim
6cd0dddf1f Support passing flag parameters to M4
This will be used to guard sepolicy changes. Also this adds default
modules for se_policy_conf and contexts modules.

Bug: 306563735
Test: build
Change-Id: I9b3460aaca07d325e0f83a1e2bf0e57caa498101
2023-11-09 16:00:11 +09:00
Treehugger Robot
e84d547758 Merge "Added entries for audioflinger and audiopolicy aidl fuzzer" into main 2023-11-09 05:30:49 +00:00
Keith Mok
df794b4590 SEPolicy for AIDL MACSEC HAL
Bug: 254108688
Test: AIDL MACSEC HAL VTS
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fba6480fa08001a36faf524d0a6952f29d916a6b)
Change-Id: I5ccaa24c6b9600713bbc0e4c523822567b64c662
2023-11-03 21:29:48 +00:00
Ahmad Khalil
70b7a8c76d Merge "Add new vibrator control service to system_server" into main 2023-11-03 14:03:19 +00:00
Ahmad Khalil
7c22e8b3cd Add new vibrator control service to system_server
Bug: 305961689
Test: N/A
Change-Id: Ia4f061d6ae7656fce4c01f5acc2a1314f8ba4ac4
2023-11-03 12:09:04 +00:00
Inseob Kim
dfa4a48b1c Don't fc_sort on platform file contexts
Sorting algorithm of fc_sort is not perfect and often causes unexpected
behaviors. We are moving from fc_sort to manual ordering of platform
file_contexts files.

In addition, this sets remove_comment as true by default, as fc_sort has
been removing comments / empty lines.

Bug: 299839280
Test: TH
Change-Id: Ic8a02b64fc70481234467a470506580d2e6efd94
2023-11-02 17:30:39 +09:00
Hasini Gunasinghe
daa1cec849 Merge "Add sepolicy for non-secure AuthGraph impl" into main 2023-11-01 16:27:51 +00:00
Alice Wang
0407c993d8 Revert^2 "[avf][rkp] Allow virtualizationservice to register RKP HAL"
Revert submission 2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ

Reason for revert: This change relands the topic
https://r.android.com/q/topic:%22expose-avf-rkp-hal%22
The SELinux denial has been fixed in system/sepolicy

Reverted changes: /q/submissionid:2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ

Bug: 308596709
Bug: 274881098
Change-Id: Ib23ac4680b0f37b760bff043e1f42ce61a58c3e2
2023-10-31 20:06:23 +00:00
Alice Wang
072d8fc0db Merge "Revert "[avf][rkp] Allow virtualizationservice to register RKP H..."" into main 2023-10-31 15:13:01 +00:00
Alice Wang
ece557dc7a Revert "[avf][rkp] Allow virtualizationservice to register RKP H..."
Revert submission 2778549-expose-avf-rkp-hal

Reason for revert: SELinux denial
avc:  denied  { find } for pid=3400 uid=10085 name=android.hardware.security.keymint.IRemotelyProvisionedComponent/avf scontext=u:r:rkpdapp:s0:c85,c256,c512,c768 tcontext=u:object_r:avf_remotelyprovisionedcomponent_service:s0 tclass=service_manager permissive=0


Reverted changes: /q/submissionid:2778549-expose-avf-rkp-hal

Bug: 308596709
Change-Id: If8e448e745f2701cf00e7757d0a079d8700d43c0
2023-10-31 15:01:18 +00:00
Alice Wang
7109a31496 Merge "[avf][rkp] Allow virtualizationservice to register RKP HAL service" into main 2023-10-31 12:21:41 +00:00
Alex Xu
f82b6897cf Merge "Add sepolicy for security_state service." into main 2023-10-27 19:20:58 +00:00
Alice Wang
104626ca99 [avf][rkp] Allow virtualizationservice to register RKP HAL service
Bug: 274881098
Test: atest MicrodroidHostTests
Change-Id: Ib0953fa49f27719be63bb244071b132bc385dca3
2023-10-27 09:26:42 +00:00
Alex Xu
902a010aaa Add sepolicy for security_state service.
security_state service manages security state (e.g. SPL) information across partitions, modules, etc.

Bug: 307819014
Test: Manual
Change-Id: I4ebcd8431c11b41f7e210947b32cf64c2adf3901
2023-10-26 06:11:58 +00:00
David Drysdale
c4ab01baad Add sepolicy for non-secure AuthGraph impl
Bug: 284470121
Bug: 291228560
Test: hal_implementation_test
Test: VtsAidlAuthGraphSessionTest
Change-Id: I85bf9e0656bab3c96765cc15a5a983aefb6af66d
2023-10-26 02:00:43 +00:00
Thiébaud Weksteen
b6e7430dad Accept test_data attribute for file_contexts_test
If file_contexts_test is given a test_data attribute, it will use
`checkfc -t` to validate the file_context against it, instead of using
the policy. Both options are mutually exclusive.

Bug: 299839280
Test: m
Change-Id: I3f541e0d0bb5d03ed146e27d67bc811cda3164b1
2023-10-23 16:10:18 +11:00
Thiébaud Weksteen
a69e14f342 Refactor contextsTestModule
Keep the type of context and decides on the flags within
GenerateAndroidBuildActions. This is a no-op but will help supporting
other options for checkfc.

Bug: 299839280
Test: mm
Change-Id: I3a6f9db9d890e0a0ccb3eca37c01b2977fa2e2d1
2023-10-23 11:21:58 +11:00
Vladimir Komsiyski
6e07de8088 Merge "Policy for virtualdevice_native service." into main 2023-10-06 14:20:09 +00:00
Vladimir Komsiyski
31facf0677 Policy for virtualdevice_native service.
A parallel implementation of certain VDM APIs that need to
be exposed to native framework code.

Similar to package_native_service.

Not meant to be used directly by apps but should still be
available in the client process via the corresponding native
manager (e.g. SensorManager).

Starting the service: ag/24955732
Testing the service: ag/24955733

Bug: 303535376
Change-Id: I90bb4837438de5cb964d0b560585b085cc8eabef
Test: manual
2023-10-06 12:52:42 +00:00
Wonsik Kim
98acf4400b Merge "Add a fuzzer for media.c2 HAL" into main am: c8eacad5a8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2736097

Change-Id: If12e0ee24d2b44868a281079f2cd7222ec817284
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-12 17:00:49 +00:00
Wonsik Kim
c8eacad5a8 Merge "Add a fuzzer for media.c2 HAL" into main 2023-09-12 16:14:49 +00:00
Treehugger Robot
d065d025ed Merge "C2 AIDL sepolicy update" into main am: 8342def00a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2721424

Change-Id: I096e99c403f513a203040cf97e199392dc794177
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 19:52:25 +00:00
Treehugger Robot
8342def00a Merge "C2 AIDL sepolicy update" into main 2023-09-07 17:54:05 +00:00
Treehugger Robot
31406c242e Merge changes Ia2c07331,I93f0d222 into main am: f476f5c8f1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2742356

Change-Id: If3a6af8553b6d645653ae38e898c3770b7dab868
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 09:14:47 +00:00
Inseob Kim
5d7423ff3d Build prebuilt policy with Soong
... and remove redundant Makefile codes. This also updates commit hook
as we now only use Soong to build sepolicy.

Bug: 296875906
Test: m selinux_policy
Change-Id: I93f0d222a0c10e31c51c9380780a8927c47d62b1
2023-09-07 16:32:30 +09:00
Wonsik Kim
53e5ae799d Add a fuzzer for media.c2 HAL
Bug: 251850069
Test: presubmit
Change-Id: I4c58df29641465c019147b86bfd58b0e37961b1f
2023-09-06 14:31:27 -07:00
Wonsik Kim
a981983e70 C2 AIDL sepolicy update
Bug: 251850069
Test: presubmit
Change-Id: Ica39920472de154aa01b8e270297553aedda6782
2023-09-06 14:30:26 -07:00
Treehugger Robot
d1710c749b Merge "Relax freeze_test to check only compatibility" into main am: b316f8bf95
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2737118

Change-Id: I575c28928e4c5690fc1b87ee09938cf0ed451476
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 07:06:46 +00:00
Inseob Kim
36d9d39e6e Relax freeze_test to check only compatibility
For now, freeze_test compares prebuilts against sources with diff, to
ensure that sources are identical to prebuilts. However, it could be the
case that the branch should be able to build both REL and ToT. In that
case, changes to the sources are inevitable and the freeze test will
fail.

To fix the issue, freeze_test will now only check compatibility. To be
specific, it will check if any public types or attributes are removed.
Contexts files and neverallow rules are not checked, but they may be
added later. Also to support the new freeze_test

- build_files module is changed to use glob (because REL version won't
  be in compat versions list)
- plat_pub_policy modules are added under prebuilts/api (because
  freeze_test needs that)

Bug: 296875906
Test: m selinux_policy
Change-Id: I39c40992965b98664facea3b760d9d6be1f6b87e
2023-09-05 03:37:18 +00:00
Inseob Kim
9f976cba9d Merge "Remove code about mixed sepolicy build" into main am: 726bcb500c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2733319

Change-Id: I3b3099e72f547e09f1abca1cec1b7c55b6d91593
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 01:33:44 +00:00
Inseob Kim
6c6aa01ae4 Remove code about mixed sepolicy build
There is no one actively using mixed sepolicy build, and it made
sepolicy codes too complicated. As we are deprecating mixed build,
removing such code for cleanup.

Bug: 298305798
Test: boot cuttlefish
Change-Id: I8beedd5a281fa957532deecb857da4e1bb66992a
2023-08-31 16:54:17 +09:00
Inseob Kim
da15aa9d1b Use board api level for seapp coredomain check am: 06518b14f7
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2727834

Change-Id: Ia96fef6b3b70fbe0743efc0cedf6e6767ba584d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-29 01:56:08 +00:00
Xin Li
80690d5086 Merge "Merge Android U (ab/10368041)" into aosp-main-future 2023-08-28 22:13:48 +00:00
Inseob Kim
06518b14f7 Use board api level for seapp coredomain check
Rather than PRODUCT_SHIPPING_API_LEVEL, use board api level
(BOARD_API_LEVEL or BOARD_SHIPPING_API_LEVEL) to determine whether we
check coredomain violations or not.

Bug: 280547417
Test: see build command of vendor_seapp_contexts
Change-Id: I20859d6054ab85f464b29631bdfd55ade3e78f53
2023-08-25 21:20:08 +09:00
Kangping Dong
5e82983ee4 Merge "[Thread] add sepolicy rules for Thread system service" into main 2023-08-24 06:42:08 +00:00
Xin Li
e07dbe0a63 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: Id2cc5dbbafffb4633706e5cc728cb44abd417340
Change-Id: I77e68f17a1273958bcdc32b5a4b6a0ff3ffdfd2a
2023-08-23 17:20:59 -07:00
Kangping Dong
45efca84e5 [Thread] add sepolicy rules for Thread system service
Add SEPolicy for the ThreadNetworkService
Add Fuzzer exception, thread_network service is java only

FR: b/235016403

Test: build and start thread_network service
bug: 262683651
Change-Id: Ifa2e9500dd535b0b4f2ad9af006b8dddaea900db
2023-08-23 17:08:58 +08:00