Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5979636yba; Thu, 11 Apr 2019 09:31:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoXCS8vU2tI1JXK9bsJ9VViIoHxeohGI71CBDoiXGNzeduo4n5ti0uBWUb/PCRfPgCWo9O X-Received: by 2002:aa7:82d6:: with SMTP id f22mr50953325pfn.190.1555000291924; Thu, 11 Apr 2019 09:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555000291; cv=none; d=google.com; s=arc-20160816; b=ypkb6dx88gPIgZS2eoqdFc8lv8J4Pc2Drop4iwHTkl1Q8NSyvYBe5zysA5Ag/6W+Fi eROTBo5MEHo31wZMkNf1AbIW6ddxOqT60RwexZKh9aMjXYF4ig/c4imwhm2198jEf6pR DLStK8d3AqO9qwD2lWOE17IXkD+TkE/FcoLepL/llaVX6b3r/LRDDNKaMhSFidzp+aIO TS98oQVfuLoiGKwsU7FogoF9UcNmZKcMbQYTmbIZXUenn9LaWIBFyFD08SfuD4FU7hgP gdzZwT7kMT9wzUF5yAYRdI+9SZ73YhFknCZG3QeHlWjUlRfa7L6NcoEW/I5z1o5rfC3Y 2nTA== 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=yz6p7JxlGvdeQQLGjhJ9bVaviFTo9O5jKlmLBrtPSxc=; b=b+hQhgEeJQ0bidm9RGHX8Fi6JWqT6nnjJXRCtO/To/6m0KIDnzlCFHjQmaw2JtMnfT i1PKGlRow1ccmBrYcB/62FqatNJ7d4IY201V45NFItN2guqwzkS7lWSRRjqj3fC3+grw CLPgX5gnbji7Q8uwWh+Rt4dRLeTIyCIMrsBbU2ECgoALhas8M/DW+biZ9aciCUbRcWMA TNrpaab3ETOJa1VdCnEleSs2n8eyt7s+wLt329h1wnzFkTAokuNx/qGlbExNMoy/Bf11 DdI7imAQhp7c9xBjewMeENahuQraKrXxIyNvjriP+ixEZmahYrNiMbAUmvZm0igPzvfn FrVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=ciY2xhZB; 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 b128si4102614pfb.141.2019.04.11.09.31.15; Thu, 11 Apr 2019 09:31:31 -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=@joelfernandes.org header.s=google header.b=ciY2xhZB; 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 S1726794AbfDKQal (ORCPT + 99 others); Thu, 11 Apr 2019 12:30:41 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:46288 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbfDKQak (ORCPT ); Thu, 11 Apr 2019 12:30:40 -0400 Received: by mail-pf1-f193.google.com with SMTP id 9so3681655pfj.13 for ; Thu, 11 Apr 2019 09:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yz6p7JxlGvdeQQLGjhJ9bVaviFTo9O5jKlmLBrtPSxc=; b=ciY2xhZBqrGVRamWEdyXZm+HVDPPv1+F+OLeHjR7pw4dh1Z2uCIqi7kX9QZ2Nw2fSe 3ICSpeJP/1tWvICZXWQjFcCvyAiDNg/RWPWz1whH81jzBceC9pLheMqVAmvugn81KSKm 4FTMZrgv8NDSEen6g28eGD9Axz7uKBQR2aoSA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yz6p7JxlGvdeQQLGjhJ9bVaviFTo9O5jKlmLBrtPSxc=; b=O7DXKjQr+LmoOhBwV4ny63gLwUTuevmbcAqK84TzsR3/C3YJ13wUZtCx2wPS1BMuHS n21aDFCzPFJErL2kkEIxfU6E4DF5El5/UG/q/fOf/GVuHJ3UwaVNQy1P4Q6l4/aztZFx EwijsPNncumgrZgiKJwB3c0mV9Plhg4LLgv2ZItD41w3emtrqskQANf8R2uK12sh599V nvVi5/AHyLc8Eo1IO3BnTzPOy4X71KZgimwGoCXqValsyRRt5BOIaa4+wpbSZ3HyrpZ+ ytV8kLrq5GpT49bZ11k1Xo5R8zPZos294NL7VUopmnC+IWLOpnrGNekfZAhX5ZkUREXt 1uyA== X-Gm-Message-State: APjAAAWKt8ypUX49PwbP3uBVZvKepjv9DTvftJUJFCATlfn7lw0EEc5h RLqHguNODpyG75E5CuakWhB+iA== X-Received: by 2002:aa7:82d6:: with SMTP id f22mr50947455pfn.190.1555000239933; Thu, 11 Apr 2019 09:30:39 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id h20sm52286114pfj.40.2019.04.11.09.30.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2019 09:30:38 -0700 (PDT) Date: Thu, 11 Apr 2019 12:30:37 -0400 From: Joel Fernandes To: Alexei Starovoitov Cc: Olof Johansson , Linux Kernel Mailing List , Qais Yousef , Dietmar Eggemann , Manoj Rao , Andrew Morton , Alexei Starovoitov , atish patra , Daniel Colascione , Dan Williams , Greg Kroah-Hartman , Guenter Roeck , Jonathan Corbet , Karim Yaghmour , Kees Cook , Android Kernel Team , "open list:DOCUMENTATION" , "open list:KERNEL SELFTEST FRAMEWORK" , linux-trace-devel@vger.kernel.org, Masahiro Yamada , Masami Hiramatsu , Randy Dunlap , Steven Rostedt , Shuah Khan , Yonghong Song Subject: Re: [PATCH v5 1/3] Provide in-kernel headers to make extending kernel easier Message-ID: <20190411163037.GA5786@google.com> References: <20190320163116.39275-1-joel@joelfernandes.org> <20190408203601.GF133872@google.com> <20190411031540.ehezr6kq7ouobpzx@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190411031540.ehezr6kq7ouobpzx@ast-mbp.dhcp.thefacebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2019 at 08:15:42PM -0700, Alexei Starovoitov wrote: > On Wed, Apr 10, 2019 at 09:34:49AM -0700, Olof Johansson wrote: > > On Wed, Apr 10, 2019 at 8:51 AM Joel Fernandes wrote: > > > > > > On Wed, Apr 10, 2019 at 11:07 AM Olof Johansson wrote: > > > [snip] > > > > > > 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 > > > > > > This is that form IMO. > ... > > Compared to: > > - Extract tarball > > - Build and load > > - Remove file tree from filesystem > > I think there are too many assumptions in this thread in regard to what > is more convenient for user space. > I think bcc should try to avoid extracting tarball into file system. > For example libbcc can uncompress kheader.tar.xz into virtual file system > of clang front-end. It's more or less std::map > with key=path, value=content of the file. Access to such in-memory > 'files' is obviously faster than doing open/read syscalls. > bcc already uses this approach for some bcc internal 'files' that > it passes to clang during compilation. > All of /proc/kheaders.tar.xz files can be passed the same way > without extracting them into real file system. > > Joel, would be great if you can share corresponding bcc patch > that takes advantage of /proc/kheaders That sounds good to me. Others have tested this with BCC with a manual extraction and setting environment variable to point BCC to the extracted location, but I can work BCC patch that makes this automatic and share it (I was planning to do the "automatically make BCC do it" patch for the BCC project, but first wanted this in. But I agree with Alexei, its a good idea to do it now and share it). Masahiro had some nits in v6 that I need to address anyway ;-) And Olof grumbled a bit about the commit message which could be polished a bit more :-) thanks! - Joel