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:   Wed, 17 Jun 2020 18:13:03 -0700
From:   Saravana Kannan <saravanak@...gle.com>
To:     Rob Herring <robh@...nel.org>
Cc:     Frank Rowand <frowand.list@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Android Kernel Team <kernel-team@...roid.com>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH v2 2/2] of: property: Improve cycle detection when one of
 the devices is never added

On Wed, Jun 17, 2020 at 3:12 PM Rob Herring <robh@...nel.org> wrote:
>
> On Tue, 09 Jun 2020 18:19:34 -0700, Saravana Kannan wrote:
> > Consider this example where -> means LHS device is a consumer of RHS
> > device and indentation represents "child of" of the previous device.
> >
> > Device A -> Device C
> >
> > Device B -> Device A
> >       Device C
> >
> > Without this commit:
> > 1. Device A is added.
> > 2. Device A is added to waiting for supplier list (Device C)
> > 3. Device B is added
> > 4. Device B is linked as a consumer to Device A
> > 5. Device A doesn't probe because it's waiting for Device C to be added.
> > 6. Device B doesn't probe because Device A hasn't probed.
> > 7. Device C will never be added because it's parent hasn't probed.
> >
> > So, Device A, B and C will be in a probe/add deadlock.
> >
> > This commit detects this scenario and stops trying to create a device
> > link between Device A and Device C since doing so would create the
> > following cycle:
> > Device A -> Devic C -(parent)-> Device B -> Device A.
> >
> > With this commit:
> > 1. Device A is added.
> > 3. Device B is added
> > 4. Device B is linked as a consumer to Device A
> > 5. Device A probes.
> > 6. Device B probes because Device A has probed.
> > 7. Device C is added and probed.
> >
> > Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> > ---
> >  drivers/of/property.c | 62 ++++++++++++++++++++++++++++++++++++++-----
> >  1 file changed, 56 insertions(+), 6 deletions(-)
> >
>
> Both patches applied.

Thanks!

-Saravana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ