|
Re: More BPF verifier questions
Here's the basic idea:
r1 = -8
r2 = -1
JGT r1, r2, end
JSGT r1, 1, end
ptr += r1
*(u8 *)ptr = 0
After the JGT, we're in the false branch so r1->min_value = 0 and r1->max_value
Here's the basic idea:
r1 = -8
r2 = -1
JGT r1, r2, end
JSGT r1, 1, end
ptr += r1
*(u8 *)ptr = 0
After the JGT, we're in the false branch so r1->min_value = 0 and r1->max_value
|
By
Edward Cree <ecree@...>
·
#769
·
|
|
Re: [iovisor/bcc] USDT broken by b0f891d129a9b372
Hi, Tetsuo,
You are right. The bug is actually introduced by my last patch. I just
focused one aspect of issue and inadvertently introduced another
*blocker* bug.
I just pushed a patch. Thanks a lot
Hi, Tetsuo,
You are right. The bug is actually introduced by my last patch. I just
focused one aspect of issue and inadvertently introduced another
*blocker* bug.
I just pushed a patch. Thanks a lot
|
By
Yonghong Song
·
#768
·
|
|
Re: [iovisor/bcc] USDT broken by b0f891d129a9b372
Hello.
I changed the hook as below and confirmed that cp == NULL at bpf_probe_read().
That is, it is bpf_usdt_readarg() which got broken.
----------
int do_start(struct pt_regs *ctx) {
char *cp
Hello.
I changed the hook as below and confirmed that cp == NULL at bpf_probe_read().
That is, it is bpf_usdt_readarg() which got broken.
----------
int do_start(struct pt_regs *ctx) {
char *cp
|
By
Tetsuo Handa <penguin-kernel@...>
·
#767
·
|
|
Re: More BPF verifier questions
Well the min_value is a s64, but yeah anything negative is supposed to be
rejected, so it essentially acts as the range of unsigned absolute values it can
hold. I tried to hand craft a way to exploit
Well the min_value is a s64, but yeah anything negative is supposed to be
rejected, so it essentially acts as the range of unsigned absolute values it can
hold. I tried to hand craft a way to exploit
|
By
Josef Bacik <josef@...>
·
#766
·
|
|
Re: [iovisor/bcc] USDT broken by b0f891d129a9b372
Tetsuo,
I cannot reproduce the issue.
The transformation from:
dest = ctx->bx;
to:
dest = *(volatile uint64_t *)&ctx->bx;
should be safe.
I launched a psql console and did a query:
...
yhs=>
Tetsuo,
I cannot reproduce the issue.
The transformation from:
dest = ctx->bx;
to:
dest = *(volatile uint64_t *)&ctx->bx;
should be safe.
I launched a psql console and did a query:
...
yhs=>
|
By
Yonghong Song
·
#764
·
|
|
Re: [iovisor/bcc] USDT broken by b0f891d129a9b372
Tetsuo,
I cannot reproduce the issue.
The transformation from:
dest = ctx->bx;
to:
dest = *(volatile uint64_t *)&ctx->bx;
should be safe.
I launched a psql console and did a query:
...
yhs=>
Tetsuo,
I cannot reproduce the issue.
The transformation from:
dest = ctx->bx;
to:
dest = *(volatile uint64_t *)&ctx->bx;
should be safe.
I launched a psql console and did a query:
...
yhs=>
|
By
Yonghong Song <yhs@...>
·
#765
·
|
|
Re: More BPF verifier questions
I think the way Josef intended it to behave is min/max_value are
absolute values that 64-bits can hold.
In that sense unsigned (JGT) comparison and the false branch are
implying that min_value =
I think the way Josef intended it to behave is min/max_value are
absolute values that 64-bits can hold.
In that sense unsigned (JGT) comparison and the false branch are
implying that min_value =
|
By
Alexei Starovoitov <ast@...>
·
#763
·
|
|
Re: Running Prototype-kernel package
I think that I solved it. I changed the code of xdp_ddos01_blacklist_kern.c:
case ETH_P_ARP: return XDP_PASS instead of break.
Works! :-)
I think that I solved it. I changed the code of xdp_ddos01_blacklist_kern.c:
case ETH_P_ARP: return XDP_PASS instead of break.
Works! :-)
|
By
Adel
·
#761
·
|
|
Re: Running Prototype-kernel package
Hi Jesper,
First of all, thanks for updating the prototype-kernel packet. It works!
I tried to switch to white list and it worked. Though, as a result,
there is no way to ping the machine and get a
Hi Jesper,
First of all, thanks for updating the prototype-kernel packet. It works!
I tried to switch to white list and it worked. Though, as a result,
there is no way to ping the machine and get a
|
By
Adel
·
#760
·
|
|
[iovisor/bcc] USDT broken by b0f891d129a9b372
Hello.
I noticed that b0f891d129a9b372 ("Force udst ctx->#reg load to be volatile")
broke an USDT probe example shown below.
----------
#!/usr/bin/python
import sys
import ctypes as ct
def
Hello.
I noticed that b0f891d129a9b372 ("Force udst ctx->#reg load to be volatile")
broke an USDT probe example shown below.
----------
#!/usr/bin/python
import sys
import ctypes as ct
def
|
By
Tetsuo Handa <penguin-kernel@...>
·
#762
·
|
|
Re: More BPF verifier questions
You are right. In this case,
r0 = bpf_map_lookup
r2 = r0
r3 = r0
r4 = r0
r5 = r0
if (r0 != 0) <=== condition 1
r1 = 1
if (r0 != 0)
r1 = 2
if (r3 != 0)
*r3 = 0
...
If (r0 != 0) if false, the
You are right. In this case,
r0 = bpf_map_lookup
r2 = r0
r3 = r0
r4 = r0
r5 = r0
if (r0 != 0) <=== condition 1
r1 = 1
if (r0 != 0)
r1 = 2
if (r3 != 0)
*r3 = 0
...
If (r0 != 0) if false, the
|
By
Yonghong Song
·
#759
·
|
|
More BPF verifier questions
A couple of the tests in tools/testing/selftests/bpf/test_verifier.c seem to be bogus: Test "multiple registers share map_lookup_elem bad reg type" is supposed to
error with "R3 invalid mem access
A couple of the tests in tools/testing/selftests/bpf/test_verifier.c seem to be bogus: Test "multiple registers share map_lookup_elem bad reg type" is supposed to
error with "R3 invalid mem access
|
By
Edward Cree <ecree@...>
·
#758
·
|
|
Re: Running Prototype-kernel package
Jesper Dangaard Brouer <brouer@...> wrote:
Done, updated the documentation in the prototype-kernel github repo.
See three top commits in this link:
Jesper Dangaard Brouer <brouer@...> wrote:
Done, updated the documentation in the prototype-kernel github repo.
See three top commits in this link:
|
By
Jesper Dangaard Brouer
·
#757
·
|
|
Re: Running Prototype-kernel package
The prototype-kernel github repo[1] is actually originally meant for
developing real kernel module. I guess, I should/could have placed the
eBPF/XDP examples[3] in another github repo.
[1]
The prototype-kernel github repo[1] is actually originally meant for
developing real kernel module. I guess, I should/could have placed the
eBPF/XDP examples[3] in another github repo.
[1]
|
By
Jesper Dangaard Brouer
·
#756
·
|
|
Re: Running Prototype-kernel package
<iovisor-dev@...> wrote:
Just looked at the code. This seems a control plane application.
You should not compile with "-target bpf". You should just use the
default host one if you are
<iovisor-dev@...> wrote:
Just looked at the code. This seems a control plane application.
You should not compile with "-target bpf". You should just use the
default host one if you are
|
By
Yonghong Song
·
#755
·
|
|
Running Prototype-kernel package
Hi Jesper,
Thank you so much for your help. I need to run an eBPF programs that
filters packets according to IP address or port. I'm trying to run the
prototype-kernel package but encounter
Hi Jesper,
Thank you so much for your help. I need to run an eBPF programs that
filters packets according to IP address or port. I'm trying to run the
prototype-kernel package but encounter
|
By
Adel
·
#754
·
|
|
Re: Error with printk and bpf_trace_printk
Adel Fuchs <adelfuchs@...> wrote:
I assume you are doing:
sudo cat /sys/kernel/debug/tracing/trace_pipe
The problem could be that the kernel need to be compiled with the right
trace config
Adel Fuchs <adelfuchs@...> wrote:
I assume you are doing:
sudo cat /sys/kernel/debug/tracing/trace_pipe
The problem could be that the kernel need to be compiled with the right
trace config
|
By
Jesper Dangaard Brouer
·
#753
·
|
|
Re: Error with printk and bpf_trace_printk
Hi Jesper,
I tried adding your solution, bpf_debug, and I'm now able to run the
program with no errors but the trace_pipe file stays empty.
I just added this to my program:
#ifdef DEBUG
/* Only use
Hi Jesper,
I tried adding your solution, bpf_debug, and I'm now able to run the
program with no errors but the trace_pipe file stays empty.
I just added this to my program:
#ifdef DEBUG
/* Only use
|
By
Adel
·
#752
·
|
|
Running an eBPF program
Hi,
I'm trying to run this program:
https://github.com/idosch/iproute2/blob/master/examples/bpf/bpf_prog.c
$tc filter add dev enx00e11100329b parent 1: bpf obj bpf.o exp /
/tmp/bpf-uds flowid 1:1
Hi,
I'm trying to run this program:
https://github.com/idosch/iproute2/blob/master/examples/bpf/bpf_prog.c
$tc filter add dev enx00e11100329b parent 1: bpf obj bpf.o exp /
/tmp/bpf-uds flowid 1:1
|
By
Adel
·
#751
·
|
|
minutes: IO Visor TSC/Dev Meeting
Hi All,
Thanks for joining the meeting today. Here are the notes!
=== Conferences ===
Reminder: CFP for Linux Plumbers
Please submit a topic for the Tracing
Hi All,
Thanks for joining the meeting today. Here are the notes!
=== Conferences ===
Reminder: CFP for Linux Plumbers
Please submit a topic for the Tracing
|
By
Brenden Blanco
·
#750
·
|