Commit graph

38881 commits

Author SHA1 Message Date
Alice Wang
40718f45d6 Allow getopt to eliminate warnings in MicrodroidBenchmarks tests
This CL allows getopt in sepolicy to eliminate getopt denied
warnings in MicrodroidBenchmarks tests, e.g.

$ atest MicrodroidBenchmarks
W FinalizerDaemon: type=1400 audit(0.0:625): avc: denied
{ getopt } for scontext=u:r:untrusted_app:s0:c163,c256,c512,
c768 tcontext=u:r:virtualizationservice:s0 tclass=vsock_socket
permissive=0 app=com.android.microdroid.benchmark

Bug: 236123069
Test: atest MicrodroidBenchmarks
Change-Id: I2ed94ae6beab60176d9fac85a0b818089d563427
2022-08-31 13:21:46 +00:00
Florian Mayer
f99eeb6bd9 Update prebuilts to fix sepolicy_freeze_test
Bug: 243820875
Change-Id: I99c09ff00c1b47e9bc4e8175c9b3e34c7851d25d
2022-08-30 13:18:45 -07:00
Florian Mayer
5de1b2096d Update prebuilts to fix sepolicy_freeze_test
Bug: 243820875
Change-Id: I34e06a54a649e37b6ec051d20bf4cf904f69fd5e
2022-08-30 13:18:01 -07:00
Suren Baghdasaryan
f08bc50f9d sepolicy: Move proc_watermark_scale_factor mapping from ignore list
New label proc_watermark_scale_factor was mistakenly added into ignore
list. Fix this by moving the mapping into correct .cil files.

Fixes: 6988677f22 ("Allow init to execute extra_free_kbytes.sh script")
Bug: 241761479
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: If12cad2ed20504d374d77a68eaba1600d2768338
2022-08-29 18:17:37 +00:00
Sandro Montanari
618cc55a15 Merge "Revert "Move allow rules of sdk_sandbox to apex policy"" 2022-08-29 12:34:28 +00:00
Sandro Montanari
38f009ba13 Revert "Move allow rules of sdk_sandbox to apex policy"
Revert "Add seamendc tests for sdk_sandbox in apex sepolicy"

Revert submission 2182195-seamendc

Reason for revert: 243971667
Reverted Changes:
I59fda23d9:Add seamendc tests for sdk_sandbox in apex sepolic...
I4c4800418:Move allow rules of sdk_sandbox to apex policy

Change-Id: Icc3fff21aae23f24f37dbae6276699c56842f9a1
2022-08-29 09:03:18 +00:00
Yixiao Luo
aa98f8a58c Merge "TV Input HAL 2.0 sepolicy" 2022-08-26 23:19:24 +00:00
Sandro Montanari
d87f90f205 Merge "Move allow rules of sdk_sandbox to apex policy" 2022-08-26 09:07:27 +00:00
Treehugger Robot
c0499fd13d Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy" 2022-08-26 07:49:29 +00:00
Thiébaud Weksteen
c0fef5c1ae Merge "Remove wpantund and lowpan_service" 2022-08-25 23:57:20 +00:00
Yixiao Luo
e83ae791aa TV Input HAL 2.0 sepolicy
Bug: 227673740
Test: atest VtsHalTvInputTargetTest
Change-Id: I53f6537a8f911661e368824a5a5dc5db57413980
2022-08-25 14:31:49 -07:00
Bob Badour
087b849a4f [LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy
Added SPDX-license-identifier-Apache-2.0 to:
  mac_permissions/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Id66c4697d869ed5b5e36744deca5277064b07290
2022-08-25 09:28:32 -07:00
Sandro
3bb7bb2e70 Move allow rules of sdk_sandbox to apex policy
This is a roll-forward of a small chunk of aosp/2170746.
The previous CL was causing test breakages (b/240731742, b/240462388,
b/240463116).

This CL is smaller than the previous one, it only moves allow rules from
the platform policy to the apex policy (I believe the error was caused
by typeattribute rules). I also ran the closest approximation I could
find to the breaking environment, and it appears the tests are passing
https://android-build.googleplex.com/builds/abtd/run/L44100000955891118
https://android-build.googleplex.com/builds/abtd/run/L68000000955937148

Bug: 236691128
Test: atest SeamendcHostTest
Change-Id: I4c480041838c8c14011f099ba8295097fe9212db
2022-08-25 15:48:25 +00:00
Sandro Montanari
0e0fb33dd7 Merge "Add SeamendcHostTest to system/sepolicy presubmit checks" 2022-08-25 14:47:28 +00:00
Paul Crowley
d6f455b520 Merge "Add ro.keystore.boot_level_key.strategy" 2022-08-25 13:55:43 +00:00
Paul Crowley
283aef2860 Add ro.keystore.boot_level_key.strategy
Bug: 241241178
Test: set property on Cuttlefish, check logs for strategy used.
Change-Id: Ifaaec811316c43fdae232f9a08c5d862011ccc71
2022-08-24 21:38:36 -07:00
Sandro
2bea852d85 Add SeamendcHostTest to system/sepolicy presubmit checks
Bug: 238394904
Test: atest --test-mapping system/sepolicy/TEST_MAPPING:presubmit
Change-Id: If1d346ca9ff9f39e48a8074fb1c3f3a1d15b5372
2022-08-24 15:14:31 +00:00
Treehugger Robot
19a06c383a Merge "microdroid: Allow payload read /proc/meminfo" 2022-08-24 09:55:52 +00:00
Bart Van Assche
aa9113f378 Remove bdev_type
Bug: 202520796
Change-Id: If067a0fa51e97a4fc2c6b60864e4dc7c51abeded
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-08-23 16:01:17 -07:00
Hongguang
9515559657 Add properties to configure whether the lazy tuner is enabled.
ro.tuner.lazyhal: system_vendor_config_prop to decide whether the lazy
tuner HAL is enabled.
tuner.server.enable: system_internal_prop to decide whether tuner server
should be enabled.

Bug: 236002754
Test: Check tuner HAL and framework behavior
Change-Id: I6a2ebced0e0261f669e7bda466f46556dedca016
2022-08-23 07:01:05 +00:00
Jiyong Park
d0fe3ef25a Merge "Allow microdroid_manager to run kexec" 2022-08-23 01:09:06 +00:00
Shunkai Yao
3a6c68f2ba AIDL effect: Add default Effect factory implementation to platform sepolicy
Add example implementation services: IFactory under android.hardware.audio.effect.
An audio HAL AIDL example service will register with the default implementations.

Bug: 238913361
Test: m, and flash with Pixel 6a.

Change-Id: Ib331899fd47b6b334b120e20617174d01e71ddb8
2022-08-22 19:27:26 +00:00
Jiyong Park
bc0e0dce04 Allow microdroid_manager to run kexec
/system/bin/kexec in Microdroid is now properly labeled as kexec_exec.
The binary is responsible for loading the crashkernel into memory so
that when a kernel panic occurs the crashkernel is executed to dump the
RAM.

Microdroid_manager executes the kexec binary as part of the boot
process. It does this only when the kernel is booted with a memory
reserved for the crashkernel, which is determined by checking if
`crashkernel=` is included in the cmdline. For this, it is allowed to
read /proc/cmdline.

Bug: 238404545
Test: boot microdroid
Change-Id: Id08ba9610e3849ba811367917df8dfcc1774b561
2022-08-23 00:02:36 +09:00
Thiébaud Weksteen
8439a1ff29 Remove wpantund and lowpan_service
Bug: 235018188
Test: TH
Change-Id: I0e2f03ad6d17f5d9223b2c500b6c3183835ec807
2022-08-22 14:09:01 +10:00
Treehugger Robot
3da6089241 Merge "Add go.mod for build/soong" 2022-08-19 18:44:18 +00:00
Kelvin Zhang
0a8d5697a6 Merge "Add sepolicy for fastboot io uring feature flag" 2022-08-19 16:37:07 +00:00
Treehugger Robot
30c23bc84a Merge "De-dupe compos rules" 2022-08-19 14:04:17 +00:00
David Brazdil
744ae7f798 microdroid: Allow payload read /proc/meminfo
/proc/meminfo contains useful information about the amount of memory
available to the VM and the payload. Let microdroid_payload domain read
the file.

Test: atest MicrodroidBenchmarks
Change-Id: I22d4888cf84e78ce8ed0803e7ebdeb7fca370e1f
2022-08-19 13:57:33 +01:00
Inseob Kim
b570d75cd4 Merge "Reorganize Android.bp files and modules" 2022-08-19 10:44:38 +00:00
Alan Stokes
07ce6daa44 De-dupe compos rules
compos has the microdroid_payload attribute, so we don't need to
duplicate rules that apply to that. This .te should only have things
that differentiate compos from other payloads.

Test: Presubmits
Change-Id: Ib5b8c52f9a068a583fc1471ac6cf0e4aef906857
2022-08-19 11:34:53 +01:00
Ryan Savitski
d55bbbb41a Merge "perfetto profiling: fix access to ART apex files" 2022-08-19 10:30:04 +00:00
Treehugger Robot
e2dd659d7a Merge "Allow clients read ramdump piped through virtualizationservice" 2022-08-19 08:29:05 +00:00
Inseob Kim
4364ed3904 Merge "Build mac_permissions.xml with Soong" 2022-08-19 05:54:53 +00:00
Treehugger Robot
bd0a3fadd6 Merge "Allow dumpstate to access fscklogs" 2022-08-19 01:43:43 +00:00
Ryan Savitski
3f3e222527 perfetto profiling: fix access to ART apex files
The profilers cannot open files under
/data/misc/apexdata/com.android.art/dalvik-cache because they're not
allowed to search /data/misc/apexdata with the apex_module_data_file
label.

Example denial:
  avc: denied { search } for name="apexdata" dev="dm-37" ino=89
  scontext=u:r:traced_perf:s0
  tcontext=u:object_r:apex_module_data_file:s0 tclass=dir permissive=0

Tested: patched & flashed onto a TM device, then profiled system_server
Bug: 241544593
Change-Id: Ifd8b94a9ebcae09701e95f6cd6a14383209963db
2022-08-19 00:30:40 +01:00
Jiyong Park
cca5402261 Allow clients read ramdump piped through virtualizationservice
When a kernel panic occurs in a debug-enabled VM, a crashdump is created
in the VM and then it is flushed to the per-VM host-side file
/data/misc/virtualizationservice/<cid>/ramdump. Virtualizationservice
then opens the file and sends the FD to the owning client. This change
allows the client to read the ramdump via the FD.

A client accessing ramdump of other VM is prohibited since opening the
ramdump file is not allowed for the client; only virtualizationservice
can do it. Furthermore, ramdumping will be enabled only for the
debuggable VMs, which means reading it doesn't actually reveal any
(true) secret.

Bug: 238278104
Test: do the ramdump
Change-Id: I50e1fa83b99e8f24c849e278710b38f6ff9a25be
2022-08-18 14:44:11 +00:00
Alessandra Loro
8a7dcb5e1e Drop back-compatibility for hiding ro.debuggable and ro.secure
Bug: 193912100
Test: back-compatibility change for android.security.SELinuxTargetSdkTest
Change-Id: I47f2ddc4fa87bf6c8f872d2679348b2eecddcaad
2022-08-18 13:43:17 +00:00
Xin Li
cba09e2963 Merge android12L-tests-dev@8941410
Change-Id: I95be0dffc205b4bdaeba49583741144b6162c40f
2022-08-17 23:08:05 -07:00
Xin Li
23f9ed951b Skip android13-tests-dev
Merged-In: I29d390dcfbeaa65b2c868bbc8648835c644e3d18
Change-Id: I0ad966f8bcc13ab5ceb77f938561e47ddd8b6789
2022-08-17 16:38:39 -07:00
Alessandra Loro
50fa5cd9a0 Merge "Disallow untrusted apps to read ro.debuggable and ro.secure" 2022-08-17 12:34:24 +00:00
Richard Chang
6d5bb236da Merge "sepolicy: allow vendor system native boot experiments property" 2022-08-17 06:29:30 +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
Juan Yescas
bec405a7c2 Add ro.boot.ddr_size sysprop to sepolicy
srcs/android/sysprop/MemoryProperties.sysprop

This property is populated by property service from the kernel
command line parameter androidboot.ddr_size=XXXX. Vendors can set
this command line option from the bootloader.

Bug: 231718727
Test: n/a
Change-Id: I3fb8a18125081b1a30dee715831f5701964cb375
2022-08-16 19:45:35 +00:00
Xin Li
122f787b8a Merge "DO NOT MERGE - Merge Android 13" 2022-08-16 19:11:36 +00:00
Kelvin Zhang
aa7a9a4096 Add sepolicy for fastboot io uring feature flag
fastboot will read this prop to check if io uring is supported. Add
proper sepolicy.

Test: th
Bug: 31712568
Change-Id: I8990d8a31748534d4444a2ef25b58d629651dac7
2022-08-16 18:13:00 +00:00
Katherine Lai
c6ad2cb247 Merge "Add bluetooth sniff and LE connection sysprops" 2022-08-16 16:57:12 +00:00
Alessandra Loro
d0e108fbbe Disallow untrusted apps to read ro.debuggable and ro.secure
ro.secure and ro.debuggable system properties are not intended
to be visible via Android SDK. This change blocks untrusted
apps from reading these properties.

Test: android.security.SELinuxTargetSdkTest
Bug: 193912100
Change-Id: I40ac5d43da5778b5fa863b559c28e8d72961f831
2022-08-16 14:24:27 +00:00
Jiyong Park
6438f66960 Remove an obsolete rule for microdroid_manager
The fuse supports file contexts. Microdroid_manager no longer needs the
access to the fuse label.

Bug: 188400186
Test: run microdroid test
Change-Id: I9a17a96c6d07a466e1fa01d65279e467a874da3f
2022-08-16 14:40:55 +09:00
Xin Li
89c69aea0d DO NOT MERGE - Merge Android 13
Bug: 242648940
Merged-In: I3a0cffb34429320a412a7c05220376c0b58e28a3
Change-Id: Ia174f7c80529d812a26acca82bd6763c49d8bf36
2022-08-15 22:06:35 -07:00