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

2018-05-25 Thread Alban Crequy
_x64_sys_nanosleep cgid = 106b2 > 40674067 a.out __x64_sys_nanosleep cgid = 106b2 > 40674067a.out __x64_sys_nanosleep cgid = 106b2 > ^C[yhs@localhost tools]$ > The kernel and user space cgid matches. Will provide a > formal patch later. &

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 <ys114...@gmail.com> wrote: > > On Sun, May 13, 2018 at 10:33 AM, Alban Crequy <alban.cre...@gmail.com> wrote: > > From: Alban Crequy <al...@kinvolk.io> > > > > bpf_get_current_cgroup_ino() allows BPF trace program

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

2018-05-13 Thread Alban Crequy
From: Alban Crequy <al...@kinvolk.io> 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

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

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: ... > + /*

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

2017-04-03 Thread Alban Crequy
From: Alban Crequy <al...@kinvolk.io> 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

[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 <al...@kinvolk.io> --- Changes since v1: - Remove "(*)" from documentation. (Review from Masami Hiramatsu) - Fix support for &q

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

2017-03-31 Thread Alban Crequy
rofile being incremented when the kretprobe is missed. Tested-by: Alban Crequy <al...@kinvolk.io> > --- > kernel/trace/trace_kprobe.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c > index

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 >> >

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 <mhira...@kernel.org> wrote: > On Tue, 28 Mar 2017 15:52:22 +0200 > Alban Crequy <alban.cre...@gmail.com> wrote: > >> When a kretprobe is installed on a kernel function, there is a maximum

[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 <al...@kinvolk.io> --- Documentation/trace/kprobetrace.txt | 4 +++- kernel/trace/trace_kprobe.c | 34 +- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Documentation/trace/kp

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

2016-10-15 Thread Alban Crequy
From: Alban Crequy <al...@kinvolk.io> 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 m

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

2016-10-15 Thread Alban Crequy
From: Alban Crequy <al...@kinvolk.io> 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 con

[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 <z...@ioremap.net> wrote: > Hi everyone > > 08.09.2016, 18:39, "Alban Crequy" <alban.cre...@gmail.com>: >> The act of a process creating or joining a namespace via clone(), >> unshare() or setns() is

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

2016-09-08 Thread Alban Crequy
From: Alban Crequy <al...@kinvolk.io> 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 con

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