[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <009a6011-37b7-75da-8b50-13aa1bdc1266@broadcom.com>
Date: Wed, 18 Oct 2023 11:33:43 +0200
From: Arend van Spriel <arend.vanspriel@...adcom.com>
To: Franky Lin <franky.lin@...adcom.com>,
Justin Stitt <justinstitt@...gle.com>
Cc: Arend van Spriel <aspriel@...il.com>,
Hante Meuleman <hante.meuleman@...adcom.com>,
Kalle Valo <kvalo@...nel.org>, linux-wireless@...r.kernel.org,
brcm80211-dev-list.pdl@...adcom.com,
SHA-cyfmac-dev-list@...ineon.com, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3 0/2] wifi: brcm80211: replace deprecated strncpy
On 10/17/2023 11:27 PM, Franky Lin wrote:
> On Tue, Oct 17, 2023 at 1:11 PM 'Justin Stitt' via
> BRCM80211-DEV-LIST,PDL <brcm80211-dev-list.pdl@...adcom.com> wrote:
>>
>> Hi,
>>
>> This series used to be just one patch in [v2] but I've split it into two
>> separate patches.
>>
>> The motivation behind this series is that strncpy() is deprecated for
>> use on NUL-terminated destination strings [1] and as such we should
>> prefer more robust and less ambiguous string interfaces.
>>
>> In cases where we expect the destination buffer to be NUL-terminated
>> let's opt for strscpy() as this guarantees NUL-termination. Other cases
>> are just simple byte copies with pre-determined bounds; for these let's
>> use plain-ol' memcpy().
>>
>> Each change is detailed in its accompanying patch message.
>>
>> 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@...gle.com>
>
> Reviewed-by: Franky Lin <franky.lin@...adcom.com>
Acked-by: Arend van Spriel <arend.vanspriel@...adcom.com>
>> ---
>> Changes in v3:
>> - split up into two separate patches (thanks Franky)
>> - use better subject line (thanks Franky + Kalle)
>> - Link to v2: https://lore.kernel.org/r/20231016-strncpy-drivers-net-wireless-broadcom-brcm80211-brcmfmac-cfg80211-c-v2-1-6c7567e1d3b8@google.com
>>
>> Changes in v2:
>> - add other strncpy replacements
>> - Link to v1: https://lore.kernel.org/r/20231016-strncpy-drivers-net-wireless-broadcom-brcm80211-brcmfmac-cfg80211-c-v1-1-4234807ca07e@google.com
>>
>> ---
>> Justin Stitt (2):
>> wifi: brcm80211: replace deprecated strncpy with strscpy
>> wifi: brcmsmac: replace deprecated strncpy with memcpy
>>
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +-
>> drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c | 6 +++---
>> drivers/net/wireless/broadcom/brcm80211/brcmsmac/dma.c | 3 +--
>> drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 4 ++--
>> 5 files changed, 8 insertions(+), 9 deletions(-)
>> ---
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4219 bytes)
Powered by blists - more mailing lists