Commit graph

1511 commits

Author SHA1 Message Date
David Massoud
d84abac63b Merge "Allow traced_probes to read devfreq" am: 47b6227134 am: eeb537fcb8 am: 418070b5ac
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1676945

Change-Id: Ibe3c1ff8ed58ec1dc514802ca5c82bf9f14f2c67
2021-04-22 01:35:16 +00:00
David Massoud
47b6227134 Merge "Allow traced_probes to read devfreq" 2021-04-22 00:18:35 +00:00
Treehugger Robot
588c0f11d9 Merge "Add a property to enable runtime debugfs restrictions in non-user builds" am: f5ec134342 am: b9f8fd42d5 am: efb6c0b1b6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1663701

Change-Id: I3a8ea3bf524dd26e9bd1804898c7f4ca3c3a61be
2021-04-20 07:29:53 +00:00
Treehugger Robot
f5ec134342 Merge "Add a property to enable runtime debugfs restrictions in non-user builds" 2021-04-20 06:07:53 +00:00
Treehugger Robot
f4014837fa Merge "Add permission checker service" am: 644639584b am: e8a381e3e4 am: 82d927bad8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1678585

Change-Id: I85473ed47a9ad47ba1356149644464821bd84a25
2021-04-19 19:35:30 +00:00
Svet Ganov
214a65213a Add permission checker service
bug: 158792096

Test: atest CtsPermission5TestCases

Change-Id: I9dbbf2fe84131ba38ac70e7171e3bd826c150640
2021-04-17 23:41:50 +00:00
David Massoud
c50fecd8ef Allow traced_probes to read devfreq
- Add dir read access to /sys/class/devfreq/
- Add file read access to /sys/class/devfreq/$DEVICE/cur_freq

Resolves the following denials:
W traced_probes: type=1400 audit(0.0:8):
avc: denied { read } for name="devfreq" dev="sysfs"
ino=28076 scontext=u:r:traced_probes:s0
tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

W traced_probes: type=1400 audit(0.0:226):
avc: denied { read } for name="cur_freq" dev="sysfs"
ino=54729 scontext=u:r:traced_probes:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

See ag/14187061 for device specific sysfs_devfreq_cur labels

Bug: 181850306
Test: ls -Z, record perfetto trace
Change-Id: I23cebb16505313160e14b49e82e24da9b81cad70
2021-04-16 20:02:06 +08:00
Joanne Chung
ece98d7cf7 Merge "[Sepolicy] Change sepolicy name back to formal name." into sc-dev 2021-04-16 07:16:26 +00:00
Hridya Valsaraju
8403ed70de Add a property to enable runtime debugfs restrictions in non-user builds
This patch adds ro.product.enforce_debugfs_restrictions to
property_contexts. When the property is set to true in non-user builds,
init mounts debugfs in early-init to enable boot-time debugfs
initializations and unmounts it on boot complete. Similarly dumpstate
will mount debugfs to collect information from debugfs during bugreport
collection via the dumpstate HAL and unmount debugfs once done. Doing
so will allow non-user builds to keep debugfs disabled during runtime.

Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS, adb shell am
bugreport
Bug: 184381659

Change-Id: Ib720523c7f94a4f9ce944d46977a3c01ed829414
2021-04-15 22:38:23 -07:00
Treehugger Robot
cdd84f56e6 Merge "Allow apexd to access a new dev_type: virtual disk" am: 1c996021a5 am: 76fc5c9fa5 am: b8561bf122
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1673185

Change-Id: Ia8b48874bdba28757a38c7633f6e6c362888de93
2021-04-16 02:26:05 +00:00
Treehugger Robot
1c996021a5 Merge "Allow apexd to access a new dev_type: virtual disk" 2021-04-16 00:54:40 +00:00
Emilian Peev
d7106d9711 Merge "Define vendor side property "ro.camerax.extensions.enabled"" am: 87a3f24857 am: 1d1e424ac6 am: 565ebf6315
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1504131

Change-Id: I95eb3b22c851396fd9751b598fbbcde825d087b9
2021-04-14 17:47:24 +00:00
Emilian Peev
87a3f24857 Merge "Define vendor side property "ro.camerax.extensions.enabled"" 2021-04-14 16:20:16 +00:00
Joanne Chung
685748706d [Sepolicy] Change sepolicy name back to formal name.
We use a fake name to prevent feature leak, we should change it back
before API freeze.

We will update the AOSP when our feature is public released.

Bug: 181179744
Test: build pass and can run service correctly
Ignore-AOSP-First: to prevent new feature leak.
Test: atest CtsTranslationTestCases

Change-Id: I956d916077f9a71cdf1df2f0be6f83e6f1f30a98
2021-04-14 14:48:28 +00:00
Roshan Pius
34f5268532 Merge "Uwb: Create a new Uwb system service" am: 0b8eafb54b am: 4b47c80944 am: f5a723a306
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1673587

Change-Id: Iae266dda5077f501918f61d2ea7da7cd23f8ae9f
2021-04-14 03:00:57 +00:00
Emilian Peev
a974640390 Define vendor side property "ro.camerax.extensions.enabled"
Add "ro.camerax.extensions.enabled" vendor-specific property.
Allow public apps to read this property.

Bug: 171572972
Test: Camera CTS
Change-Id: Id5fadedff6baaaebe5306100c2a054e537aa61ed
2021-04-13 16:42:10 -07:00
Jooyung Han
b62be12176 Allow apexd to access a new dev_type: virtual disk
In microdroid, apexd activates apexes which are passed as a virtual disk
to share apexes with host Android.

Bug: 184605708
Test: apexd running in microdroid can read /dev/block/vdb2
  when a disk image is passed to crosvm via --disk= option.
Change-Id: Ie27774868a0e0befb4c42cff795d1531b042654c
2021-04-13 15:46:16 +09:00
Roshan Pius
2a1610b4e0 Uwb: Create a new Uwb system service
This service will intercept all UwbManager API calls and then perform
necessary permission checks before forwarding the call to the vendor
UWB service. Adding sepolicy permissions for exposing the service that
handles all public API's.

Bug: 183904955
Test: atest android.uwb.cts.UwbManagerTest
Change-Id: Icce4d2f586926421c06e8902a91533002c380b8d
2021-04-12 10:26:24 -07:00
Yabin Cui
49806a1067 Merge "Add vendor_kernel_modules type to public." 2021-04-08 17:49:16 +00:00
Kalesh Singh
0a0233c868 Merge "Sepolicy for mm_events" am: df4b04571b am: abdb06eec4 am: 6c267ff23b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1662143

Change-Id: I669e997d3df52eed895a592c5c983af6feca12fc
2021-04-07 17:03:28 +00:00
Kalesh Singh
df4b04571b Merge "Sepolicy for mm_events" 2021-04-07 15:22:40 +00:00
Kalesh Singh
326fc27064 Sepolicy for mm_events
Allow mm_events to periodically arm the mm_events
perfetto trace config if mm_events is enabled.

Bug: 183037386
Test: boot; setprop persist.mm_events.enabled true; No avc denials
Change-Id: Ia9760001e7fb591f18e3e816a63281167a658c74
2021-04-06 22:46:32 -04:00
Yabin Cui
ffbf2433fc Add vendor_kernel_modules type to public.
Bug: 166559473
Bug: 183135316
Test: build and boot
Change-Id: Idc9f6235a1b69236ce274d9b3173f6d39ee04c82
2021-04-06 21:46:27 +00:00
Yabin Cui
2e2df6b3a7 Add vendor_kernel_modules type to public.
Bug: 166559473
Bug: 183135316
Test: build and boot
Change-Id: Idc9f6235a1b69236ce274d9b3173f6d39ee04c82
Merged-In: Idc9f6235a1b69236ce274d9b3173f6d39ee04c82
(cherry picked from commit 3b23f17eae)
2021-04-06 14:28:36 -07:00
Wei Wang
a9a100fc1a Merge "Add SEpolicy for HintManagerService" am: a02227bd7a am: 9d42156d64 am: 415e3e994d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1664996

Change-Id: I3c120ca74f9cf8b301ab923f0e5411c1da6bd796
2021-04-06 18:23:57 +00:00
Wei Wang
4b98ddfee4 Add SEpolicy for HintManagerService
Bug: 158791282
Test: Compiles, boots
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I76ad7858076b47990e5ddf3acb880443d0074e42
2021-04-06 00:01:57 -07:00
Kalesh Singh
d7de639f20 Merge "Memtrack Proxy Service Sepolicy" am: ca0e35d633 am: ebedb3dd20 am: 788990af1a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1657039

Change-Id: Iaaa68abb8ab78b763b42040d4c333d6c502bdb2c
2021-04-05 20:52:52 +00:00
Kalesh Singh
58fdefc953 Memtrack Proxy Service Sepolicy
Bug: 177664629
Test: Boot; No avc denials;
Change-Id: Ieae6b1dc446a91aca26fdf1314690ca30b0ed5c5
2021-04-01 00:44:00 -04:00
Treehugger Robot
da7889276f Merge "Use postinstall file_contexts" 2021-03-30 18:01:34 +00:00
Alex Light
3bb9b98fe9 Merge "Use postinstall file_contexts" into sc-dev 2021-03-29 20:11:57 +00:00
Jeffrey Vander Stoep
e972d93ee2 Merge "virtmanager: add selinux domain" am: 48740d0d6b am: 49c5eeb4bd am: 29d3f92f0a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1654408

Change-Id: I3b59de07d23b4db357843ae3686063a2424b3510
2021-03-29 09:04:42 +00:00
Jeffrey Vander Stoep
48740d0d6b Merge "virtmanager: add selinux domain" 2021-03-29 07:26:44 +00:00
Yi-Yo Chiang
a05c8a864b Split gsi_metadata_file and add gsi_metadata_file_type attribute am: 806898db48 am: e922f404e5 am: 31f5f88f52
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1620650

Change-Id: I4bf6f36a51eb4f54e76c52a9da499ca1a8e438cc
2021-03-29 05:13:45 +00:00
Yi-Yo Chiang
806898db48 Split gsi_metadata_file and add gsi_metadata_file_type attribute
Split gsi_metadata_file into gsi_metadata_file plus
gsi_public_metadata_file, and add gsi_metadata_file_type attribute.
Files that are okay to be publicly readable are labeled with
gsi_public_metadata_file. Right now only files needed to infer the
device fstab belong to this label.
The difference between gsi_metadata_file and gsi_public_metadata_file is
that gsi_public_metadata_file has relaxed neverallow rules, so processes
who wish to read the fstab can add the respective allow rules to their
policy files.
Allow gsid to restorecon on gsi_metadata_file to fix the file context of
gsi_public_metadata_file.

Bug: 181110285
Test: Build pass
Test: Issue a DSU installation then verify no DSU related denials and
  files under /metadata/gsi/ are labeled correctly.
Change-Id: I54a5fe734dd345e28fd8c0874d5fceaf80ab8c11
2021-03-29 03:09:35 +00:00
Jeff Vander Stoep
f16527f6cf virtmanager: add selinux domain
Address any denials in the log - currently just adding
the virtualization service.

Bug: 183583115
Test: ps -AZ | grep virtmanager
u: r:virtmanager:s0             virtmanager   2453     1 10930880  4544 0                   0 S virtmanager
Change-Id: Ie034dcc3b1dbee610c591220358065b8508d81cf
2021-03-25 22:22:05 +01:00
Alex Light
a1cdf2e311 Use postinstall file_contexts
Previously we would mount OTA images with a 'context=...' mount
option. This meant that all selinux contexts were ignored in the ota
image, limiting the usefulness of selinux in this situation. To fix
this the mount has been changed to not overwrite the declared contexts
and the policies have been updated to accurately describe the actions
being performed by an OTA.

Bug: 181182967
Test: Manual OTA of blueline
Test: lunch wembley-userdebug; m droid
Ignore-AOSP-First: Requires changes to device/mediatek/wembley-sepolicy
                   to be applied simultaneously to avoid breaking
                   builds. Once merged this will be cherry-picked back
                   to AOSP to maintain state.
Change-Id: I5eb53625202479ea7e75c27273531257d041e69d
2021-03-25 00:01:25 +00:00
Alex Light
16dfb432b3 Use postinstall file_contexts
Previously we would mount OTA images with a 'context=...' mount
option. This meant that all selinux contexts were ignored in the ota
image, limiting the usefulness of selinux in this situation. To fix
this the mount has been changed to not overwrite the declared contexts
and the policies have been updated to accurately describe the actions
being performed by an OTA.

Bug: 181182967
Test: Manual OTA of blueline
Merged-In: I5eb53625202479ea7e75c27273531257d041e69d
Change-Id: I5eb53625202479ea7e75c27273531257d041e69d
2021-03-24 17:00:35 -07:00
Treehugger Robot
4cb4ed724e Merge "sepolicy: export SuspendProperties.short_suspend_threshold_millis" am: e3c3dd3786 am: 1c17adc44f am: 667447ad33
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1644686

Change-Id: Ibbb447194e96a35b0d73216a74264f1fcf3545bf
2021-03-24 13:49:48 +00:00
Treehugger Robot
e3c3dd3786 Merge "sepolicy: export SuspendProperties.short_suspend_threshold_millis" 2021-03-24 12:09:28 +00:00
Denny cy Lee
b23b3cf5ad sepolicy: export SuspendProperties.short_suspend_threshold_millis
Bug: 182546466
Test: Test with getprop code outside system img
Change-Id: I4817c22ecc0a143ea818e0850fb721cbdf1d5ae5
Signed-off-by: Denny cy Lee <dennycylee@google.com>
2021-03-24 07:27:48 +00:00
Lajos Molnar
a550c18cf8 Merge "media: add codec2_config_prop" am: 3720bcced5 am: da51d58bef am: 8e45955715
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1645884

Change-Id: I2d54c577085e23d92ecfeada0a5c9d2f4b441376
2021-03-24 06:49:52 +00:00
Lajos Molnar
3720bcced5 Merge "media: add codec2_config_prop" 2021-03-24 05:30:39 +00:00
Treehugger Robot
289fef6cb5 Merge "Add soundtrigger3 HAL (AIDL) to sepolicy" am: 80acc2812e am: 08765f2b4e am: 5437929469
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1649829

Change-Id: I2173b5777c67a39b1534c79f35f6ed3b48794b21
2021-03-24 03:02:14 +00:00
Treehugger Robot
80acc2812e Merge "Add soundtrigger3 HAL (AIDL) to sepolicy" 2021-03-24 01:21:42 +00:00
Lajos Molnar
9b03782d4e media: add codec2_config_prop
This covers properties required by codec2 hal clients/service

Bug: 181380463
Change-Id: I88f87d8693fa49beda0a26c6d0492a12177f108b
2021-03-24 01:17:05 +00:00
Ytai Ben-Tsvi
9eaf3be545 Add soundtrigger3 HAL (AIDL) to sepolicy
Test: Compile and boot. Don't yet have a HAL implementation to test
      with.
Change-Id: I387abd0e8913eef865cba2aee0a4ef714232bb19
2021-03-23 10:34:19 -07:00
Yi Kong
7a532d831c Sort entries, NFC. am: 21e37b87e0 am: 564d80eb84 am: f895444325
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1649330

Change-Id: I0cbcb9dbe48e1b08c0edee28638062f25fc9653b
2021-03-23 11:34:35 +00:00
Yi Kong
c7f67bc2fa Merge "Allow profcollectd to store and read its application specific node ID in properties" am: 665c18ebc9 am: 33c5331ac6 am: b292a6df4a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1648110

Change-Id: Iaf2acce6c4fb980fd1ba748611a9b79334d5d9e4
2021-03-23 08:45:16 +00:00
Yi Kong
21e37b87e0 Sort entries, NFC.
Follow up post commit comment from aosp/1648110. No functionality
change.

Test: N/A
Change-Id: Id75d78dbae09b831a2caef37dc7d2b8784cc2957
2021-03-23 13:56:47 +08:00
Yi Kong
9b65845b4a Allow profcollectd to store and read its application specific node ID in properties
This node ID will be used to uniquely and anonymously identify a device
by profcollectd on engineering (userdebug or eng) builds.

Test: build
Change-Id: If01f71c62479d63d4d19aac15da24bc835621e66
2021-03-22 19:40:03 +00:00