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: Thu, 16 Nov 2023 10:42:42 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>, davem@...emloft.net,
  edumazet@...gle.com, kuba@...nel.org, linux-usb@...r.kernel.org, 
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: weihao.bj@...system.com
Subject: Re: [PATCH 2/2] net: usb: ax88179_178a: avoid two consecutive
 device resets

On Tue, 2023-11-14 at 13:50 +0100, Jose Ignacio Tornos Martinez wrote:
> The device is always reset two consecutive times (ax88179_reset is called
> twice), one from usbnet_probe during the device binding and the other from
> usbnet_open.
> 
> Let only the reset during the device binding to prepare the device as soon
> as possible and not repeat the reset operation (tested with generic ASIX
> Electronics Corp. AX88179 Gigabit Ethernet device).
> 
> Reported-by: Herb Wei <weihao.bj@...system.com>
> Tested-by: Herb Wei <weihao.bj@...system.com>
> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>

We need a suitable Fixes tag even here ;)

> ---
>  drivers/net/usb/ax88179_178a.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> index 4ea0e155bb0d..864c6fc2db33 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -1678,7 +1678,6 @@ static const struct driver_info ax88179_info = {
>  	.unbind = ax88179_unbind,
>  	.status = ax88179_status,
>  	.link_reset = ax88179_link_reset,
> -	.reset = ax88179_reset,
>  	.stop = ax88179_stop,
>  	.flags = FLAG_ETHER | FLAG_FRAMING_AX,
>  	.rx_fixup = ax88179_rx_fixup,

This looks potentially dangerous, as the device will not get a reset in
down/up cycles; *possibly* dropping the reset call from ax88179_bind()
would be safer.

In both cases touching so many H/W variant with testing available on a
single one sounds dangerous. Is the unneeded 2nd reset causing any
specific issue?

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ