Commit graph

24 commits

Author SHA1 Message Date
Ken Yang
fcb9c033a1 WLC: Add required sysfs_wlc sepolicies
The sysfs_wlc is still required for certain services like
hal_health_default. Add these sepolicies to pass the tests.

Bug: 267171670
Change-Id: Ic4dca7a34e8ed9b096a650b1df4bb58290425117
Signed-off-by: Ken Yang <yangken@google.com>
2023-01-31 15:02:51 +00:00
Ken Yang
a49c3a5479 WLC: Cleanup the sysfs_wlc policies
The sepolicy must be self-contained without including wirelss_charger to
avoid build break in AOSP

Bug: 263830018
Change-Id: I4eee380ae61f83c5563ee8842a94fd1fb9e520ef
Signed-off-by: Ken Yang <yangken@google.com>
2023-01-10 16:02:31 +00:00
Robb Glasser
6ce1ff96e4 Give permissions to save usf stats and dump them in bugreports. am: 4b4afb2eea
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/19672464

Change-Id: Iacf95664f2ba6bf126b82e2e2d73bddcddb70422
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 03:38:27 +00:00
Robb Glasser
4b4afb2eea Give permissions to save usf stats and dump them in bugreports.
Creating a mechanism to save some USF stat history to device and pipe it
to bugreports. Granting permissions so that this can work.

Bug: 242320914
Test: Stats save and are visible in a bugreport.
Change-Id: Ia1973800ed053f54da043d306e11c0a7b10132a7
2022-08-24 22:39:16 +00:00
Treehugger Robot
f1840dcecf Merge "hal_sensors_default: Allow sensors HAL to access AoC properties." am: f939ebb650 am: e07bb61a68
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2076498

Change-Id: I7987d60f9164e4864f1271bc2af89ef86b8be5ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:11:18 +00:00
chiayupei
a53690ac43 hal_sensors_default: Allow sensors HAL to access AoC properties.
Bug: 202901227
Test: Verify pass by checking device log.

Signed-off-by: chiayupei <chiayupei@google.com>
Change-Id: I917362ddf4b8e61810d2dd27da2b7775f1aec1e7
2022-04-26 17:50:44 +08:00
Chris Kuiper
28ddd3bf9f Allow Sensor HAL access to display sysfs panel_name file.
Bug: 208926536
Test: Accessed the display sysfs from sensor HAL correctly.
Change-Id: Ide86813de20a1240f8ac55322b017329f30b296e
2022-03-24 17:55:43 -07:00
Chris Kuiper
734d79bdaf selinux: Allow sensor HAL to access the display service HAL
Add necessary permissions.

Bug: b/204471211
Test: Testing with corresponding sensor HAL changes and sensor_test commands.
Change-Id: I01774210693ceb4a6d0d4dee4fb5e905117774d3
2021-12-10 11:00:07 +08:00
Erik Staats
d60ebc5327 Allow the sensor HAL to access raw HID devices.
Bug: 195964858
Test: Paired a Sony PS4 controller and verified that it's discovered by
 the dynamic sensor HAL.
Test: See details in testing done comment in
 https://googleplex-android-review.git.corp.google.com/15847652 .
Change-Id: Ic0bdd711d066a9793eba305102e9a850e3973856
2021-09-27 18:34:30 +00:00
Erik Staats
e42a4ed3be Allow the sensor HAL to access dynamic sensor properties.
Bug: 195964858
Test: Verified dynamic sensor manager is present in sensor list and that
 no SELinux violations occur on sc-v2-dev and master.
Test: See details in testing done comment in
 https://googleplex-android-review.git.corp.google.com/15905607 .
Change-Id: I2f1c05ec0d840f6ebae1e5356f668b3f9431fd25
2021-09-24 05:53:35 -07:00
Erik Staats
aef1a206a7 Revert "Allow the sensor HAL to access dynamic sensor properties."
Revert "dynamic_sensor: Add sensor manager init to sub-HAL 2.1."

Revert submission 15874906-bug_195964858.2

Reason for revert: b/200815351
Reverted Changes:
I76a60f7fb:Allow the sensor HAL to access dynamic sensor prop...
I5d587dc46:dynamic_sensor: Add sensor manager init to sub-HAL...

Change-Id: Ib29649b058ec6f329958e1dfcba0c2e35ea79306
2021-09-22 17:53:58 +00:00
Erik Staats
fba4a09331 Allow the sensor HAL to access dynamic sensor properties.
Bug: 195964858
Test: Verified dynamic sensor manager is present in sensor list and that
 no SELinux violations occur.
Test: See details in testing done comment in
 https://googleplex-android-review.git.corp.google.com/15874927 .
Change-Id: I76a60f7fbd113059156ccaea2c4f98580cb0836a
2021-09-20 16:53:16 -07:00
Erik Staats
ad42045b87 Allow sensor HAL to read AoC dumpstate.
Bug: 194021578
Test: Simulated communication failure and verified AoC services state
 log.
Test: See details in testing done comment in
 https://googleplex-android-review.git.corp.google.com/15444398 .
Change-Id: I76f376577abad26fe86b5ecb6a570716381227f0
2021-08-02 15:56:57 -07:00
Max Shi
0bd50d1eb5 Allow USF sensor HAL to read camera persist files.
USF sensor HAL requires access to camera persist files to determine if
the camera module has been replaced (e.g. via repair), which may affect
calibration of the magnetometer.

Bug: 193727762
Test: Verify sensor HAL can open and read files under
Test: /mnt/vendor/persist/camera/
Change-Id: Icb9d7a46bf8465e1a72054ac9c8493ba18445ef3
2021-07-22 21:11:44 +00:00
Ilya Matyukhin
2460cdcc9f raviole: transition SystemUI to use HWC for LHBM
This change removes direct access to the LHBM sysfs node from SystemUI,
but allows SystemUI to make binder calls to the hardware composer (HWC),
which can be used to enable or disable LHBM.

Bug: 191132545
Bug: 190563896
Bug: 184768835
Test: no avc denials
Change-Id: I5417377ff096e869ad772e4fd2fb23f8c1fd4f1e
2021-06-23 23:38:27 -07:00
Thiébaud Weksteen
7e232446dc Fix access permissions for sysfs_aoc_reset
avc: denied { getattr } for comm="UsfHalWorker" path="/sys/devices/platform/19000000.aoc/reset" dev="sysfs" ino=69873 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs_aoc_reset:s0 tclass=file permissive=0

Bug: 190712449
Bug: 191415949
Change-Id: Ibad4e75aa60b06129221086031289c855c561e96
2021-06-18 08:56:59 +02:00
TreeHugger Robot
2391c852bd Merge "Add sepolicy for sensor HAL accessing AOC sysfs node." into sc-dev 2021-05-03 07:42:00 +00:00
Chia-Ching Yu
3f91d6417a Add sepolicy for sensor HAL to read lhbm
04-23 08:54:18.000   742   742 I /vendor/bin/hw/android.hardware.sensors@2.0-service.multihal: type=1400 audit(0.0:23): avc: denied { read } for comm=504F5349582074696D6572203430 name="local_hbm_mode" dev="sysfs" ino=70515 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs_lhbm:s0 tclass=file permissive=1

Bug: 181617640
Test: Forrest build with this patch(ab/P22167685).
      No local_hbm_mode related avc deined log.
Change-Id: Ibac3317cbca8652885310b1f5af8f4ea4d44a5c4
2021-04-29 03:00:19 +00:00
chiayupei
3fefc8a57b Add sepolicy for sensor HAL accessing AOC sysfs node.
Bug: 177943509
Test: make selinux_policy -j128 and push to device.
      No hal_sensors_default related avc deined log while suez polling.

Signed-off-by: chiayupei <chiayupei@google.com>
Change-Id: Ie32eaccf551fcb9f2d7bc763c801891f637ccc1a
2021-04-28 03:50:26 +08:00
Max Shi
55bd05960f Add sepolicy for sensor HAL accessing AOC reset sysfs node.
Bug: 184858369
Test: Verify sensor HAL process can write to the sysfs node.
Change-Id: I9700323bafa413b88f25e4117499bcc936bce9c6
2021-04-15 23:37:15 +00:00
Vova Sharaienko
a0a8cb2dff Stats: removed obsolete IStats HIDL sepolicies
Bug: 181887265
Test: Build, flash, and logcat for sepolicies messages
Change-Id: I702a8d59fadf04658addd6e3acf3a126a0a4cae7
2021-04-15 01:42:45 +00:00
Erik Staats
1082e886c0 Add policy for USF low latency transport gralloc usage.
Bug: 183233052
Test: Verified regular and direct report sampling on Raven with shared
 memory transport enabled.
Test: See details in testing done comment in
 https://googleplex-android-review.git.corp.google.com/14144079 .
Change-Id: Ia852a4a9ca6e8eacb0fb465884d17f95445a6822
2021-04-12 01:33:52 +00:00
Rick Chen
78047fa17b sensors: Add sensor related rule to chre.
[    8.417813] type=1400 audit(1615518074.988:4): avc: denied { write } for comm="sensors@2.0-ser" name="chre" dev="tmpfs" ino=908 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:chre_socket:s0 tclass=sock_file permissive=1
[    8.418075] type=1400 audit(1615518074.988:5): avc: denied { connectto } for comm="sensors@2.0-ser" path="/dev/socket/chre" scontext=u:r:hal_sensors_default:s0 tcontext=u:r:chre:s0 tclass=unix_stream_socket permissive=1
03-12 11:01:14.988   694   694 I sensors@2.0-ser: type=1400 audit(0.0:5): avc: denied { connectto } for path="/dev/socket/chre" scontext=u:r:hal_sensors_default:s0 tcontext=u:r:chre:s0 tclass=unix_stream_socket permissive=1

Also merge two sensor_hal related files into single file.

Bug: 182523946
Test: make selinux_policy -j128 and push to device.
      No hal_sensors_default related avc deined log during boot.
Signed-off-by: Rick Chen <rickctchen@google.com>
Change-Id: I49ce71ba4703528fb2e26dd8956c4ed741337ffc
2021-03-17 10:34:14 +08:00
Robin Peng
5009efa776 Move slider-sepolicy into gs101-sepolicy
from: 71e609c24c97fc8d44843af30527cbeb90d5dcdf

Bug: 167996145
Change-Id: Ie00e7e0983a3ca695bbd5140c929d07a80144301
2021-03-06 16:15:39 +08:00