Re: [PATCH v2 bpf-next 7/7] docs/bpf: add BPF ring buffer design notes

2020-05-25 Thread Alban Crequy
Hi, Thanks. Both motivators look very interesting to me: On Sun, 17 May 2020 at 21:58, Andrii Nakryiko wrote: [...] > +Motivation > +-- > +There are two distinctive motivators for this work, which are not satisfied > by > +existing perf buffer, which prompted creation of a new ring buff

Re: bpf-next is OPEN

2019-03-19 Thread Alban Crequy
On Tue, 19 Mar 2019 at 09:56, Daniel Borkmann wrote: > > Merge window is closed, so new round begins. > > Thanks everyone, > Daniel Thanks! I see that the bpf tree is more recent than the bpf-next tree: https://git.kernel.org/?q=BPF+Group Does it need to be updated, or do I miss something? Chee

Re: [PATCH bpf-next v1] tools/bpftool: create map of maps

2019-03-07 Thread Alban Crequy
ue, Mar 5, 2019 at 6:32 PM Jakub Kicinski wrote: > > On Tue, 5 Mar 2019 17:38:03 +0100, Alban Crequy wrote: > > From: Alban Crequy > > > > Before this patch, there was no way to fill attr.inner_map_fd, necessary > > for array_of_maps or hash_of_maps. > > >

[PATCH bpf-next v1] tools/bpftool: create map of maps

2019-03-05 Thread Alban Crequy
From: Alban Crequy Before this patch, there was no way to fill attr.inner_map_fd, necessary for array_of_maps or hash_of_maps. This patch adds keyword 'innermap' to pass the innermap, either as an id or as a pinned map. Example of commands: $ sudo bpftool map create /sys/fs/bpf/inn

Re: [PATCH bpf v2] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
f6b425f932 On Fri, Feb 22, 2019 at 2:19 PM Alban Crequy wrote: > > From: Alban Crequy > > trie_delete_elem() was deleting an entry even though it was not matching > if the prefixlen was correct. This patch adds a check on matchlen. > > Reproducer: > > $ sudo bpftool map c

[PATCH bpf v2] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
From: Alban Crequy trie_delete_elem() was deleting an entry even though it was not matching if the prefixlen was correct. This patch adds a check on matchlen. Reproducer: $ sudo bpftool map create /sys/fs/bpf/mylpm type lpm_trie key 8 value 1 entries 128 name mylpm flags 1 $ sudo bpftool map

Re: [PATCH bpf-next v1] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
On Thu, Feb 21, 2019 at 11:24 PM Martin Lau wrote: > > On Thu, Feb 21, 2019 at 05:39:26PM +0100, Alban Crequy wrote: > > From: Alban Crequy > > > > trie_delete_elem() was deleting an entry even though it was not matching > > if the prefixlen was correct. This

[PATCH bpf-next v1] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-21 Thread Alban Crequy
From: Alban Crequy trie_delete_elem() was deleting an entry even though it was not matching if the prefixlen was correct. This patch adds a check on matchlen. Reproducer: $ sudo bpftool map create /sys/fs/bpf/mylpm type lpm_trie key 8 value 1 entries 128 name mylpm flags 1 $ sudo bpftool map

[PATCH bpf-next v2] bpf: bpftool, fix documentation for attach types

2019-02-19 Thread Alban Crequy
From: Alban Crequy bpftool has support for attach types "stream_verdict" and "stream_parser" but the documentation was referring to them as "skb_verdict" and "skb_parse". The inconsistency comes from commit b7d3826c2ed6 ("bpf: bpftool, add support

Re: [PATCH] bpf: bpftool, fix documentation for attach types

2019-02-19 Thread Alban Crequy
On Mon, Feb 11, 2019 at 2:26 PM Quentin Monnet wrote: > > 2019-02-11 13:54 UTC+0100 ~ Alban Crequy > > From: Alban Crequy > > > > bpftool has support for attach types "stream_verdict" and > > "stream_parser" but the documentation was referring t

[PATCH] bpf: bpftool, fix documentation for attach types

2019-02-11 Thread Alban Crequy
From: Alban Crequy bpftool has support for attach types "stream_verdict" and "stream_parser" but the documentation was referring to them with "skb_verdict" and "skb_parse". The inconsistency comes from commit b7d3826c2ed6 ("bpf: bpftool, add support

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-25 Thread Alban Crequy
bytes = 8, handle_type = 1 > cgroup_id = 0x106b2 > // the below command to get cgroup_id from the kernel for the > // process compiled with t.c and ran under /home/yhs/tmp/yhs: > $ sudo ./trace.py -p 4067 '__x64_sys_nanosleep "cgid = %llx", $cgid' > PID TID COMMFUNC

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-21 Thread Alban Crequy
On Mon, May 14, 2018 at 9:38 PM, Y Song wrote: > > On Sun, May 13, 2018 at 10:33 AM, Alban Crequy wrote: > > From: Alban Crequy > > > > bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode > > of the cgroup where the current process resides.

[PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-13 Thread Alban Crequy
From: Alban Crequy bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode of the cgroup where the current process resides. My use case is to get statistics about syscalls done by a specific Kubernetes container. I have a tracepoint on raw_syscalls/sys_enter and a BPF map

Re: [PATCH net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-27 Thread Alban Crequy
Hi, On 25 October 2017 at 01:57, Song Liu wrote: > This tracepoint can be used to trace synack retransmits. It maintains > pointer to struct request_sock. > > We cannot simply reuse trace_tcp_retransmit_skb() here, because the > sk here is the LISTEN socket. The IP addresses and ports should be >

Re: [PATCH net-next v7 08/10] bpf: Add a Landlock sandbox example

2017-09-01 Thread Alban Crequy
Hi Mickaël, On 21 August 2017 at 02:09, Mickaël Salaün wrote: > Add a basic sandbox tool to create a process isolated from some part of > the system. This sandbox create a read-only environment. It is only > allowed to write to a character device such as a TTY: ... > + /* > +* This

[PATCH v3] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-04-03 Thread Alban Crequy
From: Alban Crequy When a kretprobe is installed on a kernel function, there is a maximum limit of how many calls in parallel it can catch (aka "maxactive"). A kernel module could call register_kretprobe() and initialize maxactive (see example in samples/kprobes/kretprobe_example.c).

[PATCH v2] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-03-31 Thread Alban Crequy
nsupported: 0 > # of xfailed: 0 > # of undefined(test bug): 0 BugLink: https://github.com/iovisor/bcc/issues/1072 Signed-off-by: Alban Crequy --- Changes since v1: - Remove "(*)" from documentation. (Review from Masami Hiramatsu) - Fix support for "r100" without th

Re: [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count

2017-03-31 Thread Alban Crequy
d-off-by: Masami Hiramatsu I tested this patch with my kretprobe on "inet_csk_accept" when there are many processes waiting in the accept() syscall. I can now successfully see the nmissed counter in /sys/kernel/debug/tracing/kprobe_profile being incremented when the kretprobe

Re: [RFC PATCH tip/master 2/3] kprobes: Allocate kretprobe instance if its free list is empty

2017-03-30 Thread Alban Crequy
On Thu, Mar 30, 2017 at 8:53 AM, Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > >> > So this is something I missed while the original code was merged, but the >> > concept >> > looks a bit weird: why do we do any "allocation" while a handler is >> > executing? >> > >> > That's fundamentally

Re: [PATCH v1] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-03-28 Thread Alban Crequy
Thanks for the review, On Tue, Mar 28, 2017 at 5:23 PM, Masami Hiramatsu wrote: > On Tue, 28 Mar 2017 15:52:22 +0200 > Alban Crequy wrote: > >> When a kretprobe is installed on a kernel function, there is a maximum >> limit of how many calls in parallel it can catch

[PATCH v1] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-03-28 Thread Alban Crequy
ovisor/bcc/issues/1072 Signed-off-by: Alban Crequy --- Documentation/trace/kprobetrace.txt | 4 +++- kernel/trace/trace_kprobe.c | 34 +- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Documentation/trace/kprobetrace.txt b/Documenta

[RFC v2 2/2] proc connector: add a "get feature" op

2016-10-15 Thread Alban Crequy
From: Alban Crequy As more kinds of events are being added in the proc connector, userspace needs a way to detect whether the kernel supports those new events. When a kind of event is not supported, userspace should report an error propertly, or fallback to other methods (regular polling of

[RFC v2 1/2] proc connector: add namespace events

2016-10-15 Thread Alban Crequy
From: Alban Crequy The act of a process creating or joining a namespace via clone(), unshare() or setns() is a useful signal for monitoring applications. I am working on a monitoring application that keeps track of all the containers and all processes inside each container. The current way of

[RFC v2 0/2] proc connector: get namespace events

2016-10-15 Thread Alban Crequy
://github.com/kinvolk/linux.git alban/proc_ns_connector-v2-5 Alban Crequy (2): proc connector: add namespace events proc connector: add a "get feature" op drivers/connector/cn_proc.c | 163 --- include/linux/cn_proc.h | 25 +++ include/

Re: [PATCH] [RFC] proc connector: add namespace events

2016-09-13 Thread Alban Crequy
On 12 September 2016 at 23:39, Evgeniy Polyakov wrote: > Hi everyone > > 08.09.2016, 18:39, "Alban Crequy" : >> The act of a process creating or joining a namespace via clone(), >> unshare() or setns() is a useful signal for monitoring applications. > >>

[PATCH] [RFC] proc connector: add namespace events

2016-09-08 Thread Alban Crequy
From: Alban Crequy The act of a process creating or joining a namespace via clone(), unshare() or setns() is a useful signal for monitoring applications. I am working on a monitoring application that keeps track of all the containers and all processes inside each container. The current way of

Re: [PATCH 8/8] netfilter: implement xt_cgroup cgroup2 path match

2016-02-11 Thread Alban Crequy
Hi, On 7 December 2015 at 23:38, Tejun Heo wrote: > This patch implements xt_cgroup path match which matches cgroup2 > membership of the associated socket. The match is recursive and > invertible. Is there any plans to implement a similar cgroup2 path match in a cgroup classifier in tc? I wonde