Commit graph

30128 commits

Author SHA1 Message Date
Orion Hodson
ae132647b1 Merge "postinstall_dexopt: allow reading odsign.verification.status" 2021-07-20 10:58:57 +00:00
Daniel Norman
f541acd250 Merge "Rename vpnprofilestore to legacykeystore in 31.0 mapping files." 2021-07-20 00:19:37 +00:00
Orion Hodson
5fcce9ded3 postinstall_dexopt: allow reading odsign.verification.status
Allows dexopt to read odsign verification status and use on-device
generated artifacts when dexopting after an OTA.

Bug: 194069492
Test: manually apply ota, see no denials for reading property
Change-Id: I97acfc17ffd9291d1a81906c75039f01624dff0f
2021-07-19 20:37:20 +01:00
Daniel Norman
31aaac3f18 Rename vpnprofilestore to legacykeystore in 31.0 mapping files.
This service was renamed in
commit 8aaf796f980f21a8acda73180a876095b960fc28
after the mapping files were originally created in
commit 4f20ff73ee.

Bug: 191304621
Test: Merge redfin_vf_s T-based system with S-based vendor.
Change-Id: I3430f13a3438c06c6cb469a35a80390f83b1c0b4
2021-07-19 11:51:14 -07:00
Inseob Kim
e1389977e0 Move microdroid sepolicy to system/sepolicy
Bug: 190511750
Test: boot microdroid
Change-Id: I4aa4a56e9be5103d70469c3508110a973f3e4f12
2021-07-19 07:48:34 +00:00
Jooyung Han
951bf93ad8 Merge "Fix virtualizationservice rules" 2021-07-17 03:46:58 +00:00
Treehugger Robot
9daeadb31e Merge "Add TARE service to SE policy." 2021-07-17 01:30:58 +00:00
Jooyung Han
6d4179a66e Fix virtualizationservice rules
Virtualizationservice should be able to read
* /apex/apex-info-list.xml: apex_info_file
* /data/apex/{active, uncompressed}: staging_data_file,
apex_data_file

and pass them to guest OS.

Bug: n/a
Test: atest MicrodroidHostTestCases
  (see logcat for denials)
Change-Id: Ia9dab957a6f912aa193d58e2817a00d4a39b4536
2021-07-16 13:58:03 +09:00
Suren Baghdasaryan
cb343e8013 property_contexts: Add ro.lmk.filecache_min_kb property context
ro.lmk.filecache_min_kb property allows vendors to specify min filecache
size in KB that should be reached after thrashing is detected.

Bug: 193293513
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I927f4a1c81db3f284353fe4ab93bf454acff69b7
2021-07-15 23:14:53 +00:00
Thiébaud Weksteen
6b4f91cbf0 Merge "Allow Zygote to unmount labeledfs" 2021-07-15 06:39:16 +00:00
Andrew Walbran
ac14885e9a Merge "virtualizationservice will clear its own temporary directory." 2021-07-14 18:29:04 +00:00
Kweku Adams
988d073012 Add TARE service to SE policy.
Bug: 158300259
Test: adb shell dumpsys tare
Change-Id: I30c11631110d6bc4f291357dda639449aa9c39d3
2021-07-14 10:25:14 -07:00
Andrew Walbran
ae84b86799 virtualizationservice will clear its own temporary directory.
This means that toolbox doesn't need permission to delete it.

Bug: 192917795
Bug: 193365943
Test: flashed on a VIM3L and booted
Change-Id: Ic0182c1c4eb84eb94f4db27d00effcd906ebed09
2021-07-14 16:56:51 +00:00
Alan Stokes
01ac33d74a Merge "Add policy for CompOS APEX data files." 2021-07-14 10:00:15 +00:00
sunny.kuo
1535fbb0b0 Allow Zygote to unmount labeledfs
As "/storage/emulated/0/Android/obb, /storage/emulated/0/Android/data" might be labeledfs (f2fs),
Zygote needs to be allowed to unmount labeledfs while unmounting "/storage".

Here's the warning if we do not add it.
avc: denied { unmount } for scontext=u:r:zygote:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=0

Bug:192989523
Test:adb shell stop; adb shell start; check no warning log
Change-Id: I74ce9bed29ec7da536a261a4fea25628f3d382ef
2021-07-14 10:09:20 +08:00
Paul Duffin
df49b3846f Merge "Stop using deprecated functionality for managing path deps" 2021-07-13 22:35:50 +00:00
David Anderson
00edd4b095 Merge "Fix e2fsck denials introduced by latest e2fsprogs merge." 2021-07-13 18:39:31 +00:00
David Anderson
8a525d768f Fix e2fsck denials introduced by latest e2fsprogs merge.
This resulted from changes in e2fsprogs logic which traverses
/proc/mounts to warn about fixing a mounted filesystem.

Denials:

        07-08 15:08:21.207   853   853 I auditd  : type=1400 audit(0.0:88): avc: denied { getattr } for comm="e2fsck" path="/metadata" dev="vda12" ino=2 scontext=u:r:fsck:s0 tcontext=u:object_r:metadata_file:s0 tclass=dir permissive=0
        07-08 15:08:21.207   853   853 I auditd  : type=1400 audit(0.0:89): avc: denied { search } for comm="e2fsck" name="/" dev="tmpfs" ino=1 scontext=u:r:fsck:s0 tcontext=u:object_r:mirror_data_file:s0 tclass=dir permissive=0

Bug: 193137337
Test: treehugger
Change-Id: Ib050463f7fa6ea453795c933ff388d3594bb7c23
2021-07-13 10:17:30 -07:00
Alan Stokes
10fbf239b8 Add policy for CompOS APEX data files.
Grant access to odsign to read & delete pending key files. Eventually
we will grant the CompOS daemon write access.

Bug: 190166662
Test: Via odsign; no denials seen.
Change-Id: I6d3c3e5b2aec8ef65bd28cbb274d18263534ce66
2021-07-13 15:35:53 +01:00
Treehugger Robot
4fea2f0e16 Merge "Refactor apex data file types." 2021-07-13 08:12:36 +00:00
Treehugger Robot
34df8fb682 Merge "Update default VHAL name in selinux policy." 2021-07-13 02:13:36 +00:00
Hasini Gunasinghe
39f81c11d6 Merge "Allow keystore to read and write keystore.crash_count system property." 2021-07-12 19:00:16 +00:00
Jiyong Park
d76c98182c Merge "Allow virtualizationservice to use vsock" 2021-07-12 18:00:57 +00:00
Alan Stokes
fa10a14fac Refactor apex data file types.
We ended up with 4 labels for specific APEX files that were all
identical; I've replaced them with a single one
(apex_system_server_data_file).

Additionally I created an attribute to be applied to a "standard" APEX
module data file type that establishes the basics (it can be managed
by vold_prepare_subdirs and apexd), to make it easier to add new such
types - which I'm about to do.

Fix: 189415223
Test: Presubmits
Change-Id: I4406f6680aa8aa0e38afddb2f3ba75f8bfbb8c3c
2021-07-12 14:41:04 +01:00
Thiébaud Weksteen
145a91ff9c Merge "Allow llkd to stat() /proc/sysrq-trigger" 2021-07-12 08:20:19 +00:00
Jiyong Park
f408371097 Allow virtualizationservice to use vsock
... to connect to the programs running in the guest VM

Bug: 192904048
Test: atest MicrodroidHostTestCases
Change-Id: Iccb48c14ace11cc940bb9ab1e07cc4926182e06e
2021-07-12 15:08:08 +09:00
Paul Duffin
532bde121b Stop using deprecated functionality for managing path deps
This change stops using deprecated functionality and migrates this
repository's custom Soong code to support current practices to manage
path property related dependencies. i.e. when a property includes
something that looks like ":module".

ExtractSourcesDeps has been deprecated in favor of tagging properties
with `android:"path"` which will cause the pathDepsMutator to add the
dependencies automatically.

android.SourceDepTag has been deprecated as the underlying type needs
to be changed and this will no longer work for its current uses.

* ctx.GetDirectDepWithTag(moduleName, android.SourceDepTag) will not
  work to retrieve a reference to the module dependency added for
  path properties. GetModuleFromPathDep(ctx, moduleName, "") must be
  used instead.

* depTag == android.SourceDepTag can no longer be used to check to
  see if depTag was used to add a module dependency for a module
  reference in a path property without any output tag.
  IsSourceDepTagWithOutputTag(depTag, "") must be used instead.

Bug: 193228441
Test: m nothing
Change-Id: I307039612f0f2a541ac7dbfddd052ef78c290f60
2021-07-09 23:15:17 +01:00
Orion Hodson
2abf1e293b Add get_prop(odsign_prop) to incidentd.te
Prevents SELinux denial when capturing a bugreport.

Bug: 192895524
Bug: 193084909
Bug: 193096842
Bug: 193097008
Bug: 193097511
Bug: 193097845
Bug: 193097886
Test: adb bugreport and check no denial in logcat.
Change-Id: Ide5d95782929836cffc5b3921bffae3295773532
2021-07-09 14:54:27 +01:00
Hasini Gunasinghe
4fa6b1a037 Allow keystore to read and write keystore.crash_count system property.
Additionally, remove the obsolete permission which allows keystore to
register callbacks with statsd. There's no direct communication between
keystore and statsd now.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: statsd TestDrive script.
Merged-In: I31d202751ba78bb547822020260a7e366cb8826e

Change-Id: I31d202751ba78bb547822020260a7e366cb8826e
2021-07-08 17:54:58 +00:00
Bram Bonné
c1d9d9a85c Merge "untrusted_app_30: add new targetSdk domain" 2021-07-08 11:01:41 +00:00
Rachel Lee
a455a1f6f0 Merge "Fix sepolicy get_prop for SF namespace." 2021-07-07 23:08:49 +00:00
Nikita Ioffe
1b5255dc91 Merge "Revert "Allow otapreopt_chroot to call otadexopt binder service"" 2021-07-07 13:40:43 +00:00
Andrew Walbran
a91240f691 Merge "Allow virtualizationservice and crosvm to access shell_data_file files." 2021-07-07 12:48:07 +00:00
Andrew Walbran
9b2fa1b94a Allow virtualizationservice and crosvm to access shell_data_file files.
This is necessary to run tests or run VMs manually with SELinux
enforcement enabled.

Bug: 192256642
Test: atest VirtualizationTestCases
Change-Id: I03b12fefa4e79644bd2f3410cc255f923834aca4
2021-07-07 11:11:19 +00:00
Nikita Ioffe
7c808247a7 Revert "Allow otapreopt_chroot to call otadexopt binder service"
Revert submission 1750144-otapreopt_chroot_speed_up

Reason for revert: Breaks postinstall step on some devices
Reverted Changes:
I56dec13c8:Add ota_dexopt_aidl_interface
Ib32cbbbf8:Allow otapreopt_chroot to call otadexopt binder se...
I02e80a8e6:Move otadexopt-related logic to otapreopt_chroot b...

Bug: 190817237
Change-Id: I96e02566779cf16626354b0d71e6d48f2ab35490
2021-07-06 17:06:22 +00:00
Treehugger Robot
cb83d70584 Merge "Add persist.nfc property" 2021-07-06 08:05:46 +00:00
Treehugger Robot
e838fe2681 Merge "Allow odsign to rename apex_art_data_file:dir" 2021-07-05 11:49:15 +00:00
Bram Bonné
ea5460ab6e untrusted_app_30: add new targetSdk domain
Enforce new requirements on app with targetSdkVersion=32 including:
- No RTM_GETNEIGH on netlink route sockets.
- No RTM_GETNEIGHTBL on netlink route sockets.

Bug: 171572148
Test: atest NetworkInterfaceTest
Test: atest bionic-unit-tests-static
Test: atest CtsSelinuxTargetSdkCurrentTestCases
Test: atest CtsSelinuxTargetSdk30TestCases
Test: atest CtsSelinuxTargetSdk29TestCases
Test: atest CtsSelinuxTargetSdk28TestCases
Test: atest CtsSelinuxTargetSdk27TestCases
Test: atest CompatChangesSelinuxTest
Test: atest NetlinkSocketTest
Change-Id: I2167e6cd564854c2656ee06c2202cfff2b727af5
2021-07-05 11:42:31 +02:00
Orion Hodson
829f582107 Merge "Allow app_zygote to read zygote_tmpfs." 2021-07-05 09:10:23 +00:00
Treehugger Robot
6ab599ec46 Merge "allow init to access watermark_boost_factor" 2021-07-04 08:16:08 +00:00
Yu Shan
d70654bdf9 Update default VHAL name in selinux policy.
Test: Presubmit
Bug: 192276902
Change-Id: I0851826f69b22a06830b40c72c7e9fa720810053
2021-07-02 18:04:11 -07:00
Rachel Lee
e0cbab2d4d Fix sepolicy get_prop for SF namespace.
Bug: 190769260
Test: make.
Change-Id: I5d86beaa392b009d0aae37c7a3dd7f90e7cf5f70
2021-07-02 16:31:13 -07:00
Treehugger Robot
8ea29cd4de Merge "Allow the kernel to read shell_data_file" 2021-07-02 19:13:46 +00:00
Yabin Cui
e43222e19b Merge changes Ia2defe72,Icef1ebdd
* changes:
  allow simpleperf to profile more app types.
  simpleperf_app_runner: move rules to private.
2021-07-02 16:37:38 +00:00
Treehugger Robot
59c063b866 Merge "Allow AudioServer find for mediaprovider_app" 2021-07-02 15:04:11 +00:00
Orion Hodson
57907a87dc Allow app_zygote to read zygote_tmpfs.
app_zygote inherits tmpfs files from zygote, and needs to be able to
stat them after fork.

Bug: 192634726
Bug: 192572973
Bug: 119800099
Test: manually configure JIT zygote and run
 atest \
   CtsExternalServiceTestCases:\
   android.externalservice.cts.ExternalServiceTest\
   #testBindExternalServiceWithZygote
Change-Id: I401808c984edd4e3e4ef335f6a75cecc5cf69eca
2021-07-02 14:36:00 +00:00
Nikita Ioffe
1f1db28719 Merge "Allow otapreopt_chroot to call otadexopt binder service" 2021-07-02 14:20:12 +00:00
Thiébaud Weksteen
40dd3b3004 Allow llkd to stat() /proc/sysrq-trigger
06-26 20:01:16.860   971   971 I auditd  : type=1400 audit(0.0:8): avc: denied { getattr } for comm="llkd" path="/proc/sysrq-trigger" dev="proc" ino=4026532062 scontext=u:r:llkd:s0 tcontext=u:object_r:proc_sysrq:s0 tclass=file permissive=0

Bug: 192305350
Test: Build for aosp_arm64-eng
Change-Id: Ia6342ebc974f469e0e5d5e2f527d870c8a686b87
2021-07-02 15:55:38 +02:00
Alan Stokes
b7fb7ae7c2 Allow odsign to rename apex_art_data_file:dir
This is needed to allow us to promote pending artifacts from compos to
active, otherwise we get:

odsign  : Can't rename /data/misc/apexdata/com.android.art/pending to /data/misc/apexdata/com.android.art/dalvik-cache: Permission denied
odsign  : type=1400 audit(0.0:9): avc: denied { rename } for name="pending" dev="dm-35" ino=14965 scontext=u:r:odsign:s0 tcontext=u:object_r:apex_art_data_file:s0 tclass=dir permissive=0

Test: Manual, running modified odsign with (bogus) pending artfiacts
Bug: 190166662
Change-Id: I3efafa62d3444f967c0b5eab5516a00daf64f8ef
2021-07-02 11:49:43 +01:00
Orion Hodson
0b8ab878b4 Merge "Allow zygotes and installd to read odsign properties" 2021-07-02 10:19:45 +00:00