From: Giuliano Procida <gprocida@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com,
maennich@google.com, teguiani@android.com
Subject: [PATCH 0/6] BTF ABI
Date: Fri, 11 Jun 2021 16:33:13 +0100 [thread overview]
Message-ID: <20210611153319.778996-1-gprocida@google.com> (raw)
Hi.
This code was developed by Maria Teguiani who interned with Android
last summer and later by me.
BTF is the BPF type format.
See: https://www.kernel.org/doc/html/latest/bpf/btf.html
The Linux kernel can be compiled with BTF type information. Together
with the kernel and ELF symtabs, it can be used to as an alternative
basis for kernel ABI monitoring.
BTF has several limitations compared with libabigail ABI XML.
Foremost, it supports C types only. There are also some other
significant issues that may be resolved with time. The simplicity of
BTF makes it an ideal vehicle for experimentation.
An ELF object file containing DWARF debug information can be augmented
with BTF debug information using pahole -J. pahole is part of dwarves.
These patches contribute:
- a BTF parser / BTF graph builder
- code to dump BTF information as it is parsed
- a BTF graph difference algorithm to generate graphs of differences
- a C type name generator
- code to serialise a difference graph as a text report
The graph difference algorithm uses a strongly-connected component
finder based on the path-based SCC algorithm. My main contribution
here was the design which allows the BTF graph difference algorithm to
be written in a straightforward recursive style.
Missing from these patches are:
- Some documentation I wrote in markdown format.
- A suite of small tests, of which the C language ones have been used to
validate the BTF utilities.
I hope this work will be useful to anyone wishing to experiment with
BTF as an ABI representation or who has an interest in graph diff
algorithms.
Feedback is very welcome.
Regards,
Giuliano.
Giuliano Procida (6):
Tweak clang-format
Allow C++17 code to be compiled
BTF: add SCC finder and test
BTF: add core functionality
BTF: add btfinfo and btfdiff tools
BTF: clang-format all the new source files
.clang-format | 9 +-
COMPILING | 5 +
configure.ac | 21 +-
include/abg-btf.h | 888 ++++++++++++++++++++++++
include/abg-scc.h | 122 ++++
src/Makefile.am | 9 +-
src/abg-btf.cc | 1649 +++++++++++++++++++++++++++++++++++++++++++++
tests/Makefile.am | 7 +
tests/test-scc.cc | 220 ++++++
tools/Makefile.am | 14 +
tools/btfdiff.cc | 71 ++
tools/btfinfo.cc | 22 +
12 files changed, 3034 insertions(+), 3 deletions(-)
create mode 100644 include/abg-btf.h
create mode 100644 include/abg-scc.h
create mode 100644 src/abg-btf.cc
create mode 100644 tests/test-scc.cc
create mode 100644 tools/btfdiff.cc
create mode 100644 tools/btfinfo.cc
--
2.32.0.272.g935e593368-goog
next reply other threads:[~2021-06-11 15:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 15:33 Giuliano Procida [this message]
2021-06-11 15:33 ` [PATCH 1/6] Tweak clang-format Giuliano Procida
2021-06-11 15:33 ` [PATCH 2/6] Allow C++17 code to be compiled Giuliano Procida
2021-06-11 15:33 ` [PATCH 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-11 15:33 ` [PATCH 4/6] BTF: add core functionality Giuliano Procida
2021-06-11 15:33 ` [PATCH 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-11 15:33 ` [PATCH 6/6] BTF: clang-format all the new source files Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 0/6] BTF ABI Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 1/6] Allow C++17 code to be compiled Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 2/6] Tweak clang-format Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 4/6] BTF: add core functionality Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 6/6] BTF: clang-format all the new source files Giuliano Procida
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210611153319.778996-1-gprocida@google.com \
--to=gprocida@google.com \
--cc=dodji@seketeli.org \
--cc=kernel-team@android.com \
--cc=libabigail@sourceware.org \
--cc=maennich@google.com \
--cc=teguiani@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).