[Cake] [bpf-next RFC 2/3] flow_dissector: implements eBPF parser

Pete Heist pete at heistp.net
Wed Aug 22 15:18:15 EDT 2018


> On Aug 22, 2018, at 12:41 PM, Daniel Borkmann <daniel at iogearbox.net> wrote:
> 
> On 08/22/2018 11:25 AM, Toke Høiland-Jørgensen wrote:
>> Pete Heist <pete at heistp.net> writes:
>> 
>> Well, it operates on the byte code and errs on the side of safety. I.e.,
>> if it can't prove your program is safe it is going to reject it. Which
>> can be less than helpful.
>> 
>> There's a mode where it can dump its state including the byte code it is
>> operating at, which can be helpful in figuring out why you get an error.
>> But it has a way to go yet compared with regular compiler error
>> messages... :)
> 
> There's also llvm-objdump which can dump with annotated BPF C code and
> it allows to match the verifier output line number with it. There's a
> small example in the doc under LLVM section on how to get there:
> 
> https://cilium.readthedocs.io/en/latest/bpf/#llvm

Thank you Daniel, that helped match the C source with the verifier output- much easier.

I’m still not sure why I was able to fix my problem by simply returning my uint16_t classid through the stack rather than setting it through a passed in pointer, but nevertheless, that works. :)

Pete



More information about the Cake mailing list