Re: [PATCH] ethtool: Zero memory allocated for statistics

2016-10-15 Thread David Miller
From: Vlad Tsyrklevich Date: Sat, 15 Oct 2016 15:11:08 + > I agree that we should propagate those errors and I'll prepare a new change > to do so for phy_driver.get_stats(), ethtool_ops.self_test(), and > ethtool_ops.get_ethtool_stats(). However, I still think this change should > be adopted.

Re: [PATCH] ethtool: Zero memory allocated for statistics

2016-10-15 Thread Vlad Tsyrklevich
I agree that we should propagate those errors and I'll prepare a new change to do so for phy_driver.get_stats(), ethtool_ops.self_test(), and ethtool_ops.get_ethtool_stats(). However, I still think this change should be adopted. 3/5 of the cases here are reachable without any special capabilities a

Re: [PATCH] ethtool: Zero memory allocated for statistics

2016-10-14 Thread David Miller
From: Vlad Tsyrklevich Date: Fri, 14 Oct 2016 11:59:18 +0200 > enic_get_ethtool_stats() Looknig merely at this shows the real problem. We don't propagate and handle errors for this method. And that's what we should fix, making the get_ethtool_stats() method return an integer error. Then ethto

[PATCH] ethtool: Zero memory allocated for statistics

2016-10-14 Thread Vlad Tsyrklevich
Zero allocations before they're passed to drivers to be filled out with statistics. While many drivers always correctly fill out the entire allocated space, under some failure conditions some drivers will not clear the allocated space appropriately. Unprivileged users could induce some of these fai