Commit graph

1549 commits

Author SHA1 Message Date
Wen Chang Liu
4a0a6e1d78 Merge "gs101: move mediacodec_samsung sepolicy to gs-common" into main 2024-01-09 14:49:59 +00:00
wenchangliu
da91eed387 gs101: move mediacodec_samsung sepolicy to gs-common
remove mediacodec_samsung sepolicy in legacy path since we will include it from gs-common.

Bug: 318793681
Test: build pass, camera record, youtube
Change-Id: Idc0e19348d1e113e95305279aebbbaf82c79d730
2024-01-05 10:14:32 +00:00
Chi Zhang
0212befe1e Allow GRIL to get power stats.
AVC log: SELinux : avc:  denied  { find } for pid=3147 uid=10219 name=android.hardware.power.stats.IPowerStats/default scontext=u:r:grilservice_app:s0:c219,c256,c512,c768 tcontext=u:object_r:hal_power_stats_service:s0 tclass=service_manager permissive=0

Bug: 286187143
Test: build and boot
Change-Id: Iff51df55ad0011815b764b334801dedc6a6d1cbc
2023-12-19 12:20:20 -08:00
Boon Jun Soh
548c2f184d Fix rlsservice sepolicy
Allows bugreport generation

Bug: 315255760
Bug: 309379598
Test: abd bugreport & ensure lack of rls avc denied logs
Change-Id: Ib3fc7b089c7aea4aea69f219d4c19847d39b0729
2023-12-11 14:39:32 +08:00
David Drysdale
422638059a Merge "Add Secretkeeper HAL" into main 2023-12-06 10:21:03 +00:00
David Drysdale
03785012ed Add Secretkeeper HAL
Test: VtsAidlAuthGraphSessionTest
Bug: 306364873
Change-Id: I72d9d9afd57d265bd2a019a02d6aa364deb4acb4
2023-12-05 10:38:01 +00:00
Jason Chiu
3f3bfddaff gs101: move common sepolicy related to bootctrl hal to gs-common
Bug: 265063384
Change-Id: I2e7bee9c6be4a6802a759bf52fb412dd73f868bd
Signed-off-by: Jason Chiu <jasoncschiu@google.com>
2023-12-05 01:24:03 +08:00
Khoa Hong
213b76e9b8 Suppress avc error log on debugfs's usb folder.
The XHCI driver in kernel will write debugging information to DebugFS on
some USB host operations (for example: plugging in a USB headphone). We
are not using those information right now.

Bug: 311088739
Test: No error when plugging a USB headphone in.
Change-Id: If7c511f4466959d819f2672ae8f82a8a8dae83e4
2023-11-30 15:01:37 +08:00
Randall Huang
ec6ba5806d Move sg_device related policy
Bug: 312582937
Test: make selinux_policy
Change-Id: I27a86d47777a6d769b93fc1c40ae27dacf83ab10
Signed-off-by: Randall Huang <huangrandall@google.com>
2023-11-22 14:01:33 +08:00
Bryan Lavrich
a1bff1c2e9 Merge "aoc: add sysfs file entry" into main 2023-11-20 20:22:27 +00:00
Devika Krishnadas
4ed070d0aa Merge "Add Pixel Mapper as a sp-HAL" into main 2023-11-20 18:17:28 +00:00
Devika Krishnadas
1f9e3a93e1 Add Pixel Mapper as a sp-HAL
Bug: 267352318

Change-Id: I77b064c3eae2b47677ee83df8483e6f7aba08e6e
Signed-off-by: Devika Krishnadas <kdevika@google.com>
2023-11-16 01:17:05 +00:00
Daniel Norman
c9fcb3e550 Merge "Removes duplicate hidraw_device type definition." into main 2023-11-14 19:05:05 +00:00
Lei Ju
406bfbcee7 Merge "Set up sepolicy for CHRE HAL process" into main 2023-11-14 17:58:30 +00:00
Daniel Norman
e948bb326a Removes duplicate hidraw_device type definition.
This type is now defined by the platform.

Bug: 303522222
Change-Id: I3e1fc7cb102fa9e9a80b8751eb0da505e3b3d69f
Test: ls -z /dev/hidraw0
2023-11-10 22:53:15 +00:00
Lei Ju
89dd17c9ad Set up sepolicy for CHRE HAL process
Contexthub (CHRE) team is removing the chre daemon and incorporating
its functionalities into the next gen HAL. This CL copied the
permissions we received in whitechapel/vendor/google/chre.te to
hal_contexthub.te to enable the same set of permissions on gs101.

Bug: 247124878
Test: launch the hal process on oriole and verify it can perform
required operations such as loading nanoapps holding wakelocks,
query nanoapps, etc.

Change-Id: I8ce6b4f7f411e50cf454bb5f1286f73d4d46aced
2023-11-10 14:18:05 -08:00
Alex Iacobucci
8966bfa237 aoc: add sysfs file entry
Test: on device
Bug: 309950738
Change-Id: I7e2ceaa61c7870ace37014ad39f3a119f3712569
Signed-off-by: Alex Iacobucci <alexiacobucci@google.com>
2023-11-10 18:28:51 +00:00
Mike Wang
a6c7f726b5 Change the MDS to platform app in selinux ap context.
The MDS will be signed with platform key and become a platform app. To
make the selinux rules for modem_diagnostic_app work, need to set it to
platform app in app context.

Bug: 287683516

Test: Tested with both dev key or platform key signed MDS apps and the selinux rules works.
Change-Id: If890f7caaac33e5ddc6c02cc8084654a10cea416
2023-11-09 07:17:07 +00:00
Rick Chen
04e4ac1717 sensors: Move USF related sepolicy to gs-common.
Bug: 305120274
Test: Compile pass. Flash the build to WHI devices and no sensor
      related avc denied log.
Change-Id: I56174a24d159968c01d1572e84f4bcdd7930a709
Signed-off-by: Rick Chen <rickctchen@google.com>
2023-11-07 10:50:48 +08:00
JimiChen
ea198bd127 Update SELinux policies for rlsservice
1. Move rls_service context from vndservice_contexts to
   service_contexts.
2. Allow binder calls from rlsservice to servicemanager
3. Change rls_service type from vndservice_manager_type to
   service_manager_type.

Bug: 301520085
Test: GCA
Change-Id: I7badfe2ddb73b13884b54d2c8972e1921af6ea38
2023-11-01 18:20:45 +08:00
Will McVicker
f0047396de Move i2c-cs40l26a to gs101-sepolicy
The i2c-7/7-0043 label is shared with both i2c-7/i2c-cs40l25a and
i2c-7/i2c-cs40l26a nodes. To make it clear that these all are related,
let's move i2c-7/i2c-cs40l26a to gs101-sepolicy and have all the gs101
vibrator policy labels together.

Bug: 302549624
Bug: 291606723
Test: Verify i2c nodes on r4
Fixes: ccdd975a88d0 ("Update the cs40l26a i2c device node sepolicy labeling")
Change-Id: I2950a2c064e31e300d07f124cf1a7bfc00ae58c3
2023-09-29 09:21:48 -07:00
Will McVicker
d17c49fd0a Update the i2c device node sepolicy labeling
This change needs to be merged with the corresponding kernel change that
sets the i2c bus aliases correctly to match the existing v5.10 bus
probe ordering.

To verify the sepolicy labeling doesn't change, run the below commands
and diff the stdout on builds with and without the changes. For extra
credit, verify the nodes are labeled the same when upgrading the kernel
to v6.1 (with the correct i2c aliases to match the existing policy):

  acpm_bus_array=("acpm_mfd_bus@17500000" "acpm_mfd_bus@17510000")
  for bus in ${acpm_bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}/i2c-*;
  done

  bus_array=("10960000" "10970000" "10d50000" "10900000")
  for bus in ${bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}.hsi2c/i2c-*;
  done

Test: verify on r4
Bug: 291606723
Change-Id: Ifbfc53fbeb39a47cda4263fc706f11af6675d90e
2023-09-29 09:21:44 -07:00
Roy Luo
fb8d2f7d73 Revert "Update the i2c device node sepolicy labeling"
Revert submission 24855741-gs101-i2c-bus-fixes

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=bluejay-trunk_food-userdebug&lkgb=10876543&lkbb=10876988&fkbb=10876587, bug b/302549624.

Reverted changes: /q/submissionid:24855741-gs101-i2c-bus-fixes

Change-Id: Iea8fe5b374609225ab07aa13effcb1d6e8d13468
BUG: 302549624
2023-09-28 18:00:13 +00:00
Will McVicker
421a5fef33 Update the i2c device node sepolicy labeling
This change needs to be merged with the corresponding kernel change that
sets the i2c bus aliases correctly to match the existing v5.10 bus
probe ordering.

To verify the sepolicy labeling doesn't change, run the below commands
and diff the stdout on builds with and without the changes. For extra
credit, verify the nodes are labeled the same when upgrading the kernel
to v6.1 (with the correct i2c aliases to match the existing policy):

  acpm_bus_array=("acpm_mfd_bus@17500000" "acpm_mfd_bus@17510000")
  for bus in ${acpm_bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}/i2c-*;
  done

  bus_array=("10960000" "10970000" "10d50000" "10900000")
  for bus in ${bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}.hsi2c/i2c-*;
  done

Test: verify on r4
Bug: 291606723
Change-Id: Id5b9021cdbf4b9d3578d5e9ee655463ab62dcd12
2023-09-25 13:04:31 -07:00
Treehugger Robot
a4ceb907b6 Merge "Move coredomain seapp ctx and types to system_ext" into main 2023-09-05 23:21:35 +00:00
Inseob Kim
fb3a116366 Move coredomain seapp ctx and types to system_ext
Coredomain apps shouldn't be labeled with vendor sepolicy, due to Treble
violation.

Bug: 280547417
Test: build bluejay and boot test
Change-Id: I48441749de4eb1de90ce5a307b1d47ae3cb9592d
2023-09-05 04:20:00 +00:00
yixuanjiang
a785706208 Label AoC wakeup for system suspend
Bug: 291237382
Change-Id: Iddcee44cbe921b590a240c75504a0a44634a244d
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
2023-09-05 03:01:07 +00:00
Roy Luo
9a0d54fd3f Merge "Support monitoring USB sysfs attributes in USB HAL" into main 2023-08-23 19:38:59 +00:00
Inseob Kim
174f85495b Start tracking vendor seapp coredomain violations am: 80c26d2524 am: 4776b160b0 am: 2f05bf9770 am: e95838186f am: 9fb617f166
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2718734

Change-Id: I9ebf041efa7bbdacf600f613f0d34b9adba72d2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-22 11:23:51 +00:00
Inseob Kim
9fb617f166 Start tracking vendor seapp coredomain violations am: 80c26d2524 am: 4776b160b0 am: 2f05bf9770 am: e95838186f
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2718734

Change-Id: I97e92b25af5b51af0df757474f4a4205905fbd61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-22 10:01:01 +00:00
Inseob Kim
2f05bf9770 Start tracking vendor seapp coredomain violations am: 80c26d2524 am: 4776b160b0
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2718734

Change-Id: Id14f253389319094ac9524e20645e674802fdcc9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-22 07:45:50 +00:00
Inseob Kim
80c26d2524 Start tracking vendor seapp coredomain violations
As part of Treble, enforce that vendor's seapp_contexts can't label apps
using coredomains. Apps installed to system/system_ext/product should be
labeled with platform side sepolicy.

This change marks violating domains that need to be fixed.

Bug: 296512193
Test: build oriole and see build log
Change-Id: I7d5b91014362a64f3d66b3913d4d1bc773d922c8
2023-08-21 11:02:03 +00:00
Renato Grottesi
bbef712e84 Cleanup unused ArmNN settings.
Test: pre-submit
Bug: 294463729
Change-Id: I1008e2c14ae8d9c7950e5d6add49372fa2b42ce2
2023-08-17 08:57:45 +00:00
Roy Luo
40bf4a249d Support monitoring USB sysfs attributes in USB HAL
Grant access to USB sysfs attributes.

Bug: 285199434
Test: no audit log in logcat after command execution
Change-Id: Ic9c61cb5153e06eb9db15f4451a4e6769d688431
2023-08-16 19:04:51 +00:00
Allie Liu
34b4b35bd6 Merge "vendor_init: add esim_prop" into main 2023-08-01 04:51:04 +00:00
Inseob Kim
fd002a1434 Revert "Move coredomain seapp contexts to system_ext" am: 53081f7032 am: 6e005fc103 am: 19c7357d6e
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/24239945

Change-Id: I1eca26a0baa2284c683bedfeafa9e5fc2f98c733
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 10:07:09 +00:00
Inseob Kim
19c7357d6e Revert "Move coredomain seapp contexts to system_ext" am: 53081f7032 am: 6e005fc103
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/24239945

Change-Id: I111315f16d13045b16c7805a910c296066ab64cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 08:16:00 +00:00
Inseob Kim
53081f7032 Revert "Move coredomain seapp contexts to system_ext"
This reverts commit d9478e1c21.

Reason for revert: breaking build. b/293539702

Change-Id: Ie8a66971fcf249c9d08b4898e24b962d6aaf3ce6
2023-07-28 06:02:59 +00:00
Treehugger Robot
d84cae41c3 Merge "SELinux: fix sysfs_wlc avc denials" into main 2023-07-28 05:43:55 +00:00
Inseob Kim
f40160e6e8 Move coredomain seapp contexts to system_ext am: d9478e1c21 am: 48c0a03e64 am: 7abc405cef
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/24157027

Change-Id: Iddeb8cc4a317895ad50616766419df25d06f32e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 05:17:36 +00:00
Inseob Kim
7abc405cef Move coredomain seapp contexts to system_ext am: d9478e1c21 am: 48c0a03e64
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/24157027

Change-Id: I3ce5c18e0019332811a00b1c3856518b987bbf90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 04:31:43 +00:00
Ken Yang
694fd0935a SELinux: fix sysfs_wlc avc denials
Bug: 291541479
Change-Id: I40b0cdea1681a8de24dede4aca830097812c736a
Signed-off-by: Ken Yang <yangken@google.com>
2023-07-28 03:47:28 +00:00
Inseob Kim
d9478e1c21 Move coredomain seapp contexts to system_ext
Coredomain apps shouldn't be labeled with vendor sepolicy, due to Treble
violation.

Bug: 280547417
Test: TH
Change-Id: I68d6564ca9e5ba77d3562b6c73b32cd1713001f7
2023-07-21 15:07:36 +09:00
Kiyoung Kim
85b034e0de Move file context on vendor libdmabufheap to system/sepolicy am: e2aaff8d5e am: 3ed876e3d8 am: dd034df5b0 am: 8b2a99dadb am: 6062907c94
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2666615

Change-Id: I0a017beb912199681cd36417c9d826af66c84afd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 05:12:57 +00:00
Kiyoung Kim
6062907c94 Move file context on vendor libdmabufheap to system/sepolicy am: e2aaff8d5e am: 3ed876e3d8 am: dd034df5b0 am: 8b2a99dadb
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2666615

Change-Id: I86ee4490ad1ddd3d8fdd8404d3d39b4f11c0298f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 04:30:11 +00:00
Kiyoung Kim
dd034df5b0 Move file context on vendor libdmabufheap to system/sepolicy am: e2aaff8d5e am: 3ed876e3d8
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2666615

Change-Id: I5b05d5a3855f153d54e5d0bb929003dad4e021cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 03:00:55 +00:00
Kiyoung Kim
e2aaff8d5e Move file context on vendor libdmabufheap to system/sepolicy
libdmabufheap is former VNDK-SP library, and will be marked as sp-hal
sepolicy label by default. Current definition on gs-101 creates conflict
with generic sepolicy update. This change removes label on libdmabufheap
from gs101 and move it to generic sepolicy.

Bug: 291673098
Test: N/A
Change-Id: Ida23dc71e9794aa86e8b50ed927dc6b5fa57ea91
2023-07-20 09:53:15 +09:00
Utku Utkan
19e79acba9 Revert^2 "Introduce CameraServices seinfo tag for PixelCameraServices" am: e10372e111 am: 2c9f86f98e
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/24124265

Change-Id: I60fc2bc79bf2f4785e2f4b45ef78e8b85b1a5a03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 19:58:33 +00:00
Utku Utkan
e10372e111 Revert^2 "Introduce CameraServices seinfo tag for PixelCameraServices"
Revert submission 24122569-revert-24056607-pixel-camera-services-extensions-sepolicy-OFSULTXSBL

Reason for revert: Relanding the original topic after copying the certificates under `device/google` for `without-vendor` branches

Reverted changes: /q/submissionid:24122569-revert-24056607-pixel-camera-services-extensions-sepolicy-OFSULTXSBL

Bug: 287069860
Test: m && flashall
Change-Id: Icf52453dc2a0a4d60958b8fe76509f385ac6fae2
2023-07-18 22:16:25 -07:00
Inseob Kim
cdfcf7c0c2 Revert "Introduce CameraServices seinfo tag for PixelCameraServices" am: 722322664c am: 255748199d
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/24122568

Change-Id: I28619e3f7896dbbfd48724f0efaa80c62f7bda2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 03:33:46 +00:00