[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <169106406791.1024854.15683351104405009219.kvalo@kernel.org>
Date: Thu, 3 Aug 2023 12:01:09 +0000 (UTC)
From: Kalle Valo <kvalo@...nel.org>
To: Justin Stitt <justinstitt@...gle.com>
Cc: Stanislav Yakovlev <stas.yakovlev@...il.com>,
Kees Cook <keescook@...omium.org>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org,
Justin Stitt <justinstitt@...gle.com>
Subject: Re: [PATCH v2] wifi: ipw2x00: refactor to use kstrtoul
Justin Stitt <justinstitt@...gle.com> wrote:
> 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].
>
> 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@...r.kernel.org
> Suggested-by: Kees Cook <keescook@...omium.org>
> Signed-off-by: Justin Stitt <justinstitt@...gle.com>
I assume this is just compile tested? In that case it's always good to add
"Compile tested only." to the commit log. But I can add that this time.
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230802-wifi-ipw2x00-refactor-v2-1-d33f765e9cd5@google.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists