Subject: Re: [RFC] let mortals use ethtool

From: Jeff Garzik <[email-masked]>
Date: Thu, 28 Sep 2006 16:28:08 -0400

Michael Chan wrote:
> On Thu, 2006-09-28 at 12:25 -0700, Stephen Hemminger wrote:
> 
>> +	/* Allow some commands to be done by anyone */
>> +	switch(ethcmd) {
>> +	case ETHTOOL_GSET:
>> +	case ETHTOOL_GDRVINFO:
>> +	case ETHTOOL_GREGS:
>> +	case ETHTOOL_GWOL:
>> +	case ETHTOOL_GMSGLVL:
>> +	case ETHTOOL_GLINK:
>> +	case ETHTOOL_GCOALESCE:
>> +	case ETHTOOL_GRINGPARAM:
>> +	case ETHTOOL_GPAUSEPARAM:
>> +	case ETHTOOL_GRXCSUM:
>> +	case ETHTOOL_GTXCSUM:
>> +	case ETHTOOL_GSG:
>> +	case ETHTOOL_GSTRINGS:
>> +	case ETHTOOL_PHYS_ID:
>> +	case ETHTOOL_GSTATS:
>> +	case ETHTOOL_GTSO:
>> +	case ETHTOOL_GPERMADDR:
>> +	case ETHTOOL_GUFO:
>> +	case ETHTOOL_GGSO:
> 
> I'm against letting normal users do ETHTOOL_GREGS and ETHTOOL_PHYS_ID.
> Dumping 64K worth of registers and blinking the LEDs should be
> restricted.  But I have no problem doing these checks in the driver if
> necessary.

It is because of issues like these that we should not open up the entire 
list above, all at once.  Each sub-ioctl needs careful consideration and 
driver auditing.

	Jeff