mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Lennart Poettering <mzxreary@0pointer.de>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	Tom Gundersen <teg@jklm.no>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	jewalt@lgsinnovations.com, oss-drivers@netronome.com,
	Daniel Wagner <wagi@monom.org>,
	Stephen Boyd <stephen.boyd@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	David Howells <dhowells@redhat.com>,
	"Li, Yi" <yi1.li@linux.intel.com>,
	Peter Jones <pjones@redhat.com>,
	Luciano Coelho <luciano.coelho@intel.com>,
	rafal@milecki.pl, Nicolas Broeking <nbroeking@me.com>,
	Matthew Wilcox <mawilcox@microsoft.com>,
	"AKASHI, Takahiro" <takahiro.akashi@linaro.org>,
	Petr Mladek <pmladek@suse.com>,
	Arend Van Spriel <arend.vanspriel@broadcom.com>,
	Kees Cook <keescook@chromium.org>,
	Johannes Berg <johannes.berg@intel.com>,
	atull@kernel.org, Vikram Mulukutla <markivx@codeaurora.org>,
	Ming Lei <ming.lei@redhat.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Andy Lutomirski <luto@kernel.org>,
	systemd Mailing List <systemd-devel@lists.freedesktop.org>,
	Alan Cox <alan@linux.intel.com>,
	Martin Fuzzey <mfuzzey@parkeon.com>,
	Moritz Fischer <moritz.fischer@ettus.com>,
	Tso Ted <tytso@mit.edu>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [systemd-devel] [PATCH] firmware: wake all waiters
Date: Wed, 28 Jun 2017 19:57:47 +0200	[thread overview]
Message-ID: <20170628175747.GH21846@wotan.suse.de> (raw)
In-Reply-To: <20170628162108.GA23821@gardel-login>

On Wed, Jun 28, 2017 at 06:21:09PM +0200, Lennart Poettering wrote:
> On Wed, 28.06.17 09:06, Luis R. Rodriguez (mcgrof@kernel.org) wrote:
> 
> > On Wed, Jun 28, 2017 at 12:06 AM, Lennart Poettering
> > <mzxreary@0pointer.de> wrote:
> > > On Wed, 28.06.17 00:24, Luis R. Rodriguez (mcgrof@kernel.org) wrote:
> > >
> > >> > Do you know how systemd developers feel about the issue (CCed)?  Given
> > >> > that it seems to dominate in data center OSes now I'm slightly worried
> > >> > having to push Big Linux Vendors to package some seemingly
> > >> > embedded-centric software just to make advanced NICs run :(
> > >>
> > >> firmwared was written by a systemd developer :)
> > >
> > > No it wasn't. I don't know what firmwared is really. Sorry.
> > 
> > Is Tom Gundersen not a systemd developer?
> 
> Not really anymore, and "firmwared" is an effort independent of
> systemd, never was part of it, and while I heard Tom was working on
> this I was not aware of the project's naming or anything else...

Alright, thanks for the clarifications and sorry for the confusion!

In that case firmwared remains *just* an architecture example of an alternative
to the problem of looking for firmware through a *fallback mechanism* and
addressing "is my real rootfs mounted yet" problem some folks have struggled to
resolve, "are we sure we're ready to look for all firmware?".

Lennart, if you have a better architectural suggestion let us know.

I realize that the firmware fallback mechanism was ripped out of systemd long
ago, specifically as of systemd commit be2ea723b1d0 (“udev: remove userspace
firmware loading support”) as of v217 on August, 2014. This means most Linux
distributions today are not using or taking advantage of the firmware fallback
mechanism provided by kobject uevents. 

This is specially exacerbated due to the fact that most distributions today
disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK which *means* only the custom
fallback mechanism (no uevents are issued) can be used on those distributions,
and we actually want to *avoid* having more drivers use that mechanism. Only
2 drivers remain upstream now which explicitly require the custom fallback
mechanism. We don't to add any more.

This leaves distributions that want a fallback mechanism today only with the
option to enable CONFIG_FW_LOADER_USER_HELPER_FALLBACK and rely on uevents, and
firmwared was an architectural example of how to address the rootfs problem.

Android is enabling CONFIG_FW_LOADER_USER_HELPER_FALLBACK these days it seems.

If it helps the fallback mechanism is now documented here:

https://www.kernel.org/doc/html/latest/driver-api/firmware/fallback-mechanisms.html

The concept of firmwared was simple: it had best-effort mode and final-mode.
It relies on CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y and relies on uevents.
You boot with it on best-effort mode where firmware is hunted for in a best
effort way, but it does not fail a load through the kernel's sysfs interface
used for the fallback mechanism. Then once userspace knows we have reached the
real rootfs (since only it knows when this happens) it kicks firmwared into
final-mode, which in turn can now iterate over pending firmware and send a "not
found" with certainty.

So the focus for now is ironing out something that we know works *very well*
for the CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y folks.

It'd be great if we had a solution that could work for
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n folks but its unclear if that's
possible, so it may be best to only revisit this if and when we know for sure
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y and the rootfs issue is properly ironed
out with the uevents fallback mechanism.

  Luis

  reply	other threads:[~2017-06-28 17:57 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 23:37 Jakub Kicinski
2017-06-26 21:20 ` Luis R. Rodriguez
2017-06-26 21:23   ` [PATCH v2] firmware: fix batched requests - " Luis R. Rodriguez
2017-06-29 15:16     ` Greg KH
2017-06-29 15:17       ` Greg KH
2017-06-29 17:36         ` Luis R. Rodriguez
2017-06-26 23:41   ` [PATCH] firmware: " Luis R. Rodriguez
2017-06-27  2:10   ` Jakub Kicinski
2017-06-27 16:39     ` Luis R. Rodriguez
2017-06-27 21:25       ` Jakub Kicinski
2017-06-27 22:24         ` Luis R. Rodriguez
2017-06-27 22:39           ` Jakub Kicinski
2017-06-27 23:50             ` Luis R. Rodriguez
2017-06-28  7:06           ` [systemd-devel] " Lennart Poettering
2017-06-28 16:06             ` Luis R. Rodriguez
2017-06-28 16:21               ` Lennart Poettering
2017-06-28 17:57                 ` Luis R. Rodriguez [this message]
2017-06-29 19:56               ` Daniel Wagner
2017-06-27 17:48     ` Bjorn Andersson
2017-06-27 18:03       ` Luis R. Rodriguez
2017-06-27 18:59         ` Bjorn Andersson
2017-06-27 19:08           ` Luis R. Rodriguez
2017-06-27 19:52             ` Bjorn Andersson
2017-06-27 20:24               ` Luis R. Rodriguez
2017-06-26 21:44 ` Linus Torvalds
2017-06-26 23:30   ` Luis R. Rodriguez
2017-06-26 23:43     ` Linus Torvalds
2017-06-27  0:15       ` Luis R. Rodriguez
2017-06-28 13:45         ` Davidlohr Bueso
2017-06-28 15:58           ` Luis R. Rodriguez
2017-06-28 19:03             ` Davidlohr Bueso
2017-06-29 19:08         ` Davidlohr Bueso
2017-06-29 19:48           ` Luis R. Rodriguez
2017-06-30 16:32             ` Davidlohr Bueso
2017-07-05 16:18     ` Peter Zijlstra
2017-07-05 16:33       ` Linus Torvalds
2017-07-12 18:45         ` 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=20170628175747.GH21846@wotan.suse.de \
    --to=mcgrof@kernel.org \
    --cc=alan@linux.intel.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=atull@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dhowells@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jewalt@lgsinnovations.com \
    --cc=johannes.berg@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=luto@kernel.org \
    --cc=markivx@codeaurora.org \
    --cc=mawilcox@microsoft.com \
    --cc=mfuzzey@parkeon.com \
    --cc=ming.lei@redhat.com \
    --cc=moritz.fischer@ettus.com \
    --cc=mzxreary@0pointer.de \
    --cc=nbroeking@me.com \
    --cc=oss-drivers@netronome.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=pjones@redhat.com \
    --cc=pmladek@suse.com \
    --cc=rafal@milecki.pl \
    --cc=rjw@rjwysocki.net \
    --cc=stephen.boyd@linaro.org \
    --cc=systemd-devel@lists.freedesktop.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=teg@jklm.no \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=wagi@monom.org \
    --cc=yi1.li@linux.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

all inboxes | Powered by JetHome®