Commit graph

46 commits

Author SHA1 Message Date
Jack Yu
dd64813204 Add sepolicy to allow read/write nfc snoop log data
Bug: 153704838
Test: nfc snoop log could be accessed
Change-Id: I694426ddb776114e5028b9e33455dd98fb502f0a
2020-09-24 17:36:07 +08:00
Yifan Hong
0299faf7cd Merge "Add gki.prevent_downgrade_*" 2020-09-23 23:25:35 +00:00
Nick Moukhine
75568c5540 Merge "Add sepolicy for music recognition service." 2020-09-23 13:26:52 +00:00
Nick Moukhine
affe2399b5 Add sepolicy for music recognition service.
Denial when not listed in priv_app.te:
E SELinux : avc:  denied  { find } for pid=3213 uid=10170 name=music_recognition scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:music_recognition_service:s0 tclass=service_manager permissive=0


Bug: 158194857
Test: patched and tested on internal master
Change-Id: I30e9ea79a57d9c353b732b629bd5a829c89bbcb0
2020-09-23 10:57:19 +00:00
Yu-Han Yang
9f1836ce1a Merge "Revert "Add GNSS AIDL interfaces (system/sepolicy)"" 2020-09-22 23:31:14 +00:00
Yifan Hong
cb23ab4618 Add gki.prevent_downgrade_*
Add ro.build.ab_update.gki.prevent_downgrade_{version,spl} for
update_engine to determine whether downgrade in kernel version or SPL is
considered an error or not.

Bug: 162623577
Test: update_engine_unittest
Test: apply OTA

Change-Id: If602924d50a2d5cfb3c256b82491c413a9d39f9d
2020-09-22 14:09:49 -07:00
Aleks Rozman
a1ba5a9f5a Revert "Add GNSS AIDL interfaces (system/sepolicy)"
This reverts commit d5f59b1b77.

Reason for revert: b/169150373

Change-Id: I3d5e20400ea8ee0e9ae439497245c09a13aaa716
2020-09-22 18:25:48 +00:00
Yu-Han Yang
7c7b41715e Merge "Add GNSS AIDL interfaces (system/sepolicy)" 2020-09-21 20:24:37 +00:00
Treehugger Robot
714e134b25 Merge changes If936c556,Ief48165c
* changes:
  Add permissions required for new DMA-BUF heap allocator
  Define a new selinux label for DMABUF system heap
2020-09-21 17:59:16 +00:00
Yu-Han Yang
d5f59b1b77 Add GNSS AIDL interfaces (system/sepolicy)
Bug: 159467682
Test: on cuttlefish
Change-Id: Iae7ceefe985096bcf9140e2a3592aade7ad70407
2020-09-17 13:31:29 -07:00
Yifan Hong
b8e0f11986 Merge "Revert "Add modules partition"" 2020-09-16 22:45:55 +00:00
Yifan Hong
38a901df56 Revert "Add modules partition"
Revert submission 1413808-modules_partition

Reason for revert: modules partition no longer needed
Reverted Changes:
Iceafebd85:Add modules partition
I2fa96199a:rootdir: Add modules directory
Ie397b9ec6:Add modules partition.
I4200d0cf5:fastboot: add modules partition

Bug: 163543381

Change-Id: I613d4efa346b217e0131b14424bc340ad643e1d6
2020-09-15 19:08:24 +00:00
Benjamin Schwartz
dc505c51ea Merge "Create Power Stats AIDL interface" 2020-09-15 16:39:36 +00:00
Neil Fuller
dbc1ccac14 Add location_time_zone_manager_service
The LocationTimeZoneManagerService is being added as a "true" service so
that it can be invoked by a shell command (i.e. adb shell cmd). This
also means it will be dumped as part of dumpsys.

Test: Build only
Bug: 149014708
Change-Id: Ie60c4bea3af27a89b88ed753f9cf6e74aab04cd3
2020-09-14 15:19:02 +01:00
Hridya Valsaraju
a7cd26e664 Define a new selinux label for DMABUF system heap
Define the label dmabuf_system_heap_device for /dev/dma_heap/system.
This the default DMA-BUF heap that Codec2 will use one ION is
deprecated.
Test: video playback without denials with DMA-BUF heaps enabled
Bug: 168333162

Change-Id: Ief48165cd804bde00e1881a693b5eb44a45b633b
2020-09-11 14:27:41 -07:00
Benjamin Schwartz
af8b21a6d2 Create Power Stats AIDL interface
Bug: 162472196
Test: m
Merged-In: I948ef2959b25d776d3b01985fea5eb695fd4fc1e
Change-Id: I12dc33ce055c7275559cce33142cfb2aacc5471f
2020-09-10 22:34:49 -07:00
Dmitri Plotnikov
b08351fa4f Define power.battery_input.suspended property
Bug: 167636754

Test: on a device that has triggers configured for this property
Test: adb shell setprop power.battery_input.suspended true to disable charging
Test: adb shell setprop power.battery_input.suspended false to reenable charging

Merged-In: I79209530d5355a59a1cb7a61c629339cd62f8eb1
Merged-In: I4692d84d5c137d11c6f648d15083614e707fdd07
Change-Id: I7a20c0d561a21fa958cf71c499604d70efdbe979
2020-09-10 22:33:24 -07:00
Dmitri Plotnikov
8cad90e5f9 Define power.battery_input.suspended property
Bug: 167636754

Test: on a device that has triggers configured for this property
Test: adb shell setprop power.battery_input.suspended true to disable charging
Test: adb shell setprop power.battery_input.suspended false to reenable charging

Merged-In: I79209530d5355a59a1cb7a61c629339cd62f8eb1
Merged-In: I4692d84d5c137d11c6f648d15083614e707fdd07
Change-Id: I4692d84d5c137d11c6f648d15083614e707fdd07
2020-09-10 18:52:30 -07:00
Treehugger Robot
fd735237e4 Merge "Add sepolicy for IFingerprint" 2020-09-11 01:11:03 +00:00
Ilya Matyukhin
c71c2993e9 Add sepolicy for IFingerprint
Bug: 152416783
Test: run on cuttlefish
Change-Id: I58d7c3bc9c81612b03bab3b9da938c091c02e3c1
2020-09-10 16:50:19 -07:00
Yifan Hong
648d956cc0 Add modules partition
Add updateable_module_file that describes all files under /modules. If
more directories (e.g. /modules/apex etc.) are added in the future,
separate labels should be applied to them.

Bug: 163543381
Test: on CF check /proc/mounts

Change-Id: Iceafebd85a2ffa47a73dce70d268d8a6fb5a5103
2020-09-08 16:35:51 -07:00
Yifan Hong
99f6010820 Reorder 30.0.ignore.cil
Test: pass
Change-Id: Ib6e55348641db3eeb26eaa74423ccd62724ec7ed
2020-09-08 16:35:51 -07:00
Colin Cross
da4e51b71f Add shell_test_data_file for /data/local/tests
Add a domain for /data/local/tests which will be used by atest
to execute tests on devices as shell or root.

Bug: 138450837
Test: atest binderVendorDoubleLoadTest memunreachable_unit_test memunreachable_binder_test
Change-Id: Ia34314bd9430e21c8b3304ac079e3d9b5705e19c
2020-09-01 11:17:19 -07:00
Yi Kong
cdacc620b7 Add file context type for /sys/devices/cs_etm
This is the cs_etm (Coresight ETM) sysfs directory.

Bug: 79161490
Test: build
Change-Id: I9a66bb4b2684ef8637106a36f7d490d8f805cabf
2020-08-31 08:28:12 +00:00
Treehugger Robot
4c5220c2bc Merge "Support GKI updates" 2020-08-28 21:24:34 +00:00
Gavin Corkery
df9d784e6d Merge "Selinux policy for new userspace reboot logging dir" 2020-08-26 21:47:19 +00:00
Gavin Corkery
ed62b31812 Selinux policy for new userspace reboot logging dir
Add userspace_reboot_metadata_file, which is written to by init,
and read by system server. System server will also handle the
deletion policy and organization of files within this directory,
so it needs additional permissions.

Test: Builds
Bug: 151820675
Change-Id: Ifbd70a6564e2705e3edf7da6b05486517413b211
2020-08-26 21:00:09 +01:00
Benjamin Schwartz
6b5deb1e3f Revert "Create Power Stats AIDL interface"
Revert "Fix sepolicy for con_monitor"

Revert submission 1404976-bs_ps_aidl

Reason for revert: Caused build breakages b/165908363
Reverted Changes:
I17883a16f:Fix sepolicy for con_monitor
Icd029f58a:Create Power Stats AIDL interface

Change-Id: Iab2a7ef6fcef40c59275db37b6fca090b304e9da
2020-08-21 15:35:25 +00:00
Benjamin Schwartz
ba876ef1b3 Create Power Stats AIDL interface
Bug: 162472196
Test: m
Merged-In: I948ef2959b25d776d3b01985fea5eb695fd4fc1e
(cherry picked from commit 550e376769)
Change-Id: Icd029f58a7babee0ad8249087b76683d104736d5
2020-08-20 23:25:55 +00:00
Inseob Kim
46dd4be366 Reland "Add persist.dumpstate.verbose_logging.enabled to system/..."
This reverts commit 409c038d3c.

Reason for revert: fixed breakage

Bug: 163759751
Test: lunch sdk; m selinux_policy
Change-Id: I59d170cd3a764209d353d77372387fdc8719ea7f
2020-08-18 11:31:42 +09:00
Bonian Chen
e4d26aef3e Merge "Revert "Add persist.dumpstate.verbose_logging.enabled to system/..."" 2020-08-18 02:21:32 +00:00
Roman Kiryanov
409c038d3c Revert "Add persist.dumpstate.verbose_logging.enabled to system/..."
Revert submission 1401269-dumpstate-prop

Reason for revert: build break, "Failed to build policydb".
Reverted Changes:
I058100eac:Add persist.dumpstate.verbose_logging.enabled to s...
Ia0656a3cb:Move hal_dumpstate's property from goldfish

Change-Id: I3a49545d3ee69fdae54ad66e44ec28b6cbfb4b87
2020-08-18 01:41:13 +00:00
Treehugger Robot
1a25123361 Merge "Add persist.dumpstate.verbose_logging.enabled to system/sepolicy" 2020-08-18 01:00:14 +00:00
Roman Kiryanov
dc2f9a86f0 Add persist.dumpstate.verbose_logging.enabled to system/sepolicy
hardware/interfaces/dumpstate/1.1 refers to this property,
so it must be defined in system/sepolicy.

Bug: 163759751
Test: atest VtsHalDumpstateV1_1TargetTest
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I058100eacd05e32de56e0ff9de465625a2e71e9c
2020-08-17 16:45:47 -07:00
Marco Ballesio
8f280b0847 sepolicy support for cgroup v2
cgroup v2 is going to be used for freezer v2 support. The cgroup v2 hiearchy
will be mounted by init under /sys/fs/cgroup hence proper access rights
are necessary for sysfs. After mounting, the cgroup v2 kernfs will use
the label cgroup_v2 and system_manager will handle the freezer

Bug: 154548692
Test: verified that files undes sysfs and cgroup v2 kernfs are accessed
as required to allow proper functioning for the freezer.

Change-Id: Idfb3f6e77b60dad032d1e306d2f9b58cd5775960
2020-08-17 09:49:10 -07:00
Yifan Hong
8ac37f025f Support GKI updates
Adds proper file_contexts and domains for pre/postinstall hooks.
Allow the pre/postinstall hooks to communicate with update_engine stable
service.

Bug: 161563386
Test: apply a GKI update

Change-Id: I4437aab8e87ccbe55858150b95f67ec6e445ac1f
2020-08-10 16:10:38 -07:00
Janis Danisevskis
c40681f1b5 Add libselinux keystore_key backend.
We add a new back end for SELinux based keystore2_key namespaces.
This patch adds the rump policy and build system infrastructure
for installing keystore2_key context files on the target devices.

Bug: 158500146
Bug: 159466840
Test: None
Change-Id: I423c9e68ad259926e4a315d052dfda97fa502106
Merged-In: I423c9e68ad259926e4a315d052dfda97fa502106
2020-08-05 16:11:48 +00:00
Yifan Hong
537ec551c8 Merge "Add update_engine_stable_service" 2020-08-04 19:06:08 +00:00
Yifan Hong
42351f9aab Add update_engine_stable_service
This is the stable AIDL binder interface that update_engine exposes in
addition to update_engine_service.

Test: run update_engine
Bug: 160996544

Change-Id: I28ba11810844373d48c8c203f79e98150f932942
2020-07-31 15:49:10 -07:00
Danning Chen
134ac19776 Add sepolicy for people service
This is to allow people service to publish a binder service that expose
system private APIs to retrive and manage the recent cached
conversations.

Test: build and run on a test device
Bug: 162593584
Change-Id: I31b5d8bc851ea7225e215b3f86ed6d47b32b1ba4
2020-07-31 14:37:47 -07:00
Hongguang Chen
67c3688497 Allow vendor_init to set service.adb.tcp.port
adbd and apps (SystemUI and CTS test apps) need to read it.

BUG: 162205386
Test: Connect to device which sets service.adb.tcp.port in vendor
      partition through TCP adb.

Change-Id: Ia37dd0dd3239381feb2a4484179a0c7847166b29
2020-07-28 02:13:03 +00:00
Yi Kong
239c85dd0d Add sepolicy for profcollectd
This does not yet list all the required capabilities for profcollectd,
but it at least allows the service to start under permissive mode.

Bug: 79161490
Test: start profcollectd
Change-Id: I92c6192fa9b31840b2aba26f83a6dc9f9e835030
2020-07-01 23:44:37 +08:00
Chong Zhang
351dd88e86 transcoding: allow transcoding service to use media services
Also allow it to use fd from shell for unit tests.

bug: 154734285
Change-Id: I2c5f3feca11f7ee4ee3ad927050b31f425370a84
2020-06-16 15:45:13 -07:00
Jeff Vander Stoep
bd3fd0eebe Label kprobes and restrict access
Bug: 149659981
Test: build
Change-Id: I6abcd1bb9af15e7ba0f1f5e711ea9ac661bffc25
2020-06-11 07:43:30 +02:00
Jiyong Park
93a99cf8fc Introduce apex_info_file type
/apex/apex-info-file.xml is labeled as apex_info_file. It is
created/written by apexd once by apexd, and can be read by zygote and
system_server. The content of the file is essentially the same as the
return value of getAllPackages() call to apexd.

Bug: 154823184
Test: m
Merged-In: Ic6af79ddebf465b389d9dcb5fd569d3a786423b2
(cherry picked from commit f1de4c02cc)
Change-Id: Ic6af79ddebf465b389d9dcb5fd569d3a786423b2
2020-05-27 09:35:11 +09:00
Inseob Kim
ace36abec5 Add 30.0 mapping files
Steps taken to produce the mapping files:

1. Add prebuilts/api/30.0/plat_pub_versioned.cil from the
/vendor/etc/selinux/plat_pub_versioned.cil file built on rvc-dev with
lunch target aosp_arm64-eng. Add prebuilts/api/30.0/vendor_sepolicy.cil
as an empty file.

2. Add new file private/compat/30.0/30.0.cil by doing the following:
- copy /system/etc/selinux/mapping/30.0.cil from rvc-dev aosp_arm64-eng
device to private/compat/30.0/30.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 30 sepolicy.
Find all such types using treble_sepolicy_tests_30.0 test.
- for all these types figure out where to map them by looking at
29.0.[ignore.]cil files and add approprite entries to 30.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_30.0 and installs
30.0.cil mapping file onto the device.

Bug: 153661471
Test: m treble_sepolicy_tests_30.0
Test: m 30.0_compat_test
Test: m selinux_policy
Change-Id: I6dfae41fbd5f245119ede540d2c321688d6e7929
2020-05-11 04:32:00 +00:00