Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5322419imb; Thu, 7 Mar 2019 12:55:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzgol3Yo/0E7R8aXIpkhc9VlAKxpV8in/bwA/BZPAujLknALV/iIXGHeujiPYArCUCvFRga X-Received: by 2002:a17:902:be14:: with SMTP id r20mr14322750pls.327.1551992155650; Thu, 07 Mar 2019 12:55:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551992155; cv=none; d=google.com; s=arc-20160816; b=zef+fq7yueUG1u3+hHcTtCxpODWSwUmpKb1R6wECJfdkxRSELl+yZuMK1DLk0mfpN9 Rozz/r45I7ezGtcdIKmRLDN3wfXjf18uRsp7L68BYO7n1YZGTc36RTRe+DaR1AB4y8zp FTkNfOLxRAmhxv03D8D35gq3Jx2kjFe6/r3olF13Cdgx4b2OYRmfpdnd2hm6tidKTzIk 0sehx7IkpB+4CUhpj1uNcaiL4dqx6wqh2nhrJRvdh7rTKQQZCZ/sW16yNgSLAyYTxLQn 5rtmPmR9BGXt5ZdGSv1u9li4WnBnQYOP2cbnc3kb9kyvqJ9K0sfaazcKn9ZWV0myy6YO A8bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=b4Hom4V3xH7ew8xaXCM4ImW/rfZV1iDyQQ+HDdZ77B4=; b=OpILFyXe6BDLZ+eqJzq4kW7CJlOX2qSC2WJ0PUF+vUIoEjS96fTMzgAtzwPWY6Oe3U O1NYdaWRp2ZrMBZIHJw+dMkK4ZhVf29XLvkn2U+C+G3OZVeT+yM+3gtEqJ5VQyqQ4H48 GQ3cvcc5oPQcAcjILa8/B1UJvDAZjvaIyEaZcKBZ6+f6p/l3HY8JzU1ggXM8piX3Y0mk c031vLqIBzULHtFoOg8PwJWGE8ZPJcPRwTBNIshq/n/eKuiiO+1HW7ISreBxJyiUsqw8 vpjRjGVVMjnOYeSso5LZV0LLlUWEEPICyDMOoPr77gGDgCy3Z7Sd31Lazlh56TBVE+oi XtGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=znI9BTlO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u26si4689924pgn.216.2019.03.07.12.55.40; Thu, 07 Mar 2019 12:55:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=znI9BTlO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbfCGUzJ (ORCPT + 99 others); Thu, 7 Mar 2019 15:55:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:60746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726259AbfCGUzI (ORCPT ); Thu, 7 Mar 2019 15:55:08 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1BE720684; Thu, 7 Mar 2019 20:55:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551992107; bh=Z8ExJUXfOihxLauWUj9aMlmQzss/q/n71+IPpaYmzJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=znI9BTlOoRGBn9f8JaFDuausGFCjHPcefx+jgvBgUPGPZlFz+hNvUVdPHVDpu9fyN owr8HjpcYI1O0UuUWZORmem9xXzT4yMDD0NuRF6GK1hjDJEvgwp0eK8CDQyoKH5TzP YB8Ta3uz+MMbKUcULyL57CzQZxalfixN/p1Nsspk= Date: Thu, 7 Mar 2019 21:55:05 +0100 From: Greg KH To: "Enrico Weigelt, metux IT consult" Cc: Daniel Colascione , "H. Peter Anvin" , Pavel Machek , Joel Fernandes , linux-kernel , Andrew Morton , ast@kernel.org, atish patra , Borislav Petkov , Ingo Molnar , Jan Kara , Jonathan Corbet , Karim Yaghmour , Kees Cook , kernel-team@android.com, "open list:DOCUMENTATION" , Manoj Rao , Masahiro Yamada , Paul McKenney , "Peter Zijlstra (Intel)" , Randy Dunlap , rostedt@goodmis.org, Thomas Gleixner , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , yhs@fb.com Subject: Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel Message-ID: <20190307205505.GB30028@kroah.com> References: <20190119232503.GA149403@google.com> <78AACAF1-8EBF-4DF3-BE94-5B14E78BA791@zytor.com> <20190120155838.GA23827@google.com> <20190306230944.GB7915@amd> <754146f0-8b57-8644-81c1-528b5ca7dba1@zytor.com> <0c46ab5f-8bd6-6916-fc4a-b6f00d456011@metux.net> <5ebec282-57b0-6ebe-0876-ce0dd7b0c11c@metux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5ebec282-57b0-6ebe-0876-ce0dd7b0c11c@metux.net> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 07, 2019 at 09:41:24PM +0100, Enrico Weigelt, metux IT consult wrote: > 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/-/headers.img" > * this image shall be mounted at a canonical mountpoint, eg: > /usr/src/linux-headers-- > * 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. Ick, no, no more squashfs please, let's just kill that mess once and for all :) Again, putting this in a simple compressed tar image allows anyone to do whatever they need to with this. If they want a full filesystem, uncompress it and use it there. If they just want it in-memory where they can uncompress it and then discard it, that works too. And if no one wants this, just don't select the config option and do not load the module with this data in it. Just like /proc/config.gz is today. thanks, greg k-h