[PATCH v2 net] tcp/dccp: fix other lockdep splats accessing ireq_opt

2017-10-23 Thread Eric Dumazet
From: Eric Dumazet In my first attempt to fix the lockdep splat, I forgot we could enter inet_csk_route_req() with a freshly allocated request socket, for which refcount has not yet been elevated, due to complex SLAB_TYPESAFE_BY_RCU rules. We either are in rcu_read_lock()

[PATCH net-next 1/7] ipv6: addrconf: move ipv6_chk_same_addr() to avoid forward declaration

2017-10-23 Thread Eric Dumazet
ipv6_chk_same_addr() is only used by ipv6_add_addr_hash(), so moving it avoids a forward declaration. Signed-off-by: Eric Dumazet --- net/ipv6/addrconf.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git

[PATCH net-next 2/7] ipv6: addrconf: factorize inet6_addr_hash() call

2017-10-23 Thread Eric Dumazet
ipv6_add_addr_hash() can compute the hash value outside of locked section and pass it to ipv6_chk_same_addr(). Signed-off-by: Eric Dumazet --- net/ipv6/addrconf.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/net/ipv6/addrconf.c

[PATCH net-next 4/7] ipv6: addrconf: do not block BH in ipv6_chk_addr_and_flags()

2017-10-23 Thread Eric Dumazet
rcu_read_lock() is enough here, as inet6_ifa_finish_destroy() uses kfree_rcu() Signed-off-by: Eric Dumazet --- net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index

[PATCH net-next 3/7] ipv6: addrconf: add per netns perturbation in inet6_addr_hash()

2017-10-23 Thread Eric Dumazet
Bring IPv6 in par with IPv4 : - Use net_hash_mix() to spread addresses a bit more. - Use 256 slots hash table instead of 16 Signed-off-by: Eric Dumazet --- include/net/addrconf.h | 2 +- net/ipv6/addrconf.c| 16 +--- 2 files changed, 10 insertions(+), 8

[PATCH net-next 5/7] ipv6: addrconf: do not block BH in ipv6_get_ifaddr()

2017-10-23 Thread Eric Dumazet
rcu_read_lock() is enough here, no need to block BH. Signed-off-by: Eric Dumazet --- net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index

Re: [Patch net 00/15] net_sched: remove RCU callbacks from TC

2017-10-23 Thread Cong Wang
On Mon, Oct 23, 2017 at 4:16 PM, Eric Dumazet wrote: > On Mon, 2017-10-23 at 15:02 -0700, Cong Wang wrote: > >> b) As suggested by Paul, we could defer the work to a workqueue and >> gain the permission of holding RTNL again without any performance >> impact, however, this

Re: [PATCH net-next v7 4/5] selinux: bpf: Add selinux check for eBPF syscall operations

2017-10-23 Thread Paul Moore
On Wed, Oct 18, 2017 at 4:00 PM, Chenbo Feng wrote: > From: Chenbo Feng > > Implement the actual checks introduced to eBPF related syscalls. This > implementation use the security field inside bpf object to store a sid that > identify the bpf

Hello

2017-10-23 Thread Mrs. Liz
Dear Sir/Madam Greetings to you My name is Mrs. Liz Clayton I am 73 years old, I am a dying woman who has decided to donate what I have to you/churches/ motherless babies/less privileged/widows.I was diagnosed with cancer for about 2 years ago. I have been touched by God to donate from what I

Re: [PATCH 0/3] pull request for net-next: batman-adv 2017-10-23

2017-10-23 Thread David Miller
From: Simon Wunderlich Date: Mon, 23 Oct 2017 17:37:01 +0200 > here is another small documentation/cleanup pull request of batman-adv to go > into net-next. > > Please pull or let me know of any problem! Pulled, thanks Simon.

Re: [PATCH net-next 0/7] net: hns3: bug fixes & code improvements

2017-10-23 Thread David Miller
From: Lipeng Date: Mon, 23 Oct 2017 19:51:00 +0800 > This patchset introduces various HNS3 bug fixes, optimizations and code > improvements. Series applied.

Re: [PATCH v2 net-next 2/2] ibmvnic: Fix failover error path for non-fatal resets

2017-10-23 Thread kbuild test robot
Hi John, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/John-Allen/ibmvnic-Update-reset-infrastructure-to-support-tunable-parameters/20171024-062007 config: powerpc-allmodconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian

Re: Linux ECN Handling

2017-10-23 Thread Steve Ibanez
Hi All, I upgraded the kernel on all of our machines to Linux 4.13.8-041308-lowlatency. However, I'm still observing the same behavior where the source enters a timeout when the CWND=1MSS and it receives ECN marks. Here are the measured flow rates:

Re: [Patch net 00/15] net_sched: remove RCU callbacks from TC

2017-10-23 Thread Eric Dumazet
On Mon, 2017-10-23 at 15:02 -0700, Cong Wang wrote: > b) As suggested by Paul, we could defer the work to a workqueue and > gain the permission of holding RTNL again without any performance > impact, however, this seems impossible too, because as lockdep > complains we have a deadlock when

[PATCH net-next 6/7] ipv6: addrconf: do not block BH in /proc/net/if_inet6 handling

2017-10-23 Thread Eric Dumazet
Table is really RCU protected, no need to block BH Signed-off-by: Eric Dumazet --- net/ipv6/addrconf.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index

[PATCH net-next 7/7] ipv6: addrconf: do not block BH in ipv6_chk_home_addr()

2017-10-23 Thread Eric Dumazet
rcu_read_lock() is enough here, no need to block BH. Signed-off-by: Eric Dumazet --- net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index

[PATCH net-next 0/7] ipv6: addrconf: hash improvements and cleanups

2017-10-23 Thread Eric Dumazet
Remove unecessary BH blocking, and bring IPv6 addrconf to modern world, with per netns hash perturbation and decent hash size. Eric Dumazet (7): ipv6: addrconf: move ipv6_chk_same_addr() to avoid forward declaration ipv6: addrconf: factorize inet6_addr_hash() call ipv6: addrconf: add per

Re: [PATCH net-next v7 5/5] selinux: bpf: Add addtional check for bpf object file receive

2017-10-23 Thread Paul Moore
On Wed, Oct 18, 2017 at 4:00 PM, Chenbo Feng wrote: > From: Chenbo Feng > > Introduce a bpf object related check when sending and receiving files > through unix domain socket as well as binder. It checks if the receiving > process have privilege to

Re: [Patch net 00/15] net_sched: remove RCU callbacks from TC

2017-10-23 Thread Eric Dumazet
On Mon, 2017-10-23 at 16:23 -0700, Cong Wang wrote: > On Mon, Oct 23, 2017 at 4:16 PM, Eric Dumazet wrote: > > On Mon, 2017-10-23 at 15:02 -0700, Cong Wang wrote: > > > >> b) As suggested by Paul, we could defer the work to a workqueue and > >> gain the permission of

Re: [PATCH net-next 00/12] tools: bpftool: Add JSON output to bpftool

2017-10-23 Thread David Miller
From: Jakub Kicinski Date: Mon, 23 Oct 2017 09:24:04 -0700 > Quentin says: > > This series introduces support for JSON output to all bpftool commands. It > adds option parsing, and several options are created: > > * -j, --json Switch to JSON output. > *

Re: [PATCH v2 net-next 0/6] add a set of tracepoints to tcp stack

2017-10-23 Thread David Miller
From: Song Liu Date: Mon, 23 Oct 2017 09:20:21 -0700 > Changes from v1: > > Fix build error (with ipv6 as ko) by adding EXPORT_TRACEPOINT_SYMBOL_GPL > for trace_tcp_send_reset. Series applied.

Re: [PATCH net-next 0/2] net: dsa: don't unmask port bitmaps

2017-10-23 Thread Florian Fainelli
On 10/23/2017 02:26 PM, Vivien Didelot wrote: > Hi Andrew, > > Andrew Lunn writes: > >> On Mon, Oct 23, 2017 at 02:17:29PM -0400, Vivien Didelot wrote: >>> DSA has several bitmaps to store the type of ports: cpu_port_mask, >>> dsa_port_mask and enabled_port_mask. But the code is

RE: [PATCH] drivers/net/usb: add device id for TP-LINK UE300 USB 3.0 Ethernet

2017-10-23 Thread Ran Wang
Hi Oliver > -Original Message- > From: Oliver Neukum [mailto:oneu...@suse.com] > Sent: Monday, October 23, 2017 6:56 PM > To: Ran Wang > Cc: David S . Miller ; hayeswang > ; linux-ker...@vger.kernel.org; linux- >

Re: Linux ECN Handling

2017-10-23 Thread Neal Cardwell
On Mon, Oct 23, 2017 at 6:15 PM, Steve Ibanez wrote: > Hi All, > > I upgraded the kernel on all of our machines to Linux > 4.13.8-041308-lowlatency. However, I'm still observing the same > behavior where the source enters a timeout when the CWND=1MSS and it > receives ECN

[PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-23 Thread Jonathan Basseri
If a socket has a valid dst cache, then xfrm_lookup_route will get skipped. However, the cache is not invalidated when applying policy to a socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are sometimes ignored on those sockets. (Note: This was broken for IPv4 and IPv6 at different

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-23 Thread Jonathan Basseri 
On Mon, Oct 23, 2017 at 6:18 PM, Jonathan Basseri wrote: > If a socket has a valid dst cache, then xfrm_lookup_route will get > skipped. However, the cache is not invalidated when applying policy to a > socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are >

Re: [PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-10-23 Thread Tuomas Tynkkynen
Hi Al, On Fri, 2017-10-20 at 21:11 +0100, Al Viro wrote: > On Tue, Sep 26, 2017 at 04:10:14PM +0300, Tuomas Tynkkynen wrote: > > Hi Al, > > > > On Wed, 2017-09-06 at 17:59 +0300, Tuomas Tynkkynen wrote: > > > These two patches fix two hard-to-hit (but really annoying) bugs > > > in > > > 9p. > >

[PATCH v3] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mark hlist node in sk rcu iterator as protected by the rcu. hlist_next_rcu accomplishes this and silences the warnings sparse throws. Found with make C=1 net/ipv4/udp.o on linux-next tag next-20171009. Signed-off-by: Tim Hansen --- include/net/sock.h | 4 ++-- 1 file

Re: [PATCH net-next 07/12] tools: bpftool: add JSON output for `bpftool map *` commands

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Reuse the json_writer API introduced in an earlier commit to make bpftool able to generate JSON output on `bpftool map { show | dump | lookup | getnext }` commands. Remaining commands produce no

Re: [PATCH net-next 09/12] tools: bpftool: turn err() and info() macros into functions

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Turn err() and info() macros into functions. In order to avoid naming conflicts with variables in the code, rename them as p_err() and p_info() respectively. The behavior of these functions is

Re: [PATCH net-next 08/12] tools: bpftool: add JSON output for `bpftool batch file FILE` command

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet `bpftool batch file FILE` takes FILE as an argument and executes all the bpftool commands it finds inside (or stops if an error occurs). To obtain a consistent JSON output, create a root JSON

Re: [PATCH net-next 10/12] tools: bpftool: provide JSON output for all possible commands

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet As all commands can now return JSON output (possibly just a "null" value), output of `bpftool --json batch file FILE` should also be fully JSON compliant. Signed-off-by: Quentin Monnet

Re: [PATCH net-next 11/12] tools: bpftool: add cosmetic changes for the manual pages

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Make the look-and-feel of the manual pages somewhat closer to other manual pages, such as the ones from the utilities from iproute2, by highlighting more keywords. Signed-off-by: Quentin Monnet

Re: [PATCH net-next 2/3] bpf: permit multiple bpf attachments for a single perf event

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 07:58 PM, Yonghong Song wrote: [...] __this_cpu_dec(bpf_prog_active); @@ -741,3 +754,63 @@ const struct bpf_verifier_ops perf_event_verifier_ops = { const struct bpf_prog_ops perf_event_prog_ops = { }; + +static DEFINE_MUTEX(bpf_event_mutex); + +int

Re: problem with rtnetlink 'reference' count

2017-10-23 Thread Florian Westphal
Peter Zijlstra wrote: > On Mon, Oct 23, 2017 at 06:37:44PM +0200, Florian Westphal wrote: > > > Is refcount_t only supposed to be used with dec_and_test patterns? > > Yes, for reference counting objects. Hmm, I still feel its appropriate, but anyway: > > > This

Re: [PATCH v2] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mon, Oct 23, 2017 at 06:42:50PM +, Levin, Alexander (Sasha Levin) wrote: > On Mon, Oct 23, 2017 at 11:39:22AM -0400, Tim Hansen wrote: > >Mark hlist nodes in sk rcu iterator as protected by the rcu. > >hlist_next_rcu accomplishes this and silences the warnings > >sparse throws for

Re: [PATCH net-next 01/12] tools: bpftool: copy JSON writer from iproute2 repository

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet In prevision of following commits, supposed to add JSON output to the tool, two files are copied from the iproute2 repository (taken at commit 268a9eee985f): lib/json_writer.c and

Re: [PATCH net-next 02/12] tools: bpftool: add option parsing to bpftool, --help and --version

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Add an option parsing facility to bpftool, in prevision of future options for demanding JSON output. Currently, two options are added: --help and --version, that act the same as the respective

Re: [PATCH] net: sunrpc: svcauth_gss: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread J. Bruce Fields
In the past we've avoided BUG_ON(X) where X might have side effects, on the theory that it should actually be OK just to compile out BUG_ON()s. Has that changed? In any case, I don't find that this improves readability; dropping. --b. On Mon, Oct 23, 2017 at 01:16:35PM -0500, Gustavo A. R.

Re: [PATCH net-next 06/12] tools: bpftool: add JSON output for `bpftool prog dump xlated *` command

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Add a new printing function to dump translated eBPF instructions as JSON. As for plain output, opcodes are printed only on request (when `opcodes` is provided on the command line). The

Re: [PATCH net-next 0/2] net: dsa: don't unmask port bitmaps

2017-10-23 Thread Andrew Lunn
On Mon, Oct 23, 2017 at 02:17:29PM -0400, Vivien Didelot wrote: > DSA has several bitmaps to store the type of ports: cpu_port_mask, > dsa_port_mask and enabled_port_mask. But the code is inconsistently > unmasking them. > > The legacy code tries to unmask cpu_port_mask and dsa_port_mask but >

[patch net-next] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath

2017-10-23 Thread Jiri Pirko
From: Jiri Pirko In sch_handle_egress and sch_handle_ingress tp->q is used only in order to update stats. So stats and filter list are the only things that are needed in clsact qdisc fastpath processing. Introduce new mini_Qdisc struct to hold those items. This removes need

Netdev2.2 reminder

2017-10-23 Thread Tom Herbert
Hello, We'd like to remind you that Netdev 2.2 is fast approaching. It's November 8th-10th, 2017 in Seoul, Korea. There is still plenty time to register at https://onlineregistrations.ca/netdev22/ ! We have amazing content lined up for the conference. Please check out

Re: [PATCH net-next 03/12] tools: bpftool: introduce --json and --pretty options

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet These two options can be used to ask for a JSON output (--j or -json), and to make this JSON human-readable (-p or --pretty). A json_writer object is created when JSON is required, and will be

Re: [PATCH net-next 04/12] tools: bpftool: add JSON output for `bpftool prog show *` command

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Reuse the json_writer API introduced in an earlier commit to make bpftool able to generate JSON output on `bpftool prog show *` commands. For readability, the code from show_prog() has been split

Re: [PATCH net-next 05/12] tools: bpftool: add JSON output for `bpftool prog dump jited *` command

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Reuse the json_writer API introduced in an earlier commit to make bpftool able to generate JSON output on `bpftool prog show *` commands. A new printing function is created to be passed as an

Re: [net-next PATCH] bpf: cpumap fix potential lost wake-up problem

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 07:39 PM, Jesper Dangaard Brouer wrote: As pointed out by Michael, commit 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation") contains a classical example of the potential lost wake-up problem. We need to recheck the condition __ptr_ring_empty() after changing

Re: [PATCH net-next 12/12] tools: bpftool: update documentation for --json and --pretty usage

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 06:24 PM, Jakub Kicinski wrote: From: Quentin Monnet Update the documentation to provide help about JSON output generation, and add an example in bpftool-prog manual page. Also reintroduce an example that was left aside when the tool was moved from

[PATCH v3 net-next] tcp: Configure TFO without cookie per socket and/or per route

2017-10-23 Thread Christoph Paasch
We already allow to enable TFO without a cookie by using the fastopen-sysctl and setting it to TFO_SERVER_COOKIE_NOT_REQD (or TFO_CLIENT_NO_COOKIE). This is safe to do in certain environments where we know that there isn't a malicous host (aka., data-centers) or when the application-protocol

Re: [PATCH net-next 2/3] bpf: permit multiple bpf attachments for a single perf event

2017-10-23 Thread Yonghong Song
On 10/23/17 1:52 PM, Daniel Borkmann wrote: On 10/23/2017 07:58 PM, Yonghong Song wrote: [...]   __this_cpu_dec(bpf_prog_active); @@ -741,3 +754,63 @@ const struct bpf_verifier_ops perf_event_verifier_ops = {   const struct bpf_prog_ops perf_event_prog_ops = {   }; + +static

Re: [PATCH net-next 0/2] net: dsa: don't unmask port bitmaps

2017-10-23 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Mon, Oct 23, 2017 at 02:17:29PM -0400, Vivien Didelot wrote: >> DSA has several bitmaps to store the type of ports: cpu_port_mask, >> dsa_port_mask and enabled_port_mask. But the code is inconsistently >> unmasking them. >> >> The legacy code

[PATCH net-next] ipv6: add ip6_null_entry check in rt6_select()

2017-10-23 Thread Wei Wang
From: Wei Wang In rt6_select(), fn->leaf could be pointing to net->ipv6.ip6_null_entry. In this case, we should directly return instead of trying to carry on with the rest of the process. If not, we could crash at: spin_lock_bh(>rt6i_table->rt6_lock); because

Re: [PATCH v8 02/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-10-23 Thread Rob Herring
On Mon, Oct 23, 2017 at 08:56:18PM +0200, Corentin Labbe wrote: > This patch add documentation about the MDIO switch used on sun8i-h3-emac > for integrated PHY. > > Signed-off-by: Corentin Labbe > --- > .../devicetree/bindings/net/dwmac-sun8i.txt| 139 >

[PATCH net-next v2 0/3] bpf: permit multiple bpf attachments for a single perf tracepoint event

2017-10-23 Thread Yonghong Song
This patch set adds support to permit multiple bpf prog attachments for a single perf tracepoint event. Patch 1 does some cleanup such that perf_event_{set|free}_bpf_handler is called under the same condition. Patch 2 has the core implementation, and Patch 3 adds a test case. Changelogs: v1 ->

[PATCH net-next v2 1/3] bpf: use the same condition in perf event set/free bpf handler

2017-10-23 Thread Yonghong Song
This is a cleanup such that doing the same check in perf_event_free_bpf_prog as we already do in perf_event_set_bpf_prog step. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau --- kernel/events/core.c | 6 +++---

[PATCH net-next v2 3/3] bpf: add a test case to test single tp multiple bpf attachment

2017-10-23 Thread Yonghong Song
The bpf sample program syscall_tp is modified to show attachment of more than bpf programs for a particular kernel tracepoint. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau --- samples/bpf/syscall_tp_user.c |

Re: [PATCH v3 net-next] tcp: Configure TFO without cookie per socket and/or per route

2017-10-23 Thread Yuchung Cheng
On Mon, Oct 23, 2017 at 1:22 PM, Christoph Paasch wrote: > > We already allow to enable TFO without a cookie by using the > fastopen-sysctl and setting it to TFO_SERVER_COOKIE_NOT_REQD (or > TFO_CLIENT_NO_COOKIE). > This is safe to do in certain environments where we know that

[Patch net 04/15] net_sched: remove RCU callbacks in matchall filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(). Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney"

[Patch net 10/15] net_sched: remove RCU callbacks in fw filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(). Similarly, fw_destroy() is special here, because it deletes all elements from a hashtable, we definitely don't want to wait for each element, however we can unpublish the whole hashtable from upper layer first, so that after one grace period, the whole

[Patch net 09/15] net_sched: remove RCU callbacks in u32 filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(). Note, u32_clear_hnode() is very special here, because it deletes all elements from a hashtable, we definitely don't want to wait for each element, however we can unpublish the whole hashtable from upper layer first, so that after one grace period, the

[Patch net 06/15] net_sched: remove RCU callbacks in rsvp filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(). I don't touch the rest kfree_rcu() because they are not relevant here and they are more complicated. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend

[Patch net 08/15] net_sched: remove RCU callbacks in tcindex filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(). Reported-by: Chris Mi Cc: Daniel Borkmann Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang

[Patch net 01/15] net_sched: remove RCU callbacks in basic filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(), except in basic_destroy() we have to use list_splice_init_rcu(). Reported-by: Chris Mi Cc: Daniel Borkmann Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E.

[Patch net 00/15] net_sched: remove RCU callbacks from TC

2017-10-23 Thread Cong Wang
Recently, the RCU callbacks used in TC filters and TC actions keep drawing my attention, they introduce at least 4 race condition bugs: 1. A simple one fixed by Daniel: commit c78e1746d3ad7d548bdf3fe491898cc453911a49 Author: Daniel Borkmann Date: Wed May 20 17:13:33 2015

[Patch net 02/15] net_sched: remove RCU callbacks in bpf filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(), except in cls_bpf_destroy() we have to use list_splice_init_rcu(). Reported-by: Chris Mi Cc: Daniel Borkmann Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E.

[Patch net 11/15] net_sched: remove RCU callbacks in route filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(). Similarly, route4_destroy() is special here, because it deletes all elements from a hashtable, we definitely don't want to wait for each element, however we can unpublish the whole hashtable from upper layer first, so that after one grace period, the

[Patch net 15/15] selftests: Introduce a new test case to tc testsuite

2017-10-23 Thread Cong Wang
From: Chris Mi From: Chris Mi In this patchset, we fixed a tc bug. This patch adds the test case that reproduces the bug. To run this test case, user should specify an existing NIC device: # sudo ./tdc.py -d enp4s0f0 This test case belongs to

[Patch net 14/15] selftests: Introduce a new script to generate tc batch file

2017-10-23 Thread Cong Wang
From: Chris Mi From: Chris Mi # ./tdc_batch.py -h usage: tdc_batch.py [-h] [-n NUMBER] [-o] [-s] [-p] device file TC batch file generator positional arguments: devicedevice name file batch file name

[Patch net 12/15] net_sched: remove RCU callbacks in sample action

2017-10-23 Thread Cong Wang
The ->cleanup() now can block, it is okay to change it to synchronize_rcu(). This could also fix a use-after-free in module unloading. Cc: Yotam Gigi Cc: Jiri Pirko Cc: Jamal Hadi Salim Cc: "Paul E. McKenney"

[Patch net 07/15] net_sched: remove RCU callbacks in flow filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(), except in flow_destroy() we have to use list_splice_init_rcu(). Reported-by: Chris Mi Cc: Daniel Borkmann Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E.

[Patch net 13/15] net_sched: add rtnl assertion to tcf_exts_destroy()

2017-10-23 Thread Cong Wang
After previous patches, it is now safe to claim that tcf_exts_destroy() is always called with RTNL lock. Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong

[Patch net 05/15] net_sched: remove RCU callbacks in cgroup filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(). Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney"

[PATCH net-next v2 2/3] bpf: permit multiple bpf attachments for a single perf event

2017-10-23 Thread Yonghong Song
This patch enables multiple bpf attachments for a kprobe/uprobe/tracepoint single trace event. Each trace_event keeps a list of attached perf events. When an event happens, all attached bpf programs will be executed based on the order of attachment. A global bpf_event_mutex lock is introduced to

Re: [PATCH net-next] ipv6: add ip6_null_entry check in rt6_select()

2017-10-23 Thread Martin KaFai Lau
On Mon, Oct 23, 2017 at 09:59:35PM +, Wei Wang wrote: > From: Wei Wang > > In rt6_select(), fn->leaf could be pointing to net->ipv6.ip6_null_entry. > In this case, we should directly return instead of trying to carry on > with the rest of the process. > If not, we could

Re: [PATCH v8 01/10] dt-bindings: net: Restore sun8i dwmac binding

2017-10-23 Thread Rob Herring
On Mon, Oct 23, 2017 at 08:56:17PM +0200, Corentin Labbe wrote: > The original dwmac-sun8i DT bindings have some issue on how to handle > integrated PHY and was reverted in last RC of 4.13. > But now we have a solution so we need to get back that was reverted. > > This patch restore dt-bindings

[Patch net 03/15] net_sched: remove RCU callbacks in flower filter

2017-10-23 Thread Cong Wang
Replace call_rcu() with synchronize_rcu(), except in fl_destroy() we have to use list_splice_init_rcu(). As a bonus, this also drops the ugly code in commit d936377414fa ("net, sched: respect rcu grace period on cls destruction"). Reported-by: Chris Mi Cc: Daniel Borkmann

Re: [PATCH net] tcp/dccp: fix again lockdep splat in inet_csk_route_req()

2017-10-23 Thread Eric Dumazet
On Mon, 2017-10-23 at 08:02 -0700, Eric Dumazet wrote: > From: Eric Dumazet > > In my first attempt to fix the lockdep splat, I forgot we could > enter inet_csk_route_req() with a freshly allocated request socket, > for which refcount has not yet been elevated, due to

[PATCH] rtlwifi: rtl8821ae: Fix typo in variable name

2017-10-23 Thread Nik Nyby
In _rtl8821ae_dbi_write(), wrtie_addr should be write_addr. Signed-off-by: Nik Nyby --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c

[PATCH] rtlwifi: Remove seq_number from rtl_tid_data

2017-10-23 Thread pkshih
From: Ping-Ke Shih Since mac80211 maintains the sequence number for each STA/TID, driver doesn't need to maintain a copy. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/base.c | 6 ++ drivers/net/wireless/realtek/rtlwifi/pci.c

Re: [PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-10-23 Thread Al Viro
On Tue, Oct 24, 2017 at 04:41:08AM +0300, Tuomas Tynkkynen wrote: > > I can pick those, or, if you (or somebody else) are willing to > > actively > > maintain a 9p tree, you could start sending straight to Linus - up to > > you. > > You can pick these up, I don't have plans for more patches

Re: [PATCH] net: xfrm_user: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Herbert Xu
On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote: > Use BUG_ON instead of if condition followed by BUG. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva I think this patch is terrible. Why on earth is

[PATCH V3 net-next] liquidio: pass date and time info to NIC firmware

2017-10-23 Thread Felix Manlunas
From: Veerasenareddy Burru Pass date and time information to NIC at the time of loading firmware and periodically update the host time to NIC firmware. This is to make NIC firmware use the same time reference as Host, so that it is easy to correlate logs from

[PATCHv2 net-next 3/3] bonding: remove rtmsg_ifinfo called after bond_lower_state_changed

2017-10-23 Thread Xin Long
After the patch 'rtnetlink: bring NETDEV_CHANGELOWERSTATE event process back to rtnetlink_event', bond_lower_state_changed would generate NETDEV_CHANGEUPPER event which would send a notification to userspace in rtnetlink_event. There's no need to call rtmsg_ifinfo to send the notification any

Re: [PATCH] drivers/net/usb: add device id for TP-LINK UE300 USB 3.0 Ethernet

2017-10-23 Thread Oliver Neukum
Am Montag, den 23.10.2017, 18:10 +0800 schrieb Ran Wang: > This product is named 'TP-LINK USB 3.0 Gigabit Ethernet Network > Adapter (Model No.is UE300)'. It uses chip RTL8153 and works with > driver drivers/net/usb/r8152.c > Hi, just for the record, have you confirm that it fails with

RE: Get rid of RCU callbacks in TC filters?

2017-10-23 Thread David Laight
From: Cong Wang > Sent: 20 October 2017 21:52 > To: Paul E. McKenney > Cc: Jamal Hadi Salim; Chris Mi; Linux Kernel Network Developers; Daniel > Borkmann; Eric Dumazet; David > Miller; Jiri Pirko > Subject: Re: Get rid of RCU callbacks in TC filters? > > On Fri, Oct 20, 2017 at 1:31 PM, Cong

Re: [PATCH] esp6: remove redundant initialization of esph

2017-10-23 Thread Steffen Klassert
On Thu, Oct 19, 2017 at 03:09:47PM +0200, Colin King wrote: > From: Colin Ian King > > The pointer esph is being initialized with a value that is never > read and then being updated. Remove the redundant initialization > and move the declaration and initializtion of

[PATCH net-next 6/7] net: hns3: remove redundant memset when alloc buffer

2017-10-23 Thread Lipeng
HW will use packet length to write packets to buffer or read packets from buffer. There is a redundant memset when alloc buffer, the memset have no sense and will increase time-consuming. This patch removes it. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC)

[PATCH net-next 7/7] net: hns3: fix a bug about hns3_clean_tx_ring

2017-10-23 Thread Lipeng
The return value of hns3_clean_tx_ring means tx ring clean result. Return true means clean complete and there is no more pakcet need clean. Retrun false means there is packets need clean and napi need poll again. The last return of hns3_clean_tx_ring is "return !!budget" as budget will decrease

[PATCH net-next 1/7] net: hns3: fix a bug when alloc new buffer

2017-10-23 Thread Lipeng
When alloce new buffer to HW, should unmap the old buffer first. This old code map the old buffer but not unmap the old buffer, this patch fixes it. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng ---

[PATCH] drivers/net/usb: add device id for TP-LINK UE300 USB 3.0 Ethernet

2017-10-23 Thread Ran Wang
This product is named 'TP-LINK USB 3.0 Gigabit Ethernet Network Adapter (Model No.is UE300)'. It uses chip RTL8153 and works with driver drivers/net/usb/r8152.c Signed-off-by: Ran Wang --- drivers/net/usb/cdc_ether.c | 8 drivers/net/usb/r8152.c | 2 ++ 2 files

[PATCHv2 net-next 0/3] bonding: void calling rtmsg_ifinfo for netlink notifications

2017-10-23 Thread Xin Long
It's better to send notifications to userspace by the events in rtnetlink_event, instead of calling rtmsg_ifinfo directly. This patcheset is to remove rtmsg_ifinfo called in bonding, the notifications can be handled by NETDEV_CHANGEUPPER and NETDEV_CHANGELOWERSTATE events in rtnetlink_event. It

[PATCHv2 net-next 1/3] bonding: remove rtmsg_ifinfo called in bond_master_upper_dev_link

2017-10-23 Thread Xin Long
Since commit 42e52bf9e3ae ("net: add netnotifier event for upper device change"), netdev_master_upper_dev_link has generated NETDEV_CHANGEUPPER event which would send a notification to userspace in rtnetlink_event. There's no need to call rtmsg_ifinfo to send the notification any more. So this

[PATCHv2 net-next 2/3] rtnetlink: bring NETDEV_CHANGELOWERSTATE event process back to rtnetlink_event

2017-10-23 Thread Xin Long
This patch is to bring NETDEV_CHANGELOWERSTATE event process back to rtnetlink_event so that bonding could use it instead of calling rtmsg_ifinfo to send a notification to userspace after netdev lower state is changed in the later patch. Signed-off-by: Xin Long ---

Re: [PATCH v2] ipsec: Fix aborted xfrm policy dump crash

2017-10-23 Thread Steffen Klassert
On Thu, Oct 19, 2017 at 08:51:10PM +0800, Herbert Xu wrote: > On Thu, Oct 19, 2017 at 02:33:20PM +0300, Timo Teras wrote: > > > > > Fixes: 4c563f7669c1 ("[XFRM]: Speed up xfrm_policy and xfrm_state...") > > > > This is not correct. The original commit works just fine. > > OK, I'll change it. >

[PATCH net-next 2/7] net: hns3: fix the bug when map buffer fail

2017-10-23 Thread Lipeng
If one buffer had been recieved to stack, driver will alloc a new buffer, map the buffer to device and replace the old buffer. When map fail, should only free the new alloced buffer, but not free all buffers in the ring. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08

[PATCH net-next 5/7] net: hns3: fix the TX/RX ring.queue_index in hns3_ring_get_cfg

2017-10-23 Thread Lipeng
The interface hns3_ring_get_cfg only update TX ring queue_index, but do not update RX ring queue_index. This patch fixes it. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng ---

[PATCH net-next 4/7] net: hns3: get vf count by pci_sriov_get_totalvfs

2017-10-23 Thread Lipeng
This patch gets vf count by standard function pci_sriov_get_totalvfs, instead of info from NIC HW. Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH net-next 3/7] net: hns3: fix the ops check in hns3_get_rxnfc

2017-10-23 Thread Lipeng
1# patch: 07d2995 net: hns3: add support for ETHTOOL_GRXFH. 2# patch: 5668abd net: hns3: add support for set_ringparam. 1# patch adds ae_algo->ops->get_rss_tuple to hns3_get_rxnfc and 2# patch delete ae_algo->ops->get_tc_size from hns3_get_rxnfc.This patch fix the ops check in hns3_get_rxnfc.

[PATCH net-next 0/7] net: hns3: bug fixes & code improvements

2017-10-23 Thread Lipeng
This patchset introduces various HNS3 bug fixes, optimizations and code improvements. Lipeng (7): net: hns3: fix a bug when alloc new buffer net: hns3: fix the bug when map buffer fail net: hns3: fix the ops check in hns3_get_rxnfc net: hns3: get vf count by pci_sriov_get_totalvfs net:

[RFC net-next] net: dsa: lan9303 Cpu port and ARL

2017-10-23 Thread Egil Hjelmeland
Our proprietary lan9303 driver used .set_addr to add the master interface MAC to the lan9303 ALR (Address Logic Resolution) table. Now that .set_addr is gone, I found out that the lan9303 does not learn the master MAC address. Which means that traffic to the local CPU is flooded to the other

  1   2   3   >