mbox series

[v2,bpf-next,0/2] bpf, verifier: Correct tail_call_reachable for bpf prog

Message ID 20240610124224.34673-1-hffilwlqm@gmail.com (mailing list archive)
Headers show
Series bpf, verifier: Correct tail_call_reachable for bpf prog | expand

Message

Leon Hwang June 10, 2024, 12:42 p.m. UTC
It's confusing to inspect 'prog->aux->tail_call_reachable' with drgn[0],
when bpf prog has tail call but 'tail_call_reachable' is false.

This patch corrects 'tail_call_reachable' when bpf prog has tail call.

Therefore, it's unnecessary to detect tail call in x86 jit. Let's remove
it.

Changes:
v1 -> v2:
* Address comment from Yonghong:
  * Remove unnecessary tail call detection in x86 jit.

---

Links:
[0] https://github.com/osandov/drgn

Leon Hwang (2):
  bpf, verifier: Correct tail_call_reachable for bpf prog
  bpf, x64: Remove tail call detection

 arch/x86/net/bpf_jit_comp.c | 11 ++---------
 kernel/bpf/verifier.c       |  4 +++-
 2 files changed, 5 insertions(+), 10 deletions(-)


base-commit: 2c6987105026a4395935a3db665c54eb1bafe782

Comments

Eduard Zingerman June 10, 2024, 9:28 p.m. UTC | #1
On Mon, 2024-06-10 at 20:42 +0800, Leon Hwang wrote:
> It's confusing to inspect 'prog->aux->tail_call_reachable' with drgn[0],
> when bpf prog has tail call but 'tail_call_reachable' is false.
> 
> This patch corrects 'tail_call_reachable' when bpf prog has tail call.
> 
> Therefore, it's unnecessary to detect tail call in x86 jit. Let's remove
> it.
> 
> Changes:
> v1 -> v2:
> * Address comment from Yonghong:
>   * Remove unnecessary tail call detection in x86 jit.
> 
> ---

All seems correct.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
patchwork-bot+netdevbpf@kernel.org June 21, 2024, 3 a.m. UTC | #2
Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Mon, 10 Jun 2024 20:42:22 +0800 you wrote:
> It's confusing to inspect 'prog->aux->tail_call_reachable' with drgn[0],
> when bpf prog has tail call but 'tail_call_reachable' is false.
> 
> This patch corrects 'tail_call_reachable' when bpf prog has tail call.
> 
> Therefore, it's unnecessary to detect tail call in x86 jit. Let's remove
> it.
> 
> [...]

Here is the summary with links:
  - [v2,bpf-next,1/2] bpf, verifier: Correct tail_call_reachable for bpf prog
    https://git.kernel.org/bpf/bpf-next/c/01793ed86b5d
  - [v2,bpf-next,2/2] bpf, x64: Remove tail call detection
    https://git.kernel.org/bpf/bpf-next/c/f663a03c8e35

You are awesome, thank you!