Commit graph

31590 commits

Author SHA1 Message Date
Bart Van Assche
d5ea1d4d87 init.te: Allow init to modify the properties of loop devices am: 052995e65e am: b282e92e78
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15515664

Change-Id: I5d203f60728fc714237706e69991da2eeb4ed241
2021-08-11 17:23:33 +00:00
Bart Van Assche
b282e92e78 init.te: Allow init to modify the properties of loop devices am: 052995e65e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15515664

Change-Id: Ic460f58f34857dc1f31615fdb4736f8cc22546f7
2021-08-11 17:10:09 +00:00
Bart Van Assche
052995e65e init.te: Allow init to modify the properties of loop devices
The init process configures swapping over zram over a loop device. An
I/O scheduler is associated with the loop device. Tests have shown that
no I/O scheduler works better than the default, mq-deadline. Hence
allow the init process to configure the loop device I/O scheduler.

Without this patch, the following SELinux denials are reported during
boot:

1     1 I auditd  : type=1400 audit(0.0:4): avc: denied { read write } for comm="init" name="scheduler" dev="sysfs" ino=78312 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_loop:s0 tclass=file permissive=0
1     1 I auditd  : type=1400 audit(0.0:4): avc: denied { read write } for comm="init" name="scheduler" dev="sysfs" ino=78312 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_loop:s0 tclass=file permissive=0

Bug: 194450129
Test: Built Android images and installed these on an Android device.
Ignore-AOSP-First: This patch is already in AOSP.
Merged-In: I0af0a92c53bb1f68b57f6814c431a7f03d8ea967
Change-Id: I0af0a92c53bb1f68b57f6814c431a7f03d8ea967
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2021-08-10 09:30:10 -07:00
Rick Yiu
f7344317c7 Move vendor_sched to common sepolicy am: 7c14f44109
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15401722

Change-Id: Id7c6a5c2de6f37a26cc246ccc02f2537bf29f5c0
2021-07-30 07:05:37 +00:00
Rick Yiu
7c14f44109 Move vendor_sched to common sepolicy
Previously vendor_sched is put under product area which will be replaced
by GSI. To solve it, move it to system/sepolicy.

Bug: 194656257
Test: build pass
Change-Id: I15801c0db0a8643cac2a2fc1f004db6fb21050dc
Merged-In: Ia0b855e3a876a58b58f79b4fba09293419797b47
2021-07-30 03:03:42 +00:00
Yi Kong
13c00d932a Allow shell to read profcollect data files
Also guard all profcollect related entries with userdebug/eng only and
move them into one place.

Test: manual
Bug: 183487233
Bug: 194155753
Change-Id: If3399bb78b60f0367267e67573007ed72508279a
Merged-In: If3399bb78b60f0367267e67573007ed72508279a
(cherry picked from commit b7bb6490df)
2021-07-29 08:34:53 +00:00
Martijn Coenen
854627e2e1 Merge "Allow odsign to stop itself." into sc-dev am: 3f1c5d5c14
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15393139

Change-Id: Ia961ad83d9371b0868019b96a764e7193235a981
2021-07-28 15:16:36 +00:00
Martijn Coenen
3f1c5d5c14 Merge "Allow odsign to stop itself." into sc-dev 2021-07-28 15:06:47 +00:00
Martijn Coenen
28377a8a17 Allow odsign to stop itself.
Carve out a label for the property, and allow odsign to set it.

Bug: 194334176
Test: no denials
Change-Id: I9dafefabc27c679ed9f36e617e824f44f3b16bbd
Merged-In: I9dafefabc27c679ed9f36e617e824f44f3b16bbd
2021-07-28 11:52:48 +00:00
Keith Mok
1e91f8092e Merge "Add vehicle_binding_util SELinux context" into sc-v2-dev 2021-07-22 00:35:01 +00:00
TreeHugger Robot
b7ed7052f4 Merge "property_contexts: Add ro.lmk.filecache_min_kb property context" into sc-dev am: 8797257e3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15327677

Change-Id: I2562b532efe88e4784d23468ef3a426cf9a904cb
2021-07-21 07:47:03 +00:00
TreeHugger Robot
8797257e3f Merge "property_contexts: Add ro.lmk.filecache_min_kb property context" into sc-dev 2021-07-21 07:34:31 +00:00
Orion Hodson
90b8454b57 postinstall_dexopt: allow reading odsign.verification.status am: 07cafca82a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15329458

Change-Id: I475ffdd28c55629f039f180293462b33fcfafff7
2021-07-20 12:31:08 +00:00
Orion Hodson
07cafca82a 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.

(cherry pick from change 5fcce9ded3)
Bug: 194069492
Ignore-AOSP-First: cherry pick of https://r.android.com/1771328
Test: manually apply ota, see no denials for reading property
Merged-In: I97acfc17ffd9291d1a81906c75039f01624dff0f
Change-Id: I05453570add7365e1c094d3ea316d53d7c52023a
2021-07-19 19:47:33 +00:00
Suren Baghdasaryan
ff51a7bf96 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
Merged-In: I927f4a1c81db3f284353fe4ab93bf454acff69b7
2021-07-19 09:48:54 +00:00
Keith Mok
f00a6f9381 Add vehicle_binding_util SELinux context
Adds required context for 'vehicle_binding_util' to 'vold' interactions.
The vehicle_binding_util actually fork/execvp vdc.
And vdc will call vold to set the binding seed value.

Cherry-picks aosp/1723726

Test: manual 'make'
Bug: 157501579
Change-Id: I5194c9cd0f5a910b1309b547aabf66bb9c397738
Merged-In: I5194c9cd0f5a910b1309b547aabf66bb9c397738
2021-07-15 19:44:27 +00:00
Orion Hodson
3e18832bf9 Add get_prop(odsign_prop) to incidentd.te am: 6f9b65aac7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15235557

Change-Id: If07e6161828b907afdd9fb4a81e859b6e250804f
2021-07-12 10:37:01 +00:00
Orion Hodson
6f9b65aac7 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
Ignore-AOSP-First: cherry pick of https://r.android.com/1761447
Test: adb bugreport and check no denial in logcat.
Change-Id: Ide5d95782929836cffc5b3921bffae3295773532
2021-07-09 16:03:35 +01:00
Hasini Gunasinghe
f6e8eea87b Merge "Allow keystore to read and write keystore.crash_count system property." into sc-dev am: 2a5ab82215
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15191874

Change-Id: I3c105d2e05f7eb6a52642ccae156afd96063f735
2021-07-09 00:26:37 +00:00
Hasini Gunasinghe
2a5ab82215 Merge "Allow keystore to read and write keystore.crash_count system property." into sc-dev 2021-07-09 00:08:41 +00:00
Hasini Gunasinghe
9fe1532ade 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 14:29:44 +00:00
Orion Hodson
3299858e64 Merge "Allow app_zygote to read zygote_tmpfs." into sc-dev am: b03c657b2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15179050

Change-Id: I6d1649b94c2a7a40675a4c411b8f61fd9dbbcfb2
2021-07-05 15:42:35 +00:00
Orion Hodson
b03c657b2b Merge "Allow app_zygote to read zygote_tmpfs." into sc-dev 2021-07-05 15:31:17 +00:00
Martijn Coenen
67db7e2d88 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: forrest
Ignore-AOSP-First: cherry pick of https://r.android.com/1753279
Change-Id: I6ddf433dbbf4a894fcb6d35c0cb723444d360e47
2021-07-05 13:54:28 +00:00
Jayant Chowdhary
4676fa7cee Merge "Define property ro.camera.enableCamera1MaxZsl" into sc-dev am: cf2b1eff87
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14683766

Change-Id: Ib2e17038a518ec52134d79ec4091b96bb5bb85da
2021-07-02 23:19:28 +00:00
Jayant Chowdhary
cf2b1eff87 Merge "Define property ro.camera.enableCamera1MaxZsl" into sc-dev 2021-07-02 23:05:50 +00:00
Orion Hodson
5111aea06c Allow zygotes and installd to read odsign properties am: be6873bd15
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15175855

Change-Id: Ifc7d1e03057e1fad472d438ddee54f988dab9347
2021-07-02 17:49:24 +00:00
Orion Hodson
be6873bd15 Allow zygotes and installd to read odsign properties
(cherry picked from commit f135ce393c)
Bug: 192049377
Test: manual
Ignore-AOSP-First: cherry pick of https://r.android.com/1753264
Change-Id: I3e8ee380fe38e1bd6cc90a568b10b97f877e68fa
2021-07-02 11:57:24 +01:00
Jayant Chowdhary
8394a04840 Define property ro.camera.enableCamera1MaxZsl
Bug: 184617195

Test: atest CameraGLTest.java (basic validity)

Change-Id: I30f8fb647cb8f67ff75d41718e3cc475d206a29a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-07-01 08:15:39 -07:00
Nicolas Geoffray
05fc2feec9 Merge "Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule." into sc-dev am: b3b0d4da94
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15130061

Change-Id: Ia8e72a16cee2e302be0ba4246467515049bf4949
2021-07-01 09:45:23 +00:00
Nicolas Geoffray
b3b0d4da94 Merge "Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule." into sc-dev 2021-07-01 09:31:02 +00:00
Janis Danisevskis
6c08342f9e Merge "Rename vpnprofilestore to legacykeystore." into sc-dev am: adb49d3df6
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14981212

Change-Id: Icd142f30543bcb25a598d36b6a9967c9f01f0ebc
2021-06-30 19:58:08 +00:00
Janis Danisevskis
adb49d3df6 Merge "Rename vpnprofilestore to legacykeystore." into sc-dev 2021-06-30 19:42:27 +00:00
Jeff Vander Stoep
448fc90693 system_app: remove adb data loader permissions am: 16b7d5d829 am: 07a9773160 am: a8cc222d9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I8bea1ab395f7a85037555ca152ef83830653711a
2021-06-30 17:34:12 +00:00
Jeff Vander Stoep
3a7bb9c192 system_app: remove adb data loader permissions am: 16b7d5d829 am: d775d04e7e am: c493691bac
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: Iadee4e65249d86640160fd315fd84c646d84c241
2021-06-30 17:33:57 +00:00
Jeff Vander Stoep
a8cc222d9b system_app: remove adb data loader permissions am: 16b7d5d829 am: 07a9773160
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: Ie1e8764537b1af92ad1d77da3478da326018ba0b
2021-06-30 17:24:25 +00:00
Jeff Vander Stoep
c493691bac system_app: remove adb data loader permissions am: 16b7d5d829 am: d775d04e7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I32ce439f2aac808a2510673c56c034828ee52f90
2021-06-30 17:24:00 +00:00
Jeff Vander Stoep
07a9773160 system_app: remove adb data loader permissions am: 16b7d5d829
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I146eeef1a9b9efb6ca93c9ff344e3c63ddf5473a
2021-06-30 17:12:52 +00:00
Jeff Vander Stoep
d775d04e7e system_app: remove adb data loader permissions am: 16b7d5d829
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I9899465b81011dbbec2a468111ad6ab8b357f081
2021-06-30 17:12:51 +00:00
Janis Danisevskis
ab433c765b Rename vpnprofilestore to legacykeystore.
Ignore-AOSP-First: No mergepath from AOSP.
Bug: 191373871
Test: N/A
Change-Id: I3f11827909bd37a2127069de82670776a8e192b3
2021-06-30 09:36:30 -07:00
Hasini Gunasinghe
1b7b282b48 Merge "Add keystore permission for metrics re-routing." into sc-dev am: 898fc5b39b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14937250

Change-Id: I5d9871f1c4e3b1e8b7c4cb63ba93661b5035be4b
2021-06-30 13:33:15 +00:00
Hasini Gunasinghe
898fc5b39b Merge "Add keystore permission for metrics re-routing." into sc-dev 2021-06-30 13:07:22 +00:00
Orion Hodson
90ee81f4b2 Merge "Allow system_server_startup to load system server odex files" into sc-dev am: ae1b59975a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15108690

Change-Id: Ieb9ffc10179c3749b886490722d0374cb0c74fd0
2021-06-29 16:11:10 +00:00
Orion Hodson
ae1b59975a Merge "Allow system_server_startup to load system server odex files" into sc-dev 2021-06-29 16:05:36 +00:00
Nicolas Geoffray
92b18f575d Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule.
Test: m
Bug: 190817237
Change-Id: I4f73d7a137f2e2ee9497ca5e4c8ef28b3f86c35c
(cherry picked from commit f82451e0a4)
2021-06-29 14:15:48 +01:00
Devin Moore
cfd0458389 Merge "Fix recovery denials when reading /proc/bootconfig" into sc-dev am: b03b9eb7e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15094918

Change-Id: I4fceed2e9a98a1c62934b24eb8ba0b02adf5ccb4
2021-06-28 22:39:18 +00:00
Devin Moore
b03b9eb7e7 Merge "Fix recovery denials when reading /proc/bootconfig" into sc-dev 2021-06-28 22:26:29 +00:00
Devin Moore
53c90152ea Fix recovery denials when reading /proc/bootconfig
These denials were found in the logs of a test failure that entered
recovery mode.
Recovery uses libfs_mgr which reads /proc/bootconfig.

Test: Boot device into recovery and check for "avd: denied" logs
Bug: 191904998
Bug: 191737840
Ignore-AOSP-First: Merged-In not used to allow the change in prebuilts to merge
Change-Id: I96ae514cfd68856717e143d295f2838a7d0eff14
2021-06-28 20:29:21 +00:00
Orion Hodson
4d6e34c3f8 Allow system_server_startup to load system server odex files
(cherry picked from commit 7778e8cdb3)

Bug: 180949581
Test: atest odsign_e2e_tests
Ignore-AOSP-First: cherry-pick from aosp
Change-Id: Ia49118ffb771abb425e3d7ee2f50ada7524f735f
2021-06-28 17:00:55 +00:00
TreeHugger Robot
846ce11c16 Merge "Add sys.usb.mtp.batchcancel to usb_config_prop" into sc-v2-dev 2021-06-28 02:55:51 +00:00