1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/microchip
Justin Stitt e343023e03 net: sparx5: replace deprecated strncpy with ethtool_sprintf
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.

ethtool_sprintf() is designed specifically for get_strings() usage.
Let's replace strncpy() in favor of this more robust and easier to
understand interface.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20231011-strncpy-drivers-net-ethernet-microchip-sparx5-sparx5_ethtool-c-v1-1-410953d07f42@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-10-13 17:10:32 -07:00
..
lan966x net: ethernet: microchip: Convert to platform remove callback returning void 2023-09-20 09:06:39 +01:00
sparx5 net: sparx5: replace deprecated strncpy with ethtool_sprintf 2023-10-13 17:10:32 -07:00
vcap net: microchip: sparx5: clean up error checking in vcap_show_admin() 2023-10-03 07:13:32 -07:00
enc28j60.c net: enc28j60: Use threaded interrupt instead of workqueue 2023-05-11 18:00:37 -07:00
enc28j60_hw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
encx24j600-regmap.c net: encx24j600: Fix invalid logic in reading of MISTAT register 2022-12-05 09:46:31 +00:00
encx24j600.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
encx24j600_hw.h net: encx24j600: check error in devm_regmap_init_encx24j600 2021-10-13 15:25:25 -07:00
Kconfig net: lan743x: also select PHYLIB 2023-10-05 09:10:18 -07:00
lan743x_ethtool.c net: lan743x: Add support to SGMII register dump for PCI11010/PCI11414 chips 2022-11-09 19:20:13 -08:00
lan743x_ethtool.h net: lan743x: Add support to SGMII register dump for PCI11010/PCI11414 chips 2022-11-09 19:20:13 -08:00
lan743x_main.c net: microchip: lan743x: add fixed phy unregister support 2023-09-17 11:52:58 +01:00
lan743x_main.h net: lan743x: add generic implementation for phy interface selection 2023-01-19 13:50:11 +01:00
lan743x_ptp.c ptp: lan743x: use diff_by_scaled_ppm in .adjfine implementation 2022-10-31 11:14:16 +00:00
lan743x_ptp.h net: lan743x: Add support for PTP-IO Event Output (Periodic Output) 2022-03-18 12:53:23 +00:00
Makefile net: microchip: sparx5: Adding initial tc flower support for VCAP API 2022-10-24 10:37:43 +01:00