Commit graph

25858 commits

Author SHA1 Message Date
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
Jooyung Han
68c1986c21 Allow ueventd to read apex mount directories.
ueventd now scans /apex/*/firmware/ directories to find firmwares.

Bug: 167942098
Test: loading firmware from vibrator apex (sunfish)
Change-Id: I76e32e3c290fa07307377bc6fbea41c1783e40a6
2020-09-18 15:21:37 +09:00
Marco Ballesio
7be9e9e372 Merge "sepolicy: allow system server for BINDER_GET_FROZEN_INFO" 2020-09-17 15:54:46 +00:00
Treehugger Robot
e0e91016e9 Merge "Add media.resource_observer to service contexts" 2020-09-17 12:41:04 +00:00
Steven Moreland
9a4c8d3043 Merge "Remove thermalcallback_hwservice." 2020-09-17 00:37:28 +00:00
Chong Zhang
cc09dc79c5 Add media.resource_observer to service contexts
bug: 168307955
bug: 154733526
Change-Id: I0099688d1c5f151a715f4bdb7b1c2108492a8b72
2020-09-16 16:47:10 -07:00
Yifan Hong
b8e0f11986 Merge "Revert "Add modules partition"" 2020-09-16 22:45:55 +00:00
Steven Moreland
19deb1f856 Remove thermalcallback_hwservice.
There is no need for this type to be declared because it is never
registered with hwservicemanager.

This has been removed in the past but it seems it didn't automerge.

Bug: 109802374
Test: N/A
Change-Id: Id9bbc5762b6dcc8066c8543cb93db937cc4fc858
2020-09-16 21:57:05 +00:00
Steven Moreland
3c0939f08e Merge "Make AIDL HAL client attribute an exclusive client." 2020-09-16 20:32:47 +00:00
Hridya Valsaraju
a0e1be0fd3 Add permissions required for new DMA-BUF heap allocator
avc: denied { read } for comm=4E444B204D65646961436F6465635F name="system" dev="tmpfs" ino=379
scontext=u:r:system_server:s0 tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=1 avc: denied { open } for comm=4E444B204D65646961436F6465635F
path="/dev/dma_heap/system" dev="tmpfs" ino=379 scontext=u:r:system_server:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=1 avc: denied { read }
for comm="HwBinder:413_3" name="system" dev="tmpfs" ino=379 scontext=u:r:mediaswcodec:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=0 avc: denied { ioctl }
for comm=4E444B204D65646961436F6465635F path="/dev/dma_heap/system" dev="tmpfs" ino=379
ioctlcmd=0x4800 scontext=u:r:system_server:s0 tcontext=u:object_r:dmabuf_system_heap_device:s0
tclass=chr_file permissive=1 avc: denied { read } for comm=4E444B204D65646961436F6465635F
name="system" dev="tmpfs" ino=379 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=0
app=com.android.systemui it(0.0:83): avc: denied { read } for comm=4E444B204D65646961436F6465635F
name="system" dev="tmpfs" ino=379 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=0
app=com.android.systemui

Test: video playback without denials with DMA-BUF heaps enabled
Bug: 168333162
Change-Id: If936c5561ebf891e4b687a2c18760d16e0d31275
2020-09-16 13:21:50 -07:00
Bram Bonné
bcf2a6cf80 Merge "Re-audit SELinux denials for external storage." 2020-09-16 11:13:29 +00:00
Treehugger Robot
c5bb4e5744 Merge "Set expandattribute false for property attributes" 2020-09-16 02:03:52 +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
Inseob Kim
2eb0396cb4 Set expandattribute false for property attributes
To prevent these from being optimized away.

Bug: 161083890
Test: m selinux_policy
Change-Id: Ic587df21390f6ca553bf6be9ba77685f8c048ebf
2020-09-15 12:22:44 +09: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
Marco Ballesio
9e7e3fd55f sepolicy: allow system server for BINDER_GET_FROZEN_INFO
the new ioctl allows system server to verfiry the state of a frozen
binder inderface before unfreezing a process.

Bug: 143717177
Test: verified ActivityManager could access the ioctl
Change-Id: Id9d90d072ce997ed20faa918ec68f1110e2bac8f
2020-09-11 15:41:31 -07: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
e3055f979c Merge "Define power.battery_input.suspended property" 2020-09-11 16:24:36 +00:00
Bram Bonné
882b7c8d39 Re-audit SELinux denials for external storage.
Denial logging was suppressed in r.android.com/1199618 to de-flake
presubmit tests. Since Android 11, FUSE is enabled for all devices by
default, which is expected to prevent these denials from happening.

This change re-enables logging to check that assumption.

Bug: 145267097
Test: DeviceBootTest#SELinuxUncheckedDenialBootTest
Change-Id: I1e9aa6d1234f2f158ba7a7f6bf8aa8588249eee7
2020-09-11 13:24:50 +00: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
Yifan Hong
bf40692c20 Merge "Add modules partition" 2020-09-11 00:25:24 +00:00
Steven Moreland
82f7900341 Make AIDL HAL client attribute an exclusive client.
Like HIDL HALs, if we have a service which is allowed to access
hal_<foo>_service, we want that service to have the attribute
hal_<foo>_client.

Unlike HIDL HALs, some AIDL services are allowed to get ahold of all
HALs, so these have to be exempted from this check.

Fixes: 168152053
Test: neverallows pass
Change-Id: I4bce6d9441c2921c3ea40f2b01fef4030c02a28a
2020-09-11 00:02:00 +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
Xin Li
27ba511b4e Merge Android R
Bug: 168057903
Merged-In: I0b680ac97ee447483de5b99ffa30a9b8d5c02d41
Change-Id: If6cfdea13b18a5b760e9469c4c1d56d4d98bcea0
2020-09-09 20:21:28 -07:00
Yifan Hong
1fea7a2712 Reorder 30.0.ignore.cil am: 99f6010820
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1421853

Change-Id: I0b680ac97ee447483de5b99ffa30a9b8d5c02d41
2020-09-09 07:35:23 +00: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
Treehugger Robot
9822c7e5a1 Merge "Allow GKI APEX to use apexd:fd" am: 5f8de11dae
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1415170

Change-Id: I274cadfcc21f94ec642ce685af0c285c5b2eba5d
2020-09-08 22:10:18 +00:00
Treehugger Robot
5f8de11dae Merge "Allow GKI APEX to use apexd:fd" 2020-09-08 21:39:26 +00:00
Marco Ballesio
8e0ea3114f Merge "sepolicy: restrict BINDER_FREEZE to system_server" am: a16308f09a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1419071

Change-Id: Iada71ad80a4e8b59feb5bf8b07cf278c5b5753b0
2020-09-08 16:22:22 +00:00
Marco Ballesio
a16308f09a Merge "sepolicy: restrict BINDER_FREEZE to system_server" 2020-09-08 16:00:41 +00:00
Yi Kong
f725783f58 Merge "Policies for profcollectd" am: fbb6546cbd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1418828

Change-Id: Idb6774696ae8776da1c7a998f9600d3a12052f2f
2020-09-08 14:01:50 +00:00
Yi Kong
fbb6546cbd Merge "Policies for profcollectd" 2020-09-08 13:44:17 +00:00
Yi Kong
4555123090 Policies for profcollectd
Bug: 79161490
Test: run profcollect with enforcing
Change-Id: I19591dab7c5afb6ace066a3e2607cd290c0f43a6
2020-09-08 12:29:47 +00:00
Marco Ballesio
5fe69e082a sepolicy: restrict BINDER_FREEZE to system_server
BINDER_FREEZE is used to block ipc transactions to frozen processes, so
only system_server must be allowed to use it.

Bug: 143717177
Test: manually verified that attempts to use BINDER_FREEZE by processes
other
than system_server receive a sepolicy denial
Test: verified that system_server can enable/disable the freezer in
binder

Change-Id: I0fae3585c6ec409809e8085c1cc9862be4755889
2020-09-03 14:12:17 -07:00
Marvin Ramin
30ab116b7f Add ro.hdmi.cec.source.set_menu_language.enabled context am: bc1fbf57fa
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1418592

Change-Id: I02fe54be0c62c7936934db3b733acd29e3cbeb7e
2020-09-03 14:18:52 +00:00
Marvin Ramin
bc1fbf57fa Add ro.hdmi.cec.source.set_menu_language.enabled context
Add ro.hdmi.cec.source.set_menu_language.enabled to hdmi_config_prop.

Test: make; flash
Bug: 158527048
2020-09-03 09:23:20 +00:00
Treehugger Robot
61d4da7602 Merge "Add shell_test_data_file for /data/local/tests" am: d482ae77d1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1416433

Change-Id: I71009bfcae1753f0cf46042a41e567e543f02322
2020-09-03 03:07:05 +00:00
Treehugger Robot
d482ae77d1 Merge "Add shell_test_data_file for /data/local/tests" 2020-09-03 02:26:10 +00:00
Xin Li
bcbd2f8916 Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master 2020-09-01 20:03:58 +00: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
Yo Chiang
e54e86ee05 Merge changes I1dd435e3,I779e4d49 am: 86209626ce
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1415849

Change-Id: Idcae2f7db280aa0169c933dc931fdd841377110c
2020-09-01 08:53:01 +00:00
Yo Chiang
86209626ce Merge changes I1dd435e3,I779e4d49
* changes:
  Allow gsid to read from /storage/emulated/...
  Allow gsid to read from FIFO
2020-09-01 08:38:04 +00:00
Yo Chiang
04429cc35f Allow gsid to read from /storage/emulated/...
so that `gsi_tool install ... < /storage/emulated/...` can work.

Bug: 165471299
Test: adb push system.img /storage/emulated/0/Download &&
  adb root && adb shell 'gsi_tool install \
  --gsi-size $(du -b /storage/emulated/0/Download/system.img | cut -f1) \
  < /storage/emulated/0/Download/system.img'
Change-Id: I1dd435e32a4b5b5ebe2473cc703bfdd0d755a4e7
2020-09-01 08:37:52 +00:00
Yo Chiang
45fb38b8ec Allow gsid to read from FIFO
`gsid` may receive a FIFO if invoked via `gsi_tool`.
For the `su root` case, allow `gsid` to read `shell` FIFO.
For the `adb root` case, allow `gsid` to read `su` FIFO.

Move `gsi_tool` related allow rules to userdebug and
eng build only, because these are development features
that require root permission, thus shouldn't be shipped
on a user build.

Bug: 166589508
Test: adb unroot && gzip -c system.raw | adb shell "zcat | su root gsi_tool install ..."
Test: adb root && gzip -c system.raw | adb shell "zcat | gsi_tool install ..."
Change-Id: I779e4d49eb57240b1a5422139d7683dbac0da988
2020-08-31 18:12:09 +00:00
Yi Kong
4561f7ba65 Move a couple of treble policies to private am: 1be8dfacfd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1416068

Change-Id: Ied4e38564e78c7c4188538144a4f22c713383b99
2020-08-31 15:26:16 +00:00