linux/drivers/usb/host
Lee Jones a6eef67cdb usb: host: max3421-hcd: Replace snprintf() with the safer scnprintf() variant
There is a general misunderstanding amongst engineers that {v}snprintf()
returns the length of the data *actually* encoded into the destination
array.  However, as per the C99 standard {v}snprintf() really returns
the length of the data that *would have been* written if there were
enough space for it.  This misunderstanding has led to buffer-overruns
in the past.  It's generally considered safer to use the {v}scnprintf()
variants in their place (or even sprintf() in simple cases).  So let's
do that.

Link: https://lwn.net/Articles/69419/
Link: https://github.com/KSPP/linux/issues/105
Cc: Cristian Birsan <cristian.birsan@microchip.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Cc:  <linux-arm-kernel@lists.infradead.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20231213164246.1021885-8-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-15 13:55:30 +01:00
..
bcma-hcd.c
ehci-atmel.c usb: host: Do not check for 0 return after calling platform_get_irq() 2023-08-04 14:46:53 +02:00
ehci-brcm.c usb: host: Do not check for 0 return after calling platform_get_irq() 2023-08-04 14:46:53 +02:00
ehci-dbg.c
ehci-exynos.c usb: ehci-exynos: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:11 +02:00
ehci-fsl.c usb: ehci-fsl: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
ehci-fsl.h
ehci-grlib.c usb: ehci-grlib: Convert to platform remove callback returning void 2023-05-28 12:36:28 +01:00
ehci-hcd.c usb: ehci: add workaround for chipidea PORTSC.PEC bug 2023-08-09 14:16:06 +02:00
ehci-hub.c usb: ehci: add workaround for chipidea PORTSC.PEC bug 2023-08-09 14:16:06 +02:00
ehci-mem.c
ehci-mv.c usb: ehci-mv: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:11 +02:00
ehci-npcm7xx.c usb: ehci-npcm7xx: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
ehci-omap.c usb: ehci-omap: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
ehci-orion.c usb: host: Do not check for 0 return after calling platform_get_irq() 2023-08-04 14:46:53 +02:00
ehci-pci.c
ehci-platform.c usb: ehci-platform: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:09 +02:00
ehci-ppc-of.c usb: ehci-ppc-of: Convert to platform remove callback returning void 2023-05-28 12:36:29 +01:00
ehci-ps3.c
ehci-q.c
ehci-sched.c usb: host: ehci-sched: try to turn on io watchdog as long as periodic_count > 0 2023-08-12 10:03:22 +02:00
ehci-sh.c usb: host: Do not check for 0 return after calling platform_get_irq() 2023-08-04 14:46:53 +02:00
ehci-spear.c usb: ehci-spear: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:09 +02:00
ehci-st.c usb: ehci-st: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:11 +02:00
ehci-sysfs.c
ehci-timer.c
ehci-xilinx-of.c usb: ehci-xilinx-of: Convert to platform remove callback returning void 2023-05-28 12:36:29 +01:00
ehci.h usb: ehci: add workaround for chipidea PORTSC.PEC bug 2023-08-09 14:16:06 +02:00
fhci-dbg.c
fhci-hcd.c usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fsl-mph-dr-of.c usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
isp116x-hcd.c usb: isp116x-hcd: Convert to platform remove callback returning void 2023-05-28 12:36:29 +01:00
isp116x.h
isp1362-hcd.c usb: isp1362-hcd: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:09 +02:00
isp1362.h
Kconfig usb: add HAS_IOPORT dependencies 2023-05-29 15:28:34 +01:00
Makefile
max3421-hcd.c usb: host: max3421-hcd: Replace snprintf() with the safer scnprintf() variant 2023-12-15 13:55:30 +01:00
octeon-hcd.c usb: octeon-hcd: Convert to platform remove callback returning void 2023-05-28 12:36:30 +01:00
octeon-hcd.h
ohci-at91.c usb: ohci-at91: Fix the unhandle interrupt when resume 2023-07-30 13:26:09 +02:00
ohci-da8xx.c usb: ohci-da8xx: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:09 +02:00
ohci-dbg.c
ohci-exynos.c usb: ohci-exynos: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
ohci-hcd.c
ohci-hub.c
ohci-mem.c
ohci-nxp.c usb: ohci-nxp: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
ohci-omap.c usb: ohci-omap: Convert to platform remove callback returning void 2023-05-28 12:36:30 +01:00
ohci-pci.c
ohci-platform.c usb: host: ohci-platform: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:09 +02:00
ohci-ppc-of.c usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
ohci-ps3.c
ohci-pxa27x.c usb: ohci-pxa27x: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
ohci-q.c
ohci-s3c2410.c usb: ohci-s3c2410: Convert to platform remove callback returning void 2023-05-28 12:36:31 +01:00
ohci-sa1111.c
ohci-sm501.c USB: ohci-sm501: remove unnecessary check of mem 2023-08-12 10:03:16 +02:00
ohci-spear.c usb: ohci-spear: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
ohci-st.c usb: ohci-st: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:11 +02:00
ohci.h usb: Annotate struct urb_priv with __counted_by 2023-10-02 09:48:52 -07:00
oxu210hp-hcd.c usb: oxu210hp-hcd: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:10 +02:00
pci-quirks.c usb: pci-quirks: handle HAS_IOPORT dependency for UHCI handoff 2023-10-02 16:19:13 +02:00
pci-quirks.h usb: pci-quirks: handle HAS_IOPORT dependency for AMD quirk 2023-10-02 16:19:12 +02:00
r8a66597-hcd.c usb: r8a66597-hcd: Convert to platform remove callback returning void 2023-05-28 12:36:31 +01:00
r8a66597.h
sl811-hcd.c usb: sl811-hcd: Convert to platform remove callback returning void 2023-05-28 12:36:32 +01:00
sl811.h
sl811_cs.c
ssb-hcd.c
uhci-debug.c
uhci-grlib.c usb: uhci-grlib: Convert to platform remove callback returning void 2023-05-28 12:36:32 +01:00
uhci-hcd.c usb: uhci: handle HAS_IOPORT dependencies 2023-05-29 15:29:03 +01:00
uhci-hcd.h usb: uhci: handle HAS_IOPORT dependencies 2023-05-29 15:29:03 +01:00
uhci-hub.c
uhci-pci.c Merge 6.4-rc4 into usb-next 2023-05-28 15:25:53 +01:00
uhci-platform.c usb: uhci-platform: Use devm_platform_get_and_ioremap_resource() 2023-07-27 10:24:11 +02:00
uhci-q.c
xen-hcd.c
xhci-dbg.c
xhci-dbgcap.c xhci: dbc: Add missing headers 2023-12-04 07:50:40 +01:00
xhci-dbgcap.h xhci: dbc: Use sysfs_emit() to instead of scnprintf() 2023-12-04 07:50:39 +01:00
xhci-dbgtty.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
xhci-debugfs.c xhci: Expose segment numbers in debugfs 2023-10-21 12:38:53 +02:00
xhci-debugfs.h
xhci-ext-caps.c
xhci-ext-caps.h usb: xhci: Move extcaps related macros to respective header file 2023-10-02 13:55:44 +02:00
xhci-histb.c xhci: get rid of XHCI_PLAT quirk that used to prevent MSI setup 2023-06-13 11:34:50 +02:00
xhci-hub.c xhci: pass port structure to tracing instead of port number 2023-10-21 12:38:53 +02:00
xhci-mem.c usb: xhci: Add timeout argument in address_device USB HCD callback 2023-11-23 12:32:44 +00:00
xhci-mtk-sch.c usb: xhci-mtk: fix in-ep's start-split check failure 2023-11-21 15:31:25 +01:00
xhci-mtk.c usb: xhci-mtk: set the dma max_seg_size 2023-07-25 17:40:54 +02:00
xhci-mtk.h usb: xhci-mtk: fix in-ep's start-split check failure 2023-11-21 15:31:25 +01:00
xhci-mvebu.c
xhci-mvebu.h
xhci-pci-renesas.c
xhci-pci.c Merge 6.7-rc5 into usb-next 2023-12-11 08:44:28 +01:00
xhci-pci.h
xhci-plat.c usb: xhci: xhci-plat: Add support for BCM2711 2023-12-06 12:39:56 +09:00
xhci-plat.h usb: xhci-plat: Convert to platform remove callback returning void 2023-05-30 15:27:17 +01:00
xhci-rcar.c usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
xhci-ring.c usb: xhci: Add timeout argument in address_device USB HCD callback 2023-11-23 12:32:44 +00:00
xhci-rzv2m.c
xhci-rzv2m.h
xhci-tegra.c Merge 6.5-rc4 into usb-next 2023-07-31 09:36:55 +02:00
xhci-trace.c
xhci-trace.h xhci: Add busnumber to port tracing 2023-10-21 12:38:53 +02:00
xhci.c xhci: fix possible null pointer deref during xhci urb enqueue 2023-12-04 07:50:40 +01:00
xhci.h xhci: change 'msix_count' to encompass MSI or MSI-X vectors 2023-12-04 07:50:40 +01:00