From ccdd975a88d05de92a839697f3963baec914a62b Mon Sep 17 00:00:00 2001 From: Will McVicker Date: Mon, 18 Sep 2023 15:29:57 -0700 Subject: [PATCH] Update the cs40l26a 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 b3 Bug: 291606723 Change-Id: I36e41d7e2379b731c2092a679dc4e4042e0d3651 --- bluejay/genfs_contexts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bluejay/genfs_contexts b/bluejay/genfs_contexts index b01c716..09f7b8a 100644 --- a/bluejay/genfs_contexts +++ b/bluejay/genfs_contexts @@ -1,13 +1,6 @@ # Haptics -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-0/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-1/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-2/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-3/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-4/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-5/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-6/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 genfscon sysfs /devices/platform/10970000.hsi2c/i2c-7/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 -genfscon sysfs /devices/platform/10970000.hsi2c/i2c-8/i2c-cs40l26a u:object_r:sysfs_vibrator:s0 +genfscon sysfs /devices/platform/10970000.hsi2c/i2c-7/7-0043 u:object_r:sysfs_vibrator:s0 # Storage genfscon sysfs /devices/platform/14700000.ufs/vendor u:object_r:sysfs_scsi_devices_0000:s0