Adding the following test cases:
- bpf_descendant_of(current->pid) == 1
- bpf_descendant_of(current->real_parent->pid) == 1
- bpf_descendant_of(1) == 1
- bpf_descendant_of(0) == 1
- bpf_descendant_of(-1) == 0
- bpf_descendant_of(current->children[0]->pid) == 0
Signed-off-by: Ja
Sync kernel uapi headers.
Signed-off-by: Javier Honduvilla Coto
---
tools/include/uapi/linux/bpf.h | 20 +++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 402208581b2d..505ee91898c2 100644
Hi all,
This patch adds the bpf_descendant_of helper which accepts a PID and
returns 1 if the PID of the process currently being executed is a
descendant of it or if it's itself. Returns 0 otherwise. The passed
PID should be the one as seen from the "global" pid namespace as the
processes' PIDs in
rect in really large process chains.
Signed-off-by: Javier Honduvilla Coto
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 20 +++-
kernel/bpf/core.c| 1 +
kernel/bpf/helpers.c | 27 +++
kernel/trace/bpf_trace.c | 2 ++
On Thu, Apr 11, 2019 at 11:55:58PM +0200, Daniel Borkmann wrote:
> On 04/10/2019 10:36 PM, Javier Honduvilla Coto wrote:
> > This patch adds the bpf_descendant_of helper which accepts a PID and
> > returns 1 if the PID of the process currently being executed is a
> > descen
Sync kernel uapi headers.
Signed-off-by: Javier Honduvilla Coto
---
tools/include/uapi/linux/bpf.h | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index af1cbd951f26..f707b286c21d 100644
--- a/tools
ux/bpf.h
Javier Honduvilla Coto (3):
bpf: add bpf_descendant_of helper
bpf: sync kernel uapi headers
bpf: add tests for bpf_descendant_of
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 10 +-
kernel/bpf/core.c
Adding the following test cases:
- bpf_descendant_of(current->pid) == 1
- bpf_descendant_of(current->real_parent->pid) == 1
- bpf_descendant_of(1) == 1
- bpf_descendant_of(0) == 1
- bpf_descendant_of(-1) == 0
- bpf_descendant_of(current->children[0]->pid) == 0
Signed-off-by: Ja
doing consumes lots
of instructions. That and the impossibility to jump backwards makes it
really hard to be correct in really large process chains.
Signed-off-by: Javier Honduvilla Coto
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 10 +-
kernel/bpf/core.c
On Mon, Mar 25, 2019 at 03:17:03PM +0100, Daniel Borkmann wrote:
> On 03/22/2019 11:38 PM, Javier Honduvilla Coto wrote:
> > This patch adds the bpf_progenyof helper which receives a PID and returns
> > 1 if the process currently being executed is in the process hierarchy
> >
On Mon, Mar 25, 2019 at 03:17:03PM +0100, Daniel Borkmann wrote:
> On 03/22/2019 11:38 PM, Javier Honduvilla Coto wrote:
> > This patch adds the bpf_progenyof helper which receives a PID and returns
> > 1 if the process currently being executed is in the process hierarchy
> >
On Thu, Mar 07, 2019 at 10:26:22AM +0100, Daniel Borkmann wrote:
> On 03/05/2019 11:47 PM, Javier Honduvilla Coto wrote:
> > Hi all,
> >
> > This patch add the bpf_progenyof helper which receives a PID and returns
> > 1 if the process currently being executed
Adding the following test cases:
- progenyof(current->pid) == 1
- progenyof(current->real_parent->pid) == 1
- progenyof(1) == 1
- progenyof(0) == 1
- progenyof(-1) == 0
- progenyof(current->children[0]->pid) == 0
Signed-off-by: Javier Honduvilla Coto
---
tools/testing/selftests
of instructions. That and the impossibility to jump backwards makes it
really hard to be correct in really large process chains.
Signed-off-by: Javier Honduvilla Coto
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 10 +-
kernel/bpf/core.c| 1 +
kernel/bpf
Sync kernel uapi headers.
Signed-off-by: Javier Honduvilla Coto
---
tools/include/uapi/linux/bpf.h | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 3c04410137d9..cf54cc739bf4 100644
--- a/tools
as somehow I accidentally used my personal one in
v2
Changes in V2:
- Adding missing docs in include/uapi/linux/bpf.h
Javier Honduvilla Coto (3):
bpf: add bpf_progenyof helper
bpf: sync kernel uapi headers
bpf: add tests for bpf_progenyof
include/linux/bpf.h
of instructions. That and the impossibility to jump backwards makes it
really hard to be correct in really large process chains.
Signed-off-by: Javier Honduvilla Coto
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 10 +-
kernel/bpf/core.c| 1 +
kernel/bpf
Sync kernel uapi headers.
Signed-off-by: Javier Honduvilla Coto
---
tools/include/uapi/linux/bpf.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 3c38ac9a92a7..f72741766ba8 100644
--- a/tools
Adding the following test cases:
- progenyof(current->pid) == 1
- progenyof(current->real_parent->pid) == 1
- progenyof(1) == 1
- progenyof(0) == 1
- progenyof(-1) == 0
- progenyof(current->children[0]->pid) == 0
Signed-off-by: Javier Honduvilla Coto
---
tools/testing/selftests
:
- Adding missing docs in include/uapi/linux/bpf.h
Javier Honduvilla Coto (3):
bpf: add bpf_progenyof helper
bpf: sync kernel uapi headers
bpf: add tests for bpf_progenyof
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 10
On Sat, Mar 02, 2019 at 12:12:57AM +, Martin Lau wrote:
> On Fri, Mar 01, 2019 at 10:06:12AM -0800, Javier Honduvilla Coto wrote:
> > From: Javier Honduvilla Coto
> >
> > This patch adds the bpf_progenyof helper which receives a PID and returns
> > 1 if the process
On Sat, Mar 02, 2019 at 12:01:14AM +, Martin Lau wrote:
> On Fri, Mar 01, 2019 at 09:28:39AM -0800, Javier Honduvilla Coto wrote:
> > On Wed, Feb 27, 2019 at 06:26:41AM +, Martin Lau wrote:
> > > On Tue, Feb 26, 2019 at 02:36:49PM -0800, Javier Honduvilla Coto wrote:
lots
of instructions. That and the impossibility to jump backwards makes it
really hard to be correct in really large process chains.
Let me know what do you think!
Thanks,
---
Changed in V2:
- Adding missing docs in include/uapi/linux/bpf.h
Javier Honduvilla Coto (3):
bpf: add
From: Javier Honduvilla Coto
Sync kernel uapi headers.
Signed-off-by: Javier Honduvilla Coto
---
tools/include/uapi/linux/bpf.h | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index bcdd2474eee7
From: Javier Honduvilla Coto
This patch adds the bpf_progenyof helper which receives a PID and returns
1 if the process currently being executed is in the process hierarchy
including itself or 0 if not.
This is very useful in tracing programs when we want to filter by a
given PID and all the
From: Javier Honduvilla Coto
Adding the following test cases:
- progenyof(current->pid) == 1
- progenyof(current->real_parent->pid) == 1
- progenyof(1) == 1
- progenyof(0) == 0
- progenyof(current->children[0]->pid) == 0
Signed-off-by: Javier Honduvilla Coto
---
tools/testin
On Wed, Feb 27, 2019 at 06:26:41AM +, Martin Lau wrote:
Sorry, accidentally did not reply to all your comments:
> On Tue, Feb 26, 2019 at 02:36:49PM -0800, Javier Honduvilla Coto wrote:
> > This patch adds the bpf_progenyof helper which receives a PID and returns
> What
On Wed, Feb 27, 2019 at 06:26:41AM +, Martin Lau wrote:
> On Tue, Feb 26, 2019 at 02:36:49PM -0800, Javier Honduvilla Coto wrote:
> > This patch adds the bpf_progenyof helper which receives a PID and returns
> What is progenof?
>
> > 1 if the process currently being execu
Adding the following test cases:
- progenyof(current->pid) == 1
- progenyof(current->real_parent->pid) == 1
- progenyof(1) == 1
- progenyof(0) == 0
- progenyof(current->children[0]->pid) == 0
Signed-off-by: Javier Honduvilla Coto
---
tools/testing/selftests/bpf/.gitignore
of instructions. That and the impossibility to jump backwards makes it
really hard to be correct in really large process chains.
Signed-off-by: Javier Honduvilla Coto
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 3 ++-
kernel/bpf/core.c| 1 +
kernel/bpf/helpers.c
lots
of instructions. That and the impossibility to jump backwards makes it
really hard to be correct in really large process chains.
Let me know what do you think!
Thanks,
Javier Honduvilla Coto (3):
bpf: add bpf_progenyof helper
bpf: sync kernel uapi headers
bpf: add tests for
Sync kernel uapi headers.
Signed-off-by: Javier Honduvilla Coto
---
tools/include/uapi/linux/bpf.h | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index bcdd2474eee7..354ec295864c 100644
--- a/tools
32 matches
Mail list logo