[PATCH v7 net] stmmac: added support for 802.1ad vlan stripping

2018-06-14 Thread Elad Nachman
stmmac reception handler calls stmmac_rx_vlan() to strip the vlan before calling napi_gro_receive(). The function assumes VLAN tagged frames are always tagged with 802.1Q protocol, and assigns ETH_P_8021Q to the skb by hard-coding the parameter on call to __vlan_hwaccel_put_tag() . This causes

[PATCH RFC ipsec-next] xfrm: Extend the output_mark to support input direction and masking.

2018-06-14 Thread Steffen Klassert
We already support setting an output mark at the xfrm_state, unfortunately this does not support the input direction and masking the marks that will be applied to the skb. This change adds support applying a masked value in both directions. The existing XFRMA_OUTPUT_MARK number is reused for this

Re: [bpf PATCH v2 6/6] bpf: selftest remove attempts to add LISTEN sockets to sockmap

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 09:45:12AM -0700, John Fastabend wrote: > In selftest test_maps the sockmap test case attempts to add a socket > in listening state to the sockmap. This is no longer a valid operation > so it fails as expected. However, the test wrongly reports this as an > error now. Fix th

Re: [bpf PATCH v2 5/6] bpf: sockhash, add release routine

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 09:45:07AM -0700, John Fastabend wrote: > Add map_release_uref pointer to hashmap ops. This was dropped when > original sockhash code was ported into bpf-next before initial > commit. > > Fixes: 81110384441a ("bpf: sockmap, add hash map support") > Signed-off-by: John Fasta

Re: [bpf PATCH v2 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 09:45:02AM -0700, John Fastabend wrote: > After adding checks to ensure TCP is in ESTABLISHED state when a > sock is added we need to also ensure that user does not transition > through tcp_disconnect() and back into ESTABLISHED state without > sockmap removing the sock. >

Re: [bpf PATCH v2 3/6] bpf: sockhash fix omitted bucket lock in sock_close

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 09:44:57AM -0700, John Fastabend wrote: > First in tcp_close, reduce scope of sk_callback_lock() the lock is > only needed for protecting smap_release_sock() the ingress and cork > lists are protected by sock lock. Having the lock in wider scope is > harmless but may confuse

Re: [PATCH bpf-net] selftests/bpf: delete xfrm tunnel when test exits.

2018-06-14 Thread Eyal Birger
> On 14 Jun 2018, at 15:01, William Tu wrote: > > Make the printting of bpf xfrm tunnel better and > cleanup xfrm state and policy when xfrm test finishes. Yeah the ‘tee’ was useful when developing the test - I could see what’s going on :) Now that it’s in ‘selftests’ it’s definitely better

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Yonghong Song
On 6/14/18 11:00 AM, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 14, 2018 at 02:47:59PM -0300, Arnaldo Carvalho de Melo escreveu: Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu: On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: Just out of curiosity, is there any p

Re: [bpf PATCH v2 1/6] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-14 Thread John Fastabend
On 06/14/2018 04:53 PM, Martin KaFai Lau wrote: > On Thu, Jun 14, 2018 at 09:44:46AM -0700, John Fastabend wrote: >> This fixes a crash where we assign tcp_prot to IPv6 sockets instead >> of tcpv6_prot. >> >> Previously we overwrote the sk->prot field with tcp_prot even in the >> AF_INET6 case. Thi

Mutual Coperation Thank you

2018-06-14 Thread Mr Obama Basolle.
-- Dear Friend, I know that this message will come to you as a surprise. I am the Auditing and Accounting section manager with African Development Bank, Ouagadougou Burkina faso. I Hope that you will not expose or betray this trust and confident that I am about to repose on you for the mutual ben

Re: [PATCH] rds: avoid unenecessary cong_update in loop transport

2018-06-14 Thread David Miller
From: Santosh Shilimkar Date: Thu, 14 Jun 2018 11:52:34 -0700 > Loop transport which is self loopback, remote port congestion > update isn't relevant. Infact the xmit path already ignores it. > Receive path needs to do the same. > > Reported-by: syzbot+4c20b3866171ce844...@syzkaller.appspotmail.

Re: [PATCH net-next 1/1] tc-testing: initial version of tunnel_key unit tests

2018-06-14 Thread David Miller
From: Keara Leibovitz Date: Thu, 14 Jun 2018 14:05:42 -0400 > Signed-off-by: Keara Leibovitz Please resubmit when net-next opens back up.

Re: [PATCHv2 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-14 Thread David Miller
From: Xin Long Date: Thu, 14 Jun 2018 11:44:48 +0800 > This feature is actually already supported by sk->sk_reuse which can be > set by socket level opt SO_REUSEADDR. But it's not working exactly as > RFC6458 demands in section 8.1.27, like: > > - This option only supports one-to-one style SCT

Re: [PATCH bpf-net] selftests/bpf: delete xfrm tunnel when test exits.

2018-06-14 Thread Daniel Borkmann
On 06/15/2018 02:05 AM, Daniel Borkmann wrote: > On 06/15/2018 12:30 AM, Martin KaFai Lau wrote: >> On Thu, Jun 14, 2018 at 05:01:06AM -0700, William Tu wrote: >>> Make the printting of bpf xfrm tunnel better and >>> cleanup xfrm state and policy when xfrm test finishes. >> LGTM. The subject tag a

Re: [PATCH 1/1] selftest: check tunnel type more accurately

2018-06-14 Thread Daniel Borkmann
On 06/13/2018 06:53 PM, Y Song wrote: > On Wed, Jun 13, 2018 at 5:03 AM, Wang Jian wrote: >> Grep tunnel type directly to make sure 'ip' command supports it. >> >> Signed-off-by: Jian Wang > > Acked-by: Yonghong Song Applied to bpf, thanks Jian!

Re: [PATCH bpf 0/2] bpf: fix the load time reporting and make offload test more resilient

2018-06-14 Thread Daniel Borkmann
On 06/14/2018 08:06 PM, Jakub Kicinski wrote: > Hi! > > This small series allows test_offload.py selftest to run on modern > distributions which may create BPF programs for cgroups at boot, > like Ubuntu 18.04. We still expect the program list to not be > altered by any other agent while the test

[PATCH net 2/2] tls: fix waitall behavior in tls_sw_recvmsg

2018-06-14 Thread Daniel Borkmann
Current behavior in tls_sw_recvmsg() is to wait for incoming tls messages and copy up to exactly len bytes of data that the user provided. This is problematic in the sense that i) if no packet is currently queued in strparser we keep waiting until one has been processed and pushed into tls receive

[PATCH net 1/2] tls: fix use-after-free in tls_push_record

2018-06-14 Thread Daniel Borkmann
syzkaller managed to trigger a use-after-free in tls like the following: BUG: KASAN: use-after-free in tls_push_record.constprop.15+0x6a2/0x810 [tls] Write of size 1 at addr 88037aa08000 by task a.out/2317 CPU: 3 PID: 2317 Comm: a.out Not tainted 4.17.0+ #144 Hardware name: LENOVO 20F

[PATCH net 0/2] Two tls fixes

2018-06-14 Thread Daniel Borkmann
First one is syzkaller trigered uaf and second one noticed while writing test code with tls ulp. For details please see individual patches. Thanks! Daniel Borkmann (2): tls: fix use-after-free in tls_push_record tls: fix waitall behavior in tls_sw_recvmsg net/tls/tls_sw.c | 32 +

[PATCH bpf 0/2] Two bpf fixes

2018-06-14 Thread Daniel Borkmann
First one is a panic I ran into while testing the second one where we got several syzkaller reports. Series here fixes both. Thanks! Daniel Borkmann (2): bpf: fix panic in prog load calls cleanup bpf: reject any prog that failed read-only lock include/linux/filter.h | 63 +++

[PATCH bpf 2/2] bpf: reject any prog that failed read-only lock

2018-06-14 Thread Daniel Borkmann
We currently lock any JITed image as read-only via bpf_jit_binary_lock_ro() as well as the BPF image as read-only through bpf_prog_lock_ro(). In the case any of these would fail we throw a WARN_ON_ONCE() in order to yell loudly to the log. Perhaps, to some extend, this may be comparable to an alloc

[PATCH bpf 1/2] bpf: fix panic in prog load calls cleanup

2018-06-14 Thread Daniel Borkmann
While testing I found that when hitting error path in bpf_prog_load() where we jump to free_used_maps and prog contained BPF to BPF calls that were JITed earlier, then we never clean up the bpf_prog_kallsyms_add() done under jit_subprogs(). Add proper API to make BPF kallsyms deletion more clear an

Re: [bpf PATCH v2 2/6] bpf: sockmap only allow ESTABLISHED sock state

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 09:44:52AM -0700, John Fastabend wrote: > Per the note in the TLS ULP (which is actually a generic statement > regarding ULPs) > > /* The TLS ulp is currently supported only for TCP sockets > * in ESTABLISHED state. > * Supporting sockets in LISTEN state will require u

Re: [PATCH net 0/4] l2tp: pppol2tp_connect() fixes

2018-06-14 Thread David Miller
From: Guillaume Nault Date: Wed, 13 Jun 2018 15:09:16 +0200 > This series fixes a few remaining issues with pppol2tp_connect(). > > It doesn't try to prevent invalid configurations that have no effect on > kernel's reliability. That would be work for a future patch set. > > Patch 2 is the most

Re: [PATCH v1 net-next] stmmac: fix DMA channel hang in half-duplex mode

2018-06-14 Thread David Miller
From: Bhadram Varka Date: Wed, 13 Jun 2018 10:00:48 +0530 > HW does not support Half-duplex mode in multi-queue > scenario. Fix it by not advertising the Half-Duplex > mode if multi-queue enabled. > > Signed-off-by: Bhadram Varka Bug fixes should be submitted against net, not net-next. And ne

Re: [PATCH bpf-net] selftests/bpf: delete xfrm tunnel when test exits.

2018-06-14 Thread Daniel Borkmann
On 06/15/2018 12:30 AM, Martin KaFai Lau wrote: > On Thu, Jun 14, 2018 at 05:01:06AM -0700, William Tu wrote: >> Make the printting of bpf xfrm tunnel better and >> cleanup xfrm state and policy when xfrm test finishes. > LGTM. The subject tag actually meant s/bpf-net/bpf-next/? > > It makes sens

Re: [PATCH v3] tcp: verify the checksum of the first data segment in a new connection

2018-06-14 Thread David Miller
From: Frank van der Linden Date: Tue, 12 Jun 2018 23:09:37 + > commit 079096f103fa ("tcp/dccp: install syn_recv requests into ehash > table") introduced an optimization for the handling of child sockets > created for a new TCP connection. > > But this optimization passes any data associated

Re: [bpf PATCH v2 1/6] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 09:44:46AM -0700, John Fastabend wrote: > This fixes a crash where we assign tcp_prot to IPv6 sockets instead > of tcpv6_prot. > > Previously we overwrote the sk->prot field with tcp_prot even in the > AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot >

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-14 Thread Eric Dumazet
On 06/14/2018 02:04 PM, Saeed Mahameed wrote: > I was looking at the code without my fix :) > > with my fix: > release = frags->page_offset + frag_info->frag_stride > PAGE_SIZE; > > for XDP: frag_info->frag_stride is PAGE_SIZE, so release will always be > true regardless of PAGE_SIZE. > > So

Re: [PATCH bpf-net] selftests/bpf: delete xfrm tunnel when test exits.

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 05:01:06AM -0700, William Tu wrote: > Make the printting of bpf xfrm tunnel better and > cleanup xfrm state and policy when xfrm test finishes. LGTM. The subject tag actually meant s/bpf-net/bpf-next/? It makes sense to be in bpf-next but I think bpf-next is still closed.

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-14 Thread Saeed Mahameed
On Thu, 2018-06-14 at 20:53 +, Saeed Mahameed wrote: > On Thu, 2018-06-14 at 13:47 -0700, sae...@mellanox.com wrote: > > On Thu, 2018-06-14 at 12:12 -0700, Eric Dumazet wrote: > > > > > > On 06/14/2018 11:56 AM, Saeed Mahameed wrote: > > > > > > > Interestingly for this exact frag_stride we d

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-14 Thread Saeed Mahameed
On Thu, 2018-06-14 at 13:47 -0700, sae...@mellanox.com wrote: > On Thu, 2018-06-14 at 12:12 -0700, Eric Dumazet wrote: > > > > On 06/14/2018 11:56 AM, Saeed Mahameed wrote: > > > > > Interestingly for this exact frag_stride we don't have an issue > > > :) > > > since it goes through a different c

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-14 Thread Saeed Mahameed
On Thu, 2018-06-14 at 12:12 -0700, Eric Dumazet wrote: > > On 06/14/2018 11:56 AM, Saeed Mahameed wrote: > > > Interestingly for this exact frag_stride we don't have an issue :) > > since it goes through a different condition branch > > (the page flipping thing): > > > > if (frag_info->frag_stri

Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-14 Thread Andrei Vagin
On Wed, Jun 13, 2018 at 06:17:41PM -0700, Eric Dumazet wrote: > On Wed, Jun 13, 2018 at 5:56 PM Andrei Vagin wrote: > > > The commit f396922d862a added a check to not allow changing > > SO_REUSEADDR/SO_REUSEPORT on bound sockets. First, it doesn't > > take into account that TCP_REPAIR changes SO_

Re: List of Networking enhancements and bug fixes in a particular release

2018-06-14 Thread Joe Smith
Matthew, Thanks a lot for pointing this out to me. It is extremely helpful. Regards On Thu, Jun 14, 2018 at 12:19 PM, tedheadster wrote: > On Thu, Jun 14, 2018 at 1:21 PM, Joe Smith wrote: >> >> What is the best and authoritative mechanism to find out networking >> enhancements in a Linux rele

Re: List of Networking enhancements and bug fixes in a particular release

2018-06-14 Thread tedheadster
On Thu, Jun 14, 2018 at 1:21 PM, Joe Smith wrote: > > What is the best and authoritative mechanism to find out networking > enhancements in a Linux release? > Joe, there usually is a good summary a few days after a kernel release on the Kernel Newbies site. Here is a recent one: https://kernel

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-14 Thread Eric Dumazet
On 06/14/2018 11:56 AM, Saeed Mahameed wrote: > Interestingly for this exact frag_stride we don't have an issue :) > since it goes through a different condition branch > (the page flipping thing): > > if (frag_info->frag_stride == PAGE_SIZE / 2) { > frags->page_offset ^= PAGE_SIZE / 2; >

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-14 Thread Saeed Mahameed
On Wed, 2018-06-13 at 19:30 -0700, Eric Dumazet wrote: > > On 06/13/2018 05:53 PM, Saeed Mahameed wrote: > > When a new rx packet arrives, the rx path will decide whether to > > reuse > > the same page or not according to the current rx frag page offset > > and > > frag size, i.e: > > release = fr

[PATCH] rds: avoid unenecessary cong_update in loop transport

2018-06-14 Thread Santosh Shilimkar
Loop transport which is self loopback, remote port congestion update isn't relevant. Infact the xmit path already ignores it. Receive path needs to do the same. Reported-by: syzbot+4c20b3866171ce844...@syzkaller.appspotmail.com Reviewed-by: Sowmini Varadhan Signed-off-by: Santosh Shilimkar ---

List of Networking enhancements and bug fixes in a particular release

2018-06-14 Thread Joe Smith
Hi Folks, What is the best and authoritative mechanism to find out networking enhancements in a Linux release? Regards -- JS

[PATCH bpf 0/2] bpf: fix the load time reporting and make offload test more resilient

2018-06-14 Thread Jakub Kicinski
Hi! This small series allows test_offload.py selftest to run on modern distributions which may create BPF programs for cgroups at boot, like Ubuntu 18.04. We still expect the program list to not be altered by any other agent while the test is running, but no longer depend on there being no BPF pr

[PATCH bpf 1/2] tools: bpftool: improve accuracy of load time

2018-06-14 Thread Jakub Kicinski
BPF program load time is reported from the kernel relative to boot time. If conversion to wall clock does not take nanosecond parts into account, the load time reported by bpftool may differ by one second from run to run. This means JSON object reported by bpftool for a program will randomly chang

[PATCH bpf 2/2] selftests/bpf: test offloads even with BPF programs present

2018-06-14 Thread Jakub Kicinski
Modern distroes increasingly make use of BPF programs. Default Ubuntu 18.04 installation boots with a number of cgroup_skb programs loaded. test_offloads.py tries to check if programs and maps are not leaked on error paths by confirming the list of programs on the system is empty between tests.

[PATCH net-next 1/1] tc-testing: initial version of tunnel_key unit tests

2018-06-14 Thread Keara Leibovitz
Signed-off-by: Keara Leibovitz --- .../tc-testing/tc-tests/actions/tunnel_key.json| 676 + 1 file changed, 676 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/tunnel_key.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 02:47:59PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu: > > On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: > > > Just out of curiosity, is there any plan to have this as a clang option? > > I thin

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu: > On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: > > Just out of curiosity, is there any plan to have this as a clang option? > I think > clang ... -mllvm -mattr=dwarfris > should work. [root@jouet bpf]# cat ~/.perfconf

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu: > On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: > > > > Just out of curiosity, is there any plan to have this as a clang option? > > I think > clang ... -mllvm -mattr=dwarfris thanks, trying... - Arnaldo

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-14 Thread David Miller
From: Xin Long Date: Thu, 14 Jun 2018 07:37:02 +0800 > Now sctp GSO uses skb_gro_receive() to append the data into head > skb frag_list. However it actually only needs very few code from > skb_gro_receive(). Besides, NAPI_GRO_CB has to be set while most > of its members are not needed here. > >

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Alexei Starovoitov
On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: Just out of curiosity, is there any plan to have this as a clang option? I think clang ... -mllvm -mattr=dwarfris should work.

Re: [PATCH net-next,RFC 00/13] New fast forwarding path

2018-06-14 Thread David Miller
From: Pablo Neira Ayuso Date: Thu, 14 Jun 2018 16:19:34 +0200 > This patchset proposes a new fast forwarding path infrastructure > that combines the GRO/GSO and the flowtable infrastructures. The > idea is to add a hook at the GRO layer that is invoked before the > standard GRO protocol offloads.

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 09:22:27AM -0700, Martin KaFai Lau escreveu: > On Thu, Jun 14, 2018 at 12:03:34PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > > 1. The tools/testing/selftests/bpf/Makefile has the CLANG_FLAGS and > > > > > >LLC_FLAGS needed to compile the bpf prog. It requires a

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-14 Thread David Ahern
On 6/14/18 6:38 AM, Kirill Tkhai wrote: > The following script makes kernel to crash since it can't obtain > a name for a device, when the name is occupied by another device: > > #!/bin/bash > ifconfig eth0 down > ifconfig eth1 down > index=`cat /sys/class/net/eth1/ifindex` > ip link set eth1 name

Re: [bpf PATCH 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-14 Thread John Fastabend
On 06/13/2018 10:48 PM, John Fastabend wrote: > On 06/13/2018 05:56 PM, Martin KaFai Lau wrote: >> On Wed, Jun 13, 2018 at 10:50:14AM -0700, John Fastabend wrote: >>> After adding checks to ensure TCP is in ESTABLISHED state when a >>> sock is added we need to also ensure that user does not transit

[bpf PATCH v2 5/6] bpf: sockhash, add release routine

2018-06-14 Thread John Fastabend
Add map_release_uref pointer to hashmap ops. This was dropped when original sockhash code was ported into bpf-next before initial commit. Fixes: 81110384441a ("bpf: sockmap, add hash map support") Signed-off-by: John Fastabend --- 0 files changed diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/s

[bpf PATCH v2 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-14 Thread John Fastabend
After adding checks to ensure TCP is in ESTABLISHED state when a sock is added we need to also ensure that user does not transition through tcp_disconnect() and back into ESTABLISHED state without sockmap removing the sock. To do this add unhash hook and remove sock from map there. Reported-by: E

[bpf PATCH v2 6/6] bpf: selftest remove attempts to add LISTEN sockets to sockmap

2018-06-14 Thread John Fastabend
In selftest test_maps the sockmap test case attempts to add a socket in listening state to the sockmap. This is no longer a valid operation so it fails as expected. However, the test wrongly reports this as an error now. Fix the test to avoid adding sockets in listening state. Signed-off-by: John

[bpf PATCH v2 2/6] bpf: sockmap only allow ESTABLISHED sock state

2018-06-14 Thread John Fastabend
Per the note in the TLS ULP (which is actually a generic statement regarding ULPs) /* The TLS ulp is currently supported only for TCP sockets * in ESTABLISHED state. * Supporting sockets in LISTEN state will require us * to modify the accept implementation to clone rather then * share the

[bpf PATCH v2 3/6] bpf: sockhash fix omitted bucket lock in sock_close

2018-06-14 Thread John Fastabend
First in tcp_close, reduce scope of sk_callback_lock() the lock is only needed for protecting smap_release_sock() the ingress and cork lists are protected by sock lock. Having the lock in wider scope is harmless but may confuse the reader who may infer it is in fact needed. Next, in sock_hash_dele

[bpf PATCH v2 0/6] BPF fixes for sockhash

2018-06-14 Thread John Fastabend
This addresses two syzbot issues that lead to identifing (by Eric and Wei) a class of bugs where we don't correctly check for IPv4/v6 sockets and their associated state. The second issue was a locking error in sockhash. The first 2 patches address handling IPv4 correctly and then ensuring that onl

[bpf PATCH v2 1/6] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-14 Thread John Fastabend
This fixes a crash where we assign tcp_prot to IPv6 sockets instead of tcpv6_prot. Previously we overwrote the sk->prot field with tcp_prot even in the AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot are used. Further, only allow ESTABLISHED connections to join the map per no

Miss Ebtisam

2018-06-14 Thread Miss Ebtisam musa ibrahim
My Name is Miss Ebtisam musa Ibrahim.docx Description: MS-Word 2007 document

Re: [PATCH iproute2-next v2] ip-xfrm: Add support for OUTPUT_MARK

2018-06-14 Thread David Ahern
On 6/13/18 11:09 PM, Subash Abhinov Kasiviswanathan wrote: > The output mark differs from the existing xfrm mark in two ways: > > 1. The xfrm mark is used to match xfrm policies and states, while >    the xfrm output mark is used to set the mark (and influence >    the routing) of the packets emit

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 12:03:34PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > 1. The tools/testing/selftests/bpf/Makefile has the CLANG_FLAGS and > > > > >LLC_FLAGS needed to compile the bpf prog. It requires a new > > > > >"-mattr=dwarf" llc option which was added to the future > >

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Dinh Nguyen
On Thu, Jun 14, 2018 at 10:23 AM Jose Abreu wrote: > > On 14-06-2018 15:21, Dinh Nguyen wrote: > > > > [0.835537] socfpga-dwmac ff702000.ethernet: PTP uses main clock > > [0.841794] socfpga-dwmac ff702000.ethernet: Version ID not available > > [0.848223] socfpga-dwmac ff702000.ethernet

Re: [PATCH net] KEYS: DNS: fix parsing multiple options

2018-06-14 Thread David Howells
Simon Horman wrote: > > - eq = memchr(opt, '=', opt_len) ?: end; > > + eq = memchr(opt, '=', opt_len) ?: next_opt; > > opt_nlen = eq - opt; > > eq++; > > It seems risky to advance eq++ in the case there the value is empt

Re: [PATCH net] KEYS: DNS: fix parsing multiple options

2018-06-14 Thread David Howells
The fix seems to work, but the use of kstrtoul(): ret = kstrtoul(eq, 10, &derrno); is incorrect since the buffer can't been modified to block out the next argument if there is one, so the following fails: perl -e 'print "#dnserror=1#", "\x00" x 1' | keyctl padd dns_resolv

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Jose Abreu
On 14-06-2018 15:21, Dinh Nguyen wrote: > > [0.835537] socfpga-dwmac ff702000.ethernet: PTP uses main clock > [0.841794] socfpga-dwmac ff702000.ethernet: Version ID not available > [0.848223] socfpga-dwmac ff702000.ethernet: DWMAC1000 > [0.853454] socfpga-dwmac ff702000.ethe

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 13, 2018 at 04:26:38PM -0700, Martin KaFai Lau escreveu: > On Tue, Jun 12, 2018 at 05:41:26PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jun 12, 2018 at 05:31:24PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Thu, Jun 07, 2018 at 01:07:01PM -0700, Martin KaFai Lau escreveu

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Dinh Nguyen
On Thu, Jun 14, 2018 at 6:14 AM Marek Vasut wrote: > > On 06/14/2018 10:18 AM, Jose Abreu wrote: > > On 14-06-2018 08:38, Jose Abreu wrote: > >> Hello, > >> > >> On 13-06-2018 21:46, Dinh Nguyen wrote: > >>> Hi, > >>> > >>> The stmmac ethernet has stopped working in linux-next and linus/master > >

Re: [PATCH iproute2 v2] ipaddress: strengthen check on 'label' input

2018-06-14 Thread Patrick Talbert
On Fri, Jun 1, 2018 at 9:56 PM, Stephen Hemminger wrote: > On Tue, 29 May 2018 16:57:07 +0200 > Patrick Talbert wrote: > >> As mentioned in the ip-address man page, an address label must >> be equal to the device name or prefixed by the device name >> followed by a colon. Currently the only check

[PATCH iproute2 v3] ipaddress: strengthen check on 'label' input

2018-06-14 Thread Patrick Talbert
As mentioned in the ip-address man page, an address label must be equal to the device name or prefixed by the device name followed by a colon. Currently the only check on this input is to see if the device name appears at the beginning of the label string. This commit adds an additional check to e

Re: [PATCH net 1/2] ipv4: igmp: use alarmtimer to prevent delayed reports

2018-06-14 Thread Tejaswi Tanikella
On Wed, Jun 13, 2018 at 04:44:37PM +0200, Andrew Lunn wrote: > While it has been asleep, it has also been dropping any multicast > traffic in the stream. So it does not really matter it has left the > group. You were not receiving the packets anyway. > > Thing about this from another angle. I have

[PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-14 Thread Kirill Tkhai
The following script makes kernel to crash since it can't obtain a name for a device, when the name is occupied by another device: #!/bin/bash ifconfig eth0 down ifconfig eth1 down index=`cat /sys/class/net/eth1/ifindex` ip link set eth1 name dev$index unshare -n sleep 1h & pid=$! while [[ "`readl

[PATCH bpf-net] selftests/bpf: delete xfrm tunnel when test exits.

2018-06-14 Thread William Tu
Make the printting of bpf xfrm tunnel better and cleanup xfrm state and policy when xfrm test finishes. Signed-off-by: William Tu --- tools/testing/selftests/bpf/test_tunnel.sh | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/

Re: [PATCHv2 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-14 Thread Neil Horman
On Thu, Jun 14, 2018 at 11:44:48AM +0800, Xin Long wrote: > This feature is actually already supported by sk->sk_reuse which can be > set by socket level opt SO_REUSEADDR. But it's not working exactly as > RFC6458 demands in section 8.1.27, like: > > - This option only supports one-to-one style

Re: [PATCH] selftests: bpf: config: add config fragments

2018-06-14 Thread Anders Roxell
On 14 June 2018 at 13:06, William Tu wrote: > On Tue, Jun 12, 2018 at 5:08 PM, Daniel Borkmann wrote: >> On 06/12/2018 01:05 PM, Anders Roxell wrote: >>> Tests test_tunnel.sh fails due to config fragments ins't enabled. >>> >>> Fixes: 933a741e3b82 ("selftests/bpf: bpf tunnel test.") >>> Signed-of

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
On Thu, Jun 14, 2018 at 01:39:58PM +0200, Jiri Pirko wrote: > Thu, Jun 14, 2018 at 01:34:04PM CEST, ilias.apalodi...@linaro.org wrote: > >On Thu, Jun 14, 2018 at 01:30:28PM +0200, Jiri Pirko wrote: > >> Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: > >> > >> [...] > >>

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Jiri Pirko
Thu, Jun 14, 2018 at 01:34:04PM CEST, ilias.apalodi...@linaro.org wrote: >On Thu, Jun 14, 2018 at 01:30:28PM +0200, Jiri Pirko wrote: >> Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: >> >> [...] >> >> >@@ -2711,6 +2789,10 @@ static int cpsw_probe_dt(struct cpsw_platform

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-14 Thread Neil Horman
On Wed, Jun 13, 2018 at 07:05:59PM -0700, David Miller wrote: > From: Neil Horman > Date: Wed, 13 Jun 2018 20:46:43 -0400 > > > Do you have any performance numbers to compare with and without this > > patch? Adding a function like this implies that any fixes that go > > into skb_gro_receive now

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-14 Thread Neil Horman
On Thu, Jun 14, 2018 at 09:21:52AM +0800, Xin Long wrote: > On Thu, Jun 14, 2018 at 8:46 AM, Neil Horman wrote: > > On Thu, Jun 14, 2018 at 07:37:02AM +0800, Xin Long wrote: > >> Now sctp GSO uses skb_gro_receive() to append the data into head > >> skb frag_list. However it actually only needs ver

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
On Thu, Jun 14, 2018 at 01:30:28PM +0200, Jiri Pirko wrote: > Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: > > [...] > > >@@ -2711,6 +2789,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data > >*data, > > if (of_property_read_bool(node, "dual_emac")) > >

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
On Thu, Jun 14, 2018 at 01:23:49PM +0200, Jiri Pirko wrote: > Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: > >This patch enables switchdev funtionality on the driver based on a > >.config option(CONFIG_TI_CPSW_SWITCHDEV). CPSW driver used a DTS option > >called dual_emac

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Jiri Pirko
Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: [...] >@@ -2711,6 +2789,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data >*data, > if (of_property_read_bool(node, "dual_emac")) > data->switch_mode = CPSW_DUAL_EMAC; > >+ /* switchdev over

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Jiri Pirko
Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: >This patch enables switchdev funtionality on the driver based on a >.config option(CONFIG_TI_CPSW_SWITCHDEV). CPSW driver used a DTS option >called dual_emac to enable switch or dual emac mode. The new config option >will ove

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Marek Vasut
On 06/14/2018 10:18 AM, Jose Abreu wrote: > On 14-06-2018 08:38, Jose Abreu wrote: >> Hello, >> >> On 13-06-2018 21:46, Dinh Nguyen wrote: >>> Hi, >>> >>> The stmmac ethernet has stopped working in linux-next and linus/master >>> branch(v4.17-11782-gbe779f03d563) >>> >>> It appears that the stmmac

[RFC v2, net-next, PATCH 2/4] net/cpsw_ale: add functions to modify VLANs/MDBs

2018-06-14 Thread Ilias Apalodimas
A following patch introduces switchdev functionality. Add functions to cpsw ALE engine to modify VLANs/MDBs Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw_ale.c | 188 - drivers/net/ethernet/ti/cpsw_ale.h | 10 ++ 2 files changed, 195 insert

[RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
This patch enables switchdev funtionality on the driver based on a .config option(CONFIG_TI_CPSW_SWITCHDEV). CPSW driver used a DTS option called dual_emac to enable switch or dual emac mode. The new config option will override this configuration. It creates 2 ports, eth0 and eth1(that can be rena

[RFC v2, net-next, PATCH 1/4] net/cpsw: move common headers definitions to cpsw_priv.h

2018-06-14 Thread Ilias Apalodimas
A following patch introduces switchdev functionality. Move common definitions to a private header file Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw.c | 111 +--- drivers/net/ethernet/ti/cpsw_priv.h | 141 2 fil

[RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW

2018-06-14 Thread Ilias Apalodimas
Hello, This the RFC v2 which does not register the CPU port based on net-next. I didn't manage to rewrite the driver and splitting it to common library-old-new but, i did reorganize the patches a bit based on Andrew's suggestions. Hopefully it's easier to read. patch #1: Prepares headers files

[RFC v2, net-next, PATCH 3/4] net/cpsw: prepare cpsw for switchdev support

2018-06-14 Thread Ilias Apalodimas
A following patch introduces switchdev functionality. Prepare cpsw driver to accommodate an extra mode of operation using switchdev. This patch does not changes the cpsw driver current functionality Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw.c | 146 +++

Re: [PATCH bpf v2] xdp: Fix handling of devmap in generic XDP

2018-06-14 Thread Jesper Dangaard Brouer
On Thu, 14 Jun 2018 18:00:22 +0900 Toshiaki Makita wrote: > On 2018/06/14 17:49, Jesper Dangaard Brouer wrote: > > On Thu, 14 Jun 2018 11:07:42 +0900 > > Toshiaki Makita wrote: > > > >> Commit 67f29e07e131 ("bpf: devmap introduce dev_map_enqueue") changed > >> the return value type of __devma

Re: Request to enable setting the nested network namespace

2018-06-14 Thread Jiri Pirko
Thu, Jun 14, 2018 at 10:04:57AM CEST, pamela@gmail.com wrote: >In linux, set up 2 network namespaces, ns1 and ns2. "ip netns list" >can view the 2 network namespaces. >Move one network device from linux root namespace to ns1 then from ns1 >to ns2, then delete ns2, >expect that network device ca

Re: [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx

2018-06-14 Thread Toshiaki Makita
On 2018/06/14 18:14, Malek, Patryk wrote: >> On 2018/06/13 18:06, Daniel Borkmann wrote: >>> On 06/13/2018 10:08 AM, Toshiaki Makita wrote: i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data - xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary >> here and mac_header/dat

RE: [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx

2018-06-14 Thread Malek, Patryk
> On 2018/06/13 18:06, Daniel Borkmann wrote: > > On 06/13/2018 10:08 AM, Toshiaki Makita wrote: > >> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data - > >> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary > here > >> and mac_header/data feilds in skb becomes incorrect, and break

Re: [PATCH bpf v2] xdp: Fix handling of devmap in generic XDP

2018-06-14 Thread Toshiaki Makita
On 2018/06/14 17:49, Jesper Dangaard Brouer wrote: > On Thu, 14 Jun 2018 11:07:42 +0900 > Toshiaki Makita wrote: > >> Commit 67f29e07e131 ("bpf: devmap introduce dev_map_enqueue") changed >> the return value type of __devmap_lookup_elem() from struct net_device * >> to struct bpf_dtab_netdev * bu

Re: [PATCH bpf v2] xdp: Fix handling of devmap in generic XDP

2018-06-14 Thread Jesper Dangaard Brouer
On Thu, 14 Jun 2018 11:07:42 +0900 Toshiaki Makita wrote: > Commit 67f29e07e131 ("bpf: devmap introduce dev_map_enqueue") changed > the return value type of __devmap_lookup_elem() from struct net_device * > to struct bpf_dtab_netdev * but forgot to modify generic XDP code > accordingly. > Thus ge

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-06-14 Thread Kristian Evensen
Hello, On Tue, Jun 12, 2018 at 10:29 AM, Kristian Evensen wrote: > Thanks for spending time on this. I will see what I can manage in > terms of a bisect. Our last good kernel was 4.9, so at least it > narrows the scope down a bit compared to 4.4 or 4.1. I hope we might have got somewhere. While

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Jose Abreu
On 14-06-2018 08:38, Jose Abreu wrote: > Hello, > > On 13-06-2018 21:46, Dinh Nguyen wrote: >> Hi, >> >> The stmmac ethernet has stopped working in linux-next and linus/master >> branch(v4.17-11782-gbe779f03d563) >> >> It appears that the stmmac ethernet has stopped working after these 2 >> commit

Request to enable setting the nested network namespace

2018-06-14 Thread Pamela Mei
In linux, set up 2 network namespaces, ns1 and ns2. "ip netns list" can view the 2 network namespaces. Move one network device from linux root namespace to ns1 then from ns1 to ns2, then delete ns2, expect that network device can move back to ns1, but actual result is that eth1 is back to linux roo

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Jose Abreu
Hello, On 13-06-2018 21:46, Dinh Nguyen wrote: > Hi, > > The stmmac ethernet has stopped working in linux-next and linus/master > branch(v4.17-11782-gbe779f03d563) > > It appears that the stmmac ethernet has stopped working after these 2 commits: > > 4dbbe8dde848 net: stmmac: Add support for U32 T

  1   2   >