public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v6 0/2] bpf, x86: inline bpf_get_current_task() for x86_64
@ 2026-01-20  7:05 Menglong Dong
  2026-01-20  7:05 ` [PATCH bpf-next v6 1/2] " Menglong Dong
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Menglong Dong @ 2026-01-20  7:05 UTC (permalink / raw)
  To: ast, eddyz87
  Cc: davem, dsahern, daniel, andrii, martin.lau, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, tglx, mingo, bp,
	dave.hansen, x86, hpa, netdev, 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 v5:
* remove unnecessary 'ifdef' and __description in the selftests
* v5: https://lore.kernel.org/bpf/20260119070246.249499-1-dongml2@chinatelecom.cn/

Changes since v4:
* don't support the !CONFIG_SMP case
* v4: https://lore.kernel.org/bpf/20260112104529.224645-1-dongml2@chinatelecom.cn/

Changes since v3:
* handle the !CONFIG_SMP case
* ignore the !CONFIG_SMP case in the testcase, as we enable CONFIG_SMP
  for x86_64 in the selftests

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 (2):
  bpf, x86: inline bpf_get_current_task() for x86_64
  selftests/bpf: test the jited inline of bpf_get_current_task

 kernel/bpf/verifier.c                         | 22 +++++++++++++++++++
 .../selftests/bpf/prog_tests/verifier.c       |  2 ++
 .../selftests/bpf/progs/verifier_jit_inline.c | 20 +++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 100644 tools/testing/selftests/bpf/progs/verifier_jit_inline.c

-- 
2.52.0


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

end of thread, other threads:[~2026-01-21  6:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-20  7:05 [PATCH bpf-next v6 0/2] bpf, x86: inline bpf_get_current_task() for x86_64 Menglong Dong
2026-01-20  7:05 ` [PATCH bpf-next v6 1/2] " Menglong Dong
2026-01-21  1:23   ` Andrii Nakryiko
2026-01-21  1:43     ` Alexei Starovoitov
2026-01-21  1:58     ` Menglong Dong
2026-01-21  3:10       ` Alexei Starovoitov
2026-01-21  3:37         ` Menglong Dong
2026-01-21  4:12         ` Andrii Nakryiko
2026-01-21  4:46           ` Alexei Starovoitov
2026-01-21  6:35             ` Andrii Nakryiko
2026-01-20  7:05 ` [PATCH bpf-next v6 2/2] selftests/bpf: test the jited inline of bpf_get_current_task Menglong Dong
2026-01-20 17:52   ` Eduard Zingerman
2026-01-21  1:05   ` Andrii Nakryiko
2026-01-21  1:28     ` Menglong Dong
2026-01-21  1:32       ` Eduard Zingerman
2026-01-21  3:03         ` Menglong Dong
2026-01-21  4:50 ` [PATCH bpf-next v6 0/2] bpf, x86: inline bpf_get_current_task() for x86_64 patchwork-bot+netdevbpf

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