Re: kernel BUG at net/core/skbuff.c:LINE! (2)

2018-01-16 Thread Xin Long
On Tue, Jan 16, 2018 at 4:22 AM, syzbot wrote: > syzkaller has found reproducer for the following crash on > b625c1ff82272e26c76570d3c7123419ec345b20 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console

Re: [PATCH net-next v5 0/4] dwmac-meson8b: clock fixes for Meson8b

2018-01-16 Thread Yixun Lan
On 01/16/18 01:10, Martin Blumenstingl wrote: > Hi Dave, > > this series is now successfully tested, thus we think it's ready to be > applied to your net-next tree. > > Emiliano reported [0] that he couldn't get dwmac-meson8b to work on his > Odroid-C1. This is the (hopefully) final version of

[PATCH net-next V3 2/2] tun: allow to attach ebpf socket filter

2018-01-16 Thread Jason Wang
This patch allows userspace to attach eBPF filter to tun. This will allow to implement VM dataplane filtering in a more efficient way compared to cBPF filter by allowing either qemu or libvirt to attach eBPF filter to tun. Signed-off-by: Jason Wang --- drivers/net/tun.c | 38 ++

[PATCH net-next V3 1/2] tuntap: rename struct tun_steering_prog to struct tun_prog

2018-01-16 Thread Jason Wang
To be reused by other eBPF program other than queue selection. Signed-off-by: Jason Wang --- drivers/net/tun.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 2fba3be..76197ed 100644 --- a/drivers/

[PATCH net-next V3 0/2] tun: allow to attach eBPF filter

2018-01-16 Thread Jason Wang
Hi all: This series tries to implement eBPF socket filter for tun. This could be used for implementing efficient virtio-net receive filter for vhost-net. Thanks Changes from V2: - fix typo - remove unnecessary double check Changes from V1: - trim more bytes if vlan tag is existed to make sure t

[PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-16 Thread Kai-Heng Feng
r8153 on Dell TB15/16 dock corrupts rx packets. This change is suggested by Realtek. They guess that the XHCI controller doesn't have enough buffer, and their guesswork is correct, once the RX aggregation gets disabled, the issue is gone. ASMedia is currently working on a real sulotion for this i

[PATCH net 1/1] net/tls: Only attach to sockets in ESTABLISHED state

2018-01-16 Thread Ilya Lesokhin
Calling accept on a TCP socket with a TLS ulp attached results in two sockets that share the same ulp context. The ulp context is freed while a socket is destroyed, so after one of the sockets is released, the second second will trigger a use after free when it tries to access the ulp context attac

Re: [PATCH v7 4/8] can: m_can: Move allocation of net device to probe

2018-01-16 Thread Faiz Abbas
Hi, On Monday 15 January 2018 07:22 PM, Marc Kleine-Budde wrote: > On 01/10/2018 11:55 AM, Faiz Abbas wrote: >> With the version no longer required to allocate the net device, it can >> be moved to probe and the alloc_m_can_dev() function can be simplified. >> >> Therefore, move the allocation of

[PATCH] [RESEND net] fm10k: mark PM functions as __maybe_unused

2018-01-16 Thread Arnd Bergmann
A cleanup of the PM code left an incorrect #ifdef in place, leading to a harmless build warning: drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2502:12: error: 'fm10k_suspend' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2475:12: error: 'fm10k_resume'

[PATCH v3 1/2] net: Fix possible race in peernet2id_alloc()

2018-01-16 Thread Kirill Tkhai
peernet2id_alloc() is racy without rtnl_lock() as refcount_read(&peer->count) under net->nsid_lock does not guarantee, peer is alive: rcu_read_lock() peernet2id_alloc().. spin_lock_bh(&net->nsid_lock) .. refcount_read(&peer->count) (!= 0) ..

[PATCH v3 2/2] net: Remove spinlock from get_net_ns_by_id()

2018-01-16 Thread Kirill Tkhai
idr_find() is safe under rcu_read_lock() and maybe_get_net() guarantees that net is alive. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |2 -- 1 file changed, 2 deletions(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 3c77d84ad60d..1ccb953b3b09 100644

[PATCH] net: fs_enet: do not call phy_stop() in interrupts

2018-01-16 Thread Christophe Leroy
In case of TX timeout, fs_timeout() calls phy_stop(), which triggers the following BUG_ON() as we are in interrupt. [92708.199889] kernel BUG at drivers/net/phy/mdio_bus.c:482! [92708.204985] Oops: Exception in kernel mode, sig: 5 [#1] [92708.210119] PREEMPT [92708.212107] CMPC885 [92708.214216] C

Re: [PATCH bpf-next v2 02/11] net: sched: prepare extack support for offload via tc_cls_common_offload

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 03:08:36AM CET, jakub.kicin...@netronome.com wrote: >From: Quentin Monnet > >Prepare for extack support for hardware offload of classifiers. In order >to achieve this, a pointer to a struct netlink_ext_ack is added to the >struct tc_cls_common_offload that is passed to the cal

Re: [PATCH bpf-next v2 09/11] nfp: bpf: use extack support to improve debugging

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 03:08:43AM CET, jakub.kicin...@netronome.com wrote: >From: Quentin Monnet > >Use the recently added extack support for eBPF offload in the driver. > >Signed-off-by: Quentin Monnet >Reviewed-by: Jakub Kicinski >--- [...] >@@ -303,7 +305,8 @@ static int nfp_net_bpf_load(str

Re: [PATCH net-next v5 0/4] dwmac-meson8b: clock fixes for Meson8b

2018-01-16 Thread Jerome Brunet
On Tue, 2018-01-16 at 16:25 +0800, Yixun Lan wrote: > > On 01/16/18 01:10, Martin Blumenstingl wrote: > > Hi Dave, > > > > this series is now successfully tested, thus we think it's ready to be > > applied to your net-next tree. > > > > Emiliano reported [0] that he couldn't get dwmac-meson8b to

Re: [PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-16 Thread Guillaume Nault
On Mon, Jan 15, 2018 at 10:11:04PM +0100, Lorenzo Bianconi wrote: > > On Mon, Jan 15, 2018 at 07:43:18PM +0100, Lorenzo Bianconi wrote: > >> > On Sun, Jan 14, 2018 at 03:50:56PM +0100, Lorenzo Bianconi wrote: > >> >> --- a/net/l2tp/l2tp_core.h > >> >> +++ b/net/l2tp/l2tp_core.h > >> >> @@ -302,6 +3

[PATCHv4 4/5] ARM: dts: imx6q-b650v3: Add switch port configuration

2018-01-16 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information: root@b650v

[PATCHv4 5/5] ARM: dts: imx6q-b450v3: Add switch port configuration

2018-01-16 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information: root@b450v

[PATCHv4 3/5] ARM: dts: imx6q-b850v3: Add switch port configuration

2018-01-16 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors ("ID", "IX", "ePort 1", "ePort 2"). The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the

[PATCHv4 2/5] ARM: dts: imx6q-bx50v3: Add internal switch

2018-01-16 Thread Sebastian Reichel
B850v3, B650v3 and B450v3 all have a GPIO bit banged MDIO bus to communicate with a Marvell switch. On all devices the switch is connected to a PCI based network card, which needs to be referenced by DT, so this also adds the common PCI root node. Signed-off-by: Sebastian Reichel --- arch/arm/bo

[PATCHv4 0/5] GEHC Bx50 Switch Support

2018-01-16 Thread Sebastian Reichel
Hi, This adds support for the internal switch found in GE Healthcare B450v3, B650v3 and B850v3. All devices use a GPIO bitbanged MDIO bus to communicate with the switch and a PCIe based network card for exchanging network data. The cpu network data link requires, that the switch's internal phy int

[PATCHv4 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-16 Thread Sebastian Reichel
This adds support for enabling the internal PHY for a 'cpu' port. It has been tested on GE B850v3, B650v3 and B450v3, which have a built-in MV88E6240 switch hardwired to a PCIe based network card making use of the internal PHY. Since mv88e6xxx driver resets the chip during probe, the PHY is disabl

[PATCH] bnxt_en: don't update cpr->rx_bytes with uninitialized length len

2018-01-16 Thread Colin King
From: Colin Ian King Currently in the cases where cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP or CMP_TYPE_RX_L2_TPA_END_CMP the exit path updates cpr->rx_bytes with an uninitialized length len. Fix this by adding a new exit path that does not update the cpr stats with the bogus length len and remov

Re: [PATCH][next] bnxt_en: ensure len is ininitialized to zero

2018-01-16 Thread Colin Ian King
On 12/01/18 22:38, Andy Gospodarek wrote: > On Fri, Jan 12, 2018 at 10:11:17AM -0800, Michael Chan wrote: >> On Fri, Jan 12, 2018 at 9:46 AM, Colin King wrote: >>> From: Colin Ian King >>> >>> In the case where cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP the >>> exit return path is via label next_rx

Re: [PATCH v2 net-next 1/5] l2tp: fix switch default error handling in l2tp_nl_cmd_session_create()

2018-01-16 Thread Guillaume Nault
On Mon, Jan 15, 2018 at 10:18:53PM +0100, Lorenzo Bianconi wrote: > > On Sun, Jan 14, 2018 at 03:50:54PM +0100, Lorenzo Bianconi wrote: > >> Although this issue is harmless since that code path is protected by the > >> check on l2tp_nl_cmd_ops[]/l2tp_nl_cmd_ops[]->session_create(), fix error > >> h

Re: [PATCHv3 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-16 Thread Sebastian Reichel
Hi, On Mon, Jan 15, 2018 at 11:57:18PM +0100, Andrew Lunn wrote: > > int dsa_port_fixed_link_register_of(struct dsa_port *dp) > > { > > struct device_node *dn = dp->dn; > > @@ -305,6 +354,10 @@ int dsa_port_fixed_link_register_of(struct dsa_port > > *dp) > > ds->ops->adj

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

2018-01-16 Thread Steffen Klassert
On Fri, Jan 12, 2018 at 08:38:01AM -0800, Eric Dumazet wrote: > 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 encapsulat

[PATCH net-next] bnxt_en: uninitialized variable in bnxt_rx_pkt()

2018-01-16 Thread Dan Carpenter
There are a couple failure paths where "len" is used uninitialized. It means we record the number of rx_packets incorrectly. Fixes: 6a8788f25625 ("bnxt_en: add support for software dynamic interrupt moderation") Signed-off-by: Dan Carpenter diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.

Re: [PATCH net-next] kcm: do not attach sockets if sk_user_data is already used

2018-01-16 Thread Guillaume Nault
On Sun, Jan 14, 2018 at 11:32:57AM +, James Chapman wrote: > SIOCKCMATTACH writes a connected socket's sk_user_data for its own > use. Prevent it doing so if the socket's sk_user_data is already set > since some sockets (e.g. encapsulated sockets) use sk_user_data > internally. > > diff --git

[PATCH net-next] cxgb4: restructure VF mgmt code

2018-01-16 Thread Ganesh Goudar
restructure the code which adds support for configuring PCIe VF via mgmt netdevice. which was added by commit 7829451c695e ("cxgb4: Add control net_device for configuring PCIe VF") Original work by: Casey Leedom Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h |

Re: [PATCH v2 net-next 0/5] l2tp: set l2specific_len based on l2specific_type

2018-01-16 Thread Guillaume Nault
On Sun, Jan 14, 2018 at 03:50:53PM +0100, Lorenzo Bianconi wrote: > Do not rely on l2specific_len value provided by userspace but set sublayer > length according to l2specific_type. > Fix a harmless issue in the switch default case in > l2tp_nl_cmd_session_create(). > > Changes since v1: > - remov

Re: [PATCH v7 5/8] can: m_can: Add PM Support

2018-01-16 Thread Faiz Abbas
Hi, On Monday 15 January 2018 07:25 PM, Marc Kleine-Budde wrote: > On 01/10/2018 11:55 AM, Faiz Abbas wrote: >> From: Franklin S Cooper Jr >> >> Add support for CONFIG_PM which is the new way to handle managing clocks. >> >> Move the clock management to pm_runtime_resume() and pm_runtime_suspend(

RE: [PATCH net 1/1] net/tls: Only attach to sockets in ESTABLISHED state

2018-01-16 Thread Ilya Lesokhin
I'm sorry, I've noticed that I have a typo in my comment. It should read: /*The TLS ulp is currently supported only for TCP sockets * in ESTABLISHED state. * Supporting sockets in LISTEN state will require us * to modify the accept implementation to clone rather then * share the ulp context.

Re: [PATCH net-next v5 0/4] dwmac-meson8b: clock fixes for Meson8b

2018-01-16 Thread Martin Blumenstingl
Hi Jerome, Hi Yixun, On Tue, Jan 16, 2018 at 10:37 AM, Jerome Brunet wrote: > On Tue, 2018-01-16 at 16:25 +0800, Yixun Lan wrote: >> >> On 01/16/18 01:10, Martin Blumenstingl wrote: >> > Hi Dave, >> > >> > this series is now successfully tested, thus we think it's ready to be >> > applied to your

Re: [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration

2018-01-16 Thread Martin Blumenstingl
On Sun, Jan 14, 2018 at 10:48 PM, Martin Blumenstingl wrote: > Tests (using an oscilloscope and an Odroid-C1 board with a RTL8211F > RGMII PHY) have shown that the PRG_ETH0 register behaves as follows: > - bit 4 is a mux to choose between two parent clocks. according to the > public S805 datashe

[PATCH -next] bpf: cpumap: make some functions static

2018-01-16 Thread Wei Yongjun
Fixes the following sparse warnings: kernel/bpf/cpumap.c:146:6: warning: symbol '__cpu_map_queue_destructor' was not declared. Should it be static? kernel/bpf/cpumap.c:225:16: warning: symbol 'cpu_map_build_skb' was not declared. Should it be static? kernel/bpf/cpumap.c:340:26: warning: symbol

[RFC bpf-next PATCH] bpf: add comments to BPF ld/ldx sizes

2018-01-16 Thread Jesper Dangaard Brouer
Doc BPF ld/ldx size defines, as it help me understand the code in filter.c. Signed-off-by: Jesper Dangaard Brouer --- 0 files changed diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 395d261948de..4729d9a002d4 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/

[PATCH v8 2/5] dt-bindings: can: can-transceiver: Document new binding

2018-01-16 Thread Faiz Abbas
From: Franklin S Cooper Jr Add documentation to describe usage of the new can-transceiver binding. This new binding is applicable for any CAN device therefore it exists as its own document. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori Acked-by: Rob Herring Signed-off-by: Fai

[PATCH v8 4/5] can: m_can: Add PM Support

2018-01-16 Thread Faiz Abbas
Add support for CONFIG_PM which is the new way to handle managing clocks. Move the clock management to pm_runtime_resume() and pm_runtime_suspend() callbacks for the driver. CONFIG_PM is required by OMAP based devices to handle clock management. Therefore, this allows future Texas Instruments SoC

[PATCH v8 0/5] Add MCAN Support for Dra76 platform

2018-01-16 Thread Faiz Abbas
This patch series adds support for M_CAN on the TI Dra76 platform. Device tree patches will be sent separately. A bunch of patches were sent before by Franklin Cooper . I have clubbed the series together and rebased to the latest kernel. v8 changes: Rebased to linux-can-next/testing branch which a

[PATCH v8 5/5] can: m_can: Support higher speed CAN-FD bitrates

2018-01-16 Thread Faiz Abbas
From: Franklin S Cooper Jr During test transmitting using CAN-FD at high bitrates (> 2 Mbps) would fail. Scoping the signals I noticed that only a single bit was being transmitted and with a bit more investigation realized the actual MCAN IP would go back to initialization mode automatically. It

[PATCH v8 3/5] can: m_can: Move allocation of net device to probe

2018-01-16 Thread Faiz Abbas
With the version no longer required to allocate the net device, it can be moved to probe and the alloc_m_can_dev() function can be simplified. Therefore, move the allocation of net device to probe and change alloc_m_can_dev() to setup_m_can_dev(). Signed-off-by: Faiz Abbas --- drivers/net/can/m

[PATCH v8 1/5] dt-bindings: can: m_can: Document new can transceiver binding

2018-01-16 Thread Faiz Abbas
From: Franklin S Cooper Jr Add information regarding can-transceiver binding. This is especially important for MCAN since the IP allows CAN FD mode to run significantly faster than what most transceivers are capable of. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori Acked-by: R

Re: [PATCH v2 net-next 0/5] l2tp: set l2specific_len based on l2specific_type

2018-01-16 Thread Lorenzo Bianconi
> On Sun, Jan 14, 2018 at 03:50:53PM +0100, Lorenzo Bianconi wrote: >> Do not rely on l2specific_len value provided by userspace but set sublayer >> length according to l2specific_type. >> Fix a harmless issue in the switch default case in >> l2tp_nl_cmd_session_create(). >> >> Changes since v1: >>

Re: [PATCH v2 net-next 0/5] l2tp: set l2specific_len based on l2specific_type

2018-01-16 Thread Guillaume Nault
On Tue, Jan 16, 2018 at 12:45:06PM +0100, Lorenzo Bianconi wrote: > > On Sun, Jan 14, 2018 at 03:50:53PM +0100, Lorenzo Bianconi wrote: > >> Do not rely on l2specific_len value provided by userspace but set sublayer > >> length according to l2specific_type. > >> Fix a harmless issue in the switch d

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-16 Thread Christoph Hellwig
On Mon, Jan 15, 2018 at 09:53:10AM +0100, Christoph Hellwig wrote: > > pselect, as an example, crams the sigmask and size together. Why not > > just do that? libaio can take care of setting that up. > > Yes, I could try that. It's just another double indirection for no > good reason. I cna't g

Re: [PATCH net-next] bnxt_en: uninitialized variable in bnxt_rx_pkt()

2018-01-16 Thread Dan Carpenter
Never mind. Colin already sent this one. regards, dan carpenter

Re: [PATCH net] sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf

2018-01-16 Thread Neil Horman
On Tue, Jan 16, 2018 at 02:12:50PM +0800, Xin Long wrote: > On Tue, Jan 16, 2018 at 2:58 AM, Neil Horman wrote: > > On Tue, Jan 16, 2018 at 01:20:28AM +0800, Xin Long wrote: > >> On Mon, Jan 15, 2018 at 9:06 PM, Neil Horman wrote: > >> > On Mon, Jan 15, 2018 at 05:01:36PM +0800, Xin Long wrote: >

Re: [PATCH 33/38] arm64: Implement thread_struct whitelist for hardened usercopy

2018-01-16 Thread Dave Martin
On Mon, Jan 15, 2018 at 12:06:17PM -0800, Kees Cook wrote: > On Mon, Jan 15, 2018 at 4:24 AM, Dave P Martin wrote: > > On Thu, Jan 11, 2018 at 02:03:05AM +, Kees Cook wrote: > >> This whitelists the FPU register state portion of the thread_struct for > >> copying to userspace, instead of the d

[PATCH] ixgbe: remove redundant initialization of 'pool'

2018-01-16 Thread Colin King
From: Colin Ian King Variable pool is being assigned zero and then in the following for-loop is it being set to zero again. Remove the redundant first assignment. Cleans up clang warning: drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c:61:2: warning: Value stored to 'pool' is never read Signed-off

Re: [PATCH net] sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf

2018-01-16 Thread Xin Long
On Tue, Jan 16, 2018 at 8:32 PM, Neil Horman wrote: > On Tue, Jan 16, 2018 at 02:12:50PM +0800, Xin Long wrote: >> On Tue, Jan 16, 2018 at 2:58 AM, Neil Horman wrote: >> > On Tue, Jan 16, 2018 at 01:20:28AM +0800, Xin Long wrote: >> >> On Mon, Jan 15, 2018 at 9:06 PM, Neil Horman >> >> wrote: >

Re: [PATCH v8 4/5] can: m_can: Add PM Support

2018-01-16 Thread Marc Kleine-Budde
On 01/16/2018 12:37 PM, Faiz Abbas wrote: > Add support for CONFIG_PM which is the new way to handle managing clocks. > > Move the clock management to pm_runtime_resume() and pm_runtime_suspend() > callbacks for the driver. > > CONFIG_PM is required by OMAP based devices to handle clock managemen

[ANNOUNCE] nftables 0.8.1 release

2018-01-16 Thread Pablo Neira Ayuso
Hi! The Netfilter project proudly presents: nftables 0.8.1 This release contains mostly incremental fixes and documentation updates, such as fixing up ./configure --with-mini-gmp for embedded setups that don't have libgmp. Deprecated syntax = This release deprecates the

Re: [PATCH v8 3/5] can: m_can: Move allocation of net device to probe

2018-01-16 Thread Marc Kleine-Budde
On 01/16/2018 12:37 PM, Faiz Abbas wrote: > With the version no longer required to allocate the net device, it can > be moved to probe and the alloc_m_can_dev() function can be simplified. > > Therefore, move the allocation of net device to probe and change > alloc_m_can_dev() to setup_m_can_dev()

Re: [PATCH bpf-next v2 02/11] net: sched: prepare extack support for offload via tc_cls_common_offload

2018-01-16 Thread Quentin Monnet
2018-01-16 10:33 UTC+0100 ~ Jiri Pirko > Tue, Jan 16, 2018 at 03:08:36AM CET, jakub.kicin...@netronome.com wrote: >> From: Quentin Monnet >> >> Prepare for extack support for hardware offload of classifiers. In order >> to achieve this, a pointer to a struct netlink_ext_ack is added to the >> str

RE: KASAN: use-after-free Read in tipc_group_is_open

2018-01-16 Thread Jon Maloy
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Monday, January 15, 2018 23:44 > To: syzbot > Cc: David Miller ; Jon Maloy > ; LKML ; Linux > Kernel Network Developers ; syzkaller- > b...@googlegroups.com; tipc-discuss...@lists.sourceforge.net; Ying Xue >

[PATCH v2 net 1/1] net/tls: Only attach to sockets in ESTABLISHED state

2018-01-16 Thread Ilya Lesokhin
Calling accept on a TCP socket with a TLS ulp attached results in two sockets that share the same ulp context. The ulp context is freed while a socket is destroyed, so after one of the sockets is released, the second second will trigger a use after free when it tries to access the ulp context attac

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

2018-01-16 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 v9 06/13] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-16 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 v9 11/13] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-16 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 v9 02/13] net: sched: introduce shared filter blocks infrastructure

2018-01-16 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 v9 09/13] net: sched: allow ingress and clsact qdiscs to share filter blocks

2018-01-16 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 v9 01/13] net: sched: introduce support for multiple filter chain pointers registration

2018-01-16 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

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

2018-01-16 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 v9 05/13] net: sched: remove classid and q fields from tcf_proto

2018-01-16 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 v9 10/13] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy

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

2018-01-16 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 v9 08/13] net: sched: introduce ingress/egress block index attributes for qdisc

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

2018-01-16 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 v9 04/13] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-16 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 v9 03/13] net: sched: avoid usage of tp->q in tcf_classify

2018-01-16 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 iproute2 net-next v9 3/4] tc: introduce support for block-handle for filter operations

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tc/tc_filter.c | 105 +++-- 1 file changed, 88 insertions(+), 17 deletions(-) diff --git a/tc/tc_filter.c b/tc/tc_filter.c index 7dd123a..b29f808 100644 --- a/tc/tc_filter.c +++ b/tc/tc_filter.c

[patch iproute2 net-next v9 4/4] tc: implement ingress/egress block index attributes for qdiscs

2018-01-16 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 3f91558..9f06d37 100644 --- a/tc/tc_qdisc.c +++ b/tc/tc_qdisc.c @@ -31,6 +31,7 @@ static int usage(void)

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

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

[patch iproute2 net-next v9 2/4] tc: introduce tc_qdisc_block_exists helper

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko This hepler used qdisc dump to list all qdisc and find if block index in question is used by any of them. That means the block with specified index exists. Signed-off-by: Jiri Pirko --- tc/tc_qdisc.c | 61 +++ tc/tc_util.

[PATCH iproute2 1/3] iplink: Validate minimum tx rate is less than maximum tx rate

2018-01-16 Thread Gal Pressman
According to the documentation (man ip-link), the minimum TXRATE should be always <= Maximum TXRATE, but commit f89a2a05ffa9 ("Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool") didn't enforce it. Fixes: f89a2a05ffa9 ("Add support to configure SR-IOV VF minimum and ma

[PATCH iproute2 0/3] Fixes for minimum/maximum VF rate API

2018-01-16 Thread Gal Pressman
Hi all, The following patches will fix some issues with the "new" VF rate API, and add some clarifications to the documentation. Thanks, Gal Gal Pressman (3): iplink: Validate minimum tx rate is less than maximum tx rate ipaddress: Make sure VF min/max rate API is supported before using it

[PATCH iproute2 3/3] man: Document the meaning of zero in min/max_tx_rate parameters

2018-01-16 Thread Gal Pressman
Zero value in min/max_tx_rate has a special meaning of no rate limit, document it. Signed-off-by: Gal Pressman Reviewed-by: Eran Ben Elisha Reviewed-by: Leon Romanovsky --- man/man8/ip-link.8.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in

[PATCH iproute2 2/3] ipaddress: Make sure VF min/max rate API is supported before using it

2018-01-16 Thread Gal Pressman
When using the new minimum rate API and providing only one parameter (minimum rate/maximum rate), we query the VF min and max rate regardless of kernel support. This resulted in segmentation fault in ipaddr_loop_each_vf, which tries to access NULL pointer. This patch identifies such cases by testi

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

2018-01-16 Thread Dmitry Vyukov
On Tue, Jan 16, 2018 at 2:23 PM, Jon Maloy wrote: > > >> -Original Message- >> From: Cong Wang [mailto:xiyou.wangc...@gmail.com] >> Sent: Monday, January 15, 2018 23:44 >> To: syzbot >> Cc: David Miller ; Jon Maloy >> ; LKML ; Linux >> Kernel Network Developers ; syzkaller- >> b...@google

Re: [PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-16 Thread Edward Cree
On 13/01/18 22:03, Karim Eshapa wrote: > Use pointers to structure as arguments to function instead of coping > structures and less stack size. Also transfer TNUM(_v, _m) to > tnum.h file to be used in differnet files for creating anonymous structures > statically. > > Signed-off-by: Karim Eshapa

Re: [PATCH v8 3/5] can: m_can: Move allocation of net device to probe

2018-01-16 Thread Marc Kleine-Budde
On 01/16/2018 02:03 PM, Marc Kleine-Budde wrote: >> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c >> index 893edbb..ebb74de 100644 >> --- a/drivers/net/can/m_can/m_can.c >> +++ b/drivers/net/can/m_can/m_can.c >> @@ -1207,25 +1207,20 @@ static bool m_can_niso_supported(c

Re: [PATCH v8 0/5] Add MCAN Support for Dra76 platform

2018-01-16 Thread Marc Kleine-Budde
On 01/16/2018 12:37 PM, Faiz Abbas wrote: > This patch series adds support for M_CAN on the TI Dra76 > platform. Device tree patches will be sent separately. > A bunch of patches were sent before by > Franklin Cooper . I have clubbed the > series together and rebased to the latest kernel. Added al

[PATCH] samples/bpf: Fix trailing semicolon

2018-01-16 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt --- Hi, After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches suggested I fix it treewide [0]. Best regards Luis [0] http://dri

pull-request: can-next 2018-01-16

2018-01-16 Thread Marc Kleine-Budde
ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git tags/linux-can-next-for-4.16-20180116 for you to fetch changes up to 31643dc8fc66abdd3f68800483df4a5420f5e69c: can: m_can: Add call to of_can_transceiver (2018-01-16 15:1

Re: [PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-16 Thread David Miller
From: Björn 'besser82' Esser Date: Tue, 16 Jan 2018 00:59:11 +0100 > @@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly > __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX; > > /* Maximal > space eaten by iovec or ancillary data plus some space */ This patch is corrupted by you

Re: ath9k: add a quirk to set use_msi automatically

2018-01-16 Thread Kalle Valo
AceLan Kao wrote: > Some platform(BIOS) blocks legacy interrupts (INTx), and only allows MSI > for WLAN device. So adding a quirk to list those machines and set > use_msi automatically. > Adding the following platforms to the quirk. >Dell Inspiron 24-3460 >Dell Inspiron 3472 >Dell Ins

Re: [next] ath10k: fix spelling mistake: "addrress" -> "address"

2018-01-16 Thread Kalle Valo
Colin Ian King wrote: > Trivial fix to spelling mistake in warning message text. > > Signed-off-by: Colin Ian King > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. cdd4743e9ba3 ath10k: fix spelling mistake: "addrress" -> "address" -- https://patchwork.kernel

Re: ath10k: remove redundant -ve check against u32 integer size

2018-01-16 Thread Kalle Valo
Colin Ian King wrote: > 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 > Signed-off-by: Kalle V

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-16 Thread Andrew Lunn
> Hi, just saw this and thought of a small patch I just wrote for mdio bus, o > idea > if it is relevant but here goes: > > From fe0b98d54a79779482700676331b4d10a0f3cada Mon Sep 17 00:00:00 2001 > From: Joakim Tjernlund > Date: Sun, 14 Jan 2018 21:27:20 +0100 > Subject: [PATCH] of_mdiobus_regist

pull-request: can 2018-01-16

2018-01-16 Thread Marc Kleine-Budde
: avoid parenthesized string constant warning (2018-01-15 15:15:23 -0500) are available in the Git repository at: ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git tags/linux-can-fixes-for-4.15-20180116 for you to fetch changes up to

[PATCH] can: peak: fix potential bug in packet fragmentation

2018-01-16 Thread Marc Kleine-Budde
From: Stephane Grosjean In some rare conditions when running one PEAK USB-FD interface over a non high-speed USB controller, one useless USB fragment might be sent. This patch fixes the way a USB command is fragmented when its length is greater than 64 bytes and when the underlying USB controller

[PATCH] netfilter: nf_tables: Fix trailing semicolon

2018-01-16 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt --- Hi, After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches suggested I fix it treewide [0]. Best regards Luis [0] http://dr

Re: [patch net-next v9 07/13] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 02:33:41PM CET, j...@resnulli.us wrote: >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. Have to fix the value in this description.

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-16 Thread Andrew Lunn
> When i use mii-tool too Kick the tranceiver... it comes alive.. i can > ping the eth0 itself > > root@X5000LNX:/home/skateman# mii-tool -R eth0 > resetting the transceiver... > root@X5000LNX:/home/skateman# ping 192.168.22.44 > PING 192.168.22.44 (192.168.22.44) 56(84) bytes of data. > 64 bytes

[PATCH] vxlan: Fix trailing semicolon

2018-01-16 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation. It is completely stripped out by the compiler. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt --- Hi, An other trailing semicolon to remove. Best regards Luis [0] http://driverdev.linuxdrive

[PATCH net 2/3] tls: return -EBUSY if crypto_info is already set

2018-01-16 Thread Sabrina Dubroca
do_tls_setsockopt_tx returns 0 without doing anything when crypto_info is already set. Silent failure is confusing for users. Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Sabrina Dubroca --- net/tls/tls_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH net 1/3] tls: fix sw_ctx leak

2018-01-16 Thread Sabrina Dubroca
During setsockopt(SOL_TCP, TLS_TX), if initialization of the software context fails in tls_set_sw_offload(), we leak sw_ctx. We also don't reassign ctx->priv_ctx to NULL, so we can't even do another attempt to set it up on the same socket, as it will fail with -EEXIST. Fixes: 3c4d7559159b ('tls: k

[PATCH net 3/3] tls: reset crypto_info when do_tls_setsockopt_tx fails

2018-01-16 Thread Sabrina Dubroca
The current code copies directly from userspace to ctx->crypto_send, but doesn't always reinitialize it to 0 on failure. This causes any subsequent attempt to use this setsockopt to fail because of the TLS_CRYPTO_INFO_READY check, eventhough crypto_info is not actually ready. This should result in

Re: [PATCH net-next v5 0/4] net: mvpp2: 1000BaseX and 2500BaseX support

2018-01-16 Thread Russell King - ARM Linux
On Fri, Jan 12, 2018 at 08:51:26AM +0100, Antoine Tenart wrote: > Hi all, > > This series adds 1000BaseX and 2500BaseX support to the Marvell PPv2 > driver. In order to use it, the 2.5 SGMII mode is added in the Marvell > common PHY driver (cp110-comphy). > > This was tested on a mcbin. > > All

  1   2   3   >