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] [day] [month] [year] [list]
Message-ID: <35aafcc1-8661-48b7-bbb9-4e48ba3c6cf2@rowland.harvard.edu>
Date: Mon, 13 Jan 2025 11:03:03 -0500
From: Alan Stern <stern@...land.harvard.edu>
To: "Yo-Jung (Leo) Lin" <leo.lin@...onical.com>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org, pavel@....cz,
	len.brown@...el.com, bhelgaas@...gle.com, duanchenghao@...inos.cn,
	dlemoal@...nel.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	hdegoede@...hat.com
Subject: Re: [PATCH] USB: Prevent xhci from resuming root hub during suspend
 entrance

On Mon, Jan 13, 2025 at 04:14:07PM +0800, Yo-Jung (Leo) Lin wrote:
> Hi Alan
> 
> On Fri, Jan 10, 2025 at 11:44 PM Alan Stern <stern@...land.harvard.edu> wrote:
> >
> > On Fri, Jan 10, 2025 at 04:44:10PM +0800, Yo-Jung (Leo) Lin wrote:
> > > The commit d9b4067aef50 ("USB: Fix the issue of task recovery failure
> > > caused by USB status when S4 wakes up") fixed an issue where if an USB
> > > port change happens during the entering steps of hibernation, xhci driver
> > > would attempt to resume the root hub, making the hibernation fail.
> > >
> > > System-wide suspend may fail due to the same reason, but this hasn't been
> > > addressed yet. This has been found on HP ProOne 440[1], as well as on
> > > some newer Dell all-in-one models. When suspend fails due to this reason,
> > > the kernel would show the following messages:
> >
> > I believe this problem was discussed on the mailing list before, and it
> > turned out that the issue was caused by a bug in the xhci-hcd driver,
> > not a bug in the USB core.
> 
> Could you be more specific on which bug/thread it is?
> If you were mentioning thread about d9b4067aef50 ("USB: Fix the
> issue of task recovery failure caused by USB status when S4 wakes up"),
> the log in that commit message suggests that it happened on ehci, while
> here it happened on xhci. So this may be more general than just the xhci.

I was referring to the discussion in the email thread here:

https://lore.kernel.org/linux-usb/7be0c87a-c00f-4346-8482-f41ef0249b57@rowland.harvard.edu/

> > Basically, suspend is _supposed_ to fail if a wakeup event occurs while
> > the suspend is in progress.  As I recall, the bug in xhci-hcd was that
> > it treats some non-wakeup events as if they were wakeup events.
> >
> > In particular, a port change on the root hub should be treated as a
> > wakeup event if and only if the root hub is enabled for wakeup.  Does
> > xhci-hcd check for this before failing the suspend?
> >
> > This reasoning shows that your proposed fix is incorrect.
> >
> Thanks for the feedback, This indeed isn't a correct way to address this.
> Will try to figure out some other ways.

Okay, good.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ