linux/drivers/usb/misc
Komal Bajaj 3c518d2df3 usb: misc: qcom_eud: Access EUD_MODE_MANAGER2 through secure calls
[ Upstream commit c0485e864a ]

EUD_MODE_MANAGER2 register is mapped to a memory region that is marked
as read-only for operating system running at EL1, enforcing access
restrictions that prohibit direct memory-mapped writes via writel().

Attempts to write to this region from HLOS can result in silent failures
or memory access violations, particularly when toggling EUD (Embedded
USB Debugger) state. To ensure secure register access, modify the driver
to use qcom_scm_io_writel(), which routes the write operation to Qualcomm
Secure Channel Monitor (SCM). SCM has the necessary permissions to access
protected memory regions, enabling reliable control over EUD state.

SC7280, the only user of EUD is also affected, indicating that this could
never have worked on a properly fused device.

Fixes: 9a1bf58ccd ("usb: misc: eud: Add driver support for Embedded USB Debugger(EUD)")
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Signed-off-by: Komal Bajaj <komal.bajaj@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250731-eud_mode_manager_secure_access-v8-1-4a5dcbb79f41@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:00:05 +02:00
..
sisusbvga USB: sisusbvga: Add endpoint checks 2023-04-20 11:43:22 +02:00
adutux.c usb: misc: adutux: use swap() 2021-08-05 12:31:34 +02:00
apple-mfi-fastcharge.c usb: misc: apple-mfi-fastcharge: Make power supply names unique 2025-08-15 12:13:34 +02:00
appledisplay.c USB: appledisplay: close race between probe and completion handler 2024-09-13 07:54:23 +02:00
brcmstb-usb-pinmap.c usb: misc: brcmstb-usb-pinmap: fix module autoloading 2024-08-25 13:45:56 +02:00
chaoskey.c USB: chaoskey: Fix possible deadlock chaoskey_list_lock 2024-12-05 14:02:36 +01:00
cypress_cy7c63.c USB: misc: cypress_cy7c63: check for short transfer 2024-09-13 07:54:50 +02:00
cytherm.c USB: misc: Remove unnecessary NULL values 2023-08-04 14:48:55 +02:00
ehset.c usb: misc: ehset: fix wrong if condition 2023-07-27 10:37:30 +02:00
emi26.c USB: misc: Remove redundant license text 2017-11-04 11:55:38 +01:00
emi62.c USB: misc: Remove redundant license text 2017-11-04 11:55:38 +01:00
ezusb.c usb: misc: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:24 +02:00
idmouse.c usb: idmouse: fix an uninit-value in idmouse_open 2022-09-27 10:37:09 +02:00
iowarrior.c usb: yurex: make waiting on yurex_write interruptible 2024-12-05 14:02:36 +01:00
isight_firmware.c usb: misc: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:24 +02:00
Kconfig usb: misc: qcom_eud: Access EUD_MODE_MANAGER2 through secure calls 2025-10-15 12:00:05 +02:00
ldusb.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
legousbtower.c USB: make devnode() callback in usb_class_driver take a const * 2022-10-20 12:11:56 +02:00
lvstest.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
Makefile usb: misc: onboard_hub: rename to onboard_dev 2024-03-27 07:57:16 +01:00
onboard_usb_dev.c usb: misc: onboard_usb_dev: fix build warning for CONFIG_USB_ONBOARD_DEV_USB5744=n 2025-06-19 15:32:37 +02:00
onboard_usb_dev.h usb: misc: onboard_dev: extend platform data to add power on delay field 2024-09-11 15:36:25 +02:00
onboard_usb_dev_pdevs.c usb: misc: onboard_hub: rename to onboard_dev 2024-03-27 07:57:16 +01:00
qcom_eud.c usb: misc: qcom_eud: Access EUD_MODE_MANAGER2 through secure calls 2025-10-15 12:00:05 +02:00
trancevibrator.c USB: trancevibrator: fix control-request direction 2021-05-21 20:10:43 +02:00
usb-ljca.c usb: misc: ljca: move usb_autopm_put_interface() after wait for response 2024-12-05 14:03:00 +01:00
usb251xb.c of: remove internal arguments from of_property_for_each_u32() 2024-07-25 06:53:47 -05:00
usb3503.c usb: misc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:18:57 +02:00
usb4604.c usb: misc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:18:57 +02:00
usblcd.c USB: usblcd: Remove the superfluous break 2020-08-28 09:48:33 +02:00
usbsevseg.c USB: misc: Remove unnecessary NULL values 2023-08-04 14:48:55 +02:00
usbtest.c usb: usbtest: fix a type promotion bug 2023-10-08 07:50:36 +02:00
uss720.c usb: misc: uss720: check for incompatible versions of the Belkin F5U002 2024-04-04 17:07:48 +02:00
yurex.c usb: yurex: make waiting on yurex_write interruptible 2024-12-05 14:02:36 +01:00