Commit graph

47628 commits

Author SHA1 Message Date
Ellen Arteca
aa898dc541 Modify permissions to move encryption policy assignment to vold_prepare_subdirs
We have moved the encryption policy assignment from vold to
vold_prepare_subdirs. This CL removes some permissions from vold
over storage areas that are no longer needed due to this change,
and adds some permissions to vold_prepare_subdirs.

Bug: 325129836
Test: atest StorageAreaTest
Change-Id: Ief2a8021ed3524018d001e20eae60f712f485d81
2024-06-06 17:48:43 +00:00
Dennis Shen
0467d14618 Merge "selinux: allow everybody to read flags from RO flag storage file" into main 2024-06-04 17:11:18 +00:00
Dennis Shen
33bc92dab5 selinux: allow everybody to read flags from RO flag storage file
Bug: b/312459182
Test: m and avd
Change-Id: Ie5ce92b299ce2434256c9f963865b9d626b400fa
2024-06-04 15:02:56 +00:00
Treehugger Robot
c6a554f200 Merge "Allow dexopt_chroot_setup to mount/unmount debugfs." into main 2024-06-04 13:54:51 +00:00
Jiakai Zhang
413f44d5c4 Allow dexopt_chroot_setup to mount/unmount debugfs.
Some old devices use debugfs for /sys/kernel/debug.

Bug: 311377497
Change-Id: Ib9958b5cfdd85c37acd27ff6e637efdbd2a068e3
Test: adb shell pm art pr-dexopt-job --test
2024-06-04 12:54:25 +00:00
Treehugger Robot
8d9a89ed9e Merge "Allow dexopt_chroot_setup to bind-mount dirs for incremental apps." into main 2024-06-04 12:48:49 +00:00
Treehugger Robot
8ebc2aa055 Merge "testNoBugreportDenials fix on user" into main 2024-06-04 01:20:02 +00:00
Jooyung Han
672143fa6a Merge "installd renames dirs in /data/app-staging" into main 2024-06-04 01:12:49 +00:00
Jiakai Zhang
0a49ac3dbd Allow dexopt_chroot_setup to bind-mount dirs for incremental apps.
Bug: 311377497
Test: adb shell pm art pr-dexopt-job --test
Change-Id: I8da90876191eadfea77d34c7441d0e4bdb377d31
2024-06-03 20:43:25 +01:00
Steven Moreland
496f08d378 testNoBugreportDenials fix on user
Bug: 343635916
Test: N/A
Change-Id: I2f73cc8429f87e9b7ada8e7c9a3fabcc9eb3d7ee
2024-06-03 19:30:04 +00:00
Daniel Zheng
2f4324ac5d Merge "add sepolicy for low mem device configurations" into main 2024-06-03 19:17:52 +00:00
Treehugger Robot
da362e9fa9 Merge "Improve CIL parsing" into main 2024-06-03 09:09:21 +00:00
Treehugger Robot
d7f526fd05 Merge "Allow system_server to kill artd and its subprocesses." into main 2024-06-03 08:27:59 +00:00
Jooyung Han
cb51acc9dc installd renames dirs in /data/app-staging
before removing a session directory. Hence, it needs more permissions on
staging_data_file.

Bug: 343165326
Test: atest CtsStagedInstallHostTestCases:com.android.tests.stagedinstall.host.StagedInstallTest#testRebootlessUpdate_unsignedPayload_fails
Change-Id: Ic94c74d4ef896129491cee39098f43f33793851f
2024-06-03 14:24:46 +09:00
Mu-Le Lee
12d84e2484 Merge "Sepolicy for crosvm to play audio with aaudio" into main 2024-06-01 01:28:10 +00:00
Treehugger Robot
5bad7a2683 Merge "lmkd: Adding io_uring support" into main 2024-06-01 00:14:11 +00:00
Jiakai Zhang
03f9866873 Allow system_server to kill artd and its subprocesses.
This is to make sure that no process is accessing files in chroot when
we teardown chroot.

Bug: 311377497
Test: Set a very short timeout for `ensureNoProcessInDir` and run
  Pre-reboot Dexopt.
Change-Id: I5c60497c73a9d56068e47840ffd4a0f0a550c250
2024-05-31 19:06:12 +01:00
Jiakai Zhang
ca2f3851af Merge "Allow system_server to read from postinstall scripts through STDIN." into main 2024-05-31 14:43:51 +00:00
Jiakai Zhang
92768f7a41 Allow system_server to read from postinstall scripts through STDIN.
Bug: 311377497
Test: -
  1. system/update_engine/scripts/update_device.py out/dist/aosp_cf_x86_64_phone-ota-*.zip
  2. Wait for update_engine to enter the postinstall stage.
  3. adb shell update_engine_client --cancel
Change-Id: Ib0cbfc7b97d5ec24700ca71099e3a47af579fc8a
2024-05-31 12:26:43 +01:00
Alan Stokes
39507ae44e Improve CIL parsing
treble_sepolicy_tests gets very confused by parentheses in comments.

Fix the search for the opening parenthesis of a statement to skip
comments.

And then update a comment that was intended to use parentheses to
actually do so. (Without the parser change, this fails horribly.)

Test: Build
Change-Id: I1e36136e97dd9b8190add29b7f2155a08ea87d80
2024-05-31 12:24:38 +01:00
Alan Stokes
e65ff877d2 Compatibility for vendor_hidraw_device
Older vendor policy may apply the label vendor_hidraw_device to the
HID device.

From Android V we use the new label hidraw_device for this.

Fix the compatibility rules to allow new system policy to work with
older vendor policy:
- Add vendor_hidraw_device for devices that don't have it (duplicate
  definitions are ignored when we compile CIL).
- Add compatibility mapping so that rules for hidraw_device also
  apply to vendor_hidraw_device on devices with older vendor.

Bug: 340923653
Test: Builds, boots, no new denials
Change-Id: I3ffc44be2c98be137303263f569515103c4996b8
2024-05-31 12:22:57 +01:00
Kelvin Zhang
7babcdb8d8 Revert^2 "Add ro.fstype.data to indicate fs type of /data"
d6c52fdbd0

Change-Id: I160dadeb63db41618f37c66114518b49befc9d1a
2024-05-30 12:16:42 -07:00
Treehugger Robot
f1956206fc Merge "Define UWB snoop log in sepolicy" into main 2024-05-30 17:58:47 +00:00
Treehugger Robot
75c6fe25a1 Merge "Fix installation of keystore2_key_contexts files" into main 2024-05-30 09:02:07 +00:00
Seungjae Yoo
7bd158dad2 Merge "Let crosvm be able to use TAP interface created by vmnic" into main 2024-05-30 03:26:10 +00:00
Inseob Kim
7904f2144e Fix installation of keystore2_key_contexts files
system_ext, product, and vendor keystore2_key_contexts are not installed
correctly, due to missing REQUIRED dependencies and typo.

Bug: 338684892
Test: build and check each partition
Change-Id: Ic18bf05609d27c322375baf6b72f5e2c75c1bfa0
2024-05-30 11:05:31 +09:00
Inseob Kim
9e6d89bac4 Merge changes from topic "virtualizationmanager_fuzzer" into main
* changes:
  Add virtualizationmanager fuzzer
  gofmt service_fuzzer_bindings
2024-05-30 01:03:32 +00:00
Priyanka Advani
afb462c006 Merge "Revert "Add ro.fstype.data to indicate fs type of /data"" into main 2024-05-29 23:58:59 +00:00
Kelvin Zhang
d6c52fdbd0 Revert "Add ro.fstype.data to indicate fs type of /data"
Revert submission 3095293-fstype

Reason for revert: breaks build cf_x86_64_only_phone-next-userdebug

Reverted changes: /q/submissionid:3095293-fstype

Change-Id: I420ad91ba47d0ab0125a7f55a6b9533a8f1bc5a4
2024-05-29 23:26:16 +00:00
Treehugger Robot
4d77ed4216 Merge "Add ro.fstype.data to indicate fs type of /data" into main 2024-05-29 17:49:18 +00:00
Treehugger Robot
0a3f94e01f Merge "Allow artd to kill subprocesses during Pre-reboot Dexopt." into main 2024-05-29 11:13:54 +00:00
Yi-Yo Chiang
d9c73d7aaf Merge "Allow vmlauncher_app to create ptys to communicate with shell" into main 2024-05-29 05:54:43 +00:00
Inseob Kim
9bd1809252 Merge "Grant dalvik_dynamic_prop access to power HAL" into main 2024-05-29 00:52:45 +00:00
Jiakai Zhang
c9b01d60cf Allow artd to kill subprocesses during Pre-reboot Dexopt.
Bug: 311377497
Test: Run and cancel Pre-reboot Dexopt.
Change-Id: I6dd96a3644b66586a59064ed3cf9b3e5bb7ee0c5
2024-05-28 19:05:26 +01:00
Seungjae Yoo
12fd482d55 Let crosvm be able to use TAP interface created by vmnic
Bug: 340376951
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid
--network-supported

Change-Id: Ic2828b8e6c82269d0180dbac9466ae2874435596
2024-05-28 14:33:40 +09:00
Inseob Kim
0f6ddab01c Merge "microdroid: Add rules for /sys/kernel/mm/pgsize_migration/enabled" into main 2024-05-28 01:49:48 +00:00
Kalesh Singh
d60a38b02e microdroid: Add rules for /sys/kernel/mm/pgsize_migration/enabled
The dynamic linker needs to read this node to determine how it should
load ELF files. See page_size_migration_supported() [1]

Allow the node to be enabled/disabled by init.

[1] 3d5e32517b:bionic/linker/linker_phdr.cpp;l=709-721

Bug: 342520142
Bug: 330117029
Bug: 327600007
Bug: 330767927
Bug: 328266487
Bug: 329803029
Test: no avc deined in logcat
Change-Id: I91381e36943ea0387ff245e924ddab53a4928a05
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-05-28 00:30:31 +00:00
Inseob Kim
9bb8e36856 Add virtualizationmanager fuzzer
Bug: 294158658
Test: run fuzzer
Change-Id: I8cf93ae2e79e22d72cf3ea8e96d6e767f8b8f5b0
2024-05-27 17:41:21 +09:00
Inseob Kim
a28d1ca7d4 gofmt service_fuzzer_bindings
Bug: N/A
Test: commit hook
Change-Id: Ic0c400310591e71201cd7c401bdb4bf10cf8daa6
2024-05-27 17:39:59 +09:00
Seungjae Yoo
74ea085cf1 Merge "Set sepolicy for creating TAP interfaces in vmnic of AVF" into main 2024-05-27 04:06:48 +00:00
Inseob Kim
179c2c9671 Grant dalvik_dynamic_prop access to power HAL
Currently vendors need to write dex2oat property from power HAL for
performance but vendors should workaround it with init rc scripts. This
allows power HAL to write such properties directly, without workaround.

Bug: 163539793
Test: boot
Change-Id: I1812c577cb11d24d924d32cdab40594c0eb72d52
2024-05-27 10:04:37 +09:00
Treehugger Robot
cc465b6f52 Merge "Use symlinks for common policy files on microdroid" into main 2024-05-27 00:44:45 +00:00
Steven Moreland
42598a96ba Merge "fix bugreport denial for new binderfs log type" into main 2024-05-24 17:42:01 +00:00
Treehugger Robot
c087c0b98c Merge "Revert "Suppress denials for odsign console"" into main 2024-05-24 13:20:01 +00:00
Alan Stokes
ef8cf12fd5 Revert "Suppress denials for odsign console"
This reverts commit 8b80dacadc.

Reason for revert: b/341649167
Bug: 293259827
Change-Id: I25183a11b2c522f475eceeadcde5bcc74c95ba56
2024-05-24 08:56:37 +00:00
Inseob Kim
ee4267a7cb Use symlinks for common policy files on microdroid
Bug: 215093641
Test: boot microdroid
Change-Id: Ica76c9379a4ff29e8160644ee4099560ef5e48d9
2024-05-24 15:14:51 +09:00
Kelvin Zhang
223f7957b8 Add ro.fstype.data to indicate fs type of /data
This allows init to conditionally execute some init.rc commands
based on the filesystem type of /data partition . For example,
we may wish to do some initialization work for 16KB mode only
if /data is ext4.

Test: boot, check ro.fstype.data, re-format /data and check again
Bug: 341216848
Change-Id: I97d5b3a2fa560476b106f39d56aa9df55cd539f4
2024-05-23 20:01:29 -07:00
Seungjae Yoo
80fd618c66 Set sepolicy for creating TAP interfaces in vmnic of AVF
Bug: 340376951
Test: Presubmit
Change-Id: I2948698a1738d441768d77da611d5e8dd3eb3c5b
2024-05-24 11:18:16 +09:00
Steven Moreland
9956cdff2f fix bugreport denial for new binderfs log type
Bug: 342311206
Test: SELinuxHostTest#testNoBugreportDenials
Change-Id: I0c28f1353fb0663167ecbc219d5e98fd214121eb
2024-05-23 20:05:33 +00:00
Treehugger Robot
ab0272ccb4 Merge "Allow system_server to reopen its own memfd." into main 2024-05-23 13:45:23 +00:00