Re: [PATCH net-next] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition

2020-09-14 Thread Joel Fernandes
On Mon, Sep 14, 2020 at 03:47:38PM -0700, Jakub Kicinski wrote: > On Mon, 14 Sep 2020 16:21:22 -0400 Joel Fernandes wrote: > > On Tue, Sep 08, 2020 at 05:27:51PM -0700, Jakub Kicinski wrote: > > > On Tue, 08 Sep 2020 21:15:56 +0300 niko...@cumulusnetworks.com wrote: > > &

Re: [PATCH net-next] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition

2020-09-14 Thread Joel Fernandes
ve up, lockdep_is_held() is not defined without > CONFIG_LOCKDEP, let's just go with your patch.. Care to send a patch just for the RCU macro then? Not sure what Dave is applying but if the net-next tree is not taking the RCU macro change, then send another one with my tag: Reviewed-b

Re: [ovs-discuss] Double free in recent kernels after memleak fix

2020-08-10 Thread Joel Fernandes
On Fri, Aug 07, 2020 at 03:20:15PM -0700, Paul E. McKenney wrote: > On Fri, Aug 07, 2020 at 04:47:56PM -0400, Joel Fernandes wrote: > > Hi, > > Adding more of us working on RCU as well. Johan from another team at > > Google discovered a likely issue in openswitch, details b

Re: [ovs-discuss] Double free in recent kernels after memleak fix

2020-08-07 Thread Joel Fernandes
On Fri, Aug 7, 2020 at 4:47 PM Joel Fernandes wrote: > > Hi, > Adding more of us working on RCU as well. Johan from another team at > Google discovered a likely issue in openswitch, details below: > > On Fri, Aug 7, 2020 at 11:32 AM Johan Knöös wrote: > > > >

Re: [ovs-discuss] Double free in recent kernels after memleak fix

2020-08-07 Thread Joel Fernandes
Hi, Adding more of us working on RCU as well. Johan from another team at Google discovered a likely issue in openswitch, details below: On Fri, Aug 7, 2020 at 11:32 AM Johan Knöös wrote: > > On Tue, Aug 4, 2020 at 8:52 AM Gregory Rose wrote: > > > > > > > > On 8/3/2020 12:01 PM, Johan Knöös via

Re: [PATCH linux-rcu] docs/litmus-tests: add BPF ringbuf MPSC litmus tests

2020-05-29 Thread Joel Fernandes
Hi Andrii, On Thu, May 28, 2020 at 10:50:30PM -0700, Andrii Nakryiko wrote: > > [...] > > > diff --git a/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > > > b/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > > > new file mode 100644 > > > index ..558f054fb

Re: [PATCH linux-rcu] docs/litmus-tests: add BPF ringbuf MPSC litmus tests

2020-05-28 Thread Joel Fernandes
Hello Andrii, This is quite exciting. Some comments below: On Wed, May 27, 2020 at 11:24:08PM -0700, Andrii Nakryiko wrote: [...] > diff --git a/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > b/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > new file mode 100644 > i

Re: samples/bpf compilation failures - 5.2.0

2019-06-27 Thread Joel Fernandes
> > On 5/28/2019 2:27 PM, Srinivas Ramana wrote: > > > Hello, > > > > > > I am trying to build samples/bpf in kernel(5.2.0-rc1) but unsuccessful > > > with below errors. Can you help to point what i am missing or if there > > > is some known issue? By the way have you just tried building it on an

Re: samples/bpf compilation failures - 5.2.0

2019-06-26 Thread Joel Fernandes
On Wed, Jun 26, 2019 at 1:41 AM Srinivas Ramana wrote: > > + Joel if he has seen this issue. > I have not seen this issue and it has been some time since I built BPF samples, sorry. I am mostly building BPF programs through bcc/bpftrace and Android's build system. We ought to make samples easier

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-28 Thread Joel Fernandes
On Thu, Feb 28, 2019 at 09:29:13PM +0900, Masami Hiramatsu wrote: > On Tue, 26 Feb 2019 10:24:47 -0500 > Joel Fernandes wrote: > > > On Fri, Feb 22, 2019 at 11:27:05AM -0800, Alexei Starovoitov wrote: > > > On Fri, Feb 22, 2019 at 09:43:14AM -0800, Linus Torvalds wrote:

Re: [PATCH v2 3/6] sched/cpufreq: Annotate cpufreq_update_util_data pointer with __rcu

2019-02-27 Thread Joel Fernandes
On Mon, Feb 25, 2019 at 01:10:26PM -0800, Paul E. McKenney wrote: > On Sat, Feb 23, 2019 at 01:34:31AM -0500, Joel Fernandes (Google) wrote: > > Recently I added an RCU annotation check to rcu_assign_pointer(). All > > pointers assigned to RCU protected data are to be annot

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-26 Thread Joel Fernandes
On Fri, Feb 22, 2019 at 11:27:05AM -0800, Alexei Starovoitov wrote: > On Fri, Feb 22, 2019 at 09:43:14AM -0800, Linus Torvalds wrote: > > > > Then we should still probably fix up "__probe_kernel_read()" to not > > allow user accesses. The easiest way to do that is actually likely to > > use the "u

[PATCH v2 4/6] sched_domain: Annotate RCU pointers properly

2019-02-22 Thread Joel Fernandes (Google)
fair.c:9421:16: error: incompatible types in comparison expression fair.c:9421:16: error: incompatible types in comparison expression Signed-off-by: Joel Fernandes (Google) --- include/linux/sched/topology.h | 4 ++-- kernel/sched/sched.h | 14 +++--- kernel/sched/topology.c

[PATCH v2 5/6] rcuwait: Annotate task_struct with __rcu

2019-02-22 Thread Joel Fernandes (Google)
This suppresses sparse error generated due to the recently added rcu_assign_pointer sparse check. percpu-rwsem.c:162:9: sparse: error: incompatible types in comparison expression exit.c:316:16: sparse: error: incompatible types in comparison expression Signed-off-by: Joel Fernandes (Google

[PATCH v2 3/6] sched/cpufreq: Annotate cpufreq_update_util_data pointer with __rcu

2019-02-22 Thread Joel Fernandes (Google)
: error: incompatible types in comparison expression (different address spaces) Fix this by annotating cpufreq_update_util_data pointer with __rcu. This will also help sparse catch any future RCU misuage bugs. Signed-off-by: Joel Fernandes (Google) --- kernel/sched/cpufreq.c | 2 +- kernel/sched

[PATCH v2 6/6] sched: Annotate perf_domain pointer with __rcu

2019-02-22 Thread Joel Fernandes (Google)
This fixes the following sparse errors in sched/fair.c: fair.c:6506:14: error: incompatible types in comparison expression fair.c:8642:21: error: incompatible types in comparison expression Using __rcu will also help sparse catch any future bugs. Signed-off-by: Joel Fernandes (Google

[PATCH v2 0/6] RCU fixes for rcu_assign_pointer() usage

2019-02-22 Thread Joel Fernandes (Google)
bugs so it is a good idea to do in any case. RFC v1 -> Patch v2: Made changes to various scheduler patches (Peter Zijlstra) Joel Fernandes (Google) (6): net: rtnetlink: Fix incorrect RCU API usage ixgbe: Fix incorrect RCU API usage sched/cpufreq: Annotate cpufreq_update_util_data pointer with __

[PATCH v2 2/6] ixgbe: Fix incorrect RCU API usage

2019-02-22 Thread Joel Fernandes (Google)
rea to review / test it properly. The sparse error fixed is: ixgbe_main.c:10256:25: error: incompatible types in comparison expression Signed-off-by: Joel Fernandes (Google) --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |

[PATCH v2 1/6] net: rtnetlink: Fix incorrect RCU API usage

2019-02-22 Thread Joel Fernandes (Google)
using RCU API. net/core/rtnetlink.c:332:13: warning: incorrect type in assignment (different address spaces) net/core/rtnetlink.c:332:13:expected struct rtnl_link **tab net/core/rtnetlink.c:332:13:got struct rtnl_link *[noderef] * Signed-off-by: Joel Fernandes (Google) --- net/core

Re: [PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-21 Thread Joel Fernandes
On Thu, Feb 21, 2019 at 04:29:44PM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 10:10:57AM -0500, Joel Fernandes wrote: > > Hi Peter, > > > > Thanks for taking a look. > > > > On Thu, Feb 21, 2019 at 10:19:44AM +0100, Peter Zijlstra wrote: > > >

Re: [PATCH RFC 3/5] sched/cpufreq: Fix incorrect RCU API usage

2019-02-21 Thread Joel Fernandes
On Thu, Feb 21, 2019 at 05:11:44PM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 07:52:18AM -0800, Paul E. McKenney wrote: > > On Thu, Feb 21, 2019 at 04:31:17PM +0100, Peter Zijlstra wrote: > > > On Thu, Feb 21, 2019 at 10:21:39AM -0500, Joel Fernandes wrote: > >

Re: [PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-21 Thread Joel Fernandes
On Thu, Feb 21, 2019 at 11:34:41PM +0900, Masahiro Yamada wrote: > On Wed, Feb 20, 2019 at 12:17 AM Joel Fernandes > wrote: > > > > > Firstly, I want to apologize for not testing this and other corner cases you > > brought up. I should have known better. Si

Re: [PATCH RFC 3/5] sched/cpufreq: Fix incorrect RCU API usage

2019-02-21 Thread Joel Fernandes
On Thu, Feb 21, 2019 at 10:18:05AM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 12:49:40AM -0500, Joel Fernandes (Google) wrote: > > @@ -34,8 +34,12 @@ void cpufreq_add_update_util_hook(int cpu, struct > > update_util_data *data, > > if (W

Re: [PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-21 Thread Joel Fernandes
Hi Peter, Thanks for taking a look. On Thu, Feb 21, 2019 at 10:19:44AM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 12:49:41AM -0500, Joel Fernandes (Google) wrote: > > > Also replace rcu_assign_pointer call on rq->sd with WRITE_ONCE. This > > should be suff

[PATCH RFC 2/5] ixgbe: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes (Google)
rea to test it properly. Signed-off-by: Joel Fernandes (Google) --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 - 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgb

[PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-20 Thread Joel Fernandes (Google)
rnel//sched/topology.c:618:9: sparse: error: incompatible types in comparison expression (different address spaces) kernel//sched/topology.c:621:9: sparse: error: incompatible types in comparison expression (different address spaces) Signed-off-by: Joel Fernandes (Google) --- kernel/sched/sche

[PATCH RFC 0/5] RCU fixes for rcu_assign_pointer() usage

2019-02-20 Thread Joel Fernandes (Google)
time since fixing them is a bit more involved). Joel Fernandes (Google) (5): net: rtnetlink: Fix incorrect RCU API usage ixgbe: Fix incorrect RCU API usage sched/cpufreq: Fix incorrect RCU API usage sched/topology: Annonate RCU pointers properly rcuwait: Replace rcu_assign_pointer() with WRITE_ONCE

[PATCH RFC 3/5] sched/cpufreq: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes (Google)
replaced with, say, WRITE_ONCE or smp_store_release. Or, may be we add a new API to do it. But calls rcu_assign_pointer seems an abuse of the RCU API unless RCU is being used. Signed-off-by: Joel Fernandes (Google) --- kernel/sched/cpufreq.c | 8 ++-- kernel/sched/sched.h | 2 +- 2 files changed

[PATCH RFC 5/5] rcuwait: Replace rcu_assign_pointer() with WRITE_ONCE

2019-02-20 Thread Joel Fernandes (Google)
off-by: Joel Fernandes (Google) --- include/linux/rcuwait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rcuwait.h b/include/linux/rcuwait.h index 90bfa3279a01..9e5b4760e6c2 100644 --- a/include/linux/rcuwait.h +++ b/include/linux/rcuwait.h @@ -44,7 +44,7 @@ exter

[PATCH RFC 1/5] net: rtnetlink: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes (Google)
using RCU API. net/core/rtnetlink.c:332:13: warning: incorrect type in assignment (different address spaces) net/core/rtnetlink.c:332:13:expected struct rtnl_link **tab net/core/rtnetlink.c:332:13:got struct rtnl_link *[noderef] * Signed-off-by: Joel Fernandes (Google) --- net/core

Re: [PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-19 Thread Joel Fernandes
On Tue, Feb 19, 2019 at 01:42:13PM +0900, Masahiro Yamada wrote: > On Tue, Feb 19, 2019 at 1:14 PM Masahiro Yamada > wrote: > > > > On Fri, Feb 15, 2019 at 11:48 PM Alexei Starovoitov > > wrote: > > > > > > On Mon, Feb 11, 2019 at 09:35

Re: [PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-18 Thread Joel Fernandes
On Tue, Feb 19, 2019 at 01:42:13PM +0900, Masahiro Yamada wrote: [..] > > > > This archive makes > > > > it possible to build kernel modules, run eBPF programs, and other > > > > tracing programs that need to extend the kernel for tracing purposes > > > > without any dependency on the file system h

Re: [PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-18 Thread Joel Fernandes
On Tue, Feb 19, 2019 at 01:14:11PM +0900, Masahiro Yamada wrote: > On Fri, Feb 15, 2019 at 11:48 PM Alexei Starovoitov > wrote: > > > > On Mon, Feb 11, 2019 at 09:35:59AM -0500, Joel Fernandes (Google) wrote: > > > Introduce in-kernel headers and other artifacts which

Re: [PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-14 Thread Joel Fernandes
On Thu, Feb 14, 2019 at 07:19:29PM -0800, Alexei Starovoitov wrote: > On Mon, Feb 11, 2019 at 09:35:59AM -0500, Joel Fernandes (Google) wrote: > > Introduce in-kernel headers and other artifacts which are made available > > as an archive through proc (/proc/kheaders.txz file). Thi

Re: syzbot rcu/debugobjects warning

2018-03-24 Thread Joel Fernandes
On Fri, Mar 23, 2018 at 1:41 PM, Thomas Gleixner wrote: > On Fri, 23 Mar 2018, Joel Fernandes wrote: >> On Fri, Mar 23, 2018 at 2:11 AM, Thomas Gleixner wrote: >> > On Thu, 22 Mar 2018, Joel Fernandes wrote: >> Sorry. Here is the raw crash log: https://pastebin.com/raw

[PATCH v4 2/4] samples/bpf: Enable cross compiler support

2017-09-20 Thread Joel Fernandes
Starovoitov Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index cf17c7932a6e..13f74b67ca44 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -177,6 +177,11

[PATCH v4 1/4] samples/bpf: Use getppid instead of getpgrp for array map stress

2017-09-20 Thread Joel Fernandes
stress test. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes --- samples/bpf/map_perf_test_kern.c | 2 +- samples/bpf/map_perf_test_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/bpf/map_perf_test_kern.c b/samples/bpf/map_perf_test_kern.c index

[PATCH v4 3/4] samples/bpf: Fix pt_regs issues when cross-compiling

2017-09-20 Thread Joel Fernandes
PF program is going to run on. To fix this, lets pass ARCH so the header knows which target the BPF program is being compiled for and can use the correct pt_regs code. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 2 +- tools/testing

[PATCH v4 4/4] samples/bpf: Add documentation on cross compilation

2017-09-20 Thread Joel Fernandes
Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes --- samples/bpf/README.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst index 79f9a58f1872..2b906127ef54 100644 --- a/samples/bpf/README.rst +++ b/samples/bpf/README.rst

[PATCH v4 0/4] Add cross-compilation support to eBPF samples

2017-09-20 Thread Joel Fernandes
. Changes since v3: - just a repost with acks [1] https://lkml.org/lkml/2017/8/7/417 Joel Fernandes (4): samples/bpf: Use getppid instead of getpgrp for array map stress samples/bpf: Enable cross compiler support samples/bpf: Fix pt_regs issues when cross-compiling samples/bpf: Add

Re: [PATCH RFC v3 0/4] Add cross-compilation support to eBPF samples

2017-09-05 Thread Joel Fernandes
Hi Alexei, On Tue, Sep 5, 2017 at 8:24 PM, Alexei Starovoitov wrote: > On Sun, Sep 03, 2017 at 11:23:21AM -0700, Joel Fernandes wrote: >> These patches fix issues seen when cross-compiling eBPF samples on arm64. >> Compared to [1], I dropped the controversial inline-asm patch

[PATCH RFC v3 1/4] samples/bpf: Use getppid instead of getpgrp for array map stress

2017-09-03 Thread Joel Fernandes
stress test. CC: Alexei Starovoitov CC: Daniel Borkmann Cc: David Miller Signed-off-by: Joel Fernandes --- samples/bpf/map_perf_test_kern.c | 2 +- samples/bpf/map_perf_test_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/bpf/map_perf_test_kern.c b/samples

[PATCH RFC v3 3/4] samples/bpf: Fix pt_regs issues when cross-compiling

2017-09-03 Thread Joel Fernandes
PF program is going to run on. To fix this, lets pass ARCH so the header knows which target the BPF program is being compiled for and can use the correct pt_regs code. CC: Alexei Starovoitov CC: Daniel Borkmann Cc: David Miller Signed-off-by: Joel Fernandes --- samples/bp

[PATCH RFC v3 2/4] samples/bpf: Enable cross compiler support

2017-09-03 Thread Joel Fernandes
CC: Daniel Borkmann Cc: David Miller Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index cf17c7932a6e..13f74b67ca44 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile

[PATCH RFC v3 4/4] samples/bpf: Add documentation on cross compilation

2017-09-03 Thread Joel Fernandes
CC: Alexei Starovoitov CC: Daniel Borkmann CC: David Miller Signed-off-by: Joel Fernandes --- samples/bpf/README.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst index 79f9a58f1872..2b906127ef54 100644 --- a/samples/bpf

[PATCH RFC v3 0/4] Add cross-compilation support to eBPF samples

2017-09-03 Thread Joel Fernandes
controversial bit. [1] https://lkml.org/lkml/2017/8/7/417 Joel Fernandes (4): samples/bpf: Use getppid instead of getpgrp for array map stress samples/bpf: Enable cross compiler support samples/bpf: Fix pt_regs issues when cross-compiling samples/bpf: Add documentation on cross compilation

Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64

2017-08-17 Thread Joel Fernandes
On Tue, Aug 8, 2017 at 8:35 PM, David Miller wrote: > From: Joel Fernandes > Date: Mon, 7 Aug 2017 18:20:49 -0700 > >> On Mon, Aug 7, 2017 at 11:28 AM, David Miller wrote: >>> The amount of hellish hacks we are adding to deal with this is getting >>> way out o

Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64

2017-08-07 Thread Joel Fernandes
Hi Dave, On Mon, Aug 7, 2017 at 11:28 AM, David Miller wrote: > > Please, no. Sorry you dislike it, I had intentionally marked it as RFC as its an idea I was just toying with the idea and posted it early to get feedback. > > The amount of hellish hacks we are adding to deal with this is getting

Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64

2017-08-07 Thread Joel Fernandes
On Mon, Aug 7, 2017 at 6:06 AM, Joel Fernandes wrote: > inline assembly has haunted building samples on arm64 for quite sometime. > This patch uses the pre-processor to noop all occurences of inline asm when > compiling the BPF sample for the BPF target. > > This patch reintroduc

[PATCH RFC v2 2/5] samples/bpf: Enable cross compiler support

2017-08-07 Thread Joel Fernandes
y the cross target is running and its not smart to rely on it. Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 6c7468eb3684..e5642c8c144d 100644 --- a/samples/bpf/Makefile +++ b/sample

[PATCH RFC v2 1/5] samples/bpf: Use getppid instead of getpgrp for array map stress

2017-08-07 Thread Joel Fernandes
stress test. Signed-off-by: Joel Fernandes --- samples/bpf/map_perf_test_kern.c | 2 +- samples/bpf/map_perf_test_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/bpf/map_perf_test_kern.c b/samples/bpf/map_perf_test_kern.c index 245165817fbe..038ffec295cf

[PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64

2017-08-07 Thread Joel Fernandes
-kernel/2015-November/024036.html Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 40 +--- samples/bpf/arm64_asmstubs.h | 3 +++ samples/bpf/bpf_helpers.h | 12 ++-- samples/bpf/generic_asmstubs.h | 4 4 files changed, 46

[PATCH RFC v2 5/5] samples/bpf: Add documentation on cross compilation

2017-08-07 Thread Joel Fernandes
Signed-off-by: Joel Fernandes --- samples/bpf/README.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst index 79f9a58f1872..2b906127ef54 100644 --- a/samples/bpf/README.rst +++ b/samples/bpf/README.rst @@ -64,3 +64,13 @@ It is also

[PATCH RFC v2 4/5] samples/bpf: Fix pt_regs issues when cross-compiling

2017-08-07 Thread Joel Fernandes
PF program is going to run on. To fix this, lets pass ARCH so the header knows which target the BPF program is being compiled for and can use the correct pt_regs code. Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 2 +- samples/bpf/bpf_help

[PATCH RFC 2/5] samples/bpf: Enable cross compiler support

2017-08-07 Thread Joel Fernandes
y the cross target is running and its not smart to rely on it. Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 6c7468eb3684..e5642c8c144d 100644 --- a/samples/bpf/Makefile +++ b/sample

[PATCH RFC 3/5] samples/bpf: Fix inline asm issues building samples on arm64

2017-08-07 Thread Joel Fernandes
-kernel/2015-November/024036.html Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 40 +--- samples/bpf/arm64_asmstubs.h | 3 +++ samples/bpf/bpf_helpers.h | 12 ++-- samples/bpf/generic_asmstubs.h | 4 4 files changed, 46

[PATCH RFC 4/5] samples/bpf: Fix pt_regs issues when cross-compiling

2017-08-07 Thread Joel Fernandes
PF program is going to run on. To fix this, lets pass ARCH so the header knows which target the BPF program is being compiled for and can use the correct pt_regs code. Signed-off-by: Joel Fernandes --- samples/bpf/Makefile | 2 +- samples/bpf/bpf_help

[PATCH RFC 1/5] samples/bpf: Use getppid instead of getpgrp for array map stress

2017-08-07 Thread Joel Fernandes
stress test. Signed-off-by: Joel Fernandes --- samples/bpf/map_perf_test_kern.c | 2 +- samples/bpf/map_perf_test_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/bpf/map_perf_test_kern.c b/samples/bpf/map_perf_test_kern.c index 245165817fbe..038ffec295cf

[PATCH RFC 5/5] samples/bpf: Add documentation on cross compilation

2017-08-07 Thread Joel Fernandes
Signed-off-by: Joel Fernandes --- samples/bpf/README.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst index 79f9a58f1872..2b906127ef54 100644 --- a/samples/bpf/README.rst +++ b/samples/bpf/README.rst @@ -64,3 +64,13 @@ It is also

Re: [PATCH] samples/bpf: Fix cross compiler error with bpf sample

2017-08-05 Thread Joel Fernandes
Hi Daniel, >>> >>> So the only arch that sets __ARCH_WANT_SYSCALL_DEPRECATED >>> is score: >>> >>>$ git grep -n __ARCH_WANT_SYSCALL_DEPRECATED >>>arch/score/include/uapi/asm/unistd.h:7:#define >>> __ARCH_WANT_SYSCALL_DEPRECATED >>>include/uapi/asm-generic/unistd.h:837:#ifdef >>> __ARC

Re: [PATCH] samples/bpf: Fix cross compiler error with bpf sample

2017-08-04 Thread Joel Fernandes
On Fri, Aug 4, 2017 at 6:58 AM, Daniel Borkmann wrote: > On 08/04/2017 07:46 AM, Joel Fernandes wrote: >> >> When cross-compiling the bpf sample map_perf_test for aarch64, I find that >> __NR_getpgrp is undefined. This causes build errors. Fix it by allowing >> the &

[PATCH] samples/bpf: Fix cross compiler error with bpf sample

2017-08-03 Thread Joel Fernandes
When cross-compiling the bpf sample map_perf_test for aarch64, I find that __NR_getpgrp is undefined. This causes build errors. Fix it by allowing the deprecated syscall in the sample. Signed-off-by: Joel Fernandes --- samples/bpf/map_perf_test_user.c | 2 ++ 1 file changed, 2 insertions