|
[PATCH v3 net-next 00/12] bpf: rewrite value tracking in verifier
Hi Edward, Did you also have a chance in the meantime to look at reducing complexity along with your unification? I did run the cilium test suite with your latest set from here and current # worst cas
Hi Edward, Did you also have a chance in the meantime to look at reducing complexity along with your unification? I did run the cilium test suite with your latest set from here and current # worst cas
|
By
Daniel Borkmann
· #830
·
|
|
[RFC PATCH net-next 2/5] bpf/verifier: rework value tracking
On 06/08/2017 06:45 PM, Alexei Starovoitov wrote: [...] > I think Daniel will be happy to test your next rev of the patches. > I'll test them as well. > At least 'insn_processed' from C code in tools/
On 06/08/2017 06:45 PM, Alexei Starovoitov wrote: [...] > I think Daniel will be happy to test your next rev of the patches. > I'll test them as well. > At least 'insn_processed' from C code in tools/
|
By
Daniel Borkmann
· #800
·
|
|
How can I know XDP supporting NICs?
On 04/05/2017 02:09 PM, Paul Chaignon via iovisor-dev wrote: [...] > Although it's not yet listed on the bcc repository, the Netronome nfp > driver does have support for XDP: > https://git.kernel.org/
On 04/05/2017 02:09 PM, Paul Chaignon via iovisor-dev wrote: [...] > Although it's not yet listed on the bcc repository, the Netronome nfp > driver does have support for XDP: > https://git.kernel.org/
|
By
Daniel Borkmann
· #702
·
|
|
How to attach a BPF program to TC using C/C++
Out of curiosity, why not .._SCHED_CLS program in direct-action mode (same functionality wrt BPF and would save you additional layers of indirection in tc at least), or are you required to run somethi
Out of curiosity, why not .._SCHED_CLS program in direct-action mode (same functionality wrt BPF and would save you additional layers of indirection in tc at least), or are you required to run somethi
|
By
Daniel Borkmann
· #696
·
|
|
Reading src/dst addresses in reuseport programs
Hm, probably makes sense to implement a version of skb_load_bytes() for socket filter types explicitly that could also deal with such offsets.
Hm, probably makes sense to implement a version of skb_load_bytes() for socket filter types explicitly that could also deal with such offsets.
|
By
Daniel Borkmann
· #692
·
|
|
Describing howto read the eBPF generated ELF binary
[...] 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
[...] 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
|
By
Daniel Borkmann
· #674
·
|
|
BPF verifier: cannot add integer value with 0 upper zero bits to ptr_to_packet
Hmm, problem with C code is that we might have no control over when llvm decides to spill to stack where this workaround would then be needed. Your suggestion could work, maybe an llvm expert can jump
Hmm, problem with C code is that we might have no control over when llvm decides to spill to stack where this workaround would then be needed. Your suggestion could work, maybe an llvm expert can jump
|
By
Daniel Borkmann
· #659
·
|
|
BPF verifier: cannot add integer value with 0 upper zero bits to ptr_to_packet
Right, so lines 260, 261 r5 is imm type, which in 277 is transferred to r2 and eventually in 279 spilled to stack. check_stack_write() would see that type is not spillable, so it will be stored as reg
Right, so lines 260, 261 r5 is imm type, which in 277 is transferred to r2 and eventually in 279 spilled to stack. check_stack_write() would see that type is not spillable, so it will be stored as reg
|
By
Daniel Borkmann
· #654
·
|
|
bpf invalid stack off=-528
You are generating the C files in the end, right? So the code shown is what clang gets to compile; or does this come from another llvm front end somehow? Also this below looks pretty odd, I'd have exp
You are generating the C files in the end, right? So the code shown is what clang gets to compile; or does this come from another llvm front end somehow? Also this below looks pretty odd, I'd have exp
|
By
Daniel Borkmann
· #642
·
|
|
bpf invalid stack off=-528
Looks like a code generation issue perhaps? It seems your prog parses and fills a huge struct on the stack, f.e. eth dest is filled from direct packet acces byte by byte (inefficient, but fair enough)
Looks like a code generation issue perhaps? It seems your prog parses and fills a huge struct on the stack, f.e. eth dest is filled from direct packet acces byte by byte (inefficient, but fair enough)
|
By
Daniel Borkmann
· #640
·
|
|
Documentation on eBPF map types?
Would be great if you could submit some of the missing pieces to linux-man@... for bpf(2) man-page inclusion while at it, so this doesn't need to be done twice. Thanks for documenting. Not
Would be great if you could submit some of the missing pieces to linux-man@... for bpf(2) man-page inclusion while at it, so this doesn't need to be done twice. Thanks for documenting. Not
|
By
Daniel Borkmann
· #627
·
|
|
Howto debug eBPF programs and bpf_trace_printk
Depends where you look. F.e. tc has 'tc exec bpf dbg' to find the mount and dump the trace pipe. Yep, see discussion from netdev: https://www.spinics.net/lists/netdev/msg406926.html
Depends where you look. F.e. tc has 'tc exec bpf dbg' to find the mount and dump the trace pipe. Yep, see discussion from netdev: https://www.spinics.net/lists/netdev/msg406926.html
|
By
Daniel Borkmann
· #612
·
|
|
BPF verifier: cannot add integer value with 0 upper zero bits to ptr_to_packet
Thanks a lot, I'll see to cook a proper patch then.
Thanks a lot, I'll see to cook a proper patch then.
|
By
Daniel Borkmann
· #607
·
|
|
BPF verifier: cannot add integer value with 0 upper zero bits to ptr_to_packet
But what the compiler is doing here is still correct eventually I assume? We could also add BPF_AND, but that r5's type is UNKNOWN_VALUE doesn't seem right if I'm not mistaken. That r5 = 0xfffffff8 sh
But what the compiler is doing here is still correct eventually I assume? We could also add BPF_AND, but that r5's type is UNKNOWN_VALUE doesn't seem right if I'm not mistaken. That r5 = 0xfffffff8 sh
|
By
Daniel Borkmann
· #605
·
|
|
direct packet access boundary check
Yes, effectively in 3) you're doing data_end -= data and that will result in marking the register as unknown value by the verifier, since it doesn't pattern match alu ops with data_end as dst reg. So
Yes, effectively in 3) you're doing data_end -= data and that will result in marking the register as unknown value by the verifier, since it doesn't pattern match alu ops with data_end as dst reg. So
|
By
Daniel Borkmann
· #603
·
|
|
BPF verifier: cannot add integer value with 0 upper zero bits to ptr_to_packet
Hi William, Can you try out the below patch? evaluate_reg_imm_alu() is invoked on ALU ops where the dst reg is CONST_IMM and the src is either a constant from the insn or a reg with type CONST_IMM. Cu
Hi William, Can you try out the below patch? evaluate_reg_imm_alu() is invoked on ALU ops where the dst reg is CONST_IMM and the src is either a constant from the insn or a reg with type CONST_IMM. Cu
|
By
Daniel Borkmann
· #602
·
|
|
How to update the csum of a trimmed UDP packet?
On just a very quick glance, don't you need UDP length here (aka UDP header and data)?
On just a very quick glance, don't you need UDP length here (aka UDP header and data)?
|
By
Daniel Borkmann
· #593
·
|
|
How to update the csum of a trimmed UDP packet?
What's your specific use-case on this? Reason why I'm asking is that the helper needs to linearize skb and is thus only suitable for slow path [1]. F.e. we use it for rewriting an skb as time exceeded
What's your specific use-case on this? Reason why I'm asking is that the helper needs to linearize skb and is thus only suitable for slow path [1]. F.e. we use it for rewriting an skb as time exceeded
|
By
Daniel Borkmann
· #588
·
|
|
Unable to run the bpf samples on Fedora 25 beta (4.8.2-300)
On 10/25/2016 08:00 PM, Chandrasekar Kannan via iovisor-dev wrote: [...] > But when I try to run the sample from the linux source tree under release > (v4.8), > I get some strange errors. > > "Error f
On 10/25/2016 08:00 PM, Chandrasekar Kannan via iovisor-dev wrote: [...] > But when I try to run the sample from the linux source tree under release > (v4.8), > I get some strange errors. > > "Error f
|
By
Daniel Borkmann
· #503
·
|
|
Direct packet access validation across tail calls
Yeah, checks cannot be carried over in two occasions: i) calling helpers that change skb->data (and therefore prior checks become invalid) and ii) tail calls. For tail calls the verifier doesn't know
Yeah, checks cannot be carried over in two occasions: i) calling helpers that change skb->data (and therefore prior checks become invalid) and ii) tail calls. For tail calls the verifier doesn't know
|
By
Daniel Borkmann
· #288
·
|