Overall, this set looks good to me. The only suggestion I have is to add more
documentation on the expected behavior of XDP_XMIT_FLUSH in netdevice.h
(as part of 01/08).
Thanks,
Song
On Wed, May 30, 2018 at 11:00 AM, Jesper Dangaard Brouer
wrote:
> As I mentioned in merge commit 10f67868
(struct bpf_dtab_netdev *obj,
> -struct xdp_bulk_queue *bq)
> + struct xdp_bulk_queue *bq, bool flush)
How about we use "int flags" instead of "bool flush" for easier extension?
Thanks,
Song
> {
> struct net_devic
flags & XDP_XMIT_FLUSH))
> + i40e_xdp_ring_update_tail(vsi->xdp_rings[queue_index]);
> +
> return n - drops;
Do we still flush when drops > 0?
Thanks,
Song
> }
>
>
xdp_frame **xdp);
> + struct xdp_frame **xdp,
> + u32 flags);
> void (*ndo_xdp_flush)(struct net_device *dev);
> };
>
> diff --git a/include/net/xdp.h b/include/net/xdp
On Sun, May 27, 2018 at 5:43 PM, Daniel Borkmann wrote:
> Range is 0-7, not 0-9, otherwise parser silently excludes it from the
> strtol() rather than throwing an error.
>
> Reported-by: Marc Boschma
> Signed-off-by: Daniel Borkmann
> Acked-by: Alexei Starovoitov
_u32 remote_ipv6[4]; /* 16 */
> }; /*1216 */
>
> /* size: 28, cachelines: 1, members: 4 */
> /* sum members: 26, holes: 1, sum holes: 2 */
> /* last cacheline: 28 bytes */
> };
>
> Signe
allback directly if we find that there's only a
> single path with a map pointer leading to the helper call, meaning
> when the map pointer has not been poisoned from verifier side.
> Example code can be seen above for the delete case.
>
> Sig
+ const u32 size_machine = sizeof(unsigned long);
> +
> + if (size > size_machine && size % size_machine == 0)
> + size = size_machine;
Not sure whether I understand this correctly. I guess we only need:
if (size % size_machine =
then use it along with bpftool in order to inspect an individual
>>> application's used maps and progs. Right now we dump some basic
>>> information in the fdinfo file but with the help of the map/prog
>>> id full introspection becomes possible now.
>>>
>>&g
On Sun, May 27, 2018 at 5:43 PM, Daniel Borkmann wrote:
> Pull in recent changes from include/uapi/linux/bpf.h.
>
> Signed-off-by: Daniel Borkmann
> Acked-by: Alexei Starovoitov
Acked-by: Song Liu
> ---
> tools/include/uapi/linux/bpf.h | 20 ++--
>
On Sun, May 27, 2018 at 5:43 PM, Daniel Borkmann wrote:
> Add missing bits under tools/lib/bpf/ and also Q: entry in order to
> make it easier for people to retrieve current patch queue.
>
> Signed-off-by: Daniel Borkmann
> Acked-by: Alexei Starovoitov
Ack
ion.
>>
>> Signed-off-by: Andrey Ignatov
>
> Reviewed-by: Jakub Kicinski
>
>> I'm not sure about "since 4.18" in Documentation part. I can follow-up when
>> the next kernel version is known.
>
> IMHO it's fine, we can follow up if Linus decides to call it something
> else :)
>
> Thanks!
Acked-by: Song Liu
ingress).
> *
> * *ctx* is either **struct xdp_md** for XDP programs or
> * **struct sk_buff** tc cls_act programs.
> - *
> * Return
> * Egress device index on success, 0 if packet needs to continue
> * up the stack for further processing or a negative error in
> case
> --
> 2.14.1
>
Please also apply the same changes to tools/include/uapi/linux/bpf.h.
Other than this, it looks to me.
Acked-by: Song Liu
Thanks,
Song
ust
>> not compatible.
>>
>> Reference: https://twitter.com/majek04/status/998531268039102465
>> Signed-off-by: Daniel Borkmann
>> Acked-by: Alexei Starovoitov
>
> Acked-by: Jesper Dangaard Brouer
>
> Thank you for cleaning up this confusion :-)
>
Acked-by: Son
tarovoitov
Acked-by: Song Liu
> ---
> lib/test_bpf.c | 63
> ++
> 1 file changed, 63 insertions(+)
>
> diff --git a/lib/test_bpf.c b/lib/test_bpf.c
> index 317f231..60aedc8 100644
> --- a/lib/test_bpf.c
> +++ b/lib
; Acked-by: Alexei Starovoitov
Acked-by: Song Liu
> ---
> include/linux/filter.h | 10 ++
> tools/include/linux/filter.h| 10 ++
> tools/testing/selftests/bpf/test_verifier.c | 185
>
> 3 files changed, 178 insertion
zen_or_stopped(txq))
return false;
This patch cleans up the code by removing the whole condition.
For more discussion about this, please refer to
https://marc.info/?t=15272719578
Signed-off-by: Song Liu
Cc: John Fastabend
Cc: Alexei Starovoitov
Cc: David S. Miller
---
net/sched
> On May 29, 2018, at 1:58 AM, Sergei Shtylyov
> wrote:
>
> Hello!
>
> On 5/29/2018 12:36 AM, Song Liu wrote:
>
>> Check sch_direct_xmit() at the end of sch_direct_xmit() will be bypassed.
>
> "Checking netif_xmit_frozen_or_stopped()",
> On May 29, 2018, at 7:02 AM, David Miller wrote:
>
> From: Song Liu
> Date: Fri, 25 May 2018 11:11:44 -0700
>
>> Summary:
>>
>> At the end of sch_direct_xmit(), we are in the else path of
>> !dev_xmit_complete(ret), which means ret == NETDEV_TX_OK.
return false;
This patch cleans up the code by removing the whole condition.
For more discussion about this, please refer to
https://marc.info/?t=15272719578
Signed-off-by: Song Liu
Cc: John Fastabend
Cc: Alexei Starovoitov
Cc: David S. Miller
---
net/sched/sch_generic.c | 3 -
> On May 26, 2018, at 12:43 PM, John Fastabend wrote:
>
> On 05/25/2018 12:46 PM, Song Liu wrote:
>> On Fri, May 25, 2018 at 11:11 AM, Song Liu wrote:
>>> Summary:
>>>
>>> At the end of sch_direct_xmit(), we are in the else path of
&g
the psock from sk_user_data.
>
> Both removal paths omitted taking the hash bucket lock resulting
> in the case where we have two references that are in the process
> of being free'd.
>
> Reported-by: syzbot+a761b81c211794fa1...@syzkaller.appspotmail.com
> Signed-off-by: Jo
> On May 25, 2018, at 3:14 AM, Yafang Shao <laoar.s...@gmail.com> wrote:
>
> skb->len is meaningless to user.
> data length could be more helpful, with which we can easily filter out
> the packet without payload.
>
> Signed-off-by: Yafang Shao <laoar.s.
rey Ignatov <r...@fb.com>
> Acked-by: Martin KaFai Lau <ka...@fb.com>
Acked-by: Song Liu <songliubrav...@fb.com>
ILD_ID_VALID;
> }
>
> - if (!in_nmi_ctx) {
> + if (!work) {
> up_read(>mm->mmap_sem);
> } else {
> work->sem = >mm->mmap_sem;
> --
> 2.9.0
>
Acked-by: Song Liu <songliubrav...@fb.com>
olve_sink(const struct
> btf_verifier_env *env,
> !btf_type_is_array(next_type) &&
> !btf_type_is_struct(next_type);
> default:
> - BUG_ON(1);
> + BUG();
> }
> }
>
> --
> 2.9.0
>
Acked-by: Song Liu <songliubrav...@fb.com>
On Fri, May 25, 2018 at 11:11 AM, Song Liu <songliubrav...@fb.com> wrote:
> Summary:
>
> At the end of sch_direct_xmit(), we are in the else path of
> !dev_xmit_complete(ret), which means ret == NETDEV_TX_OK. The following
> condition will always fail and netif_x
th")
Cc: John Fastabend <john.fastab...@gmail.com>
Cc: David S. Miller <da...@davemloft.net>
Signed-off-by: Song Liu <songliubrav...@fb.com>
---
net/sched/sch_generic.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/sched/sch_generic.c b/net/sched/
On Fri, May 25, 2018 at 8:21 AM, Alban Crequy <al...@kinvolk.io> wrote:
> On Wed, May 23, 2018 at 4:34 AM Y Song <ys114...@gmail.com> wrote:
>
>> I did a quick prototyping and the above interface seems working fine.
>
> Thanks! I gave your kernel patch & us
On Fri, May 25, 2018 at 9:16 AM, Y Song <ys114...@gmail.com> wrote:
> On Fri, May 25, 2018 at 4:20 AM, Mathieu Xhonneux <m.xhonn...@gmail.com>
> wrote:
>> Previous patch "selftests/bpf: test for seg6local End.BPF action" lacks
>> some UAPI headers in too
gt; [...]/net-next/tools/testing/selftests/bpf/test_lwt_seg6local.o
> test_lwt_seg6local.c:4:10: fatal error: 'linux/seg6_local.h' file not found
> ^~~~
> 1 error generated.
> make: Leaving directory
> `/data/users/yhs/work/net-next/tools/testing/selftests/bpf'
>
>
gt; [...]/net-next/tools/testing/selftests/bpf/test_lwt_seg6local.o
> test_lwt_seg6local.c:4:10: fatal error: 'linux/seg6_local.h' file not found
> ^~~~
> 1 error generated.
> make: Leaving directory
> `/data/users/yhs/work/net-next/tools/testing/selftests/bpf'
>
>
When compiling latest bpf-next, I hit the following compilation error:
clang -I. -I./include/uapi -I../../../include/uapi -idirafter
/usr/local/include -idirafter
/data/users/yhs/work/llvm/build/install/lib/clang/7.0.0/include
-idirafter /usr/include -Wno-compare-distinct-pointer-types \
The new tests are added to query perf_event information
for raw_tracepoint and tracepoint attachment. For tracepoint,
both syscalls and non-syscalls tracepoints are queries as
they are treated slightly differently inside the kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/t
This is mostly to test kprobe/uprobe which needs kernel headers.
Signed-off-by: Yonghong Song <y...@fb.com>
---
samples/bpf/Makefile | 4 +
samples/bpf/task_fd_query_kern.c | 19 ++
samples/bpf/task_fd_query_user.c | 382 +++
3 files c
write
21765 pts/0S+ 0:00 python ./trace.py r::__x64_sys_nanosleep
21767 pts/2S+ 0:00 python ./trace.py t:syscalls:sys_enter_nanosleep
21800 pts/3S+ 0:00 python ./trace.py p:/home/yhs/a.out:main
22374 pts/1S+ 0:00 grep --color=auto py
ed-off-by: Yonghong Song <y...@fb.com>
---
tools/include/uapi/linux/bpf.h | 26 ++
tools/lib/bpf/bpf.c| 23 +++
tools/lib/bpf/bpf.h| 3 +++
3 files changed, 52 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/includ
com>
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/testing/selftests/bpf/trace_helpers.c | 12
tools/testing/selftests/bpf/trace_helpers.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/tools/testing/selftests/bpf/trace_helpers.c
b/tools/testing/selftests/bpf/tra
rf" issues and added documentation
and auto-completion.
Yonghong Song (7):
perf/core: add perf_get_event() to return perf_event given a struct
file
bpf: introduce bpf subcommand BPF_TASK_FD_QUERY
tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in
libbpf
tools/bpf:
A new extern function, perf_get_event(), is added to return a perf event
given a struct file. This function will be used in later patches.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/perf_event.h | 5 +
kernel/events/core.c | 8
2 files changed, 13 inse
Acked-by: Martin KaFai Lau <ka...@fb.com>
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/trace_events.h | 17 ++
include/uapi/linux/bpf.h | 26 +
kernel/bpf/syscall.c | 131 +++
kernel
o rename __entry->length to __entry->data_len, so that whoever
using this field will notice the change.
Thanks,
Song
> __entry->snd_nxt = tp->snd_nxt;
> __entry->snd_una = tp->snd_una;
> __entry->snd_cwnd = tp->snd_cwnd;
> @@
On 5/23/18 10:07 PM, Martin KaFai Lau wrote:
On Wed, May 23, 2018 at 05:18:42PM -0700, Yonghong Song wrote:
Currently, suppose a userspace application has loaded a bpf program
and attached it to a tracepoint/kprobe/uprobe, and a bpf
introspection tool, e.g., bpftool, wants to show which bpf
This is mostly to test kprobe/uprobe which needs kernel headers.
Signed-off-by: Yonghong Song <y...@fb.com>
---
samples/bpf/Makefile | 4 +
samples/bpf/task_fd_query_kern.c | 19 ++
samples/bpf/task_fd_query_user.c | 382 +++
3 files c
The new tests are added to query perf_event information
for raw_tracepoint and tracepoint attachment. For tracepoint,
both syscalls and non-syscalls tracepoints are queries as
they are treated slightly differently inside the kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/t
write
21765 pts/0S+ 0:00 python ./trace.py r::__x64_sys_nanosleep
21767 pts/2S+ 0:00 python ./trace.py t:syscalls:sys_enter_nanosleep
21800 pts/3S+ 0:00 python ./trace.py p:/home/yhs/a.out:main
22374 pts/1S+ 0:00 grep --color=auto py
_id.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/trace_events.h | 17 +++
include/uapi/linux/bpf.h | 26 ++
kernel/bpf/syscall.c | 115 +++
kernel/trace/bpf_trace.c | 48 ++
kernel/trace
A new extern function, perf_get_event(), is added to return a perf event
given a struct file. This function will be used in later patches.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/perf_event.h | 5 +
kernel/events/core.c | 8
2 files changed, 13 inse
Sync kernel header bpf.h to tools/include/uapi/linux/bpf.h and
implement bpf_task_fd_query() in libbpf. The test programs
in samples/bpf and tools/testing/selftests/bpf, and later bpftool
will use this libbpf function to query kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/i
com>
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/testing/selftests/bpf/trace_helpers.c | 12
tools/testing/selftests/bpf/trace_helpers.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/tools/testing/selftests/bpf/trace_helpers.c
b/tools/testing/selftests/bpf/tra
quot; issues and added documentation
and auto-completion.
Yonghong Song (7):
perf/core: add perf_get_event() to return perf_event given a struct
file
bpf: introduce bpf subcommand BPF_TASK_FD_QUERY
tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in
libbpf
tools/bpf: add
On 5/23/18 2:04 PM, Alexei Starovoitov wrote:
On Wed, May 23, 2018 at 10:13:22AM -0700, Martin KaFai Lau wrote:
+ __u32 prog_id;/* output: prod_id */
+ __u32 attach_info;/* output: BPF_ATTACH_* */
+ __u64
On 5/23/18 10:13 AM, Martin KaFai Lau wrote:
On Tue, May 22, 2018 at 09:30:46AM -0700, Yonghong Song wrote:
Currently, suppose a userspace application has loaded a bpf program
and attached it to a tracepoint/kprobe/uprobe, and a bpf
introspection tool, e.g., bpftool, wants to show which bpf
On Tue, May 22, 2018 at 8:35 PM, Alexei Starovoitov
<alexei.starovoi...@gmail.com> wrote:
> On Tue, May 22, 2018 at 08:33:24PM -0700, Y Song wrote:
>> + struct cgroup *cgrp = task_dfl_cgroup(current);
>> + if (!cgrp)
>> + return -EINVAL;
&
d user space cgid matches. Will provide a
formal patch later.
On Mon, May 21, 2018 at 5:24 PM, Y Song <ys114...@gmail.com> wrote:
> On Mon, May 21, 2018 at 9:26 AM, Alexei Starovoitov
> <alexei.starovoi...@gmail.com> wrote:
>> On Sun, May 13, 2018 at 07:33:18PM +0200, Alban
./trace.py __x64_sys_write
21765 pts/0S+ 0:00 python ./trace.py r::__x64_sys_nanosleep
21767 pts/2S+ 0:00 python ./trace.py t:syscalls:sys_enter_nanosleep
21800 pts/3S+ 0:00 python ./trace.py p:/home/yhs/a.out:main
22374 pts/1S+ 0:00 grep --color=auto py
The new tests are added to query perf_event information
for raw_tracepoint and tracepoint attachment. For tracepoint,
both syscalls and non-syscalls tracepoints are queries as
they are treated slightly differently inside the kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/t
This is mostly to test kprobe/uprobe which needs kernel headers.
Signed-off-by: Yonghong Song <y...@fb.com>
---
samples/bpf/Makefile | 4 +
samples/bpf/task_fd_query_kern.c | 19 ++
samples/bpf/task_fd_query_user.c | 379 +++
3 files c
. changed bpf subcommand name from BPF_PERF_EVENT_QUERY
to BPF_TASK_FD_QUERY.
. fixed various "bpftool perf" issues and added documentation
and auto-completion.
Yonghong Song (7):
perf/core: add perf_get_event() to return perf_event given a struct
file
bpf: intr
_id.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/trace_events.h | 16 ++
include/uapi/linux/bpf.h | 27 ++
kernel/bpf/syscall.c | 124 +++
kernel/trace/bpf_trace.c | 48 +
kernel/trace
A new extern function, perf_get_event(), is added to return a perf event
given a struct file. This function will be used in later patches.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/perf_event.h | 5 +
kernel/events/core.c | 8
2 files changed, 13 inse
Sync kernel header bpf.h to tools/include/uapi/linux/bpf.h and
implement bpf_trace_event_query() in libbpf. The test programs
in samples/bpf and tools/testing/selftests/bpf, and later bpftool
will use this libbpf function to query kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
Given a kernel function name, ksym_get_addr() will return the kernel
address for this function, or 0 if it cannot find this function name
in /proc/kallsyms. This function will be used later when a kernel
address is used to initiate a kprobe perf event.
Signed-off-by: Yonghong Song <y...@fb.
On 5/18/18 5:16 PM, Martin KaFai Lau wrote:
Instead of ingoring the array->index_type field. Enforce that
it must be an unsigned BTF_KIND_INT.
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/btf.c | 83
1 file changed,
On Mon, May 21, 2018 at 9:26 AM, Alexei Starovoitov
wrote:
> On Sun, May 13, 2018 at 07:33:18PM +0200, Alban Crequy wrote:
>>
>> +BPF_CALL_2(bpf_get_current_cgroup_ino, u32, hierarchy, u64, flags)
>> +{
>> + // TODO: pick the correct hierarchy instead of the mem
be added back later because the verifier
ensures the unused bits are zeros.
Signed-off-by: Martin KaFai Lau <ka...@fb.com>
Acked-by: Yonghong Song <y...@fb.com>
_key_id" and "btf_value_id" means the BTF type id within
that BTF object.
To make it clear, btf_key_id and btf_value_id are
renamed to btf_key_type_id and btf_value_type_id.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Martin KaFai Lau <ka...@fb.com>
Acked-by: Yonghong Song <y...@fb.com>
On 5/18/18 5:16 PM, Martin KaFai Lau wrote:
Instead of ingoring the array->index_type field. Enforce that
it must be an unsigned BTF_KIND_INT.
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/btf.c | 83
1 file changed,
On 5/18/18 5:16 PM, Martin KaFai Lau wrote:
There are currently unused section descriptions in the btf_header. Those
sections are here to support future BTF use cases. For example, the
func section (func_off) is to support function signature (e.g. the BPF
prog function signature).
Instead
On 5/18/18 5:16 PM, Martin KaFai Lau wrote:
This patch exposes check_uarg_tail_zero() which will
be reused by a later BTF patch. Its name is changed to
bpf_check_uarg_tail_zero().
Signed-off-by: Martin KaFai Lau <ka...@fb.com>
Acked-by: Yonghong Song <y...@fb.com>
On Fri, May 18, 2018 at 1:51 PM, Jakub Kicinski
<jakub.kicin...@netronome.com> wrote:
> On Thu, 17 May 2018 22:03:10 -0700, Yonghong Song wrote:
>> The new command "bpftool perf [show | list]" will traverse
>> all processes under /proc, and if any fd is
On Fri, May 18, 2018 at 1:17 PM, Y Song <ys114...@gmail.com> wrote:
> On Fri, May 18, 2018 at 7:07 AM, Sean Young <s...@mess.org> wrote:
>> This is simple test over rc-loopback.
>>
>> Signed-off-by: Sean Young <s...@mess.org>
>
> Acked-by: Yonghong
On Fri, May 18, 2018 at 7:07 AM, Sean Young <s...@mess.org> wrote:
> This is simple test over rc-loopback.
>
> Signed-off-by: Sean Young <s...@mess.org>
Acked-by: Yonghong Song <y...@fb.com>
> ---
> tools/bpf/bpftool/prog.c | 1 +
be attached to using the bpf(BPF_PROG_ATTACH) syscall;
> the target_fd must be the /dev/lircN device.
>
> Signed-off-by: Sean Young <s...@mess.org>
Acked-by: Yonghong Song <y...@fb.com>
> ---
> drivers/media/rc/Kconfig| 13 ++
> drivers/media/rc/Ma
On Fri, May 18, 2018 at 7:07 AM, Sean Young <s...@mess.org> wrote:
> This makes is it possible for bpf prog detach to return -ENOENT.
>
> Signed-off-by: Sean Young <s...@mess.org>
Acked-by: Yonghong Song <y...@fb.com>
On 5/18/18 12:18 AM, Peter Zijlstra wrote:
On Thu, May 17, 2018 at 10:32:53PM -0700, Yonghong Song wrote:
A new extern function, perf_get_event(), is added to return a perf event
given a struct file. This function will be used in later patches.
Can't you do a narrower interface? Like return
A new extern function, perf_get_event(), is added to return a perf event
given a struct file. This function will be used in later patches.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/perf_event.h | 5 +
kernel/events/core.c | 8
2 files changed, 13 inse
On Thu, May 17, 2018 at 2:45 PM, Sean Young <s...@mess.org> wrote:
> Hi,
>
> Again thanks for a thoughtful review. This will definitely will improve
> the code.
>
> On Thu, May 17, 2018 at 10:02:52AM -0700, Y Song wrote:
>> On Wed, May 16, 2018 at 2:04 PM, Se
_id.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/trace_events.h | 15 ++
include/uapi/linux/bpf.h | 27 ++
kernel/bpf/syscall.c | 124 +++
kernel/trace/bpf_trace.c | 48 +
kernel/trace
Given a kernel function name, ksym_get_addr() will return the kernel
address for this function, or 0 if it cannot find this function name
in /proc/kallsyms. This function will be used later when a kernel
address is used to initiate a kprobe perf event.
Signed-off-by: Yonghong Song <y...@fb.
l.
Changelogs:
v1 -> v2:
. changed bpf subcommand name from BPF_PERF_EVENT_QUERY
to BPF_TASK_FD_QUERY.
. fixed various "bpftool perf" issues and added documentation
and auto-completion.
Yonghong Song (7):
perf/core: add perf_get_event() to return perf_ev
not jited memlock 4096B map_ids 8
9: kprobe name probe_main_1 tag 0a87bdc2e2953b6d gpl
loaded_at 2018-05-15T04:49:52-0700 uid 0
xlated 200B not jited memlock 4096B map_ids 9
$ ps ax | grep "python ./trace.py"
21711 pts/0T 0:03 python ./trace.p
Sync kernel header bpf.h to tools/include/uapi/linux/bpf.h and
implement bpf_trace_event_query() in libbpf. The test programs
in samples/bpf and tools/testing/selftests/bpf, and later bpftool
will use this libbpf function to query kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
This is mostly to test kprobe/uprobe which needs kernel headers.
Signed-off-by: Yonghong Song <y...@fb.com>
---
samples/bpf/Makefile | 4 +
samples/bpf/task_fd_query_kern.c | 19 ++
samples/bpf/task_fd_query_user.c | 379 +++
3 files c
The new tests are added to query perf_event information
for raw_tracepoint and tracepoint attachment. For tracepoint,
both syscalls and non-syscalls tracepoints are queries as
they are treated slightly differently inside the kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/t
On 5/17/18 8:32 AM, Daniel Borkmann wrote:
On 05/16/2018 11:59 PM, Yonghong Song wrote:
On 5/16/18 4:27 AM, Peter Zijlstra wrote:
On Tue, May 15, 2018 at 04:45:16PM -0700, Yonghong Song wrote:
Currently, suppose a userspace application has loaded a bpf program
and attached
On Wed, May 16, 2018 at 2:04 PM, Sean Young wrote:
> This is simple test over rc-loopback.
>
> Signed-off-by: Sean Young
> ---
> tools/bpf/bpftool/prog.c | 1 +
> tools/include/uapi/linux/bpf.h| 57 +++-
>
On Wed, May 16, 2018 at 2:04 PM, Sean Young wrote:
> Add support for BPF_PROG_RAWIR_EVENT. This type of BPF program can call
> rc_keydown() to reported decoded IR scancodes, or rc_repeat() to report
> that the last key should be repeated.
>
> The bpf program can be attached to
On 5/16/18 4:27 AM, Peter Zijlstra wrote:
On Tue, May 15, 2018 at 04:45:16PM -0700, Yonghong Song wrote:
Currently, suppose a userspace application has loaded a bpf program
and attached it to a tracepoint/kprobe/uprobe, and a bpf
introspection tool, e.g., bpftool, wants to show which bpf
he key unsuccessfully, it will issue
the above warning.
Similar to hashtab, ensure the key size is at most
MAX_BPF_STACK for a successful map creation.
Fixes: 81110384441a ("bpf: sockmap, add hash map support")
Reported-by: syzbot+e4566d29080e7f346...@syzkaller.appspotmail.com
Signed-off-by:
is patch, but it looks good to me with visual inspection.
Acked-by: Yonghong Song <y...@fb.com>
On 5/15/18 9:41 PM, Jakub Kicinski wrote:
On Tue, 15 May 2018 16:45:21 -0700, Yonghong Song wrote:
The new command "bpftool perf [show]" will traverse
all processes under /proc, and if any fd is associated
with a perf event, it will print out related perf event
informati
This is mostly to test kprobe/uprobe which needs kernel headers.
Signed-off-by: Yonghong Song <y...@fb.com>
---
samples/bpf/Makefile| 4 +
samples/bpf/perf_event_query_kern.c | 19 ++
samples/bpf/perf_event_query_user.c | 376
3
utility function.
Patch #5 add a test in samples/bpf for querying k[ret]probes and
u[ret]probes.
Patch #6 add a test in tools/testing/selftests/bpf for querying
raw_tracepoint and tracepoint.
Patch #7 add a new subcommand "perf" to bpftool.
Yonghong Song (7):
perf/core: add perf_get_event()
Sync kernel header bpf.h to tools/include/uapi/linux/bpf.h and
implement bpf_trace_event_query() in libbpf. The test programs
in samples/bpf and tools/testing/selftests/bpf, and later bpftool
will use this libbpf function to query kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
prog_id.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/trace_events.h | 15 ++
include/uapi/linux/bpf.h | 25 ++
kernel/bpf/syscall.c | 113 +++
kernel/trace/bpf_trace.c | 53
kernel/trace
The new tests are added to query perf_event information
for raw_tracepoint and tracepoint attachment. For tracepoint,
both syscalls and non-syscalls tracepoints are queries as
they are treated slightly differently inside the kernel.
Signed-off-by: Yonghong Song <y...@fb.com>
---
tools/t
d 0
xlated 200B not jited memlock 4096B map_ids 9
$ ps ax | grep "python ./trace.py"
21711 pts/0T 0:03 python ./trace.py __x64_sys_write
21765 pts/0S+ 0:00 python ./trace.py r::__x64_sys_nanosleep
21767 pts/2S+ 0:00 python ./trace.py t:syscalls:sys_enter_nan
A new extern function, perf_get_event(), is added to return a perf event
given a struct file. This function will be used in later patches.
Signed-off-by: Yonghong Song <y...@fb.com>
---
include/linux/perf_event.h | 5 +
kernel/events/core.c | 8
2 files changed, 13 inse
Given a kernel function name, ksym_get_addr() will return the kernel
address for this function, or 0 if it cannot find this function name
in /proc/kallsyms. This function will be used later when a kernel
address is used to initiate a kprobe perf event.
Signed-off-by: Yonghong Song <y...@fb.
401 - 500 of 1050 matches
Mail list logo