[net-next 06/10] ixgbe: avoid bringing rings up/down as macvlans are added/removed

2018-01-12 Thread Jeff Kirsher
From: Alexander Duyck This change makes it so that instead of bringing rings up/down for various we just update the netdev pointer for the Rx ring and set or clear the MAC filter for the interface. By doing it this way we can avoid a number of races and issues in the code as things were getting m

[net-next 07/10] ixgbe: Fix handling of macvlan Tx offload

2018-01-12 Thread Jeff Kirsher
From: Alexander Duyck This update makes it so that we report the actual number of Tx queues via real_num_tx_queues but are still restricted to RSS on only the first pool by setting num_tc equal to 1. Doing this locks us into only having the ability to setup XPS on the queues in that pool, and onl

[net-next 03/10] ixgbe: Don't assume dev->num_tc is equal to hardware TC config

2018-01-12 Thread Jeff Kirsher
From: Alexander Duyck The code throughout ixgbe was assuming that dev->num_tc was populated and configured with the driver, when in fact this can be configured via mqprio without any hardware coordination other than restricting us to the real number of Tx queues we advertise. Instead of handling

[net-next 10/10] ixgbevf: Fix kernel-doc format warnings

2018-01-12 Thread Jeff Kirsher
From: Tony Nguyen Recent checks added for formatting kernel-doc comments are causing warnings if W= is run with a non-zero value. This patch fixes function comments to resolve warnings when W=1 is used. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- driv

[net-next 05/10] ixgbe: Do not manipulate macvlan Tx queues when performing macvlan offload

2018-01-12 Thread Jeff Kirsher
From: Alexander Duyck We should not be stopping/starting the upper devices Tx queues when handling a macvlan offload. Instead we should be stopping and starting traffic on our own queues. In order to prevent us from doing this I am updating the code so that we no longer change the queue configur

[net-next 01/10] ixgbe: Assume provided MAC filter has been verified by macvlan

2018-01-12 Thread Jeff Kirsher
From: Alexander Duyck The macvlan driver itself will validate the MAC address that is configured for a given interface. There is no need for us to verify it again. Instead we should be checking to verify that we actually allocate the filter and have not run out of resources to configure a MAC ru

[net-next 04/10] ixgbe/fm10k: Record macvlan stats instead of Rx queue for macvlan offloaded rings

2018-01-12 Thread Jeff Kirsher
From: Alexander Duyck We shouldn't be recording the Rx queue on macvlan offloaded frames since the macvlan is normally brought up as a single queue device, and it will trigger warnings for RPS if we have recorded queue IDs larger than the "real_num_rx_queues" value recorded for the device. Inste

[net-next 08/10] net: Cap number of queues even with accel_priv

2018-01-12 Thread Jeff Kirsher
From: Alexander Duyck With the recent fix to ixgbe we can cap the number of queues always regardless of if accel_priv is being used or not since the actual number of queues are being reported via real_num_tx_queues. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Ki

[net-next 09/10] ixgbe: Fix kernel-doc format warnings

2018-01-12 Thread Jeff Kirsher
From: Tony Nguyen Recent checks added for formatting kernel-doc comments are causing warnings if W= is run with a non-zero value. This patch fixes function comments to resolve warnings when W=1 is used. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- driv

[PATCH] ath10k: remove redundant -ve check against u32 integer size

2018-01-12 Thread Colin King
From: Colin Ian King Variable section_table.size is a u32 and so cannot be less than zero, hence the less than zero check is redundant and can be removed. Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0") Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/pc

Re: [PATCH net-next 00/22] Aquantia atlantic driver major update 2018/01

2018-01-12 Thread David Miller
From: Igor Russkikh Date: Fri, 12 Jan 2018 20:02:34 +0300 > Unfortunately these two patches (#11 and #12 from current set) are > quite big. Could you please comment if you think it still makes > sense to apply them despite their size and impact? Yes I do think it still makes sense.

Re: [PATCH net-next 00/22] Aquantia atlantic driver major update 2018/01

2018-01-12 Thread Igor Russkikh
Hi David, > Sorry, this is way too many patches to submit at one time. > When a patch series gets beyond 10 or so patches it creates > an unreasonable burdon for those who will be reviewing your > work. Understood your concern. I'll do splitting this into two series. I've promised you to submit p

[PATCH][next] ixgbe: fix comparison of offset with zero or NVM_INVALID_PTR

2018-01-12 Thread Colin King
From: Colin Ian King The incorrect operator && is being used and will always return false as offset can never be two different values at the same time. Fix this by using the || operator instead. Detected by CoverityScan, CID#1463806 ("Logically dead code") Fixes: 73834aec7199 ("ixgbe: extend fi

Hope to hear from you soon.

2018-01-12 Thread offic...@ono.com
Hello Dear, Please forgive me for stressing you with my predicaments as I know that this letter may come to you as big surprise. Actually, I came across your E-mail from my personal search afterward I decided to email you directly believing that you will be honest to fulfill my final wish befo

[PATCH 4.4-stable 7/7] bpf, array: fix overflow in max_entries and undefined behavior in index_mask

2018-01-12 Thread Jiri Slaby
From: Daniel Borkmann commit bbeb6e4323dad9b5e0ee9f60c223dd532e2403b1 upstream. syzkaller tried to alloc a map with 0xfffd entries out of a userns, and thus unprivileged. With the recently added logic in b2157399cc98 ("bpf: prevent out-of-bounds speculation") we round this up to the next pow

Re: [PATCH 4.4-stable 6/6] bpf: prevent out-of-bounds speculation

2018-01-12 Thread Eric Dumazet
On Fri, 2018-01-12 at 17:17 +0100, Jiri Slaby wrote: > From: Alexei Starovoitov > > commit b2157399cc9898260d6031c5bfe45fe137c1fbe7 upstream. > > Under speculation, CPUs may mis-predict branches in bounds checks. Thus, > memory accesses under a bounds check may be speculated even if the > bounds

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-12 Thread Eric Dumazet
On Fri, 2018-01-12 at 09:32 -0700, Jason Gunthorpe wrote: > On Fri, Jan 12, 2018 at 11:42:22AM +0800, Jianchao Wang wrote: > > Customer reported memory corruption issue on previous mlx4_en driver > > version where the order-3 pages and multiple page reference counting > > were still used. > > > >

Re: DPAA Ethernet problems with mainstream Linux kernels

2018-01-12 Thread Jamie Krueger
On 01/12/2018 08:22 AM, Madalin-cristian Bucur wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+madalin.bucur=nxp@lists.ozlabs.org] On Behalf Of Jamie Krueger Sent: Wednesday, January 10, 2018 5:57 PM To: linuxppc-...@lists.ozlabs.org Subject: DPAA Ethernet p

Re: linux-next: build failure after merge of the net-next tree

2018-01-12 Thread Alexei Starovoitov
On Fri, Jan 12, 2018 at 05:21:54PM +0100, Daniel Borkmann wrote: > On 01/12/2018 04:56 PM, Alexei Starovoitov wrote: > > On Fri, Jan 12, 2018 at 11:45:42AM +0100, Daniel Borkmann wrote: > >> On 01/12/2018 05:21 AM, Alexei Starovoitov wrote: > >>> On Thu, Jan 11, 2018 at 10:11:45PM -0500, David Mill

Re: [PATCH 2/3] tcp: Add ESP encapsulation support

2018-01-12 Thread Eric Dumazet
On Fri, 2018-01-12 at 00:21 +1100, Herbert Xu wrote: > This patch adds the plumbing in TCP for ESP encapsulation support > per RFC8229. > > The patch mostly deals with inbound processing, as well as enabling > TCP encapsulation on a socket through setsockopt. The outbound > processing is dealt wi

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-12 Thread Jason Gunthorpe
On Fri, Jan 12, 2018 at 11:42:22AM +0800, Jianchao Wang wrote: > Customer reported memory corruption issue on previous mlx4_en driver > version where the order-3 pages and multiple page reference counting > were still used. > > Finally, find out one of the root causes is that the HW may see stale

Re: [PATCH 4.4-stable 0/6] bpf: prevent out-of-bounds speculation

2018-01-12 Thread Daniel Borkmann
Hi Jiri, On 01/12/2018 05:17 PM, Jiri Slaby wrote: > Hi, > > this is a backport of these patches which I did for our kernels: Thanks for doing! One comment below: > c237ee5eb33b bpf: add bpf_patch_insn_single helper > 3df126f35f88 bpf: don't (ab)use instructions to store state > e245c5c6a565 bp

Re: linux-next: build failure after merge of the net-next tree

2018-01-12 Thread Daniel Borkmann
On 01/12/2018 04:56 PM, Alexei Starovoitov wrote: > On Fri, Jan 12, 2018 at 11:45:42AM +0100, Daniel Borkmann wrote: >> On 01/12/2018 05:21 AM, Alexei Starovoitov wrote: >>> On Thu, Jan 11, 2018 at 10:11:45PM -0500, David Miller wrote: From: Alexei Starovoitov Date: Wed, 10 Jan 2018 17:5

[PATCH 4.4-stable 2/6] bpf: don't (ab)use instructions to store state

2018-01-12 Thread Jiri Slaby
From: Jakub Kicinski commit 3df126f35f88dc76eea33769f85a3c3bb8ce6c6b upstream. Storing state in reserved fields of instructions makes it impossible to run verifier on programs already marked as read-only. Allocate and use an array of per-instruction state instead. While touching the error path

[PATCH 4.4-stable 0/6] bpf: prevent out-of-bounds speculation

2018-01-12 Thread Jiri Slaby
Hi, this is a backport of these patches which I did for our kernels: c237ee5eb33b bpf: add bpf_patch_insn_single helper 3df126f35f88 bpf: don't (ab)use instructions to store state e245c5c6a565 bpf: move fixup_bpf_calls() function 79741b3bdec0 bpf: refactor fixup_bpf_calls() 8041902dae52 bpf: adjus

[PATCH 4.4-stable 6/6] bpf: prevent out-of-bounds speculation

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit b2157399cc9898260d6031c5bfe45fe137c1fbe7 upstream. 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. T

[PATCH 4.4-stable 1/6] bpf: add bpf_patch_insn_single helper

2018-01-12 Thread Jiri Slaby
From: Daniel Borkmann commit c237ee5eb33bf19fe0591c04ff8db19da7323a83 upstream. Move the functionality to patch instructions out of the verifier code and into the core as the new bpf_patch_insn_single() helper will be needed later on for blinding as well. No changes in functionality. Signed-off

[PATCH 4.4-stable 5/6] bpf: adjust insn_aux_data when patching insns

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit 8041902dae5299c1f194ba42d14383f734631009 upstream. convert_ctx_accesses() replaces single bpf instruction with a set of instructions. Adjust corresponding insn_aux_data while patching. It's needed to make sure subsequent 'for(all insn)' loops have matching insn an

[PATCH 4.4-stable 3/6] bpf: move fixup_bpf_calls() function

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit e245c5c6a5656e4d61aa7bb08e9694fd6e5b2b9d upstream. no functional change. move fixup_bpf_calls() to verifier.c it's being refactored in the next patch Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller Signed-off-by: Jiri

[PATCH 4.4-stable 4/6] bpf: refactor fixup_bpf_calls()

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit 79741b3bdec01a8628368fbcfccc7d189ed606cb upstream. reduce indent and make it iterate over instructions similar to convert_ctx_accesses(). Also convert hard BUG_ON into soft verifier error. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-b

[patch net-next] mlxsw: spectrum_router: Add support for IPv6 non-equal-cost multipath

2018-01-12 Thread Jiri Pirko
From: Ido Schimmel Since commit eb789980d0aa ("mlxsw: spectrum_router: Populate adjacency entries according to weights") the driver includes support for non-equal-cost multipath, but IPv4 nexthops were the only user. Now that the kernel supports weighted IPv6 nexthops, we can extend the driver t

Re: WARNING in netlink_ack (2)

2018-01-12 Thread David Ahern
On 1/12/18 4:34 AM, Xin Long wrote: >> audit: type=1400 audit(1515595879.379:7): avc: denied { map } for >> pid=3498 comm="syzkaller002174" path="/root/syzkaller002174137" dev="sda1" >> ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 >> tcontext=unconfined_u:object_r:user_home_t:

Re: [PATCH] net: Convert atomic_t net::count to refcount_t

2018-01-12 Thread Kirill Tkhai
On 12.01.2018 18:53, Eric Dumazet wrote: > On Fri, 2018-01-12 at 18:28 +0300, Kirill Tkhai wrote: >> Since net could be obtained from RCU lists, >> and there is a race with net destruction, >> the patch converts net::count to refcount_t. >> >> This provides sanity checks for the cases of >> increme

Re: linux-next: build failure after merge of the net-next tree

2018-01-12 Thread Alexei Starovoitov
On Fri, Jan 12, 2018 at 11:45:42AM +0100, Daniel Borkmann wrote: > On 01/12/2018 05:21 AM, Alexei Starovoitov wrote: > > On Thu, Jan 11, 2018 at 10:11:45PM -0500, David Miller wrote: > >> From: Alexei Starovoitov > >> Date: Wed, 10 Jan 2018 17:58:54 -0800 > >> > >>> On Thu, Jan 11, 2018 at 11:53:5

RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting

2018-01-12 Thread Christopher Lameter
On Fri, 12 Jan 2018, David Laight wrote: > > Hmmm... At some point we should switch kmem_cache_create to pass a struct > > containing all the parameters. Otherwise the API will blow up with > > additional functions. > > Or add an extra function to 'configure' the kmem_cache with the > extra parame

Re: [PATCH] net: Convert atomic_t net::count to refcount_t

2018-01-12 Thread Eric Dumazet
On Fri, 2018-01-12 at 18:28 +0300, Kirill Tkhai wrote: > Since net could be obtained from RCU lists, > and there is a race with net destruction, > the patch converts net::count to refcount_t. > > This provides sanity checks for the cases of > incrementing counter of already dead net, > when maybe_

[PATCH] netfilter: nf_tables: flow_offload depends on flow_table

2018-01-12 Thread Arnd Bergmann
Without CONFIG_NF_FLOW_TABLE, the new nft_flow_offload module produces a link error: net/netfilter/nft_flow_offload.o: In function `nft_flow_offload_iterate_cleanup': nft_flow_offload.c:(.text+0xb0): undefined reference to `nf_flow_table_iterate' net/netfilter/nft_flow_offload.o: In function `flo

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

2018-01-12 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 iproute2 net-next v8 3/3] tc: implement ingress/egress block index attributes for qdiscs

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tc/tc_qdisc.c | 36 1 file changed, 36 insertions(+) diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index 70279b9..8dd3e7e 100644 --- a/tc/tc_qdisc.c +++ b/tc/tc_qdisc.c @@ -31,6 +31,7 @@ static int usage(void)

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

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tc/tc_filter.c | 127 + 1 file changed, 110 insertions(+), 17 deletions(-) diff --git a/tc/tc_filter.c b/tc/tc_filter.c index 545cc3a..67a0577 100644 --- a/tc/tc_filter.c +++ b/tc/tc_filter.c

[patch iproute2 net-next v8 1/3] include: update rtnetlink header according to kernel

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/rtnetlink.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 13bf56f..7409196 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/

[patch net-next v8 02/14] net: sched: introduce shared filter blocks infrastructure

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Allow qdiscs to share filter blocks among them. Each qdisc type has to use block get/put extended modifications that enable sharing. Shared blocks are tracked within each net namespace and identified by u32 index. This index is passed from user during the qdisc creation. If user

[patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Add simple block get operation which primary purpose is to check the block existence by block index. Signed-off-by: Jiri Pirko --- v6->v7: - new patch --- include/uapi/linux/rtnetlink.h | 6 net/sched/cls_api.c| 64 ++

[patch net-next v8 06/14] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-12 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 v8 09/14] net: sched: introduce ingress/egress block index attributes for qdisc

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Introduce two new attributes to be used for qdisc creation and dumping. One for ingress block, one for egress block. Introduce a set of ops that qdisc which supports block sharing would implement. Passing block indexes in qdisc change is not supported yet and it is checked and f

[patch net-next v8 03/14] net: sched: avoid usage of tp->q in tcf_classify

2018-01-12 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 9b45950..31e91dc 100644 --- a/net/sched/cls_api.c +++ b/net/sched

[patch net-next v8 04/14] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-12 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 v8 07/14] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-12 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 v8 12/14] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-12 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 v8 13/14] mlxsw: spectrum_acl: Implement TC block sharing

2018-01-12 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 --- v7->v8: - rebased on top of cur

[patch net-next v8 10/14] net: sched: allow ingress and clsact qdiscs to share filter blocks

2018-01-12 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 --- v7->v8: - base this on the patch that introduc

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

2018-01-12 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 net-next v8 14/14] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops

2018-01-12 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 v8 05/14] net: sched: remove classid and q fields from tcf_proto

2018-01-12 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 v8 01/14] net: sched: introduce support for multiple filter chain pointers registration

2018-01-12 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 --- v6->v7: - unsquashed shared block patch that wa

Re: [pull request][net 00/11] Mellanox, mlx5 fixes 2018-01-11

2018-01-12 Thread David Miller
From: Saeed Mahameed Date: Fri, 12 Jan 2018 02:37:12 +0200 > The following series includes fixes to mlx5 core and netdev driver. > To highlight we have two critical fixes in this series: > 1st patch from Eran to address a fix for Host2BMC Breakage. > > 2nd patch from Saeed to address the RDMA IR

RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting

2018-01-12 Thread David Laight
From: Christopher Lameter > Sent: 10 January 2018 18:28 > On Tue, 9 Jan 2018, Kees Cook wrote: > > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t usersize, >

Re: pull request (net): ipsec 2018-01-11

2018-01-12 Thread David Miller
From: Steffen Klassert Date: Thu, 11 Jan 2018 12:37:35 +0100 > 1) Don't allow to change the encap type on state updates. >The encap type is set on state initialization and >should not change anymore. From Herbert Xu. > > 2) Skip dead policies when rehashing to fix a >slab-out-of-boun

[PATCH] net: Convert atomic_t net::count to refcount_t

2018-01-12 Thread Kirill Tkhai
Since net could be obtained from RCU lists, and there is a race with net destruction, the patch converts net::count to refcount_t. This provides sanity checks for the cases of incrementing counter of already dead net, when maybe_get_net() has to used instead of get_net(). Drivers: allyesconfig an

Re: [PATCH V2 net-next 00/11] add some new features and fix some bugs

2018-01-12 Thread David Miller
From: Peng Li Date: Fri, 12 Jan 2018 16:23:06 +0800 > This patchset adds 3 ethtool features: get_channels, > get_coalesce and get_coalesce, and fix some bugs. Series applied, thank you.

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

2018-01-12 Thread James Bottomley
On Fri, 2018-01-12 at 08:27 +0100, Greg KH wrote: > On Thu, Jan 11, 2018 at 02:15:12PM -0800, Dan Williams wrote: > > > > On Sat, Jan 6, 2018 at 1:03 AM, Greg KH > > wrote: > > > > > > On Fri, Jan 05, 2018 at 05:10:48PM -0800, Dan Williams wrote: > > > > > > > > Static analysis reports that 'ha

Re: [PATCH net-next 00/22] Aquantia atlantic driver major update 2018/01

2018-01-12 Thread David Miller
Sorry, this is way too many patches to submit at one time. When a patch series gets beyond 10 or so patches it creates an unreasonable burdon for those who will be reviewing your work. So please keep your patch series down to about 10 or so patches, thank you. And please submit your changes more

Re: PATCH V5 4/4] selinux: Add SCTP support

2018-01-12 Thread Neil Horman
On Thu, Jan 11, 2018 at 11:31:06AM +, Richard Haines wrote: > The SELinux SCTP implementation is explained in: > Documentation/security/SELinux-sctp.rst > > Signed-off-by: Richard Haines > --- > V5 Change: Rework selinux_netlbl_socket_connect() and > selinux_netlbl_socket_connect_locked as re

Re: [PATCH v2 15/19] carl9170: prevent bounds-check bypass via speculative execution

2018-01-12 Thread Christian Lamparter
On Friday, January 12, 2018 1:47:46 AM CET Dan Williams wrote: > 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 o

[PATCH] net/tls: Fix inverted error codes to avoid endless loop

2018-01-12 Thread r . hering
sendfile() calls can hang endless with using Kernel TLS if a socket error occurs. Socket error codes must be inverted by Kernel TLS before returning because they are stored with positive sign. If returned non-inverted they are interpreted as number of bytes sent, causing endless looping of the spl

RE: DPAA Ethernet problems with mainstream Linux kernels

2018-01-12 Thread Madalin-cristian Bucur
> -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+madalin.bucur=nxp@lists.ozlabs.org] On Behalf Of Jamie Krueger > Sent: Wednesday, January 10, 2018 5:57 PM > To: linuxppc-...@lists.ozlabs.org > Subject: DPAA Ethernet problems with mainstream Linux kernels > > H

[PATCH v2] net: phy: Have __phy_modify return 0 on success

2018-01-12 Thread Andrew Lunn
__phy_modify would return the old value of the register before it was modified. Thus on success, it does not return 0, but a positive value. Thus functions using phy_modify, which is a wrapper around __phy_modify, can start returning > 0 on success, rather than 0. As a result, breakage has been not

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Pablo Neira Ayuso
On Fri, Jan 12, 2018 at 03:56:21PM +0200, Eyal Birger wrote: > On Fri, Jan 12, 2018 at 3:41 PM, Pablo Neira Ayuso > wrote: > > On Fri, Jan 12, 2018 at 02:57:24PM +0200, Eyal Birger wrote: > >> @@ -51,9 +52,9 @@ match_xfrm_state(const struct xfrm_state *x, const > >> struct xt_policy_elem *e, > >

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Eyal Birger
On Fri, Jan 12, 2018 at 3:41 PM, Pablo Neira Ayuso wrote: > On Fri, Jan 12, 2018 at 02:57:24PM +0200, Eyal Birger wrote: >> @@ -51,9 +52,9 @@ match_xfrm_state(const struct xfrm_state *x, const struct >> xt_policy_elem *e, >> MATCH(reqid, x->props.reqid); >> } >> >> -static int >> -m

Re: [PATCH net-next] net: phy: Have __phy_modify return 0 on success

2018-01-12 Thread Andrew Lunn
On Thu, Jan 11, 2018 at 05:29:22PM -0800, Florian Fainelli wrote: > On 01/11/2018 12:55 PM, Andrew Lunn wrote: > > __phy_modify would return the old value of the register before it was > > modified. Thus on success, it does not return 0, but a positive value. > > Thus functions using phy_modify, wh

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Pablo Neira Ayuso
On Fri, Jan 12, 2018 at 02:57:24PM +0200, Eyal Birger wrote: > @@ -51,9 +52,9 @@ match_xfrm_state(const struct xfrm_state *x, const struct > xt_policy_elem *e, > MATCH(reqid, x->props.reqid); > } > > -static int > -match_policy_in(const struct sk_buff *skb, const struct xt_policy_i

Re: [patch net-next 0/5] mlxsw: Offload PRIO qdisc

2018-01-12 Thread Jamal Hadi Salim
On 18-01-11 05:20 AM, Jiri Pirko wrote: From: Jiri Pirko Add an offload support for PRIO qdisc for mlxsw driver. PRIO qdisc is being offloaded by using ndo_setup_tc. It has three commands, to set or tune the qdisc, to remove it and to get its stats. Like RED offloading, offloading this qdisc i

[PATCH net-next 2/2] net: sched: add xfrm policy ematch

2018-01-12 Thread Eyal Birger
From: Eyal Birger Allows classification based on the incoming IPSec policy used during decpsulation. This allows similar matching capabilities to those provided by netfilter xt_policy module, and uses the same data strcuture - but from a tc entry point. Signed-off-by: Eyal Birger --- include/

[PATCH net-next 0/2] net: sched: Introduce em_policy ematch

2018-01-12 Thread Eyal Birger
From: Eyal Birger The following patchset introduces a new tc ematch for matching IPSec traffic from a tc context. This allows early classification as well as mirroning/redirecting IPSec traffic based on decapsulation criteria. The matching functionality is based on the netfilter xt_policy match

[PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Eyal Birger
From: Eyal Birger Expose this functionality so it could be usable from a tc classifier. The rename of match_policy_out() is done for consistency though it is not exported. Signed-off-by: Eyal Birger --- include/net/netfilter/xt_policy.h | 12 net/netfilter/xt_policy.c | 1

Re: [PATCH v2] bnx2x: disable GSO where gso_size is too big for hardware

2018-01-12 Thread Marcelo Ricardo Leitner
On Fri, Jan 12, 2018 at 09:48:44AM -0200, Marcelo Ricardo Leitner wrote: > On Fri, Jan 12, 2018 at 10:59:05AM +1100, Daniel Axtens wrote: > > If a bnx2x card is passed a GSO packet with a gso_size larger than > > ~9700 bytes, it will cause a firmware error that will bring the card > > down: > > Wh

Re: [PATCH v2] bnx2x: disable GSO where gso_size is too big for hardware

2018-01-12 Thread Marcelo Ricardo Leitner
On Fri, Jan 12, 2018 at 10:59:05AM +1100, Daniel Axtens wrote: > If a bnx2x card is passed a GSO packet with a gso_size larger than > ~9700 bytes, it will cause a firmware error that will bring the card > down: Why not use netif_set_gso_max_size() instead? Some drivers are using it to avoid such l

Re: WARNING in netlink_ack (2)

2018-01-12 Thread Xin Long
On Thu, Jan 11, 2018 at 1:31 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > cf1fb158230edce8a0482bfb2e59b9c390477fb6 > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is a

Re: [RFC bpf-next] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info

2018-01-12 Thread Daniel Borkmann
On 01/12/2018 03:17 AM, Jakub Kicinski wrote: > On Thu, 11 Jan 2018 16:47:47 -0800, Jakub Kicinski wrote: >> Hi! >> >> Jiong is working on dumping JITed NFP image via bpftool, Francois will be >> submitting support for NFP in binutils soon (whoop! :)). >> >> We would appreciate if you could weigh i

[iproute PATCH] tc: Optimize gact action lookup

2018-01-12 Thread Phil Sutter
When adding a filter with a gact action such as 'drop', tc first tries to open a shared object with equivalent name (m_drop.so in this case) before trying gact. Avoid this by matching the action name against those handled by gact prior to calling get_action_kind(). Cc: Jiri Pirko Cc: Jamal Hadi S

Re: MERGE net into net-next

2018-01-12 Thread Daniel Borkmann
On 01/12/2018 04:16 AM, David Miller wrote: > > Daniel please look at how I resolved the BPF conflicts and build > failures. > > The test_align.c one was pretty simple, but the one that fixes the > build failure due to overlap of the BPF call vs. JIT always on changes > is bit less trivial. Yeah

[PATCH net-next 05/22] net: aquantia: Remove duplicate hardware descriptors declarations

2018-01-12 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- .../aquantia/atlantic/hw_atl/hw_atl_a0_internal.h | 31 -- .../aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 31 -- .../aquantia/atlantic/hw_atl/hw_atl_utils.h| 31 ++ 3 files changed, 31 inse

[PATCH net-next 08/22] net: aquantia: Add new aQuantia devices into pci table

2018-01-12 Thread Igor Russkikh
New set of devices has an upgraded hardware (B1). However this hardware interface is identical to B0. The difference will be in firmware which is incompatible with old one. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 17 + 1 file change

[PATCH net-next 09/22] net: aquantia: Introduce new AQC devices and capabilities

2018-01-12 Thread Igor Russkikh
A number of new AQC devices is going to be released. To support more flexible capabilities management a number of static caps instances is now declared. Devices now are mainly differs by supported speeds, but in future more parameters will be customized. A set of AQC100 devices is fibre, not twiste

[PATCH net-next 04/22] net: aquantia: Introduce new device ids definitions

2018-01-12 Thread Igor Russkikh
Reorganize and remove duplicate speed and devid definitions Introduce explicit flow control configuration defines Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_cfg.h| 8 - drivers/net/ethernet/aquantia/atlantic/aq_common.h | 34 ++ driver

[PATCH net-next 15/22] net: aquantia: Remove create/destroy from hw ops

2018-01-12 Thread Igor Russkikh
These ops are not related to HW and are now implemented in pci module. Thus, remove these ops pointers and implementation. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 5 - .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 24 -

[PATCH net-next 16/22] net: aquantia: Change confusing no_ff_addr to more meaningful name

2018-01-12 Thread Igor Russkikh
The address to check if HW is not dead/hang could be stored in capabilities, since it is a constant. Change its name to better reflect the idea. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h| 2 +- drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c

[PATCH net-next 02/22] net: aquantia: Cleanup status flags accesses

2018-01-12 Thread Igor Russkikh
Usage of aq_obj_s structure is noop, here we remove it replacing access to flags filed directly. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h| 2 +- drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c | 6 +++--- drivers/net/ethernet/aquantia/

[PATCH net-next 14/22] net: aquantia: Cleanup pci functions module

2018-01-12 Thread Igor Russkikh
Driver contained a dead code of maintaining multiple pci port instances. That will never be used since for each pci function a separate NIC instance is created. Simplify this, making pci module only responsible for pci resource allocations. NIC initialization is also simplified accordingly Signed-

[PATCH net-next 12/22] net: aquantia: Prepend hw access functions declarations with prefix

2018-01-12 Thread Igor Russkikh
Internal functions for registers and HW access were not prefixed. This introduce noise in global kernel symbols. Here we add explicit prefix 'hw_atl' to all the HW access layer functions. Alignment and styling were fixed as well. Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/hw

[PATCH net-next 20/22] net: aquantia: Report correct mediatype via ethtool

2018-01-12 Thread Igor Russkikh
For devices with known capabilities of Fibre media type we now report that to ethtool. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_

[PATCH net-next 19/22] net: aquantia: Introduce global AQC hardware reset sequence

2018-01-12 Thread Igor Russkikh
The detailed reset sequence ensures all HW components are in aligned state before NIC startup. It also supports cards with signed firmware (RBL) and checks if their FW is valid. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 1 + .../ethernet/aquantia/atl

[PATCH net-next 21/22] net: aquantia: Fix internal stats calculation on rx

2018-01-12 Thread Igor Russkikh
skb len should be fetched before gro_receive - otherwise we may get wrong or even outdated skb data. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq

[PATCH net-next 07/22] net: aquantia: Simplify dependencies between pci modules

2018-01-12 Thread Igor Russkikh
Eliminate useless passing of net_device_ops and ethtools_ops through deep chain of calls. Move all pci related code into aq_pci_func module. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 97 - drivers/net/ethernet/aquantia/atlantic/aq_m

[PATCH net-next 17/22] net: aquantia: Introduce firmware ops callbacks

2018-01-12 Thread Igor Russkikh
New AQC cards will have an updated firmware with new binary interface. This patch extracts firmware specific operations into a separate table and prepares for the introduction of new fw 2.x and 3.x Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 27 ---

[PATCH net-next 22/22] net: aquantia: bump driver version to match aquantia internal numbering

2018-01-12 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/ver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/ver.h b/drivers/net/ethernet/aquantia/atlantic/ver.h index 9009f26..a87699d 100644 --- a/drivers/net/ethe

[PATCH net-next 18/22] net: aquantia: Introduce support for new firmware on AQC cards

2018-01-12 Thread Igor Russkikh
This defines fw2x operations table and corresponding methods. Some of the functions are being shared with 1.x firmware Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/Makefile| 1 + drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 1 - .../aquantia/atlantic/hw

[PATCH net-next 10/22] net: aquantia: Eliminate aq_nic structure abstraction

2018-01-12 Thread Igor Russkikh
aq_nic_s was hidden in aq_nic_internal.h, that made it difficult to access nic fields and structures from other modules. This change moves aq_nic_s struct into aq_nic.h and thus makes it available to other driver modules, mainly pci module and hw related module. Signed-off-by: Igor Russkikh ---

[PATCH net-next 13/22] net: aquantia: Convert hw and caps structures to const static pointers

2018-01-12 Thread Igor Russkikh
This removes unnecessary structure copying, and prepares the driver for separate firmware ops table introduction. We also remove extra copy of capabilities structure (which is const actually) and also replace it with a const pointer in aq_nic_cfg. Signed-off-by: Igor Russkikh --- drivers/net/et

[PATCH net-next 03/22] net: aquantia: Cleanup hardware access modules

2018-01-12 Thread Igor Russkikh
Use direct aq_hw_s *self reference where possible Eliminate useless abstraction PHAL, duplicated structures definitions Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 22 +++-- drivers/net/ethernet/aquantia/atlantic/aq_nic.c| 6 +-- drivers/net/eth

<    1   2   3   >