On 03/07/2017 12:07 PM, Jesper Dangaard Brouer via iovisor-dev wrote:
On Mon, 6 Mar 2017 16:14:06 -0800 Alexei Starovoitov via iovisor-dev <iovisor-dev@...> wrote:
[...]
that's practically impossible to know in advance, since hardening and start address randomization will play a role. Or use sysctl net.core.bpf_jit_enable=2 at load time which gives raw x86 hex.
The sysctl adjusting sounds interesting:
sysctl net.core.bpf_jit_enable=2
What is below "proglen=335" the JIT'ed asm-code size?
It's in bpf_jit_dump(): proglen is the len of opcode sequence generated and flen is the number of bpf insns. You can use tools/net/bpf_jit_disasm.c to disassemble that output. bpf_jit_disasm -o will dump the related opcodes as well.