Age | Commit message (Collapse) | Author |
|
A pointer to uevent_event() is stored in epoll_event::data::ptr
which is later invoked after the poll returns. The function
pointer is currently cast with a signature that doesn't quite
match the actual function, namely the first parameter should
be uint32_t, not int. Fix the potential control flow integrity
vulnerability.
CRs-Fixed: 2324304
Change-Id: I42b926efd09b6978746b9b14138bafbb3921677d
|
|
Currently the check for canChange{Power,Data}Role values is
determined only by whether the respective sysfs entries can be
written to or not. This is not always accurate, since the entries
may have a ueventd rule to change their file ownership to system
and thus specifies a static umask.
Independent power or data role switching can only be supported
if USB PD is supported. Check /sys/class/power_supply/usb/pd_active
to determine whether the current USB connection is PD capable
in order to fill in the canChange{Power,Data}Role values instead
of just relying on writability.
CRs-Fixed: 2268448
Change-Id: I0278cfb5e7303d7ad1c14111adb52423dcd994b0
|
|
|
|
Callbacks would have to be allowed being reregistered
to handle frameworks restarts.
Bug: 35758079
Test: adb shell stop; adb shell start; and see if USB notifications happen.
Change-Id: I256b4e714340f48c1dd8377e660cb28ebd716b8a
|
|
Bug: 35726475
Test: usb-service no longer consumes 100% CPU
Change-Id: I274caec45e7527cbacf57f9a735d711dcb481bfd
|
|
The default implementation should take care of legacy devices that
lauched before O.
BUG: 31015010
Test: Manually tested on Angler and sailfish for type-c role switches.
Change-Id: I8762598f4f82da5b2fe8a87aacc30728eb7921f5
|