Subject: Re: [RFC] let mortals use ethtool

From: Jeff Garzik <[email-masked]>
Date: Thu, 28 Sep 2006 18:30:50 -0400

David Miller wrote:
> Secondarily, looping over reading all of the registers of the chip
> might kill performance since the IO accesses compete with the
> normal packet sending/receiving operations.

This can be true of any ethtool sub-ioctl that beats the registers, if 
run in a tight loop.  PHYs are particularly nasty, because outside of 
hardware problems mentioned in the previous email, many phy read 
routines contain a metric ton of udelay() and mdelay()s.  Now, an 
unpriv'd user can cause the kernel to do tons of in-kernel busy-waits, 
in effect spinning the CPU at their mercy.

	Jeff