Re: [PATCH net 3/4] net: dsa: microchip: Utilize strncpy() for ethtool::get_strings

2018-03-02 Thread Florian Fainelli
On 03/02/2018 02:51 AM, David Laight wrote: > From: Florian Fainelli >> >> Do not use memcpy() which is not safe, but instead use strncpy() which >> will make sure that the string is NUL terminated (in the Linux >> implementation) if the string is smaller than the length specified. This >> fixes

Re: [PATCH net 3/4] net: dsa: microchip: Utilize strncpy() for ethtool::get_strings

2018-03-02 Thread Florian Fainelli
On 03/02/2018 02:51 AM, David Laight wrote: > From: Florian Fainelli >> >> Do not use memcpy() which is not safe, but instead use strncpy() which >> will make sure that the string is NUL terminated (in the Linux >> implementation) if the string is smaller than the length specified. This >> fixes

RE: [PATCH net 3/4] net: dsa: microchip: Utilize strncpy() for ethtool::get_strings

2018-03-02 Thread David Laight
From: Florian Fainelli > > Do not use memcpy() which is not safe, but instead use strncpy() which > will make sure that the string is NUL terminated (in the Linux > implementation) if the string is smaller than the length specified. This > fixes KASAN out of bounds warnings while fetching port

RE: [PATCH net 3/4] net: dsa: microchip: Utilize strncpy() for ethtool::get_strings

2018-03-02 Thread David Laight
From: Florian Fainelli > > Do not use memcpy() which is not safe, but instead use strncpy() which > will make sure that the string is NUL terminated (in the Linux > implementation) if the string is smaller than the length specified. This > fixes KASAN out of bounds warnings while fetching port

[PATCH net 3/4] net: dsa: microchip: Utilize strncpy() for ethtool::get_strings

2018-03-01 Thread Florian Fainelli
Do not use memcpy() which is not safe, but instead use strncpy() which will make sure that the string is NUL terminated (in the Linux implementation) if the string is smaller than the length specified. This fixes KASAN out of bounds warnings while fetching port statistics. Fixes: b987e98e50ab

[PATCH net 3/4] net: dsa: microchip: Utilize strncpy() for ethtool::get_strings

2018-03-01 Thread Florian Fainelli
Do not use memcpy() which is not safe, but instead use strncpy() which will make sure that the string is NUL terminated (in the Linux implementation) if the string is smaller than the length specified. This fixes KASAN out of bounds warnings while fetching port statistics. Fixes: b987e98e50ab