[PATCH] stmmac: Don't access tx_q->dirty_tx before netif_tx_lock

2017-10-20 Thread Bernd Edlinger
This is the possible reason for different hard to reproduce problems on my ARMv7-SMP test system. The symptoms are in recent kernels imprecise external aborts, and in older kernels various kinds of network stalls and unexpected page allocation failures. My testing indicates that the trouble start

Re: [PATCH net 0/2] net: diag: fix a potential security issue

2017-10-20 Thread Xin Long
On Sat, Oct 21, 2017 at 2:18 PM, Eric Dumazet wrote: > On Fri, Oct 20, 2017 at 11:06 PM, Xin Long wrote: >> >> >> On Sat, Oct 21, 2017 at 9:27 AM, David Miller wrote: >>> >>> From: Xin Long >>> Date: Thu, 19 Oct 2017 15:32:23 +0800 >>> >>> > This patch is to void the potential security issue th

[PATCH net-next] selftests/bpf: fix broken build of test_maps

2017-10-20 Thread Alexei Starovoitov
fix broken tests Fixes: e043325b3087 ("bpf: Add tests for eBPF file mode") Fixes: 6e71b04a8224 ("bpf: Add file mode configuration into bpf maps") Signed-off-by: Alexei Starovoitov --- Chenbo, this was very broken patch submission. Please make sure to actually compile your tests before sending pa

Re: [PATCH net 0/2] net: diag: fix a potential security issue

2017-10-20 Thread Eric Dumazet
On Fri, Oct 20, 2017 at 11:06 PM, Xin Long wrote: > > > On Sat, Oct 21, 2017 at 9:27 AM, David Miller wrote: >> >> From: Xin Long >> Date: Thu, 19 Oct 2017 15:32:23 +0800 >> >> > This patch is to void the potential security issue that the family >> > or protocol modules are autoloaded when reque

[PATCH] net: can: dev: remove unused code in can_restart

2017-10-20 Thread Gustavo A. R. Silva
Value assigned to variable err is overwritten at line 562: err = priv->do_set_mode(dev, CAN_MODE_START); before it can be used. Also, notice that this code has been there since 2014. Addresses-Coverity-ID: 1227031 Signed-off-by: Gustavo A. R. Silva --- This code was tested by compilation only.

Re: [net-next v2 3/4] openvswitch: Add meter infrastructure

2017-10-20 Thread Pravin Shelar
On Thu, Oct 19, 2017 at 5:58 PM, Andy Zhou wrote: > > On Thu, Oct 19, 2017 at 02:47 Pravin Shelar wrote: >> >> On Tue, Oct 17, 2017 at 12:36 AM, Andy Zhou wrote: >> > OVS kernel datapath so far does not support Openflow meter action. >> > This is the first stab at adding kernel datapath meter su

Re: [patch net-next v2 00/20] net: sched: convert cls ndo_setup_tc offload calls to per-block callbacks

2017-10-20 Thread David Miller
From: Jiri Pirko Date: Thu, 19 Oct 2017 15:50:28 +0200 > This patchset is a bit bigger, but most of the patches are doing the > same changes in multiple classifiers and drivers. I could do some > squashes, but I think it is better split. > > This is another dependency on the way to shared block

Re: [PATCH net] geneve: Fix function matching VNI and tunnel ID on big-endian

2017-10-20 Thread David Miller
From: Stefano Brivio Date: Thu, 19 Oct 2017 13:31:28 +0200 > On big-endian machines, functions converting between tunnel ID > and VNI use the three LSBs of tunnel ID storage to map VNI. > > The comparison function eq_tun_id_and_vni(), on the other hand, > attempted to map the VNI from the three

Re: pull-request: can 2017-10-19

2017-10-20 Thread David Miller
From: Marc Kleine-Budde Date: Thu, 19 Oct 2017 13:19:34 +0200 > this is a pull request of 11 patches for the upcoming 4.14 release. > > There are 6 patches by ZHU Yi for the flexcan driver, that work around > the CAN error handling state transition problems found in various > incarnations of the

Re: [PATCH net 0/2] net: diag: fix a potential security issue

2017-10-20 Thread David Miller
From: Xin Long Date: Thu, 19 Oct 2017 15:32:23 +0800 > This patch is to void the potential security issue that the family > or protocol modules are autoloaded when requesting _diag module by > not requesting _diag module if the family or protocol is not added > or registered in sock_diag and inet

Re: [PATCH net-next] ipv6: let trace_fib6_table_lookup() dereference the fib table

2017-10-20 Thread David Miller
From: Paolo Abeni Date: Thu, 19 Oct 2017 09:31:43 +0200 > The perf traces for ipv6 routing code show a relevant cost around > trace_fib6_table_lookup(), even if no trace is enabled. This is > due to the fib6_table de-referencing currently performed by the > caller. > > Let's the tracing code pay

Re: pull request: bluetooth-next 2017-10-19

2017-10-20 Thread David Miller
From: Johan Hedberg Date: Thu, 19 Oct 2017 09:29:14 +0300 > Here's the first bluetooth-next pull request targeting the 4.15 kernel > release. > > - Multiple fixes & improvements to the hci_bcm driver > - DT improvements, e.g. new local-bd-address property > - Fixes & improvements to ECDH usag

Re: [PATCH net] hv_sock: add locking in the open/close/release code paths

2017-10-20 Thread David Miller
From: Dexuan Cui Date: Thu, 19 Oct 2017 03:33:14 + > > Without the patch, when hvs_open_connection() hasn't completely established > a connection (e.g. it has changed sk->sk_state to SS_CONNECTED, but hasn't > inserted the sock into the connected queue), vsock_stream_connect() may see > the

Re: [PATCH v4 net] tcp/dccp: fix ireq->opt races

2017-10-20 Thread David Miller
From: Eric Dumazet Date: Fri, 20 Oct 2017 09:04:13 -0700 > From: Eric Dumazet > > syzkaller found another bug in DCCP/TCP stacks [1] > > For the reasons explained in commit ce1050089c96 ("tcp/dccp: fix > ireq->pktopts race"), we need to make sure we do not access > ireq->opt unless we own the

Re: [PATCH net] packet: avoid panic in packet_getsockopt()

2017-10-20 Thread Eric Dumazet
On Fri, Oct 20, 2017 at 5:53 PM, David Miller wrote: > From: David Miller > Date: Sat, 21 Oct 2017 01:50:08 +0100 (WEST) > >> From: Eric Dumazet >> Date: Wed, 18 Oct 2017 15:08:24 -0700 >> >>> From: Eric Dumazet >>> >>> syzkaller got crashes in packet_getsockopt() processing >>> PACKET_ROLLOVER

[PATCH] net: core: rtnetlink: use BUG_ON instead of if condition followed by BUG

2017-10-20 Thread Gustavo A. R. Silva
Use BUG_ON instead of if condition followed by BUG in do_setlink. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- This code was tested by compilation only. net/core/rtnetlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net

Re: [PATCH net 4/5] net/ncsi: Enforce failover on link monitor timeout

2017-10-20 Thread David Miller
From: Samuel Mendoza-Jonas Date: Thu, 19 Oct 2017 13:43:08 +1100 > From: Gavin Shan > > The NCSI channel has been configured to provide service if its link > monitor timer is enabled, regardless of its state (inactive or active). > So the timeout event on the link monitor indicates the out-of-s

Re: [PATCH net 5/5] net/ncsi: Fix length of GVI response packet

2017-10-20 Thread David Miller
From: Samuel Mendoza-Jonas Date: Thu, 19 Oct 2017 13:43:09 +1100 > From: Gavin Shan > > The length of GVI (GetVersionInfo) response packet should be 40 instead > of 36. This issue was found from /sys/kernel/debug/ncsi/eth0/stats. > > # ethtool --ncsi eth0 swstats > : > RESPONSE OK

Re: [PATCH net 2/5] net/ncsi: Stop monitor if channel times out or is inactive

2017-10-20 Thread David Miller
From: Samuel Mendoza-Jonas Date: Thu, 19 Oct 2017 13:43:06 +1100 > ncsi_channel_monitor() misses stopping the channel monitor in several > places that it should, causing a WARN_ON_ONCE() to trigger when the > monitor is re-started later, eg: > > [ 459.04] WARNING: CPU: 0 PID: 1093 at net/nc

Re: [PATCH net 1/5] net/ncsi: Fix AEN HNCDSC packet length

2017-10-20 Thread David Miller
From: Samuel Mendoza-Jonas Date: Thu, 19 Oct 2017 13:43:05 +1100 > Correct the value of the HNCDSC AEN packet. > Fixes: 7a82ecf4cfb85 "net/ncsi: NCSI AEN packet handler" > > Signed-off-by: Samuel Mendoza-Jonas Applied.

Re: [PATCH net 3/5] net/ncsi: Disable HWA mode when no channels are found

2017-10-20 Thread David Miller
From: Samuel Mendoza-Jonas Date: Thu, 19 Oct 2017 13:43:07 +1100 > From: Gavin Shan > > When there are no NCSI channels probed, HWA (Hardware Arbitration) > mode is enabled. It's not correct because HWA depends on the fact: > NCSI channels exist and all of them support HWA mode. This disables >

Re: [PATCH net-next] ipv4: ipv4_default_advmss() should use route mtu

2017-10-20 Thread David Miller
From: Eric Dumazet Date: Wed, 18 Oct 2017 17:02:03 -0700 > From: Eric Dumazet > > ipv4_default_advmss() incorrectly uses the device MTU instead > of the route provided one. IPv6 has the proper behavior, > lets harmonize the two protocols. > > Signed-off-by: Eric Dumazet Applied.

Re: [PATCH net] packet: avoid panic in packet_getsockopt()

2017-10-20 Thread David Miller
From: David Miller Date: Sat, 21 Oct 2017 01:50:08 +0100 (WEST) > From: Eric Dumazet > Date: Wed, 18 Oct 2017 15:08:24 -0700 > >> From: Eric Dumazet >> >> syzkaller got crashes in packet_getsockopt() processing >> PACKET_ROLLOVER_STATS command while another thread was managing >> to change po

Re: [PATCH net] packet: avoid panic in packet_getsockopt()

2017-10-20 Thread David Miller
From: Eric Dumazet Date: Wed, 18 Oct 2017 15:08:24 -0700 > From: Eric Dumazet > > syzkaller got crashes in packet_getsockopt() processing > PACKET_ROLLOVER_STATS command while another thread was managing > to change po->rollover > > Using RCU will fix this bug. We might later add proper RCU an

Re: pull-request: ieee802154 2017-10-18

2017-10-20 Thread David Miller
From: Stefan Schmidt Date: Thu, 19 Oct 2017 00:03:33 +0200 > Please find below a pull request from the ieee802154 subsystem for > net-next. Pulled.

Re: [PATCH v2 net-next] tcp: Enable TFO without a cookie on a per-socket basis

2017-10-20 Thread Yuchung Cheng
On Fri, Oct 20, 2017 at 2:13 PM, Christoph Paasch wrote: > > We already allow to enable TFO without a cookie by using the > fastopen-sysctl and setting it to TFO_SERVER_COOKIE_NOT_REQD (0x200). > This is safe to do in certain environments where we know that there > isn't a malicous host (aka., dat

Re: [PATCH net-next] spectrum: Convert fib event handlers to use container_of on info arg

2017-10-20 Thread David Miller
From: David Ahern Date: Wed, 18 Oct 2017 15:01:38 -0700 > Use container_of to convert the generic fib_notifier_info into > the event specific data structure. > > Signed-off-by: David Ahern > Reviewed-by: Ido Schimmel Applied.

Re: [PATCH net-next] tcp: fix tcp_send_syn_data()

2017-10-20 Thread David Miller
From: Eric Dumazet Date: Wed, 18 Oct 2017 14:20:30 -0700 > From: Eric Dumazet > > syn_data was allocated by sk_stream_alloc_skb(), meaning > its destructor and _skb_refdst fields are mangled. > > We need to call tcp_skb_tsorted_anchor_cleanup() before > calling kfree_skb() or kernel crashes. >

Re: [PATCH net-next v3 0/2] ipv6: fixes for RTF_CACHE entries

2017-10-20 Thread David Miller
From: Paolo Abeni Date: Thu, 19 Oct 2017 16:07:09 +0200 > This series addresses 2 different but related issues with RTF_CACHE introduced > by the recent refactory. > > patch 1 restore the gc timer for such routes > patch 2 removes the aged out dst from the fib tree, properly coping with pMTU > r

Re: [PATCH v3 net] dccp/tcp: fix ireq->opt races

2017-10-20 Thread kbuild test robot
Hi Eric, [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/dccp-tcp-fix-ireq-opt-races/20171021-034024 config: powerpc-ppc6xx_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wge

[PATCH net 0/3] Two BPF fixes for range marking

2017-10-20 Thread Daniel Borkmann
The set contains two fixes for direct packet access range markings and test cases for all direct packet access patterns that the verifier matches on. They are targeted for net tree, note that once net gets merged into net-next, there will be a minor merge conflict due to signature change of the fu

[PATCH net 1/3] bpf: fix off by one for range markings with L{T,E} patterns

2017-10-20 Thread Daniel Borkmann
During review I noticed that the current logic for direct packet access marking in check_cond_jmp_op() has an off by one for the upper right range border when marking in find_good_pkt_pointers() with BPF_JLT and BPF_JLE. It's not really harmful given access up to pkt_end is always safe, but we shou

[PATCH net 2/3] bpf: fix pattern matches for direct packet access

2017-10-20 Thread Daniel Borkmann
Alexander had a test program with direct packet access, where the access test was in the form of data + X > data_end. In an unrelated change to the program LLVM decided to swap the branches and emitted code for the test in form of data + X <= data_end. We hadn't seen these being generated previousl

[PATCH net 3/3] bpf: add test cases to bpf selftests to cover all access tests

2017-10-20 Thread Daniel Borkmann
Lets add test cases to cover really all possible direct packet access tests for good/bad access cases so we keep tracking them. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 480 1 file changed, 480 ins

RE: [Intel-wired-lan] Instability of i40e driver on 4.9 kernel

2017-10-20 Thread Fujinaka, Todd
You picked a bunch of places to post this, and you really should've used a different place: e1000-de...@lists.sourceforge.net Also, since you flagged the "communities" post as "answered", you're not likely to get any follow-up. The Intel communities are also not monitored as much by the wired n

[PATCH net-next] strparser: Use delayed work instead of timer for msg timeout

2017-10-20 Thread Tom Herbert
Sock lock may be taken in the message timer function which is a problem since timers run in BH. Instead of timers use delayed_work. Reported-by: Eric Dumazet Fixes: bbb03029a899 ("strparser: Generalize strparser") Signed-off-by: Tom Herbert --- include/net/strparser.h | 3 +-- net/strparser/

Re: [PATCH 2/2] net: netrom: refactor code in nr_add_node

2017-10-20 Thread Kevin Dawson
Hello all. My original response just went to Gustavo and Walter because I'm not much of a kernel hacker these days; it was mainly observations that may or may not have been helpful and I'm not a regular list contributor. Looks like I shouldn't have been so shy! On Fri, Oct 20, 2017 at 06:54:0

Re: [PATCH 18/27] bpf: Restrict kernel image access functions when the kernel is locked down

2017-10-20 Thread Alexei Starovoitov
On Fri, Oct 20, 2017 at 11:57:48PM +0800, j...@suse.com wrote: > On Fri, Oct 20, 2017 at 09:08:48AM +0100, David Howells wrote: > > Hi Joey, > > > > Should I just lock down sys_bpf() entirely for now? We can always free it > > up > > somewhat later. > > > > David > > OK~~ Please just remove my

[PATCH net-next] net: systemport: Guard against unmapped TX ring

2017-10-20 Thread Florian Fainelli
Because SYSTEMPORT is a (semi) normal network device, the stack may attempt to queue packets on it oustide of the DSA slave transmit path. When that happens, the DSA layer has not had a chance to tag packets with the appropriate per-port and per-queue information, and if that happens and we don't

[PATCH net-next v2 3/7] net: dsa: bcm_sf2: Make UDF slices more configurable

2017-10-20 Thread Florian Fainelli
In preparation for introducing IPv6 rules support, make the cfp_udf_layout more flexible and match more accurately how the HW is designed: we have 3 + 1 slices per protocol, but we may not be using all of them and we are relative to a particular base offset (slice A for IPv4 for instance). Also pop

[PATCH net-next v2 2/7] net: dsa: bcm_sf2: Move IPv4 CFP processing to specific functions

2017-10-20 Thread Florian Fainelli
Move the processing of IPv4 rules into specific functions, allowing us to clearly identify which parts are generic and which ones are not. Also create a specific function to insert a rule into the action and policer RAMs as those tend to be fairly generic. Signed-off-by: Florian Fainelli --- dri

[PATCH net-next v2 5/7] net: dsa: bcm_sf2: Add support for IPv6 CFP rules

2017-10-20 Thread Florian Fainelli
Inserting IPv6 CFP rules complicates the code a little bit in that we need to insert two rules side by side and chain them to match a full IPv6 tuple (src, dst IPv6 + port + protocol). Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2.c | 1 + drivers/net/dsa/bcm_sf2.h |

[PATCH net-next v2 4/7] net: dsa: bcm_sf2: Simplify bcm_sf2_cfp_rule_get_all()

2017-10-20 Thread Florian Fainelli
There is no need to do a HW search of the TCAMs which is something slow and expensive. Since we already maintain a bitmask of active CFP rules, just iterate over those, starting from bit 1 (after the reserved entry) to get a count and index position to store the rule later on. As a result we can r

[PATCH net-next v2 6/7] net: dsa: bcm_sf2: Allow matching arbitrary IPv4 mask lengths

2017-10-20 Thread Florian Fainelli
There is no reason why we should limit ourselves to matching only full IPv4 addresses (/32), the same logic applies between the DATA and MASK ports, so just make it more configurable to accept both. Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2_cfp.c | 235

[PATCH net-next v2 7/7] net: dsa: bcm_sf2: Allow matching arbitrary IPv6 masks/lengths

2017-10-20 Thread Florian Fainelli
There is no reason why we should limit ourselves to matching only full IPv4 addresses (/32), the same logic applies between the DATA and MASK ports, so just make it more configurable to accept both. Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2_cfp.c | 113 +

[PATCH net-next v2 0/7] net: dsa: bcm_sf2: Add support for IPv6 CFP rules

2017-10-20 Thread Florian Fainelli
Hi all, This patch series adds support for matching IPv6 addresses to the existing CFP support code. Because IPv6 addresses are four times bigger than IPv4, we can fit them anymore in a single slice, so we need to chain two in order to have a complete match. This makes us require a second bitmap t

[PATCH net-next v2 1/7] net: dsa: bcm_sf2: Use existing shift/masks

2017-10-20 Thread Florian Fainelli
Instead of open coding the shift for the IP protocol, IP fragment bit etc. define and/or use existing constants to that end. Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2_cfp.c | 7 --- drivers/net/dsa/bcm_sf2_regs.h | 5 - 2 files changed, 8 insertions(+), 4 deletions(-)

Re: [PATCH v3 net] dccp/tcp: fix ireq->opt races

2017-10-20 Thread Eric Dumazet
On Sat, 2017-10-21 at 05:26 +0800, kbuild test robot wrote: > Hi Eric, > > [auto build test WARNING on net/master] Obsolete report. v4 was sent few hours ago ;)

Re: [PATCH net-next 0/7] net: dsa: bcm_sf2: Add support for IPv6 CFP rules

2017-10-20 Thread Florian Fainelli
On 10/20/2017 02:34 PM, Florian Fainelli wrote: > Hi all, > > This patch series adds support for matching IPv6 addresses to the existing CFP > support code. Because IPv6 addresses are four times bigger than IPv4, we can > fit them anymore in a single slice, so we need to chain two in order to have

[PATCH net-next 7/7] net: dsa: bcm_sf2: Allow matching arbitrary IPv6 masks/lengths

2017-10-20 Thread Florian Fainelli
From: Florian Fainelli There is no reason why we should limit ourselves to matching only full IPv4 addresses (/32), the same logic applies between the DATA and MASK ports, so just make it more configurable to accept both. refs #SWLINUX-4608 Signed-off-by: Florian Fainelli --- drivers/net/dsa/

[PATCH net-next 6/7] net: dsa: bcm_sf2: Allow matching arbitrary IPv4 mask lengths

2017-10-20 Thread Florian Fainelli
From: Florian Fainelli There is no reason why we should limit ourselves to matching only full IPv4 addresses (/32), the same logic applies between the DATA and MASK ports, so just make it more configurable to accept both. refs #SWLINUX-4608 Signed-off-by: Florian Fainelli --- drivers/net/dsa/

[PATCH net-next 2/7] net: dsa: bcm_sf2: Move IPv4 CFP processing to specific functions

2017-10-20 Thread Florian Fainelli
From: Florian Fainelli Move the processing of IPv4 rules into specific functions, allowing us to clearly identify which parts are generic and which ones are not. Also create a specific function to insert a rule into the action and policer RAMs as those tend to be fairly generic. refs #SWLINUX-46

[PATCH net-next 3/7] net: dsa: bcm_sf2: Make UDF slices more configurable

2017-10-20 Thread Florian Fainelli
From: Florian Fainelli In preparation for introducing IPv6 rules support, make the cfp_udf_layout more flexible and match more accurately how the HW is designed: we have 3 + 1 slices per protocol, but we may not be using all of them and we are relative to a particular base offset (slice A for IPv

[PATCH net-next 5/7] net: dsa: bcm_sf2: Add support for IPv6 CFP rules

2017-10-20 Thread Florian Fainelli
From: Florian Fainelli Inserting IPv6 CFP rules complicates the code a little bit in that we need to insert two rules side by side and chain them to match a full IPv6 tuple (src, dst IPv6 + port + protocol). refs #SWLINUX-4608 Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2.c

[PATCH net-next 0/7] net: dsa: bcm_sf2: Add support for IPv6 CFP rules

2017-10-20 Thread Florian Fainelli
Hi all, This patch series adds support for matching IPv6 addresses to the existing CFP support code. Because IPv6 addresses are four times bigger than IPv4, we can fit them anymore in a single slice, so we need to chain two in order to have a complete match. This makes us require a second bitmap t

[PATCH net-next 4/7] net: dsa: bcm_sf2: Simplify bcm_sf2_cfp_rule_get_all()

2017-10-20 Thread Florian Fainelli
From: Florian Fainelli There is no need to do a HW search of the TCAMs which is something slow and expensive. Since we already maintain a bitmask of active CFP rules, just iterate over those, starting from bit 1 (after the reserved entry) to get a count and index position to store the rule later

[PATCH net-next 1/7] net: dsa: bcm_sf2: Use existing shift/masks

2017-10-20 Thread Florian Fainelli
From: Florian Fainelli Instead of open coding the shift for the IP protocol, IP fragment bit etc. define and/or use existing constants to that end. refs #SWLINUX-4608 Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2_cfp.c | 7 --- drivers/net/dsa/bcm_sf2_regs.h | 5 - 2 fi

Re: [PATCH net-next 0/6] add a set of tracepoints to tcp stack

2017-10-20 Thread Song Liu
CCing key audience of these patches. I am really sorry if I have spammed your inbox multiple times with the same set of patches. I have been struggling to get git-send-email sending email to netdev. The only solution I found is to be reduce CC list. Best Regards, Song > On Oct 20, 2017, at 2

Re: [PATCH v3 net] dccp/tcp: fix ireq->opt races

2017-10-20 Thread kbuild test robot
Hi Eric, [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/dccp-tcp-fix-ireq-opt-races/20171021-034024 config: alpha-allmodconfig (attached as .config) compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https

[PATCH net-next] ip6_tunnel: Allow rcv/xmit even if remote address is a local address

2017-10-20 Thread Shmulik Ladkani
From: Shmulik Ladkani Currently, ip6_tnl_xmit_ctl drops tunneled packets if the remote address (outer v6 destination) is one of host's locally configured addresses. Same applies to ip6_tnl_rcv_ctl: it drops packets if the remote address (outer v6 source) is a local address. This prevents using i

[PATCH net-next 0/6] add a set of tracepoints to tcp stack

2017-10-20 Thread Song Liu
Resending the patch set as there were something wrong with my email server. These patches add the following tracepoints to tcp stack. tcp_send_reset tcp_receive_reset tcp_destroy_sock tcp_set_state These tracepoints can be used to track TCP state changes. Such state changes include but are not l

[PATCH net-next 1/6] tcp: add trace event class tcp_event_sk_skb

2017-10-20 Thread Song Liu
Introduce event class tcp_event_sk_skb for tcp tracepoints that have arguments sk and skb. Existing tracepoint trace_tcp_retransmit_skb() falls into this class. This patch rewrites the definition of trace_tcp_retransmit_skb() with tcp_event_sk_skb. Signed-off-by: Song Liu --- include/trace/even

[PATCH net-next 6/6] tcp: add tracepoint trace_tcp_set_state()

2017-10-20 Thread Song Liu
This patch adds tracepoint trace_tcp_set_state. Besides usual fields (s/d ports, IP addresses), old and new state of the socket is also printed with TP_printk, with __print_symbolic(). Signed-off-by: Song Liu --- include/trace/events/tcp.h | 76 ++ net

[PATCH net-next 3/6] tcp: add tracepoint trace_tcp_send_reset

2017-10-20 Thread Song Liu
New tracepoint trace_tcp_send_reset is added and called from tcp_v4_send_reset(), tcp_v6_send_reset() and tcp_send_active_reset(). Signed-off-by: Song Liu --- include/trace/events/tcp.h | 11 +++ net/ipv4/tcp_ipv4.c| 6 +- net/ipv4/tcp_output.c | 5 + net/ipv6/tcp_

[PATCH net-next 2/6] tcp: mark trace event arguments sk and skb as const

2017-10-20 Thread Song Liu
Some functions that we plan to add trace points require const sk and/or skb. So we mark these fields as const in the tracepoint. Signed-off-by: Song Liu --- include/trace/events/tcp.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/trace/events/tcp.h b/include

[PATCH net-next 5/6] tcp: add tracepoint trace_tcp_destroy_sock

2017-10-20 Thread Song Liu
This patch adds trace event trace_tcp_destroy_sock. Signed-off-by: Song Liu --- include/trace/events/tcp.h | 7 +++ net/ipv4/tcp_ipv4.c| 2 ++ 2 files changed, 9 insertions(+) diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h index c83c711..1724c12 100644 --- a/in

[PATCH net-next 4/6] tcp: add tracepoint trace_tcp_receive_reset

2017-10-20 Thread Song Liu
New tracepoint trace_tcp_receive_reset is added and called from tcp_reset(). This tracepoint is define with a new class tcp_event_sk. Signed-off-by: Song Liu --- include/trace/events/tcp.h | 66 ++ net/ipv4/tcp_input.c | 3 +++ 2 files changed,

[PATCH v2 net-next] tcp: Enable TFO without a cookie on a per-socket basis

2017-10-20 Thread Christoph Paasch
We already allow to enable TFO without a cookie by using the fastopen-sysctl and setting it to TFO_SERVER_COOKIE_NOT_REQD (0x200). This is safe to do in certain environments where we know that there isn't a malicous host (aka., data-centers). A server however might be talking to both sides (public

[PATCH net-next 2/2] ibmvnic: Fix failover error path for non-fatal resets

2017-10-20 Thread John Allen
For all non-fatal reset conditions, the hypervisor will send a failover when we attempt to initialize the crq and the vnic client is expected to handle that failover instead of the existing non-fatal reset. To handle this, we need to return from init with a return code that indicates that we have

[PATCH net-next 1/2] ibmvnic: Update reset infrastructure to support tunable parameters

2017-10-20 Thread John Allen
Update ibmvnic reset infrastructure to include a new reset option that will allow changing of tunable parameters. There currently is no way to request different capabilities from the vnic server on the fly so this patch achieves this by resetting the driver and attempting to log in with the request

[PATCH net-next 0/2] ibmvnic: Tunable parameter support

2017-10-20 Thread John Allen
This series implements support for changing tunable parameters such as the mtu, number of tx/rx queues, and number of buffers per queue via ethtool and ifconfig. John Allen (2): ibmvnic: Update reset infrastructure to support tunable parameters ibmvnic: Fix failover error path for non-fatal re

Re: Get rid of RCU callbacks in TC filters?

2017-10-20 Thread Cong Wang
On Fri, Oct 20, 2017 at 1:31 PM, Cong Wang wrote: > Actually, I just tried this approach, this way makes the core tc filter > code harder to wait for flying callbacks, currently rcu_barrier() is > enough, with one more schedule_work() added we probably > need flush_workqueue()... Huh, this also me

[PATCH] isdn/gigaset: Provide cardstate context for bas timer callbacks

2017-10-20 Thread Kees Cook
While the work callback uses the urb to find cardstate from bas_cardstate, this may not be valid for timer callbacks. Instead, introduce a direct pointer back to the cardstate from bas_cardstate for use in timer callbacks. Reported-by: Paul Bolle Fixes: 4cfea08e6251 ("isdn/gigaset: Convert timers

Re: Get rid of RCU callbacks in TC filters?

2017-10-20 Thread Cong Wang
On Fri, Oct 20, 2017 at 9:56 AM, Paul E. McKenney wrote: > On Thu, Oct 19, 2017 at 08:26:01PM -0700, Cong Wang wrote: >> On Wed, Oct 18, 2017 at 12:35 PM, Paul E. McKenney >> wrote: >> > 5) Keep call_rcu(), but have the RCU callback schedule a workqueue. >> > The workqueue could then use blocking

Re: [PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-10-20 Thread Al Viro
On Tue, Sep 26, 2017 at 04:10:14PM +0300, Tuomas Tynkkynen wrote: > Hi Al, > > On Wed, 2017-09-06 at 17:59 +0300, Tuomas Tynkkynen wrote: > > These two patches fix two hard-to-hit (but really annoying) bugs in > > 9p. > > The first one was posted earlier in February (with one R-b), the > > second

Pls assist me to come and establish an industry in your country

2017-10-20 Thread Mariam Dim Deng
Genuine offer How are you today and your family, I am a citizen of Sudan but currently staying in Burkina Faso. My name is Miss Mariam Dim Deng, 25years old originated from Sudan. My late father Dr. Dominic Dim Deng was the former Minister for SPLA Affair and Special Adviser to President Salva Kii

Re: [PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-10-20 Thread Linus Torvalds
On Fri, Oct 20, 2017 at 8:34 AM, Tuomas Tynkkynen wrote: > Al, Linus > > Can one of you please pick these patches? They've been on the list for > a month now, with an ack from Latchesar Ionkov. I don't pick up patches from the list. They need to be actually sent to me so that I feel like I'm sup

Re: [PATCH v2 net] packet: avoid panic in packet_getsockopt()

2017-10-20 Thread Eric Dumazet
On Fri, Oct 20, 2017 at 12:11 PM, kbuild test robot wrote: > Hi Eric, > > [auto build test WARNING on net/master] > > url: > https://github.com/0day-ci/linux/commits/Eric-Dumazet/packet-avoid-panic-in-packet_getsockopt/20171021-003615 > reproduce: > # apt-get install sparse > m

[PATCH] textsearch: fix typos in library helpers

2017-10-20 Thread Randy Dunlap
From: Randy Dunlap Fix spellos (typos) in textsearch library helpers. Signed-off-by: Randy Dunlap --- lib/ts_fsm.c |2 +- lib/ts_kmp.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- lnx-414-rc5.orig/lib/ts_fsm.c +++ lnx-414-rc5/lib/ts_fsm.c @@ -11,7 +11,7 @@ * =

Re: [PATCH v2 net] packet: avoid panic in packet_getsockopt()

2017-10-20 Thread kbuild test robot
Hi Eric, [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/packet-avoid-panic-in-packet_getsockopt/20171021-003615 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse

Re: [RFC PATCH 5/5] selinux: Add SCTP support

2017-10-20 Thread Stephen Smalley
On Tue, 2017-10-17 at 14:59 +0100, Richard Haines wrote: > The SELinux SCTP implementation is explained in: > Documentation/security/SELinux-sctp.txt > > Signed-off-by: Richard Haines > --- >  Documentation/security/SELinux-sctp.txt | 108 + >  security/selinux/hooks.c|

Re: [PATCH net] dccp/tcp: fix ireq->opt races

2017-10-20 Thread kbuild test robot
Hi Eric, [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/dccp-tcp-fix-ireq-opt-races/20171021-001234 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (

[PATCH net-next 2/3] tun: avoid extra timer schedule in tun_flow_cleanup()

2017-10-20 Thread Eric Dumazet
If tun_flow_cleanup() deleted all flows, no need to arm the timer again. It will be armed next time tun_flow_update() is called. Signed-off-by: Eric Dumazet --- drivers/net/tun.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c in

[PATCH net-next 1/3] tun: do not block BH again in tun_flow_cleanup()

2017-10-20 Thread Eric Dumazet
tun_flow_cleanup() being a timer callback, it is already running in BH context. Signed-off-by: Eric Dumazet --- drivers/net/tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 3b41c36eae904fec5d11f51ed9fde0e060bba27e..f9541f7

[PATCH net-next 0/3] tun: timer cleanups

2017-10-20 Thread Eric Dumazet
While working on a syzkaller issue that might have been fixed already by Cong Wang in commit 0ad646c81b21 ("tun: call dev_get_valid_name() before register_netdevice()") I made three small changes related to flow_gc_timer. Eric Dumazet (3): tun: do not block BH again in tun_flow_cleanup() tun:

[PATCH net-next 3/3] tun: do not arm flow_gc_timer in tun_flow_init()

2017-10-20 Thread Eric Dumazet
Timer is properly armed on demand from tun_flow_update(), so there is no need to arm it at tun init. Signed-off-by: Eric Dumazet --- drivers/net/tun.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 995887de5a98283382a631bcb8dfd874a4037ed3..2a2d0

Re: [PATCH v3 1/4] phylib: Add device reset GPIO support

2017-10-20 Thread Florian Fainelli
On 10/20/2017 01:14 AM, Geert Uytterhoeven wrote: > From: Sergei Shtylyov > > The PHY devices sometimes do have their reset signal (maybe even power > supply?) tied to some GPIO and sometimes it also does happen that a boot > loader does not leave it deasserted. So far this issue has been attacke

[PATCH net-next 1/5] bpf: add support for BPF_SOCK_OPS_BASE_RTT

2017-10-20 Thread Lawrence Brakmo
A congestion control algorithm can make a call to the BPF socket_ops program to request the base RTT. The base RTT can be congestion control dependent and is meant to represent a congestion threshold such that RTTs above it indicate congestion. This is especially useful for flows within a DC where

RE: removing bridge in vlan_filtering mode requests delete of attached ports main MAC address

2017-10-20 Thread Keller, Jacob E
> -Original Message- > From: Keller, Jacob E > Sent: Friday, October 20, 2017 10:23 AM > To: netdev@vger.kernel.org > Cc: Malek, Patryk ; 'Vlad Yasevich' > > Subject: removing bridge in vlan_filtering mode requests delete of attached > ports main MAC address > > Hi, > > We've run into an

[PATCH net-next 2/5] bpf: Adding helper function bpf_getsockops

2017-10-20 Thread Lawrence Brakmo
Adding support for helper function bpf_getsockops to socket_ops BPF programs. This patch only supports TCP_CONGESTION. Signed-off-by: Vlad Vysotsky Acked-by: Lawrence Brakmo Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- include/uapi/linux/bpf.h | 19 ++---

[PATCH net-next 3/5] bpf: Add BPF_SOCKET_OPS_BASE_RTT support to tcp_nv

2017-10-20 Thread Lawrence Brakmo
TCP_NV will try to get the base RTT from a socket_ops BPF program if one is loaded. NV will then use the base RTT to bound its min RTT (its notion of the base RTT). It uses the base RTT as an upper bound and 80% of the base RTT as its lower bound. In other words, NV will consider filtered RTTs lar

[PATCH net-next 5/5] bpf: create samples/bpf/tcp_bpf.readme

2017-10-20 Thread Lawrence Brakmo
Readme file explaining how to create a cgroupv2 and attach one of the tcp_*_kern.o socket_ops BPF program. Signed-off-by: Lawrence Brakmo Acked-by: Daniel Borkmann Acked_by: Alexei Starovoitov --- samples/bpf/tcp_bbf.readme | 27 +++ 1 file changed, 27 insertions(+) cr

[PATCH net-next 4/5] bpf: sample BPF_SOCKET_OPS_BASE_RTT program

2017-10-20 Thread Lawrence Brakmo
Sample socket_ops BPF program to test the BPF helper function bpf_getsocketops and the new socket_ops op BPF_SOCKET_OPS_BASE_RTT. The program provides a base RTT of 80us when the calling flow is within a DC (as determined by the IPV6 prefix) and the congestion algorithm is "nv". Signed-off-by: La

[PATCH net-next 0/5] bpf: add support for BASE_RTT

2017-10-20 Thread Lawrence Brakmo
This patch set adds the following functionality to socket_ops BPF programs. 1) Add bpf helper function bpf_getsocketops. Currently only supports TCP_CONGESTION 2) Add BPF_SOCKET_OPS_BASE_RTT op to get the base RTT of the connection. In general, the base RTT indicates the threshold such tha

Re: [PATCH v3 2/4] macb: Kill PHY reset code

2017-10-20 Thread Florian Fainelli
On 10/20/2017 01:14 AM, Geert Uytterhoeven wrote: > From: Sergei Shtylyov > > With the phylib now being aware of the "reset-gpios" PHY node property, > there should be no need to frob the PHY reset in this driver anymore... > > Signed-off-by: Sergei Shtylyov > Acked-by: Nicolas Ferre > Signed-

[PATCH net-next] nfp: use struct fields for 8 bit-wide access

2017-10-20 Thread Simon Horman
From: Pieter Jansen van Vuuren Use direct access struct fields rather than PREP_FIELD() macros to manipulate the jump ID and length, both of which are exactly 8-bits wide. This simplifies the code somewhat. Signed-off-by: Simon Horman Signed-off-by: Pieter Jansen van Vuuren Acked-by: Jakub Kic

Re: [PATCH net] dccp/tcp: fix ireq->opt races

2017-10-20 Thread Eric Dumazet
On Sat, 2017-10-21 at 00:53 +0800, kbuild test robot wrote: > Hi Eric, > > [auto build test WARNING on net/master] > > url: > https://github.com/0day-ci/linux/commits/Eric-Dumazet/dccp-tcp-fix-ireq-opt-races/20171021-001234 > config: ia64-allmodconfig (attached as .config) > compiler: ia64-li

[PATCH] net: x25: mark expected switch fall-throughs

2017-10-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of the code is to fall through. net/x25/x25_f

[PATCH] net: af_unix: mark expected switch fall-through

2017-10-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of the code is to fall through. net/unix/af_u

[PATCH] net: tipc: mark expected switch fall-throughs

2017-10-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of the code is to fall through. net/tipc/bear

  1   2   3   >