alistair23-linux/drivers/phy
Bjorn Andersson 72f039db49 phy: qcom-qmp: Ensure register indirection arrays initialized
It's possible that struct qmp_phy_cfg->regs references an array that is
smaller than the possible register lookups that is going to be
performed, with the resulting out-of-bounds read resulting in undefined
behavior.

One such example is when during qcom_qmp_phy_com_init() performs a
qphy_setbits() on entry QPHY_PCS_POWER_DOWN_CONTROL (i.e. 17) with
msm8996_ufsphy_regs_layout only being 12 entries long.

Solve this by inflating all "regs_layout" arrays to ensure that any
remaining entries are zero-initialized, as expected by the code.

Fixes: e4d8b05ad5 ("phy: qcom-qmp: Use proper PWRDOWN offset for sm8150 USB")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200515013643.2081941-1-bjorn.andersson@linaro.org
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-05-18 19:30:56 +05:30
..
allwinner phy: allwinner: Fix GENMASK misuse 2020-03-04 10:56:26 +01:00
amlogic phy: amlogic: meson8b-usb2: Add a compatible string for Meson8m2 2020-05-15 13:16:55 +05:30
broadcom phy: phy-bcm-ns2-usbdrd: Constify phy_ops 2020-05-18 19:30:56 +05:30
cadence phy: phy-cadence-salvo: add phy .init API 2020-05-15 13:20:21 +05:30
freescale
hisilicon phy: hisilicon: Fix Kconfig indentation 2019-12-20 17:00:45 +05:30
intel phy: intel-lgm-emmc: Add architecture dependency 2020-05-13 08:27:35 +05:30
lantiq phy: lantiq: vrx200-pcie: Remove unneeded semicolon 2020-01-08 12:58:06 +05:30
marvell USB/Thunderbolt/PHY driver updates for 5.6-rc1 2020-01-29 10:09:44 -08:00
mediatek phy: phy-mtk-tphy: add a new reference clock 2020-03-20 19:34:29 +05:30
motorola phy: cpcap-usb: Remove some useless code 2020-05-13 08:27:35 +05:30
mscc
qualcomm phy: qcom-qmp: Ensure register indirection arrays initialized 2020-05-18 19:30:56 +05:30
ralink
renesas phy: renesas: phy-rcar-gen2: Fix the array off by one warning 2019-10-31 16:54:01 +05:30
rockchip phy: rk-inno-usb2: Decrease verbosity of repeating log. 2020-03-20 19:34:29 +05:30
samsung phy: samsung: s5pv210-usb2: Add delay after reset 2020-05-13 08:27:35 +05:30
socionext phy: uniphier-pcie: Add SoC-dependent phy-mode function support 2020-03-20 19:34:29 +05:30
st
tegra phy: tegra: Select USB_PHY 2020-03-19 14:17:06 +01:00
ti phy: omap-usb2: Clean up exported header 2020-05-18 19:30:56 +05:30
Kconfig phy: intel-lgm-emmc: Add support for eMMC PHY 2020-01-14 10:50:19 +05:30
Makefile phy: intel-lgm-emmc: Add support for eMMC PHY 2020-01-14 10:50:19 +05:30
phy-core-mipi-dphy.c
phy-core.c phy: core: Fix phy_get() to not return error on link creation failure 2020-02-19 16:02:02 +05:30
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c phy: xgene: make array serdes_reg static const, makes object smaller 2019-10-23 13:20:26 +05:30