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 Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux