lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190208025555.4027769-1-andriin@fb.com>
Date:   Thu, 7 Feb 2019 18:55:51 -0800
From:   Andrii Nakryiko <andriin@...com>
To:     <alexei.starovoitov@...il.com>, <andrii.nakryiko@...il.com>,
        <songliubraving@...com>, <yhs@...com>, <ast@...com>,
        <kafai@...com>, <netdev@...r.kernel.org>, <kernel-team@...com>,
        <daniel@...earbox.net>
CC:     Andrii Nakryiko <andriin@...com>
Subject: [PATCH v3 bpf-next 0/4] tools/btf: extend libbpf APIs to work with btf w/o kernel

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.

v2->v3:
- const void* variants of btf__get_raw_data()
- added btf_ext__get_raw_data()
- removed btf__get_strings() and adapated test_btf.c to use btf__get_raw_data()

v1->v2:
- btf_load() returns just error, not fd
- fix ordering in libbpf.map

Andrii Nakryiko (4):
  btf: separate btf creation and loading
  btf: expose API to work with raw btf data
  btf: expose API to work with raw btf_ext data
  tools/bpf: remove btf__get_strings superseded() by raw data API

 tools/lib/bpf/btf.c                    | 145 +++++++++++++------------
 tools/lib/bpf/btf.h                    |   6 +-
 tools/lib/bpf/libbpf.c                 |   2 +-
 tools/lib/bpf/libbpf.map               |   3 +
 tools/testing/selftests/bpf/test_btf.c |  39 ++++---
 5 files changed, 110 insertions(+), 85 deletions(-)

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ