From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 9193C7D04D for ; Thu, 11 Apr 2019 16:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726667AbfDKQal (ORCPT ); Thu, 11 Apr 2019 12:30:41 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42759 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbfDKQak (ORCPT ); Thu, 11 Apr 2019 12:30:40 -0400 Received: by mail-pf1-f193.google.com with SMTP id w25so3697637pfi.9 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=rIxvnSCGOKFXnW0oIwsekM045Kjv7VPR9ygh0Db0KuZQ08+l9ZmRlV/hyZYXwDNSEf lyPTrnSC1hQ56tIC4+lUTXzwgNcSSYGa9BQ5rde/JHDfJIKQZCsDgUD2zgDs4SN53OKa DzVvfQx9aRXh882gqbTsPmsfO4ci/lv+fxGholPPwnqhs+r0XXPqU+bIOWZ3Ad8re0tl TD4wXQrY7tCEiBdMalbMy8mMtmgj488LBnDQ1CQ9NiRf+gcKCqO16NwgpkoVnmrJdf5W 6vQ5BnruBqfwCRJbo9hDHMR1HMMdRQzayzCW4nZQC1YsCDbmd/lsUGNPax+lvf8JRrYb Mm2Q== X-Gm-Message-State: APjAAAUnIMmSju0XGpW7iyIW7UfQZs2/VM2lnUKvxUvL56FFhgMO7pzm +tZ3WUncfLFdR6ejdQT+P91Z6A== X-Google-Smtp-Source: APXvYqznku4Y+edVIheLFiiF6i3mDId8Ozb9gEBivSsdoVik00tTyZSUXFIO+ELMlApiyFEVjPbdZQ== 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-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@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