Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4514419imb; Wed, 6 Mar 2019 15:37:02 -0800 (PST) X-Google-Smtp-Source: APXvYqyLhI97CY7DKHd/jecgP/PgL7lheq7B2lyYHsbjGR515Ya60iGT3D6CC5v/lQ58hhATXVTj X-Received: by 2002:a65:6099:: with SMTP id t25mr8355791pgu.223.1551915421970; Wed, 06 Mar 2019 15:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551915421; cv=none; d=google.com; s=arc-20160816; b=iUAv1IfwH63/Eafm3vQCUZZfqq6Lvh253mgDu0nniNE6Ux7bHs/Jk8a7xW+8NKGoYR KqMTkBc/EiCZIFZmuzkVWJ0SAs1yp/XsD77M4iGuhdSBEjMhnZTy0jRDO53RTJR11URP NQfxDDPq6NQ5+dDJRSDoRGbdYr2bLYGlNO7qBiBitqYTmGcdKSGZHmHC90lfNWHwUKyR i9jAkR/OKX1xGpu5EAmaL45sQDFfwN+1S9Lq6wfynpz15JV8OgQ0iP52FKMNL1Cvi5SS +mF8HSj447TifeQc2B4ezEA+Jr0SjLKjSgFDc2HpUTU1TpM6qicDrlhq1AJbnYqa/H47 foHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=PXb5v+DqzpU1y9Tc64QMuRXIgmbjFMIIqD0P/Uv75NI=; b=iIMQGgKBySkqpKLhHQeG9D7rAqF+eCM4QJDpL592BRffXl6qAA5Ib1m0nwhnVkZyKv +NTpv3kPaY9InlteBAG7UM8Ibj1y5Oi5LWq8BnTFEdeYQoPN0MEoh8jHkx0PHuXAJGDZ oMnM8/j3mHGJ43Um5XaGbhwe3dJtzf5Yk7JLXfLjka0fBlxkQGaN8D9lJ6O6mvN3/hd6 CG+/C4w89HDxatV1sKY7Cw0NldZl19K5IJ5bA/1CBEzMS+Fmtu8I69S04WfxVv2D/bBe tWJoCNj/BVsBB87Fph1I9An2467+E9JTeazLuxEOrOjmvbE2oAWhpvgAtfaLa/rh6YHQ SnUA== 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 62si2647139plf.154.2019.03.06.15.36.44; Wed, 06 Mar 2019 15:37:01 -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 S1726128AbfCFXgY (ORCPT + 99 others); Wed, 6 Mar 2019 18:36:24 -0500 Received: from terminus.zytor.com ([198.137.202.136]:47525 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfCFXgX (ORCPT ); Wed, 6 Mar 2019 18:36:23 -0500 Received: from hanvin-mobl2.amr.corp.intel.com (jfdmzpr04-ext.jf.intel.com [134.134.139.73]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id x26NZ67O1932541 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Wed, 6 Mar 2019 15:35:07 -0800 Subject: Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel To: Pavel Machek , Joel Fernandes Cc: linux-kernel@vger.kernel.org, Andrew Morton , ast@kernel.org, atishp04@gmail.com, Borislav Petkov , dancol@google.com, gregkh@linuxfoundation.org, 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 References: <20190118225543.86996-1-joel@joelfernandes.org> <20190306230934.GA7915@amd> From: "H. Peter Anvin" Message-ID: <3ada6062-d9f1-867e-828b-2796fb8d0a66@zytor.com> Date: Wed, 6 Mar 2019 15:35:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190306230934.GA7915@amd> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/6/19 3:09 PM, Pavel Machek wrote: > On Fri 2019-01-18 17:55:43, Joel Fernandes wrote: >> From: "Joel Fernandes (Google)" >> >> Introduce in-kernel headers and other artifacts which are made available >> as an archive through proc (/proc/kheaders.tgz file). This archive makes >> it possible to build kernel modules, run eBPF programs, and other >> tracing programs that need to extend the kernel for tracing purposes >> without any dependency on the file system having headers and build >> artifacts. >> >> On Android and embedded systems, it is common to switch kernels but not >> have kernel headers available on the file system. Raw kernel headers >> also cannot be copied into the filesystem like they can be on other >> distros, due to licensing and other issues. There's no linux-headers > > If your licensing prevents you from having headers on the > filesystem... then I guess you should fix the licensing. > > I agree with Christoph, this looks pretty horrible. > Pavel > The argument that "it can be a module" is basically an admission of failure - if it isn't part of the kernel image itself there is no benefit over where the modules are stored, which will be *somewhere* in the filesystem. What I *do* think makes sense is to create an archive with this information and stuff it in the same place as the modules. It reduces the amount it is possible to muck it up. -hpa