Andrii,
Thank you very much for checking this out!, you were right the test was
incorrect. I'll work on your feedback and resend.
Thanks!
On Tue, Dec 15, 2020 at 11:05:50AM -0800, Andrii Nakryiko wrote:
> On Mon, Dec 14, 2020 at 10:39 AM Carlos Neira wrote:
> >
> > Currently tests for bpf_get_
On Wed, Aug 26, 2020 at 10:25:55PM -0700, Andrii Nakryiko wrote:
> On Wed, Aug 26, 2020 at 9:06 AM Carlos Neira wrote:
> >
> > In multi-threaded applications bpf_get_current_comm is returning per-thread
> > names, this helper will return comm from real_parent.
> > This makes a difference for some
On Tue, Aug 18, 2020 at 05:41:57PM -0700, Andrii Nakryiko wrote:
> On Tue, Aug 18, 2020 at 1:44 PM Carlos Neira wrote:
> >
> > Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs.
> > This change folds a test case into test_progs.
> >
> > Changes from V4:
> > - Added accident
On Wed, Aug 05, 2020 at 01:15:05PM -0700, Andrii Nakryiko wrote:
> On Wed, Aug 5, 2020 at 1:06 PM Carlos Neira wrote:
> >
> > Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs.
> > This change folds a test case into test_progs.
> >
> > Changes from V3:
> > - STAT(2) check c
My last email was missing what changed from V2.
Changes from V2:
- Test that does not create a new namespace has been included in test_progs
- Test creating a new pid namespace is a standalone test.
- Skeleton is used in both tests.
On Fri, Jul 17, 2020 at 08:41:22PM -0400, Carlos Neira wrote:
On Tue, Jun 23, 2020 at 11:10:51AM -0700, Andrii Nakryiko wrote:
> On Tue, Jun 23, 2020 at 5:48 AM Carlos Neira wrote:
> >
> > folds tests from test_current_pid_tgid_new_ns into test_progs.
> >
> > Signed-off-by: Carlos Neira
> > ---
> > tools/testing/selftests/bpf/Makefile | 3 +-
> >
On Wed, Oct 23, 2019 at 03:02:51AM +, Yonghong Song wrote:
>
>
> On 10/22/19 12:17 PM, Carlos Neira wrote:
> > Self tests added for new helper
>
> Please mention the name of the new helper in the commit message.
>
> >
> > Signed-off-by: Carlos Neira
>
> LGTM Ack with a few nits below.
>
On Mon, Oct 21, 2019 at 12:18:33PM -0700, Andrii Nakryiko wrote:
> On Mon, Oct 21, 2019 at 12:14 PM Carlos Antonio Neira Bustos
> wrote:
> >
> > On Mon, Oct 21, 2019 at 11:20:01AM -0700, Andrii Nakryiko wrote:
> > > On Sat, Oct 19, 2019 at 1
On Mon, Oct 21, 2019 at 11:20:01AM -0700, Andrii Nakryiko wrote:
> On Sat, Oct 19, 2019 at 1:58 AM Yonghong Song wrote:
> >
> >
> >
> > On 10/17/19 8:00 AM, Carlos Neira wrote:
> > > Self tests added for new helper
> > >
> > > Signed-off-by: Carlos Neira
> > > ---
> > > .../bpf/prog_tests/get_n
On Wed, Oct 09, 2019 at 12:50:10PM -0700, Andrii Nakryiko wrote:
> On Wed, Oct 9, 2019 at 10:45 AM Carlos Antonio Neira Bustos
> wrote:
> >
> > On Wed, Oct 09, 2019 at 09:14:42AM -0700, Andrii Nakryiko wrote:
> > > On Wed, Oct 9, 2019 at 8:27 AM Carlos Neira
> >
On Wed, Oct 09, 2019 at 09:14:42AM -0700, Andrii Nakryiko wrote:
> On Wed, Oct 9, 2019 at 8:27 AM Carlos Neira wrote:
> >
> > New bpf helper bpf_get_ns_current_pid_tgid,
> > This helper will return pid and tgid from current task
> > which namespace matches dev_t and inode number provided,
> > this
On Wed, Oct 09, 2019 at 09:26:32AM -0700, Andrii Nakryiko wrote:
> On Wed, Oct 9, 2019 at 8:29 AM Carlos Neira wrote:
> >
> > Self tests added for new helper
> >
> > Signed-off-by: Carlos Neira
> > ---
> > tools/testing/selftests/bpf/bpf_helpers.h | 4 +
> > .../bpf/prog_tests/get_ns_curren
On Thu, Oct 03, 2019 at 10:30:06AM -0700, Andrii Nakryiko wrote:
> On Thu, Oct 3, 2019 at 8:01 AM Carlos Antonio Neira Bustos
> wrote:
> >
> > On Wed, Oct 02, 2019 at 12:52:29PM +0200, Daniel Borkmann wrote:
> > > On 10/1/19 11:41 PM, Carlos Neira wr
On Wed, Oct 02, 2019 at 12:52:29PM +0200, Daniel Borkmann wrote:
> On 10/1/19 11:41 PM, Carlos Neira wrote:
> > New bpf helper bpf_get_ns_current_pid_tgid,
> > This helper will return pid and tgid from current task
> > which namespace matches dev_t and inode number provided,
> > this will allows us
On Fri, Sep 27, 2019 at 10:24:46AM -0700, Andrii Nakryiko wrote:
> On Fri, Sep 27, 2019 at 9:59 AM Yonghong Song wrote:
> >
> >
> >
> > On 9/27/19 9:15 AM, Andrii Nakryiko wrote:
> > > On Thu, Sep 26, 2019 at 1:15 AM Carlos Neira
> > > wrote:
> > >>
> > >> New bpf helper bpf_get_ns_current_pid_t
On Wed, Sep 25, 2019 at 04:07:09PM +, Yonghong Song wrote:
>
>
> On 9/24/19 8:20 AM, Carlos Neira wrote:
> > Self tests added for new helper
> >
> > Signed-off-by: Carlos Neira
> > ---
> > tools/testing/selftests/bpf/Makefile | 2 +-
> > tools/testing/selftests/bpf/bpf_helpers
On Tue, Sep 24, 2019 at 08:01:17PM +0200, Daniel Borkmann wrote:
> On Tue, Sep 24, 2019 at 12:20:01PM -0300, Carlos Neira wrote:
> > Currently bpf_get_current_pid_tgid(), is used to do pid filtering in bcc's
> > scripts but this helper returns the pid as seen by the root namespace which
> > is
> >
On Fri, Sep 13, 2019 at 02:56:43AM +, Yonghong Song wrote:
Yonghong,
Great, I'll submit this new interface along self tests as version 12.
Thanks for your help.
Bests
>
>
> On 9/12/19 3:03 PM, carlos antonio neira bustos wrote:
> > Yonghong,
> >
> > I t
Thanks for reviewing the rest of the code,
I'll include these changes in ver 11.
Bests
On Tue, Sep 10, 2019 at 10:46:45PM +, Yonghong Song wrote:
>
>
> On 9/6/19 4:09 PM, Carlos Neira wrote:
> > This helper(bpf_get_current_pidns_info) obtains the active namespace from
> > current and retur
#1 and then have
> all your other patches? In your kernel change, please use
> interface function ns_get_inum_dev() to get pidns inode number
> and dev number.
>
> On 9/9/19 6:45 PM, Carlos Antonio Neira Bustos wrote:
> > Thanks a lot, Al Viro and Yonghong for taking th
Thanks a lot, Al Viro and Yonghong for taking the time to review this patch and
provide technical insights needed on this one.
But how do we move this forward?
Al Viro's review is clear that this will not work and we should strip the name
resolution code (thanks for your detailed analysis).
As th
05:03:35PM -0400, Carlos Antonio Neira Bustos wrote:
> Thanks, I'll work on the net/netif_receive_skb selftest using this helper.
> I hope I could complete this work this week.
>
> Bests.
>
> On Wed, Aug 28, 2019 at 08:53:25PM +, Yonghong Song wrote:
> >
> >
Thanks, I'll work on the net/netif_receive_skb selftest using this helper.
I hope I could complete this work this week.
Bests.
On Wed, Aug 28, 2019 at 08:53:25PM +, Yonghong Song wrote:
>
>
> On 8/28/19 1:39 PM, Carlos Antonio Neira Bustos wrote:
> > Yonghong,
>
doing some more testing.
I think I'll remove the tests on samples/bpf as they are mostly end on -EPERM
as
the fix intended.
Is ok to remove them and just focus to finish the self tests code?.
Bests
On Wed, Aug 14, 2019 at 01:25:06AM -0400, carlos antonio neira bustos wrote:
> Thank yo
Hi Yonghong,
Thanks for taking the time to review this.
> > + *
> > + * **-EINVAL** if *size_of_pidns* is not valid or unable to get
> > ns, pid
> > + * or tgid of the current task.
> > + *
> > + * **-ECHILD** if /proc/self/ns/pid does not exists.
> > + *
> > + *
On Tue, Aug 13, 2019 at 11:11:14PM +, Yonghong Song wrote:
>
>
> On 8/13/19 11:47 AM, Carlos Neira wrote:
> > From: Carlos
> >
> > New bpf helper bpf_get_current_pidns_info.
> > This helper obtains the active namespace from current and returns
> > pid, tgid, device and namespace id as seen
_pmu;
+
+ /* trigger some syscalls */
+ sleep(1);
+
+ err = bpf_map_lookup_elem(nsidmap_fd, &key, &knsid);
+ if (CHECK(err, "bpf_map_lookup_elem", "err %d errno %d\n", err, errno))
+ goto close_pmu;
+
+ if (stat("/proc/self/ns/pid&quo
Thanks a lot, Yonghong. I'll fix and split up the patch.
Thanks again for your help.
Bests
On Thu, Aug 08, 2019 at 08:47:14PM +, Yonghong Song wrote:
>
>
> On 8/8/19 1:26 PM, carlos antonio neira bustos wrote:
> > Hi Yonghong,
> >
> > I’m sorry, just to be
unable to get the inode from /proc/self/ns/pid an error
> > > > code
> > > > + * will be returned.
> > >
> > > You do not need this. The description of error code cases should cover
> > > this.
>
On Thu, Aug 08, 2019 at 12:44:22PM -0700
%d\n", err,
+ errno))
+ goto close_pmu;
+
+ /* trigger some syscalls */
+ sleep(1);
+
+ err = bpf_map_lookup_elem(nsidmap_fd, &key, &knsid);
+ if (CHECK(err, "bpf_map_lookup_elem", "err %d errno %d\n", err, errno))
+
The code has been modified to avoid syscalls that could sleep.
Please let me know if any other modification is needed.
>From be0384c0fa209a78c1567936e8db4e35b9a7c0f8 Mon Sep 17 00:00:00 2001
From: Carlos
Date: Wed, 7 Aug 2019 20:04:30 -0400
Subject: [PATCH] [PATCH v5 bpf-next] BPF: New helper to
On Wed, Mar 20, 2019 at 06:23:20PM -0700, Alexei Starovoitov wrote:
> On Wed, Mar 20, 2019 at 01:49:22PM -0300, Carlos Antonio Neira Bustos wrote:
> >
> > This is a series of patches to introduce a new helper called
> > bpf_get_current_pidns_info,
> > this change
return 0;
To find out the name PID namespace id of a process, you could use this command:
$ ps -h -o pidns -p
Or this other command:
$ ls -Li /proc//ns/pid
Signed-off-by: Carlos Antonio Neira Bustos
---
tools/include/uapi/linux/bpf.h| 26 +++
e this command:
$ ps -h -o pidns -p
Or this other command:
$ ls -Li /proc//ns/pid
Signed-off-by: Carlos Antonio Neira Bustos
---
---
samples/bpf/Makefile | 3 +
samples/bpf/trace_ns_info_user.c | 35 ++
samples/bpf/trace_ns_info_user_kern
use this command:
$ ps -h -o pidns -p
Or this other command:
$ ls -Li /proc//ns/pid
Signed-off-by: Carlos Antonio Neira Bustos
---
tools/include/uapi/linux/bpf.h| 25 -
tools/testing/selftests/bpf/bpf_helpers.h | 3 +++
2 files changed, 27 insertions(+
/proc//ns/pid
Signed-off-by: Carlos Antonio Neira Bustos
-
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 26 ++-
kernel/bpf/core.c| 1 +
kernel/bpf/helpers.c | 67
kernel/trace/bpf_trace.c | 2 ++
36 matches
Mail list logo