Re: [PATCH net] ipv6: remove null_entry before adding default route

2018-01-05 Thread Martin KaFai Lau
On Fri, Jan 05, 2018 at 05:38:35PM -0800, Wei Wang wrote: > From: Wei Wang > > In the current code, when creating a new fib6 table, tb6_root.leaf gets > initialized to net->ipv6.ip6_null_entry. > If a default route is being added with rt->rt6i_metric = 0x, > fib6_add() will add this route

Re: [wireless-testsing2:master 1/4] drivers/net/netdevsim/bpf.c:130:14: sparse: incompatible types for 'case' statement

2018-01-05 Thread Fengguang Wu
On Wed, Jan 03, 2018 at 05:02:37PM -0800, Jakub Kicinski wrote: On Thu, 4 Jan 2018 03:53:20 +0800, kbuild test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git master head: 6b3b30d0c31ddb2f4d8208c90bc2b4adef47204d commit: af2cae39f6ab9dc59661

Re: KASAN: use-after-free Read in sctp_packet_transmit

2018-01-05 Thread Xin Long
On Sat, Jan 6, 2018 at 6:07 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 8a4816cad00bf14642f0ed6043b32d29a05006ce > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is at

Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman wrote: > Dan Williams writes: > >> Quoting Mark's original RFC: >> >> "Recently, Google Project Zero discovered several classes of attack >> against speculative execution. One of these, known as variant-1, allows >> explicit bounds checks to be by

Re: [PATCH net-next 06/20] net: hns3: Modify the update period of packet statistics

2018-01-05 Thread lipeng (Y)
On 2018/1/5 22:54, Andrew Lunn wrote: --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1126,6 +1126,7 @@ static int hns3_nic_set_features(struct net_device *netdev, { struct hns3_nic_priv *priv = netdev_priv(netdev);

Re: [PATCH v2] openvswitch: Trim off padding before L3+ netfilter processing

2018-01-05 Thread Pravin Shelar
On Fri, Jan 5, 2018 at 3:20 PM, Ed Swierk wrote: > On Fri, Jan 5, 2018 at 10:14 AM, Ed Swierk > wrote: >> On Thu, Jan 4, 2018 at 7:36 PM, Pravin Shelar wrote: >>> OVS already pull all required headers in skb linear data, so no need >>> to redo all of it. only check required is the ip-checksum va

Re: [PATCH 06/18] x86, barrier: stop speculation for failed access_ok

2018-01-05 Thread Dan Williams
On Fri, Jan 5, 2018 at 6:52 PM, Linus Torvalds wrote: > On Fri, Jan 5, 2018 at 5:10 PM, Dan Williams wrote: >> From: Andi Kleen >> >> When access_ok fails we should always stop speculating. >> Add the required barriers to the x86 access_ok macro. > > Honestly, this seems completely bogus. > > Th

Re: [PATCH 01/18] asm-generic/barrier: add generic nospec helpers

2018-01-05 Thread Dan Williams
On Fri, Jan 5, 2018 at 6:55 PM, Linus Torvalds wrote: > On Fri, Jan 5, 2018 at 5:09 PM, Dan Williams wrote: >> +#ifndef nospec_ptr >> +#define nospec_ptr(ptr, lo, hi) >>\ > > Do we actually want this horrible interface? > > It just causes the compi

RE: [Intel-wired-lan] [PATCH 09/27] igb: Use timecounter_initialize interface

2018-01-05 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Sagar Arun Kamble > Sent: Thursday, December 14, 2017 11:38 PM > To: linux-ker...@vger.kernel.org > Cc: intel-wired-...@lists.osuosl.org; Richard Cochran > ; Kamble, Sagar A > ; netdev@vger.kernel.org > Subject: [Int

RE: [Intel-wired-lan] [PATCH 22/27] ixgbe: Use timecounter_reset interface

2018-01-05 Thread Brown, Aaron F
> -Original Message- > From: Brown, Aaron F > Sent: Friday, January 5, 2018 8:34 PM > To: 'Sagar Arun Kamble' ; linux- > ker...@vger.kernel.org > Cc: intel-wired-...@lists.osuosl.org; Richard Cochran > ; Kamble, Sagar A > ; netdev@vger.kernel.org > Subject: RE: [Intel-wired-lan] [PATCH 22

Re: [PATCH net v3 0/2] SCTP PMTU discovery fixes

2018-01-05 Thread Xin Long
On Fri, Jan 5, 2018 at 9:17 PM, Marcelo Ricardo Leitner wrote: > This patchset fixes 2 issues with PMTU discovery that can lead to flood > of retransmissions. > The first patch fixes the issue for when PMTUD is disabled by the > application, while the second fixes it for when its enabled. > > Plea

RE: [Intel-wired-lan] [PATCH 22/27] ixgbe: Use timecounter_reset interface

2018-01-05 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Sagar Arun Kamble > Sent: Thursday, December 14, 2017 11:39 PM > To: linux-ker...@vger.kernel.org > Cc: intel-wired-...@lists.osuosl.org; Richard Cochran > ; Kamble, Sagar A > ; netdev@vger.kernel.org > Subject: [Int

RE: [Intel-wired-lan] [PATCH 21/27] igb: Use timecounter_reset interface

2018-01-05 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Sagar Arun Kamble > Sent: Thursday, December 14, 2017 11:39 PM > To: linux-ker...@vger.kernel.org > Cc: intel-wired-...@lists.osuosl.org; Richard Cochran > ; Kamble, Sagar A > ; netdev@vger.kernel.org > Subject: [Int

RE: [Intel-wired-lan] [PATCH 08/27] e1000e: Use timecounter_initialize interface

2018-01-05 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Sagar Arun Kamble > Sent: Thursday, December 14, 2017 11:38 PM > To: linux-ker...@vger.kernel.org > Cc: intel-wired-...@lists.osuosl.org; Richard Cochran > ; Kamble, Sagar A > ; netdev@vger.kernel.org > Subject: [Int

RE: [Intel-wired-lan] [PATCH 20/27] e1000e: Use timecounter_reset interface

2018-01-05 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Sagar Arun Kamble > Sent: Thursday, December 14, 2017 11:39 PM > To: linux-ker...@vger.kernel.org > Cc: intel-wired-...@lists.osuosl.org; Richard Cochran > ; Kamble, Sagar A > ; netdev@vger.kernel.org > Subject: [Int

RE: [Intel-wired-lan] [PATCH 1/1] timecounter: Make cyclecounter struct part of timecounter struct

2018-01-05 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Jeff Kirsher > Sent: Wednesday, December 6, 2017 8:25 AM > To: Kamble, Sagar A ; linux- > ker...@vger.kernel.org > Cc: alsa-de...@alsa-project.org; linux-r...@vger.kernel.org; > netdev@vger.kernel.org; Richard Cochra

Re: [patch net-next v6 00/11] net: sched: allow qdiscs to share filter block instances

2018-01-05 Thread David Ahern
On 1/5/18 4:09 PM, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the filters added to qdiscs are independent. So for example if you > have 2 netdevices and you create ingress qdisc on both and you want to add > identical filter rules both, you need to add them twice. This patchset > makes th

[PATCH iproute2] Restore --no-print-directory option for silent builds

2018-01-05 Thread David Ahern
Commit 69fed534a533 ("change how Config is used in Makefile's") removed Config from Makefile. Config had the checks to set VERBOSE based on user request and VERBOSE is used to add the --no-print-directory argument. Since Config is gone, add the relevant setup for VERBOSE to Makefile to restore quie

Re: [PATCH 06/18] x86, barrier: stop speculation for failed access_ok

2018-01-05 Thread Linus Torvalds
On Fri, Jan 5, 2018 at 6:52 PM, Linus Torvalds wrote: > > The fact is, we have to stop speculating when access_ok() does *not* > fail - because that's when we'll actually do the access. And it's that > access that needs to be non-speculative. I also suspect we should probably do this entirely dif

Re: [PATCH 01/18] asm-generic/barrier: add generic nospec helpers

2018-01-05 Thread Linus Torvalds
On Fri, Jan 5, 2018 at 5:09 PM, Dan Williams wrote: > +#ifndef nospec_ptr > +#define nospec_ptr(ptr, lo, hi) > \ Do we actually want this horrible interface? It just causes the compiler - or inline asm - to generate worse code, because it needs to

Re: [PATCH 06/18] x86, barrier: stop speculation for failed access_ok

2018-01-05 Thread Linus Torvalds
On Fri, Jan 5, 2018 at 5:10 PM, Dan Williams wrote: > From: Andi Kleen > > When access_ok fails we should always stop speculating. > Add the required barriers to the x86 access_ok macro. Honestly, this seems completely bogus. The description is pure garbage afaik. The fact is, we have to stop

Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution

2018-01-05 Thread Eric W. Biederman
Dan Williams writes: > Quoting Mark's original RFC: > > "Recently, Google Project Zero discovered several classes of attack > against speculative execution. One of these, known as variant-1, allows > explicit bounds checks to be bypassed under speculation, providing an > arbitrary read gadget. Fu

Re: [PATCH 12/18] Thermal/int340x: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
On Fri, Jan 5, 2018 at 5:53 PM, Srinivas Pandruvada wrote: > On Fri, 2018-01-05 at 17:10 -0800, Dan Williams wrote: >> Static analysis reports that 'trip' may be a user controlled value >> that >> is used as a data dependency to read '*temp' from the 'd->aux_trips' >> array. In order to avoid pot

Re: [PATCH 12/18] Thermal/int340x: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Srinivas Pandruvada
On Fri, 2018-01-05 at 17:10 -0800, Dan Williams wrote: > Static analysis reports that 'trip' may be a user controlled value > that > is used as a data dependency to read '*temp' from the 'd->aux_trips' > array.  In order to avoid potential leaks of kernel memory values, > block > speculative execut

Re: [PATCH bpf-next v4 07/11] bpf: Add support for reading sk_state and more

2018-01-05 Thread Daniel Borkmann
On 01/05/2018 12:55 AM, Lawrence Brakmo wrote: > Add support for reading many more tcp_sock fields > > state, same as sk->sk_state > rtt_min same as sk->rtt_min.s[0].v (current rtt_min) > snd_ssthresh > rcv_nxt > snd_nxt > snd_una > mss_cache > ecn_flags > rate_delivered

[PATCH net] ipv6: remove null_entry before adding default route

2018-01-05 Thread Wei Wang
From: Wei Wang In the current code, when creating a new fib6 table, tb6_root.leaf gets initialized to net->ipv6.ip6_null_entry. If a default route is being added with rt->rt6i_metric = 0x, fib6_add() will add this route after net->ipv6.ip6_null_entry. As null_entry is shared, it could cau

[PATCH 00/18] prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Quoting Mark's original RFC: "Recently, Google Project Zero discovered several classes of attack against speculative execution. One of these, known as variant-1, allows explicit bounds checks to be bypassed under speculation, providing an arbitrary read gadget. Further details can be found on the

[PATCH 01/18] asm-generic/barrier: add generic nospec helpers

2018-01-05 Thread Dan Williams
From: Mark Rutland Under speculation, CPUs may mis-predict branches in bounds checks. Thus, memory accesses under a bounds check may be speculated even if the bounds check fails, providing a primitive for building a side channel. This patch adds helpers which can be used to inhibit the use of ou

[PATCH 02/18] Documentation: document nospec helpers

2018-01-05 Thread Dan Williams
From: Mark Rutland Document the rationale and usage of the new nospec*() helpers. Signed-off-by: Mark Rutland Signed-off-by: Will Deacon Cc: Dan Williams Cc: Jonathan Corbet Cc: Peter Zijlstra Signed-off-by: Dan Williams --- Documentation/speculation.txt | 166 +++

[PATCH 04/18] arm: implement nospec_ptr()

2018-01-05 Thread Dan Williams
From: Mark Rutland This patch implements nospec_ptr() for arm, following the recommended architectural sequences for the arm and thumb instruction sets. Signed-off-by: Mark Rutland Signed-off-by: Dan Williams --- arch/arm/include/asm/barrier.h | 75

[PATCH 03/18] arm64: implement nospec_ptr()

2018-01-05 Thread Dan Williams
From: Mark Rutland This patch implements nospec_ptr() for arm64, following the recommended architectural sequence. Signed-off-by: Mark Rutland Signed-off-by: Will Deacon Cc: Dan Williams Cc: Peter Zijlstra Signed-off-by: Dan Williams --- arch/arm64/include/asm/barrier.h | 55

[PATCH 05/18] x86: implement nospec_barrier()

2018-01-05 Thread Dan Williams
The new speculative execution barrier, nospec_barrier(), ensures that any userspace controllable speculation doesn't cross the boundary. Any user observable speculative activity on this CPU thread before this point either completes, reaches a state it can no longer cause an observable activity, or

[PATCH 07/18] [media] uvcvideo: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'index' may be a user controlled value that is used as a data dependency to read 'pin' from the 'selector->baSourceID' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based on

[PATCH 06/18] x86, barrier: stop speculation for failed access_ok

2018-01-05 Thread Dan Williams
From: Andi Kleen When access_ok fails we should always stop speculating. Add the required barriers to the x86 access_ok macro. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Arnd Bergmann Cc: x...@kernel.org Signed-off-by: Andi Kleen Signed-off-by: Dan Williams --- arch/x86/

[PATCH 08/18] carl9170: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'queue' may be a user controlled value that is used as a data dependency to read from the 'ar9170_qmap' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based on an invalid res

[PATCH 09/18] p54: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'queue' may be a user controlled value that is used as a data dependency to read from the 'priv->qos_params' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based on an invali

[PATCH 11/18] cw1200: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'queue' may be a user controlled value that is used as a data dependency to read 'txq_params' from the 'priv->tx_queue_params.params' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issu

[PATCH 10/18] qla2xxx: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'handle' may be a user controlled value that is used as a data dependency to read 'sp' from the 'req->outstanding_cmds' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based

[PATCH 13/18] ipv6: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'offset' may be a user controlled value that is used as a data dependency reading from a raw6_frag_vec buffer. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue further reads based on an inv

[PATCH 15/18] vfs, fdtable: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Expectedly, static analysis reports that 'fd' is a user controlled value that is used as a data dependency to read from the 'fdt->fd' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based on an invalid '

[PATCH 16/18] net: mpls: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'index' may be a user controlled value that is used as a data dependency reading 'rt' from the 'platform_label' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue further reads based

[PATCH 17/18] udf: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'eahd->appAttrLocation' and 'eahd->impAttrLocation' may be a user controlled values that are used as data dependencies for calculating source and destination buffers for memmove operations. In order to avoid potential leaks of kernel memory values, block speculative exe

[PATCH 18/18] userns: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'pos' may be a user controlled value that is used as a data dependency determining which extent to return out of 'map'. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue further reads based

[PATCH 12/18] Thermal/int340x: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'trip' may be a user controlled value that is used as a data dependency to read '*temp' from the 'd->aux_trips' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based on an in

[PATCH 14/18] ipv4: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'offset' may be a user controlled value that is used as a data dependency reading from a raw_frag_vec buffer. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue further reads based on an inva

Re: [PATCH net-next v3 00/10] net: qualcomm: rmnet: Enable csum offloads

2018-01-05 Thread Subash Abhinov Kasiviswanathan
On 2018-01-05 13:41, Subash Abhinov Kasiviswanathan wrote: This series introduces the MAPv4 packet format for checksum offload plus some other minor changes. Patches 1-3 are cleanups. Patch 4 renames the ingress format to data format so that all data formats can be configured using this going f

Re: [bpf-next V4 PATCH 13/14] bpf: finally expose xdp_rxq_info to XDP bpf-programs

2018-01-05 Thread Daniel Borkmann
On 01/03/2018 11:26 AM, Jesper Dangaard Brouer wrote: > Now all XDP driver have been updated to setup xdp_rxq_info and assign > this to xdp_buff->rxq. Thus, it is now safe to enable access to some > of the xdp_rxq_info struct members. > > This patch extend xdp_md and expose UAPI to userspace for

Re: [PATCH iproute2 v2 2/3] link_iptnl: Print tunnel mode

2018-01-05 Thread Stephen Hemminger
On Tue, 2 Jan 2018 23:27:58 +0200 Serhey Popovych wrote: > Tunnel mode does not appear in parameters print for iptnl > supported tunnels like ipip and sit, while printed for > ip6tnl. > > Print tunnel mode as "proto" field name for JSON and > without any name when printing to cli to follow ip6t

Re: [PATCH iproute2] devlink, rdma, tipc: properly define TARGETS without HAVE_MNL

2018-01-05 Thread Stephen Hemminger
On Wed, 3 Jan 2018 16:28:52 +0100 Matthias Schiffer wrote: > Leaving a variable with a generic name such as TARGETS undefined would lead > to Make picking up its value from the environment. Avoid this by always > defining TARGETS in the Makefiles. > > Signed-off-by: Matthias Schiffer > --- >

[PATCH ipsec] xfrm: don't call xfrm_policy_cache_flush while holding spinlock

2018-01-05 Thread Florian Westphal
xfrm_policy_cache_flush can sleep, so it cannot be called while holding a spinlock. We could release the lock first, but I don't see why we need to invoke this function here in first place, the packet path won't reuse an xdst entry unless its still valid. While at it, add an annotation to xfrm_po

Re: [bpf-next V4 PATCH 00/14] xdp: new XDP rx-queue info concept

2018-01-05 Thread Alexei Starovoitov
On Wed, Jan 03, 2018 at 11:25:08AM +0100, Jesper Dangaard Brouer wrote: > V4: > * Added reviewers/acks to patches > * Fix patch desc in i40e that got out-of-sync with code > * Add SPDX license headers for the two new files added in patch 14 > > V3: > * Fixed bug in virtio_net driver > * Removed ex

Re: [PATCH v4 1/2] ARM64: dts: meson-axg: add ethernet mac controller

2018-01-05 Thread Kevin Hilman
Yixun Lan writes: > Add DT info for the stmmac ethernet MAC which found in > the Amlogic's Meson-AXG SoC, also describe the ethernet > pinctrl & clock information here. > > Reviewed-by: Neil Armstrong > Signed-off-by: Yixun Lan Applied to v4.16/dt64, Kevin

Re: [PATCH net-next v2 09/10] bnxt_en: add support for software dynamic interrupt moderation

2018-01-05 Thread Michael Chan
On Fri, Jan 5, 2018 at 2:58 PM, Andy Gospodarek wrote: > @@ -5705,7 +5748,13 @@ static void bnxt_enable_napi(struct bnxt *bp) > int i; > > for (i = 0; i < bp->cp_nr_rings; i++) { > + struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; > bp->bnapi[

[iproute2 net-next 1/2] tc: implement filter block sharing to ingress and clsact qdiscs

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/pkt_sched.h | 11 + tc/q_clsact.c | 56 ++ tc/q_ingress.c | 32 +--- 3 files changed, 91 insertions(+), 8 deletions(-) diff --g

[iproute2 net-next 2/2] tc: introduce support for block-handle for filter operations

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tc/tc_filter.c | 100 +++-- 1 file changed, 83 insertions(+), 17 deletions(-) diff --git a/tc/tc_filter.c b/tc/tc_filter.c index 545cc3a..4127090 100644 --- a/tc/tc_filter.c +++ b/tc/tc_filter.c

[patch net-next v6 09/11] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Instead, pass netdev and ingress flag to ruleset unbind op. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 9 -- .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c| 33 +++

[patch net-next v6 06/11] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko As the tcm_ifindex 0 is invalid ifindex, reuse it to indicate that we work with block, instead of qdisc. So if tcm_ifindex is 0, tcm_parent is used to carry block_index. If the block is set to be shared between at least 2 qdiscs, it is forbidden to use the qdisc handle to add/de

[patch net-next v6 11/11] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko No need to convert from mlxsw_sp_port to net_device and back again. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 4 ++-- .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c| 2

[patch net-next v6 10/11] mlxsw: spectrum_acl: Implement TC block sharing

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Benefit from the prepared TC and in-driver ACL infrastructure and introduce block sharing offload. For that, a new struct "block" is introduced in spectrum_acl in order to hold a list of specific block-port bindings. Signed-off-by: Jiri Pirko --- v2->v3: - add tc offload featur

[patch net-next v6 02/11] net: sched: avoid usage of tp->q in tcf_classify

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Use block index in the messages instead. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 2dd584a..f50d203 100644 --- a/net/sched/cls_api.c +++ b/net/sched

[patch net-next v6 03/11] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Couple of classifiers call netif_keep_dst directly on q->dev. That is not possible to do directly for shared blocke where multiple qdiscs are owning the block. So introduce a infrastructure to keep track of the block owners in list and use this list to implement block variant of

[patch net-next v6 04/11] net: sched: remove classid and q fields from tcf_proto

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Both are no longer used, so remove them. Signed-off-by: Jiri Pirko --- include/net/sch_generic.h | 2 -- net/sched/cls_api.c | 7 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index df97c3e..d

[patch net-next v6 07/11] net: sched: allow ingress and clsact qdiscs to share filter blocks

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Benefit from the previously introduced shared filter blocks infrastructure and allow ingress and clsact qdisc instances to share filter blocks. The block index is coming from userspace as qdisc option. Signed-off-by: Jiri Pirko --- v3->v4: - rebased on top of the current net-ne

[patch net-next v6 01/11] net: sched: introduce support for multiple filter chain pointers registration

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko So far, there was possible only to register a single filter chain pointer to block->chain[0]. However, when the blocks will get shareable, we need to allow multiple filter chain pointers registration. Signed-off-by: Jiri Pirko --- v3->v4: - rebased on top of the current net-nex

[patch net-next v6 05/11] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko During block bind, we need to check tc offload feature. If it is disabled yet still the block contains offloaded filters, forbid the bind. Also forbid to register callback for a block that already contains offloaded filters, as the play back is not supported now. For keeping trac

[patch net-next v6 00/11] net: sched: allow qdiscs to share filter block instances

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko Currently the filters added to qdiscs are independent. So for example if you have 2 netdevices and you create ingress qdisc on both and you want to add identical filter rules both, you need to add them twice. This patchset makes this easier and mainly saves resources allowing to

[patch net-next v6 08/11] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy

2018-01-05 Thread Jiri Pirko
From: Jiri Pirko In order to prepare for follow-up changes, make the bind/unbind helpers very simple. That required move of ht insertion/removal and bind/unbind calls into mlxsw_sp_acl_ruleset_create/destroy. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 10

[PATCH bpf] selftests/bpf: fix test_align

2018-01-05 Thread Alexei Starovoitov
since commit 82abbf8d2fc4 the verifier rejects the bit-wise arithmetic on pointers earlier. The test 'dubious pointer arithmetic' now has less output to match on. Adjust it. Fixes: 82abbf8d2fc4 ("bpf: do not allow root to mangle valid pointers") Reported-by: kernel test robot Signed-off-by: Alexe

[PATCH net-next v2 02/10] net/mlx5e: Move interrupt moderation forward declarations

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek Move these to newly created file to prepare to move these functions to a library. Signed-off-by: Andy Gospodarek Acked-by: Tal Gilboa Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 drivers/net/ethernet/mellanox/mlx5/core/en_dim.

[PATCH net-next v2 07/10] net/mlx5e: Move dynamic interrupt coalescing code to include/linux

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek This move allows drivers to add private structure elements to track the number of packets, bytes, and interrupts events per ring. A driver also defines a workqueue handler to act on this collected data once per poll and modify the coalescing parameters per ring. Signed-off

[PATCH net-next v2 06/10] net/mlx5e: Change Mellanox references in DIM code

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek Change all appropriate mlx5_am* and MLX5_AM* references to net_dim and NET_DIM, respectively, in code that handles dynamic interrupt moderation. Also change all references from 'am' to 'dim' when used as local variables. Signed-off-by: Andy Gospodarek Acked-by: Tal Gilboa

[PATCH net-next v2 08/10] net/dim: use struct net_dim_sample as arg to net_dim

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek Simplify the arguments net_dim() by formatting them into a struct net_dim_sample before calling the function. Signed-off-by: Andy Gospodarek Suggested-by: Tal Gilboa Acked-by: Tal Gilboa Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 1

[PATCH net-next v2 09/10] bnxt_en: add support for software dynamic interrupt moderation

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek This implements the changes needed for the bnxt_en driver to add support for dynamic interrupt moderation per ring. This does add additional counters in the receive path, but testing shows that any additional instructions are offset by throughput gain when the default confi

[PATCH net-next v2 00/10] net: create dynamic software irq moderation library

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek This converts the dynamic interrupt moderation library from the mlx5e driver into a library so it can be used by any driver. The penultimate patch in this set adds support for thiw new dynamic interrupt moderation library in the bnxt_en driver and the last patch creates an

[PATCH net-next v2 01/10] net/mlx5e: Move interrupt moderation structs to new file

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek Create new header file to prepare to move code that handles irq moderation to a library that lives in a header file. Signed-off-by: Andy Gospodarek Acked-by: Tal Gilboa Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 33 +-- driv

[PATCH net-next v2 10/10] MAINTAINERS: add entry for Dynamic Interrupt Moderation

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek Signed-off-by: Andy Gospodarek Signed-off-by: Tal Gilboa Acked-by: Saeed Mahameed --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 753799d..178239dc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4944,6 +4944,11 @@

[PATCH net-next v2 05/10] net/mlx5e: Move generic functions to new file

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek These functions were identified as ones that could be made generic and used by multiple drivers. Most of the contents of en_rx_am.c are moved to net_dim.c. Signed-off-by: Andy Gospodarek Acked-by: Tal Gilboa Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/m

[PATCH net-next v2 04/10] net/mlx5e: Move AM logic enums

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek More movement to help make this code more generic. Signed-off-by: Andy Gospodarek Acked-by: Tal Gilboa Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_dim.h | 26 ++ drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 25 -

[PATCH net-next v2 03/10] net/mlx5e: Remove rq references in mlx5e_rx_am

2018-01-05 Thread Andy Gospodarek
From: Andy Gospodarek This makes mlx5e_am_sample more generic so that it can be called easily from a driver that does not use the same data structure to store these values in a single structure. Signed-off-by: Andy Gospodarek Acked-by: Tal Gilboa Acked-by: Saeed Mahameed --- drivers/net/eth

Re: [PATCH 6/6] add test for aio poll and io_pgetevents

2018-01-05 Thread Jeff Moyer
Christoph Hellwig writes: > + p = fork(); > + switch (p) { [snip] > + default: > + close(pipe1[0]); > + close(pipe2[1]); > + > + io_prep_poll(&iocb, pipe2[0], POLLIN); > + > + ret = io_setup(1, &ctx); > + if (ret) { > +

Re: libaio: resurrect aio poll and add io_pgetevents support

2018-01-05 Thread Jeff Moyer
Christoph Hellwig writes: > Hi all, > > this series resurrects IOCB_CMD_POLL support and adds support for the > new io_pgetevents system call, as well as adding a test case. This looks good to me. There may be a couple of changes to the syscall bits, but I can take care of that. I'll review th

Re: [PATCH 2/6] move _body_io_syscall to the generic syscall.h

2018-01-05 Thread Jeff Moyer
Hi, Ben, Thanks for the quick reply. Benjamin LaHaise writes: > On Fri, Jan 05, 2018 at 11:25:17AM -0500, Jeff Moyer wrote: >> Christoph Hellwig writes: >> >> > This way it can be used for the fallback 6-argument version on >> > all architectures. >> > >> > Signed-off-by: Christoph Hellwig >

[PATCH v4 2/3] qemu: virtio-net: use 64-bit values for feature flags

2018-01-05 Thread Jason Baron
In prepartion for using some of the high order feature bits, make sure that virtio-net uses 64-bit values everywhere. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-...@lists.oasis-open.org --- hw/net/virtio-net.c| 55 +

[PATCH net-next v4 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor

2018-01-05 Thread Jason Baron
The ability to set speed and duplex for virtio_net is useful in various scenarios as described here: 16032be virtio_net: add ethtool support for set and get of settings However, it would be nice to be able to set this from the hypervisor, such that virtio_net doesn't require custom guest ethtool

[PATCH v4 3/3] qemu: add linkspeed and duplex settings to virtio-net

2018-01-05 Thread Jason Baron
Although linkspeed and duplex can be set in a linux guest via 'ethtool -s', this requires custom ethtool commands for virtio-net by default. Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows the hypervisor to export a linkspeed and duplex setting. The user can subsequently over

[PATCH v4 0/3] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

2018-01-05 Thread Jason Baron
We have found it useful to be able to set the linkspeed and duplex settings from the host-side for virtio_net. This obviates the need for guest changes and settings for these fields, and does not require custom ethtool commands for virtio_net. The ability to set linkspeed and duplex is useful in v

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-05 Thread Tobias Hommel
On Fri, Jan 05, 2018 at 09:51:16PM +, Holger Hoffstätte wrote: > On Fri, 05 Jan 2018 22:13:23 +0100, Tobias Hommel wrote: > > > Hi, > > > > I'm running into a NULL pointer dereference after updating from Linux 4.1.6 > > to > > 4.14.11 (see kernel log below). I tried 4.14.3 initially which di

[PATCH net-next 1/2] net: erspan: use bitfield instead of mask and offset

2018-01-05 Thread William Tu
Originally the erspan fields are defined as a group into a __be16 field, and use mask and offset to access each field. This is more costly due to calling ntohs/htons. The patch changes it to use bitfields. Signed-off-by: William Tu --- include/net/erspan.h | 127 +++

[PATCH net-next 2/2] openvswitch: add erspan version II support

2018-01-05 Thread William Tu
The patch adds support for configuring the erspan version II fields for openvswitch. Signed-off-by: William Tu --- include/uapi/linux/openvswitch.h | 12 +++- net/openvswitch/flow_netlink.c | 125 +++ 2 files changed, 126 insertions(+), 11 deletions(-) dif

[PATCH net-next 0/2] net: erspan: add support for openvswitch

2018-01-05 Thread William Tu
The first patch refactors the originally erspan header definitions. Originally, the erspan fields are defined as a group into a __be16 field, and use mask and offset to access each field. This is more costly due to calling ntohs/htons and confusing. The first patch changes it to use bitfields.

Re: INFO: rcu detected stall in do_softirq

2018-01-05 Thread Dmitry Vyukov
On Fri, Jan 5, 2018 at 11:10 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 8a4816cad00bf14642f0ed6043b32d29a05006ce > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is a

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-05 Thread Holger Hoffstätte
On Fri, 05 Jan 2018 22:13:23 +0100, Tobias Hommel wrote: > Hi, > > I'm running into a NULL pointer dereference after updating from Linux 4.1.6 to > 4.14.11 (see kernel log below). I tried 4.14.3 initially which did not work > either. > Anyone has an idea what is happening here? Try 4.14.12 becau

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-05 Thread Tobias Hommel
On Sat, Jan 06, 2018 at 12:27:11AM +0300, Ozgur wrote: > > > 06.01.2018, 00:20, "Tobias Hommel" : > > Hi, > > Hi Tobias, > > > I'm running into a NULL pointer dereference after updating from Linux 4.1.6 > > to > > 4.14.11 (see kernel log below). I tried 4.14.3 initially which did not work > >

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-05 Thread Ozgur
06.01.2018, 00:20, "Tobias Hommel" : > Hi, Hi Tobias, > I'm running into a NULL pointer dereference after updating from Linux 4.1.6 to > 4.14.11 (see kernel log below). I tried 4.14.3 initially which did not work > either. > Anyone has an idea what is happening here? > > The affected machine ha

BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-05 Thread Tobias Hommel
Hi, I'm running into a NULL pointer dereference after updating from Linux 4.1.6 to 4.14.11 (see kernel log below). I tried 4.14.3 initially which did not work either. Anyone has an idea what is happening here? The affected machine has 2 active ethernet interfaces (igb driver) and acts as a VPN ga

[PATCH bpf-next] bpf: fix verifier GPF in kmalloc failure path

2018-01-05 Thread Alexei Starovoitov
syzbot reported the following panic in the verifier triggered by kmalloc error injection: kasan: GPF could be caused by NULL-ptr deref or user memory access RIP: 0010:copy_func_state kernel/bpf/verifier.c:403 [inline] RIP: 0010:copy_verifier_state+0x364/0x590 kernel/bpf/verifier.c:431 Call Trace:

Re: [net-next 06/10] net/mlx5e: change Mellanox references in DIM code

2018-01-05 Thread Andy Gospodarek
On Fri, Jan 05, 2018 at 10:04:50AM +0200, Tal Gilboa wrote: > On 1/4/2018 10:21 PM, Andy Gospodarek wrote: > > From: Andy Gospodarek > > > > Change all mlx5_am* and MLX_AM* references to net_dim and NET_DIM, > MLX_AM->MLX5_AM > > > cq_period_mode = enable ? > > - MLX5_CQ_PERIOD_MOD

[PATCH net-next v3 02/10] net: qualcomm: rmnet: Remove invalid condition while stamping mux id

2018-01-05 Thread Subash Abhinov Kasiviswanathan
rmnet devices cannot have a mux id of 255. This is validated when assigning the mux id to the rmnet devices. As a result, checking for mux id 255 does not apply in egress path. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 5 + 1 fil

[PATCH net-next v3 08/10] net: qualcomm: rmnet: Handle command packets with checksum trailer

2018-01-05 Thread Subash Abhinov Kasiviswanathan
When using the MAPv4 packet format in conjunction with MAP commands, a dummy DL checksum trailer will be appended to the packet. Before this packet is sent out as an ACK, the DL checksum trailer needs to be removed. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/

[PATCH net-next v3 07/10] net: qualcomm: rmnet: Add support for RX checksum offload

2018-01-05 Thread Subash Abhinov Kasiviswanathan
When using the MAPv4 packet format, receive checksum offload can be enabled in hardware. The checksum computation over pseudo header is not offloaded but the rest of the checksum computation over the payload is offloaded. This applies only for TCP / UDP packets which are not fragmented. rmnet vali

  1   2   3   >