[PATCH net-next v4 1/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Yonghong Song
One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol from ipv4 to ipv6 or from ipv6 to ipv4, and then calls bpf_redirect to send the changed packet out. 3472

[PATCH net-next v4 0/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Yonghong Song
One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol from ipv4 to ipv6 or from ipv6 to ipv4, and then calls bpf_redirect to send the changed packet out. ...

[PATCH net-next v4 2/2] net: bpf: add a test for skb_segment in test_bpf module

2018-03-20 Thread Yonghong Song
Without the previous commit, "modprobe test_bpf" will have the following errors: ... [ 98.149165] [ cut here ] [ 98.159362] kernel BUG at net/core/skbuff.c:3667! [ 98.169756] invalid opcode: [#1] SMP PTI [ 98.179370] Modules linked in: [ 98.179371] test_bpf(+

Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access

2018-03-20 Thread Ingo Molnar
* Linus Torvalds wrote: > And even if you ignore that "maintenance problems down the line" issue > ("we can fix them when they happen") I don't want to see games like > this, because I'm pretty sure it breaks the optimized xsave by tagging > the state as being dirty. That's true - and it would

Re: [PATCH net-next 5/6] tls: RX path for ktls

2018-03-20 Thread Boris Pismenny
On 3/20/2018 7:54 PM, Dave Watson wrote: Add rx path for tls software implementation. recvmsg, splice_read, and poll implemented. An additional sockopt TLS_RX is added, with the same interface as TLS_TX. Either TLX_RX or TLX_TX may be provided separately, or together (with two different sets

Re: [PATCH net-next v3 2/2] net: bpf: add a test for skb_segment in test_bpf module

2018-03-20 Thread Yonghong Song
On 3/20/18 5:44 PM, Eric Dumazet wrote: On 03/20/2018 04:21 PM, Yonghong Song wrote: Without the previous commit, "modprobe test_bpf" will have the following errors: ... [ 98.149165] [ cut here ] [ 98.159362] kernel BUG at net/core/skbuff.c:3667! [ 98.169756] in

Re: [PATCH net-next v3 1/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Yonghong Song
On 3/20/18 4:50 PM, Alexander Duyck wrote: On Tue, Mar 20, 2018 at 4:21 PM, Yonghong Song wrote: One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol fr

[PATCH net-next] devlink: Remove top_hierarchy arg to devlink_resource_register

2018-03-20 Thread David Ahern
top_hierarchy arg can be determined by comparing parent_resource_id to DEVLINK_RESOURCE_ID_PARENT_TOP so it does not need to be a separate argument. Signed-off-by: David Ahern --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 9 - drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl

pull-request: bpf 2018-03-21

2018-03-20 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Follow-up fix to the fault injection framework to prevent jump optimization on the kprobe by installing a dummy post-handler, from Masami. 2) Drop bpf_perf_prog_read_value helper from t

Re: [PATCH] Bluetooth: Remove VLA usage in aes_cmac

2018-03-20 Thread Gustavo A. R. Silva
Hi, I've just discovered an issue in this patch. Please, drop it. I'll send v2 shortly. Thanks -- Gustavo On 03/20/2018 06:34 PM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length A

pull-request: bpf-next 2018-03-21

2018-03-20 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add a BPF hook for sendmsg and sendfile by reusing the ULP infrastructure and sockmap. Three helpers are added along with this, bpf_msg_apply_bytes(), bpf_msg_cork_bytes(), and bpf_

[PATCH v2] Bluetooth: Remove VLA usage in aes_cmac

2018-03-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves it is

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Joe Perches
On Tue, 2018-03-20 at 18:09 -0700, Jeff Kirsher wrote: > On Tue, 2018-03-20 at 16:46 -0700, Philippe Ombredanne wrote: > > When the kernel maintainers decide to switch to V3.0 of the SPDX list, > > the doc will be updated and then Joe's script could be applied at once > > to update the past. > > I

Re: linux-next on x60: network manager often complains "network is disabled" after resume

2018-03-20 Thread Woody Suwalski
rk for you?     Pavel Tried the 4.16-rc6 with nm 1.4.4 - I do not see the issue. Thanks for testing... but yes, 4.16 should be ok. If not fixed, problem will appear in 4.17-rc1. Works here OK. Tried ~10 suspends, all restarted OK. kernel next-20180320 nmcli shows that W

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Jeff Kirsher
On Tue, 2018-03-20 at 16:46 -0700, Philippe Ombredanne wrote: > Allan, > > On Tue, Mar 20, 2018 at 1:48 PM, Allan, Bruce W > wrote: > > > -Original Message- > > > From: netdev-ow...@vger.kernel.org [mailto:netdev-owner@vger.kernel.o > > > rg] > > > On Behalf Of Jeff Kirsher > > > Sent: Tu

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Jeff Kirsher
On Tue, 2018-03-20 at 17:47 -0700, Stephen Hemminger wrote: > On Tue, 20 Mar 2018 10:13:20 -0700 > Jeff Kirsher wrote: > > > diff --git a/drivers/net/ethernet/intel/e100.c > > b/drivers/net/ethernet/intel/e100.c > > index 29486478836e..a750a5fe373a 100644 > > --- a/drivers/net/ethernet/intel/e100

Re: [PATCH] kbuild: disable clang's default use of -fmerge-all-constants

2018-03-20 Thread Alexei Starovoitov
On Wed, Mar 21, 2018 at 01:38:45AM +0100, Daniel Borkmann wrote: > On 03/21/2018 01:36 AM, Linus Torvalds wrote: > > On Tue, Mar 20, 2018 at 5:18 PM, Daniel Borkmann > > wrote: > >> Prasad reported that he has seen crashes in BPF subsystem with netd > >> on Android with arm64 in the form of (note

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Stephen Hemminger
On Tue, 20 Mar 2018 10:13:20 -0700 Jeff Kirsher wrote: > diff --git a/drivers/net/ethernet/intel/e100.c > b/drivers/net/ethernet/intel/e100.c > index 29486478836e..a750a5fe373a 100644 > --- a/drivers/net/ethernet/intel/e100.c > +++ b/drivers/net/ethernet/intel/e100.c > @@ -1,3 +1,4 @@ > +// SPDX

Re: [PATCH net-next v3 2/2] net: bpf: add a test for skb_segment in test_bpf module

2018-03-20 Thread Eric Dumazet
On 03/20/2018 04:21 PM, Yonghong Song wrote: > Without the previous commit, > "modprobe test_bpf" will have the following errors: > ... > [ 98.149165] [ cut here ] > [ 98.159362] kernel BUG at net/core/skbuff.c:3667! > [ 98.169756] invalid opcode: [#1] SMP PTI >

Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access

2018-03-20 Thread Andy Lutomirski
On Tue, Mar 20, 2018 at 3:10 PM, David Laight wrote: > From: Andy Lutomirski >> Sent: 20 March 2018 14:57 > ... >> I'd rather see us finally finish the work that Rik started to rework >> this differently. I'd like kernel_fpu_begin() to look like: >> >> if (test_thread_flag(TIF_NEED_FPU_RESTORE))

Re: [PATCH] kbuild: disable clang's default use of -fmerge-all-constants

2018-03-20 Thread Daniel Borkmann
On 03/21/2018 01:36 AM, Linus Torvalds wrote: > On Tue, Mar 20, 2018 at 5:18 PM, Daniel Borkmann wrote: >> Prasad reported that he has seen crashes in BPF subsystem with netd >> on Android with arm64 in the form of (note, the taint is unrelated): > > Ack. This looks good to me. And thanks for not

Re: [PATCH] kbuild: disable clang's default use of -fmerge-all-constants

2018-03-20 Thread Linus Torvalds
On Tue, Mar 20, 2018 at 5:18 PM, Daniel Borkmann wrote: > Prasad reported that he has seen crashes in BPF subsystem with netd > on Android with arm64 in the form of (note, the taint is unrelated): Ack. This looks good to me. And thanks for noticing the behavior wrt the correct gcc merging. > [

[PATCH net] net: dsa: Fix functional dsa-loop dependency on FIXED_PHY

2018-03-20 Thread Florian Fainelli
We have a functional dependency on the FIXED_PHY MDIO bus because we register fixed PHY devices "the old way" which only works if the code that does this has had a chance to run before the fixed MDIO bus is probed. Make sure we account for that and have dsa_loop_bdinfo.o be either built-in or modul

[PATCH] kbuild: disable clang's default use of -fmerge-all-constants

2018-03-20 Thread Daniel Borkmann
Prasad reported that he has seen crashes in BPF subsystem with netd on Android with arm64 in the form of (note, the taint is unrelated): [ 4134.721483] Unable to handle kernel paging request at virtual address 80001 [ 4134.820925] Mem abort info: [ 4134.901283] Exception class = DABT

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-20 Thread Al Viro
On Tue, Mar 20, 2018 at 04:26:52PM -0700, Linus Torvalds wrote: > On Tue, Mar 20, 2018 at 4:23 PM, Linus Torvalds > wrote: > > > > Hmm. So thanks to the diseased mind of Martin Uecker, there's a better > > test for "__is_constant()": > > > > /* Glory to Martin Uecker */ > > #define __is_const

[PATCH] Bluetooth: Remove VLA usage in aes_cmac

2018-03-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves it is

Re: [PATCH net-next v3 1/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Alexander Duyck
On Tue, Mar 20, 2018 at 4:21 PM, Yonghong Song wrote: > One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at > function skb_segment(), line 3667. The bpf program attaches to > clsact ingress, calls bpf_skb_change_proto to change protocol > from ipv4 to ipv6 or from ipv6 to ipv4, an

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Philippe Ombredanne
Allan, On Tue, Mar 20, 2018 at 1:48 PM, Allan, Bruce W wrote: >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] >> On Behalf Of Jeff Kirsher >> Sent: Tuesday, March 20, 2018 10:52 AM >> To: Joe Perches ; da...@davemloft.net; Philippe >> Ombr

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-20 Thread Linus Torvalds
On Tue, Mar 20, 2018 at 4:23 PM, Linus Torvalds wrote: > > Hmm. So thanks to the diseased mind of Martin Uecker, there's a better > test for "__is_constant()": > > /* Glory to Martin Uecker */ > #define __is_constant(a) \ > (sizeof(int) == sizeof(*(1 ? ((void*)((a) * 0l)) : (int*)1)))

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-20 Thread Linus Torvalds
On Sat, Mar 17, 2018 at 1:07 PM, Kees Cook wrote: > > No luck! :( gcc 4.4 refuses to play along. And, hilariously, not only > does it not change the complaint about __builtin_choose_expr(), it > also thinks that's a VLA now. Hmm. So thanks to the diseased mind of Martin Uecker, there's a better t

[PATCH net-next v3 1/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Yonghong Song
One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol from ipv4 to ipv6 or from ipv6 to ipv4, and then calls bpf_redirect to send the changed packet out. 3472

[PATCH net-next v3 2/2] net: bpf: add a test for skb_segment in test_bpf module

2018-03-20 Thread Yonghong Song
Without the previous commit, "modprobe test_bpf" will have the following errors: ... [ 98.149165] [ cut here ] [ 98.159362] kernel BUG at net/core/skbuff.c:3667! [ 98.169756] invalid opcode: [#1] SMP PTI [ 98.179370] Modules linked in: [ 98.179371] test_bpf(+

[PATCH net-next v3 0/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Yonghong Song
One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol from ipv4 to ipv6 or from ipv6 to ipv4, and then calls bpf_redirect to send the changed packet out. ...

Re: [PATCH bpf-next] bpf: skip unnecessary capability check

2018-03-20 Thread Daniel Borkmann
On 03/20/2018 12:37 PM, Lorenzo Colitti wrote: > On Tue, Mar 20, 2018 at 12:57 AM, Chenbo Feng > wrote: >> - if (!capable(CAP_SYS_ADMIN) && sysctl_unprivileged_bpf_disabled) >> + if (sysctl_unprivileged_bpf_disabled && !capable(CAP_SYS_ADMIN)) >> return -EPERM; >> > >

Re: [PATCH net-next v2 1/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Yonghong Song
On 3/20/18 11:08 AM, Alexander Duyck wrote: On Tue, Mar 20, 2018 at 8:55 AM, Yonghong Song wrote: One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol f

Re: [PATCH bpf-next] bpf, doc: add description wrt native/bpf clang target and pointer size

2018-03-20 Thread Alexei Starovoitov
On Tue, Mar 20, 2018 at 12:21:15AM +0100, Daniel Borkmann wrote: > As this recently came up on netdev [0], lets add it to the BPF devel doc. > > [0] https://www.spinics.net/lists/netdev/msg489612.html > > Signed-off-by: Daniel Borkmann Appled to bpf-next, thanks Daniel.

Re: [PATCH net] trace/bpf: remove helper bpf_perf_prog_read_value from tracepoint type programs

2018-03-20 Thread Daniel Borkmann
On 03/20/2018 07:19 PM, Yonghong Song wrote: > Commit 4bebdc7a85aa ("bpf: add helper bpf_perf_prog_read_value") > added helper bpf_perf_prog_read_value so that perf_event type program > can read event counter and enabled/running time. > This commit, however, introduced a bug which allows this helpe

Re: [PATCH] test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches

2018-03-20 Thread Daniel Borkmann
On 03/20/2018 01:58 PM, Thadeu Lima de Souza Cascardo wrote: > Function bpf_fill_maxinsns11 is designed to not be able to be JITed on > x86_64. So, it fails when CONFIG_BPF_JIT_ALWAYS_ON=y, and > commit 09584b406742 ("bpf: fix selftests/bpf test_kmod.sh failure when > CONFIG_BPF_JIT_ALWAYS_ON=y") m

[PATCH PATCH net 3/4] hv_netvsc: change GPAD teardown order on older versions

2018-03-20 Thread Stephen Hemminger
On older versions of Windows, the host ignores messages after vmbus channel is closed. Workaround this by doing what Windows does and send the teardown before close on older versions of NVSP protocol. Reported-by: Mohammed Gamal Fixes: 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") Si

[PATCH PATCH net 1/4] hv_netvsc: disable NAPI before channel close

2018-03-20 Thread Stephen Hemminger
This makes sure that no CPU is still process packets when the channel is closed. Fixes: 76bb5db5c749 ("netvsc: fix use after free on module removal") Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drive

[PATCH PATCH net 4/4] hv_netvsc: common detach logic

2018-03-20 Thread Stephen Hemminger
Make common function for detaching internals of device during changes to MTU and RSS. Make sure no more packets are transmitted and all packets have been received before doing device teardown. Change the wait logic to be common and use usleep_range(). Changes transmit enabling logic so that trans

[PATCH PATCH net 0/4] hv_netvsc: fix races during shutdown and changes

2018-03-20 Thread Stephen Hemminger
This set of patches fixes issues identified by Vitaly Kuznetsov and Mohammed Gamal related to state changes in Hyper-v network driver. A lot of the issues are because setting up the netvsc device requires a second step (in work queue) to get all the sub-channels running. Stephen Hemminger (4):

[PATCH PATCH net 2/4] hv_netvsc: use RCU to fix concurrent rx and queue changes

2018-03-20 Thread Stephen Hemminger
The receive processing may continue to happen while the internal network device state is in RCU grace period. The internal RNDIS structure is associated with the internal netvsc_device structure; both have the same RCU lifetime. Defer freeing all associated parts until after grace period. Fixes:

Re: [PATCH net-next v2 2/5] net: Revert "ipv4: fix a deadlock in ip_ra_control"

2018-03-20 Thread Kirill Tkhai
On 20.03.2018 22:25, Kirill Tkhai wrote: > Hi, David, > > thanks for the review! > > On 20.03.2018 19:23, David Miller wrote: >> From: Kirill Tkhai >> Date: Mon, 19 Mar 2018 12:14:54 +0300 >> >>> This reverts commit 1215e51edad1. >>> Since raw_close() is used on every RAW socket destruction, >>>

Re: linux-next on x60: network manager often complains "network is disabled" after resume

2018-03-20 Thread Woody Suwalski
rk for you? Pavel Tried the 4.16-rc6 with nm 1.4.4 - I do not see the issue. Thanks for testing... but yes, 4.16 should be ok. If not fixed, problem will appear in 4.17-rc1. Works here OK. Tried ~10 suspends, all restarted OK. kernel next-20180320 nmcli shows

Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns

2018-03-20 Thread Liran Alon
On 20/03/18 20:51, valdis.kletni...@vt.edu wrote: On Tue, 20 Mar 2018 18:39:47 +0200, Liran Alon said: What is your opinion in regards if it's OK to put the flag enabling this "fix" in /proc/sys/net/core? Do you think it's sufficient? Umm.. *which* /proc/sys/net/core? These could differ for

Re: [PATCH iproute2 v2 9/9] bpf: avoid compiler warnings about strncpy

2018-03-20 Thread Daniel Borkmann
On 03/20/2018 09:29 PM, Stephen Hemminger wrote: > Use strlcpy to avoid cases where sizeof(buf) == strlen(buf) > > Signed-off-by: Stephen Hemminger Acked-by: Daniel Borkmann

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Joe Perches
On Tue, 2018-03-20 at 20:48 +, Allan, Bruce W wrote: > > -Original Message- > > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > > On Behalf Of Jeff Kirsher > > Sent: Tuesday, March 20, 2018 10:52 AM > > To: Joe Perches ; da...@davemloft.net; Philippe > > Ombre

RE: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Allan, Bruce W
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Jeff Kirsher > Sent: Tuesday, March 20, 2018 10:52 AM > To: Joe Perches ; da...@davemloft.net; Philippe > Ombredanne > Cc: netdev@vger.kernel.org; nhor...@redhat.com; sassm...@red

Re: [RFC 2/2] page_frag_cache: Store metadata in struct page

2018-03-20 Thread Alexander Duyck
On Thu, Mar 15, 2018 at 12:53 PM, Matthew Wilcox wrote: > From: Matthew Wilcox > > Shrink page_frag_cache from 24 to 8 bytes (a single pointer to the > currently-in-use struct page) by using the page's refcount directly > (instead of maintaining a bias) and storing our current progress through >

Re: [PATCH net-next 01/14] tcp: Add clean acked data hook

2018-03-20 Thread Rao Shoaib
On 03/19/2018 07:44 PM, Saeed Mahameed wrote: From: Ilya Lesokhin Called when a TCP segment is acknowledged. Could be used by application protocols who hold additional metadata associated with the stream data. This is required by TLS device offload to release metadata associated with acknowl

[PATCH iproute2 v2 3/9] ip: use strlcpy() to avoid truncation

2018-03-20 Thread Stephen Hemminger
This fixes gcc-8 warnings about strncpy bounds by using strlcpy instead. Signed-off-by: Stephen Hemminger --- ip/iplink.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index d401311bcad9..cca530eeeb09 100644 --- a/ip/iplink.c +++ b/i

[PATCH iproute2 v2 2/9] pedit: fix strncpy warning

2018-03-20 Thread Stephen Hemminger
Newer versions of Gcc warn about string truncation. Fix by using strlcpy. Signed-off-by: Stephen Hemminger --- tc/m_pedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 26549eeea899..8577f875a7c0 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.

[PATCH iproute2 v2 5/9] namespace: fix warning snprintf buffer

2018-03-20 Thread Stephen Hemminger
It is possible that user could request really long namespace name and overrun the path buffer. Signed-off-by: Stephen Hemminger --- lib/namespace.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/namespace.c b/lib/namespace.c index 6f3356d0fa08..682634028587 100644

[PATCH iproute2 v2 8/9] misc: avoid snprintf warnings in ss and nstat

2018-03-20 Thread Stephen Hemminger
Gcc 8 checks that target buffer is big enough. Signed-off-by: Stephen Hemminger --- misc/nstat.c | 4 ++-- misc/ss.c| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/nstat.c b/misc/nstat.c index a4dd405d43a9..433a1f483be3 100644 --- a/misc/nstat.c +++ b/misc/nstat.c

[PATCH iproute2 v2 6/9] tc_class: fix snprintf warning

2018-03-20 Thread Stephen Hemminger
Size buffer big enough to avoid any possible overflow. Signed-off-by: Stephen Hemminger --- tc/tc_class.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tc/tc_class.c b/tc/tc_class.c index 1b214b82c702..91802518bb27 100644 --- a/tc/tc_class.c +++ b/tc/tc_class.c @@ -219

[PATCH iproute2 v2 9/9] bpf: avoid compiler warnings about strncpy

2018-03-20 Thread Stephen Hemminger
Use strlcpy to avoid cases where sizeof(buf) == strlen(buf) Signed-off-by: Stephen Hemminger --- lib/bpf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bpf.c b/lib/bpf.c index c38d92d87759..04bc5a5685d5 100644 --- a/lib/bpf.c +++ b/lib/bpf.c @@ -2593,7 +2593,7 @@

[PATCH iproute2 v2 7/9] ematch: fix possible snprintf overflow

2018-03-20 Thread Stephen Hemminger
Fixes gcc 8 warning about possible snprint overflow Signed-off-by: Stephen Hemminger --- tc/m_ematch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_ematch.c b/tc/m_ematch.c index d2bb5c380382..0d66dc682314 100644 --- a/tc/m_ematch.c +++ b/tc/m_ematch.c @@ -161,7 +161,

[PATCH iproute2 v2 4/9] tunnel: use strlcpy to avoid strncpy warnings

2018-03-20 Thread Stephen Hemminger
Fixes warnings about strncpy size by using strlcpy. tunnel.c: In function ‘tnl_gen_ioctl’: tunnel.c:145:2: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] strncpy(ifr.ifr_name, name, IFNAMSIZ); ^ Signed-off-by: Stephen

[PATCH iproute2 v2 1/9] bridge: avoid snprint truncation on time

2018-03-20 Thread Stephen Hemminger
This fixes new gcc warning about possible string overflow. mdb.c: In function ‘__print_router_port_stats’: mdb.c:61:11: warning: ‘%.2i’ directive output may be truncated writing between 2 and 7 bytes into a region of size between 0 and 4 [-Wformat-truncation=] "%4i.%.2i", (int)tv.tv_sec,

[PATCH iproute2 v2 0/9] gcc-8 warning fixes

2018-03-20 Thread Stephen Hemminger
This fixes most of the warning seen build iproute2 with gcc-8. There are still a couple in namespace and bpf to resolve related to PATH_MAX. Stephen Hemminger (9): bridge: avoid snprint truncation on time pedit: fix strncpy warning ip: use strlcpy() to avoid truncation tunnel: use strlcpy

Re: rfc: treewide replace local ethernet broadcast char arrays with a global ?

2018-03-20 Thread Joe Perches
On Tue, 2018-03-20 at 13:07 -0700, Florian Fainelli wrote: > On 03/20/2018 01:00 PM, Joe Perches wrote: > > Treewide there are ~60 declarations of a ethernet broadcast > > address as a 6 byte array that are later used as either an > > output for vsprintf extension %pM or as a source array to > > co

Fwd: Kernel panic when using KVM and mlx4_en driver (when bonding and sriov enabled)

2018-03-20 Thread kvaps
Hello, I have one bug with new HPE ProLiant m710x Server Cartridges, there is Mellanox Technologies MT27520 Family [ConnectX-3 Pro] Ethernet controller. When I use bonding + VFs and KVM I have stacked kernel with these messages on console: [ 1011.070739] kvm [16361]: vcpu0, guest rIP: 0x8

Re: rfc: treewide replace local ethernet broadcast char arrays with a global ?

2018-03-20 Thread Florian Fainelli
On 03/20/2018 01:00 PM, Joe Perches wrote: > Treewide there are ~60 declarations of a ethernet broadcast > address as a 6 byte array that are later used as either an > output for vsprintf extension %pM or as a source array to > copy or compare. > > Perhaps it'd be useful to declare a global static

rfc: treewide replace local ethernet broadcast char arrays with a global ?

2018-03-20 Thread Joe Perches
Treewide there are ~60 declarations of a ethernet broadcast address as a 6 byte array that are later used as either an output for vsprintf extension %pM or as a source array to copy or compare. Perhaps it'd be useful to declare a global static const u8[] in net somewhere instead to save the text/d

Re: [PATCH net-next v2 2/5] net: Revert "ipv4: fix a deadlock in ip_ra_control"

2018-03-20 Thread Kirill Tkhai
Hi, David, thanks for the review! On 20.03.2018 19:23, David Miller wrote: > From: Kirill Tkhai > Date: Mon, 19 Mar 2018 12:14:54 +0300 > >> This reverts commit 1215e51edad1. >> Since raw_close() is used on every RAW socket destruction, >> the changes made by 1215e51edad1 scale sadly. This clea

Re: [PATCH] vmxnet3: fix LRO feature check

2018-03-20 Thread David Miller
From: Shrikrishna Khare Date: Tue, 20 Mar 2018 11:42:47 -0700 > Ronak's patch that fixes this issue has the right code, and is already > accepted in net tree (Commit: 034f405793897a3c8f642935f5494b86c340cde7). > We no longer need Igor's patch. That explains why things in my actual tree are fin

Re: [PATCH] vmxnet3: fix LRO feature check

2018-03-20 Thread Shrikrishna Khare
On Tue, 20 Mar 2018, David Miller wrote: > From: kbuild test robot > Date: Sun, 18 Mar 2018 14:37:35 +0800 > > > All warnings (new ones prefixed by >>): > > > >drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_rx_complete': > >>> drivers/net/vmxnet3/vmxnet3_drv.c:1474:8: warning:

Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns

2018-03-20 Thread valdis . kletnieks
On Tue, 20 Mar 2018 18:39:47 +0200, Liran Alon said: > What is your opinion in regards if it's OK to put the flag enabling this > "fix" in /proc/sys/net/core? Do you think it's sufficient? Umm.. *which* /proc/sys/net/core? These could differ for things that are in different namespaces. Or are yo

Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns

2018-03-20 Thread Eric W. Biederman
Ben Greear writes: > On 03/20/2018 09:44 AM, Liran Alon wrote: >> >> >> On 20/03/18 18:24, ebied...@xmission.com wrote: >>> >>> I don't believe the current behavior is a bug. >>> >>> I looked through the history. Basically skb_scrub_packet >>> started out as the scrubbing needed for crossing net

Re: [RFC] ethtool: Support ETHTOOL_GSTATS2 command.

2018-03-20 Thread Ben Greear
On 03/20/2018 11:24 AM, Michal Kubecek wrote: On Tue, Mar 20, 2018 at 08:39:33AM -0700, Ben Greear wrote: On 03/20/2018 03:37 AM, Michal Kubecek wrote: IMHO it would be more practical to set "0 means same as GSTATS" as a rule and make ethtool_get_stats() a wrapper for ethtool_get_stats2() to a

Re: pull request: bluetooth 2018-03-16

2018-03-20 Thread David Miller
From: Marcel Holtmann Date: Tue, 20 Mar 2018 18:28:18 +0100 > Any chance you can pull net into net-next once you send it off to > Linus? We have a few further Broadcom driver improvements for > net-next that conflict a little bit. Yeah, I merge net into net-next pretty much every time after Linu

Re: [PATCH] vmxnet3: fix LRO feature check

2018-03-20 Thread Igor Pylypiv
The 03/20/2018 10:57, David Miller wrote: > From: kbuild test robot > Date: Sun, 18 Mar 2018 14:37:35 +0800 > > > All warnings (new ones prefixed by >>): > > > >drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_rx_complete': > >>> drivers/net/vmxnet3/vmxnet3_drv.c:1474:8: warning: s

Re: [RFC] ethtool: Support ETHTOOL_GSTATS2 command.

2018-03-20 Thread Michal Kubecek
On Tue, Mar 20, 2018 at 08:39:33AM -0700, Ben Greear wrote: > On 03/20/2018 03:37 AM, Michal Kubecek wrote: > > > > IMHO it would be more practical to set "0 means same as GSTATS" as a > > rule and make ethtool_get_stats() a wrapper for ethtool_get_stats2() to > > avoid code duplication (or perhap

[PATCH iproute2 1/1] tc: print index, refcnt & bindcnt for nat action

2018-03-20 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_nat.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tc/m_nat.c b/tc/m_nat.c index 1e4ff51fe75a..f6e373957c1b 100644 --- a/tc/m_nat.c +++ b/tc/m_nat.c @@ -169,6 +169,9 @@ print_nat(struct action_util *au, FILE * f, struct rtattr *arg)

[PATCH iproute2 v2 0/9] gcc-8 warning fixes

2018-03-20 Thread Stephen Hemminger
This fixes most of the warnings when building with gcc-8. Still have issues with namespace and bpf. Stephen Hemminger (9): bridge: avoid snprint truncation on time pedit: fix strncpy warning ip: use strlcpy() to avoid truncation tunnel: use strlcpy to avoid strncpy warnings namespace: fi

[PATCH net] trace/bpf: remove helper bpf_perf_prog_read_value from tracepoint type programs

2018-03-20 Thread Yonghong Song
Commit 4bebdc7a85aa ("bpf: add helper bpf_perf_prog_read_value") added helper bpf_perf_prog_read_value so that perf_event type program can read event counter and enabled/running time. This commit, however, introduced a bug which allows this helper for tracepoint type programs. This is incorrect as

Re: [PATCH net-next v2 1/2] net: permit skb_segment on head_frag frag_list skb

2018-03-20 Thread Alexander Duyck
On Tue, Mar 20, 2018 at 8:55 AM, Yonghong Song wrote: > One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at > function skb_segment(), line 3667. The bpf program attaches to > clsact ingress, calls bpf_skb_change_proto to change protocol > from ipv4 to ipv6 or from ipv6 to ipv4, an

Re: [PATCH v12 net-next 12/12] crypto: chtls - Makefile Kconfig

2018-03-20 Thread kbuild test robot
] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180320-101600 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) drivers/crypto/chelsio

Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access

2018-03-20 Thread Linus Torvalds
On Tue, Mar 20, 2018 at 1:26 AM, Ingo Molnar wrote: > > So assuming the target driver will only load on modern FPUs I *think* it > should > actually be possible to do something like (pseudocode): > > vmovdqa %ymm0, 40(%rsp) > vmovdqa %ymm1, 80(%rsp) > > ... > # use

[PATCH net-next 6/6] tls: Add receive path documentation

2018-03-20 Thread Dave Watson
Add documentation on rx path setup and cmsg interface. Signed-off-by: Dave Watson --- Documentation/networking/tls.txt | 67 ++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/tls.txt b/Documentation/networking/tls.txt

[PATCH net-next 4/6] tls: Refactor variable names

2018-03-20 Thread Dave Watson
Several config variables are prefixed with tx, drop the prefix since these will be used for both tx and rx. Signed-off-by: Dave Watson --- include/net/tls.h | 2 +- net/tls/tls_main.c | 26 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/net/

[PATCH net-next 5/6] tls: RX path for ktls

2018-03-20 Thread Dave Watson
Add rx path for tls software implementation. recvmsg, splice_read, and poll implemented. An additional sockopt TLS_RX is added, with the same interface as TLS_TX. Either TLX_RX or TLX_TX may be provided separately, or together (with two different setsockopt calls with appropriate keys). Control

[PATCH net-next 3/6] tls: Pass error code explicitly to tls_err_abort

2018-03-20 Thread Dave Watson
Pass EBADMSG explicitly to tls_err_abort. Receive path will pass additional codes - EMSGSIZE if framing is larger than max TLS record size, EINVAL if TLS version mismatch. Signed-off-by: Dave Watson --- include/net/tls.h | 6 +++--- net/tls/tls_sw.c | 2 +- 2 files changed, 4 insertions(+), 4

Re: [PATCH net-next] net: mvpp2: Don't use dynamic allocs for local variables

2018-03-20 Thread Antoine Tenart
Hi Maxime, On Tue, Mar 20, 2018 at 04:34:08PM +0100, Maxime Chevallier wrote: > @@ -2416,36 +2393,36 @@ static int mvpp2_prs_double_vlan_add(struct mvpp2 > *priv, unsigned short tpid1, > } > > if (tid >= tid_aux) { > - ret = -ERANGE; > -

[PATCH net-next 1/6] tls: Generalize zerocopy_from_iter

2018-03-20 Thread Dave Watson
Refactor zerocopy_from_iter to take arguments for pages and size, such that it can be used for both tx and rx. RX will also support zerocopy direct to output iter, as long as the full message can be copied at once (a large enough userspace buffer was provided). Signed-off-by: Dave Watson --- net

[PATCH net-next 2/6] tls: Move cipher info to a separate struct

2018-03-20 Thread Dave Watson
Separate tx crypto parameters to a separate cipher_context struct. The same parameters will be used for rx using the same struct. tls_advance_record_sn is modified to only take the cipher info. Signed-off-by: Dave Watson --- include/net/tls.h | 26 +--- net/tls/tls_main.c |

[PATCH net-next 0/6] TLS Rx

2018-03-20 Thread Dave Watson
TLS tcp socket RX implementation, to match existing TX code. This patchset completes the software TLS socket, allowing full bi-directional communication over TLS using normal socket syscalls, after the handshake has been done in userspace. Only the symmetric encryption is done in the kernel. Thi

[RFC PATCH] tls: create_ctx() can be static

2018-03-20 Thread kbuild test robot
Fixes: cf0c1a4821ae ("tls: support for Inline tls record") Signed-off-by: Fengguang Wu --- tls_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 608e6cd..42439fb 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@

Re: [PATCH v12 net-next 01/12] tls: support for Inline tls record

2018-03-20 Thread kbuild test robot
] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180320-101600 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> net/tls/tls_main.c:45

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Jeff Kirsher
On Tue, 2018-03-20 at 10:41 -0700, Joe Perches wrote: > On Tue, 2018-03-20 at 10:13 -0700, Jeff Kirsher wrote: > > Add the SPDX identifiers to all the Intel wired LAN driver files, > > as > > outlined in Documentation/process/license-rules.rst. > > So far the Documentation does not show using the

[PATCH iproute2 1/1] tc: print actual action for connmark action

2018-03-20 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_connmark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_connmark.c b/tc/m_connmark.c index 37d718541549..d5b140cbb7bd 100644 --- a/tc/m_connmark.c +++ b/tc/m_connmark.c @@ -121,7 +121,8 @@ static int print_connmark(struct action_u

Re: [net-next] intel: add SPDX identifiers to all the Intel drivers

2018-03-20 Thread Joe Perches
On Tue, 2018-03-20 at 10:13 -0700, Jeff Kirsher wrote: > Add the SPDX identifiers to all the Intel wired LAN driver files, as > outlined in Documentation/process/license-rules.rst. So far the Documentation does not show using the -only variant. For a discussion, please see: https://lkml.org/lkml/

[PATCH] netfilter: ipset: Use is_zero_ether_addr instead of static and memcmp

2018-03-20 Thread Joe Perches
To make the test a bit clearer and to reduce object size a little. Miscellanea: o remove now unnecessary static const array $ size ip_set_hash_mac.o* textdata bss dec hex filename 228224619 64 275056b71 ip_set_hash_mac.o.allyesconfig.new 229324683 6

Re: pull request: bluetooth 2018-03-16

2018-03-20 Thread Marcel Holtmann
Hi Dave, >> any issue with this pull request? I ask since it seems to have >> disappeared from patchwork. > > Should be pulled in now, don't know how that happened ;-) awesome. Thanks. Any chance you can pull net into net-next once you send it off to Linus? We have a few further Broadcom drive

Re: [PATCH net-next] fib_rules: rename FRA_PROTOCOL to FRA_ORIGINATOR

2018-03-20 Thread David Ahern
On 3/20/18 11:04 AM, Nicolas Dichtel wrote: > As the comment said, this attribute defines the originator of the rule, > it's not really a (network) protocol. > Let's rename it accordingly to avoid confusion (difference between > FRA_PROTOCOL and FRA_IP_PROTO was not obvious). > > CC: Donald Sharp

Re: [PATCH net v2 0/7] fix idr leak in actions

2018-03-20 Thread Cong Wang
On Mon, Mar 19, 2018 at 7:31 AM, Davide Caratti wrote: > This series fixes situations where a temporary failure to install a TC > action results in the permanent impossibility to reuse the configured > value of 'index'. > > Thanks to Cong Wang for the initial review. > > v2: fix build error in act

Re: [PATCH] test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches

2018-03-20 Thread Yonghong Song
On 3/20/18 10:00 AM, Thadeu Lima de Souza Cascardo wrote: On Tue, Mar 20, 2018 at 09:05:15AM -0700, Yonghong Song wrote: On 3/20/18 5:58 AM, Thadeu Lima de Souza Cascardo wrote: Function bpf_fill_maxinsns11 is designed to not be able to be JITed on x86_64. So, it fails when CONFIG_BPF_JIT_A

Re: [PATCH v2 iproute2-next 0/6] cm_id, cq, mr, and pd resource tracking

2018-03-20 Thread Doug Ledford
On 3/16/2018 12:18 PM, David Ahern wrote: > On 3/13/18 1:58 PM, Doug Ledford wrote: >> On Tue, 2018-03-13 at 13:45 -0700, David Ahern wrote: >>> On 3/13/18 1:32 AM, Leon Romanovsky wrote: On Mon, Mar 12, 2018 at 10:53:03AM -0700, David Ahern wrote: > On 3/12/18 8:16 AM, Steve Wise wrote: >

Re: [PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state

2018-03-20 Thread Eric Dumazet
On 03/20/2018 10:11 AM, David Lebrun wrote: > On 20/03/18 15:07, Eric Dumazet wrote: >> This is not the proper fix. >> >> Control path holds RTNL and can sleeep if needed. >> >> RCU should be avoided in lwtunnel_build_state() >> > > +Roopa > > In lwtunnel_build_state(), the RCU protects the lwt

  1   2   3   >