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: <20200609131600.GE4583@sirena.org.uk>
Date:   Tue, 9 Jun 2020 14:16:00 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Marco Felsch <m.felsch@...gutronix.de>
Cc:     Andrzej Hajda <a.hajda@...sung.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Grant Likely <grant.likely@....com>,
        Saravana Kannan <saravanak@...gle.com>,
        artem.bityutskiy@...ux.intel.com, balbi@...nel.org,
        fntoth@...il.com, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        peter.ujfalusi@...com, rafael@...nel.org, kernel-team@...roid.com,
        nd <nd@....com>, kernel@...gutronix.de
Subject: Re: [PATCH v3] driver core: Break infinite loop when deferred probe
 can't be satisfied

On Tue, Jun 09, 2020 at 02:10:29PM +0200, Marco Felsch wrote:
> On 20-06-09 11:27, Andrzej Hajda wrote:
> > On 09.06.2020 08:45, Marco Felsch wrote:
> > > On 20-06-08 13:11, Andrzej Hajda wrote:
> > >> On 08.06.2020 11:17, Marco Felsch wrote:
> > >>> On 20-03-26 18:31, Andy Shevchenko wrote:
> > >>>> On Thu, Mar 26, 2020 at 03:01:22PM +0000, Grant Likely wrote:
> > >>>>> On 25/03/2020 12:51, Andy Shevchenko wrote:
> > >>>>>> On Tue, Mar 24, 2020 at 08:29:01PM -0700, Saravana Kannan wrote:
> > >>>>>>> On Tue, Mar 24, 2020 at 5:38 AM Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> > I think rule of 
> > thumb should be "do not expose yourself, until you are ready", which in 
> > this case means "do not call component_add, until resources are 
> > acquired" - ie resource acquisition should be performed in probe.

> Hm.. there are is no documentation which forbid this use-case. I thought
> that the component framework bind() equals the driver probe() function..

It does, the issue is perhaps more clearly expressed as saying that a
driver should acquire whatever resources it needs before starting to
make resources available to others, this includes but isn't limited to
registering new device nodes.  This ensures that the users don't then
start trying to use resources and have them torn down underneath them.

> > I use 
> > this approach mainly to avoid multiple deferred re-probes, but it should 
> > solve also this issue, so even if there will be solution to "deferred 
> > probe issues" in core it would be good to fix imx drivers.

> Pls, see my above comments. It is not only the imx driver. Also we
> shouldn't expect that driver-developers will follow a rule which is
> not written somewhere.

If you've got an idea where this should be documented patches welcome!
I can't think of anywhere sensibly discoverable to put something off the
top of my head.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ