am skip reason: Merged-In Id5f052116834034a9e4fd5c3adf17d3d7ef6610a with SHA-1 a8b6900a49 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2487130
Change-Id: Ic81ddb542e28fece912b7409316c1687ef85f007
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Id5f052116834034a9e4fd5c3adf17d3d7ef6610a with SHA-1 a8b6900a49 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2487130
Change-Id: I87e3a8ec615e2b75a758f6b13befac950ceccd5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Note: this is a somewhat minimal set of rules required to be able to
capture traces on Microdroid. After the trace is captured I still see a
bunch of SELinux denials. We might need to add more allow rules in the
follow up changes.
Bug: 249050813
Test: boot Microdroid VM, capture traces with record_android_traces
Change-Id: I62098fb79a8db65706a5bb28c8acce7ff3821f15
Bug: 218588089
Bug: 273324345
Test: 1. m -j selinux_policy
2. Build cf_x86_64_auto lunch target.
3. Launch cvd in the accelerated graphics mode.
4. Run evs_app and confirm the color bar pattern is shown on the
display.
> adb root && adb shell evs_app --test
6. Do the same on sdk_car_x86_64 lunch target.
Change-Id: I1f570e7d43981ce2f5a7ae0d78ee3d5bfa8c7576
This was accidentally copied and pasted from the app domain. The intent
was for system_server to be able to read the prop.
Test: manually
Bug: 269246893
Bug: 272719059
Ignore-AOSP-First: tm-qpr-dev backport
Change-Id: I78d5fa62a2e112d3bf363b8d96348a645ef4caaa
Merged-In: I78d5fa62a2e112d3bf363b8d96348a645ef4caaa
In order for ART code to call perfetto DataSource::Trace() we need to
wait for all data source instances to have completed their setup. To do
so, we need to know how many of them exist.
This introduces a new sysprop traced.oome_heap_session.count, writeable
by perfetto traced and readable by apps and system_server that can be
used to communicate this.
See go/art-oom-heap-dump for more details
Test: manual, atest HeapprofdJavaCtsTest
Bug: 269246893
Bug: 272719059
Ignore-AOSP-First: tm-qpr-dev backport
Change-Id: Ib8220879a40854f98bc2f550ff2e7ebf3e077756
Merged-In: Ib8220879a40854f98bc2f550ff2e7ebf3e077756
This is a reduced backport of aosp/2419280, as the full change adds
domain-wide allow rules as well as neverallows, and we want to avoid
conflicts against pre-existing TM vendor policies.
This backport is downscoped to:
* system_server.te: allow profiling system_server, runs as "system".
* system_app.te: allow profiling all other apps running as "system",
e.g. com.android.settings.
* platform_app.te: for platform-signed apps running in the normal app
UID range, e.g. com.android.systemui.
Merging logistics:
* AOSP and udc-dev have the full change, so prevent automerged conflicts
via Merged-In.
* api=33 sepolicy prebuilts are in a stacked patch as those should flow
into downstream branches, and afaiu will need to be CP'd to AOSP.
Bug: 272719059
Ignore-AOSP-First: tm-qpr-dev backport
Merged-In: I792ec1812d94b4fa9a8688ed74f2f62f6a7f33a6
Change-Id: I5de4a39b002baabad7ef9e5a21c10dc6d87295eb
This ioctl can be used to avoid a race condition between key
reinstallation and busy files clean up.
Test: Trigger busy file clean-up and ensure that the ioctl succeeds
Bug: 140762419
Change-Id: I153c2e7b2d5eb39e0f217c9ef8b9dceba2a5a487
(cherry picked from commit ffb9f8855a)
Ignore-AOSP-First: Prebuilts needed to be updated when cherry-picking.
Change1# Add property export_tombstones.enabled - This is set by
microdroid_manager to indicate that tombstones in Microdroid be exported
out to host. This read by crash_dump (specifically tombstone_handler).
Change2# allow crash_dump to create/connect/write on vsock.
Change3# Deleting rules/domain related to tombstoned &
tombstone_transmit in Microdroid.
Test: atest MicrodroidHostTests#testTombstonesAreGeneratedUponUserspaceCrash
Test: Look for selinux denials in log
Bug: 243494912
Change-Id: Ibd607eb11202d492bcb0c4ba40a6888683420fb9
This was accidentally copied and pasted from the app domain. The intent
was for system_server to be able to read the prop.
Test: manually
Bug: 269246893
Change-Id: I78d5fa62a2e112d3bf363b8d96348a645ef4caaa
VirtualizationManager (and indirectly crosvm) now runs as a child
process of the client, which could be a process forked from zygote.
As a result, these get tracked as phantom processes of the client and
system_server will try to kill them if it chooses to kill the client.
Currently this does not work because system_server is not allowed
sigkill for the corresponding domains. In theory, that should not be
a problem because virtualizationmanager will automatically kill any
crosvm instances and terminate itself if its parent dies, but we should
not rely on that fact and instead give system_server the ultimate
control over app process termination.
Bug: 269461627
Test: atest MicrodroidTestApp
Change-Id: Ie0ba5388d00a51812c9424c37f2f74983bea9db8
Introduce a new class TestPolicy to capture all the previous global
variables. This class contains the constructor and loading methods
(Get*) to load its internal state. The tests are modified to accept a
TestPolicy as first argument.
This commit is a no-op. There is no change to the tests.
`git show --ignore-space-change` can be used to skip over the
re-indentation due to the new class.
Bug: 269182257
Test: m selinux_policy (runs treble_sepolicy_tests against all
compatible versions)
Test: Set DEBUG=True, compare generated scontexts. Identical.
Change-Id: Ia8da115dc1c0109b835e03b95da029b35712d251
Wi-Fi vendor AIDL service uses NDK to register itself to service
manager. AServiceManager_registerLazyService registers an
IClientCallback to service manager. The callback is invoked when there
is a transition between having >= 1 clients and having 0 clients (or
vice versa). Please check IClientCallback.aidl. As a result servicemanager may
make binder call to Wi-Fi vendor AIDL service. Since this is not allowed
per current SE policies, "avc denied" occurred:
servicemanager: type=1400 audit(0.0:248): avc: denied { call } for scontext=u:r:servicemanager:s0 tcontext=u:r:hal_wifi_default:s0 tclass=binder permissive=0
We add SE policy for hal_wifi_default to allow binder call like this.
Bug: 270511173
Test: manually build and test, check logs for avc denied
Change-Id: Ia6fcf5fc1cafff0381fc9857805bdc61cc838c1e