lkml.org 
[lkml]   [2023]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH bpf-next 1/2] bpf, x64: Fix tailcall infinite loop bug
From
Date
On Tue, 2023-08-15 at 11:01 +0800, Leon Hwang wrote:
[...]
> a) Initial value of RAX is in emit_prologue().
> if (!ebpf_from_cbpf) {
> if (tail_call_reachable && !is_subprog)
> /* When it's the entry of the whole
> * tailcall context, zeroing the RAX
> * means init tail_call_cnt.
> */
> EMIT2(0x31, 0xC0); /* xor eax, eax */
> else
> // Keep the same asm layout.
> EMIT2(0x66, 0x90); /* nop2 */
> }
> I'd like to add this comment to emit_prologue().

Got it, thank you.


[...]

\
 
 \ /
  Last update: 2023-08-15 16:37    [W:0.032 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site