public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] bpf: enable x86 fentry on tail-called programs
@ 2026-03-27 14:16 Takeru Hayasaka
  2026-03-27 14:16 ` [PATCH bpf-next 1/2] bpf, x86: patch tail-call fentry slot on non-IBT JITs Takeru Hayasaka
  2026-03-27 14:16 ` [PATCH bpf-next 2/2] selftests/bpf: cover fentry on tailcalled programs Takeru Hayasaka
  0 siblings, 2 replies; 15+ messages in thread
From: Takeru Hayasaka @ 2026-03-27 14:16 UTC (permalink / raw)
  To: ast, daniel, andrii; +Cc: bpf, x86, linux-kselftest, linux-kernel

This series enables fentry on x86 BPF programs reached via tail calls
and adds a focused selftest for the expected behavior.

Patch 1 fixes the x86 mirrored text-poke lookup so the tail-call landing
slot is patched on both IBT and non-IBT JITs.

Patch 2 adds a selftest that checks both direct entry and tail-called
entry for a tailcall callee with fentry attached.

Takeru Hayasaka (2):
  bpf, x86: patch tail-call fentry slot on non-IBT JITs
  selftests/bpf: cover fentry on tailcalled programs

 arch/x86/net/bpf_jit_comp.c                   |  47 +++++++-
 .../selftests/bpf/prog_tests/tailcalls.c      | 110 ++++++++++++++++++
 .../bpf/progs/tailcall_fentry_probe.c         |  16 +++
 .../bpf/progs/tailcall_fentry_target.c        |  27 +++++
 4 files changed, 197 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/tailcall_fentry_probe.c
 create mode 100644 tools/testing/selftests/bpf/progs/tailcall_fentry_target.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-03-31  5:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 14:16 [PATCH bpf-next 0/2] bpf: enable x86 fentry on tail-called programs Takeru Hayasaka
2026-03-27 14:16 ` [PATCH bpf-next 1/2] bpf, x86: patch tail-call fentry slot on non-IBT JITs Takeru Hayasaka
2026-03-27 14:24   ` Alexei Starovoitov
2026-03-27 15:12     ` Takeru Hayasaka
2026-03-27 15:21       ` Alexei Starovoitov
2026-03-27 15:44         ` Takeru Hayasaka
2026-03-27 15:58           ` Alexei Starovoitov
2026-03-27 16:06             ` Takeru Hayasaka
2026-03-27 16:09               ` Alexei Starovoitov
2026-03-27 16:30                 ` Takeru Hayasaka
2026-03-30  9:07                   ` Leon Hwang
2026-03-30 16:46                     ` Takeru Hayasaka
2026-03-31  2:24                       ` Leon Hwang
2026-03-31  4:53                         ` Takeru Hayasaka
2026-03-27 14:16 ` [PATCH bpf-next 2/2] selftests/bpf: cover fentry on tailcalled programs Takeru Hayasaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox