net: Use strlcpy() for ethtool::get_strings
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 2 repliesIn review
- v14 patches 5 repliesSuperseded
Changes in v2 from the cover letter
- dropped the 3 other patches that were not necessary
- use strlcpy() instead of strncpy()
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net: dsa: b53: Use strlcpy() for ethtool::get_stringsdrivers/ | +2 | 0 replies | |
| 2/4 | net: phy: marvell: Use strlcpy() for ethtool::get_stringsdrivers/ | +2 | 0 replies | |
| 3/4 | net: phy: micrel: Use strlcpy() for ethtool::get_stringsdrivers/ | +2 | 0 replies | |
| 4/4 | net: phy: broadcom: Use strlcpy() for ethtool::get_stringsdrivers/ | +2 | 0 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Andrew Lunn |
|---|---|
| Series | R-b |
| 1/4 | |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/4] net: Use strlcpy() for ethtool::get_strings
Hi all,
After turning on KASAN on one of my systems, I started getting lots of out of bounds errors while fetching a given port's statistics, and indeed using memcpy() is unsafe for copying strings which have not been declared as an array of ETH_GSTRING_LEN bytes, so let's use strlcpy() instead. This allows the best of both worlds: we still keep the efficient memory usage of variably sized strings, but we don't copy more than we need to.
Changes in v2:
- dropped the 3 other patches that were not necessary
- use strlcpy() instead of strncpy()
Florian Fainelli (4):
net: dsa: b53: Use strlcpy() for ethtool::get_strings
net: phy: marvell: Use strlcpy() for ethtool::get_strings
net: phy: micrel: Use strlcpy() for ethtool::get_strings
net: phy: broadcom: Use strlcpy() for ethtool::get_strings
drivers/net/dsa/b53/b53_common.c | 4 ++-- drivers/net/phy/bcm-phy-lib.c | 4 ++-- drivers/net/phy/marvell.c | 4 ++-- drivers/net/phy/micrel.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.14.1