Re: [PATCH net] net: phy: marvell: Fix buffer overrun with stats counters

2019-04-26 Thread David Miller
From: Andrew Lunn Date: Thu, 25 Apr 2019 00:33:00 +0200 > marvell_get_sset_count() returns how many statistics counters there > are. If the PHY supports fibre, there are 3, otherwise two. > > marvell_get_strings() does not make this distinction, and always > returns 3 strings. This then often re

Re: [PATCH net] net: phy: marvell: Fix buffer overrun with stats counters

2019-04-25 Thread Sergei Shtylyov
Hello! On 25.04.2019 1:33, Andrew Lunn wrote: marvell_get_sset_count() returns how many statistics counters there are. If the PHY supports fibre, there are 3, otherwise two. marvell_get_strings() does not make this distinction, and always returns 3 strings. This then often results in writing p

Re: [PATCH net] net: phy: marvell: Fix buffer overrun with stats counters

2019-04-24 Thread Florian Fainelli
On 4/24/19 3:33 PM, Andrew Lunn wrote: > marvell_get_sset_count() returns how many statistics counters there > are. If the PHY supports fibre, there are 3, otherwise two. > > marvell_get_strings() does not make this distinction, and always > returns 3 strings. This then often results in writing pa

[PATCH net] net: phy: marvell: Fix buffer overrun with stats counters

2019-04-24 Thread Andrew Lunn
marvell_get_sset_count() returns how many statistics counters there are. If the PHY supports fibre, there are 3, otherwise two. marvell_get_strings() does not make this distinction, and always returns 3 strings. This then often results in writing passed the end of the buffer for the strings. Fixe