bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: bpf <bpf@vger.kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Subject: libbpf v0.2 released
Date: Wed, 28 Oct 2020 10:47:44 -0700	[thread overview]
Message-ID: <CAEf4BzZZAm_jFtPwmrxowVgmUQn-TJMpGBtVOtVepSsxe8S19w@mail.gmail.com> (raw)

Hi all,

I've just cut v0.2 libbpf release on Github ([0]). I figured it would
be a good refresher on what went into libbpf for this release cycle. I
apologize if I missed something important in the summary, though. And
if you see any problem with this release, please report ASAP.

## New features/APIs:
  - full support for BPF-to-BPF function calls, no more need for
  - support for multiple BPF programs with the same section name;
  - support for accessing in-kernel per-CPU variables;
  - support for type and enum value CO-RE relocations;
  - libbpf will auto-adjust CO-RE direct memory loads to adjust to
32-bit host architecture;
  - BPF_PROG_BIND_MAP support, .rodata will be bound automatically if
kernel supports it;
  - new APIs for programmatic generation of BTF;
  - support for big-endian and little-endian endianness in BTF;
  - perf buffer API additions allowing better integration with polling
libraries (`perf_buffer__buffer_cnt()`, `perf_buffer__buffer_fd()`,
  - `bpf_prog_test_run_opts()` API;
  - `bpf_program__attach_freplace()` API.

## New BPF program types supported:
  - sleepable fentry/fexit/fmod_ret/lsm BPF program.

## BPF-side changes:
  - libbpf will automatically fall back to `bpf_probe_read[_str]()` if
`bpf_probe_read_{kernel, user}[_str]()` are not supported on older
kernels, so it's always safe to use `bpf_probe_read_{kernel,
user}[_str]()` in your application and not worry about kernel version
  - `bpf_d_path()` helper;
  - `bpf_per_cpu_ptr()` and `bpf_this_cpu_ptr()` helpers for working
with per-CPU kernel variables;
  - `bpf_copy_from_user()` helper;
  - `bpf_load_hdr_opt()`, `bpf_store_hdr_opt()`,
`bpf_reserve_hdr_opt()` helpers;
  - `bpf_skb_cgroup_classid()` helper;
  - `bpf_redirect_neigh()` and `bpf_redirect_peer()` helpers;
  - `bpf_seq_printf_btf()` and `bpf_snprintf_btf()` helpers;
  - `__noinline` convenience macro;
  - `bpf_tail_call_static()` wrapper.

## Deprecations:
  - BPF program's "title" terminology is deprecated, please use
clearer "section_name". New API `bpf_program__section_name()` added;
  - `btf_ext__reloc_line_info()` and `btf_ext__reloc_func_info()`
(used by BCC) are deprecated.

  [0] https://github.com/libbpf/libbpf/releases/tag/v0.2

-- Andrii

                 reply	other threads:[~2020-10-29  1:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEf4BzZZAm_jFtPwmrxowVgmUQn-TJMpGBtVOtVepSsxe8S19w@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \


* 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 NNTP newsgroup(s).