Skip to content

usb: Replace {v}snprintf() variants with safer alternatives

Lee Jones linux-usb lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5usb: atm: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()drivers/usb/atm/ueagle-atm.c+8 -80 replies
2/5usb: cdnsp: Replace snprintf() with the safer scnprintf() variantdrivers/usb/cdns3/cdnsp-debug.h+177 -1770 replies
3/5usb: fotg210-hcd: Replace snprintf() with the safer scnprintf() variantdrivers/usb/fotg210/fotg210-hcd.c+4 -82 replies
4/5usb: gadget: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()drivers/usb/gadget/configfs.c+1 -10 replies
5/5usb: gadget: f_tcm: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()drivers/usb/gadget/function/f_tcm.c+2 -20 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchLinus Walleij
1/5
2/5
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] usb: Replace {v}snprintf() variants with safer alternatives

This series is part of an effort to rid {v}snprintf() where possible.

For a far better description of the problem than I could author, see Jon's write-up on LWN [1] and/or Alex's on the Kernel Self Protection Project [1].

[0] https://lwn.net/Articles/69419/
[1] https://github.com/KSPP/linux/issues/105

Lee Jones (5):
usb: atm: Remove snprintf() from sysfs call-backs and replace with
sysfs_emit()
usb: cdnsp: Replace snprintf() with the safer scnprintf() variant
usb: fotg210-hcd: Replace snprintf() with the safer scnprintf()
variant
usb: gadget: Remove snprintf() from sysfs call-backs and replace with
sysfs_emit()
usb: gadget: f_tcm: Remove snprintf() from sysfs call-backs and
replace with sysfs_emit()

 drivers/usb/atm/ueagle-atm.c        |  16 +-
 drivers/usb/cdns3/cdnsp-debug.h     | 354 ++++++++++++++--------------
 drivers/usb/fotg210/fotg210-hcd.c   |  12 +-
 drivers/usb/gadget/configfs.c       |   2 +-
 drivers/usb/gadget/function/f_tcm.c |   4 +-
 5 files changed, 192 insertions(+), 196 deletions(-)
Cc Damien Bergamini <[email protected]>
Cc Dmitry Bogdanov <[email protected]>
Cc Feng-Hsin Chiang <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Linus Walleij <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
Cc Matthieu CASTET <[email protected]>
Cc Pawel Laszczak <[email protected]>
Cc Po-Yu Chuang <[email protected]>
Cc Stanislaw Gruszka <[email protected]>
Cc Yuan-Hsin Chen <[email protected]>
Signature · 1 line
2.43.0.rc1.413.gea7ed67945-goog