Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4515236imb; Wed, 6 Mar 2019 15:38:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwjInhxqvHHSc7kdYagvzjJqdxHlaNlACHmNQVR/HcrUpxgjqWi4e8C+FmB1nfffPQ+3ULi X-Received: by 2002:a17:902:7615:: with SMTP id k21mr9886874pll.152.1551915516765; Wed, 06 Mar 2019 15:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551915516; cv=none; d=google.com; s=arc-20160816; b=iXWcmMEUxo52gzSrvxRCEqp1mqwUBEh3fMqwwtXnV4dFUxQrub394kDdJx8EpON8M5 O7rBbRbgwhtC/udc8xtPVrqwnbrZvEeNhkCE87QErcVIT4D5f6pm5O8LYIrzua9cQPFL 8zs+gmf+Y6wsQrxfZj3THS9UaZkRjKj950U0Rboyl7VKsIrMADnYgOWW29Wti0SubFVP g3V7/CbHcN7wL3izjJ3mBEKYTBWPpfbRkWYsaOi0b8JcA/lO31hwVk+8HPY5XpReSgTx vVTjPN46Fm31ug7niV7xfhSJMDITjlCitAqDHz1NB5EWAHppvRlFII4CR+J7YBEhH1H1 HfMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hyIXuMAw3n37zrTrlY9c88XciPug8WFdBmEA+CderNw=; b=Iml4coL4MQqlZBF6GfQ1BAvFLN52MmvXWwb6MD1ngZfqx6m2j+0+8A0zqp1LWA7gjG x/tzGuw6sYFP/pV4q9qivRiT4RHyR9e9cPXIM7tpHk9QjRrDHVk2AYZamcm1df1kyXuP QeJltMjRm2uGQLBLvxW4KbO9MU3rmuyKqo9V9ozzzX4yvLwC8KHttyzxBXHdivw6Lr3N wysKqWhpUQ7yueo15AOlzVrZgRvmtrqec+7aHVX3nEfP2vcyq2fH0E0asQL4e5xybFoe Cu71FI3PNXXrUgs8rVd7Rj0eSnaq7yEoTnaXa/iXfCRIdQFw4ifboPZo1J5jOSmV3sU1 pLhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=uCsRLqNt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8si2522171pgr.492.2019.03.06.15.38.20; Wed, 06 Mar 2019 15:38:36 -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=@google.com header.s=20161025 header.b=uCsRLqNt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726139AbfCFXiA (ORCPT + 99 others); Wed, 6 Mar 2019 18:38:00 -0500 Received: from mail-ua1-f66.google.com ([209.85.222.66]:36125 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbfCFXiA (ORCPT ); Wed, 6 Mar 2019 18:38:00 -0500 Received: by mail-ua1-f66.google.com with SMTP id e15so9599206uam.3 for ; Wed, 06 Mar 2019 15:37:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hyIXuMAw3n37zrTrlY9c88XciPug8WFdBmEA+CderNw=; b=uCsRLqNtWhXUtsEEK6bPI72H5cWAHlNq//Ib9KikhKPTZRnMNQxED80+ibu/t97NY2 LkLgIFWgDhX6DMwjPx/EbwLNcrBbw/Y/CRPOWOMmyVbotRXh15Q5sZC701Q6vP0FS+NS Re/+nkiMwwwyRkhI+NjU8XCEWVZWRSkTe+m1c1xTue9ndjt8sJSEs5Ylr/71YLZGqTpf YP540IdupWVW1TwCvBbRq9HWRQpkBzCU1twYdBsT1HrE+NXcyHHMM8ZDbnzLa3tculaV Ch2WTW2A15tjaTnC3l92+lrCCD9j+s/DEiwr0kMAMt0ppv4D6FRWptNNPUZwZU40RtM2 uIjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hyIXuMAw3n37zrTrlY9c88XciPug8WFdBmEA+CderNw=; b=hCVtek187j2jW7eb46RT8nx/D+1Q/P+f95h7FnI4U11wIhBVspmUX+dAk7b6/HQg4R 5DVLRJFzlcxavZpe7dCUdwV7aPWGDA/h9pF6/hlsJ/5ItXWnaFf0rKff/97M+k1INrUx 8RMFHPjgY7nTZ3s4lIqjmVdX3VySrXoxduMmY/3hO9b3y7d0C8FUERPFvQrr+aaS7NHj qT2gWBnxJ9K/9rnmhB5yx/1j2eX2+gFMYSn2p5cTnp5bXq+pURPWJSaW3rO3F+sek7DL dfxgTFvQ6fGXgwqAjKLkmCkgq7UuvlHPbX3bHd/mq1wfaFJLlT3FRbf/r/EljsZgFR8e 1czQ== X-Gm-Message-State: APjAAAXyuANsYPNZt9udHe8VSrDWwbI2b6e0vadWNeC9xa32ZVUXVvxn eiEJeSv4UyAW0TcuSqrWZvmoAY6EJF9lBJfQgeVamQ== X-Received: by 2002:a9f:3591:: with SMTP id t17mr5511602uad.11.1551915478236; Wed, 06 Mar 2019 15:37:58 -0800 (PST) MIME-Version: 1.0 References: <20190118225543.86996-1-joel@joelfernandes.org> <20190119082532.GA9004@kroah.com> <20190119162754.GC231277@google.com> <20190119232503.GA149403@google.com> <78AACAF1-8EBF-4DF3-BE94-5B14E78BA791@zytor.com> <20190120155838.GA23827@google.com> <20190306230944.GB7915@amd> In-Reply-To: <20190306230944.GB7915@amd> From: Daniel Colascione Date: Wed, 6 Mar 2019 15:37:46 -0800 Message-ID: Subject: Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel To: Pavel Machek Cc: Joel Fernandes , "H. Peter Anvin" , Greg KH , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 6, 2019 at 3:09 PM Pavel Machek wrote: > > > > > >Ok, I'll look into LZMA. Thanks for checking the compression sizes. > > > > > > > >- Joel > > > > > > Don't use lzma, use xz if you are going to do something. > > > > Ok, sounds good. XZ is a file format for LZMA2. Everyone's right. :-) > > > > > However, it seems unlikely to me that someone not willing to spend the space in the filesystem will spend unswappable kernel memory. > > > > > > It would seem that a far saner way to do this is to use inittmpfs or perhaps an auxiliary "ktmpfs" so it can at least be swapped out if you have swap. > > > > But this is already possible with the proposed solution, you would load the > > module, extract it into a tmpfs, and unload the module. TMPFS pages can > > already be swapped. > > So your licensing requirements prevent you from having headers in the > filesystem, but allow module with the headers hidden inside on the > filesystem? > > Looks like you should just tar xvzf > this-is-a-kernel-module-I-promise.ko /usr/src/linux/include :-). I just don't get the opposition to Joel's work. The rest of the thread already goes into detail about the problems with pure-filesystem solutions, and you and others are just totally ignoring those well-thought-out rationales for the module approach and doing inflooping on "lol just use a tarball". That's not productive. Look; here's the bottom line: without this work, doing certain kinds of system tracing is a nightmare, and with this patch, it Just Works. You're arguing that various tools should do a better job of keeping the filesystem in sync with the kernel. Maybe you're right. But we don't live in a world where they will, because if this coherence were going to happen, it'd work already. But this work solves the problem: by necessity, anything that changes a kernel image *must* update modules coherently, whether the kernel image and module come from the filesystem, network boot, some kind of SQL database, or carrier pigeon. There's nothing wrong with work that very cheaply makes the kernel self-describing (introspection is elegant) and that takes advantage of *existing* kernel tooling infrastructure to transparently do a new thing. You don't have to use this patch if you don't want to. Please stop trying to block it.