Commit graph

41900 commits

Author SHA1 Message Date
Seungjae Yoo
2151f06ada Merge "Change sepolicy of virtualizationservice and vfio_handler for VM DTBO" into main 2023-09-08 05:04:03 +00:00
Treehugger Robot
6952d2f612 Merge "Use prebuilts for compat test if prebuilts exist" into main 2023-09-08 04:35:02 +00:00
Inseob Kim
472d7dcada Fix se_freeze_test
The module name is changed but it isn't applied to Android.mk

Bug: 296875906
Test: m selinux_policy and see se_freeze_test run
Change-Id: Ia25845a1aff2c2b5f910f8432a455ee93a157580
2023-09-08 11:54:11 +09:00
Inseob Kim
2aac33597d Use prebuilts for compat test if prebuilts exist
system/sepolicy should support both REL build and ToT build. That means
that system/sepolicy and prebuilts may differ. As the frozen sepolicy is
what vendor sepolicy uses, so we need to use prebuilts to run Treble
compat test.

Bug: 296875906
Test: m selinux_policy on REL
Change-Id: I4b290266ba87e3f011d640bec133fc88359ea52f
2023-09-08 10:44:49 +09:00
Ady Abraham
ab64129dbb Merge "sepolicy: allow surfaceflinger to read device_config_aconfig_flags_prop" into main 2023-09-07 19:16:18 +00:00
Treehugger Robot
8342def00a Merge "C2 AIDL sepolicy update" into main 2023-09-07 17:54:05 +00:00
Treehugger Robot
f476f5c8f1 Merge changes Ia2c07331,I93f0d222 into main
* changes:
  Use only public cil files for Treble compat test
  Build prebuilt policy with Soong
2023-09-07 08:52:45 +00:00
Seungjae Yoo
f0aaa15d28 Change sepolicy of virtualizationservice and vfio_handler for VM DTBO
Bug: 297103622
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid --devices /sys/bus/platform/devices/16d00000.eh --protected
Change-Id: Icebba7f441a94f8ba54b4a9d35036d4202a513ab
2023-09-07 17:07:44 +09:00
Kangping Dong
1348776bed Merge "[Thread] move ot-ctl to vendor" into main 2023-09-07 07:58:17 +00:00
Inseob Kim
0d49b9bc28 Use only public cil files for Treble compat test
Rationale for this change:

1) Vendors use only public files, so we should be able to use only
   public cil files for compatibility test.
2) treble_sepolicy_tests_for_release.mk is too complex, because it
   requires compiled sepolicy. Reducing the complexity will help migrate
   into REL build.
3) This fixes a tiny bug of treble_sepolicy_tests that it can't catch
   public types being moved to private types, and then removed. 29.0.cil
   and 30.0.cil change contains such missing public types.

Bug: 296875906
Test: m selinux_policy (with/without intentional breakage)
Change-Id: Ia2c0733176df898f268b5680195da25b588b09c7
2023-09-07 16:35:08 +09: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
Ady Abraham
62d337ec6d sepolicy: allow surfaceflinger to read device_config_aconfig_flags_prop
Bug: 297528870
Change-Id: I711bc8fa3aa1c8f90588327a411f46421f14da90
Test: presubmit
2023-09-07 02:47:45 +00:00
Wonsik Kim
a981983e70 C2 AIDL sepolicy update
Bug: 251850069
Test: presubmit
Change-Id: Ica39920472de154aa01b8e270297553aedda6782
2023-09-06 14:30:26 -07:00
Kangping Dong
fd10f344dc [Thread] move ot-ctl to vendor
"ot-ctl" is a command line tool which is useful for debugging or
testing with "ot-daemon". It's not required to be part of the
system image. It was previously added to the com.android.threadnetwork
apex package, and this commits removes it from the apex.

Test: ot-ctl is removed from /apex/com/android/threadnetwork/bin
Bug: 299224389
Change-Id: I607a02c9efb26f404ea9da2e5b7109094d3232b6
2023-09-06 14:07:02 +08:00
Inseob Kim
eb0d40aa85 Move tests from treble_sepolicy_tests
Contrast to its name, sepolicy_tests also contains tests related to
Treble. Also tests other than the compat mapping test in
treble_sepoliy_tests don't need to be run several times.

Moving tests except for compat mapping test to sepolicy_tests to
simplify treble_sepolicy_tests and to reduce build time.

Bug: 288807412
Test: m selinux_policy
Test: atest SELinuxHostTest
Change-Id: I102fa48faf49b7028dc1bb5f21de65fa99babe6f
2023-09-06 14:26:25 +09:00
Treehugger Robot
0acb54ce2c Merge "Allow crash_dump to read vendor apex dir." into main 2023-09-05 12:04:20 +00:00
Jooyung Han
18a42afb49 Allow crash_dump to read vendor apex dir.
Bug: 298699169
Test: crash dumps from a binary in vendor apex
Change-Id: I4eb2c4162ae2e78ef126987e7de0f838b6db205c
2023-09-05 17:51:38 +09:00
Treehugger Robot
b316f8bf95 Merge "Relax freeze_test to check only compatibility" into main 2023-09-05 06:29:39 +00:00
Thiébaud Weksteen
70dc0bb5dc Merge "Remove SeamendcHostTest from TEST_MAPPING" into main 2023-09-05 05:10:01 +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
Treehugger Robot
3e4b7bf2ce Merge "[service-vm] Adjust sepolicy for running service VM" into main 2023-09-04 17:10:03 +00:00
Alice Wang
e1bb7d02e1 Merge "[avf] Fix warning when runnning Microdroid" into main 2023-09-04 15:18:49 +00:00
Alice Wang
40519f79dc [service-vm] Adjust sepolicy for running service VM
Bug: 278858244
Test: Runs the ServiceVmClientApp in VM
Test: atest MicrodroidHostTests
Change-Id: Ia59fe910edc0826aa5866468c27558e9d190b58d
2023-09-04 13:01:53 +00:00
Alice Wang
ea51816b10 [avf] Fix warning when runnning Microdroid
This cl fixes the following selinux denial:

09-04 10:15:34.544  3393  3393 W binder:3393_2: type=1400 audit(0.0:17): avc:  denied  { getattr } for  path="socket:[99352]" dev="sockfs" ino=99352 scontext=u:r:virtualizationmanager:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0

Test: Runs the ServiceVmClientApp
Change-Id: I5f69bc966f8e136dab19d1fdc0bc79190bef5ca5
2023-09-04 12:26:03 +00:00
Jaewan Kim
796ec5f0cb Set neverallow for hypervisor test properties
Bug: 298306391
Change-Id: I754af47d063bb26549cd1793951b09262cadd95a
Test: TH
2023-09-01 07:55:09 +00:00
Jaewan Kim
4183cbb63c Label hypervisor test properties
Bug: 298306391
Change-Id: I160101325989f58ef3403ec5be20895468c2ccbb
Test: TH, atest CustomPvmfwHostTestCases
2023-09-01 02:43:38 +00:00
Inseob Kim
726bcb500c Merge "Remove code about mixed sepolicy build" into main 2023-09-01 01:06:38 +00:00
Pawan Wagh
2eb2d1c80b Merge "Adding ro.product.build.16k_page.enabled to property contexts" into main 2023-09-01 00:26:13 +00:00
Daeho Jeong
e7a31d52c7 Merge "compress logcat files" into main 2023-08-31 22:46:43 +00:00
Kean Mariotti
b378302763 Merge "Allow traceur_app to access winscope traces" into main 2023-08-31 22:05:35 +00:00
Pawan Wagh
60cc0b3a39 Adding ro.product.build.16k_page.enabled to property contexts
This property will be used to set 16k dev options on device.
This will be product specific property and will be added on
specific devices.

Test: m, booted device with PRODUCT_16K_DEVELOPER_OPTION ON/OFF and
verified option visibility.
Bug: 297922563

Change-Id: I2be5e7236eb8259ef6d5893e70712a5c89aaad52
2023-08-31 20:30:04 +00:00
Devin Moore
424c64de83 Merge "Moving hwservicemanager and allocator to system_ext" into main 2023-08-31 15:51:14 +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
Thiébaud Weksteen
9547e81612 Remove SeamendcHostTest from TEST_MAPPING
Bug: 297794885
Test: TH
Change-Id: I9f508b1cab5a8e386457cc645b2ef7d0897b8692
2023-08-31 14:20:59 +10:00
Treehugger Robot
40c32c1b91 Merge "Allow VS to read vendor cfg for assignable devices" into main 2023-08-30 16:14:34 +00:00
Inseob Kim
d61618bcb6 Allow VS to read vendor cfg for assignable devices
Bug: 297313212
Test: add /vendor/etc/avf/assignable_devices.xml and run vm info
Change-Id: I602be057b118ac68a59e6c4f5f7fce17685cd7ae
2023-08-30 14:14:51 +09:00
Treehugger Robot
b30f713bd4 Merge "Reland "Make coredomain violation as a build error"" into main 2023-08-30 01:47:46 +00:00
Inseob Kim
e65098d4a7 Reland "Make coredomain violation as a build error"
This reverts commit 3bda1c9761.

Reason for revert: The fix ag/24590089 is verified with ABTD and merged

Change-Id: I17124df1ddfd52cbd2a17b1a90e0f332eb4e41f9
2023-08-30 00:24:06 +00:00
Samuel Wu
0bbc9270e0 Merge "Revert "Make coredomain violation as a build error"" into main 2023-08-29 23:41:19 +00:00
Samuel Wu
3bda1c9761 Revert "Make coredomain violation as a build error"
This reverts commit 9289cf6fa7.

Reason for revert:
DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=cf_x86_64_auto-trunk_staging-userdebug&lkgb=10733608&lkbb=10733914&fkbb=10733779, bug b/298102197

Bug: 298102197

Change-Id: Ia68dc64d3a7b02195e72d1c85ae8c9280fa665cc
2023-08-29 23:40:24 +00:00
Thiébaud Weksteen
69a9189ddf Merge "Update documentation on binderservicedomain" into main 2023-08-29 23:27:50 +00:00
Thiébaud Weksteen
9432227844 Merge "Grant dumpstate access to artd service" into main 2023-08-29 23:20:27 +00:00
Inseob Kim
9289cf6fa7 Make coredomain violation as a build error
Also add how to fix the volations.

Bug: 280547417
Test: m selinux_policy with violations
Change-Id: Icdce73bf0c3b3d98297606958e45e5dd9192f8a0
2023-08-29 01:15:14 +00:00
Thiébaud Weksteen
5e9b88f739 Update documentation on binderservicedomain
The binderservicedomain attribute grants further permissions than its
name suggests. Update the documentation to avoid its usage.

Bug: 297785784
Test: build, documentation update only.
Change-Id: I41bc6f32cf4d56bde320261fe221c3653cda945a
2023-08-28 12:22:17 +10:00
Thiébaud Weksteen
8a250b9099 Grant dumpstate access to artd service
The artd daemon is not always active. When running, it exposes a binder
service which may be dumped when a bug report is triggered. The current
policy did not fully grant access which resulted in spurious denials if
a bugreport was triggered when the daemon was running.

Test: Run bugreport; observe correct dump of artd service
Bug: 282614147
Bug: 192197221
Change-Id: Ie0986d7716de33ec38ae09cfee14c629f5a414a6
2023-08-28 10:53:58 +10:00
Daeho Jeong
6ac8e4cf00 compress logcat files
Change selinux policy to compress logcat files.

Test: check whether logcat files are compressed
Bug: 295175795
Change-Id: Ib120700c6dab4b1d0e29f0e19e55793bfb7a1675
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2023-08-25 15:02:34 -07: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
Yu Shan
3734f169ca Merge "Allow remoteaccess V2 and VHAL v2/v3." into main 2023-08-24 17:39:08 +00:00
Treehugger Robot
33a68d6284 Merge "Policy changes for running payloads not as root" into main 2023-08-24 08:07:21 +00:00
Treehugger Robot
171a6fbca2 Merge "Allow init to access user mode helpers" into main 2023-08-24 08:06:42 +00:00