[PATCH] sit: reload iphdr in ipip6_rcv

2017-06-03 Thread Haishuang Yan
Since iptunnel_pull_header() can call pskb_may_pull(), we must reload any pointer that was related to skb->head. Fixes: a09a4c8dd1ec ("tunnels: Remove encapsulation offloads on decap") Signed-off-by: Haishuang Yan --- net/ipv6/sit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/si

Re: [net-next] openvswitch: add macro MODULE_ALIAS_VPORT_TYPE for vport type alias

2017-06-03 Thread Pravin Shelar
On Sat, Jun 3, 2017 at 6:47 AM, Zhang Shengju wrote: > Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the > declaration of vport type alias, and replace magic numbers with > symbolic constants. > > Signed-off-by: Zhang Shengju > --- > net/openvswitch/vport-geneve.c | 2 +- > net/o

Re: [PATCH net] geneve: fix needed_headroom and max_mtu for collect_metadata

2017-06-03 Thread Pravin Shelar
On Fri, Jun 2, 2017 at 11:54 AM, Eric Garver wrote: > Since commit 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") > when using COLLECT_METADATA geneve devices are created with too small of > a needed_headroom and too large of a max_mtu. This is because > ip_tunnel_info_af() is not valid w

Re: [PATCH v2 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-06-03 Thread Ding Tianhong
On 2017/6/4 2:19, Alexander Duyck wrote: > On Fri, Jun 2, 2017 at 9:04 PM, Ding Tianhong wrote: >> The PCIe Device Control Register use the bit 4 to indicate that >> whether the device is permitted to enable relaxed ordering or not. >> But relaxed ordering is not safe for some platform which cou

[PATCH net-next v10 0/5] Avoiding stack overflow in skb_to_sgvec

2017-06-03 Thread Jason A. Donenfeld
Changes v9->v10: - Spaces to tabs on one line. - Added some acked-by, reviewed-by lines. Since we're down to only cleaning up things like spaces-to-tabs, I believe we can merge this patch series. David - would you put this in net-next, please? The recent bug with macsec and historical one

[PATCH net-next v10 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow

2017-06-03 Thread Jason A. Donenfeld
This is a defense-in-depth measure in response to bugs like 4d6fa57b4dab ("macsec: avoid heap overflow in skb_to_sgvec"). There's not only a potential overflow of sglist items, but also a stack overflow potential, so we fix this by limiting the amount of recursion this function is allowed to do. No

[PATCH net-next v10 3/5] rxrpc: check return value of skb_to_sgvec always

2017-06-03 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld Acked-by: David Howells --- net/rxrpc/rxkad.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 1bb9b2ccc267..29fe20ad04aa 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @

[PATCH net-next v10 2/5] ipsec: check return value of skb_to_sgvec always

2017-06-03 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" --- net/ipv4/ah4.c | 8 ++-- net/ipv4/esp4.c | 20 +--- net/ipv6/ah6.c | 8 ++-- net/ipv6/esp6.c | 20 +--- 4 files changed, 38 insertions(+), 18 deletions(-)

[PATCH net-next v10 4/5] macsec: check return value of skb_to_sgvec always

2017-06-03 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld Cc: Sabrina Dubroca --- drivers/net/macsec.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 91642fd87cd1..b79513b8322f 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macse

[PATCH net-next v10 5/5] virtio_net: check return value of skb_to_sgvec always

2017-06-03 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld Reviewed-by: Sergei Shtylyov Cc: "Michael S. Tsirkin" Cc: Jason Wang --- drivers/net/virtio_net.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3e9246cc49c3..57763d30cabb

Re: [PATCH net] net: ping: do not abuse udp_poll()

2017-06-03 Thread Lorenzo Colitti
On Sun, Jun 4, 2017 at 1:29 AM, Eric Dumazet wrote: > The problem is that ping sockets should not use udp_poll() in the first > place, and recent changes in UDP stack finally exposed this old bug. Acked-By: Lorenzo Colitti Tested-By: Lorenzo Colitti

Re: [pull request][for-next 0/6] Mellanox mlx5 updates 2017-05-23

2017-06-03 Thread Saeed Mahameed
On Fri, Jun 2, 2017 at 7:57 PM, Alexei Starovoitov wrote: > On Fri, Jun 02, 2017 at 12:08:39PM -0400, David Miller wrote: >> From: Alexei Starovoitov >> Date: Fri, 2 Jun 2017 09:06:43 -0700 >> >> > On Fri, Jun 02, 2017 at 06:39:40PM +0300, Leon Romanovsky wrote: >> >> On Thu, Jun 01, 2017 at 06:5

Re: [PATCH 7/7] mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS is set

2017-06-03 Thread Saeed Mahameed
On Sat, Jun 3, 2017 at 10:37 PM, Or Gerlitz wrote: > On Fri, Jun 2, 2017 at 11:22 PM, Jes Sorensen wrote: >> On 05/28/2017 02:03 AM, Or Gerlitz wrote: >>> >>> On Sun, May 28, 2017 at 5:23 AM, Jes Sorensen >>> wrote: On 05/27/2017 05:02 PM, Or Gerlitz wrote: > > > On Sat, Ma

Re: [PATCH] virtio_net: lower limit on buffer size

2017-06-03 Thread Sergei Shtylyov
On 06/02/2017 11:25 PM, J. Bruce Fields wrote: commit d85b758f72b0 "virtio_net: fix support for small rings" Commit d85b758f72b0 ("virtio_net: fix support for small rings") was supposed to increase the buffer size for small rings but had an unintentional side effect of decreasing it for l

Re: [pull request][for-next 0/6] Mellanox mlx5 updates 2017-05-23

2017-06-03 Thread Or Gerlitz
On Fri, Jun 2, 2017 at 7:57 PM, Alexei Starovoitov wrote: > Back to eswitch analogy. All I hear from mlx is "at this stage > it's not approriate ...". Well, I've been asking to do > 'the right thing' for eswitch for months now and eswitch was > in the driver for years. What are the chances that th

Re: [PATCH 7/7] mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS is set

2017-06-03 Thread Or Gerlitz
On Fri, Jun 2, 2017 at 11:22 PM, Jes Sorensen wrote: > On 05/28/2017 02:03 AM, Or Gerlitz wrote: >> >> On Sun, May 28, 2017 at 5:23 AM, Jes Sorensen >> wrote: >>> >>> On 05/27/2017 05:02 PM, Or Gerlitz wrote: On Sat, May 27, 2017 at 12:16 AM, Jes Sorensen wrote: > > >

Re: [PATCH v2 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-06-03 Thread Alexander Duyck
On Fri, Jun 2, 2017 at 9:04 PM, Ding Tianhong wrote: > The PCIe Device Control Register use the bit 4 to indicate that > whether the device is permitted to enable relaxed ordering or not. > But relaxed ordering is not safe for some platform which could only > use strong write ordering, so devices

[PATCHv2 net-next] net: phy: smsc: Implement PHY statistics

2017-06-03 Thread Andrew Lunn
Most of the PHYs supported by the SMSC driver have a counter of symbol errors. This is 16 bit wide and wraps around when it reaches its maximum value. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-By: Woojung Huh --- v2: Align members Add Reviewed-by's --- d

Re: [PATCH v3 2/7] net: pch_gbe: Pull PHY GPIO handling out of Minnow code

2017-06-03 Thread Andrew Lunn
On Fri, Jun 02, 2017 at 04:40:37PM -0700, Paul Burton wrote: > The MIPS Boston development board uses the Intel EG20T Platform > Controller Hub, including its gigabit ethernet controller, and requires > that its RTL8211E PHY be reset much like the Minnow platform. Pull the > PHY reset GPIO handling

Re: [PATCH net] net: dsa: Fix stale cpu_switch reference after unbind then bind

2017-06-03 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > Commit 9520ed8fb841 ("net: dsa: use cpu_switch instead of ds[0]") > replaced the use of dst->ds[0] with dst->cpu_switch since that is > functionally equivalent, however, we can now run into an use after free > scenario after unbinding then rebinding the swi

Re: [PATCH] net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

2017-06-03 Thread Andy Shevchenko
On Sat, Jun 3, 2017 at 7:35 PM, Colin Ian King wrote: > On 03/06/17 16:55, Andy Shevchenko wrote: >> On Fri, Jun 2, 2017 at 5:58 PM, Colin King wrote: >>> The current comparison of entry < 0 will never be true since entry is an >>> unsigned integer. Cast entry to an int to ensure -ve error return

Re: [PATCH] net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

2017-06-03 Thread Julia Lawall
On Sat, 3 Jun 2017, Colin Ian King wrote: > On 03/06/17 16:55, Andy Shevchenko wrote: > > On Fri, Jun 2, 2017 at 5:58 PM, Colin King wrote: > >> The current comparison of entry < 0 will never be true since entry is an > >> unsigned integer. Cast entry to an int to ensure -ve error return values

Re: [PATCH] net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

2017-06-03 Thread Colin Ian King
On 03/06/17 16:55, Andy Shevchenko wrote: > On Fri, Jun 2, 2017 at 5:58 PM, Colin King wrote: >> The current comparison of entry < 0 will never be true since entry is an >> unsigned integer. Cast entry to an int to ensure -ve error return values >> from the call to jumbo_frm are correctly being ca

[PATCH net] net: ping: do not abuse udp_poll()

2017-06-03 Thread Eric Dumazet
From: Eric Dumazet Alexander reported various KASAN messages triggered in recent kernels The problem is that ping sockets should not use udp_poll() in the first place, and recent changes in UDP stack finally exposed this old bug. Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind")

Re: [PATCH] net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

2017-06-03 Thread Andy Shevchenko
On Fri, Jun 2, 2017 at 5:58 PM, Colin King wrote: > The current comparison of entry < 0 will never be true since entry is an > unsigned integer. Cast entry to an int to ensure -ve error return values > from the call to jumbo_frm are correctly being caught. > if (unlikely(is_jumbo) && like

Re: [PATCH] brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain

2017-06-03 Thread Andy Shevchenko
On Fri, Jun 2, 2017 at 9:52 PM, Franky Lin wrote: > On Fri, Jun 2, 2017 at 10:22 AM, Peter S. Housel wrote: >> err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, false, addr, >> glom_skb); >> - if (err) { >> -

Re: [PATCH v2] brcmfmac: Fix glom_skb leak in brcmf_sdiod_recv_chain

2017-06-03 Thread Andy Shevchenko
On Sat, Jun 3, 2017 at 1:29 AM, Peter S. Housel wrote: > An earlier change to this function (3bdae810721b) fixed a leak in the > case of an unsuccessful call to brcmf_sdiod_buffrw(). However, the > glom_skb buffer, used for emulating a scattering read, is never used > or referenced after its conte

Re: net: icmp vs udp_poll race?

2017-06-03 Thread Eric Dumazet
On Fri, Jun 2, 2017 at 10:17 PM, Levin, Alexander (Sasha Levin) wrote: > Hi all, > > On the latest linux-next I'm seeing issues that look like an icmp > socket destruction racing with poll(). It manifests in two ways, first: > > BUG: KASAN: slab-out-of-bounds in skb_queue_empty include/linux/skbuf

[net-next] openvswitch: add macro MODULE_ALIAS_VPORT_TYPE for vport type alias

2017-06-03 Thread Zhang Shengju
Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the declaration of vport type alias, and replace magic numbers with symbolic constants. Signed-off-by: Zhang Shengju --- net/openvswitch/vport-geneve.c | 2 +- net/openvswitch/vport-gre.c| 2 +- net/openvswitch/vport-vxlan.c | 2

[PATCH] net: Update TCP congestion control documentation

2017-06-03 Thread Anmol Sarma
Update tcp.txt to fix mandatory congestion control ops and default CCA selection. Also, fix comment in tcp.h for undo_cwnd. Signed-off-by: Anmol Sarma --- Documentation/networking/tcp.txt | 31 +-- include/net/tcp.h| 2 +- 2 files changed, 14 insertio

Re: loosing netdevices with namespaces and unshare?

2017-06-03 Thread Eric W. Biederman
Cong Wang writes: > On Wed, May 31, 2017 at 11:32 PM, Eric W. Biederman > wrote: >> Cong Wang writes: >>> Network namespace does not special-case the physical devices, >>> it treats them all equally as abstract net devices. >> >> Absolutely not true. >> >> The relevant code is in net/core/dev.c

Re: ath9k_htc - Division by zero in kernel (as well as firmware panic)

2017-06-03 Thread Nathan Royce
On Sat, Jun 3, 2017 at 2:57 AM, Oleksij Rempel wrote: > Hm... this function and file: > linux/drivers/net/wireless/ath/ath9k/common-beacon.c > didn't changed since 2015. So, it should be some thing different. > Can you run > git bisect to find exact patch caused this regression? > That was the fir

Re: ath9k_htc - Division by zero in kernel (as well as firmware panic)

2017-06-03 Thread Oleksij Rempel
Hi, Am 03.06.2017 um 00:02 schrieb Nathan Royce: > ODroid XU4 > > $ uname -a > Linux computer 4.12.0-rc3-dirty #1 SMP Wed May 31 15:02:05 CDT 2017 > armv7l GNU/Linux > > $ lsusb > ... > Bus 001 Device 002: ID 2109:2813 VIA Labs, Inc. > Bus 001 Device 010: ID 0cf3:7015 Qualcomm Atheros Communicat