Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3247625yba; Mon, 8 Apr 2019 14:30:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI8WvI+X4zdKXlGtGslb476mBYYjGSrczSgRHgFO6IXoy7Y7D18rHWvlMTm2Hm6LpBuOjX X-Received: by 2002:a17:902:bb8f:: with SMTP id m15mr32623353pls.247.1554759024605; Mon, 08 Apr 2019 14:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554759024; cv=none; d=google.com; s=arc-20160816; b=iD7qZedfJXQgeyttODMpT2w1Uw8EilGJya+Bj7prcGuBqsThRdpWd+ALl07gur13gN oglFjDT1cL+6a6gNQ30XIHEqojWTLEQnwCLpqOXdsJ95mlYr+w6yAZ7W5xB5Xz50aaXG zuzI10wbuAsfrgwAfWzGdaqflNBvdMDHvMp+cKM63iTavJAV8eBAg33wvX7cccnRzWFE eqJuL3CpiZJwWZtu9hVN/Z6CFHtsz2CYoraV0IV2Bl+KedPxplvEtdT7xluCic34N90S Fc8xOQyB9pLVb0nTokenfpKn7YS+mH23+X8ls+HUxiexf5CA2te6hBdP57ce+Cdslm91 dtpw== 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:dkim-signature; bh=N14AhTxvpgKm7opomcskbJu240RmijliAlq/LQco5+M=; b=G7IhakPqhGofcOPeK/hEDoiRg9iTu1+iUjFVAV/aeDPPEMEhlP/+kmXQ6mXRUXXWnF t5o4gI8rLq8Zdc3eRb63I9Ijz9lVOypf+TP+2CSDb78UpBK354aoShz6CmzpnzfgGrhc gpNUca+5qkMrIKNkpWycMmwWx4iY1fSsMgDvS5bUx0TrGyjs+DTPj3A0Qnkxej47NM0v KehyE9/Ohw//12TkJGyfWfPx3CPm1kFKSHrl2n6yHQM/yQvGPvqPHDBe+Q/oPs0Bwihg m9z0SdrWXlAYOZ3dlqySDU3cvGhGazN9lEDoynNgSQ+teO5C/8RahbU+HKSF59rnv1dv 4DaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@opersys-com.20150623.gappssmtp.com header.s=20150623 header.b=xohJxEgQ; 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 j187si11021873pge.507.2019.04.08.14.30.09; Mon, 08 Apr 2019 14:30:24 -0700 (PDT) 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=@opersys-com.20150623.gappssmtp.com header.s=20150623 header.b=xohJxEgQ; 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 S1729051AbfDHUwX (ORCPT + 99 others); Mon, 8 Apr 2019 16:52:23 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:36077 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728810AbfDHUwW (ORCPT ); Mon, 8 Apr 2019 16:52:22 -0400 Received: by mail-qt1-f194.google.com with SMTP id s15so8873090qtn.3 for ; Mon, 08 Apr 2019 13:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=opersys-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=N14AhTxvpgKm7opomcskbJu240RmijliAlq/LQco5+M=; b=xohJxEgQh56evQpZH9Z6Tr+8QD+X5zrtlnIpIL9wkHOz6ED9WckyqKL8bWEMIij7vz pTJFeWpL6VCtzy8kQ/uDyaQfjPuRRNB9JszLtqNV3x3Aa656vEN2pkp8EHCYsiSVgSnb 2MW6pWT0B53lHpJ8iuGR9cqcqU+KlZFjX2+oI+A0SOowjDzqZ66Yzq706777JXsD8inI HQtTAqzF7NPtDGcUxSKfXy2Ip7WDu2S9vXC9YfQCr0k/GypSp//U78KY/ez0O+wG6ay6 dI2DZ5ePyXQxAgf+htbcEDSE6QiQo7b+4kyaJLrvCJOZ6if7FAxgXtvL48xhpxpK2ikD JA2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=N14AhTxvpgKm7opomcskbJu240RmijliAlq/LQco5+M=; b=LN65R7rrNU2A9ghX4BSapddzMOyd0laiLPgbfDfbBLznMKNZ3kPlwt/c29k2qaWIlS gBC8ngEsUE9jMFIHjnZ7owHvQFVFllXJPS29cO8E4ab8oGcxPF6lo1GAiSMKn+n96pSQ udAbN0W7eOvP9pt2cBmwsHoP3jF0ThyG9aCaQOAPQWuif8413QEmgOVMNoWoNAug6tsN 32vkUJ26lPiIZ3y45aXzQap0c2HNNCpvg+CJAhxVYAP2KH3DjYkvtwJdOlao7SSfgIwB jucTOxNAoLwVLaFYEJ/YTgY+N4vYZCf86qykc6VXBKQuJkURs8vdhFHuSEB8FtjGbsv/ 78EA== X-Gm-Message-State: APjAAAUEiJg4JgENrTlxXOc8sDhwfOww4rl3nsJR5lbRGHQVnUJEWxKW CUt0jLHRsCeAyM0pIwe37A0RPA== X-Received: by 2002:a0c:b15c:: with SMTP id r28mr25509887qvc.122.1554756741316; Mon, 08 Apr 2019 13:52:21 -0700 (PDT) Received: from [192.168.202.103] (modemcable170.15-70-69.static.videotron.ca. [69.70.15.170]) by smtp.googlemail.com with ESMTPSA id f47sm22032237qta.80.2019.04.08.13.52.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 13:52:19 -0700 (PDT) Subject: Re: [PATCH v5 1/3] Provide in-kernel headers to make extending kernel easier To: Olof Johansson , joel@joelfernandes.org Cc: Linux Kernel Mailing List , qais.yousef@arm.com, dietmar.eggemann@arm.com, linux@manojrajarao.com, Andrew Morton , ast@kernel.org, atishp04@gmail.com, dancol@google.com, Dan Williams , Greg Kroah-Hartman , Guenter Roeck , Jonathan Corbet , Kees Cook , kernel-team@android.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-trace-devel@vger.kernel.org, Masahiro Yamada , mhiramat@kernel.org, Randy Dunlap , Steven Rostedt , Shuah Khan , yhs@fb.com References: <20190320163116.39275-1-joel@joelfernandes.org> From: Karim Yaghmour Message-ID: <79b6bdbc-890a-5a51-7fa1-aec57889046a@opersys.com> Date: Mon, 8 Apr 2019 16:52:18 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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 Hi Olof, On 4/8/19 12:29 PM, Olof Johansson wrote: > Sorry to be late at the party with this kind of feedback, but I find > the whole ".tar.gz in procfs" to be an awkward solution, especially if > there's expected to be userspace tooling that depends on this > long-term. > > Wouldn't it be more convenient to provide it in a standardized format > such that you won't have to take an additional step, and always have > it in a known location? > > Something like: > > - Pseudo-filesystem, that can just be mounted under > /sys/kernel/headers or something (similar to debugfs or > /proc/device-tree). > - Exporting something like a squashfs image instead, allowing > loopback mounting of it (or by providing a pseudo-/dev entry for it), > again allowing direct export of the contents and avoiding the > extracted directory from being out of sync with currently running > kernel. > > Having to copy and extract the tarball is the most awkward step, IMHO. > I also find the waste of kernel memory for it to be an issue, but > given that it can be built as a module I guess that's the obvious > solution for those who care about memory consumption. One of the things I pointed out earlier in the thread is that /proc/config.gz has already set a precedent as to the interface for this sort of artifact. It's a plain compressed file and it's directly accessible from toplevel /proc. From a consistency perspective there's an idiomatic angle to some sort of "/proc/kheaders.gz". In some offline discussions I was also told that squashfs (I'm no expert of it) required special user-space tools and had some security issues. Cheers, -- Karim Yaghmour CEO - Opersys inc. / www.opersys.com http://twitter.com/karimyaghmour