lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 06 Mar 2009 07:27:23 -0500
From:	Jeff Garzik <jgarzik@...ox.com>
To:	Ben Hutchings <bhutchings@...arflare.com>
CC:	Rick Jones <rick.jones2@...com>, netdev@...r.kernel.org
Subject: Re: [PATCH] ethtool: Support arbitrary speeds

Ben Hutchings wrote:
> The speed and speed_hi fields of struct ethtool_cmd together represent
> a value in units of Mbit/s.  The valid speed settings are hardware-
> dependent and should be checked by the driver.  Remove our validation
> and allow arbitrary positive values.  Continue to report 0 and -1 as
> "Unknown!" since some drivers will report these invalid values when
> the link is down.
> 
> Signed-off-by: Ben Hutchings <bhutchings@...arflare.com>
> ---
> On Thu, 2009-01-08 at 11:50 -0800, Rick Jones wrote:
>>> I think 0, (u32)(-1) and (u16)(-1) may have to be special-cased as
>>> unknown, but everything else can be treated as a number of Mbit/s.  I
>>> don't know what a driver should do about an interface that really runs
>>> at 65.535 Gbit/s though...
>> Something along these lines then? (assuming my mailer doesn't fubar this
>> :( - I normally send matches via mailx)
> 
> That's kind of incomplete.  Here's my attempt.
> 
> In a quick test I found that the tg3 driver *doesn't* validate the speed
> setting if autonegotiation is off, and will accept and report back e.g.
> 99.  But this patch doesn't create a new problem as you could already
> set it to the unsupported speeds of 2500 and 10000.
> 
> Ben.
> 
>  ethtool.8 |    4 ++--
>  ethtool.c |   42 ++++++++++--------------------------------
>  2 files changed, 12 insertions(+), 34 deletions(-)
> 

applied


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists