|
ebpf kprobe modify skb ?
Now i want to modify something of the skb with the ebpf in the prog_type kprobe.
However, the help function `bpf_skb_store_bytes` is not supported with the prog_type BPF_PROG_TYPE_KPROBE.
I test it
Now i want to modify something of the skb with the ebpf in the prog_type kprobe.
However, the help function `bpf_skb_store_bytes` is not supported with the prog_type BPF_PROG_TYPE_KPROBE.
I test it
|
By
周小明 <zhouxiaoming@...>
·
#1009
·
|
|
Re: modifying packets in XDP
This is the problem:
static inline uint16_t parse_tcp_pld(void *data, u64 nh_off, void *data_end) {
uint16_t *pld = data + nh_off;
if ((void*)&pld[1] > data_end)
return 0;
return
This is the problem:
static inline uint16_t parse_tcp_pld(void *data, u64 nh_off, void *data_end) {
uint16_t *pld = data + nh_off;
if ((void*)&pld[1] > data_end)
return 0;
return
|
By
Yonghong Song
·
#1008
·
|
|
Re: modifying packets in XDP
If I just copy your swapu16 function into my code (and it looks very similar to mine) the result continues to be the same (error).
Here is a gist with python and c-components of my
If I just copy your swapu16 function into my code (and it looks very similar to mine) the result continues to be the same (error).
Here is a gist with python and c-components of my
|
By
Ilya Baldin <ibaldin@...>
·
#1007
·
|
|
Re: modifying packets in XDP
Thank you! Let me run a gap analysis to see what’s different.
-ilya
Ilya Baldin
Director, Networking Research and Infrastructure
RENCI/UNC Chapel Hill
http://www.renci.org
Thank you! Let me run a gap analysis to see what’s different.
-ilya
Ilya Baldin
Director, Networking Research and Infrastructure
RENCI/UNC Chapel Hill
http://www.renci.org
|
By
Ilya Baldin <ibaldin@...>
·
#1006
·
|
|
Re: modifying packets in XDP
I’m staring at the BPF ‘pseudocode’ now. I wouldn’t put it past me to do something stupid.
-ilya
Ilya Baldin
I’m staring at the BPF ‘pseudocode’ now. I wouldn’t put it past me to do something stupid.
-ilya
Ilya Baldin
|
By
Ilya Baldin <ibaldin@...>
·
#1005
·
|
|
Re: modifying packets in XDP
Here is a full BCC version that worked for me:
#!/usr/bin/env python
import bcc
text = """
static inline int swapu16(uint16_t *start, void *data_end, int off1, int off2) {
int len =
Here is a full BCC version that worked for me:
#!/usr/bin/env python
import bcc
text = """
static inline int swapu16(uint16_t *start, void *data_end, int off1, int off2) {
int len =
|
By
Brenden Blanco
·
#1004
·
|
|
Re: modifying packets in XDP
Note that:
R6=inv,min_value=4,max_value=65539,min_align=1,aux_off_align=2
"inv" means unknown value.
Could you double check your program?
Note that:
R6=inv,min_value=4,max_value=65539,min_align=1,aux_off_align=2
"inv" means unknown value.
Could you double check your program?
|
By
Yonghong Song
·
#1003
·
|
|
Re: modifying packets in XDP
Thank you, everyone for the replies. This explains about bpf_probe_read.
I tried the approach below (changed the check to offset +1) however that didn’t help, I still get the same error and BCC
Thank you, everyone for the replies. This explains about bpf_probe_read.
I tried the approach below (changed the check to offset +1) however that didn’t help, I still get the same error and BCC
|
By
Ilya Baldin <ibaldin@...>
·
#1002
·
|
|
Re: modifying packets in XDP
<iovisor-dev@...> wrote:
The error comes from here:
https://github.com/iovisor/bcc/blob/master/src/cc/libbpf.c#L210
But as Yonghong said, you cannot use bpf_probe_read from XDP and
<iovisor-dev@...> wrote:
The error comes from here:
https://github.com/iovisor/bcc/blob/master/src/cc/libbpf.c#L210
But as Yonghong said, you cannot use bpf_probe_read from XDP and
|
By
Brenden Blanco
·
#1001
·
|
|
Re: modifying packets in XDP
I was wondering about this last one, and where this suggestion
comes from exactly (bcc for sure?). How does the error message
look like?
I was wondering about this last one, and where this suggestion
comes from exactly (bcc for sure?). How does the error message
look like?
|
By
Daniel Borkmann
·
#1000
·
|
|
Re: modifying packets in XDP
CC to bcc mailing list as well.
bpf_probe_read is not allowed in XDP programs.
Your comparison may need to comparison not just starting offset, but
also including the memory size so the
whole write
CC to bcc mailing list as well.
bpf_probe_read is not allowed in XDP programs.
Your comparison may need to comparison not just starting offset, but
also including the memory size so the
whole write
|
By
Yonghong Song
·
#999
·
|
|
Re: [PATCH v2 net-next 0/5] bpf: verifier fixes
From: Edward Cree <ecree@...>
Date: Wed, 23 Aug 2017 15:07:20 +0100
Series applied, thanks Edward.
From: Edward Cree <ecree@...>
Date: Wed, 23 Aug 2017 15:07:20 +0100
Series applied, thanks Edward.
|
By
David S. Miller
·
#998
·
|
|
Re: minutes: IO Visor TSC/Dev Meeting
<iovisor-dev@...> wrote:
the proposals from tracing wiki need to be re-submitted
to show up in official plumbers schedule.
Please do so
<iovisor-dev@...> wrote:
the proposals from tracing wiki need to be re-submitted
to show up in official plumbers schedule.
Please do so
|
By
Alexei Starovoitov
·
#997
·
|
|
minutes: IO Visor TSC/Dev Meeting
Hi All,
Thanks for joining in to the call today. We shared a round of updates, which are
included in the notes below.
Also please remember that Plumbers is right around the corner! If you
Hi All,
Thanks for joining in to the call today. We shared a round of updates, which are
included in the notes below.
Also please remember that Plumbers is right around the corner! If you
|
By
Brenden Blanco
·
#996
·
|
|
[RFC] pktgen: add bpf fill support
Adds ability to attach a BPF program to a pktgen thread. The program
should fill in the contents of each packet from scratch, including
checksum.
The context passed in is currently in the form of
Adds ability to attach a BPF program to a pktgen thread. The program
should fill in the contents of each packet from scratch, including
checksum.
The context passed in is currently in the form of
|
By
Brenden Blanco
·
#995
·
|
|
Re: [PATCH v2 net-next 5/5] bpf/verifier: document liveness analysis
Acked-by: Daniel Borkmann <daniel@...>
Acked-by: Daniel Borkmann <daniel@...>
|
By
Daniel Borkmann
·
#994
·
|
|
Re: [PATCH v2 net-next 2/5] bpf/verifier: when pruning a branch, ignore its write marks
Acked-by: Daniel Borkmann <daniel@...>
Acked-by: Daniel Borkmann <daniel@...>
|
By
Daniel Borkmann
·
#993
·
|
|
Re: [PATCH v2 net-next 4/5] bpf/verifier: remove varlen_map_value_access flag
Acked-by: Daniel Borkmann <daniel@...>
Acked-by: Daniel Borkmann <daniel@...>
|
By
Daniel Borkmann
·
#992
·
|
|
Re: [PATCH v2 net-next 3/5] selftests/bpf: add a test for a pruning bug in the verifier
Acked-by: Daniel Borkmann <daniel@...>
Acked-by: Daniel Borkmann <daniel@...>
|
By
Daniel Borkmann
·
#991
·
|
|
Re: [PATCH v2 net-next 1/5] selftests/bpf: add a test for a bug in liveness-based pruning
Acked-by: Alexei Starovoitov <ast@...>
Acked-by: Alexei Starovoitov <ast@...>
|
By
Alexei Starovoitov <ast@...>
·
#989
·
|