Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread Johannes Berg
On Wed, 2017-06-14 at 23:45 +, YUAN Linyu wrote: > > > > But still a few more, I think that you didn't find, e.g. > > in mac80211. > > Yes, I thought you already done in mac80211 So did I, but I also only applied my spatch :) johannes

Re: [RFC] networking: convert many more places to skb_put_zero()

2017-06-14 Thread Johannes Berg
On Thu, 2017-06-15 at 00:23 +, YUAN Linyu wrote: > Hi,  > Indeed, it find more. > Compare with my patch, still lost pattern like below, > 1. sctp and openvswitch > --- a/net/sctp/output.c > +++ b/net/sctp/output.c > @@ -463,7 +463,7 @@ static int sctp_packet_pack(struct sctp_packet > *packet, >

Re: [PATCH v4 10/11] dt-bindings: orion-mdio: document the new xmdio compatible

2017-06-14 Thread Antoine Tenart
Hi Andrew, On Wed, Jun 14, 2017 at 06:35:37PM +0200, Andrew Lunn wrote: > On Wed, Jun 14, 2017 at 05:49:10PM +0200, Antoine Tenart wrote: > > > > The Ethernet controllers of the Marvel Kirkwood, Dove, Orion5x, > > -MV78xx0, Armada 370 and Armada XP have an identical unit that provides > > -an i

[PATCH net-next 0/3] r8152: support new chips

2017-06-14 Thread Hayes Wang
These patches are used to support new chips. Hayes Wang (3): r8152: support new chip 8050 r8152: support RTL8153B r8152: add byte_enable for ocp_read_word function drivers/net/usb/r8152.c | 687 ++-- 1 file changed, 671 insertions(+), 16 deletion

[PATCH net-next 1/3] r8152: support new chip 8050

2017-06-14 Thread Hayes Wang
The settings of the new chip are the same with RTL8152, except that its product ID is 0x8050. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 5a02053..2744405 100644 ---

[PATCH net-next 3/3] r8152: add byte_enable for ocp_read_word function

2017-06-14 Thread Hayes Wang
Add byte_enable for ocp_read_word() to replace reading 4 bytes data with reading the desired 2 bytes data. This is used to avoid the issue which is described in commit b4d99def0938 ("r8152: remove sram_read"). The original method always reads 4 bytes data, and it may have problem when reading the

[PATCH net-next 2/3] r8152: support RTL8153B

2017-06-14 Thread Hayes Wang
This patch supports two new chips for RTL8153B. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 673 ++-- 1 file changed, 658 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2744405..4c197da

[PATCH net-next] nfp: add VLAN filtering support

2017-06-14 Thread Jakub Kicinski
From: Pablo Cascón Add general use per-vNIC mailbox area and use it for VLAN filtering support. Initially proto is hardcoded to 802.1q. Signed-off-by: Pablo Cascón Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 74 +- drivers/net/et

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Greg Kroah-Hartman
On Thu, Jun 15, 2017 at 06:52:21AM +0200, Greg Kroah-Hartman wrote: > On Wed, Jun 14, 2017 at 11:15:38PM +0200, Arnd Bergmann wrote: > > As reported by kernelci, some functions in the VT code use significant > > amounts of kernel stack when local variables get inlined into the caller > > multiple t

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Greg Kroah-Hartman
On Wed, Jun 14, 2017 at 11:15:38PM +0200, Arnd Bergmann wrote: > As reported by kernelci, some functions in the VT code use significant > amounts of kernel stack when local variables get inlined into the caller > multiple times: > > drivers/tty/vt/keyboard.c: In function 'kbd_keycode': > drivers/t

[PATCH 4/5 net-next v2] ibmvnic: Remove VNIC_CLOSING check from pending_scrq

2017-06-14 Thread Thomas Falcon
Fix a kernel panic resulting from data access of a NULL pointer during device close. The pending_scrq routine is meant to determine whether there is a valid sub-CRQ message awaiting processing. When the device is closing, however, there is a possibility that NULL messages can be processed because p

[PATCH 3/5 net-next v2] ibmvnic: Sanitize entire SCRQ buffer on reset

2017-06-14 Thread Thomas Falcon
Fixup a typo so that the entire SCRQ buffer is cleaned. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index d5fbf45..167b47b 100644 -

[PATCH 2/5 net-next v2] ibmvnic: Ensure that TX queues are disabled in __ibmvnic_close

2017-06-14 Thread Thomas Falcon
Use netif_tx_disable to guarantee that TX queues are disabled when __ibmvnic_close is called by the device reset routine. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvn

[PATCH 1/5 net-next v2] ibmvnic: Activate disabled RX buffer pools on reset

2017-06-14 Thread Thomas Falcon
RX buffer pools are disabled while awaiting a device reset if firmware indicates that the resource is closed. This patch fixes a bug where pools were not being subsequently enabled after the device reset, causing the device to become inoperable. Signed-off-by: Thomas Falcon --- drivers/net/et

[PATCH 5/5 net-next v2] ibmvnic: Exit polling routine correctly during adapter reset

2017-06-14 Thread Thomas Falcon
This patch fixes a bug where, in the case of a device reset, the polling routine will never complete, causing napi_disable to sleep indefinitely when attempting to close the device. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 9 ++--- 1 file changed, 6 insertions(+

[PATCH 0/5 net-next v2] ibmvnic: LPM bug fixes

2017-06-14 Thread Thomas Falcon
This series of small patches is meant to resolve a number of bugs, mostly occurring during an ibmvnic driver reset when recovering from a logical partition migration (LPM). The first patch ensures that RX buffer pools are properly activated following an adapter reset by setting the proper flag in

[GIT] Networking

2017-06-14 Thread David Miller
1) The netlink attribute passed in to dev_set_alias() is not necessarily NULL terminated, don't use strlcpy() on it. From Alexander Potapenko. 2) Fix implementation of atomics in arm64 bpf JIT, from Daniel Borkmann. 3) Correct the release of netdevs and driver private data in certain

Re: [PATCH v2] ip6_tunnel: Correct tos value in collect_md mode

2017-06-14 Thread Peter Dawson
On Thu, 15 Jun 2017 10:30:29 +0800 Haishuang Yan wrote: > Same as ip_gre, geneve and vxlan, use key->tos as tos value. > > CC: Peter Dawson > Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on > encapsulated packets”) > Suggested-by: Daniel Borkmann > Signed-off-by: Haishuang Ya

Re: [PATCH 1/5 net-next] ibmvnic: Activate disabled RX buffer pools on reset

2017-06-14 Thread Thomas Falcon
On 06/14/2017 10:42 PM, David Miller wrote: > Please always provide a proper "[PATCH 0/N ...] " header posting > explaining what the patch series is doing, how it is doing it, and why > it is doing it that way. > > I am getting kind of tired asking people for this FWIW... > Sorry, I will send a v2

Re: [net] i40e: Fix a sleep-in-atomic bug

2017-06-14 Thread David Miller
From: Jeff Kirsher Date: Wed, 14 Jun 2017 16:35:31 -0700 > From: Jia-Ju Bai > > The driver may sleep under a spin lock, and the function call path is: > i40e_ndo_set_vf_port_vlan (acquire the lock by spin_lock_bh) > i40e_vsi_remove_pvid > i40e_vlan_stripping_disable > i40e_aq_update

Re: [PATCH 1/5 net-next] ibmvnic: Activate disabled RX buffer pools on reset

2017-06-14 Thread David Miller
Please always provide a proper "[PATCH 0/N ...] " header posting explaining what the patch series is doing, how it is doing it, and why it is doing it that way. I am getting kind of tired asking people for this FWIW...

Investment portfolio

2017-06-14 Thread Hassan Dako
Hello, How are you today? we have the financial capability to finance any investment portfolio as far as is it genuine, all we need is a capable business partner that possesses investment strategies or profitable business information for good turn over within 10-20years. We can provide proof

[PATCH 5/5 net-next] ibmvnic: Exit polling routine correctly during adapter reset

2017-06-14 Thread Thomas Falcon
This patch fixes a bug where, in the case of a device reset, the polling routine will never complete, causing napi_disable to sleep indefinitely when attempting to close the device. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 9 ++--- 1 file changed, 6 insertions(+

[PATCH 4/5 net-next] ibmvnic: Remove VNIC_CLOSING check from pending_scrq

2017-06-14 Thread Thomas Falcon
Fix a kernel panic resulting from data access of a NULL pointer during device close. The pending_scrq routine is meant to determine whether there is a valid sub-CRQ message awaiting processing. When the device is closing, however, there is a possibility that NULL messages can be processed because p

[PATCH 1/5 net-next] ibmvnic: Activate disabled RX buffer pools on reset

2017-06-14 Thread Thomas Falcon
RX buffer pools are disabled while awaiting a device reset if firmware indicates that the resource is closed. This patch fixes a bug where pools were not being subsequently enabled after the device reset, causing the device to become inoperable. Signed-off-by: Thomas Falcon --- drivers/net/et

[PATCH 2/5 net-next] ibmvnic: Ensure that TX queues are disabled in __ibmvnic_close

2017-06-14 Thread Thomas Falcon
Use netif_tx_disable to guarantee that TX queues are disabled when __ibmvnic_close is called by the device reset routine. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvn

[PATCH 3/5 net-next] ibmvnic: Sanitize entire SCRQ buffer on reset

2017-06-14 Thread Thomas Falcon
Fixup a typo so that the entire SCRQ buffer is cleaned. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index d5fbf45..167b47b 100644 -

[PATCH] net: s2io: remove useless variable in fill_rx_buffers

2017-06-14 Thread Gustavo A. R. Silva
Remove useless variable rxd_index and code related. Addresses-Coverity-ID: 1397691 Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/neterion/s2io.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c inde

[PATCH] intel: i40e: virtchnl: fix incorrect variable assignment

2017-06-14 Thread Gustavo A. R. Silva
Fix incorrect variable assignment. Based on line 1511: aq_ret = I40_ERR_PARAM; the correct variable to be used in this instance is aq_ret instead of ret. Also, variable ret is updated at line 1602 just before return, so assigning a value to this variable in this code block is useless. Addresses-Co

[PATCH v2] ip6_tunnel: Correct tos value in collect_md mode

2017-06-14 Thread Haishuang Yan
Same as ip_gre, geneve and vxlan, use key->tos as tos value. CC: Peter Dawson Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets”) Suggested-by: Daniel Borkmann Signed-off-by: Haishuang Yan --- Changes since v2: * Add fixes information * mask key->tos wi

Re: [PATCH iproute2 net-next] ip neigh: allow flush FAILED neighbour entry

2017-06-14 Thread Hangbin Liu
Hi Stephen, On Wed, Jun 14, 2017 at 09:54:50AM -0700, Stephen Hemminger wrote: > On Mon, 5 Jun 2017 16:31:29 +0800 > Hangbin Liu wrote: > > > After upstream commit 5071034e4af7 ('neigh: Really delete an arp/neigh entry > > on "ip neigh delete" or "arp -d"'), we could delete a single FAILED > >

[PATCH v4 2/2] ip6_tunnel: fix potential issue in __ip6_tnl_rcv

2017-06-14 Thread Haishuang Yan
When __ip6_tnl_rcv fails, the tun_dst won't be freed, so call dst_release to free it in error code path. Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") CC: Alexei Starovoitov Tested-by: Zhang Shengju Signed-off-by: Haishuang Yan --- Changes since v4: * Add the the mi

[PATCH v4 1/2] ip_tunnel: fix potential issue in ip_tunnel_rcv

2017-06-14 Thread Haishuang Yan
When ip_tunnel_rcv fails, the tun_dst won't be freed, so call dst_release to free it in error code path. Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") Acked-by: Eric Dumazet Acked-by: Pravin B Shelar Tested-by: Zhang Shengju Signed-off-by: Haishuang Yan --- Change si

June 14, 2017

2017-06-14 Thread Johnson King
Attn, My name is Johnson King, the principal attorney of my law firm., Johnson King & Co. A deceased client Mr. Henry died in 2010 and left a sum little above US$ 28 million in his account here in Unity Bank Plc. Normally banking procedures requires that the bank declares the account forfeitabl

Re: [PATCH] ip6_tunnel: Correct tos value in collect_md mode

2017-06-14 Thread 严海双
> On 14 Jun 2017, at 1:28 PM, Peter Dawson wrote: > > On Wed, 14 Jun 2017 10:54:31 +0800 > 严海双 wrote: > > >>> Changes since v2: >>> * mask key->tos with RT_TOS() suggested by Daniel > > Can you help me understand the rationale for this change? Is there are bug > introduced by dsfield = ip6_

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-14 Thread YUAN Linyu
Hi, Indeed, it find more. Compare with my patch, still lost pattern like below, 1. sctp and openvswitch --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -463,7 +463,7 @@ static int sctp_packet_pack(struct sctp_packet *packet, padding = SCTP_PAD4(chunk->skb->len) - chunk

RE: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Johannes Berg > Sent: Thursday, June 15, 2017 12:32 AM > To: cug...@163.com; netdev@vger.kernel.org > Cc: David S . Miller; YUAN Linyu > Subject: Re: [PATCH net-next 00/11] skb_p

[net] i40e: Fix a sleep-in-atomic bug

2017-06-14 Thread Jeff Kirsher
From: Jia-Ju Bai The driver may sleep under a spin lock, and the function call path is: i40e_ndo_set_vf_port_vlan (acquire the lock by spin_lock_bh) i40e_vsi_remove_pvid i40e_vlan_stripping_disable i40e_aq_update_vsi_params i40e_asq_send_command mutex_lock --> may sl

Re: [PATCH iproute2 master] bpf: provide fallback defs for __NR_bpf when not avail

2017-06-14 Thread Stephen Hemminger
On Thu, 15 Jun 2017 01:01:14 +0200 Daniel Borkmann wrote: > On 06/15/2017 12:56 AM, Stephen Hemminger wrote: > > On Thu, 15 Jun 2017 00:47:15 +0200 > > Daniel Borkmann wrote: > > > >> panji reported that he wasn't able to build iproute2's bpf library > >> due to lack of __NR_bpf in his system

Re: [PATCH v3 net-next 0/4] kernel TLS

2017-06-14 Thread Tom Herbert
On Wed, Jun 14, 2017 at 3:17 PM, Dave Watson wrote: > On 06/14/17 01:54 PM, Tom Herbert wrote: >> On Wed, Jun 14, 2017 at 11:36 AM, Dave Watson wrote: >> > This series adds support for kernel TLS encryption over TCP sockets. >> > A standard TCP socket is converted to a TLS socket using a setsocko

[PATCH net] rxrpc: Fix several cases where a padded len isn't checked in ticket decode

2017-06-14 Thread David Howells
This fixes CVE-2017-7482. When a kerberos 5 ticket is being decoded so that it can be loaded into an rxrpc-type key, there are several places in which the length of a variable-length field is checked to make sure that it's not going to overrun the available data - but the data is padded to the nea

Re: [PATCH iproute2 master] bpf: provide fallback defs for __NR_bpf when not avail

2017-06-14 Thread Daniel Borkmann
On 06/15/2017 12:56 AM, Stephen Hemminger wrote: On Thu, 15 Jun 2017 00:47:15 +0200 Daniel Borkmann wrote: panji reported that he wasn't able to build iproute2's bpf library due to lack of __NR_bpf in his system headers. Providing a fallback definition when __NR_bpf is not available in the sys

Re: [PATCH iproute2 master] bpf: provide fallback defs for __NR_bpf when not avail

2017-06-14 Thread Stephen Hemminger
On Thu, 15 Jun 2017 00:47:15 +0200 Daniel Borkmann wrote: > panji reported that he wasn't able to build iproute2's bpf library > due to lack of __NR_bpf in his system headers. Providing a fallback > definition when __NR_bpf is not available in the system lets the > loader compile just fine, so le

[PATCH iproute2 master] bpf: provide fallback defs for __NR_bpf when not avail

2017-06-14 Thread Daniel Borkmann
panji reported that he wasn't able to build iproute2's bpf library due to lack of __NR_bpf in his system headers. Providing a fallback definition when __NR_bpf is not available in the system lets the loader compile just fine, so lets add them for majority of archs. Reported-by: panji Signed-off-b

[PATCH net-next] sunvnet: restrict advertized checksum offloads to just IP

2017-06-14 Thread Shannon Nelson
As much as we'd like to play well with others, we really aren't handling the checksums on non-IP protocol packets very well. This is easily seen when trying to do TCP over ipv6 - the checksums are garbage. Here we restrict the checksum feature flag to just IP traffic so that we aren't given work

Re: Repeatable inet6_dump_fib crash in stock 4.12.0-rc4+

2017-06-14 Thread David Ahern
On 6/14/17 4:23 PM, Ben Greear wrote: > On 06/13/2017 07:27 PM, David Ahern wrote: > >> Let's try a targeted debug patch. See attached > > I had to change it to pr_err so it would go to our serial console > since the system locked hard on crash, > and that appears to be enough to change the timin

Re: Repeatable inet6_dump_fib crash in stock 4.12.0-rc4+

2017-06-14 Thread Ben Greear
On 06/13/2017 07:27 PM, David Ahern wrote: Let's try a targeted debug patch. See attached I had to change it to pr_err so it would go to our serial console since the system locked hard on crash, and that appears to be enough to change the timing where we can no longer reproduce the problem. T

Re: [PATCH v3 net-next 0/4] kernel TLS

2017-06-14 Thread Dave Watson
On 06/14/17 01:54 PM, Tom Herbert wrote: > On Wed, Jun 14, 2017 at 11:36 AM, Dave Watson wrote: > > This series adds support for kernel TLS encryption over TCP sockets. > > A standard TCP socket is converted to a TLS socket using a setsockopt. > > Only symmetric crypto is done in the kernel, as we

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Samuel Thibault
Arnd Bergmann, on mer. 14 juin 2017 23:56:39 +0200, wrote: > > I however agree that it's a bad idea to inline it in functions where > > it's called so many times (and we're talking about the keyboard anyway). > > > >> -static void puts_queue(struct vc_data *vc, char *cp) > >> +static noinline_if_st

Re: [PATCH v3 net-next 0/4] kernel TLS

2017-06-14 Thread Dave Watson
Hi Hannes, On 06/14/17 10:15 PM, Hannes Frederic Sowa wrote: > one question for this patch set: > > What is the reason for not allowing key updates for the TX path? I was > always loud pointing out the problems with TLSv1.2 renegotiation and > TLSv1.3 key update alerts. This patch set uses encry

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Arnd Bergmann
On Wed, Jun 14, 2017 at 11:28 PM, Samuel Thibault wrote: > Hello, > > Arnd Bergmann, on mer. 14 juin 2017 23:15:38 +0200, wrote: >> As reported by kernelci, some functions in the VT code use significant >> amounts of kernel stack when local variables get inlined into the caller >> multiple times:

Re: [PATCH net-next 0/3] ipmr/ip6mr: add Netlink notifications on cache reports

2017-06-14 Thread Julien Gomes
Hi Nikolay, On 06/14/2017 05:04 AM, Nikolay Aleksandrov wrote: > This has been on our todo list and I'm definitely interested in the > implementation. > A few things that need careful consideration from my POV. First are the > security > implications - this sends rtnl multicast messages but the

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Samuel Thibault
Hello, Arnd Bergmann, on mer. 14 juin 2017 23:15:38 +0200, wrote: > As reported by kernelci, some functions in the VT code use significant > amounts of kernel stack when local variables get inlined into the caller > multiple times: > > drivers/tty/vt/keyboard.c: In function 'kbd_keycode': > drive

[PATCH v2 11/11] kasan: rework Kconfig settings

2017-06-14 Thread Arnd Bergmann
We get a lot of very large stack frames using gcc-7.0.1 with the default -fsanitize-address-use-after-scope --param asan-stack=1 options, which can easily cause an overflow of the kernel stack, e.g. drivers/acpi/nfit/core.c:2686:1: warning: the frame size of 4080 bytes is larger than 2048 bytes [

[PATCH v2 09/11] brcmsmac: split up wlc_phy_workarounds_nphy

2017-06-14 Thread Arnd Bergmann
The stack consumption in this driver is still relatively high, with one remaining warning if the warning level is lowered to 1536 bytes: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: error: the frame size of 1880 bytes is larger than 1536 bytes [-Werror=frame-larger-than=

[PATCH v2 10/11] brcmsmac: reindent split functions

2017-06-14 Thread Arnd Bergmann
In the previous commit I left the indentation alone to help reviewing the patch, this one now runs the three new functions through 'indent -kr -8' with some manual fixups to avoid silliness. No changes other than whitespace are intended here. Signed-off-by: Arnd Bergmann Acked-by: Arend van Spri

[PATCH v2 08/11] brcmsmac: make some local variables 'static const' to reduce stack size

2017-06-14 Thread Arnd Bergmann
With KASAN and a couple of other patches applied, this driver is one of the few remaining ones that actually use more than 2048 bytes of kernel stack: broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy_gainctrl': broadcom/brcm80211/brcmsmac/phy/phy_n.c:16065:1: warning

[PATCH v2 07/11] r820t: mark register functions as noinline_if_stackbloat

2017-06-14 Thread Arnd Bergmann
With KASAN, we get an overly long stack frame due to inlining the register access function: drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7': drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] An earl

[PATCH v2 06/11] dvb-frontends: reduce stack size in i2c access

2017-06-14 Thread Arnd Bergmann
A typical code fragment was copied across many dvb-frontend drivers and causes large stack frames when built with -fsanitize-address-use-after-scope, e.g. drivers/media/dvb-frontends/cxd2841er.c:3225:1: error: the frame size of 3992 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] dri

[PATCH v2 05/11] mtd: cfi: reduce stack size with KASAN

2017-06-14 Thread Arnd Bergmann
When CONFIG_KASAN is used, we consume a lot of extra stack space: drivers/mtd/chips/cfi_cmdset_0020.c: In function 'do_write_buffer': drivers/mtd/chips/cfi_cmdset_0020.c:603:1: error: the frame size of 2184 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] drivers/mtd/chips/cfi_cmdset_

[PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Arnd Bergmann
As reported by kernelci, some functions in the VT code use significant amounts of kernel stack when local variables get inlined into the caller multiple times: drivers/tty/vt/keyboard.c: In function 'kbd_keycode': drivers/tty/vt/keyboard.c:1452:1: error: the frame size of 2240 bytes is larger tha

[PATCH v2 04/11] rocker: mark rocker_tlv_put_* functions as noinline_if_stackbloat

2017-06-14 Thread Arnd Bergmann
Inlining these functions creates lots of stack variables when KASAN is enabled, leading to this warning about potential stack overflow: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_cmd_flow_tbl_add': drivers/net/ethernet/rocker/rocker_ofdpa.c:621:1: error: the frame size of 2752

[PATCH v2 02/11] netlink: mark nla_put_{u8,u16,u32} noinline_if_stackbloat

2017-06-14 Thread Arnd Bergmann
When CONFIG_KASAN is enabled, the "--param asan-stack=1" causes rather large stack frames in some functions. This goes unnoticed normally because CONFIG_FRAME_WARN is disabled with CONFIG_KASAN by default as of commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with KASAN

Re: [PATCH] skbuff: make skb_put_zero() return void

2017-06-14 Thread Joe Perches
On Wed, 2017-06-14 at 22:40 +0200, Johannes Berg wrote: > On Wed, 2017-06-14 at 13:36 -0700, Joe Perches wrote: > > > > Given you are adding a lot of these, it might be better > > to add an exported function that duplicates most of > > skb_put with a memset at the end. > > Yeah, could be done. I'

[PATCH v2 01/11] compiler: introduce noinline_if_stackbloat annotation

2017-06-14 Thread Arnd Bergmann
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/media/i2c/cx25840/cx25840-core.c:4960:1: error: the frame s

[PATCH v2 00/11] bring back stack frame warning with KASAN

2017-06-14 Thread Arnd Bergmann
This is a new version of patches I originally submitted back in March [1], this time reducing the size of the series even further. This minimal set of patches only makes sure that we do get frame size warnings in allmodconfig for x86_64 and arm64 again, even with KASAN enabled. The changes this t

Re: [PATCH net-next 2/3] ipmr: add netlink notifications on igmpmsg cache reports

2017-06-14 Thread Julien Gomes
On 06/14/2017 12:56 AM, Nicolas Dichtel wrote: > Le 13/06/2017 à 19:08, Julien Gomes a écrit : >> Add Netlink notifications on cache reports in ipmr, in addition to the >> existing igmpmsg sent to mroute_sk. >> Send RTM_NEWCACHEREPORT notifications to RTNLGRP_IPV4_MROUTE. >> >> MSGTYPE, VIF_ID, SRC

Re: [PATCH v3 net-next 0/4] kernel TLS

2017-06-14 Thread Tom Herbert
On Wed, Jun 14, 2017 at 11:36 AM, Dave Watson wrote: > This series adds support for kernel TLS encryption over TCP sockets. > A standard TCP socket is converted to a TLS socket using a setsockopt. > Only symmetric crypto is done in the kernel, as well as TLS record > framing. The handshake remain

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

2017-06-14 Thread Pravin Shelar
On Tue, Jun 13, 2017 at 12:00 AM, Zhang Shengju wrote: > Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the > declaration of vport type alias. > > Signed-off-by: Zhang Shengju > --- > net/openvswitch/vport-geneve.c | 2 +- > net/openvswitch/vport-gre.c| 2 +- > net/openvswitch

Re: [PATCH] skbuff: make skb_put_zero() return void

2017-06-14 Thread Johannes Berg
On Wed, 2017-06-14 at 13:36 -0700, Joe Perches wrote: > > Given you are adding a lot of these, it might be better > to add an exported function that duplicates most of > skb_put with a memset at the end. Yeah, could be done. I'm not sure why you'd want to duplicate it rather than call it though?

Re: [PATCH iproute2 2/2] tc: m_tunnel_key: add csum/nocsum option

2017-06-14 Thread Stephen Hemminger
On Wed, 14 Jun 2017 21:30:18 +0200 Jiri Benc wrote: > Allows control of UDP zero checksum. > > Signed-off-by: Jiri Benc > --- > man/man8/tc-tunnel_key.8 | 18 ++ > tc/m_tunnel_key.c| 21 - > 2 files changed, 38 insertions(+), 1 deletion(-) > > diff

Re: [PATCH] skbuff: make skb_put_zero() return void

2017-06-14 Thread Joe Perches
On Wed, 2017-06-14 at 22:17 +0200, Johannes Berg wrote: > From: Johannes Berg > > It's nicer to return void, since then there's no need to > cast to any structures. Currently none of the users have > a cast, but a number of future conversions do. > > Signed-off-by: Johannes Berg > --- > includ

Re: [PATCH iproute2] ip: mroute: Add table output to show command

2017-06-14 Thread Stephen Hemminger
On Wed, 14 Jun 2017 08:08:12 -0400 Donald Sharp wrote: > When the user specifies `table all` or `table 0` to > the `ip mroute show` command we dump the entirety of > the known mroute tables. Without some sort of > divisor to tell us what table we are looking at > the command is useless. > > Add

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-14 Thread Daniel Borkmann
On 06/13/2017 08:56 AM, Shubham Bansal wrote: Hi Daniel, Kees, David, Russel, Any plans to implement above especially BPF_JMP | BPF_CALL in near future? Reason why I'm asking is that i) currently the arm32 cBPF JIT implements all of the cBPF extensions (except SKF_AD_RANDOM and SKF_AD_VLAN_TPID

Re: [PATCH iproute2] link_gre6: really support encaplimit option

2017-06-14 Thread Stephen Hemminger
On Wed, 14 Jun 2017 18:45:42 +0200 Nicolas Dichtel wrote: > This option is documented in gre6 help, but was not supported. > > Fixes: af89576d7a8c ("iproute2: GRE over IPv6 tunnel support.") > Signed-off-by: Nicolas Dichtel Sure applied.

[RFC] networking: convert many more places to skb_put_zero()

2017-06-14 Thread Johannes Berg
From: Johannes Berg There were many places that my previous spatch didn't find, as pointed out by yuan linyu in various patches. The following spatch found many more and also removes the now unnecessary casts: @@ identifier p, p2; expression len; expression skb; type t, t2;

[PATCH] skbuff: make skb_put_zero() return void

2017-06-14 Thread Johannes Berg
From: Johannes Berg It's nicer to return void, since then there's no need to cast to any structures. Currently none of the users have a cast, but a number of future conversions do. Signed-off-by: Johannes Berg --- include/linux/skbuff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH v3 net-next 0/4] kernel TLS

2017-06-14 Thread Hannes Frederic Sowa
Hello Dave, On Wed, Jun 14, 2017, at 21:47, David Miller wrote: > From: Dave Watson > Date: Wed, 14 Jun 2017 11:36:54 -0700 > > > This series adds support for kernel TLS encryption over TCP sockets. > > A standard TCP socket is converted to a TLS socket using a setsockopt. > > Only symmetric cry

Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread David Miller
From: Johannes Berg Date: Wed, 14 Jun 2017 22:11:54 +0200 > On Wed, 2017-06-14 at 15:38 -0400, David Miller wrote: > >> What do you think about Stephen Hemminger's feedback to make >> skb_put_zero() return "void *".  It will avoid a lot of casts and >> make the conversions look nicer. > > I thi

Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread Johannes Berg
On Wed, 2017-06-14 at 15:38 -0400, David Miller wrote: > What do you think about Stephen Hemminger's feedback to make > skb_put_zero() return "void *".  It will avoid a lot of casts and > make the conversions look nicer. I think it's a good idea. I can send a patch, and remove some casts where th

Re: [patch iproute2 v2 repost 2/3] tc: actions: add helpers to parse and print control actions

2017-06-14 Thread Jiri Pirko
Wed, Jun 14, 2017 at 09:28:24PM CEST, jb...@redhat.com wrote: >On Wed, 14 Jun 2017 21:18:50 +0200, Jiri Pirko wrote: >> Isn't it fixed by: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/commit/?h=net-next&id=18f05d06016d9492c87fd105d831de0d6d858f43 >> >> ? > >Doesn'

Re: [PATCH net-next 01/11] ipv6: skb_put_zero() used to optimize code

2017-06-14 Thread Johannes Berg
On Wed, 2017-06-14 at 12:14 -0700, Stephen Hemminger wrote: > > > I just copied it from skb_put() - you could ask the same there? :) > > My taste is to  have less casts. Never understood why so many skb_ > functions returned char *, probably a leftover from older Unix style. I agree, for many of

Re: [PATCH v3 net-next 0/4] kernel TLS

2017-06-14 Thread David Miller
From: Dave Watson Date: Wed, 14 Jun 2017 11:36:54 -0700 > This series adds support for kernel TLS encryption over TCP sockets. > A standard TCP socket is converted to a TLS socket using a setsockopt. > Only symmetric crypto is done in the kernel, as well as TLS record > framing. The handshake re

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

2017-06-14 Thread David Miller
From: Doug Ledford Date: Wed, 14 Jun 2017 15:30:13 -0400 > On Thu, 2017-05-25 at 12:02 -0400, David Miller wrote: >> From: Saeed Mahameed >> Date: Tue, 23 May 2017 14:43:58 +0300 >> >> > Hi Dave and Doug, >> >  >> > This series introduces some small updates and FPGA support to the >> mlx5 >> >

Re: [PATCH net-next] rxrpc: Cache the congestion window setting

2017-06-14 Thread David Miller
From: David Howells Date: Wed, 14 Jun 2017 17:56:50 +0100 > Cache the congestion window setting that was determined during a call's > transmission phase when it finishes so that it can be used by the next call > to the same peer, thereby shortcutting the slow-start algorithm. > > The value is st

Re: [PATCH net-next] liquidio: fix VF driver off-by-one bug when setting ethtool -C ethX rx-frames

2017-06-14 Thread David Miller
From: Felix Manlunas Date: Wed, 14 Jun 2017 09:11:31 -0700 > From: Weilin Chang > > Signed-off-by: Weilin Chang > Signed-off-by: Derek Chickles > Signed-off-by: Felix Manlunas Applied.

Re: [PATCH] batman-adv: Remove unnecessary length qualifier in %14pM

2017-06-14 Thread Sven Eckelmann
On Mittwoch, 14. Juni 2017 02:33:52 CEST Joe Perches wrote: > It's misleading and unnecessary. > > Signed-off-by: Joe Perches > --- > net/batman-adv/distributed-arp-table.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) The patch was applied and is currently queued up as 454ea1866ef45

Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread David Miller
From: Johannes Berg Date: Wed, 14 Jun 2017 18:31:48 +0200 > On Wed, 2017-06-14 at 18:29 +0200, Johannes Berg wrote: >> On Wed, 2017-06-14 at 23:00 +0800, yuan linyu wrote: >> >> > sorry, I do them by hand.  >> >> oh, ok. >> >> This seems to work: >> >> @@ >> identifier p; >> expression len; >

Re: [PATCH 0/3] wext: fix an ancient bug

2017-06-14 Thread David Miller
From: Johannes Berg Date: Wed, 14 Jun 2017 13:55:20 +0200 > Robert O'Callahan reported that since struct iwreq is smaller than > struct ifreq, if it happens to land at the end of a mapped section > userspace will erroneously get -EFAULT. > > Bug report is https://bugzilla.kernel.org/show_bug.cgi

[PATCH 0/2] Fix OPA_VNIC issues with debug kernel

2017-06-14 Thread Vishwanathapura, Niranjana
Hi Doug, Here are couple OPA_VNIC bug fixes. As OPA_VNIC is alredy included for 4.12, it would be great to get them into the RC release. Thanks, Niranjana Vishwanathapura, Niranjana (2): IB/opa_vnic: Use GFP_ATOMIC while sending trap IB/opa_vnic: Use spinlock instead of mutex for stats_lock

Re: [PATCH net] net: don't global ICMP rate limit packets originating from loopback

2017-06-14 Thread David Miller
From: Jesper Dangaard Brouer Date: Wed, 14 Jun 2017 13:27:37 +0200 > Florian Weimer seems to have a glibc test-case which requires that > loopback interfaces does not get ICMP ratelimited. This was broken by > commit c0303efeab73 ("net: reduce cycles spend on ICMP replies that > gets rate limite

Re: [PATCH net-next] net/mlxfw: fix a NULL dereference

2017-06-14 Thread David Miller
From: Dan Carpenter Date: Wed, 14 Jun 2017 13:41:52 +0300 > If we hit this error path we end up returning ERR_PTR(0) which is NULL. > The caller is not expecting that so it results in a NULL dereference. > > Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash > process") > Si

Re: [PATCH net] net/act_pedit: fix an error code

2017-06-14 Thread David Miller
From: Dan Carpenter Date: Wed, 14 Jun 2017 13:29:31 +0300 > I'm reviewing static checker warnings where we do ERR_PTR(0), which is > the same as NULL. I'm pretty sure we intended to return ERR_PTR(-EINVAL) > here. Sometimes these bugs lead to a NULL dereference but I don't > immediately see tha

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

2017-06-14 Thread Doug Ledford
On Thu, 2017-05-25 at 12:02 -0400, David Miller wrote: > From: Saeed Mahameed > Date: Tue, 23 May 2017 14:43:58 +0300 > > > Hi Dave and Doug, > >  > > This series introduces some small updates and FPGA support to the > mlx5 > > core/ethernet and IB drivers. > >  > > For more details please see be

[PATCH iproute2 2/2] tc: m_tunnel_key: add csum/nocsum option

2017-06-14 Thread Jiri Benc
Allows control of UDP zero checksum. Signed-off-by: Jiri Benc --- man/man8/tc-tunnel_key.8 | 18 ++ tc/m_tunnel_key.c| 21 - 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/man/man8/tc-tunnel_key.8 b/man/man8/tc-tunnel_key.8 index 2e5697

[PATCH iproute2 1/2] tc: m_tunnel_key: reformat the usage text

2017-06-14 Thread Jiri Benc
Adding new tunnel key fields would cause the usage line overflow 80 chars. Make the usage text similar to other commands. Signed-off-by: Jiri Benc --- tc/m_tunnel_key.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c index fb418a76

Re: [patch iproute2 v2 repost 2/3] tc: actions: add helpers to parse and print control actions

2017-06-14 Thread Jiri Benc
On Wed, 14 Jun 2017 21:18:50 +0200, Jiri Pirko wrote: > Isn't it fixed by: > > https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/commit/?h=net-next&id=18f05d06016d9492c87fd105d831de0d6d858f43 > > ? Doesn't seem so. The current net-next branch with this commit included fails

Re: [PATCH net-next] net: use skb_unref() in napi_consume_skb()

2017-06-14 Thread David Miller
From: Paolo Abeni Date: Wed, 14 Jun 2017 11:48:48 +0200 > The commit 83ada39bb79d ("net: factor out a helper to decrement the > skb refcount") provided and used a helper for decrementing skb usage, > but I missed at least a spot for it. > > This change remove some more duplicated code reusing sk

[PATCH net-next 1/2] net: sched: act_tunnel_key: request UDP checksum by default

2017-06-14 Thread Jiri Benc
There's currently no way to request (outer) UDP checksum with act_tunnel_key. This is problem especially for IPv6. Right now, tunnel_key action with IPv6 does not work without going through hassles: both sides have to have udp6zerocsumrx configured on the tunnel interface. This is obviously not a g

[PATCH net-next 0/2] net: sched: act_tunnel_key: UDP checksums

2017-06-14 Thread Jiri Benc
Currently, the tunnel_key tc action does not set TUNNEL_CSUM, thus transmitting packets with zero UDP checksum. This is inconsistent with how we treat non-lwt UDP tunnels where the default is to fill in the UDP checksum. Non-zero UDP checksum is the better default anyway for various reasons previou

  1   2   3   >