> 
> 
>> 35: (69) r3 = *(u16 *)(r7 +38)
>> 36: (dc) r3 = be16 r3
> 
> r3 get the value from memory, its value could be any one as permitted
> by the type.

Does it mean that r3 is considered as be16 ? I do not understand why as I 
explicitly convert it in u16.

This output language is a readable format of bpf bytecode, right ? Is there any 
documentation to lean/understand it ? 

> 
> The compiler does the right thing, just verifier is not advanced enough.

Is it worthy to share this issue of verifier.c ( 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/bpf/verifier.c
 ) with bpf maintainers ( 
https://www.kernel.org/doc/html/latest/bpf/bpf_devel_QA.html#q-how-do-i-report-bugs-for-bpf-kernel-code
 ) ? The compiler which is used here is clang which is called by bcc, right ?

> 
> Yes, you will need some source workaround. You could try below (untested):
> 
> + udp_len = udp_len & 0x1ff;

I tested it and it seems to work. Thx a lot !!

But that means I can not use the u16 max value ?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1602): https://lists.iovisor.org/g/iovisor-dev/message/1602
Mute This Topic: https://lists.iovisor.org/mt/30285987/21656
Mute #verifier: https://lists.iovisor.org/mk?hashtag=verifier&subid=2590197
Group Owner: [email protected]
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to