Re: [RFC PATCH bpf-next 1/2] bpf, x64: Fix tailcall infinite loop bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux