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: Tue, 16 Apr 2024 16:48:32 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Ferry Toth <fntoth@...il.com>
Cc: Hardik Gajjar <hgajjar@...adit-jv.com>, gregkh@...uxfoundation.org,
	s.hauer@...gutronix.de, jonathanh@...dia.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	quic_linyyuan@...cinc.com, paul@...pouillou.net,
	quic_eserrao@...cinc.com, erosca@...adit-jv.com
Subject: Re: [PATCH v4] usb: gadget: u_ether: Replace netif_stop_queue with
 netif_device_detach

On Thu, Apr 11, 2024 at 10:52:36PM +0200, Ferry Toth wrote:
> Op 11-04-2024 om 18:39 schreef Andy Shevchenko:
> > On Thu, Apr 11, 2024 at 04:26:37PM +0200, Hardik Gajjar wrote:
> > > On Wed, Apr 10, 2024 at 08:37:42PM +0300, Andy Shevchenko wrote:
> > > > On Sun, Apr 07, 2024 at 10:51:51PM +0200, Ferry Toth wrote:
> > > > > Op 05-04-2024 om 13:38 schreef Hardik Gajjar:

..

> > > > > Exactly. And this didn't happen before the 2 patches.
> > > > > 
> > > > > To be precise: /sys/class/net/usb0 is not removed and it is a link, the link
> > > > > target /sys/devices/pci0000:00/0000:00:11.0/dwc3.0.auto/gadget.0/net/usb0 no
> > > > > longer exists
> > > So, it means that the /sys/class/net/usb0 is present, but the symlink is
> > > broken. In that case, the dwc3 driver should recreate the device, and the
> > > symlink should become active again
> 
> Yes, on first enabling gadget (when device mode is activated):
> 
> root@...a:~# ls /sys/devices/pci0000:00/0000:00:11.0/dwc3.0.auto/gadget.0/
> driver  net  power  sound  subsystem  suspended  uevent
> 
> Then switching to host mode:
> 
> root@...a:~# ls /sys/devices/pci0000:00/0000:00:11.0/dwc3.0.auto/gadget.0/
> ls: cannot access
> '/sys/devices/pci0000:00/0000:00:11.0/dwc3.0.auto/gadget.0/': No such file
> or directory
> 
> Then back to device mode:
> 
> root@...a:~# ls /sys/devices/pci0000:00/0000:00:11.0/dwc3.0.auto/gadget.0/
> driver  power  sound  subsystem  suspended  uevent
> 
> net is missing. But, network functions:
> 
> root@...a:~# ping 10.42.0.1
> PING 10.42.0.1 (10.42.0.1): 56 data bytes
> 
> Mass storage device is created and removed each time as expected.

So, what's the conclusion? Shall we move towards revert of those two changes?

> > > I have the dwc3 IP base usb controller, Let me check with this patch and
> > > share result here.  May be we need some fix in dwc3
> Would have been nice if someone could test on other controller as well. But
> another instance of dwc3 is also very welcome.
> > It's quite possible, please test on your side.
> > We are happy to test any fixes if you come up with.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ