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]
Date:   Thu, 28 May 2020 09:09:21 -0700
From:   Saravana Kannan <saravanak@...gle.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Walle <michael@...le.cc>,
        "Cc: Android Kernel" <kernel-team@...roid.com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] driver core: Update device link status correctly for
 SYNC_STATE_ONLY links

On Wed, May 27, 2020 at 1:26 AM Rafael J. Wysocki <rafael@...nel.org> wrote:
>
> On Wed, May 27, 2020 at 12:09 AM Saravana Kannan <saravanak@...gle.com> wrote:
> >
> > When SYNC_STATE_ONLY support was added in commit 05ef983e0d65 ("driver
> > core: Add device link support for SYNC_STATE_ONLY flag"),
> > SYNC_STATE_ONLY links were treated similar to STATELESS links in terms
> > of not blocking consumer probe if the supplier hasn't probed yet.
> >
> > That caused a SYNC_STATE_ONLY device link's status to not get updated.
> > Since SYNC_STATE_ONLY device link is no longer useful once the
> > consumer probes, commit 21c27f06587d ("driver core: Fix
> > SYNC_STATE_ONLY device link implementation") addresses the status
> > update issue by deleting the SYNC_STATE_ONLY device link instead of
> > complicating the status update code.
> >
> > However, there are still some cases where we need to update the status
> > of a SYNC_STATE_ONLY device link. This is because a SYNC_STATE_ONLY
> > device link can later get converted into a normal MANAGED device link
> > when a normal MANAGED device link is created between a supplier and
> > consumer that already have a SYNC_STATE_ONLY device link between them.
> >
> > If a SYNC_STATE_ONLY device link's status isn't maintained correctly
> > till it's converted to a normal MANAGED device link, then the normal
> > MANAGED device link will end up with a wrong link status. This can cause
> > a warning stack trace[1] when the consumer device probes successfully.
> >
> > This commit fixes the SYNC_STATE_ONLY device link status update issue
> > where it wouldn't transition correctly from DL_STATE_DORMANT or
> > DL_STATE_AVAILABLE to DL_STATE_CONSUMER_PROBE. It also resets the status
> > back to DL_STATE_DORMANT or DL_STATE_AVAILABLE if the consumer probe
> > fails.
> >
> > [1] - https://lore.kernel.org/lkml/20200522204120.3b3c9ed6@apollo/
> > Fixes: 05ef983e0d65 ("driver core: Add device link support for SYNC_STATE_ONLY flag")
> > Fixes: 21c27f06587d ("driver core: Fix SYNC_STATE_ONLY device link implementation")
> > Reported-by: Michael Walle <michael@...le.cc>
> > Tested-by: Michael Walle <michael@...le.cc>
> > Signed-off-by: Saravana Kannan <saravanak@...gle.com>
>
> Reviewed-by: Rafael J. Wysocki <rrafael.j.wysocki@...el.com>
>

Thanks Rafael for the review.

And thanks again Michael for all the logs!

-Saravana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ