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: <CAAd53p4oSHqqaMPdh5MuBXMD2bLhGqqZBGbJWPWiij3wU=DX4Q@mail.gmail.com>
Date:   Fri, 18 Aug 2023 07:49:20 +0800
From:   Kai-Heng Feng <kai.heng.feng@...onical.com>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     Mathias Nyman <mathias.nyman@...ux.intel.com>,
        Oliver Neukum <oneukum@...e.com>, mathias.nyman@...el.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xhci: Disable connect, disconnect and over-current wakeup
 on system suspend

On Thu, Aug 17, 2023 at 10:03 PM Alan Stern <stern@...land.harvard.edu> wrote:
>
> On Thu, Aug 17, 2023 at 09:13:55PM +0800, Kai-Heng Feng wrote:
> > On Thu, Aug 17, 2023 at 8:52 PM Mathias Nyman
> > <mathias.nyman@...ux.intel.com> wrote:
> > >
> > > On 17.8.2023 14.18, Oliver Neukum wrote:
> > > > On 17.08.23 11:33, Kai-Heng Feng wrote:
> > > >
> > > > Hi,
> > > >
> > > >> So for system-wide suspend, also disable connect, disconnect and
> > > >> over-current wakeup to prevent spurious wakeup.
> > > >
> > > > isn't this breaking the ability to effectively use your root hub
> > > > as a source of system wakeups? That is, even if you want the
> > > > system to wake up if somebody attaches a new device, it no longer works?
> > > >
> > >
> > > I got the same concern about this.
> >
> > Per my test, it doesn't work with or without this change. This applies
> > to disconnection too, disconnecting USB devices doesn't wake the
> > system up.
> > Furthermore, if the newly attached device is a USB keyboard, pressing
> > it doesn't wake the system up either. Probably because remote wakeup
> > isn't configured when the system is suspended.
>
> If remote wakeup isn't enabled then the do_wakeup variable will be 0,
> so your patch wouldn't make any difference.  The question is what
> happens when remote wakeup _is_ enabled.

Nothing happens either per my testing.

For USB keyboard, the remote wakeup is enabled, unplugging it when
suspend is suspended doesn't wake the system up, despite of
PORT_WKDISC_E being set.
Plugging it back doesn't wake the system up either, despite of PORT_WKCONN_E.

>
> Did you check the settings in the controller's and root hub's
> power/wakeup sysfs files?

Yes. It's all correct as keyboard press can wake the system up.

Kai-Heng

>
> Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ