From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
Ming Lei <ming.lei@canonical.com>,
Andrew Morton <akpm@linux-foundation.org>,
mmarek@suse.com, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
bp@alien8.de, chunkeey@googlemail.com,
lkml <linux-kernel@vger.kernel.org>,
markivx@codeaurora.org, Stephen Boyd <stephen.boyd@linaro.org>,
Mimi Zohar <zohar@linux.vnet.ibm.com>,
Mark Brown <broonie@kernel.org>,
tiwai@suse.de, johannes@sipsolutions.net, hauke@hauke-m.de,
jwboyer@fedoraproject.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Jiri Slaby <jslaby@suse.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andy Lutomirski <luto@amacapital.net>,
fengguang.wu@intel.com, Richard Purdie <rpurdie@rpsys.net>,
ki@samsung.com, Abhay_Salunke@dell.com,
Julia Lawall <Julia.Lawall@lip6.fr>,
Gilles.Muller@lip6.fr, nicolas.palix@imag.fr, teg@jklm.no,
David Howells <dhowells@redhat.com>,
Kees Cook <keescook@chromium.org>,
tj@kernel.org, daniel.vetter@ffwll.ch,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v2 1/8] firmware: add new extensible firmware API - sysdata_file_request*()
Date: Fri, 12 Aug 2016 17:25:07 +0200 [thread overview]
Message-ID: <20160812152507.GC3296@wotan.suse.de> (raw)
In-Reply-To: <CAOCOHw4CKqm=a0tePipjPraRzsqnK9YF1R+P06F_W3dt4x616g@mail.gmail.com>
On Thu, Aug 11, 2016 at 02:15:31PM -0700, Bjorn Andersson wrote:
> On Thu, Jun 16, 2016 at 4:59 PM, Luis R. Rodriguez <mcgrof@kernel.org> wrote:
> > The firmware API has evolved over the years slowly, as it
> > grows we extend it by adding new routines or at times we extend
> > existing routines with more or less arguments. This doesn't scale
> > well, when new arguments are added to existing routines it means
> > we need to traverse the kernel with a slew of collateral
> > evolutions to adjust old driver users. The firmware API is also
> > now being used for things outside of the scope of what typically
> > would be considered "firmware", an example here is the p54 driver
> > enables users to provide a custom EEPROM through this interface.
> > Another example is optional CPU microcode updates. This list is
> > actually quite endless...
> >
>
> Why can't this done in an incremental fashion, like other frameworks
> has done, by transitioning the existing APIs to take a argument
> structure?
This is proposed as incremental, the grammar helpers are there to help,
not to force a full sweep change.
> How are these cases of "misuse" going to go away with the introduction
> of another non-firmware-loading interface?
For starters maintainers would ask developer to extend functionality
via the new descriptor (or whatever we end up calling it).
> > There are other subsystems which would like to make use of the
> > APIs for similar things (not firmware) but have different
> > requirements and criteria which they'd like to be met for the
> > requested file. If different requirements are needed it would
> > again mean adding more arguments and making a slew of collateral
> > evolutions, or adding yet-another-new-API-call.
> >
>
> Is the main problem here that it's named "firmware" or that there are
> potential requirements that are inconsistent with something loading
> "firmware"?
We will replace CRDA with an in-kernel API call to fetch the regulatory.bin, it
makes no sense to be referring to regulatory.bin as firmware. There are other
uses already, device configuration, EEPROM default data, etc. In the case to
replace CRDA we will want signature data, and we may want to have some key
specified. To add support for firmware singing we will want to extend yet again
the firmware API with another argument, with the flexible API this will just
be an added entry into the descriptor.
> [..]
> >
> > - Usermode helpers is completely ignored, *always*
>
> What technical benefit does this give us?
It means we can compartamentalize the user mode helper. Because...
>
> As discussed elsewhere, having a mechanism for postponing firmware
> loading until the appropriate file systems are mounted would remove my
> dependency on the usermode helper.
This is the only reason stated so far as why some folks want to use it.
That and some legacy crap (2 drivers). As I have noted elsewhere though
too, this sort of deterministic loading is a generic core fs/exec.c
enhancement for the kernel, not just a firmware thing any more as we
share the same core APIs for reading files now.
> But the direction discussed would
> be unrelated to firmware vs sysdata.
Right, the name chosen for the API is orthogonal. Think of it as two circles,
device data or sysdata and then firmware. The new flexible API just acknowledges
that the first exists and is going to be used, so for instance 802.11 will use it
eventually for regulatory.bin.
Luis
next prev parent reply other threads:[~2016-08-12 15:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 23:59 [PATCH v2 0/8] firmware: add new sysdata API Luis R. Rodriguez
2016-06-16 23:59 ` [PATCH v2 1/8] firmware: add new extensible firmware API - sysdata_file_request*() Luis R. Rodriguez
2016-08-11 21:15 ` Bjorn Andersson
2016-08-12 15:25 ` Luis R. Rodriguez [this message]
2016-06-16 23:59 ` [PATCH v2 2/8] lib/test_firmware.c: use late_initcall() Luis R. Rodriguez
2016-06-16 23:59 ` [PATCH v2 3/8] selftests: firmware: only modprobe if driver is missing Luis R. Rodriguez
2016-06-16 23:59 ` [PATCH v2 4/8] selftests: firmware: send expected errors to /dev/null Luis R. Rodriguez
2016-06-16 23:59 ` [PATCH v2 5/8] test: add new sysdata_file_request*() loader tester Luis R. Rodriguez
2016-06-16 23:59 ` [PATCH v2 6/8] Documentation/firmware_class: add sysdata API converter SmPL patch Luis R. Rodriguez
2016-06-16 23:59 ` [PATCH v2 7/8] x86/microcode: convert to use sysdata API Luis R. Rodriguez
2016-06-16 23:59 ` [PATCH v2 8/8] p54: convert to " Luis R. Rodriguez
[not found] ` <CA+55aFyD+Xa2auP05=pBSxQc2qcuR858syMW5fiQKowbqbkDzQ@mail.gmail.com>
2016-06-17 1:36 ` Luis R. Rodriguez
2016-06-17 3:09 ` Linus Torvalds
2016-06-17 18:35 ` Luis R. Rodriguez
2016-08-10 18:32 ` Luis R. Rodriguez
2016-08-10 19:04 ` Arend Van Spriel
2016-08-10 19:17 ` Mark Brown
2016-08-10 19:40 ` Luis R. Rodriguez
2016-08-10 19:34 ` Luis R. Rodriguez
2016-06-17 23:40 ` [PATCH v2 0/8] firmware: add new " Luis R. Rodriguez
2016-06-18 0:32 ` Luis R. Rodriguez
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=20160812152507.GC3296@wotan.suse.de \
--to=mcgrof@kernel.org \
--cc=Abhay_Salunke@dell.com \
--cc=Gilles.Muller@lip6.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=akpm@linux-foundation.org \
--cc=bjorn.andersson@linaro.org \
--cc=bp@alien8.de \
--cc=broonie@kernel.org \
--cc=chunkeey@googlemail.com \
--cc=corbet@lwn.net \
--cc=daniel.vetter@ffwll.ch \
--cc=dhowells@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hauke@hauke-m.de \
--cc=johannes@sipsolutions.net \
--cc=jslaby@suse.com \
--cc=jwboyer@fedoraproject.org \
--cc=keescook@chromium.org \
--cc=ki@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=markivx@codeaurora.org \
--cc=ming.lei@canonical.com \
--cc=mmarek@suse.com \
--cc=nicolas.palix@imag.fr \
--cc=rpurdie@rpsys.net \
--cc=stephen.boyd@linaro.org \
--cc=teg@jklm.no \
--cc=tiwai@suse.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=zohar@linux.vnet.ibm.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