Re: [PATCH ethtool] ethtool: fix stack clash in do_get_phy_tunable and do_set_phy_tunable

2018-05-31 Thread John W. Linville
On Wed, May 09, 2018 at 02:01:46PM +0200, Michal Kubecek wrote: > Users reported stack clash detected when using --get-phy-tunable on > ppc64le. Problem is caused by local variable ds of type struct > ethtool_tunable which has last member "void *data[0]". Accessing data[0] > (as do_get_phy_tunable(

[PATCH ethtool] ethtool: fix stack clash in do_get_phy_tunable and do_set_phy_tunable

2018-05-09 Thread Michal Kubecek
Users reported stack clash detected when using --get-phy-tunable on ppc64le. Problem is caused by local variable ds of type struct ethtool_tunable which has last member "void *data[0]". Accessing data[0] (as do_get_phy_tunable() does) or adding requested value at the end (which is what kernel ioctl