Commit graph

11 commits

Author SHA1 Message Date
Roy Luo
139f5304a3 Revert^3 "Add udc sysfs to udc_sysfs fs context"
371f678632

Bug: 339241080
Change-Id: Ia1355fca00339bce7ba5554680b62509558c2b4f
2024-10-29 21:36:05 +00:00
Roy Luo
371f678632 Revert^2 "Add udc sysfs to udc_sysfs fs context"
This reverts commit 66ba3214b8.

Reason for revert: fix breakage in next build with build-time flag in
selinux policy.

Fixed the following audit logs:
[  285.983545] type=1400 audit(1724270284.724:31): avc:  denied  { read } for  comm="android.hardwar" name="state" dev="sysfs" ino=85740 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_udc:s0 tclass=file permissive=0

Bug: 339241080
Test: tested on Shiba trunk_staging and next builds
Flag: build.RELEASE_USB_UDC_SYSFS_SELINUX_POLICY_ENABLED
Change-Id: Ie4979f408a5bca0bb9b9762048ab716ddeeb4d2f
2024-08-21 22:15:22 +00:00
Roy Luo
66ba3214b8 Revert "Add udc sysfs to udc_sysfs fs context"
Revert submission 27445245-339241080

Reason for revert: break husky-next-user (linux) build 12111903

Reverted changes: /q/submissionid:27445245-339241080
Bug: 339241080
Change-Id: If558e5bef47a0e617e4b4997f0ad9c8154b43ee9
2024-07-19 01:16:47 +00:00
Roy Luo
eb5a3cd47a Add udc sysfs to udc_sysfs fs context
This is needed for system server to monitor usb gadget state.
Grant hal_usb_impl read access as it's needed by UsbDataSessionMonitor.

Bug: 339241080
Test: tested on Shiba
Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update
Change-Id: Iab3c20569cb22d7524ca303f6cb3eaf40aa2161d
2024-07-18 22:56:15 +00:00
Roy Luo
6c5b44f1bb hal_usb_impl: Grant read permission to usb overheat files
Carried over from WHI PRO setting.

Bug: 307583011
Test: no audit logs
Change-Id: I45bb396f2597a4a8c150ad2975ecfa427d44f2a9
2024-02-07 05:18:41 +00:00
Kyle Tso
8912975a8b hal_usb_impl: Add get_prop for vendor_usb_config_prop
avc:  denied  { read } for  comm="android.hardwar" name="u:object_r:vendor_usb_config_prop:s0" dev="tmpfs" ino=391 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:vendor_usb_config_prop:s0 tclass=file permissive=0

Bug: 310560098
Change-Id: I86588715cae2696dd0e045c5b75dde55e0f84c1e
Signed-off-by: Kyle Tso <kyletso@google.com>
2023-11-14 02:15:14 +00:00
Roy Luo
aa5218c8a7 Support metric upload in USB HAL
Grant access to stats service.
Sample error logs: avc:  denied  { find } for pid=949 uid=1000
name=android.frameworks.stats.IStats/default
scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:fwk_stats_service:s0
tclass=service_manager permissive=0

Bug: 297224564
Test: no audit log in logcat after command execution
Change-Id: I4a80e11e63ec164dff73288e93aac851ffebb696
2023-10-04 20:02:39 +00:00
Roy Luo
8849e1a49a 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: Ia5f3333318b47f4e0a05140bd6b95e939197fde5
2023-08-07 19:49:09 +00:00
Kyle Tso
649f19fc94 Allow accessing dumpstate from hal_usb_impl
Fix SELinux errors.

Bug: 267261163
Change-Id: I73a311d796eb520ede3849edc6384c965ec5c915
Signed-off-by: Kyle Tso <kyletso@google.com>
2023-05-03 11:23:52 +08:00
Ray Chi
0801e5e421 Fix avc denied and remove tracking_denials for hal_usb_impl
Fix avc denial for hal_usb_impl.

Bug: 263048760
Test: no avc denied for hal_usb_impl
Change-Id: Iaeea9d1f99f715c0f856a3a9f9fcd2e8d371f3d3
2023-01-16 15:40:48 +08:00
Adam Shih
21f4111616 restart domains
Bug: 254378739
Test: boot to home
Change-Id: If7264f1a5cdaace0558dbeda986d9c899dd6ac08
2022-12-06 10:34:32 +08:00