public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/3] bpf, x86: inline bpf_get_current_task() for x86_64
@ 2026-01-09  8:26 Menglong Dong
  2026-01-09  8:26 ` [PATCH bpf-next v3 1/3] " Menglong Dong
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Menglong Dong @ 2026-01-09  8:26 UTC (permalink / raw)
  To: ast, eddyz87
  Cc: daniel, john.fastabend, andrii, martin.lau, song, yonghong.song,
	kpsingh, sdf, haoluo, jolsa, bpf, linux-kernel

Inline bpf_get_current_task() and bpf_get_current_task_btf() for x86_64
to obtain better performance, and add the testcase for it.

Changes since v2:
* implement it in the verifier with BPF_MOV64_PERCPU_REG() instead of in
  x86_64 JIT (Alexei).

Changes since v1:
* add the testcase
* remove the usage of const_current_task

Menglong Dong (3):
  bpf, x86: inline bpf_get_current_task() for x86_64
  selftests/bpf: add TEST_TAG_KCONFIG_CHECK to test_loader
  selftests/bpf: test the jited inline of bpf_get_current_task

 kernel/bpf/verifier.c                         | 25 ++++++++++
 .../selftests/bpf/prog_tests/verifier.c       |  2 +
 tools/testing/selftests/bpf/progs/bpf_misc.h  |  3 ++
 .../selftests/bpf/progs/verifier_jit_inline.c | 36 +++++++++++++++
 tools/testing/selftests/bpf/test_loader.c     | 46 ++++++++++++++++++-
 5 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/bpf/progs/verifier_jit_inline.c

-- 
2.52.0


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

end of thread, other threads:[~2026-01-10  3:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09  8:26 [PATCH bpf-next v3 0/3] bpf, x86: inline bpf_get_current_task() for x86_64 Menglong Dong
2026-01-09  8:26 ` [PATCH bpf-next v3 1/3] " Menglong Dong
2026-01-09  8:42   ` Menglong Dong
2026-01-10  3:43   ` Menglong Dong
2026-01-09  8:26 ` [PATCH bpf-next v3 2/3] selftests/bpf: add TEST_TAG_KCONFIG_CHECK to test_loader Menglong Dong
2026-01-09  8:26 ` [PATCH bpf-next v3 3/3] selftests/bpf: test the jited inline of bpf_get_current_task Menglong Dong

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