Re: [PATCH 1/4] net: thunderx: Fix IOMMU translation faults

2017-03-03 Thread Sunil Kovvuri
On Fri, Mar 3, 2017 at 11:26 PM, David Miller wrote: > From: sunil.kovv...@gmail.com > Date: Fri, 3 Mar 2017 16:17:47 +0530 > >> @@ -1643,6 +1650,9 @@ static int nicvf_probe(struct pci_dev *pdev, const >> struct pci_device_id *ent) >> if (!pass1_silicon(nic->pdev)) >> nic->hw

Re: [PATCH net 1/2] net: fix socket refcounting in skb_complete_wifi_ack()

2017-03-03 Thread Soheil Hassas Yeganeh
On Fri, Mar 3, 2017 at 7:01 PM, Eric Dumazet wrote: > TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt > By the time TX completion happens, sk_refcnt might be already 0. > > sock_hold()/sock_put() would then corrupt critical state, like > sk_wmem_alloc. > > Fixes: bf7fa551e0ce ("m

Re: [PATCH net 2/2] net: fix socket refcounting in skb_complete_tx_timestamp()

2017-03-03 Thread Soheil Hassas Yeganeh
On Fri, Mar 3, 2017 at 7:01 PM, Eric Dumazet wrote: > > TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt > By the time TX completion happens, sk_refcnt might be already 0. > > sock_hold()/sock_put() would then corrupt critical state, like > sk_wmem_alloc and lead to leaks or use a

[PATCH net 2/2] net: fix socket refcounting in skb_complete_tx_timestamp()

2017-03-03 Thread Eric Dumazet
TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt By the time TX completion happens, sk_refcnt might be already 0. sock_hold()/sock_put() would then corrupt critical state, like sk_wmem_alloc and lead to leaks or use after free. Fixes: 62bccb8cdb69 ("net-timestamp: Make the clone

[PATCH net 0/2] net: fix possible sock_hold() misuses

2017-03-03 Thread Eric Dumazet
skb_complete_wifi_ack() and skb_complete_tx_timestamp() currently call sock_hold() on sockets that might have transitioned their sk_refcnt to zero already. Eric Dumazet (2): net: fix socket refcounting in skb_complete_wifi_ack() net: fix socket refcounting in skb_complete_tx_timestamp() net/

[PATCH net 1/2] net: fix socket refcounting in skb_complete_wifi_ack()

2017-03-03 Thread Eric Dumazet
TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt By the time TX completion happens, sk_refcnt might be already 0. sock_hold()/sock_put() would then corrupt critical state, like sk_wmem_alloc. Fixes: bf7fa551e0ce ("mac80211: Resolve sk_refcnt/sk_wmem_alloc issue in wifi ack path"

Re: [PATCH net] sctp: change to save MSG_MORE flag into assoc

2017-03-03 Thread Xin Long
On Sat, Mar 4, 2017 at 1:57 AM, Xin Long wrote: > On Sat, Mar 4, 2017 at 12:31 AM, David Laight wrote: >> From: Xin Long >>> Sent: 03 March 2017 15:43 >> ... >>> > It is much more important to get MSG_MORE working 'properly' for SCTP >>> > than for TCP. For TCP an application can always use a lon

Re: [Patch net] strparser: destroy workqueue on module exit

2017-03-03 Thread David Miller
From: Cong Wang Date: Fri, 3 Mar 2017 12:21:14 -0800 > Fixes: 43a0c6751a32 ("strparser: Stream parser for messages") > Cc: Tom Herbert > Signed-off-by: Cong Wang Applied and queued up for -stable, thanks.

Re: [PATCH 0/4] Netfilter fixes for net

2017-03-03 Thread David Miller
From: Pablo Neira Ayuso Date: Fri, 3 Mar 2017 20:22:21 +0100 > The following patchset contains Netfilter fixes for your net tree, > they are: > > 1) Missing check for full sock in ip_route_me_harder(), from >Florian Westphal. > > 2) Incorrect sip helper structure initilization that breaks

[PATCH net] bpf: disable broken write protection on i386

2017-03-03 Thread Daniel Borkmann
Since d2852a224050 ("arch: add ARCH_HAS_SET_MEMORY config") and 9d876e79df6a ("bpf: fix unlocking of jited image when module ronx not set") that uses the former, Fengguang reported random corruptions on his i386 test machine [1]. On i386 there is no JIT available, and since his kernel config doesn'

[PATCH v3 net-next 6/6] MAINTAINERS: Add entry for APM X-Gene SoC Ethernet (v2) driver

2017-03-03 Thread Iyappan Subramanian
This patch adds a MAINTAINERS entry for the ethernet driver for the on-chip ethernet interface which uses a linked list of DMA descriptor architecture (v2) for APM X-Gene SoCs. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar --- MAINTAINERS | 6 ++ 1 file changed, 6 insertio

[PATCH v3 net-next 4/6] drivers: net: xgene-v2: Add base driver

2017-03-03 Thread Iyappan Subramanian
This patch adds, - probe, remove, shutdown - open, close and stats - create and delete ring - request and delete irq Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar --- drivers/net/ethernet/apm/xgene-v2/main.c | 510 +++ 1 file ch

[PATCH v3 net-next 3/6] drivers: net: xgene-v2: Add ethernet hardware configuration

2017-03-03 Thread Iyappan Subramanian
This patch adds functions to configure ethernet hardware. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar --- drivers/net/ethernet/apm/xgene-v2/enet.c | 71 drivers/net/ethernet/apm/xgene-v2/enet.h | 43 +++ 2 files changed, 114 i

[PATCH v3 net-next 1/6] drivers: net: xgene-v2: Add DMA descriptor

2017-03-03 Thread Iyappan Subramanian
This patch adds DMA descriptor setup and interrupt enable/disable functions. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar --- drivers/net/ethernet/apm/xgene-v2/main.h | 74 +++ drivers/net/ethernet/apm/xgene-v2/ring.c | 81 + drivers/net/

[PATCH v3 net-next 2/6] drivers: net: xgene-v2: Add mac configuration

2017-03-03 Thread Iyappan Subramanian
This patch adds functions to configure and control mac. This patch also adds helper functions to get/set registers. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar --- drivers/net/ethernet/apm/xgene-v2/mac.c | 116 drivers/net/ethernet/apm/xgene

[PATCH v3 net-next 0/6] drivers: net: xgene-v2: Add RGMII based 1G driver

2017-03-03 Thread Iyappan Subramanian
This patch set adds support for RGMII based 1GbE hardware which uses a linked list of DMA descriptor architecture (v2) for APM X-Gene SoCs. Signed-off-by: Iyappan Subramanian --- v3: Address review comments from v2 - fix kbuild warnings (this 'if' clause does not guard) v2: Address revie

[PATCH v3 net-next 5/6] drivers: net: xgene-v2: Add transmit and receive

2017-03-03 Thread Iyappan Subramanian
This patch adds, - Transmit - Transmit completion poll - Receive poll - NAPI handler and enables the driver. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar --- drivers/net/ethernet/apm/Kconfig | 1 + drivers/net/ethernet/apm/Makefile | 1

[PATCH net] rxrpc: Call state should be read with READ_ONCE() under some circumstances

2017-03-03 Thread David Howells
The call state may be changed at any time by the data-ready routine in response to received packets, so if the call state is to be read and acted upon several times in a function, READ_ONCE() must be used unless the call state lock is held. Signed-off-by: David Howells --- net/rxrpc/input.c |

[PATCH] net: smsc: smc91c92_cs: use new api ethtool_{get|set}_link_ksettings

2017-03-03 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/smsc/smc91c92_cs.c | 98

[PATCH net] tcp: fix various issues for sockets morphing to listen state

2017-03-03 Thread Eric Dumazet
From: Eric Dumazet Dmitry Vyukov reported a divide by 0 triggered by syzkaller, exploiting tcp_disconnect() path that was never really considered and/or used before syzkaller ;) I was not able to reproduce the bug, but it seems issues here are the three possible actions that assumed they would n

Re: [Bug 194749] New: kernel bonding does not work in a network nameservice in versions above 3.10.0-229.20.1

2017-03-03 Thread Jiri Pirko
Fri, Mar 03, 2017 at 04:19:13PM CET, nicolas.dich...@6wind.com wrote: >Le 02/03/2017 à 21:39, Dan Geist a écrit : >> - On Mar 2, 2017, at 3:11 PM, Cong Wang xiyou.wangc...@gmail.com wrote >> >>> On Thu, Mar 2, 2017 at 10:32 AM, Stephen Hemminger >>> wrote: Begin forwarded messa

Re: net/ipv4: deadlock in ip_ra_control

2017-03-03 Thread Dmitry Vyukov
On Thu, Mar 2, 2017 at 10:40 AM, Dmitry Vyukov wrote: > On Wed, Mar 1, 2017 at 6:18 PM, Cong Wang wrote: >> On Wed, Mar 1, 2017 at 2:44 AM, Dmitry Vyukov wrote: >>> Hello, >>> >>> I've got the following deadlock report while running syzkaller fuzzer >>> on linux-next/51788aebe7cae79cb334ad506413

Re: net/ipv4: division by 0 in tcp_select_window

2017-03-03 Thread Eric Dumazet
On Fri, 2017-03-03 at 10:25 -0800, Eric Dumazet wrote: > On Fri, Mar 3, 2017 at 10:10 AM, Dmitry Vyukov wrote: > > Hello, > > > > The following program triggers division by 0 in tcp_select_window: > > > > https://gist.githubusercontent.com/dvyukov/ef28c0fd2ab57a655508ef7621b12e6c/raw/079011e2a9523

[Patch net] strparser: destroy workqueue on module exit

2017-03-03 Thread Cong Wang
Fixes: 43a0c6751a32 ("strparser: Stream parser for messages") Cc: Tom Herbert Signed-off-by: Cong Wang --- net/strparser/strparser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c index 41adf36..b5c279b 100644 --- a/net/strparser/strpars

Re: [PATCH] selinux: check for address length in selinux_socket_bind()

2017-03-03 Thread Eric Dumazet
On Fri, Mar 3, 2017 at 9:23 AM, Alexander Potapenko wrote: > This happens because bind() unconditionally copies |size| bytes of > |addr| to the kernel, leaving the rest uninitialized. Then > security_socket_bind() reads the IP address bytes, including the > uninitialized ones, to determine the por

[PATCH net v2] xen-netback: fix race condition on XenBus disconnect

2017-03-03 Thread Igor Druzhinin
In some cases during XenBus disconnect event handling and subsequent queue resource release there may be some TX handlers active on other processors. Use RCU in order to synchronize with them. Signed-off-by: Igor Druzhinin --- v2: * Add protection for xenvif_get_ethtool_stats * Additional comme

Re: net/kcm: use-after-free in kcm_wq

2017-03-03 Thread Cong Wang
On Fri, Mar 3, 2017 at 2:11 AM, Dmitry Vyukov wrote: > Also like this one: > > == > BUG: KASAN: use-after-free in atomic_long_read > include/linux/compiler.h:254 [inline] at addr 8800538aba60 > BUG: KASAN: use-after-free in get_wo

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 3:20 PM, Andrey Ryabinin wrote: > > > On 03/02/2017 07:38 PM, Arnd Bergmann wrote: >> When CONFIG_KASAN is enabled, we have several functions that use rather >> large kernel stacks, e.g. >> >> drivers/isdn/hardware/eicon/message.c: In function 'group_optimization': >> driver

[PATCH 1/4] netfilter: use skb_to_full_sk in ip_route_me_harder

2017-03-03 Thread Pablo Neira Ayuso
From: Florian Westphal inet_sk(skb->sk) is illegal in case skb is attached to request socket. Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener") Reported by: Daniel J Blueman Signed-off-by: Florian Westphal Tested-by: Daniel J Blueman Signed-off-by: Pa

[PATCH 0/4] Netfilter fixes for net

2017-03-03 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter fixes for your net tree, they are: 1) Missing check for full sock in ip_route_me_harder(), from Florian Westphal. 2) Incorrect sip helper structure initilization that breaks it when several ports are used, from Christophe Leroy. 3) Fix i

[PATCH 4/4] netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails

2017-03-03 Thread Pablo Neira Ayuso
The underlying nlmsg_multicast() already sets sk->sk_err for us to notify socket overruns, so we should not do anything with this return value. So we just call nfnetlink_set_err() if: 1) We fail to allocate the netlink message. or 2) We don't have enough space in the netlink message to place att

[PATCH 3/4] netfilter: nft_set_rbtree: incorrect assumption on lower interval lookups

2017-03-03 Thread Pablo Neira Ayuso
In case of adjacent ranges, we may indeed see either the high part of the range in first place or the low part of it. Remove this incorrect assumption, let's make sure we annotate the low part of the interval in case of we have adjacent interva intervals so we hit a matching in lookups. Reported-b

[PATCH 2/4] netfilter: nf_conntrack_sip: fix wrong memory initialisation

2017-03-03 Thread Pablo Neira Ayuso
From: Christophe Leroy In commit 82de0be6862cd ("netfilter: Add helper array register/unregister functions"), struct nf_conntrack_helper sip[MAX_PORTS][4] was changed to sip[MAX_PORTS * 4], so the memory init should have been changed to memset(&sip[4 * i], 0, 4 * sizeof(sip[i])); But as the sip[

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-03 Thread David Ahern
On 3/3/17 6:39 AM, Dmitry Vyukov wrote: > I am getting heap out-of-bounds reports in > fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone while running > syzkaller fuzzer on 86292b33d4b79ee03e2f43ea0381ef85f077c760. They all > follow the same pattern: an object of size 216 is allocated from >

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-03 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 8:12 PM, David Ahern wrote: > On 3/3/17 6:39 AM, Dmitry Vyukov wrote: >> I am getting heap out-of-bounds reports in >> fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone while running >> syzkaller fuzzer on 86292b33d4b79ee03e2f43ea0381ef85f077c760. They all >> follow th

Re: net/ipv4: deadlock in ip_ra_control

2017-03-03 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 7:43 PM, Dmitry Vyukov wrote: > On Thu, Mar 2, 2017 at 10:40 AM, Dmitry Vyukov wrote: >> On Wed, Mar 1, 2017 at 6:18 PM, Cong Wang wrote: >>> On Wed, Mar 1, 2017 at 2:44 AM, Dmitry Vyukov wrote: Hello, I've got the following deadlock report while running sy

Re: net/ipv4: division by 0 in tcp_select_window

2017-03-03 Thread Eric Dumazet
On Fri, Mar 3, 2017 at 10:24 AM, Dmitry Vyukov wrote: > On Fri, Mar 3, 2017 at 7:10 PM, Dmitry Vyukov wrote: >> Hello, >> > Wonder if this has been causing other crashes like this one? > > [ cut here ] > kernel BUG at net/ipv4/tcp_output.c:2748! > Call Trace: > > tcp_r

net/ipv4: division by 0 in tcp_select_window

2017-03-03 Thread Dmitry Vyukov
Hello, The following program triggers division by 0 in tcp_select_window: https://gist.githubusercontent.com/dvyukov/ef28c0fd2ab57a655508ef7621b12e6c/raw/079011e2a9523a390b0621cbc1e5d9d5e637fd6d/gistfile1.txt divide error: [#1] SMP KASAN Modules linked in: CPU: 3 PID: 0 Comm: swapper/3 Not

Re: net/ipv4: division by 0 in tcp_select_window

2017-03-03 Thread Eric Dumazet
On Fri, Mar 3, 2017 at 10:10 AM, Dmitry Vyukov wrote: > Hello, > > The following program triggers division by 0 in tcp_select_window: > > https://gist.githubusercontent.com/dvyukov/ef28c0fd2ab57a655508ef7621b12e6c/raw/079011e2a9523a390b0621cbc1e5d9d5e637fd6d/gistfile1.txt Yeah, tcp_disconnect() s

Re: net/ipv4: division by 0 in tcp_select_window

2017-03-03 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 7:10 PM, Dmitry Vyukov wrote: > Hello, > > The following program triggers division by 0 in tcp_select_window: > > https://gist.githubusercontent.com/dvyukov/ef28c0fd2ab57a655508ef7621b12e6c/raw/079011e2a9523a390b0621cbc1e5d9d5e637fd6d/gistfile1.txt > > divide error: [#1

Re: [PATCH net] rxrpc: Fix potential NULL-pointer exception

2017-03-03 Thread David Miller
From: David Howells Date: Thu, 02 Mar 2017 23:26:13 + > Fix a potential NULL-pointer exception in rxrpc_do_sendmsg(). The call > state check that I added should have gone into the else-body of the > if-statement where we actually have a call to check. > > Found by CoverityScan CID#1414316 (

Re: [Bug 194749] New: kernel bonding does not work in a network nameservice in versions above 3.10.0-229.20.1

2017-03-03 Thread Cong Wang
On Fri, Mar 3, 2017 at 8:03 AM, Jiri Pirko wrote: > If that use case exists I believe it is an abuse. Soft devices that are > by definition in upper-lower relationships with other devices should not > move to other namespaces. Prevents all kinds of issues. If you need a > soft device like bridge o

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 3:48 PM, Eric Dumazet wrote: > On Fri, 2017-03-03 at 06:32 -0800, Eric Dumazet wrote: >> On Fri, 2017-03-03 at 15:11 +0100, Dmitry Vyukov wrote: >> > On Mon, Feb 13, 2017 at 11:29 PM, Cong Wang >> > wrote: >> > > On Mon, Feb 13, 2017 at 11:19 AM, Andrey Konovalov >> > > w

Re: [iproute PATCH v3 1/1] color: use "light" colors for dark background

2017-03-03 Thread Stephen Hemminger
On Wed, 1 Mar 2017 21:52:33 +0100 Petr Vorel wrote: > COLORFGBG environment variable is used to detect dark background. > > Idea and a bit of code is borrowed from Vim, thanks. > > Signed-off-by: Petr Vorel Applied and I split one long line.

Re: [PATCH net 0/2] sfc: couple of fixes

2017-03-03 Thread David Miller
From: Edward Cree Date: Fri, 3 Mar 2017 15:20:44 + > First patch addresses a construct that causes sparse to error out. > With that fixed, sparse makes some warnings on ef10.c, second patch > fixes one of them. Series applied, thanks.

Re: pull-request: can 2017-03-03

2017-03-03 Thread David Miller
From: Marc Kleine-Budde Date: Fri, 3 Mar 2017 14:55:31 +0100 > this is a pull request for the upcoming v4.11 release. > > There are two patches by Ethan Zonca for the gs_usb driver, the first one > fixes > the memory used for USB transfers, the second one the coding style. > > The last two pa

Re: [PATCH net] sctp: change to save MSG_MORE flag into assoc

2017-03-03 Thread Xin Long
On Sat, Mar 4, 2017 at 12:31 AM, David Laight wrote: > From: Xin Long >> Sent: 03 March 2017 15:43 > ... >> > It is much more important to get MSG_MORE working 'properly' for SCTP >> > than for TCP. For TCP an application can always use a long send. > >> "long send" ?, you mean bigger data, or kee

Re: [PATCH 1/4] net: thunderx: Fix IOMMU translation faults

2017-03-03 Thread David Miller
From: sunil.kovv...@gmail.com Date: Fri, 3 Mar 2017 16:17:47 +0530 > @@ -1643,6 +1650,9 @@ static int nicvf_probe(struct pci_dev *pdev, const > struct pci_device_id *ent) > if (!pass1_silicon(nic->pdev)) > nic->hw_tso = true; > > + /* Check if we are attached to IOMMU *

Re: [PATCH 1/1] rds: remove unnecessary returned value check

2017-03-03 Thread David Miller
From: Zhu Yanjun Date: Fri, 3 Mar 2017 00:44:26 -0500 > The function rds_trans_register always returns 0. As such, it is not > necessary to check the returned value. > > Cc: Joe Jin > Cc: Junxiao Bi > Signed-off-by: Zhu Yanjun Applied.

[PATCH] selinux: check for address length in selinux_socket_bind()

2017-03-03 Thread Alexander Potapenko
KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of uninitialized memory in packet_bind_spkt(): == BUG: KMSAN: use of unitialized memory inter: 0 CPU: 3 PID: 1074 Comm: packet2 Tainted: GB 4.8.0-rc6+

Re: [PATCH net 0/2] xen-netback: update memory leak fix to avoid BUG

2017-03-03 Thread David Miller
From: Paul Durrant Date: Thu, 2 Mar 2017 12:54:24 + > Commit 9a6cdf52b85e "xen-netback: fix memory leaks on XenBus disconnect" > added missing code to fix a memory leak by calling vfree() in the > appropriate place. > Unfortunately subsequent commit f16f1df65f1c "xen-netback: protect > resour

Re: [PATCH net 0/2] nfp: RX and XDP buffer fixes

2017-03-03 Thread David Miller
From: Jakub Kicinski Date: Thu, 2 Mar 2017 15:26:19 -0800 > Two trivial fixes for code introduced with XDP support. First > one corrects the buffer size we populate a register with. The > register is designed to be used for scatter transfers which > the driver (and most FWs) don't support so

Re: [PATCH net v5 0/2] net: ethernet: bgmac: bug fixes

2017-03-03 Thread David Miller
From: Jon Mason Date: Thu, 2 Mar 2017 17:59:55 -0500 > Bug fixes for bgmac driver Series applied.

Re: [PATCH] selinux: check for address length in selinux_socket_bind()

2017-03-03 Thread Alexander Potapenko
On Fri, Mar 3, 2017 at 6:23 PM, Alexander Potapenko wrote: > KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of > uninitialized memory in packet_bind_spkt(): Should be "in selinux_socket_bind()", will fix in the next patch version. > ==

Re: [net 0/2][pull request] Intel Wired LAN Driver Updates 2017-03-02

2017-03-03 Thread David Miller
From: Jeff Kirsher Date: Thu, 2 Mar 2017 18:24:46 -0800 > This series contains fixes to ixgbe only. Pulled, thanks Jeff.

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-03 Thread Peter Zijlstra
On Fri, Mar 03, 2017 at 03:49:38PM +0100, Peter Zijlstra wrote: > On Fri, Mar 03, 2017 at 09:26:50AM +0100, Christian Borntraeger wrote: > > Right. The main purpose is to read/write _ONCE_. You can assume a somewhat > > atomic access for sizes <= word size. And there are certainly places that > > r

Re: pull-request: can-next 2017-03-03,pull-request: can-next 2017-03-03

2017-03-03 Thread David Miller
Net-next is closed, please resubmit this when the tree is actually openned back up after the merge window. Thank you.

RE: [PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-03 Thread David Laight
From: Andrey Ryabinin > Sent: 03 March 2017 13:50 ... > noinline_iff_kasan might be a better name. noinline_for_kasan gives the > impression > that we always noinline function for the sake of kasan, while > noinline_iff_kasan > clearly indicates that function is noinline only if kasan is used.

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-03 Thread Peter Zijlstra
On Fri, Mar 03, 2017 at 09:26:50AM +0100, Christian Borntraeger wrote: > Right. The main purpose is to read/write _ONCE_. You can assume a somewhat > atomic access for sizes <= word size. And there are certainly places that > rely on that. But the *ONCE thing is mostly used for things where we used

Re: [Bug 194749] New: kernel bonding does not work in a network nameservice in versions above 3.10.0-229.20.1

2017-03-03 Thread Dan Geist
- On Mar 3, 2017, at 11:03 AM, Jiri Pirko j...@resnulli.us wrote: > Fri, Mar 03, 2017 at 04:19:13PM CET, nicolas.dich...@6wind.com wrote: >>Le 02/03/2017 à 21:39, Dan Geist a écrit : >>> - On Mar 2, 2017, at 3:11 PM, Cong Wang xiyou.wangc...@gmail.com wrote >>> On Thu, Mar 2, 2017

VIA velocity hang: how to find cause?

2017-03-03 Thread Udo van den Heuvel
Hello, I noticed at least twice that a VIA velocity interface stops functioning without reason but is revived after and `ifdown eth0; ifup eth0`. No errors are shown in dmesg or /var/log/messages w.r.t. the interface. How to find the root cause? This is with kernel 4.4.48 and .50. Kind regards,

Re: [PATCH 1/1] rds: remove unnecessary returned value check

2017-03-03 Thread Santosh Shilimkar
On 3/2/2017 9:44 PM, Zhu Yanjun wrote: The function rds_trans_register always returns 0. As such, it is not necessary to check the returned value. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun --- Acked-by: Santosh Shilimkar

RE: [PATCH net] sctp: change to save MSG_MORE flag into assoc

2017-03-03 Thread David Laight
From: Xin Long > Sent: 03 March 2017 15:43 ... > > It is much more important to get MSG_MORE working 'properly' for SCTP > > than for TCP. For TCP an application can always use a long send. > "long send" ?, you mean bigger data, or keeping sending? > I didn't get the difference between SCTP and TC

[PATCH 0/4] net: thunderx: Miscellaneous fixes

2017-03-03 Thread sunil . kovvuri
From: Sunil Goutham This patch set fixes multiples issues such as IOMMU translation faults when kernel is booted with IOMMU enabled on host, incorrect MAC ID reading from ACPI tables and IPv6 UDP packet drop due to failure of checksum validation. Sunil Goutham (3): net: thunderx: Fix IOMMU tra

Re: [PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > When CONFIG_KASAN is set, we can run into some code that uses incredible > amounts of kernel stack: > > drivers/staging/dgnc/dgnc_neo.c:1056:1: error: the frame size of 2 bytes > is larger than 2048 bytes [-Werror=frame-larger-than=] > drivers/

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-03 Thread Christian Borntraeger
On 03/02/2017 10:45 PM, Arnd Bergmann wrote: > On Thu, Mar 2, 2017 at 8:00 PM, Christian Borntraeger > wrote: >> On 03/02/2017 06:55 PM, Arnd Bergmann wrote: >>> On Thu, Mar 2, 2017 at 5:51 PM, Christian Borntraeger >>> wrote: On 03/02/2017 05:38 PM, Arnd Bergmann wrote: > > This att

Re: [PATCH 00/26] bring back stack frame warning with KASAN

2017-03-03 Thread Alexander Potapenko
On Thu, Mar 2, 2017 at 5:38 PM, Arnd Bergmann wrote: > It took a long while to get this done, but I'm finally ready > to send the first half of the KASAN stack size patches that > I did in response to the kernelci.org warnings. > > As before, it's worth mentioning that things are generally worse >

Re: [Bug 194749] New: kernel bonding does not work in a network nameservice in versions above 3.10.0-229.20.1

2017-03-03 Thread Nicolas Dichtel
Le 03/03/2017 à 17:03, Jiri Pirko a écrit : > Fri, Mar 03, 2017 at 04:19:13PM CET, nicolas.dich...@6wind.com wrote: >> Le 02/03/2017 à 21:39, Dan Geist a écrit : [snip] NETIF_F_NETNS_LOCAL was introduced for loopback device which is created for each netns, it is not clear why we need to a

Re: Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-03 Thread Diego Viola
On Fri, Mar 3, 2017 at 12:40 PM, Diego Viola wrote: > On Fri, Mar 3, 2017 at 12:37 PM, Diego Viola wrote: >> On Wed, Mar 1, 2017 at 12:47 PM, Diego Viola wrote: >>> On Wed, Mar 1, 2017 at 12:44 PM, Diego Viola wrote: My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend >>>

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Eric Dumazet
On Fri, 2017-03-03 at 07:22 -0800, Eric Dumazet wrote: > On Fri, Mar 3, 2017 at 7:12 AM, Dmitry Vyukov wrote: > > The first bot that picked this up started spewing: > > > > BUG: spinlock recursion on CPU#1, syz-executor2/9452 > > Yes. The bug is not about locking the listener, but protecting fiel

[PATCH net 4/7] bnx2x: fix detection of VLAN filtering feature for VF

2017-03-03 Thread Michal Schmidt
VFs are currently missing the VLAN filtering feature, because we were checking the PF's acquire response before actually performing the acquire. Fix it by setting the feature flag later when we have the PF response. Signed-off-by: Michal Schmidt --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_mai

[PATCH net 2/7] bnx2x: lower verbosity of VF stats debug messages

2017-03-03 Thread Michal Schmidt
When BNX2X_MSG_IOV is enabled, the driver produces too many VF statistics messages. Lower the verbosity of the VF stats messages similarly as in commit 76ca70fabbdaa3 ("bnx2x: [Debug] change verbosity of some prints"). Signed-off-by: Michal Schmidt --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_s

[PATCH net 7/7] bnx2x: add missing configuration of VF VLAN filters

2017-03-03 Thread Michal Schmidt
Configuring VLANs from the VF side had no effect, because the PF ignored filters of type VFPF_VLAN_FILTER in the VF-PF message. Add the missing filter type to configure. Signed-off-by: Michal Schmidt --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 17 + 1 file changed, 17

[PATCH net 1/7] bnx2x: prevent crash when accessing PTP with interface down

2017-03-03 Thread Michal Schmidt
It is possible to crash the kernel by accessing a PTP device while its associated bnx2x interface is down. Before the interface is brought up, the timecounter is not initialized, so accessing it results in NULL dereference. Fix it by checking if the interface is up. Use -ENETDOWN as the error cod

[PATCH net 5/7] bnx2x: do not rollback VF MAC/VLAN filters we did not configure

2017-03-03 Thread Michal Schmidt
On failure to configure a VF MAC/VLAN filter we should not attempt to rollback filters that we failed to configure with -EEXIST. Signed-off-by: Michal Schmidt --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 8 +++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 1 + 2 files chan

[PATCH net 3/7] bnx2x: fix possible overrun of VFPF multicast addresses array

2017-03-03 Thread Michal Schmidt
It is too late to check for the limit of the number of VF multicast addresses after they have already been copied to the req->multicast[] array, possibly overflowing it. Do the check before copying. Also fix the error path to not skip unlocking vf2pf_mutex. Signed-off-by: Michal Schmidt --- dr

[PATCH net 0/7] bnx2x: PTP crash, VF VLAN fixes

2017-03-03 Thread Michal Schmidt
Hello, here are fixes for a crash with PTP, a crash in setting of VF multicast addresses, and non-working VLAN filters configuration from the VF side. Michal Schmidt (7): bnx2x: prevent crash when accessing PTP with interface down bnx2x: lower verbosity of VF stats debug messages bnx2x: fix

[PATCH net 6/7] bnx2x: fix incorrect filter count in an error message

2017-03-03 Thread Michal Schmidt
filters->count is the number of filters we were supposed to configure. There is no reason to increase it by +1 when printing the count in an error message. Signed-off-by: Michal Schmidt --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

RE: [net 2/2] ixgbe: Limit use of 2K buffers on architectures with 256B or larger cache lines

2017-03-03 Thread Duyck, Alexander H
> -Original Message- > From: David Laight [mailto:david.lai...@aculab.com] > Sent: Friday, March 3, 2017 4:25 AM > To: Kirsher, Jeffrey T ; da...@davemloft.net > Cc: Duyck, Alexander H ; > netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com; > jogre...@redhat.com > Subject: RE:

Re: [PATCH net] sctp: change to save MSG_MORE flag into assoc

2017-03-03 Thread Xin Long
On Fri, Mar 3, 2017 at 8:49 PM, David Laight wrote: > From: Xin Long >> Sent: 03 March 2017 06:24 >> David Laight noticed the support for MSG_MORE with datamsg->force_day >> didn't really work as we expected, as the first msg with MSG_MORE set >> would always block the following chunks' dequeuing.

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Eric Dumazet
On Fri, 2017-03-03 at 15:11 +0100, Dmitry Vyukov wrote: > On Mon, Feb 13, 2017 at 11:29 PM, Cong Wang wrote: > > On Mon, Feb 13, 2017 at 11:19 AM, Andrey Konovalov > > wrote: > >> Hi, > >> > >> I've got the following error report while fuzzing the kernel with > >> syzkaller. > >> > >> On commit

Re: Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-03 Thread Diego Viola
On Fri, Mar 3, 2017 at 12:37 PM, Diego Viola wrote: > On Wed, Mar 1, 2017 at 12:47 PM, Diego Viola wrote: >> On Wed, Mar 1, 2017 at 12:44 PM, Diego Viola wrote: >>> My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend >>> unless I rmmod r8169 first. >>> >>> Another workaround is

Re: usb/net/hso: WARNING: ungligned urb->setup_dma

2017-03-03 Thread Stefan Wahren
Hi Baruch, Am 01.03.2017 um 11:54 schrieb Baruch Siach: > Hi Stefan, > > On Tue, Feb 28, 2017 at 07:32:09PM +0100, Stefan Wahren wrote: >>> Baruch Siach hat am 28. Februar 2017 um 19:07 >>> geschrieben: >>> On Tue, Feb 28, 2017 at 05:21:18PM +0100, Stefan Wahren wrote: Am 28.02.2017 um 13:

Re: Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-03 Thread Diego Viola
On Wed, Mar 1, 2017 at 12:47 PM, Diego Viola wrote: > On Wed, Mar 1, 2017 at 12:44 PM, Diego Viola wrote: >> My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend >> unless I rmmod r8169 first. >> >> Another workaround is to do this before suspend: >> >> echo 0 > /sys/power/pm_asy

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 4:22 PM, Andrey Ryabinin wrote: > On 03/03/2017 05:54 PM, Arnd Bergmann wrote: >> On Fri, Mar 3, 2017 at 3:20 PM, Andrey Ryabinin >> wrote: >>> On 03/02/2017 07:38 PM, Arnd Bergmann wrote: >>> >>> This is kinda radical solution. >>> Wouldn't be better to just increase -Wfr

[PATCH net-next RFC 2/4] virtio-net: transmit napi

2017-03-03 Thread Willem de Bruijn
From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission of new packets in ndo_start_xmit. Latency depends o

Re: [Bug 194749] New: kernel bonding does not work in a network nameservice in versions above 3.10.0-229.20.1

2017-03-03 Thread Nicolas Dichtel
Le 02/03/2017 à 21:39, Dan Geist a écrit : > - On Mar 2, 2017, at 3:11 PM, Cong Wang xiyou.wangc...@gmail.com wrote > >> On Thu, Mar 2, 2017 at 10:32 AM, Stephen Hemminger >> wrote: >>> >>> >>> Begin forwarded message: >>> >>> Date: Wed, 01 Mar 2017 21:08:01 + >>> From: bugzilla-dae...@bu

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Eric Dumazet
On Fri, Mar 3, 2017 at 7:12 AM, Dmitry Vyukov wrote: > The first bot that picked this up started spewing: > > BUG: spinlock recursion on CPU#1, syz-executor2/9452 Yes. The bug is not about locking the listener, but protecting fields of struct dccp_request_sock I will provide a patch, once I reac

[PATCH net-next RFC 2/4] virtio-net: transmit napi

2017-03-03 Thread Willem de Bruijn
From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission of new packets in ndo_start_xmit. Latency depends o

[PATCH net 1/2] sfc: avoid max() in array size

2017-03-03 Thread Edward Cree
It confuses sparse, which thinks the size isn't constant. Let's achieve the same thing with a BUILD_BUG_ON, since we know which one should be bigger and don't expect them ever to change. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 10 +- 1 file changed, 5 insertio

[PATCH net 2/2] sfc: fix IPID endianness in TSOv2

2017-03-03 Thread Edward Cree
The value we read from the header is in network byte order, whereas EFX_POPULATE_QWORD_* takes values in host byte order (which it then converts to little-endian, as MCDI is little-endian). Fixes: e9117e5099ea ("sfc: Firmware-Assisted TSO version 2") Signed-off-by: Edward Cree --- drivers/net/

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Andrey Ryabinin
On 03/03/2017 05:54 PM, Arnd Bergmann wrote: > On Fri, Mar 3, 2017 at 3:20 PM, Andrey Ryabinin > wrote: >> >> >> On 03/02/2017 07:38 PM, Arnd Bergmann wrote: >>> When CONFIG_KASAN is enabled, we have several functions that use rather >>> large kernel stacks, e.g. >>> >>> drivers/isdn/hardware/e

[PATCH net 0/2] sfc: couple of fixes

2017-03-03 Thread Edward Cree
First patch addresses a construct that causes sparse to error out. With that fixed, sparse makes some warnings on ef10.c, second patch fixes one of them. Edward Cree (2): sfc: avoid max() in array size sfc: fix IPID endianness in TSOv2 drivers/net/ethernet/sfc/ef10.c | 12 ++-- 1 fi

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Eric Dumazet
On Fri, 2017-03-03 at 16:06 +0100, Dmitry Vyukov wrote: > Something that compiles is definitely better :) > Reapplied. Just to be clear : This is not the proper patch. This only reduces the race. bh_lock_sock() does not prevent a user process from owning the socket. We need another protection,

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Eric Dumazet
On Fri, 2017-03-03 at 06:32 -0800, Eric Dumazet wrote: > On Fri, 2017-03-03 at 15:11 +0100, Dmitry Vyukov wrote: > > On Mon, Feb 13, 2017 at 11:29 PM, Cong Wang > > wrote: > > > On Mon, Feb 13, 2017 at 11:19 AM, Andrey Konovalov > > > wrote: > > >> Hi, > > >> > > >> I've got the following error

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 3:32 PM, Eric Dumazet wrote: >> > On Mon, Feb 13, 2017 at 11:19 AM, Andrey Konovalov >> > wrote: >> >> Hi, >> >> >> >> I've got the following error report while fuzzing the kernel with >> >> syzkaller. >> >> >> >> On commit 926af6273fc683cd98cd0ce7bf0d04a02eed6742. >> >> >

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-03-03 Thread Dmitry Vyukov
On Fri, Mar 3, 2017 at 4:06 PM, Dmitry Vyukov wrote: > On Fri, Mar 3, 2017 at 3:48 PM, Eric Dumazet wrote: >> On Fri, 2017-03-03 at 06:32 -0800, Eric Dumazet wrote: >>> On Fri, 2017-03-03 at 15:11 +0100, Dmitry Vyukov wrote: >>> > On Mon, Feb 13, 2017 at 11:29 PM, Cong Wang >>> > wrote: >>> > >

Re: [PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 3:33 PM, Alexander Potapenko wrote: > On Fri, Mar 3, 2017 at 3:30 PM, Arnd Bergmann wrote: >> On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko >> wrote: >> >> Would KMSAN also force local variables to be non-overlapping the way that >> asan-stack=1 and -fsanitize-addre

net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-03 Thread Dmitry Vyukov
Hello, I am getting heap out-of-bounds reports in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone while running syzkaller fuzzer on 86292b33d4b79ee03e2f43ea0381ef85f077c760. They all follow the same pattern: an object of size 216 is allocated from ip_dst_cache slab, and then accessed at of

Re: [PATCH 26/26] kasan: rework Kconfig settings

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 97d62c2da6c2..27c838c40a36 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -216,10 +216,9 @@ config ENABLE_MUST_CHECK > config FRAME_WARN > int "Warn for stack fram

  1   2   >