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]
Message-ID: <Pine.LNX.4.44L0.1412221553230.32109-100000@netrider.rowland.org>
Date:	Mon, 22 Dec 2014 16:04:53 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Doug Anderson <dianders@...gle.com>
cc:	Wu Liang feng <wulf@...k-chips.com>,
	Heiko Stübner <heiko@...ech.de>,
	Tao Huang <huangtao@...k-chips.com>,
	Kever Yang <kever.yang@...k-chips.com>,
	Eddie Cai <eddie.cai@...k-chips.com>,
	Roy Li <roy.li@...k-chips.com>, Chris <zyw@...k-chips.com>,
	Julius Werner <jwerner@...gle.com>,
	Pawel Osciak <posciak@...gle.com>,
	Tomasz Figa <tfiga@...gle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 2/2] USB: ehci-platform: Support ehci reset after resume
 quirk

On Mon, 22 Dec 2014, Doug Anderson wrote:

> Alan,
> 
> On Mon, Dec 22, 2014 at 8:06 AM, Alan Stern <stern@...land.harvard.edu> wrote:
> > On Mon, 22 Dec 2014, Wu Liang feng wrote:
> >
> >> The EHCI controller doesn't properly detect the case when
> >
> > "The" EHCI controller?  I don't know what EHCI controller you're
> > talking about, but my controllers don't have any trouble detecting
> > device removal during suspend.
> 
> This is specifically the EHCI controller on rk3288.  Not sure why Wu
> Liang feng removed that part of the description.

Maybe it could be put back in.

> > Isn't this solution too extreme?  What if the device was a flash
> > storage drive and it wasn't unplugged during suspend?  This patch would
> > force it to be removed, messing up any mounted filesystems, when there
> > was no need.
> 
> I'm told by Julius (CCed, who knows the USB stack infinitely better
> than I do) that you can work around this using "persist".  I would
> imagine that anyone on a machine using hibernation would run into the
> same problem, right?

> We asked a lot about this and you can find a whole set of detailed
> discussion at:
> 
> https://chromium-review.googlesource.com/#/c/232077/1/drivers/usb/host/ehci-platform.c
> 
> 
> Since I don't know the USB subsystem particularly well, my review
> isn't terribly meaningful, but just in case:
> 
> Reviewed-by: Doug Anderson <dianders@...omium.org>
> 
> 
> On rk3288-pinky I have tested that without this patch the EHCI
> controller flips out when a USB webcam is plugged into the port and is
> power cycled across suspend/resume.  With this patch the controller
> properly unplugs / replugs the webcam.
> 
> Tested-by: Doug Anderson <dianders@...omium.org>

I assume you also tested the case where the webcam is _not_ 
power-cycled during the suspend.

On Mon, 22 Dec 2014, Julius Werner wrote:

> As Doug said, I think persist is the solution. We have essentially the
> same case: all we know is that there is now a device connected to the 
> same port that a device had been connected during suspend... but with 
> no guarantees whether it is the same device or in the same state. By  
> forcing people to use persist, we acknowledge that this has the same  
> risks (e.g. data corruption if a mounted mass storage device was
> swapped out for another one), and we benefit from the same safety
> checks like comparing the serial number.

Okay, I see.  This makes sense.

Acked-by: Alan Stern <stern@...land.harvard.edu>

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ