From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
ming.lei@canonical.com, torvalds@linux-foundation.org,
liam.r.girdwood@linux.intel.com, yang.jie@intel.com,
tiwai@suse.de, dmitry.torokhov@gmail.com,
joonas.lahtinen@linux.intel.com, teg@jklm.no,
viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org,
kay@vrfy.org, dwmw2@infradead.org, linux-kernel@vger.kernel.org,
yalin.wang2010@gmail.com, Jonathan Corbet <corbet@lwn.net>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
Michal Marek <mmarek@suse.com>,
linux-doc@vger.kernel.org, cocci@systeme.lip6.fr,
Alessandro Rubini <rubini@gnudd.com>,
Kevin Cernekee <cernekee@gmail.com>, Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org,
Arend Van Spriel <arend@broadcom.com>
Subject: Re: [RFC] firmware: annotate thou shalt not request fw on init or probe
Date: Thu, 3 Sep 2015 03:35:33 +0200 [thread overview]
Message-ID: <20150903013533.GO8051@wotan.suse.de> (raw)
In-Reply-To: <alpine.DEB.2.02.1508291812350.2057@localhost6.localdomain6>
On Sat, Aug 29, 2015 at 06:18:20PM +0200, Julia Lawall wrote:
> > +@ defines_module_init exists @
> > +declarer name module_init;
> > +identifier init;
> > +@@
> > +
> > +module_init(init);
> > +
> > +@ has_probe depends on defines_module_init @
> > +identifier drv_calls, drv_probe;
> > +type bus_driver;
> > +identifier probe_op =~ "(probe)";
> > +@@
> > +
> > +bus_driver drv_calls = {
> > + .probe_op = drv_probe,
> > +};
>
> I'm not sure that this is enough. For example, there is the macro
> platform_driver_probe that initializes probe fields. There is likewise
> module_platform_driver, which is a top-level declaration that encapsulates
> the module_init and the definition of the module_init function, which in
> turn calls platform_driver_probe. There is also module_platform_driver,
> which encapsulates the module_init, but not the initialization of the probe
> field. Are you concerned with any of these cases?
Yes, and also it would seem this would only capture simple one level of
routine indirection, for instance if probe called bar() and it was within
bar() that the driver code called a fw request call, that would not be picked
up, correct?
If true then the hunt is yet even more complex. The discussion that prompted me
to send this is still unfolding though [0] and it seems we may want to allow
for these type of calls within probe in the end but in order to vet for drivers
that fw is available through the direct filesystem lookup we may need help from
userspace. As that discussion unfolds it will be good to keep in mind what
effort we'd need to hunt all users down for now.
[0] http://lkml.kernel.org/r/CAB=NE6UBRa0K7=PomJzKxsoj4GzAqkYrkp=O+UfVvu2fwM25pA@mail.gmail.com
Luis
next prev parent reply other threads:[~2015-09-03 1:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-29 1:18 [RFC] firmware: annotate thou shalt not request fw on init or probe Luis R. Rodriguez
2015-08-29 16:18 ` Julia Lawall
2015-09-03 1:35 ` Luis R. Rodriguez [this message]
2015-09-03 5:56 ` Julia Lawall
2016-06-16 20:56 ` Luis R. Rodriguez
2015-09-01 17:28 ` Josh Boyer
2015-09-03 1:37 ` Luis R. Rodriguez
2015-09-03 11:45 ` [Cocci] " SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150903013533.GO8051@wotan.suse.de \
--to=mcgrof@suse.com \
--cc=Gilles.Muller@lip6.fr \
--cc=arend@broadcom.com \
--cc=cernekee@gmail.com \
--cc=cocci@systeme.lip6.fr \
--cc=corbet@lwn.net \
--cc=dmitry.torokhov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=jslaby@suse.com \
--cc=julia.lawall@lip6.fr \
--cc=kay@vrfy.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--cc=ming.lei@canonical.com \
--cc=mmarek@suse.com \
--cc=nicolas.palix@imag.fr \
--cc=rubini@gnudd.com \
--cc=teg@jklm.no \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=yalin.wang2010@gmail.com \
--cc=yang.jie@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).