On Tue, Jan 30, 2024 at 11:49 AM Jose E. Marchesi <jose.marchesi@xxxxxxxxxx> wrote: > > > > clang generates BPF code with opcode 0x8d (BPF_CALL | BPF_X, which it > > calls "callx"), when compiling with -O0 or -O1. Of course -O2 is > > recommended, but if anyone later defines opcode 0x8d for anything > > other than what clang means by it, it could cause problems. > > GCC also generates BPF_CALL|BPF_X also named callx, but only if the > experimental -mxbpf option is passed to the compiler. > > I recommend this particular encoding to be specifically reserved for a > future `call REG' for when/if a time comes when the BPF verifier > supports some form of indirect calls. +1. Same thinking from llvm pov. CALL|X is what we will use when the kernel supports indirect calls. I think it means we need to add a 'reserved' category to the spec.