From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E233CC169C4 for ; Fri, 8 Feb 2019 20:08:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B11F5218D2 for ; Fri, 8 Feb 2019 20:08:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Znq0oiSN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727520AbfBHUIb (ORCPT ); Fri, 8 Feb 2019 15:08:31 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33395 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbfBHUIb (ORCPT ); Fri, 8 Feb 2019 15:08:31 -0500 Received: by mail-pg1-f194.google.com with SMTP id z11so2061800pgu.0 for ; Fri, 08 Feb 2019 12:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vmw2S1ml6rsHqy+IlvsiQlc+dZ532kr7qpeZ6X1RSEE=; b=Znq0oiSNvLKA1KS0YoVoGuFGMPwNsmrzlZnpYMYm4giOOrhOfkO8xshIQhX4zZ+e47 SCR4Iv+axIf9sVhlFwh0ayVee3fKb619+SQ80u8ealzcFytxGGHtlST1DgDFLuFX46p/ AzaSZTkbIoJ/Y/MMP8ES7XBWU2hBptkyS35cY40gQCpC5FdlgqrOnZW6KNFyEh4PmYv4 3K6gQjK57Mel3Q7fM1YWBNJt2WKEWVvgQusvcRh3Y+aBBVrEzx/HxL8HA2DEdLgQfS0T Pty5qpJc8TxRyqmvsb3G2utM91bjOvoI0S14hc6ZBywmjnOG3qoTIkGFfv3dDLe2fg6Q qxpw== 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=vmw2S1ml6rsHqy+IlvsiQlc+dZ532kr7qpeZ6X1RSEE=; b=d+fjdzNKvxSR8s4hB2VJlo2FmauqLDwZM59N8glppgdSMnDMzDwp6GukdRoIyhYFRQ +QT8DXabkiTNRB9HETowvGy9S2O9j4DtCbcpiB5D3PIkjfwx7HXgtKSSB3ID3Pov7Fsk KdPEHZ8HrMa4HkzSH/Zlb6NAHLd0yVAUzAZ0aB3JiQT9AwTtBHNIVQf5n06Qtt1UOfy5 tzmLWCdGHSp/GithMiMZfqiQ31H1fHEeb+E1sFUtSQaVdMiSfynTxxImp80HIrB+0T4N bw2PKHsJ4VFSmMqcsTmuSoKm0f91QVKPdg0onwzqsN3OCvu8x8rpIDvAn7yknHdqSKx1 gA6g== X-Gm-Message-State: AHQUAubXUsHZ5rx7rEhll0pAdBYPyOcz74PNSXwgtkCL59bu7nHz2JRP E6NemgPeR0QLQsvqloKC6qk= X-Google-Smtp-Source: AHgI3IYNewY6I8fppXyLgSRV5tsIwH6HvmD+TkxWb5lNY4i5w0l5l8lnDkBDpmd7T64mVF9ZrETvtw== X-Received: by 2002:a63:6604:: with SMTP id a4mr22089612pgc.118.1549656510023; Fri, 08 Feb 2019 12:08:30 -0800 (PST) Received: from ast-mbp ([2620:10d:c090:180::1:8eb5]) by smtp.gmail.com with ESMTPSA id d11sm3279421pgi.25.2019.02.08.12.08.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 12:08:28 -0800 (PST) Date: Fri, 8 Feb 2019 12:08:26 -0800 From: Alexei Starovoitov To: Andrii Nakryiko Cc: andrii.nakryiko@gmail.com, songliubraving@fb.com, yhs@fb.com, ast@fb.com, kafai@fb.com, netdev@vger.kernel.org, kernel-team@fb.com, daniel@iogearbox.net, acme@kernel.org Subject: Re: [PATCH v4 bpf-next 0/4] tools/btf: extend libbpf APIs to work with btf w/o kernel Message-ID: <20190208200824.5ov7mrjzndityzdk@ast-mbp> References: <20190208191939.3105592-1-andriin@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208191939.3105592-1-andriin@fb.com> User-Agent: NeoMutt/20180223 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Feb 08, 2019 at 11:19:35AM -0800, Andrii Nakryiko wrote: > This patchset introduces a set of new APIs that make it possible to work with BTF > more effectively (and without involving kernel) for applications like pahole that > need to manipulate .BTF and .BTF.ext data. > > Patch #1 changes existing btf__new() API call to only load and initialize > struct btf, while exposing new btf__load() API to attempt to load and validate > BTF in kernel. > > Patch #2 adds btf__get_raw_data() API allowing to get access to raw BTF data from > struct btf. > > Patch #3 adds similar btf_ext__get_raw_data() API for working with struct btf_ext. > > Patch #4 removes not-yet-stable btf__get_strings() API which was added to be able > to test contents of struct btf for btf__dedup(). It's now superseded by raw APIs. > > v3->v4: > - formatting fixes > - renamed btf_ext functions/structs to use "setup" language instead of "copy" > - removed btf__get_strings from libbpf.map > > v2->v3: > - const void* variants of btf__get_raw_data() > - added btf_ext__get_raw_data() > - removed btf__get_strings() and adapted test_btf.c to use btf__get_raw_data() > > v1->v2: > - btf_load() returns just error, not fd > - fix ordering in libbpf.map Applied, Thanks