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, 1 Sep 2021 18:43:29 -0700
From:   Saravana Kannan <saravanak@...gle.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Android Kernel Team <kernel-team@...roid.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] driver core: fw_devlink: Don't create device links for
 devices not on a bus

On Wed, Sep 1, 2021 at 5:16 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> On Wed, Sep 1, 2021 at 3:17 PM Ulf Hansson <ulf.hansson@...aro.org> wrote:
> >
> > On Wed, 1 Sept 2021 at 23:54, Saravana Kannan <saravanak@...gle.com> wrote:
> > >
> > > On Wed, Sep 1, 2021 at 8:45 AM Ulf Hansson <ulf.hansson@...aro.org> wrote:
> > > >
> > > > On Wed, 1 Sept 2021 at 00:45, Saravana Kannan <saravanak@...gle.com> wrote:
> > > > >
> > > > > Devices that are not on a bus will never have a driver bound to it. So,
> > > > > fw_devlink should not create device links for it as it can cause probe
> > > > > issues[1] or sync_state() call back issues[2].
> > > > >
> > > > > [1] - https://lore.kernel.org/lkml/CAGETcx_xJCqOWtwZ9Ee2+0sPGNLM5=F=djtbdYENkAYZa0ynqQ@mail.gmail.com/
> > > > > [2] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@mail.gmail.com/
> > > >
> > > > Unfortunately, this doesn't fix my problem in [2].
> > > >
> > > > When the "soctest" device is initialized, via of_platform_populate(),
> > > > it will be attached to the platform bus, hence the check for the bus
> > > > pointer that you suggest to add below, doesn't have an impact on my
> > > > use case. I still get the below in the log:
> > >
> > > *face palm* Right. I forgot that. I just read "bus" and my mind went
> > > to busses added as devices. It apparently also didn't help [1] which
> > > is surprising to me. I'll dig into that separately. I'll look into
> > > fixing this. The annoying part is that some devices have compatible
> > > property that's both "simple-bus" and some other string that a driver
> > > actually matches with.
> >
> > Yes, that is my view of the problem as well.
> >
> > So perhaps we should do a more fine grained check for when the
> > "simple-bus" compatible is present in the node,
>
> Exactly. Do you want to take a stab at this? There are too many things
> I want to work on, so if you can do this one, that'd be nice.

Nevermind. I already did most of it and it needs a little bit more
massaging. I'll send out a patch later.

-Saravana

>
> > and then don't create
> > a fw_devlink if we reach an ascendant with only this compatible?
>
> And you can achieve that by setting this flag for that DT node:
> fwnode->flags |= FWNODE_FLAG_NOT_DEVICE;
>
> -Saravana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ