Re: [PATCH 2/2] mlxsw: spectrum_router: avoid potential uninitialized data usage

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Ido Schimmel wrote: > BTW, which flags did you pass to generate this error? I can only > reproduce this with EXTRA_CFLAGS="-Wmaybe-uninitialized -Werror", but > for some reason EXTRA_CFLAGS="-Wall -Werror" is silent. Any idea why? I > would like to add this to my git ho

Re: [PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-09-30 Thread Arnd Bergmann
On Saturday 01 October 2016, David Howells wrote: > commit 35510eefc29e2757c1ac46218cded2e505093fc2 > Author: David Howells > Date: Sat Oct 1 00:35:15 2016 +0100 > > rxrpc: Split rxrpc_send_call_packet() > > Split rxrpc_send_data_packet() to separate ACK generation (which is more >

Re: [PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-09-30 Thread David Howells
Something like the attached. David --- commit 35510eefc29e2757c1ac46218cded2e505093fc2 Author: David Howells Date: Sat Oct 1 00:35:15 2016 +0100 rxrpc: Split rxrpc_send_call_packet() Split rxrpc_send_data_packet() to separate ACK generation (which is more complicated) from ABO

Re: [PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-09-30 Thread David Howells
Arnd Bergmann wrote: > A number of reworks went into rxrpc_send_call_packet() recently, which > introduced another warning when built with -Wmaybe-uninitialized: > > In file included from ../net/rxrpc/output.c:20:0: > net/rxrpc/output.c: In function 'rxrpc_send_call_packet': > net/rxrpc/ar-inter

Re: [PATCH v2 3/3] net: make net namespace sysctls belong to container's owner

2016-09-30 Thread Dmitry Torokhov
On Fri, Sep 30, 2016 at 01:21:27AM -0400, David Miller wrote: > From: Dmitry Torokhov > Date: Thu, 29 Sep 2016 08:46:05 -0700 > > > Hi David, > > > > On Wed, Aug 10, 2016 at 2:36 PM, Dmitry Torokhov > > wrote: > >> If net namespace is attached to a user namespace let's make container's > >> roo

[PATCH] net: Use ns_capable_noaudit() when determining net sysctl permissions

2016-09-30 Thread Dmitry Torokhov
From: Tyler Hicks The capability check should not be audited since it is only being used to determine the inode permissions. A failed check does not indicate a violation of security policy but, when an LSM is enabled, a denial audit message was being generated. The denial audit message caused co

Re: [ovs-dev] [PATCH/RFC 00/12] Programming Open vSwitch (-like) flows into hardware using SwitchDev

2016-09-30 Thread pravin shelar
On Thu, Sep 29, 2016 at 1:09 AM, Simon Horman wrote: > Hi Or, > > On Wed, Sep 28, 2016 at 04:54:40PM +0300, Or Gerlitz wrote: >> On Wed, Sep 28, 2016 at 3:42 PM, Simon Horman >> wrote: >> >> > A different approach, not implemented by this patch-set, is for user-space >> > to program flows into ha

[PATCH] net: mvmdio: do not clk_disable_unprepare() NULL clock

2016-09-30 Thread Alexey Khoroshilov
There is no need to clk_disable_unprepare(dev->clk) before it was initialized. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/ethernet/marvell/mvmdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH net-next 2/7] rxrpc: Switch to Congestion Avoidance mode at cwnd==ssthresh

2016-09-30 Thread David Howells
Switch to Congestion Avoidance mode at cwnd == ssthresh rather than relying on cwnd getting incremented beyond ssthresh and the window size, the mode being shifted and then cwnd being corrected. We need to make sure we switch into CA mode so that we stop marking every packet for ACK. Signed-off-b

[PATCH net-next 5/7] rxrpc: Remove error from struct rxrpc_skb_priv as it is unused

2016-09-30 Thread David Howells
Remove error from struct rxrpc_skb_priv as it is no longer used. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |1 - 1 file changed, 1 deletion(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index fd64a2bd1072..141c1458e719 100644 --- a/net/rxrpc/ar-internal.h

[PATCH net-next 0/7] rxrpc: More fixes and adjustments

2016-09-30 Thread David Howells
s.git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160930 David --- David Howells (7): rxrpc: Actually display the tx_data trace retransmission note rxrpc: Switch to Congestion Avoidance mode at

[PATCH net-next 1/7] rxrpc: Actually display the tx_data trace retransmission note

2016-09-30 Thread David Howells
Actually display in the tx_data trace the retransmission note added in a previous patch. Signed-off-by: David Howells --- include/trace/events/rxrpc.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index 8ba8d

[PATCH net-next 4/7] rxrpc: The offset field in struct rxrpc_skb_priv is unnecessary

2016-09-30 Thread David Howells
The offset field in struct rxrpc_skb_priv is unnecessary as the value can always be calculated. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |1 - net/rxrpc/conn_event.c |3 ++- net/rxrpc/input.c | 23 --- net/rxrpc/local_event.c |3 ++- net/

[PATCH net-next 7/7] rxrpc: Fix the call timer handling

2016-09-30 Thread David Howells
The call timer's concept of a call timeout (of which there are three) that is inactive is that it is the timeout has the same expiration time as the call expiration timeout (the expiration timer is never inactive). However, I'm not resetting the timeouts when they expire, leading to repeated proce

[PATCH net-next 6/7] rxrpc: Keep the call timeouts as ktimes rather than jiffies

2016-09-30 Thread David Howells
Keep that call timeouts as ktimes rather than jiffies so that they can be expressed as functions of RTT. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 25 +++--- net/rxrpc/ar-internal.h |8 ++--- net/rxrpc/call_event.c | 73 ++

[PATCH net-next 3/7] rxrpc: Reduce ssthresh to peer's receive window

2016-09-30 Thread David Howells
When we receive an ACK from the peer that tells us what the peer's receive window (rwind) is, we should reduce ssthresh to rwind if rwind is smaller than ssthresh. Signed-off-by: David Howells --- net/rxrpc/input.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/net/rxrpc/input.c b/net

Re: [PATCH 0/7] ethtool: misc fixes for Coverity issues

2016-09-30 Thread Greg
On Fri, 2016-09-30 at 15:56 -0400, John W. Linville wrote: > I requested a Coverity scan of the current ethtool sources. There > weren't many issues identified, but it was non-zero. > > Most/all of the resource leak issues can be explained away as > unimportant due to the fact that ethtool invocat

Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Or Gerlitz
On Fri, Sep 30, 2016 at 7:13 PM, Arnd Bergmann wrote: > With the newly added support for IFLA_VF_VLAN_LIST netlink messages, > we get a warning about potential uninitialized variable use in > the parsing of the user input when enabling the -Wmaybe-uninitialized > warning: > > net/core/rtnetlink.c:

[PATCH 3/7] ethtool: plug resource leaks of defs and features in do_gfeatures

2016-09-30 Thread John W. Linville
Coverity issues: 1363120, 1363121 Fixes: 6042804cf6ec ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES") Signed-off-by: John W. Linville --- ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethtool.c b/ethtool.c index 0885a61097ad..09486615a5bb 100644 --- a/ethtool.c +++ b/eth

[PATCH 2/7] ethtool: avoid resource leak of strings in do_gprivflags

2016-09-30 Thread John W. Linville
Coverity issue: 1363119 Fixes: e1ee596326ae ("Add support for querying and setting private flags") Signed-off-by: John W. Linville --- ethtool.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ethtool.c b/ethtool.c index aa3ef5ed2f75..0885a61097ad 100644 -

[PATCH 5/7] ethtool: fix leakage of efeatures resources in do_sfeatures

2016-09-30 Thread John W. Linville
Coverity issue: 1363122 Fixes: 6042804cf6ecc ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES") Signed-off-by: John W. Linville --- ethtool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethtool.c b/ethtool.c index 2fd3393ca5f6..840a5da157a9 100644 --- a/ethtool.c +++ b/ethtool.c @@

[PATCH 4/7] ethtool: fix leakage of defs resources in do_sfeatures

2016-09-30 Thread John W. Linville
Coverity issue: 1363123 Fixes: 6042804cf6ecc ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES") Signed-off-by: John W. Linville --- ethtool.c | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/ethtool.c b/ethtool.c index 09486615a5b

[PATCH 1/7] ethtool: avoid NULL pointer dereference in do_permaddr

2016-09-30 Thread John W. Linville
Coverity issue: 1363118 Fixes: fef1c4a19703 ("ethtool: add get permanent address option") Signed-off-by: John W. Linville --- ethtool.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ethtool.c b/ethtool.c index 6287b559c699..aa3ef5ed2f75 100644 --- a/ethtool.c +++ b/ethtool.c @@ -3941,

[PATCH 6/7] ethtool: fix leakage of strings resources in do_sprivflags

2016-09-30 Thread John W. Linville
Coverity issue: 1363124 Fixes: e1ee596326ae ("Add support for querying and setting private flags") Signed-off-by: John W. Linville --- ethtool.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ethtool.c b/ethtool.c index 840a5da157a9..406cfd2f95a5 100644

[PATCH 0/7] ethtool: misc fixes for Coverity issues

2016-09-30 Thread John W. Linville
I requested a Coverity scan of the current ethtool sources. There weren't many issues identified, but it was non-zero. Most/all of the resource leak issues can be explained away as unimportant due to the fact that ethtool invocations are short-term processes. Nevertheless, I prefer to have those i

[PATCH 7/7] ethtool: fix leakage of strings resources in get_feature_defs

2016-09-30 Thread John W. Linville
Coverity issue: 1363125 Fixes: 6042804cf6ec ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES") Signed-off-by: John W. Linville --- ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ethtool.c b/ethtool.c index 406cfd2f95a5..5b83a0041a95 100644 --- a/ethtool.c +++

Re: UDP wierdness around skb_copy_and_csum_datagram_msg()

2016-09-30 Thread Christian Lamparter
On Friday, September 30, 2016 10:35:25 AM CEST Jay Smith wrote: > Christian Lamparter writes: > > On Wednesday, September 28, 2016 7:20:39 PM CEST Jay Smith wrote: > >> Actually, on a little more searching of this list's archives, I think > >> that this discussion: https://patchwork.kernel.org/pat

Re: [PATCH 1/3] netfilter: nf_tables: avoid uninitialized variable warning

2016-09-30 Thread Pablo Neira Ayuso
On Fri, Sep 30, 2016 at 07:47:49PM +0200, Pablo Neira Ayuso wrote: > On Fri, Sep 30, 2016 at 06:05:34PM +0200, Arnd Bergmann wrote: > > The newly added nft_range_eval() function handles the two possible > > nft range operations, but as the compiler warning points out, > > any unexpected value would

Re: [PATCH net-next v2 3/3] openvswitch: use mpls_hdr

2016-09-30 Thread pravin shelar
On Fri, Sep 30, 2016 at 10:08 AM, Jiri Benc wrote: > skb_mpls_header is equivalent to mpls_hdr now. Use the existing helper > instead. > > Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar

Re: [PATCH net-next v2 2/3] mpls: move mpls_hdr to a common location

2016-09-30 Thread pravin shelar
On Fri, Sep 30, 2016 at 10:51 AM, Jiri Benc wrote: > On Fri, 30 Sep 2016 10:43:42 -0700, pravin shelar wrote: >> There is already struct mpls_label defined in uapi mpls header file. >> Is there reason for not using it here? > > I think this should be unified as well. But it's for a different patch

Re: [PATCH nf-next v4 1/2] netfilter: Fix potential null pointer dereference

2016-09-30 Thread Pablo Neira Ayuso
On Wed, Sep 28, 2016 at 11:35:14AM -0400, Aaron Conole wrote: > It's possible for nf_hook_entry_head to return NULL. If two > nf_unregister_net_hook calls happen simultaneously with a single hook > entry in the list, both will enter the nf_hook_mutex critical section. > The first will successfully

Re: [PATCH 2/2] mlxsw: spectrum_router: avoid potential uninitialized data usage

2016-09-30 Thread Ido Schimmel
On Fri, Sep 30, 2016 at 06:17:10PM +0200, Arnd Bergmann wrote: > If fi->fib_nhs is zero, the router interface pointer is uninitialized, as > shown by > this warning: > > drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function > 'mlxsw_sp_router_fib_event': > drivers/net/ethernet/mella

Re: [PATCH net-next v3] netfilter: xt_hashlimit: Fix link error in 32bit arch because of 64bit division

2016-09-30 Thread Vishwanath Pai
On 09/30/2016 01:46 PM, Pablo Neira Ayuso wrote: > On Thu, Sep 29, 2016 at 01:39:50PM -0400, Vishwanath Pai wrote: >> v2: >> Remove unnecessary div64_u64 around constants >> >> v3: >> remove backslashes >> >> -- >> >> Fix link error in 32bit arch because of 64bit division >> >> Division of 64bit in

Re: [PATCH net-next v2 2/3] mpls: move mpls_hdr to a common location

2016-09-30 Thread Jiri Benc
On Fri, 30 Sep 2016 10:43:42 -0700, pravin shelar wrote: > There is already struct mpls_label defined in uapi mpls header file. > Is there reason for not using it here? I think this should be unified as well. But it's for a different patch not related to this patchset. This patch just moves the ex

Re: [PATCH 1/3] netfilter: nf_tables: avoid uninitialized variable warning

2016-09-30 Thread Pablo Neira Ayuso
On Fri, Sep 30, 2016 at 06:05:34PM +0200, Arnd Bergmann wrote: > The newly added nft_range_eval() function handles the two possible > nft range operations, but as the compiler warning points out, > any unexpected value would lead to the 'mismatch' variable being > used without being initialized: >

Re: [PATCH net-next v3] netfilter: xt_hashlimit: Fix link error in 32bit arch because of 64bit division

2016-09-30 Thread Pablo Neira Ayuso
On Thu, Sep 29, 2016 at 01:39:50PM -0400, Vishwanath Pai wrote: > v2: > Remove unnecessary div64_u64 around constants > > v3: > remove backslashes > > -- > > Fix link error in 32bit arch because of 64bit division > > Division of 64bit integers will cause linker error undefined reference > to `_

Re: [PATCH net-next v2 2/3] mpls: move mpls_hdr to a common location

2016-09-30 Thread pravin shelar
On Fri, Sep 30, 2016 at 10:08 AM, Jiri Benc wrote: > This will be also used by openvswitch. > > Signed-off-by: Jiri Benc > --- > v2: new in v2 > --- > include/net/mpls.h | 9 + > net/mpls/internal.h | 10 +- > 2 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/i

Re: [PATCH nf-next v4 2/2] nf_set_hooks_head: accommodate different kconfig

2016-09-30 Thread Pablo Neira Ayuso
On Wed, Sep 28, 2016 at 11:35:15AM -0400, Aaron Conole wrote: > When CONFIG_NETFILTER_INGRESS is unset (or no), we need to handle > the request for registration properly by dropping the hook. This > releases the entry during the set. Also applied. I have renamed the subject to: netfilte

Re: [PATCH 3/3] netfilter: xt_hashlimit: uses div_u64 for division

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Eric Dumazet wrote: > On Fri, 2016-09-30 at 18:05 +0200, Arnd Bergmann wrote: > > net/netfilter/xt_hashlimit.c | 17 ++--- > > 1 file changed, 10 insertions(+), 7 deletions(-) > > > > diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c

Re: UDP wierdness around skb_copy_and_csum_datagram_msg()

2016-09-30 Thread Jay Smith
Christian Lamparter writes: > On Wednesday, September 28, 2016 7:20:39 PM CEST Jay Smith wrote: >> Actually, on a little more searching of this list's archives, I think >> that this discussion: https://patchwork.kernel.org/patch/9260733/ is >> about exactly the same issue I've found, except from

Re: [PATCH 3/3] netfilter: xt_hashlimit: uses div_u64 for division

2016-09-30 Thread Vishwanath Pai
On 09/30/2016 12:38 PM, Eric Dumazet wrote: > On Fri, 2016-09-30 at 18:05 +0200, Arnd Bergmann wrote: >> The newly added support for high-resolution pps rates introduced multiple >> 64-bit >> division operations in one function, which fails on all 32-bit architectures: >> >> net/netfilter/xt_hashl

Re: [PATCH net-next v2 2/3] mpls: move mpls_hdr to a common location

2016-09-30 Thread David Ahern
On 9/30/16 11:08 AM, Jiri Benc wrote: > This will be also used by openvswitch. > > Signed-off-by: Jiri Benc > --- > v2: new in v2 > --- > include/net/mpls.h | 9 + > net/mpls/internal.h | 10 +- > 2 files changed, 10 insertions(+), 9 deletions(-) > Acked-by: David Ahern

[PATCH net-next v2 3/3] openvswitch: use mpls_hdr

2016-09-30 Thread Jiri Benc
skb_mpls_header is equivalent to mpls_hdr now. Use the existing helper instead. Signed-off-by: Jiri Benc --- v2: using the existing mpls_hdr instead of skb_network_header --- include/net/mpls.h| 12 net/openvswitch/actions.c | 24 2 files changed, 12

[PATCH net-next v2 1/3] openvswitch: mpls: set network header correctly on key extract

2016-09-30 Thread Jiri Benc
After the 48d2ab609b6b ("net: mpls: Fixups for GSO"), MPLS handling in openvswitch was changed to have network header pointing to the start of the MPLS headers and inner_network_header pointing after the MPLS headers. However, key_extract was missed by the mentioned commit, causing incorrect heade

[PATCH net-next v2 0/3] openvswitch: mpls fix and clean up

2016-09-30 Thread Jiri Benc
Convert to the new mpls skb layout the last remaining place in openvswitch, forgotten on the mpls GSO rework. The GSO rework also allows for some cleanup in the third patch. Jiri Benc (3): openvswitch: mpls: set network header correctly on key extract mpls: move mpls_hdr to a common location

[PATCH net-next v2 2/3] mpls: move mpls_hdr to a common location

2016-09-30 Thread Jiri Benc
This will be also used by openvswitch. Signed-off-by: Jiri Benc --- v2: new in v2 --- include/net/mpls.h | 9 + net/mpls/internal.h | 10 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/net/mpls.h b/include/net/mpls.h index 5b3b5addfb08..3ebbc0bb57ff

Re: [PATCH 2/3] netfilter: hide reference to nf_hooks_ingress

2016-09-30 Thread Aaron Conole
Arnd Bergmann writes: > A recent cleanup added an unconditional reference to the nf_hooks_ingress > pointer, > but that fails when CONFIG_NETFILTER_INGRESS is disabled and that member is > not present in net_device: > > net/netfilter/core.c: In function 'nf_set_hooks_head': > net/netfilter/core.

Re: [PATCH RFC iproute2] iplink: Support envhdrlen

2016-09-30 Thread Toshiaki Makita
On 16/09/29 (木) 21:49, Jiri Benc wrote: On Tue, 27 Sep 2016 17:55:40 +0900, Toshiaki Makita wrote: This adds support for envhdrlen. Example: # ip link set eno1 envhdrlen 8 Thank you for taking a look at this. I don't see why this should be user visible, let alone requiring user to set it.

[net-next PATCH v2] i40e: Clean up handling of msglevel flags and debug parameter

2016-09-30 Thread Alexander Duyck
So the i40e driver had a really convoluted configuration for how to handle the debug flags contained in msg_level. Part of the issue is that the driver has its own 32 bit mask that it was using to track a separate set of debug features. From what I can tell it was trying to use the upper 4 bits t

Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Eric Dumazet wrote: > > @@ -1753,6 +1753,9 @@ static int do_setvfinfo(struct net_device *dev, > > struct nlattr **tb) > > > > len++; > > } > > + if (len == 0) > > + return -EINVAL; > > + > >

Re: [PATCH 3/3] netfilter: xt_hashlimit: uses div_u64 for division

2016-09-30 Thread Eric Dumazet
On Fri, 2016-09-30 at 18:05 +0200, Arnd Bergmann wrote: > The newly added support for high-resolution pps rates introduced multiple > 64-bit > division operations in one function, which fails on all 32-bit architectures: > > net/netfilter/xt_hashlimit.o: In function `user2credits': > xt_hashlimit

Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Eric Dumazet
On Fri, Sep 30, 2016 at 9:13 AM, Arnd Bergmann wrote: > With the newly added support for IFLA_VF_VLAN_LIST netlink messages, > we get a warning about potential uninitialized variable use in > the parsing of the user input when enabling the -Wmaybe-uninitialized > warning: > > net/core/rtnetlink.c:

[PATCH 2/2] mlxsw: spectrum_router: avoid potential uninitialized data usage

2016-09-30 Thread Arnd Bergmann
If fi->fib_nhs is zero, the router interface pointer is uninitialized, as shown by this warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function 'mlxsw_sp_router_fib_event': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:1674:21: error: 'r' may be used uninitialized in

[PATCH 1/2] net/mlx5e: shut up maybe-uninitialized warning

2016-09-30 Thread Arnd Bergmann
Build-testing this driver with -Wmaybe-uninitialized gives a new false-positive warning that I can't really explain: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function 'mlx5e_configure_flower': drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:509:3: error: 'old_attr' may be used uniniti

[PATCH] cxgb4: unexport cxgb4_dcb_enabled

2016-09-30 Thread Arnd Bergmann
A recent cleanup marked cxgb4_dcb_enabled as 'static', which is correct, but this ignored how the symbol is also exported. In addition, the export can be compiled out when modules are disabled, causing a harmless compiler warning in configurations for which it is not used at all: drivers/net/et

pull-request: mac80211-next 2016-09-30

2016-09-30 Thread Johannes Berg
Hi Dave, Last pull request before the merge window, since it's about to open :) It seems that everyone finally agreed on the NAN (neighbor awareness networking) APIs, so we have that, along with some other things. Let me know if there's any problem. Thanks, johannes The following changes sinc

[PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Arnd Bergmann
With the newly added support for IFLA_VF_VLAN_LIST netlink messages, we get a warning about potential uninitialized variable use in the parsing of the user input when enabling the -Wmaybe-uninitialized warning: net/core/rtnetlink.c: In function 'do_setvfinfo': net/core/rtnetlink.c:1756:9: error: '

[PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-09-30 Thread Arnd Bergmann
A number of reworks went into rxrpc_send_call_packet() recently, which introduced another warning when built with -Wmaybe-uninitialized: In file included from ../net/rxrpc/output.c:20:0: net/rxrpc/output.c: In function 'rxrpc_send_call_packet': net/rxrpc/ar-internal.h:1187:27: error: 'top' may be

[PATCH 3/3] netfilter: xt_hashlimit: uses div_u64 for division

2016-09-30 Thread Arnd Bergmann
The newly added support for high-resolution pps rates introduced multiple 64-bit division operations in one function, which fails on all 32-bit architectures: net/netfilter/xt_hashlimit.o: In function `user2credits': xt_hashlimit.c:(.text.user2credits+0x3c): undefined reference to `__aeabi_uldivm

[PATCH 2/3] netfilter: hide reference to nf_hooks_ingress

2016-09-30 Thread Arnd Bergmann
A recent cleanup added an unconditional reference to the nf_hooks_ingress pointer, but that fails when CONFIG_NETFILTER_INGRESS is disabled and that member is not present in net_device: net/netfilter/core.c: In function 'nf_set_hooks_head': net/netfilter/core.c:96:30: error: 'struct net_device' h

[PATCH 1/3] netfilter: nf_tables: avoid uninitialized variable warning

2016-09-30 Thread Arnd Bergmann
The newly added nft_range_eval() function handles the two possible nft range operations, but as the compiler warning points out, any unexpected value would lead to the 'mismatch' variable being used without being initialized: net/netfilter/nft_range.c: In function 'nft_range_eval': net/netfilter/n

Re: [PATCH net-next 2/2] openvswitch: remove skb_mpls_header

2016-09-30 Thread pravin shelar
On Fri, Sep 30, 2016 at 1:06 AM, Jiri Benc wrote: > On Thu, 29 Sep 2016 16:03:19 -0700, pravin shelar wrote: >> > --- a/include/net/mpls.h >> > +++ b/include/net/mpls.h >> > @@ -25,15 +25,4 @@ static inline bool eth_p_mpls(__be16 eth_type) >> > eth_type == htons(ETH_P_MPLS_MC); >>

Re: [PATCH v4 net-next 16/16] tcp_bbr: add BBR congestion control

2016-09-30 Thread Lawrence Brakmo
I ran some BBR tests under different scenarios and I am concerned that under some conditions BBR can become very aggressive. It seems BBR flows can decide that losses are un-correlated to congestion, and when in this mode, they will maintain large cwnds regardless of the losses. In cases when BBR i

Re: [PATCH net v2] net: pktgen: fix pkt_size

2016-09-30 Thread Greg
On Fri, 2016-09-30 at 16:56 +0200, Paolo Abeni wrote: > The commit 879c7220e828 ("net: pktgen: Observe needed_headroom > of the device") increased the 'pkt_overhead' field value by > LL_RESERVED_SPACE. > As a side effect the generated packet size, computed as: > > /* Eth + IPh + UDPh + mpls

[PATCH net v2] net: pktgen: fix pkt_size

2016-09-30 Thread Paolo Abeni
The commit 879c7220e828 ("net: pktgen: Observe needed_headroom of the device") increased the 'pkt_overhead' field value by LL_RESERVED_SPACE. As a side effect the generated packet size, computed as: /* Eth + IPh + UDPh + mpls */ datalen = pkt_dev->cur_pkt_size - 14 - 20 - 8 -

Re: [PATCH 3/3] mac80211: Set lower memory limit for non-VHT devices

2016-09-30 Thread Toke Høiland-Jørgensen
Johannes Berg writes: >> > I kinda see the logic here - we really don't need to queue as much >> > if we can't possibly transmit it out quickly - but it seems to me >> > we should also throw in some kind of limit that's relative to the >> > amount of memory you have on the system? >> >> Yes, ide

Re: [PATCH 2/2] net: hns: add missing function declaration

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Baoyou Xie wrote: > We get 1 warning when building kernel with W=1: > drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2784:5: warning: no > previous prototype for 'hns_dsaf_roce_reset' [-Wmissing-prototypes] > > In fact, this function is not declared in any file, b

Re: [PATCH 1/2] qed: mark symbols static where possible

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Baoyou Xie wrote: > > We get 12 warnings when building kernel with W=1: > drivers/net/ethernet/qlogic/qed/qed_cxt.c:346:6: warning: no previous > prototype for 'qed_cxt_set_srq_count' [-Wmissing-prototypes] > drivers/net/ethernet/qlogic/qed/qed_cxt.c:353:5: warning: n

Re: [PATCH 2/2] qed: remove unused function in qed_cxt.c

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Baoyou Xie wrote: > We get 3 warnings when building kernel with W=1: > drivers/net/ethernet/qlogic/qed/qed_cxt.c:1941:1: warning: no previous > prototype for 'qed_cxt_dynamic_ilt_alloc' [-Wmissing-prototypes] > drivers/net/ethernet/qlogic/qed/qed_cxt.c:2158:5: warning:

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-30 Thread Eric Nelson
Hi David, On 09/30/2016 06:49 AM, David Laight wrote: > From: Eric Nelson >> Sent: 30 September 2016 14:27 >> Thanks for the feedback David, >> >> On 09/29/2016 04:07 AM, David Laight wrote: >>> From: Eric Nelson Sent: 28 September 2016 18:15 On 09/28/2016 09:42 AM, David Laight wrote: >

RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-30 Thread David Laight
From: Eric Nelson > Sent: 30 September 2016 14:27 > Thanks for the feedback David, > > On 09/29/2016 04:07 AM, David Laight wrote: > > From: Eric Nelson > >> Sent: 28 September 2016 18:15 > >> On 09/28/2016 09:42 AM, David Laight wrote: > >>> From: Eric Nelson > Sent: 26 September 2016 19:40

Re: [PATCH V2 for-next 0/8] Bug Fixes and Code Improvement in HNS driver

2016-09-30 Thread Doug Ledford
On 9/30/16 1:33 AM, David Miller wrote: > From: Salil Mehta > Date: Thu, 29 Sep 2016 18:09:08 +0100 > >> This patch-set introduces fix to some Bugs, potential problems >> and code improvements identified during internal review and >> testing of Hisilicon Network Subsystem driver. >> >> Submit Cha

Re: pull-request: wireless-drivers-next 2016-09-29

2016-09-30 Thread Aaron Conole
David Miller writes: > From: Kalle Valo > Date: Thu, 29 Sep 2016 19:57:28 +0300 > ... >> Or actually I had one problem. While doing a test merge I noticed that >> net-next fails to compile for me, but I don't think this is anything >> wireless related: >> >> CC net/netfilter/core.o >> ne

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-30 Thread Eric Nelson
Thanks for the feedback David, On 09/29/2016 04:07 AM, David Laight wrote: > From: Eric Nelson >> Sent: 28 September 2016 18:15 >> On 09/28/2016 09:42 AM, David Laight wrote: >>> From: Eric Nelson Sent: 26 September 2016 19:40 Hi David, On 09/26/2016 02:26 AM, David Laight wrot

Re: [PATCH 1/3] cw1200: Don't leak memory if krealloc failes

2016-09-30 Thread Johannes Thumshirn
On Fri, Sep 30, 2016 at 03:56:45PM +0300, Sergei Shtylyov wrote: > Hello. > > On 9/30/2016 3:11 PM, Johannes Thumshirn wrote: > > > The call to krealloc() in wsm_buf_reserve() directly assigns the newly > > returned memory to buf->begin. This is all fine except when krealloc() > > failes we loose

Re: [PATCH 1/3] cw1200: Don't leak memory if krealloc failes

2016-09-30 Thread Sergei Shtylyov
Hello. On 9/30/2016 3:11 PM, Johannes Thumshirn wrote: The call to krealloc() in wsm_buf_reserve() directly assigns the newly returned memory to buf->begin. This is all fine except when krealloc() failes we loose the ability to free the old memory pointed to by Fails. buf->begin. If we j

Re: [PATCH 3/3] mac80211: Set lower memory limit for non-VHT devices

2016-09-30 Thread Johannes Berg
> > I kinda see the logic here - we really don't need to queue as much > > if we can't possibly transmit it out quickly - but it seems to me > > we should also throw in some kind of limit that's relative to the > > amount of memory you have on the system? > > Yes, ideally. That goes for FQ-CoDel

Re: [PATCH 3/3] mac80211: Set lower memory limit for non-VHT devices

2016-09-30 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Fri, 2016-09-23 at 21:59 +0200, Toke Høiland-Jørgensen wrote: >> Small devices can run out of memory from queueing too many packets. >> If VHT is not supported by the PHY, having more than 4 MBytes of >> total queue in the TXQ intermediate queues is not needed, and so w

[PATCH v2] cw1200: Don't leak memory if krealloc failes

2016-09-30 Thread Johannes Thumshirn
The call to krealloc() in wsm_buf_reserve() directly assigns the newly returned memory to buf->begin. This is all fine except when krealloc() failes we loose the ability to free the old memory pointed to by buf->begin. If we just create a temporary variable to assign memory to and assign the memory

Re: [PATCH 1/3] cw1200: Don't leak memory if krealloc failes

2016-09-30 Thread Johannes Thumshirn
On Fri, Sep 30, 2016 at 02:29:39PM +0200, Johannes Berg wrote: > > > + tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA); > > + if (tmp) { > > > I think that check is inverted? > > johannes Fu.. you're right, of cause it's !tmp. I'll resend. Thanks, Johannes -- Johannes Thu

Re: [PATCH 1/3] cw1200: Don't leak memory if krealloc failes

2016-09-30 Thread Johannes Berg
> + tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA); > + if (tmp) { > I think that check is inverted? johannes

[PATCH 1/3] cw1200: Don't leak memory if krealloc failes

2016-09-30 Thread Johannes Thumshirn
The call to krealloc() in wsm_buf_reserve() directly assigns the newly returned memory to buf->begin. This is all fine except when krealloc() failes we loose the ability to free the old memory pointed to by buf->begin. If we just create a temporary variable to assign memory to and assign the memory

Re: [PATCH 3/3] mac80211: Set lower memory limit for non-VHT devices

2016-09-30 Thread Johannes Berg
On Fri, 2016-09-23 at 21:59 +0200, Toke Høiland-Jørgensen wrote: > Small devices can run out of memory from queueing too many packets. > If VHT is not supported by the PHY, having more than 4 MBytes of > total queue in the TXQ intermediate queues is not needed, and so we > can safely limit the memo

Kernel panic + grsec patch kernel

2016-09-30 Thread vorohin907
Hello! I would like to deal with the issue of kernel panic when using PAX. Kernel panic occurs when you use wi fi. All reports are in this thread. https://forums.grsecurity.net/viewtopic.php?f=3&t=4574 I applied to the letter dmesg ( pax_size_overflow_report_only ) Said to write to this address

[PATCH v2] net: fec: set mac address unconditionally

2016-09-30 Thread Gavin Schenk
If the mac address origin is not dt, you can only safely assign a mac address after "link up" of the device. If the link is off the clocks are disabled and because of issues assigning registers when clocks are off the new mac address cannot be written in .ndo_set_mac_address() on some soc's. This f

Re: [PATCH v2 net-next 1/2] net: centralize net_device min/max MTU checking

2016-09-30 Thread Jakub Sitnicki
On Wed, Sep 28, 2016 at 10:20 PM GMT, Jarod Wilson wrote: > While looking into an MTU issue with sfc, I started noticing that almost > every NIC driver with an ndo_change_mtu function implemented almost > exactly the same range checks, and in many cases, that was the only > practical thing their nd

[PATCH net] vti6: flush x-netns xfrm cache when vti interface is removed

2016-09-30 Thread Nicolas Dichtel
This is the same fix than commit a5d0dc810abf ("vti: flush x-netns xfrm cache when vti interface is removed") This patch fixes a refcnt problem when a x-netns vti6 interface is removed: unregister_netdevice: waiting for vti6_test to become free. Usage count = 1 Here is a script to reproduce the p

Re: [PATCH v8 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking

2016-09-30 Thread gre...@linuxfoundation.org
On Fri, Sep 30, 2016 at 08:37:36AM +, Levy, Amir (Jer) wrote: > On Fri, Sep 30 2016, 09:40 AM, David Miller wrote: > > From: Greg KH > > Date: Fri, 30 Sep 2016 08:30:05 +0200 > > > > > On Fri, Sep 30, 2016 at 01:55:55AM -0400, David Miller wrote: > > >> From: Amir Levy > > >> Date: Wed, 28 S

RE: [PATCH v8 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking

2016-09-30 Thread Levy, Amir (Jer)
On Fri, Sep 30 2016, 09:40 AM, David Miller wrote: > From: Greg KH > Date: Fri, 30 Sep 2016 08:30:05 +0200 > > > On Fri, Sep 30, 2016 at 01:55:55AM -0400, David Miller wrote: > >> From: Amir Levy > >> Date: Wed, 28 Sep 2016 17:44:22 +0300 > >> > >> > This driver enables Thunderbolt Networking on

Re: [PATCH] brcmfmac: implement more accurate skb tracking

2016-09-30 Thread Arend Van Spriel
On 29-9-2016 23:57, Rafał Miłecki wrote: > On 27 September 2016 at 11:24, Arend Van Spriel > wrote: >> On 26-9-2016 14:38, Rafał Miłecki wrote: >>> On 26 September 2016 at 14:13, Rafał Miłecki wrote: On 26 September 2016 at 13:46, Arend Van Spriel wrote: > On 26-9-2016 12:23, Rafał

Re: [PATCH net-next 2/2] openvswitch: remove skb_mpls_header

2016-09-30 Thread Jiri Benc
On Thu, 29 Sep 2016 16:03:19 -0700, pravin shelar wrote: > > --- a/include/net/mpls.h > > +++ b/include/net/mpls.h > > @@ -25,15 +25,4 @@ static inline bool eth_p_mpls(__be16 eth_type) > > eth_type == htons(ETH_P_MPLS_MC); > > } > > > > -/* > > - * For non-MPLS skbs this will corre

[PATCH 2/2] qed: remove unused function in qed_cxt.c

2016-09-30 Thread Baoyou Xie
We get 3 warnings when building kernel with W=1: drivers/net/ethernet/qlogic/qed/qed_cxt.c:1941:1: warning: no previous prototype for 'qed_cxt_dynamic_ilt_alloc' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_cxt.c:2158:5: warning: no previous prototype for 'qed_cxt_free_proto_ilt' [-

[PATCH 1/2] qed: mark symbols static where possible

2016-09-30 Thread Baoyou Xie
We get 12 warnings when building kernel with W=1: drivers/net/ethernet/qlogic/qed/qed_cxt.c:346:6: warning: no previous prototype for 'qed_cxt_set_srq_count' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_cxt.c:353:5: warning: no previous prototype for 'qed_cxt_get_srq_count' [-Wmissi

[PATCH] net: ethernet: mediatek: mark symbols static where possible

2016-09-30 Thread Baoyou Xie
We get 2 warnings when building kernel with W=1: drivers/net/ethernet/mediatek/mtk_eth_soc.c:2041:5: warning: no previous prototype for 'mtk_get_link_ksettings' [-Wmissing-prototypes] drivers/net/ethernet/mediatek/mtk_eth_soc.c:2052:5: warning: no previous prototype for 'mtk_set_link_ksettings' [

[PATCH 2/2] net: hns: add missing function declaration

2016-09-30 Thread Baoyou Xie
We get 1 warning when building kernel with W=1: drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2784:5: warning: no previous prototype for 'hns_dsaf_roce_reset' [-Wmissing-prototypes] In fact, this function is not declared in any file, but should be declared in a header file. thus can be recog

[PATCH 1/2] net: hns: mark symbols static where possible

2016-09-30 Thread Baoyou Xie
We get a few warnings when building kernel with W=1: drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:76:21: warning: no previous prototype for 'hns_ae_get_handle' [-Wmissing-prototypes] drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:274:6: warning: no previous prototype for 'hns_ae_stop' [-W

[PATCH] cxgb4: mark cxgb_setup_tc() static

2016-09-30 Thread Baoyou Xie
We get 1 warning when building kernel with W=1: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:2715:5: warning: no previous prototype for 'cxgb_setup_tc' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made s

Re: [PATCH ipsec-next] xfrm: remove unused helper

2016-09-30 Thread Steffen Klassert
On Tue, Sep 27, 2016 at 05:53:58PM +0200, Florian Westphal wrote: > Not used anymore since 2009 (9e0d57fd6dad37, > 'xfrm: SAD entries do not expire correctly after suspend-resume'). > > Signed-off-by: Florian Westphal Applied to ipsec-next, thanks!