linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Daniel Colascione <dancol@google.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Pavel Machek <pavel@ucw.cz>,
	Joel Fernandes <joel@joelfernandes.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	ast@kernel.org, atish patra <atishp04@gmail.com>,
	Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
	Jan Kara <jack@suse.cz>, Jonathan Corbet <corbet@lwn.net>,
	Karim Yaghmour <karim.yaghmour@opersys.com>,
	Kees Cook <keescook@chromium.org>,
	kernel-team@android.com,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Manoj Rao <linux@manojrajarao.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	rostedt@goodmis.org, Thomas Gleixner <tglx@linutronix.de>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<x86@kernel.org>,
	yhs@fb.com
Subject: [RFC] Provide in-kernel headers for making it easy to extend the kernel
Date: Thu, 7 Mar 2019 21:41:24 +0100	[thread overview]
Message-ID: <5ebec282-57b0-6ebe-0876-ce0dd7b0c11c@metux.net> (raw)
In-Reply-To: <CAKOZuevksKGAPif_pUYVzFpbuBCxOZ5WzT6ukLCYm4TzyLUTMw@mail.gmail.com>

On 07.03.19 02:49, Daniel Colascione wrote:

> Entirely FS-less operation is uncommon, granted. :-) I guess I've just
> spent too much time debugging emulators that refuse to mount their> root filesystems. :-)

Fix these emulators ?

> There are legitimate reasons why a device's> filesystems might not be rw-mountable though, and I can imagine a
> world where I want to attach tracing tools *very* early.

Ok, but the filesystem where the modules live is mountable, right ?

> Sure. There's some support for a ramdisk already in fastboot. But just
> including a blob in initrd doesn't *automatically* make it available
> to userspace in any uniform way. With Joel's approach --- which> defines both a propagation mechanism and an access interface --- we

I can define such an interface with a few words:

* the kernel headers lives in a (compressed) squashfs image in the
  module directory for the corresponding kernel version:
      /lib/modules/<version>-<flavour>/headers.img"
* this image shall be mounted at a canonical mountpoint, eg:
      /usr/src/linux-headers-<version>-<flavour>
* the kernel needs to support squashfs (may be module or built-in)

That's it. I don't need to touch a single line of kernel code for that,
just a very simple and small convention.

> have a chance to make very useful tools work transparently everywhere,
> and without additional work across a fragmented and uncoordinated
> ecosystem. 

Why not instead starting to clean up your fragmented and uncoordinated
ecosystem ? :o

> That's not nothing!

It's nothing more that we already have built-in for aeons.

> While I appreciate the purity merits of a file-based approach, insisting 
> on it will lead to a world where it'll be many more years before we can> apply these powerful analysis tools universally.

So, adding a few LOC in Android build machinery for just creating an
archive/squashfs is such a complicated things that takes many years ?

> Human factors are just as important as technical ones,

Human factors like people just not willing to learn the fundamental
basics of the operating they're customizing ?

> ones if you want to actually get anything done, and in this case, a
> consideration of the human factors points toward the kernel as
> coordination point for kernel metadata. 

So, if userland folks are incapable of doing pretty simple things,
put a complex machinery into the kernel ?

> It'd be different if we were
> working in a more-coordinated system NT or FreeBSD, 

Ah, NT. Windows. The platform where everybody rolls his own monstreaus
drivers stacks (eg. several megabytes for trivialities like a CAN
adapter or about a gigabyte for a bunch of adc cards), usually all with
their own private userland api, because the OS vendor just doesn't
manage to provide generic subsystems for common stuff.

The one where applications are usually 10 times bigger and all come
with their own, private installer, just because there's no coordinated
package management and distros.

> but this is Linux,

No, this is *Android* we're talking about.

In GNU/Linux world, the problem you're trying to solve here already
*is* solved since aeons. Entirely in userland.

> where fragmentation starts as soon as you exit ring zero.

Such fragmentation like virtually any device vendor forking it's own
private kernel for each model, doing a huge bunch of pretty crude
hacks and dropping all maintenance as soon as the next model coming
up on the horizon ?

> Practically speaking, the only universal mechanism is to bake something
> into the kernel image or one of its modules.

Aha, and when do we start moving widget toolkits and html renderers
into the kernel ? :o


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

  reply	other threads:[~2019-03-07 20:42 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 22:55 [RFC] Provide in-kernel headers for making it easy to extend the kernel Joel Fernandes
2019-01-19  8:25 ` Greg KH
2019-01-19 16:27   ` Joel Fernandes
2019-01-19 17:43     ` Daniel Colascione
2019-01-19 23:25       ` Joel Fernandes
2019-01-19 23:44         ` hpa
2019-01-20 15:58           ` Joel Fernandes
2019-03-06 23:09             ` Pavel Machek
2019-03-06 23:37               ` Daniel Colascione
2019-03-07  0:07                 ` H. Peter Anvin
2019-03-07  0:33                   ` Daniel Colascione
2019-03-07  1:22                     ` Enrico Weigelt, metux IT consult
2019-03-07  1:49                       ` Daniel Colascione
2019-03-07 20:41                         ` Enrico Weigelt, metux IT consult [this message]
2019-03-07 20:55                           ` Greg KH
2019-03-07 22:11                             ` Enrico Weigelt, metux IT consult
2019-03-07 23:12                               ` Joel Fernandes
2019-03-07 23:40                                 ` hpa
2019-03-08  3:16                                   ` Joel Fernandes
2019-03-07  1:42                   ` Joel Fernandes
2019-03-07 16:24                     ` Enrico Weigelt, metux IT consult
2019-03-07  0:32                 ` H. Peter Anvin
2019-03-07  0:36                   ` Daniel Colascione
2019-03-07  0:42               ` Enrico Weigelt, metux IT consult
2019-03-07  1:48                 ` Joel Fernandes
2019-03-07 17:37                   ` Enrico Weigelt, metux IT consult
2019-01-19  8:26 ` Greg KH
2019-01-19 16:27   ` Joel Fernandes
2019-01-19 10:28 ` Christoph Hellwig
2019-01-19 10:36   ` Greg KH
2019-01-19 16:26     ` Joel Fernandes
2019-01-20  7:01     ` hpa
2019-01-20 16:10       ` Joel Fernandes
2019-01-20 21:58         ` hpa
2019-01-21  1:45           ` Joel Fernandes
2019-01-21  2:49             ` hpa
2019-01-21  4:38               ` Sandeep Patil
2019-01-22 13:39               ` Joel Fernandes
2019-01-23 21:29                 ` Karim Yaghmour
2019-01-23 22:37                   ` Daniel Colascione
2019-01-24  2:32                     ` Joel Fernandes
2019-01-24 14:18                       ` Joel Fernandes
2019-01-24 18:57                     ` Karim Yaghmour
2019-01-24 20:59                       ` Joel Fernandes
2019-01-25 19:00                         ` hpa
2019-01-25 19:15                           ` Daniel Colascione
2019-01-25 19:51                             ` hpa
2019-01-25 20:34                               ` Daniel Colascione
2019-01-25 20:46                                 ` Joel Fernandes
2019-01-25 20:28                           ` Joel Fernandes
2019-03-06 23:09 ` Pavel Machek
2019-03-06 23:35   ` H. Peter Anvin
2019-01-26 12:05 Norbert Lange

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=5ebec282-57b0-6ebe-0876-ce0dd7b0c11c@metux.net \
    --to=lkml@metux.net \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=atishp04@gmail.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dancol@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jack@suse.cz \
    --cc=joel@joelfernandes.org \
    --cc=karim.yaghmour@opersys.com \
    --cc=keescook@chromium.org \
    --cc=kernel-team@android.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@manojrajarao.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    --cc=yhs@fb.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).