Merge branch 'bpf-allow-union-argument-in-trampoline-based-programs'
authorAlexei Starovoitov <ast@kernel.org>
Tue, 23 Sep 2025 19:07:47 +0000 (12:07 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Sep 2025 19:07:47 +0000 (12:07 -0700)
commitf0b5c1490aa8af7a0fcface6cc99266cff1549be
tree4dc6b632825e8547bd864737362595e365a15662
parent2383e45f1da7ac73683ac3494a205bc878a58cc9
parent1c6686bf7fc161ed87b44b523a96c5ae4bfed351
Merge branch 'bpf-allow-union-argument-in-trampoline-based-programs'

Leon Hwang says:

====================
bpf: Allow union argument in trampoline based programs

While tracing 'release_pages' with bpfsnoop[0], the verifier reports:

The function release_pages arg0 type UNION is unsupported.

However, it should be acceptable to trace functions that have 'union'
arguments.

This patch set enables such support in the verifier by allowing 'union'
as a valid argument type.

Changes:
v3 -> v4:
* Address comments from Alexei:
  * Trim bpftrace output in patch #1 log.
  * Drop the referenced commit info and the test output in patch #2 log.

v2 -> v3:
* Address comments from Alexei:
  * Reuse the existing flag BTF_FMODEL_STRUCT_ARG.
  * Update the comment of the flag BTF_FMODEL_STRUCT_ARG.

v1 -> v2:
* Add 16B 'union' argument support in x86_64 trampoline.
* Update selftests using bpf_testmod.
* Add test case about 16-bytes 'union' argument.
* Address comments from Alexei:
  * Study the patch set about 'struct' argument support.
  * Update selftests to cover more cases.
v1: https://lore.kernel.org/bpf/20250905133226.84675-1-leon.hwang@linux.dev/

Links:
[0] https://github.com/bpfsnoop/bpfsnoop
====================

Link: https://patch.msgid.link/20250919044110.23729-1-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>