Commit graph

1020 commits

Author SHA1 Message Date
Thiébaud Weksteen
c541c1eb80 Revert "Prebuilt updates for aosp/2827450" am: b460885e50
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2830890

Change-Id: Ief55d435dff2e58e463d4498fb3cf5740af8d21d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 03:02:23 +00:00
Thiébaud Weksteen
b460885e50 Revert "Prebuilt updates for aosp/2827450"
This reverts commit 74ec7d8343.

Reason for revert: Tests are still failing

Change-Id: Ic7dcd5fb4703cfe476f74835782b99d5848ed738
2023-11-14 23:37:47 +00:00
Sandro Montanari
20d6a0ec30 Prebuilt updates for aosp/2827450 am: 74ec7d8343
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2828198

Change-Id: Idce3a100d6c6db0d90f21142baf1158185bd97e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-14 18:16:13 +00:00
Sandro Montanari
74ec7d8343 Prebuilt updates for aosp/2827450
Bug: 295861450
Test: presubmits

Merged-In: I3d36a17697623f51618913d16ed4d3ea2ccf923b
Change-Id: I3f031449457a7cf8912b17c3eac4b7aa82710d58
2023-11-14 15:07:54 +00:00
Inseob Kim
c6227550f7 Revert "Add permission for VFIO device binding"
This reverts commit 901385f711.

Reason for revert: breaking build

Change-Id: Ib936ca7c347b657b94bb44692cd0e9ceee5db55a
Merged-In: Ie947adff00d138426d4703cbb8e7a8cd429c2272
2023-11-14 08:41:48 +00:00
Inseob Kim
901385f711 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
Bug: 308058980
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid \
      --devices /sys/bus/platform/devices/16d00000.eh --protected
Change-Id: Ie947adff00d138426d4703cbb8e7a8cd429c2272
Merged-In: Ie947adff00d138426d4703cbb8e7a8cd429c2272
(cherry picked from commit 825056de9a)
2023-11-14 01:56:24 +00:00
Rhed Jao
ebe1316695 Create sepolicy for allowing system_server rw in /metadata/repair-mode
Bug: 277561275
Test: ls -all -Z /metadata/repair-mode
Change-Id: Ie27b6ef377bb3503e87fbc5bb2446bc0de396123
2023-10-23 13:38:38 +11:00
Treehugger Robot
8d022b888c Merge "Use prebuilts for compat test if prebuilts exist" into main am: 6952d2f612
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2746580

Change-Id: I920639164d6e304b50046a17506be2972ee1199f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 05:18:40 +00:00
Inseob Kim
2aac33597d Use prebuilts for compat test if prebuilts exist
system/sepolicy should support both REL build and ToT build. That means
that system/sepolicy and prebuilts may differ. As the frozen sepolicy is
what vendor sepolicy uses, so we need to use prebuilts to run Treble
compat test.

Bug: 296875906
Test: m selinux_policy on REL
Change-Id: I4b290266ba87e3f011d640bec133fc88359ea52f
2023-09-08 10:44:49 +09:00
Treehugger Robot
31406c242e Merge changes Ia2c07331,I93f0d222 into main am: f476f5c8f1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2742356

Change-Id: If3a6af8553b6d645653ae38e898c3770b7dab868
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 09:14:47 +00:00
Inseob Kim
0d49b9bc28 Use only public cil files for Treble compat test
Rationale for this change:

1) Vendors use only public files, so we should be able to use only
   public cil files for compatibility test.
2) treble_sepolicy_tests_for_release.mk is too complex, because it
   requires compiled sepolicy. Reducing the complexity will help migrate
   into REL build.
3) This fixes a tiny bug of treble_sepolicy_tests that it can't catch
   public types being moved to private types, and then removed. 29.0.cil
   and 30.0.cil change contains such missing public types.

Bug: 296875906
Test: m selinux_policy (with/without intentional breakage)
Change-Id: Ia2c0733176df898f268b5680195da25b588b09c7
2023-09-07 16:35:08 +09:00
Inseob Kim
5d7423ff3d Build prebuilt policy with Soong
... and remove redundant Makefile codes. This also updates commit hook
as we now only use Soong to build sepolicy.

Bug: 296875906
Test: m selinux_policy
Change-Id: I93f0d222a0c10e31c51c9380780a8927c47d62b1
2023-09-07 16:32:30 +09:00
Treehugger Robot
d1710c749b Merge "Relax freeze_test to check only compatibility" into main am: b316f8bf95
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2737118

Change-Id: I575c28928e4c5690fc1b87ee09938cf0ed451476
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 07:06:46 +00:00
Inseob Kim
36d9d39e6e Relax freeze_test to check only compatibility
For now, freeze_test compares prebuilts against sources with diff, to
ensure that sources are identical to prebuilts. However, it could be the
case that the branch should be able to build both REL and ToT. In that
case, changes to the sources are inevitable and the freeze test will
fail.

To fix the issue, freeze_test will now only check compatibility. To be
specific, it will check if any public types or attributes are removed.
Contexts files and neverallow rules are not checked, but they may be
added later. Also to support the new freeze_test

- build_files module is changed to use glob (because REL version won't
  be in compat versions list)
- plat_pub_policy modules are added under prebuilts/api (because
  freeze_test needs that)

Bug: 296875906
Test: m selinux_policy
Change-Id: I39c40992965b98664facea3b760d9d6be1f6b87e
2023-09-05 03:37:18 +00:00
Xin Li
e07dbe0a63 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: Id2cc5dbbafffb4633706e5cc728cb44abd417340
Change-Id: I77e68f17a1273958bcdc32b5a4b6a0ff3ffdfd2a
2023-08-23 17:20:59 -07:00
Alfred Piccioni
ee7e77ba63 Merge "Revert ntfs file context changes" into main 2023-08-23 12:47:58 +00:00
Alfred Piccioni
33ebe0ef1b Revert ntfs file context changes
Partial revert of:

commit 3e1dc57bf4

commit 30ae427ed0

The current file contexts could break potential implementations of NTFS
by partners in future. I am not rolling back the adjoining
fuseblkd_exec andfuseblkd_untrusted_exec code, because secure
implementations of fuseblk drivers should still endeavour to use the
more compartmentalised policies.

However, as we don't support NTFS officially, we should give
implementors the choices whether to use it or not, even if it will open
the door to potentially less secure implementations.

NTFS Context: http://b/254407246,
https://docs.google.com/document/d/1b5RjdhN2wFFqmLCK0P_chVyiEhiYqNlTn52TFBMNwxk

Bug: 294925212
Test: Builds and boot.
Change-Id: I6d3858517e797b3f7388f9d3f18dd4a11770d5bc
2023-08-23 11:42:20 +00:00
wufei3
50a326d04a Add remaining attestation properties to selinux
Add "ro.product.device_for_attestation" and
"ro.product.manufacturer_for_attestation" prop to selinux permissions.

Bug:294190893
Test: atest CtsKeystoreTestCases:android.keystore.cts.DeviceOwnerKeyManagementTest#testAllVariationsOfDeviceIdAttestation

Change-Id: I71ee17ab59838680199acc9a7c209deba756f603
Signed-off-by: wufei3 <wufei3@xiaomi.corp-partner.google.com>
2023-08-17 11:41:07 +00:00
Xin Li
372f5cd14e Merge "Merge Android 13 QPR3" 2023-06-26 22:29:53 +00:00
Inseob Kim
34ad1d0bc1 SEPolicy Prebuilts for 34.0
Bug: 288517951
Test: build
Change-Id: I682e553ec8090281ded447780be41a8ea222b084
Merged-In: I15bf3817a8a6867d52f7963a04a69e543a9801e9
2023-06-23 10:23:59 +00:00
David Anderson
ae8817dc1e Allow ueventd to access device-mapper.
ueventd needs access to device-mapper to fix a race condition in symlink
creation. When device-mapper uevents are received, we historically read
the uuid and name from sysfs. However it turns out sysfs may not be
fully populated at that time. It is more reliable to read this
information directly from device-mapper.

Bug: 286011429
Test: libdm_test, treehugger
(cherry picked from https://android-review.googlesource.com/q/commit:e09c0eee36d58894bb0d30b9af4e33ee7dd7011c)
Merged-In: I36b9b460a0fa76a37950d3672bd21b1c885a5069
Change-Id: I36b9b460a0fa76a37950d3672bd21b1c885a5069

Change-Id: I1197d0051a9ce96b7edd87347b5db266b1643d30
2023-06-07 08:06:12 -07:00
Motomu Utsumi
993e3a6b1e Merge "Add sepolicy config for tethering_u_or_later_native namespace" into udc-dev am: 682b2421d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23214698

Change-Id: Ica65b79fe2934516eb115e6330fe65a17194ca1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 10:40:19 +00:00
Motomu Utsumi
682b2421d1 Merge "Add sepolicy config for tethering_u_or_later_native namespace" into udc-dev 2023-06-02 10:22:00 +00:00
Treehugger Robot
8a30fb3b9b Merge "Set up sepolicy for drmserver64" into udc-dev am: a4e8a5bc6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23297144

Change-Id: I87c9884bf51c394e2248a7923974bd5dcc88cbc5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 00:13:44 +00:00
Treehugger Robot
a4e8a5bc6a Merge "Set up sepolicy for drmserver64" into udc-dev 2023-06-01 23:22:31 +00:00
SzuWei Lin
90e295c513 Set up sepolicy for drmserver64
Add drmserver(32|64) for supporting 64-bit only devices. The patch is
for setting up the sepolicy for drmserver(32|64).

Bug: 282603373
Test: make gsi_arm64-user; Check the sepolicy
Ignore-AOSP-First: depend on an internal project
Change-Id: If8451de8120372b085de1977ea8fd1b28e5b9ab0
2023-06-01 08:41:54 +00:00
Motomu Utsumi
2473262434 Add sepolicy config for tethering_u_or_later_native namespace
Setup tethering_u_or_later_native namespace

Test: adb shell device_config put tethering_u_or_later_native test 1
Test: Read persist.device_config.tethering_u_or_later_native.test property
Test: from system server and Tethering.apk
Ignore-AOSP-First: topic has CL that updates DeviceConfig
Bug: 281944942
Change-Id: I2862974dc1a15f6768a34763bb9e2bad93eaf4ca
2023-06-01 00:34:59 +09:00
Gavin Corkery
73a8f6d8c8 Merge "Sync API 34 prebuilts" into udc-dev-plus-aosp 2023-05-31 14:19:48 +00:00
Treehugger Robot
8e448cbbfc Merge "Allow media server configurable flags to be read from anywhere" into udc-dev am: ed183c86a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23382984

Change-Id: I222304b6b75c5a92e08689fc8abb319ddefea00f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 21:48:19 +00:00
Treehugger Robot
ed183c86a9 Merge "Allow media server configurable flags to be read from anywhere" into udc-dev 2023-05-30 21:11:18 +00:00
Brian Lindahl
3c818406c4 Allow media server configurable flags to be read from anywhere
The majority of code for media encoding and decoding occurs within the
context of client app processes via linking with libstagefright. This
code needs access to server-configurable flags to configure
codec-related features.

Bug: 234833109
Test: manual test with 'adb shell device_config' commands
Ignore-AOSP-First: cherry pick from AOSP
Change-Id: I95aa6772a40599636d109d6960c2898e44648c9b
2023-05-26 22:53:40 +00:00
Jin Jeong
ae80e8cffa Merge "Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_..."" into udc-dev am: 7b646790c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23201116

Change-Id: I272af89efc194c111a0cb0c3955e2e37ff82b763
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 01:42:43 +00:00
Jin Jeong
cec9a99b28 Merge "Revert "Fix selinux denial for setupwizard_esim_prop"" into udc-dev am: a93b7daef3
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23167567

Change-Id: Ia1cc228b66bea6510ca4b649fa9d4c1adfa0900f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 01:42:35 +00:00
Jin Jeong
7b646790c5 Merge "Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_..."" into udc-dev 2023-05-24 01:07:12 +00:00
Jin Jeong
a93b7daef3 Merge "Revert "Fix selinux denial for setupwizard_esim_prop"" into udc-dev 2023-05-24 01:07:12 +00:00
Anoush Khazeni
15875fa311 Merge "Adding a property entry for the assistant volume." into udc-dev am: 1e1a425a9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23214185

Change-Id: Ib3a830112f4b6cdd2c3e346443bbdf0fdf324699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 19:00:54 +00:00
Anoush Khazeni
1e1a425a9b Merge "Adding a property entry for the assistant volume." into udc-dev 2023-05-22 18:58:43 +00:00
Gavin Corkery
97fc74e8c6 Sync API 34 prebuilts
Ignore-AOSP-First: Cherrypick
Test: Manual
Bug: 281843854
Change-Id: I73f79b6566ed3e3d8491db6bed011047d5a650ce
Merged-In: I73f79b6566ed3e3d8491db6bed011047d5a650ce
2023-05-22 12:09:36 +00:00
Suren Baghdasaryan
8a6f45d363 allow modprobe to load modules from /system/lib/modules/
This is needed to load GKI leaf modules like zram.ko.

Bug: 279227085
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I8a8205e50aa00686f478aba5336299e03490bbb5
Merged-In: I8a8205e50aa00686f478aba5336299e03490bbb5
2023-05-19 19:03:17 +00:00
Peiyong Lin
505ddee411 Merge "Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"" into udc-dev am: 8fde7b737b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23338256

Change-Id: I55dc1f86af4d3d05a2910288a77ee08aff1dde05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 10:37:43 +00:00
Peiyong Lin
8fde7b737b Merge "Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"" into udc-dev 2023-05-19 09:57:00 +00:00
Peiyong Lin
98ec998136 Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"
This reverts commit 92251f5d15.

Reason for revert: Remove deferred list functionality now that the shape
of ANGLE shipping form is binaries. Applications on the list are broken
with ANGLE due to the lack of YUV support, this is currently being
worked on.

Ignore-AOSP-First: Cherry-pick revert.
Bug: 280450222
Change-Id: Ied92e6f482fe77e045139b4b0531b1db1a7ffb13
Test: atest CtsAngleIntegrationHostTestCases
2023-05-19 00:41:17 +00:00
Gavin Corkery
0461233b7a Merge "Allow apps and SDK sandbox to access each others' open FDs" into udc-dev 2023-05-18 07:51:32 +00:00
Anoush Khazeni
87da0af704 Adding a property entry for the assistant volume.
Ignore-AOSP-First: confidential feature

Adding a system property to be read by AudioService
to override the minimum volume setting for the
assistant stream.

Bug: 277829235
Test: Build only
Change-Id: I08c500c0a3bb040559ca99d1817b7b848deee8c6
2023-05-17 11:44:26 -07:00
Gavin Corkery
a707712813 Allow apps and SDK sandbox to access each others' open FDs
An app may wish to pass an open FD for the SDK sandbox
to consume, and vice versa. Neither party will be
permitted to write to the other's open FD.

Ignore-AOSP-First: Cherrypick
Test: Manual
Bug: 281843854
Change-Id: I73f79b6566ed3e3d8491db6bed011047d5a650ce
Merged-In: I73f79b6566ed3e3d8491db6bed011047d5a650ce
2023-05-17 14:28:40 +00:00
Mugdha Lakhani
d44c51e017 Add canary restrictions for sdk_sandbox
Add sdk_sandbox_next and apply it if a new input selector,
isSdkSandboxNext, is applied. This is set to true by libselinux
if a flag is set in the seInfo passed to it.

This enables some testers to test out the set of restrictions
we're planning for the next SDK version.
sdk_sandbox_next is not the final set of restrictions of the next SDK
version.

Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest
Change-Id: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
Merged-In: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
2023-05-12 20:06:31 +00:00
Mugdha Lakhani
0dde99d720 Add canary restrictions for sdk_sandbox
Add sdk_sandbox_next and apply it if a new input selector,
isSdkSandboxNext, is applied. This is set to true by libselinux
if a flag is set in the seInfo passed to it.

This enables some testers to test out the set of restrictions
we're planning for the next SDK version.
sdk_sandbox_next is not the final set of restrictions of the next SDK
version.

Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest
Change-Id: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
Merged-In: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
2023-05-12 19:05:34 +00:00
Treehugger Robot
4069aa56ef Merge "Grant system_server the permission to create its own profile." into udc-dev am: 62037d3f93
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23201106

Change-Id: Ib54115b1e04cc4342d5c57886c7e220404f9d85b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 11:57:21 +00:00
Treehugger Robot
62037d3f93 Merge "Grant system_server the permission to create its own profile." into udc-dev 2023-05-12 11:11:03 +00:00
Martin Stjernholm
5557ec5583 Merge "Allow the ART boot oneshot service to configure ART config properties." into udc-dev am: 4f2b8ce361
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23131204

Change-Id: Idb0edb8c39f038d7d21e8c1c41c486d0b34a5e99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 10:54:04 +00:00