Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4945826imu; Sat, 19 Jan 2019 23:38:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN68sckpM1OrSczNFes9WJuzTSm7ZG2A5oGT+yTRlvLP86fE3J07vXGrl+/sMyJZxqMWPC8L X-Received: by 2002:a63:9306:: with SMTP id b6mr23046246pge.36.1547969928916; Sat, 19 Jan 2019 23:38:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547969928; cv=none; d=google.com; s=arc-20160816; b=B8nelG8y3mSBZfyjbrCK9qf5rF0hr7Otbg+Kh1reMgXPRxcOv8EoeyOdRxzpIN2LRm PNDipgUM8pySphts/L7AI9H54uYxIP5/8/WVJDERR6TJsylnAd4/Rb2bTgRbvk0UByjY WpR2NhMqIxrzUWZur0THVkSycYDmmlH5xofldpe8r/Lyukx9smoxQxDed1sa0RNhx7xD NuusNov522O2FHmJ+6rroVivWLlAd8w3KcFrH5THjuWqfA0PVeN2Z2i5ARlWFVSPs1TU AnPFoEt8wtSeVhyD4T1o4SErZahxPRZsZFDYn0rQ5/HdDd5Cd+NvNw3x4QD4tmmnowoi 6C6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=7KX9O+v1mU5mUJq2/bw1KkRec5eox/cCgI6mV8MPYxM=; b=scZFPnAVCxmqvsczTADBuAxDKV959E+O+q9lwEq9htE1D2lK+tXkSLsh+kMvaCLIAs sGcIam9wiOw9sDlhnPIwI/DEIAL2LvS8Zj5TE7hU0Ezpi7b9krvdjNljFx7wq15/t3tK 7mUVU1Pg2sSnBwY/R/X83UdVu3QuvcfCO6bvbm6rKpx6oA2UGd9SiSym0CGEC5fOVl3P 7COZXMmJxtlxsstr88nYDEd+JB9WobvX5N1oQPIcs4H69mGdrgVclcCr05kRplJylcym 7KCtV+SRsu4TYrV5DKKURPtvUX1Rjch95sMmDx92+sOpppYjMgzdBjHw+dd+zv8zWuWK cI8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 q18si3589779pls.30.2019.01.19.23.38.03; Sat, 19 Jan 2019 23:38:48 -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; 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 S1728852AbfATHCi convert rfc822-to-8bit (ORCPT + 99 others); Sun, 20 Jan 2019 02:02:38 -0500 Received: from terminus.zytor.com ([198.137.202.136]:57191 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfATHCi (ORCPT ); Sun, 20 Jan 2019 02:02:38 -0500 Received: from wld62.hos.anvin.org (c-24-5-245-234.hsd1.ca.comcast.net [24.5.245.234] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id x0K71LVK1953801 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 19 Jan 2019 23:01:21 -0800 Date: Sat, 19 Jan 2019 23:01:13 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <20190119103606.GA17400@kroah.com> References: <20190118225543.86996-1-joel@joelfernandes.org> <20190119102800.GB17723@infradead.org> <20190119103606.GA17400@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel To: Greg KH , Christoph Hellwig CC: Joel Fernandes , linux-kernel@vger.kernel.org, Andrew Morton , ast@kernel.org, atishp04@gmail.com, Borislav Petkov , dancol@google.com, Ingo Molnar , Jan Kara , Jonathan Corbet , karim.yaghmour@opersys.com, Kees Cook , kernel-team@android.com, linux-doc@vger.kernel.org, Manoj Rao , Masahiro Yamada , paulmck@linux.vnet.ibm.com, "Peter Zijlstra (Intel)" , rdunlap@infradead.org, rostedt@goodmis.org, Thomas Gleixner , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , yhs@fb.com From: hpa@zytor.com Message-ID: <8BD4CB7A-944C-4EC5-A198-1D85C9EE28D6@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On January 19, 2019 2:36:06 AM PST, Greg KH wrote: >On Sat, Jan 19, 2019 at 02:28:00AM -0800, Christoph Hellwig wrote: >> This seems like a pretty horrible idea and waste of kernel memory. > >It's only a waste if you want it to be a waste, i.e. if you load the >kernel module. > >This really isn't any different from how /proc/config.gz works. > >> Just add support to kbuild to store a compressed archive in initramfs >> and unpack it in the right place. > >I think the issue is that some devices do not use initramfs, or switch >away from it after init happens or something like that. Joel has all >of >the looney details that he can provide. > >thanks, > >greg k-h Yeah, well... but it is kind of a losing game... the more in-kernel stuff there is the less smiley are things to actually be supported. Modularizing is it in some ways even crazier in the sense that at that point you are relying on the filesystem containing the module, which has to be loaded into the kernel by a root user. One could even wonder if a better way to do this would be to have "make modules_install" park an archive file – or even a directory as opposed to a symlink – with this stuff in /lib/modules. We could even provide a tmpfs shim which autoloads such an archive via the firmware loader; this might even be generically useful, who knows. Note also that initramfs contents can be built into the kernel. Extracting such content into a single-instance tmpfs would again be a possibility. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.