Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456048

Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion

From Bjorn Andersson <bjorn.andersson@linaro.org>
Newsgroups linux.kernel
Subject Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion
Date 2016-08-04 00:40 +0200
Message-ID <s2cZs-dY-49@gated-at.bofh.it> (permalink)
References (5 earlier) <s1BwS-LI-3@gated-at.bofh.it> <s1BQe-TD-13@gated-at.bofh.it> <s1CMh-1vQ-5@gated-at.bofh.it> <s1Ytr-7PF-5@gated-at.bofh.it> <s273H-4KR-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 03 Aug 08:55 PDT 2016, Luis R. Rodriguez wrote:

> On Wed, Aug 03, 2016 at 08:57:09AM +0200, Daniel Wagner wrote:
> > On 08/02/2016 09:41 AM, Luis R. Rodriguez wrote:
[..]
> > Not sure if I get you here correctly. Is the 'system configurable
> > deterministic file' is a knob which controlled by user space? Or it
> > this something you define at compile time?
> 
> I meant at compile time on the kernel. So CONFIG_READ_READY_SENTINEL
> or something like this, and it be a string, which if set then when
> the kernel read APIs are used, then a new API could be introduced
> that would *only* enable reading through once that sentinel has
> been detected by the kernel to allowed through reads. Doing this
> per mount / target filesystem is rather cumbersome given possible
> overlaps in mounts and also pivot_root() being possible, so instead
> targeting simply the fs/exec.c enum kernel_read_file_id would seem
> more efficient and clean but we would need a decided upon set of
> paths per enum kernel_read_file_id as base (or just one path per
> enum kernel_read_file_id). For number of paths I mean the number
> of target directories to look for the sentinel per enum kernel_read_file_id,
> so for instance for READING_FIRMWARE perhaps just deciding on /lib/firmware/
> would suffice, but if this supported multiple paths another option may be
> for the sentinel to also be looked for in /lib/firmware/updates/,
> /lib/firmware/" UTS_RELEASE -- etc. It would *stop* after finding one
> sentinel on any of these paths.
> 
> If a system has has CONFIG_READ_READY_SENTINEL it would mean an agreed upon
> system configuration has been decided so that at any point in time reads
> against READING_FIRMWARE using a new kernel_read_file_from_path_sentinel()
> (or something like it) would only allow the read to go through once
> the sentinel has been found for READING_FIRMWARE on the agreed upon
> paths.
> 
> The benefit of the sentintel approach is it avoids complexities with
> pivot_root(), and makes the deterministic aspect of the target left
> only to a system-configuration enabled target path / file.
> 

This sounds reasonable, it could be configured to wait for a certain
static file or userspace could generate this file once it reaches some
checkpoint.


Just to provide some additional input to "will rootfs mounted be enough
of a sentinel".

In an Android device you have a initramfs that will read an fstab file
and mount /system that holds most firmware, for some platforms
additional firmware will come from a third partition (in the Qualcomm
case mounted in /persist by the same mechanism).

With the sentinel approach one could configure the system either point
it at a file in the last file system to be mounted or have init generate
a file once its done with this; or in the generic configuration just
wait for /lib/firmware to show up.

I like this approach.

> This is just an idea. I'd like some FS folks to review.
> 

Regards,
Bjorn

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC v0 0/8] Reuse firmware loader helpers Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200
  [RFC v0 8/8] iwl4965: use firmware_stat instead of completion Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200
  [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200
    Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-28 20:40 +0200
      Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-07-28 21:10 +0200
        Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-07-29 08:20 +0200
          Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Arend van Spriel <arend.vanspriel@broadcom.com> - 2016-07-30 14:50 +0200
            Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-07-30 19:00 +0200
              Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-31 09:30 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-08-01 14:40 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-02 00:40 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-08-02 08:00 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-02 08:40 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-08-02 09:00 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-02 10:00 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-08-03 09:10 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-03 18:20 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-03 20:20 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-03 18:50 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-03 20:50 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-04 00:40 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-03 09:50 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Arend van Spriel <arend.vanspriel@broadcom.com> - 2016-08-03 13:50 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-03 17:20 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-03 17:40 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Arend van Spriel <arend.vanspriel@broadcom.com> - 2016-08-03 23:00 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-03 18:10 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-03 19:50 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-03 22:40 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-01 22:20 +0200
              Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-01 19:30 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-08-01 22:20 +0200
                Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of  completion Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-01 23:50 +0200
            Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-31 09:20 +0200
  [RFC v0 2/8] selftests: firmware: do not clutter output Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200
  [RFC v0 6/8] remoteproc: use firmware_stat instead of completion Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200
  [RFC v0 3/8] firmware: Factor out firmware load helpers Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200
    Re: [RFC v0 3/8] firmware: Factor out firmware load helpers Dan Williams <dcbw@redhat.com> - 2016-07-28 17:10 +0200
      Re: [RFC v0 3/8] firmware: Factor out firmware load helpers Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-07-29 08:10 +0200
    Re: [RFC v0 3/8] firmware: Factor out firmware load helpers Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-28 20:00 +0200
      Re: [RFC v0 3/8] firmware: Factor out firmware load helpers Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-07-29 08:10 +0200
  [RFC v0 4/8] Input: goodix: use firmware_stat instead of completion Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200
    Re: [RFC v0 4/8] Input: goodix: use firmware_stat instead of  completion Bastien Nocera <hadess@hadess.net> - 2016-07-28 13:30 +0200
      Re: [RFC v0 4/8] Input: goodix: use firmware_stat instead of  completion Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-07-28 14:10 +0200
        Re: [RFC v0 4/8] Input: goodix: use firmware_stat instead of  completion Bastien Nocera <hadess@hadess.net> - 2016-07-28 14:30 +0200
          Re: [RFC v0 4/8] Input: goodix: use firmware_stat instead of  completion Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-07-28 15:20 +0200
  [RFC v0 1/8] selftests: firmware: do not abort test too early Daniel Wagner <wagi@monom.org> - 2016-07-28 10:00 +0200

csiph-web