Commit graph

41900 commits

Author SHA1 Message Date
Martin Stjernholm
2d6ee0286e Allow otapreopt_chroot to use stdin and stdout pipes.
Test: See https://r.android.com/2681675
Bug: 293639539
Change-Id: I89ed8bcf5b5307736c53f9b345ac8a288584afad
2023-08-07 21:21:20 +01:00
Victor Hsieh
264432ab71 Allow installd to enable fs-verity on app's file
See aosp/2681476 for more details.

Bug: 285185747
Test: Call installd from a local client, no denial
Change-Id: Ie3fa45aceb8a6e61123d477bd994d964a3ae6529
2023-08-07 11:08:34 -07:00
Jiyong Park
a5365f94de Fix typo: async_persist_write -> async_persist_writes
The correct property name that init uses ends with 's' and shown in [1].

[1] https://cs.android.com/android/platform/superproject/main/+/main:system/core/init/property_service.cpp;l=1513?q=ro.property_service.async_persist_writes&ss=android%2Fplatform%2Fsuperproject%2Fmain#:~:text=1512-,1513,-1514

Bug: 250125146
Test: N/A
Change-Id: I8cd09e2908d53ecb41a1dee621821a2faca604b1
2023-08-08 02:01:50 +09:00
Treehugger Robot
995ee52887 Merge "Use regular file for VM DTBO" into main 2023-08-07 08:54:53 +00:00
igorzas
7489e93613 Add RemoteAuthService
Add SEPolicy for the RemoteAuth Manager/Service
Add Fuzzer exception, remote_auth service is going to be in Java and
Rust only

Design doc: go/remote-auth-manager-fishfood-design

Test: loaded on device.
Bug: 290092977
Change-Id: I4decb29b863170aed5e7c85da9c4b50c0675d3bd
2023-08-04 17:55:14 +00:00
Jakob Schneider
09916a69c9 Merge "Add SEPolicy for the ArchiveManager/Service." into main 2023-08-04 16:10:01 +00:00
Jakob Schneider
5c5a6af643 Add SEPolicy for the ArchiveManager/Service.
Test: boots - CTS coming in a future change
Change-Id: Ia42bc21e1523c7b225b7c84c3a3f18dd3ed1a54f
2023-08-04 14:13:03 +01:00
Inseob Kim
bbe514d9b3 Use regular file for VM DTBO
Bug: 287379025
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid \
      --protected --mem 512 --devices \
      /sys/bus/platform/devices/16d00000.eh
Change-Id: Id77c25f5f22672da9281078fc17f45087d893f4d
2023-08-04 15:26:17 +09:00
Jiyong Park
bf36988355 Merge "Label ro.property_service.async_persist_write as build_config_prop" into main 2023-08-04 04:09:48 +00:00
Treehugger Robot
a1beaa570b Merge "Don't audit shell_test_data_file for runas_app" into main 2023-08-04 00:06:39 +00:00
Fabien Sanglard
0876d7a978 Don't audit shell_test_data_file for runas_app
Test: NA
Bug: 291838956
Change-Id: Iab61ade7fc105004c59da7b827f0aa5151b5f3ab
2023-08-03 21:28:21 +00:00
Kangping Dong
9d965761ca Merge "add sepolicy rules for OT daemon binder service" into main 2023-08-03 14:13:21 +00:00
Kangping Dong
0b3e8c62ee add sepolicy rules for OT daemon binder service
Bug: 262681784
Change-Id: I3b4d3603709a761ad1410b81c0e5b4e4fc51c43c
2023-08-03 13:31:53 +08:00
Kelvin Zhang
0e7babefee Merge "Give vold permission to wipe a block device" into main 2023-08-02 23:31:50 +00:00
Kelvin Zhang
2b413622ce Give vold permission to wipe a block device
During mountFstab call, vold might need to wipe and re-format a device.
See code in system/vold/model/PublicVolume.cpp , PublicVolume::doFormat
Allow IOCTLs such as BLKDISCARDZEROES for wiping.

Test: th
Bug: 279808236
Change-Id: I0bebf850aa45ece6227fa5c3e9c3fdb38164f79e
2023-08-02 14:27:08 -07:00
Bin Huang
bdb54b5d38 webview: Add cgroup setattr of file permission
On 32 bit gsi img, when the webview launch, system will crash, due to
system_server cgroup not have the selinux permission that setattr of file.

Bug:288190486
Test: flash 32-bit GSI image and boot to check whether webview crash

Change-Id: Ibe136965d7c47c6240a8e4464e4580fe7bd7eccc
2023-08-02 11:09:58 +00:00
Treehugger Robot
6ebc7deb48 Merge "Add permission for VFIO device binding" into main 2023-08-02 10:51:08 +00:00
Jiyong Park
b08766a6ea Label ro.property_service.async_persist_write as build_config_prop
So far, it has been labeled as default_prop because there was no entry
for the sysprop in property_context. As a result, it couldn't be set by
vendor_init.

Fixing that by correctly labeling it. build_config_prop is defined as
`system_vendor_config_prop` which vendor_init can set.

Bug: 250125146
Test: adb root && adb shell ro.property_service.async_persist_write 1
adb shell getprop -Z ro.property_service.async_persist_write

shows [ro.property_service.async_persist_write]: [u:object_r:build_config_prop:s0]

Change-Id: Ib30c708c8c2693892503a8f0d590541984c2667b
2023-08-02 16:21:07 +09:00
Inseob Kim
825056de9a Add permission for VFIO device binding
vfio_handler will bind platform devices to VFIO driver, and then
return a file descriptor containing DTBO. This change adds
permissions needed for that.

Bug: 278008182
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid \
      --devices /sys/bus/platform/devices/16d00000.eh --protected
Change-Id: Ie947adff00d138426d4703cbb8e7a8cd429c2272
2023-08-02 15:06:51 +09:00
Jooyung Han
0ce8184bed Allow vold_prepare_subdirs to use apex_service
to get the list of active APEXes.

Bug: 293949266
Bug: 293546778
Test: CtsPackageSettingHostTestCases
Change-Id: I86f58158b97463206fb76a0c31f29b78874f4c35
2023-08-01 10:46:03 +00:00
Jooyung Han
e9e32f58a1 Merge "Revert "Add /bootstrap-apex"" into main 2023-08-01 10:44:45 +00:00
Jooyung Han
aca291806e Revert "Add /bootstrap-apex"
Revert submission 2666915-share-bootstrap

Reason for revert: b/293949266 vold_prepare_subdirs fails to create apexdata directories.

Reverted changes: /q/submissionid:2666915-share-bootstrap

Change-Id: Idab6db691c1130a1f5d596f5e05783cab7fdde05
2023-08-01 09:06:42 +00:00
Jooyung Han
8b295ddaf2 Merge "Add /bootstrap-apex" into main 2023-07-31 21:53:57 +00:00
Inseob Kim
d7d3609af7 Ensure vendor seapp contexts can't use coredomain
Bug: 280547417
Test: build
Change-Id: Iadff17523767f91f073c6569400e17f1da55fbdc
2023-07-28 16:18:11 +09:00
Lee George Thomas
db1535a09b Merge "Label /data/misc/bootanim with bootanim_data_file." into main 2023-07-27 17:34:08 +00:00
Treehugger Robot
598de5b6c8 Merge "Remove redundant allows" into main 2023-07-27 09:23:23 +00:00
Eric Biggers
dfe3906e7b Merge "Revert "Remove fsverity_init SELinux rules"" into main 2023-07-26 18:06:52 +00:00
Alan Stokes
25ab737cb7 Remove redundant allows
While searching the policy I came across some ancient TODOs, which can
now be done.

Bug: 186396070
Test: atest MicrodroidTests MicrodroidHostTests
Test: Manually run vm_shell start-microdroid
Change-Id: I21b9f992394b637399cc074dca8339e3167cf5af
2023-07-26 17:12:23 +01:00
Alfred Piccioni
e850e98669 Merge "Add dontaudit for rs fd usage" into main 2023-07-26 12:47:12 +00:00
Vadim Caen
bb59231998 Merge "Policy for virtual_camera" into main 2023-07-26 12:20:17 +00:00
Dennis Shen
d0042c6e99 Merge "SELinux allow listing core_experiements_team_internal namespace" into main 2023-07-26 12:16:44 +00:00
Inseob Kim
60b8c39abc Merge "Update seapp_contexts precedence documentation" into main 2023-07-26 11:39:08 +00:00
Inseob Kim
7bb1b5d170 Update seapp_contexts precedence documentation
Bug: 280547417
Test: TH
Change-Id: I914ef7a7f87b0646411a67e4eec128b61d3ff321
2023-07-26 11:28:55 +00:00
Alfred Piccioni
dcb9c2b044 Add dontaudit for rs fd usage
These issues pop up on ocassion, and are very hard to diagnose. Since
renderscript is deprecated, we shouldn't be seeing any new problems with
it, but there isn't pressure to fix these issues as renderscript should
go away on it's own eventually.

Fixes: 291211299
Test: Boot, no audit statements.
Change-Id: I9d595520ecabea562b8e9d4b113bb18db101219a
2023-07-26 12:12:41 +02:00
Yunkai Lim
486fa9fb0a Revert "Remove fsverity_init SELinux rules"
Revert submission 2662658-fsverity-init-cleanup

Reason for revert: Culprit for test breakage b/293232766

Reverted changes: /q/submissionid:2662658-fsverity-init-cleanup

Change-Id: I941c28e44890edd0e06dcc896fbd5158d34fded3
2023-07-26 06:21:37 +00:00
Lee George Thomas
407e1cf1a4 Label /data/misc/bootanim with bootanim_data_file.
/data/bootanim location is changed to /data/misc/bootanim as a follow up
change to aosp/q/topic:"bootanim_data_folder". The label is updated for the new file location.

Bug: 210757252
Test: /data/misc/bootanim is labeled correctly. BootAnimation can access this folder.

Change-Id: I9a54cf0dba470302df4180fb17fb104fb483b23d
2023-07-25 23:33:30 +00:00
Eric Biggers
3a575356fa Merge "Remove fsverity_init SELinux rules" into main 2023-07-25 22:49:09 +00:00
Dennis Shen
3b8c57fb93 SELinux allow listing core_experiements_team_internal namespace
Bug: b/291771863
Change-Id: I788e4d5241d824dee249aa8c6d7cb5405c0fac37
2023-07-25 20:15:02 +00:00
Vadim Caen
d64cf75c48 Policy for virtual_camera
Adds a policy to run the virtual_camera process which:
 - registers a service implementing the camera HAL
 - registers a service to reveive communicate with virtual cameras via
   system_server

Bug: 253991421
Test: CTS test
android.virtualdevice.cts.VirtualDeviceManagerBasicTest#createDevice_createCamera

Change-Id: I772d176919b8dcd3b73946935ed439207c948f2b
2023-07-25 19:27:48 +00:00
Treehugger Robot
9f8e315bc8 Merge "Allow dex2oat access to symlinks in APEXes to find DCLA libs." into main 2023-07-25 15:25:57 +00:00
Martin Stjernholm
502a036436 Allow dex2oat access to symlinks in APEXes to find DCLA libs.
With the introduction of DCLA (/apex/sharedlibs APEX), .so files can be
symlinked into that APEX, so we need to allow reading symlinks to be
able to link the dex2oat binary successfully.

This fixes "CANNOT LINK EXECUTABLE" errors for dex2oat during OTA
preopting.

Test: Apply an OTA manually and check logs for errors
Bug: 291974157
Change-Id: I9eca91c94e8d33fe618783cea262ea3881957620
2023-07-25 00:07:27 +01:00
Jooyung Han
1c846df3b0 Add /bootstrap-apex
It will be used to mount bootstrap APEXes. (with bind-mount to /apex)

Bug: 290148078
Test: atest VendorApexHostTestCases
Change-Id: I1a82af37db368a0eb2bf3a002a47439fb1f8b61d
2023-07-22 20:44:00 +09:00
Pontus Lidman
1d68b1b2da Merge "Add SELinux config for new SensorFusion property" into main 2023-07-21 20:52:40 +00:00
Pontus Lidman
0af0e71062 Add SELinux config for new SensorFusion property
Add required SELinux configuration to support the sensor
configuration property:
sensors.aosp_low_power_sensor_fusion.maximum_rate

Test: use getprop to verify presence and readability
of the new property. dumpsys sensorservice to verify
sensor service is picking up the property value.

Change-Id: I96b8fd6ce72d7a5bf69b028802b329b03f261585
2023-07-21 00:42:24 +00:00
Devika Krishnadas
d4908949ef Merge "Add label for allocator 2 service" into main 2023-07-20 18:36:23 +00:00
Eric Biggers
306f510611 Remove fsverity_init SELinux rules
Since the fsverity_init binary is being removed, remove the
corresponding SELinux rules too.

For now, keep the rule "allow domain kernel:key search", which existed
to allow the fsverity keyring to be searched.  It turns out to actually
be needed for a bit more than that.  We should be able to replace it
with something more precise, but we need to be careful.

Bug: 290064770
Test: Verified no SELinux denials when booting Cuttlefish
Change-Id: I992b75808284cb8a3c26a84be548390193113668
2023-07-20 17:57:23 +00:00
Kiyoung Kim
4b6eabed21 Merge "Label former VNDK-SP libraries in vendor as sphal" into main 2023-07-20 01:46:44 +00:00
Lee George Thomas
ae8d169405 Merge "Add SELinux context for a new lmk system property" into main 2023-07-19 22:28:24 +00:00
Devika Krishnadas
c850a596b9 Add label for allocator 2 service
Bug: 287353739

Change-Id: Ia78237361acac4b668d87ec94746e43945f58bbf
Signed-off-by: Devika Krishnadas <kdevika@google.com>
2023-07-19 20:20:52 +00:00
Kiyoung Kim
0c3a3fd799 Label former VNDK-SP libraries in vendor as sphal
When VNDK is being deprecated, former VNDK-SP libraries should be loaded
from vendor when system process uses SP-HAL, but this currently fails
because all former VNDK-SP libraries will be marked as vendor library.
This change labels former VNDK-SP libraries installed in the vendor
partition as same labels with SP-HAL libraries so it can be loaded from
system processes.

Bug: 291673098
Test: aosp_cf boot succeded with KEEP_VNDK=false build flag.
Change-Id: I2601ae8e7acd5bbd16fdbe6cee078dfcaa1a5aa2
2023-07-19 14:13:06 +09:00