public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: "Emil Tsalapatis" <emil@etsalapatis.com>
To: "Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Emil Tsalapatis" <emil@etsalapatis.com>
Cc: <bpf@vger.kernel.org>, <ast@kernel.org>, <andrii@kernel.org>,
	<daniel@iogearbox.net>, <eddyz87@gmail.com>, <song@kernel.org>
Subject: Re: [PATCH bpf-next v7 0/9] Introduce arena library and runtime
Date: Fri, 17 Apr 2026 10:43:46 -0400	[thread overview]
Message-ID: <DHVIDBPOK7I3.2837ZLDGJOBY@etsalapatis.com> (raw)
In-Reply-To: <CAP01T754f+qzWDG=9PyDmOXuL1mn9R9UBAtUor-RdzDGMGZx7Q@mail.gmail.com>

On Sun Apr 12, 2026 at 3:22 PM EDT, Kumar Kartikeya Dwivedi wrote:
> On Sun, 12 Apr 2026 at 19:45, Emil Tsalapatis <emil@etsalapatis.com> wrote:
>>
>> Add a new subdirectory to tools/testing/selftests/bpf called libarena,
>> along with programs useful for writing arena-based BPF code. This
>> patchset adds the following:
>>
>> 1) libarena, a subdirectory where arena BPF code that is generally useful
>> to BPF arena programs can be easily added and tested.
>>
>> 2) An ASAN runtime for BPF arena programs. BPF arenas allow for accessing
>> memory after it has been freed or if it is out of bounds, making it more
>> difficult to triage bugs combined to regular BPF. Use LLVM's recently added
>> support for address-space based sanitization to selectively sanitize just
>> the arena accesses.
>>
>> 3) A buddy memory allocator that can be reused by BPF programs to handle
>> memory allocation/deletion. The allocator uses the ASAN runtime to add
>> address sanitization if requested.
>>
>> The patch includes testing for the new allocators and ASAN features that
>> can be built from the top directory using "make libarena_test" and
>> "make libarena_test_asan". The generated binaries reside in libarena/.
>> The patch also adds test-progs-based selftests to the codebase for the
>> libarena code, so the new tests are run by ./test_progs.
>>
>
> I am back in the same position as I was with comments in [0].
>
> I.e., again, I don't see anything in the stream output (passing -v to
> test_libarena_asan) when I build it with clang 23 (LLVM tip).
> What am I doing wrong? (Leaving aside all feedback about integrating
> it in the regular test runner that is still unaddressed, thus tests do
> not run by default).
>
>   [0]: https://lore.kernel.org/bpf/CAP01T75+BoQfQN=47NhYYviZttjCPb_CXNpa=DUC0=xSvdNZdA@mail.gmail.com

The series introduces a selftest for the test runner called libarena. It
is introduced in patch 9 to avoid creating a runner that does nothing in
the previous patches. Tests run with test_progs like regular selftests.
For ASAN we do not have LLVM22 support in the CI yet so test_progs doesn't
exercise it.

The stream output is suppressed by a switch in asan.c to make the output
of test_libarena_asan legible. Each test that expects to generate ASAN
will generate a ton of output. I will add userspace logic to consume 
the splats instead of emitting them to keep the output sane.

>
>> [...]


  reply	other threads:[~2026-04-17 14:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-12 17:45 [PATCH bpf-next v7 0/9] Introduce arena library and runtime Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 1/9] bpf: Allow instructions with arena source and non-arena dest registers Emil Tsalapatis
2026-04-12 19:54   ` Alexei Starovoitov
2026-04-12 17:45 ` [PATCH bpf-next v7 2/9] selftests/bpf: Add tests for non-arena/arena operations Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 3/9] selftests/bpf: Move bpf_arena_spin_lock.h to the top level Emil Tsalapatis
2026-04-12 19:31   ` Kumar Kartikeya Dwivedi
2026-04-17 16:07     ` Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 4/9] selftests/bpf: Move READ_ONCE/WRITE_ONCE macros to bpf_experimental.h Emil Tsalapatis
2026-04-12 19:33   ` Kumar Kartikeya Dwivedi
2026-04-17 16:06     ` Emil Tsalapatis
2026-04-17 16:21       ` Kumar Kartikeya Dwivedi
2026-04-17 16:38         ` Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 5/9] selftests/bpf: Add basic libarena scaffolding Emil Tsalapatis
2026-04-12 18:28   ` bot+bpf-ci
2026-04-12 18:31     ` Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 6/9] selftests/bpf: Add arena ASAN runtime to libarena Emil Tsalapatis
2026-04-12 18:28   ` bot+bpf-ci
2026-04-12 18:34     ` Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 7/9] selftests/bpf: Add ASAN support for libarena selftests Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 8/9] selftests/bpf: Add buddy allocator for libarena Emil Tsalapatis
2026-04-12 17:45 ` [PATCH bpf-next v7 9/9] selftests/bpf: Add selftests for libarena buddy allocator Emil Tsalapatis
2026-04-12 19:22 ` [PATCH bpf-next v7 0/9] Introduce arena library and runtime Kumar Kartikeya Dwivedi
2026-04-17 14:43   ` Emil Tsalapatis [this message]
2026-04-17 16:15     ` Kumar Kartikeya Dwivedi
2026-04-17 16:33       ` Emil Tsalapatis
2026-04-17 17:06         ` Alexei Starovoitov
2026-04-17 18:03           ` Emil Tsalapatis
2026-04-17 18:21             ` Alexei Starovoitov
2026-04-12 20:00 ` patchwork-bot+netdevbpf
2026-04-16 20:23 ` Matt Bobrowski
2026-04-16 20:31   ` Matt Bobrowski
2026-04-16 20:43     ` Song Liu
2026-04-17  5:59       ` Matt Bobrowski
2026-04-17 14:36         ` Emil Tsalapatis

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=DHVIDBPOK7I3.2837ZLDGJOBY@etsalapatis.com \
    --to=emil@etsalapatis.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    /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