- 04 Oct, 2017 1 commit
-
-
Prashant Bhole authored
Reason: The intention of initial version of this example was to provide a loop-uprolling example and expected functionality was to drop DNS packets requesting the DNS name contained in the map. But the functionality doesn't work as exepected because the BPF program attached to the raw socket only filters the packets received by the python program. With these modifications, it still serves as a loop-unrolling example, with slightly different functionality. Inverted return values of bpf program. It keeps the packet if the name in DNS packet is also exists in the map. All other packets are dropped. Python program is modified to read packets from raw socket. DNS data from the packet is parsed and printed using dnslib library.
-
- 02 Oct, 2017 1 commit
-
-
Prashant Bhole authored
Makes it slightly easier to add more cache entries
-
- 01 Oct, 2017 1 commit
-
-
yonghong-song authored
examples: fix dns_matching
-
- 29 Sep, 2017 1 commit
-
-
Paul Chaignon authored
Partially reverts 80667b7b, "Fix unary operator handling of probe reads with parens", keeping the test case. With 4c6ecb46, "Restrict rewrite of unary operators to dereference operator," only dereferences are rewritten, removing the need for the previous fix. Reverting 80667b7b allows bcc to rewrite more dereferences, as highlighted in the new test case.
-
- 28 Sep, 2017 3 commits
-
-
Prashant Bhole authored
The for loop was copying garbase characters after domain name. Fixed this by adding correct terminating condition. Also removed unnecessary code Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
-
Prashant Bhole authored
Loop unrolling was not working because of if-condition in the loop. Added #pragma unroll directive. Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
-
Prashant Bhole authored
Changed key length to 255, maximum length of DNS domain name. Also fixed double increment of loop variable. These both changes fix buffer overrun. Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
-
- 27 Sep, 2017 1 commit
-
-
yonghong-song authored
bpf_probe_read*: src argument should be const void *.
-
- 26 Sep, 2017 6 commits
-
-
yonghong-song authored
Fix shared library loaded into multiple sections
-
Teng Qin authored
-
Teng Qin authored
-
Teng Qin authored
-
yonghong-song authored
Use ELF load sections in address -> symbol resolution
-
Paul Chaignon authored
LPM trie maps require the BPF_F_NO_PREALLOC flag on creation. The need for this flag is not obvious at first; this new macro should help avoid the mistake.
-
- 25 Sep, 2017 4 commits
-
-
Teng Qin authored
-
Teng Qin authored
-
yonghong-song authored
Fix edge case when doing symbol name -> address resolution
-
Kirill Smelkov authored
For the following program: #include <linux/interrupt.h> // remember t(last-interrupt) on interface int kprobe__handle_irq_event_percpu(struct pt_regs *ctx, struct irq_desc *desc) { const char *irqname = desc->action->name; char c; bpf_probe_read(&c, 1, &irqname[0]); if (c != 'e') return 0; bpf_probe_read(&c, 1, &irqname[1]); if (c != 't') return 0; ... LLVM gives warnings because irqaction->name is `const char *`: /virtual/main.c:10:27: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] bpf_probe_read(&c, 1, &irqname[0]); ^~~~~~~~~~~ /virtual/main.c:13:27: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] bpf_probe_read(&c, 1, &irqname[1]); ^~~~~~~~~~~ ... Instead of adding casts in source everywhere fix bpf_probe_read* signature to indicate the memory referenced by src won't be modified, as it should be. P.S. bpf_probe_read_str was in fact already marked so in several places in comments but not in actual signature.
-
- 21 Sep, 2017 6 commits
-
-
Teng Qin authored
-
Teng Qin authored
-
Teng Qin authored
-
Sandipan Das authored
In order to run, some test programs depend on the availability of binaries in locations that are part of PATH. So, we add a generic utility to simplify this. Signed-off-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
-
Sandipan Das authored
If netperf is not installed or installed at a location that is not in PATH as recognized by Python, then 'test_brb' and 'test_brb2' freeze after an OSError is raised. To avoid this, we proactively check if the 'iperf', 'netserver' and 'netperf' binaries are available before making the corresponding NSPopen() calls. Signed-off-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
-
yonghong-song authored
Fix 'test_debuginfo' from failing if a kernel symbol has multiple aliases
-
- 20 Sep, 2017 3 commits
-
-
Brendan Gregg authored
Update LINKS.md
-
Paul Chaignon authored
-
Sandipan Das authored
The first symbol from /proc/kallsyms is read by 'test_debuginfo' and the name obtained here is compared against the name obtained from the BPF.ksym() library call. In some architectures such as powerpc64le, a kernel symbol may have multiple aliases that refer to the same address. So, to avoid the test from failing, we need to compare the name returned by BPF.ksym() against all possible aliases for the given address in /proc/kallsyms and look for a match. Signed-off-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
-
- 15 Sep, 2017 2 commits
-
-
Gary Lin authored
Signed-off-by: Gary Lin <glin@suse.com>
-
Teng Qin authored
-
- 13 Sep, 2017 1 commit
-
-
Teng Qin authored
-
- 12 Sep, 2017 2 commits
-
-
Colin Ian King authored
Signed-off-by: Colin Ian King <colin.king@canonical.com>
-
samuelnair authored
nfsdist: trace NFS operation latency distribution, similar to the other *dist tools.
-
- 09 Sep, 2017 2 commits
-
-
Brendan Gregg authored
Fix for incorrect tool arguments in the man pages
-
Samuel Nair authored
-
- 08 Sep, 2017 4 commits
-
-
Teng Qin authored
-
4ast authored
Improve string buffer checking on uprobe attach and detach
-
Teng Qin authored
-
yonghong-song authored
annotate program tag
-
- 07 Sep, 2017 2 commits
-
-
4ast authored
Do not create instance for kprobe
-
Brendan Gregg authored
Fix for bug in lesson 4 of the Python developer tutorial
-