bianbu-linux-6.6/drivers/net/wireless/intel/ipw2x00
Justin Stitt 8767774946 wifi: ipw2x00: refactor to use kstrtoul
The current implementation seems to reinvent what `kstrtoul` already does
in terms of functionality and error handling. Remove uses of `simple_strtoul()`
in favor of `kstrtoul()`.

There is the following note at `lib/vsprintf.c:simple_strtoull()` which
further backs this change:
| * This function has caveats. Please use kstrtoull (or kstrtoul) instead.

And here, simple_str* are explicitly deprecated [3].

This patch also removes an instance of the deprecated `strncpy` which helps [2].

Compile tested only.

Link: https://lore.kernel.org/all/202308011602.3CC1C0244C@keescook/ [1]
Link: https://github.com/KSPP/linux/issues/90 [2]
Link: https://docs.kernel.org/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull [3]
Cc: linux-hardening@vger.kernel.org
Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230802-wifi-ipw2x00-refactor-v2-1-d33f765e9cd5@google.com
2023-08-21 19:10:02 +03:00
..
ipw.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ipw2100.c wifi: ipw2x00: Remove some unused functions 2022-12-08 16:42:44 +02:00
ipw2100.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 507 2019-06-19 17:11:23 +02:00
ipw2200.c wifi: ipw2x00: refactor to use kstrtoul 2023-08-21 19:10:02 +03:00
ipw2200.h wifi: ipw2x00: convert ipw_fw_error->elem to flexible array[] 2023-03-13 15:44:15 +02:00
Kconfig net: wireless: drop bogus CRYPTO_xxx Kconfig selects 2020-09-11 14:39:16 +10:00
libipw.h wifi: ipw2x00: fix array of flexible structures warnings 2022-09-22 09:08:52 +03:00
libipw_geo.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 507 2019-06-19 17:11:23 +02:00
libipw_module.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
libipw_rx.c wifi: ipw2x00: fix array of flexible structures warnings 2022-09-22 09:08:52 +03:00
libipw_tx.c ipw2x00: Fix potential NULL dereference in libipw_xmit() 2022-04-06 15:14:44 +03:00
libipw_wx.c ipw2x00: potential buffer overflow in libipw_wx_set_encodeext() 2021-04-17 20:35:44 +03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00