Commit graph

74 commits

Author SHA1 Message Date
Treehugger Robot
6cdcc7e516 Merge "Add capacity_headroom to gpu sysfs" into main 2024-04-17 18:53:24 +00:00
Kevin DuBois
4d50d35fcd Add capacity_headroom to gpu sysfs
This allows userspace (notably the power HAL) to apply a boost to GPU
frequency independent of previously measured load.

Bug: 290625326
Test: boot, run modified Power HAL
Change-Id: I87b2e3d3dbb0a6c3eb68970fc3f3380b61586a46
2024-04-12 19:40:56 -07:00
Cheng Chang
57c36bd644 Merge "sepolicy: sysfs to gnssif/wakeup node" into 24D1-dev am: a1d7364f1f
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zumapro-sepolicy/+/26795509

Change-Id: I4e42561e483036cb9d1c850cb8f36fef31cf45ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 03:47:51 +00:00
Cheng Chang
a1d7364f1f Merge "sepolicy: sysfs to gnssif/wakeup node" into 24D1-dev 2024-04-10 03:28:56 +00:00
Cheng Chang
cdd424134a sepolicy: sysfs to gnssif/wakeup node
avc:  denied  { read } for  comm="binder:459_2" name="wakeup2" dev="sysfs" ino=54040 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

Bug: 329334328
Test: abtd under b/329334328 device-boot-health-check-extra.
Test: boot and check logcat avc.
Change-Id: If0e95efee521d15928648d1042f87d02fd41c637
2024-04-02 09:07:26 +00:00
Spade Lee
aac2240ca4 sepolicy: allow kernel to search vendor debugfs
audit: type=1400 audit(1710259012.824:4): avc:  denied  { search } for  pid=128 comm="kworker/3:1" name="max77779fg" dev="debugfs" ino=24204 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=dir permissive=0
audit: type=1400 audit(1710427790.680:2): avc:  denied  { search } for  pid=10 comm="kworker/u16:1" name="gvotables" dev="debugfs" ino=10582 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_votable_debugfs:s0 tclass=dir permissive=1
audit: type=1400 audit(1710427790.680:3): avc:  denied  { search } for  pid=211 comm="kworker/u16:4" name="google_charger" dev="debugfs" ino=16673 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_charger_debugfs:s0 tclass=dir permissive=1

Bug: 328016570
Bug: 329317898
Test: check all debugfs folders are correctly mounted
Change-Id: Ib25cc13a329b40bebe87fab43e955e2e4395de9e
Signed-off-by: Spade Lee <spadelee@google.com>
2024-04-02 07:35:39 +00:00
Treehugger Robot
cb1d17b4ba Merge "usb: correct the xhci wakeup path" into main 2024-04-01 04:00:20 +00:00
Shiyong Li
7835c69828 Merge "Label te2_rate_hz and te2_option as sysfs_display" into 24D1-dev am: a06f6749c8
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zumapro-sepolicy/+/26481942

Change-Id: I23e6fe5f8f808ee1b6b32b187fafb59d9760ec8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-28 21:37:16 +00:00
Chris Lu
2c3dc0c668 Label te2_rate_hz and te2_option as sysfs_display
Bug: 307787644
Test: Check the files label: adb shell ls -Z
Change-Id: Iab036b86b6d0c28191212a3ac10be6ddb5dcbd2b
2024-03-28 00:31:25 +00:00
Sam Ou
d03db6fe73 Merge "sepolicy: fix odpm scale value path" into 24D1-dev am: 69b8799f82
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zumapro-sepolicy/+/26678608

Change-Id: I8cab9f4ee662b370e1118215f76841735631bf36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 02:52:18 +00:00
samou
8ff89c21d0 sepolicy: fix odpm scale value path
Extend odpm sysfs path to cover the
different startup sequence.

Bug: 330815850
Change-Id: Ifd346f379b71c790e175e08e74398bae0c0417df
Signed-off-by: samou <samou@google.com>
2024-03-22 10:38:08 +00:00
Spade Lee
b3e3319964 Merge "sepolicy: allow kernel to search vendor debugfs" into main 2024-03-21 06:35:25 +00:00
Spade Lee
bac2d41b9c sepolicy: allow kernel to search vendor debugfs
audit: type=1400 audit(1710259012.824:4): avc:  denied  { search } for  pid=128 comm="kworker/3:1" name="max77779fg" dev="debugfs" ino=24204 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=dir permissive=0
audit: type=1400 audit(1710427790.680:2): avc:  denied  { search } for  pid=10 comm="kworker/u16:1" name="gvotables" dev="debugfs" ino=10582 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_votable_debugfs:s0 tclass=dir permissive=1
audit: type=1400 audit(1710427790.680:3): avc:  denied  { search } for  pid=211 comm="kworker/u16:4" name="google_charger" dev="debugfs" ino=16673 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_charger_debugfs:s0 tclass=dir permissive=1

Bug: 328016570
Bug: 329317898
Test: check all debugfs folders are correctly mounted
Change-Id: Ib25cc13a329b40bebe87fab43e955e2e4395de9e
Signed-off-by: Spade Lee <spadelee@google.com>
2024-03-20 18:13:22 +00:00
Chris Lu
026570c6c7 Allow hwc to access te_info
Bug: 315094023
Test: can access sysfs node te_info
Change-Id: I9d418ab92cc68e0234e19162812cc33a8c07e40c
2024-03-18 11:57:24 +08:00
Yabin Cui
76c40d23cf Add SOC specific ETE sysfs paths
Bug: 321061072
Test: run profcollectd on device
Change-Id: I7eb39a5e9f586e36edd11679b0988af2ff6b986b
2024-03-07 19:53:25 +00:00
Yabin Cui
af6b895528 Add SOC specific ETE sysfs paths
Bug: 321061072
Test: run profcollectd on device
Change-Id: I7eb39a5e9f586e36edd11679b0988af2ff6b986b
2024-03-06 11:06:13 -08:00
Treehugger Robot
4d305706a5 Merge "add dsim wakeup labels" into main 2024-02-28 03:59:20 +00:00
Peter Lin
f88ffce8c7 add dsim wakeup labels
Bug: 321733124
test: ls sys/devices/platform/19440000.drmdsim/19440000.drmdsim.0/wakeup -Z
Change-Id: I28bc16f23478131dfecf2ad61b306ce9ae1e2767
2024-02-27 12:59:04 +00:00
Treehugger Robot
4f275afd4e Merge "moving charger nodes to user build" into main 2024-02-21 02:01:55 +00:00
Ken Yang
7da489c7ad SELinux: fix SELinux denials
devices/platform/108d0000.hsi2c/i2c-6/6-0066/max77779-pmic-irq.2.auto/wakeup/wakeup69

Bug: 325680852
Change-Id: I974c65bab46f3de3bdcacb42c67257d91a3ecf8a
Signed-off-by: Ken Yang <yangken@google.com>
2024-02-19 04:21:12 +00:00
Daniel Okazaki
7d46482f86 moving charger nodes to user build
Bug: 323415060
Test: adb bugreport
Change-Id: I2f613d513b2c8a1eb5f52dbd6ba9f8381486a150
Signed-off-by: Daniel Okazaki <dtokazaki@google.com>
2024-02-15 23:09:32 +00:00
Kuen-Han Tsai
25748e9d93 Set SEPolicy for the disable_contaminant_detection script
This patch ports Zuma project SEPolicy and corrects the platform device
name.

init    : Command 'exec /vendor/bin/hw/disable_contaminant_detection.sh'
action=vendor.usb.contaminantdisable=true (/vendor/etc/init/hw/
init.zumapro.usb.rc:288) took 5ms and failed: Could not start exec
service: File /vendor/bin/hw/disable_contaminant_detection.sh(labeled
"u:object_r:vendor_file:s0") has incorrect label or no domain transition
from u:r:init:s0 to another SELinux domain defined. Have you configured
your service correctly?
https://source.android.com/security/selinux/device-policy#
label_new_services_and_address_denials. Note: this error shows up even
in permissive mode in order to make auditing denials possible.

Bug: 295127978
Test: manual test
Change-Id: I4269127f0101250615aad9218a9e2684579a653b
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
2024-02-02 18:07:36 +08:00
Albert Wang
5c7d5fe598 usb: correct the xhci wakeup path
Error log:
Error opening kernel wakelock stats for: wakeup146 (...xhci-hcd-exynos.8.auto/usb1/1-1/wakeup/wakeup146): Permission denied

Bug: 311087938
Test: boot to home and host mode works well
Change-Id: Ic0c11ee98779cc1e2ae60b9c2242f5cfacbb2df4
2024-01-31 15:41:11 +08:00
Treehugger Robot
a886395f0e Merge "sepolicy: allow hal_power_stats to read sysfs_display" into main 2024-01-24 06:03:41 +00:00
Chungro Lee
76d4aef727 google_battery: support BC79 firmware update
Bug: 319306735
Test: override flags via turboapp
Change-Id: I7f81574e09534052f870f0bedd1cd412485211f0
Signed-off-by: Chungro Lee <chungro@google.com>
2024-01-23 18:48:23 +00:00
Darren Hsu
16453defb3 sepolicy: allow hal_power_stats to read sysfs_display
avc:  denied  { read } for  name="available_disp_stats"
dev="sysfs" ino=76162 scontext=u:r:hal_power_stats_default:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Bug: 321871433
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I84e3a561f60bec7f75c14359dc0a31216590a335
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2024-01-23 17:42:11 +08:00
yixuanjiang
86b073086f aoc: add sysfs file entry
Test: Local
Bug: 314719343
Change-Id: I31e08e4f86b075f52b1483c17405074928b26f70
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
2024-01-17 18:12:27 +08:00
Wilson Sung
c9400f0dbb Add wakeup node
Bug: 319737316
Test: make sepolicy
Change-Id: I4ca5aa9a5ff7b9b58e220fba01cfcbf283cc25c5
2024-01-12 03:22:31 +00:00
Ken Yang
3bbde83710 selinux: label wakeup for BMS I2C 0x36, 0x69
Bug: 319035561
Change-Id: Id82f3fd351190102c87ff2a8c16d56a581a6e45d
Signed-off-by: Ken Yang <yangken@google.com>
2024-01-10 07:30:15 +00:00
Treehugger Robot
e15179f322 Merge "Label and sort wakeup nodes" into main 2024-01-10 06:45:17 +00:00
Wilson Sung
337ca68313 Label and sort wakeup nodes
Bug: 318032188
Test: make sepolicy
Change-Id: I8dfa35034657ff98957373818e98b5bf836e7a4b
2024-01-08 17:33:12 +08:00
guibing
e417775b17 zumapro: sepolicy: remove power hal denial tracker.
Remove the power hal denial tracker.
Add the missing devfreq related configuration.

Bug: 307468758
Test: Power hal works without related avc errors.
Change-Id: I038bc7701deeada4d70ef2ed17d5db64ba5b4d03
2024-01-05 21:58:20 +00:00
Wilson Sung
df88fd4e1c Add dc-main wakeup node
Bug: 308381292
Test: boot-to-home
Change-Id: I0165b4afab3b62bf4fec4ce6864cc1e8c6fc841a
2023-12-27 16:42:52 +08:00
Treehugger Robot
594a751d77 Merge "label Extcon files" into main 2023-12-26 23:17:40 +00:00
Wilson Sung
744d309e44 Add wakeup node
Fix: 308381292
Test: make sepolicy
Change-Id: I32a45a3b862ffbe9f53f88ca97bdad52e5678931
2023-12-26 17:38:34 +00:00
Wilson Sung
d6744d5856 label Extcon files
Fix: 317753346
Test: Boot with target files labeled correctly
Change-Id: I9941ec615c21a16f2235b6abfd8b3e62a0d913b2
2023-12-26 18:26:15 +08:00
Luis Delgado de Mendoza
2c24437cb1 Add necessary entries in genfs for the new BT channel.
Bug: 308452948
Test: Validated locally on husky.
Change-Id: I9d6f31e856cf4290ff4fd880f115234eb3ed019c
2023-11-30 09:41:29 -08:00
Treehugger Robot
dde9116594 Merge "Move legacy genfs_contexts to vendor" into main 2023-11-30 07:33:04 +00:00
Wilson Sung
4ab2964a03 Move legacy genfs_contexts to vendor
Bug: 312143882
Bug: 314036370
Test: make selinux_policy
Change-Id: I5846fb7b26eee3ddc7c7ac67f6b60f4357ec3608
2023-11-30 05:05:48 +00:00
guibing
6c797e281a zumapro: sepolicy: update ospm selinux settings.
Use the similar setting from zuma: ag/23270943 and ag/22980665

Bug: 300516041
Test: Power hal works without related avc errors.
Change-Id: I45fb13299f153f0f472e21f54af393147c7fbd7c
2023-11-28 00:36:38 +00:00
Chien Kun Niu
84ef937a19 hal_usb_impl: Move hal_usb_impl and hal_usb_gadget_impl to vendor
Move hal_usb_impl and hal_usb_gadget_impl to right space

Bug: 310816620
Change-Id: I04d3710dd7f4e52b204f537de73d18a1351a6836
Signed-off-by: Chien Kun Niu <rickyniu@google.com>
2023-11-15 17:50:29 +08:00
samou
eb67c49ec7 Update odpm scale value sepolicy
Bug: 290149543
Change-Id: I9682a43e3ca1488ef732580fe395b34e32a902cc
Signed-off-by: samou <samou@google.com>
2023-11-02 11:45:35 +00:00
Guibing Cai
2067882407 Merge "zumapro: sepolicy: Update gpu sysfs nodes sepolicies." into main 2023-10-30 16:49:45 +00:00
guibing
cf06992020 zumapro: sepolicy: Update gpu sysfs nodes sepolicies.
Use similar gpu sysfs nodes sepolicies from zuma.

Bug: 300516438
Test: ls -lZ /sys/devices/platform/1f000000.mali
Change-Id: I7190c19c6122bf867a6bde939c4be006ae7432f9
2023-10-27 17:55:45 +00:00
samou
30de3456f5 Allow battery_motigation to access gpu cur_freq
Bug: 290149543
Change-Id: Iee0c935194f09dfa960f5b3a701d6e8abc0af17d
Signed-off-by: samou <samou@google.com>
2023-10-26 03:30:53 +00:00
Kuen-Han Tsai
92083a0f38 genfs_contexts: Modify USB SELinux policies
Add USB wakeup sources sepolicy contexts

Bug: 295128467
Test: Change USB sepolicies and existing tests still pass.
Change-Id: Ic6c693a24c59cc3248d89208268bad6279b50003
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
2023-10-04 15:44:47 +08:00
Tai Kuo
a3abd5ad39 Allow regmap debugfs for drivers probed by insmod
auditd  : type=1400 audit(0.0:731): avc:  denied  { search } for
comm="modprobe" name="regmap" dev="debugfs" ino=2057
scontext=u:r:insmod-sh:s0 tcontext=u:object_r:vendor_regmap_debugfs:s0
tclass=dir permissive=1 bug=b/274727542

vendor_kernel_boot and vendor_dlkm modules probe by insmod need this.
Move regmap debugfs from legacy/whitechapel_pro/ to vendor/.

Bug: 274727542
Bug: 289012421
Bug: 285343932
Test: ls -d /sys/kernel/debug/regmap/*-0043
Change-Id: I1db7a5a3413467b4e14954d994b071b206fe0300
2023-09-12 16:42:21 +08:00
Treehugger Robot
fefaa5a45a Merge "Add the common CS40L26 I2C path" into main 2023-09-06 05:59:54 +00:00
Jack Wu
442592fc0c move google,charger SELinux config from legacy to vendor
Bug: 298923686
Test: no Permission denied while accessing the file node
Change-Id: Idea525f8067dd8d74065bcb128da4b25a04113dc
Signed-off-by: Jack Wu <wjack@google.com>
2023-09-05 17:12:38 +08:00
Tai Kuo
2bbb50d15b Add the common CS40L26 I2C path
Bug: 285343932
Test: No AVC denials for vibration and HAL dumpsys
Change-Id: I5a5baf70696748a19618157cd4e466e5f9ac4fdd
2023-09-04 19:28:45 +08:00