bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Andrii Nakryiko <andriin@fb.com>,
	bpf@vger.kernel.org, netdev@vger.kernel.org, ast@fb.com,
	yhs@fb.com
Cc: andrii.nakryiko@gmail.com, kernel-team@fb.com
Subject: Re: [PATCH v2 bpf-next 0/5] Bitfield and size relocations support in libbpf
Date: Mon, 4 Nov 2019 16:38:41 +0100	[thread overview]
Message-ID: <00cbe8c6-20ee-1f9e-02cd-20974dfbf898@iogearbox.net> (raw)
In-Reply-To: <20191101222810.1246166-1-andriin@fb.com>

On 11/1/19 11:28 PM, Andrii Nakryiko wrote:
> This patch set adds support for reading bitfields in a relocatable manner
> through a set of relocations emitted by Clang, corresponding libbpf support
> for those relocations, as well as abstracting details into
> BPF_CORE_READ_BITFIELD/BPF_CORE_READ_BITFIELD_PROBED macro.
> 
> We also add support for capturing relocatable field size, so that BPF program
> code can adjust its logic to actual amount of data it needs to operate on,
> even if it changes between kernels. New convenience macro is added to
> bpf_core_read.h (bpf_core_field_size(), in the same family of macro as
> bpf_core_read() and bpf_core_field_exists()). Corresponding set of selftests
> are added to excercise this logic and validate correctness in a variety of
> scenarios.
> 
> Some of the overly strict logic of matching fields is relaxed to support wider
> variety of scenarios. See patch #1 for that.
> 
> Patch #1 removes few overly strict test cases.
> Patch #2 adds support for bitfield-related relocations.
> Patch #3 adds some further adjustments to support generic field size
> relocations and introduces bpf_core_field_size() macro.
> Patch #4 tests bitfield reading.
> Patch #5 tests field size relocations.
> 
> v1->v2:
> - added direct memory read-based macro and tests for bitfield reads.

Applied, thanks!

      parent reply	other threads:[~2019-11-04 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01 22:28 [PATCH v2 bpf-next 0/5] Bitfield and size relocations support in libbpf Andrii Nakryiko
2019-11-01 22:28 ` [PATCH v2 bpf-next 1/5] selftests/bpf: remove too strict field offset relo test cases Andrii Nakryiko
2019-11-01 22:28 ` [PATCH v2 bpf-next 2/5] libbpf: add support for relocatable bitfields Andrii Nakryiko
2019-11-01 22:28 ` [PATCH v2 bpf-next 3/5] libbpf: add support for field size relocations Andrii Nakryiko
2019-11-01 22:28 ` [PATCH v2 bpf-next 4/5] selftest/bpf: add relocatable bitfield reading tests Andrii Nakryiko
2019-11-01 22:28 ` [PATCH v2 bpf-next 5/5] selftests/bpf: add field size relocation tests Andrii Nakryiko
2019-11-04 15:38 ` Daniel Borkmann [this message]

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=00cbe8c6-20ee-1f9e-02cd-20974dfbf898@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.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 NNTP newsgroup(s).