Re: [PATCH ipsec] net: xfrm_policy: fix device unregistration hang

2018-02-12 Thread Shannon Nelson
On 2/12/2018 9:21 AM, Eyal Birger wrote: In setups like the following: Host A --Host B tun0 -- ipsec -- eth0 -- eth0 -- ipsec -- tun0 where tun0 are tunnel devices using dst_cache (ipip, ipip6, etc...). Unregistration of an underlying eth0 device leads to the followi

[PATCH net v2] netfilter: x_tables: fix missing timer initialization in xt_LED

2018-02-12 Thread Paolo Abeni
syzbot reported that xt_LED may try to use the ledinternal->timer without previously initializing it: [ cut here ] kernel BUG at kernel/time/timer.c:958! invalid opcode: [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 1826

Re: [PATCH] net: make getname() functions return length rather than use int* parameter

2018-02-12 Thread David Miller
From: Denys Vlasenko Date: Mon, 12 Feb 2018 15:15:18 +0100 > Before: > All these functions either return a negative error indicator, > or store length of sockaddr into "int *socklen" parameter > and return zero on success. > > "int *socklen" parameter is awkward. For example, if caller does not

Re: [REGRESSION, bisect] pci: cxgb4 probe fails after commit 104daa71b3961434 ("PCI: Determine actual VPD size on first access")

2018-02-12 Thread Bjorn Helgaas
On Tue, Jan 23, 2018 at 05:59:09PM +0530, Arjun Vynipadath wrote: > Sending on behalf of "Casey Leedom " > > Way back on April 11, 2016 we reported a regression in Linux kernel 4.6-rc2 > brought on by kernel.org commit 104daa71b396. This commit calculates the > size of a PCI Device's VPD area by

[PATCH net-next v3 04/16] l2tp: refactor tunnel lifetime handling wrt its socket

2018-02-12 Thread James Chapman
Ensure that the tunnel's socket is always extant while the tunnel object exists. Hold a ref on the socket until the tunnel is destroyed and ensure that all tunnel destroy paths go through a common function (l2tp_tunnel_delete). Since the tunnel's socket is now guaranteed to exist if the tunnel exi

[PATCH net-next v3 00/16] l2tp: fix API races discovered by syzbot

2018-02-12 Thread James Chapman
This patch series addresses several races with L2TP APIs discovered by syzbot. While working on this, it became clear that the L2TP code needed some work to address object lifetime issues. There are no functional changes. The set of patches 1-13 in combination fix the following syzbot reports. 9d

[PATCH net-next v3 08/16] l2tp: hide session from pppol2tp_sock_to_session if it is closing

2018-02-12 Thread James Chapman
Signed-off-by: James Chapman --- net/l2tp/l2tp_ppp.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index ff95a4d4eac5..947066b3d6d8 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c @@ -172,8 +172,16 @@ static inli

[PATCH net-next v3 01/16] l2tp: update sk_user_data while holding sk_callback_lock

2018-02-12 Thread James Chapman
Since L2TP hooks on sockets opened by userspace using sk_user_data, we may race with other socket families that attempt to use the same socket. This problem was discovered by syzbot using AF_KCM. KCM has since been modified to use only TCP sockets to avoid hitting this issue but we should prevent

[PATCH net-next v3 06/16] l2tp: refactor session lifetime handling

2018-02-12 Thread James Chapman
Simplify relationship with tunnel such that the session holds a ref on the tunnel, not its socket. This guarantees that the tunnel is always extant if one or more sessions exists on the tunnel. If the session has a socket (ppp), have it hold a ref on the socket until the session is destroyed. Sinc

[PATCH net-next v3 05/16] l2tp: use tunnel closing flag

2018-02-12 Thread James Chapman
The tunnel's closing flag is set when the tunnel is being destroyed. Use it to reject new sessions and remove acpt_newsess which was doing the same thing. Also prevent the tunnel being seen in l2tp_tunnel_get lookups. Signed-off-by: James Chapman --- net/l2tp/l2tp_core.c | 27 +++

[PATCH net-next v3 02/16] l2tp: add RCU read lock to protect tunnel ptr in ip socket destroy

2018-02-12 Thread James Chapman
If an L2TPIP socket is closed, add RCU protection when we deref sk_user_data to prevent races with another thread closing the same tunnel. refcount_t: increment on 0; use-after-free. WARNING: CPU: 2 PID: 2892 at lib/refcount.c:153 refcount_inc+0x2b/0x30 Modules linked in: CPU: 2 PID: 2892 Comm: pp

[PATCH net-next v3 07/16] l2tp: hide sessions if they are closing

2018-02-12 Thread James Chapman
Replace the dead flag in the session context with a closing flag and spinlock. Check it in session lookup functions such that we don't try to access session data while it is being destroyed. Signed-off-by: James Chapman --- net/l2tp/l2tp_core.c | 34 +- net/l2tp/l

[PATCH net-next v3 09/16] l2tp: refactor pppol2tp_connect

2018-02-12 Thread James Chapman
It's hard to understand pppol2tp_connect so split it up into separate functions and document it better. Fixes: fd558d186d ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Signed-off-by: James Chapman --- net/l2tp/l2tp_ppp.c | 307 +++---

[PATCH net-next v3 11/16] l2tp: do session destroy using a workqueue

2018-02-12 Thread James Chapman
Handle session destroy in the same way as we handle tunnel destroy - through a workqueue. Sessions can be destroyed either because its socket is closed (if it has a socket) or by netlink request. A workqueue synchronises these. Signed-off-by: James Chapman --- net/l2tp/l2tp_core.c | 30 +

[PATCH net-next v3 03/16] l2tp: don't use inet_shutdown on tunnel destroy

2018-02-12 Thread James Chapman
Previously, if a tunnel was closed, we called inet_shutdown to mark the socket as unconnected such that userspace would get errors and then close the socket. This could race with userspace closing the socket. Instead, leave userspace to close the socket in its own time (our tunnel will be detached

[PATCH net-next v3 12/16] l2tp: simplify l2tp_tunnel_closeall

2018-02-12 Thread James Chapman
Since session destroy now uses a workqueue, let l2tp_session_delete handle all the work of destroying a session. Don't remove the session from the tunnel's list immediately. The tunnel will remain extant until all of its sessions are gone anyway. The session's dead flag is now unused so is removed

[PATCH net-next v3 15/16] l2tp: remove unwanted error message

2018-02-12 Thread James Chapman
If when creating a new tunnel, the indicated fd is closed by another thread, we emit an error message about it. e.g. l2tp_core: tunl 4: sockfd_lookup(fd=3) returned -9 It's not useful so remove it. Signed-off-by: James Chapman --- net/l2tp/l2tp_core.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH net-next v3 10/16] l2tp: add session_free callback

2018-02-12 Thread James Chapman
When a session refcount hits 0, the session is freed via l2tp_session_free. Some pseudowires (ppp, eth) may have additional resources to free when this happens. Add a session_free callback that can be used by pseudowires to override the default kfree. The callback is responsible for freeing the ses

[PATCH net-next v3 14/16] l2tp: remove redundant sk_user_data check when creating tunnels

2018-02-12 Thread James Chapman
l2tp_tunnel_create now checks sk_user_data so this check is redundant Signed-off-by: James Chapman --- net/l2tp/l2tp_core.c | 8 1 file changed, 8 deletions(-) diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index c909fe9273c9..a91cd384e397 100644 --- a/net/l2tp/l2tp_core.c ++

[PATCH net-next v3 13/16] l2tp: refactor ppp session cleanup paths

2018-02-12 Thread James Chapman
Use l2tp core's session_free callback to drive the ppp session cleanup. PPP sessions are cleaned up by RCU. The PPP session socket is allowed to close only when the session is freed. With this patch, the following syzbot bug reports are finally fixed. Reported-by: syzbot+9df43faf09bd400f2...@syzk

[PATCH net-next v3 16/16] l2tp: make __l2tp_session_unhash internal

2018-02-12 Thread James Chapman
__l2tp_session_unhash is now only used internally so there is no reason to expose it to other l2tp modules. Rename it l2tp_session_unhash while we're at it. Signed-off-by: James Chapman --- net/l2tp/l2tp_core.c | 5 ++--- net/l2tp/l2tp_core.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(

Re: [PATCH net] netfilter: x_tables: fix missing timer initialization in xt_LED

2018-02-12 Thread Dmitry Vyukov
On Mon, Feb 12, 2018 at 6:17 PM, Paolo Abeni wrote: > syzbot reported that xt_LED may try to use the ledinternal->timer > without previously initializing it: > > [ cut here ] > kernel BUG at kernel/time/timer.c:958! > invalid opcode: [#1] SMP KASAN > Dumping ftrace buf

Re: [PATCH net-next v2 03/16] l2tp: don't use inet_shutdown on tunnel destroy

2018-02-12 Thread James Chapman
On 12/02/18 16:22, David Miller wrote: > From: James Chapman > Date: Mon, 12 Feb 2018 10:11:07 + > >> Previously, if a tunnel was closed, we called inet_shutdown to mark >> the socket as unconnected such that userspace would get errors and >> then close the socket. This could race with userspa

[PATCH ipsec] net: xfrm_policy: fix device unregistration hang

2018-02-12 Thread Eyal Birger
In setups like the following: Host A --Host B tun0 -- ipsec -- eth0 -- eth0 -- ipsec -- tun0 where tun0 are tunnel devices using dst_cache (ipip, ipip6, etc...). Unregistration of an underlying eth0 device leads to the following log messages: unregister_netdevice: wait

[PATCH] net: cavium: fix NULL pointer dereference in cavium_ptp_put

2018-02-12 Thread Jan Glauber
Prevent a kernel panic on reboot if ptp_clock is NULL by checking the ptp pointer before using it. Signed-off-by: Jan Glauber Fixes: 8c56df372bc1 ("net: add support for Cavium PTP coprocessor") Cc: Radoslaw Biernacki Cc: Aleksey Makarov --- drivers/net/ethernet/cavium/common/cavium_ptp.c | 2 +

[PATCH net] netfilter: x_tables: fix missing timer initialization in xt_LED

2018-02-12 Thread Paolo Abeni
syzbot reported that xt_LED may try to use the ledinternal->timer without previously initializing it: [ cut here ] kernel BUG at kernel/time/timer.c:958! invalid opcode: [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 1826

Re: lost connection to test machine (4)

2018-02-12 Thread Tejun Heo
Hello, Daniel. On Mon, Feb 12, 2018 at 06:00:13PM +0100, Daniel Borkmann wrote: > [ +Dennis, +Tejun ] > > Looks like we're stuck in percpu allocator with key/value size of 4 bytes > each and large number of entries (max_entries) in the reproducer in above > link. > > Could we have some __GFP_NOR

Re: [PATCH net 1/2] net: thunderbolt: Tear down connection properly on suspend

2018-02-12 Thread David Miller
From: Mika Westerberg Date: Mon, 12 Feb 2018 17:10:19 +0300 > When suspending to mem or disk the Thunderbolt controller typically goes > down as well tearing down the connection automatically. However, when > suspend to idle is used this does not happen so we need to make sure the > connection is

Re: [PATCH net 2/2] net: thunderbolt: Run disconnect flow asynchronously when logout is received

2018-02-12 Thread David Miller
From: Mika Westerberg Date: Mon, 12 Feb 2018 17:10:20 +0300 > The control channel calls registered callbacks when control messages > such as XDomain protocol messages are received. The control channel > handling is done in a worker running on system workqueue which means the > networking driver c

Re: lost connection to test machine (4)

2018-02-12 Thread Daniel Borkmann
On 02/12/2018 05:03 PM, Dmitry Vyukov wrote: > On Mon, Feb 12, 2018 at 5:00 PM, syzbot > wrote: >> Hello, >> >> syzbot hit the following crash on bpf-next commit >> 617aebe6a97efa539cc4b8a52adccd89596e6be0 (Sun Feb 4 00:25:42 2018 +) >> Merge tag 'usercopy-v4.16-rc1' of >> git://git.kernel.org

Re: [PATCH] net: phy: fix wrong mask to phy_modify()

2018-02-12 Thread David Miller
From: Ingo van Lil Date: Mon, 12 Feb 2018 12:02:52 +0100 > When forcing a specific link mode, the PHY driver must clear the > existing speed and duplex bits in BMCR while preserving some other > control bits. This logic was accidentally inverted with the introduction > of phy_modify(). > > Signe

Re: [PATCH v2] sh_eth: Remove obsolete explicit clock handling for WoL

2018-02-12 Thread David Miller
From: Geert Uytterhoeven Date: Mon, 12 Feb 2018 14:42:36 +0100 > Currently, if Wake-on-LAN is enabled, the SH-ETH device's module clock > is manually kept running during system suspend, to make sure the device > stays active. > > Since commits 91c719f5ec6671f7 ("soc: renesas: rcar-sysc: Keep wak

Re: [PATCH net] sctp: remove the useless check in sctp_renege_events

2018-02-12 Thread David Miller
From: Xin Long Date: Mon, 12 Feb 2018 18:31:24 +0800 > Remove the 'if (chunk)' check in sctp_renege_events for idata process, > as all renege commands are generated in sctp_eat_data and it can't be > NULL. > > The same thing we already did for common data in sctp_ulpq_renege. > > Fixes: 94014e8

Re: [PATCH v2] ravb: Remove obsolete explicit clock handling for WoL

2018-02-12 Thread David Miller
From: Geert Uytterhoeven Date: Mon, 12 Feb 2018 14:40:00 +0100 > Currently, if Wake-on-LAN is enabled, the EtherAVB device's module clock > is manually kept running during system suspend, to make sure the device > stays active. > > Since commit 91c719f5ec6671f7 ("soc: renesas: rcar-sysc: Keep wa

Re: [PATCH v5 1/1] tcp: Honor the eor bit in tcp_mtu_probe

2018-02-12 Thread David Miller
From: Ilya Lesokhin Date: Mon, 12 Feb 2018 12:57:04 +0200 > Avoid SKB coalescing if eor bit is set in one of the relevant > SKBs. > > Fixes: c134ecb87817 ("tcp: Make use of MSG_EOR in tcp_sendmsg") > Signed-off-by: Ilya Lesokhin Applied and queued up for -stable.

Re: [PATCH net] sctp: do not pr_err for the duplicated node in transport rhlist

2018-02-12 Thread David Miller
From: Xin Long Date: Mon, 12 Feb 2018 18:29:06 +0800 > The pr_err in sctp_hash_transport was supposed to report a sctp bug > for using rhashtable/rhlist. > > The err '-EEXIST' introduced in Commit cd2b70875058 ("sctp: check > duplicate node before inserting a new transport") doesn't belong > to

Re: [PATCH net] sctp: add SCTP_CID_I_DATA and SCTP_CID_I_FWD_TSN conversion in sctp_cname

2018-02-12 Thread David Miller
From: Xin Long Date: Mon, 12 Feb 2018 18:29:51 +0800 > After the support for SCTP_CID_I_DATA and SCTP_CID_I_FWD_TSN chunks, > the corresp conversion in sctp_cname should also be added. Otherwise, > in some places, pr_debug will print them as "unknown chunk". > > Signed-off-by: Xin Long Applied

Re: [PATCH net-next] trace_events_filter: conditional trace event (tcp_probe full=0)

2018-02-12 Thread David Miller
From: Masami Hiramatsu Date: Tue, 13 Feb 2018 01:29:03 +0900 > On Mon, 12 Feb 2018 00:08:46 -0500 > "Md. Islam" wrote: > >> Recently tcp_probe kernel module has been replaced by trace_event. Old >> tcp_probe had full=0 option where it only takes a snapshot only when >> congestion window is chan

Re: general protection fault in ipt_do_table

2018-02-12 Thread Dmitry Vyukov
On Mon, Feb 12, 2018 at 5:20 PM, Florian Westphal wrote: > syzbot wrote: >> Hello, >> >> syzbot hit the following crash on net-next commit >> 9a61df9e5f7471fe5be3e02bd0bed726b2761a54 (Sat Feb 10 03:32:41 2018 +) >> Merge tag 'kbuild-v4.16-2' of >> git://git.kernel.org/pub/scm/linux/kernel/git

Re: [PATCH net-next] trace_events_filter: conditional trace event (tcp_probe full=0)

2018-02-12 Thread Masami Hiramatsu
On Mon, 12 Feb 2018 00:08:46 -0500 "Md. Islam" wrote: > Recently tcp_probe kernel module has been replaced by trace_event. Old > tcp_probe had full=0 option where it only takes a snapshot only when > congestion window is changed. However I did not find such > functionality in trace_event. Yes, t

Re: [PATCH net-next v2 03/16] l2tp: don't use inet_shutdown on tunnel destroy

2018-02-12 Thread David Miller
From: James Chapman Date: Mon, 12 Feb 2018 10:11:07 + > Previously, if a tunnel was closed, we called inet_shutdown to mark > the socket as unconnected such that userspace would get errors and > then close the socket. This could race with userspace closing the > socket. Instead, leave userspa

Re: general protection fault in ipt_do_table

2018-02-12 Thread Florian Westphal
syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 9a61df9e5f7471fe5be3e02bd0bed726b2761a54 (Sat Feb 10 03:32:41 2018 +) > Merge tag 'kbuild-v4.16-2' of > git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild > > So far this crash happened 2 times o

Re: [PATCH RFC net-next 4/4] ipv6: route: dissect flow in input path if fib rules need it

2018-02-12 Thread Roopa Prabhu
On Sun, Feb 11, 2018 at 11:44 PM, Ido Schimmel wrote: > On Sun, Feb 11, 2018 at 02:26:29PM -0800, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> Dissect flow in fwd path if fib rules require it. Controlled by >> a flag to avoid penatly for the common case. Flag is set when fib >> rules with spor

Re: [PATCH net-next v2 02/16] l2tp: add RCU read lock to protect tunnel ptr in ip socket destroy

2018-02-12 Thread David Miller
From: James Chapman Date: Mon, 12 Feb 2018 10:11:06 + > If an L2TPIP socket is closed, add RCU protection when we deref > sk_user_data to prevent races with another thread closing the same > tunnel. > > Fixes: 0d76751fad ("l2tp: Add L2TPv3 IP encapsulation (no UDP) support") Another patch w

Re: [PATCH net-next v2 01/16] l2tp: update sk_user_data while holding sk_callback_lock

2018-02-12 Thread David Miller
From: James Chapman Date: Mon, 12 Feb 2018 10:11:05 + > Since L2TP hooks on sockets opened by userspace using sk_user_data, we > may race with other socket families that attempt to use the same > socket. > > This problem was discovered by syzbot using AF_KCM. KCM has since been > modified to

Re: [PATCH net] bridge: check brport attr show in brport_show

2018-02-12 Thread David Miller
From: Xin Long Date: Mon, 12 Feb 2018 17:15:40 +0800 > Now br_sysfs_if file flush doesn't have attr show. To read it will > cause kernel panic after users chmod u+r this file. > > Xiong found this issue when running the commands: > > ip link add br0 type bridge > ip link add type veth > i

Re: WARNING: suspicious RCU usage in rds_tcp_conn_alloc

2018-02-12 Thread Sowmini Varadhan
#syz dup: WARNING: suspicious RCU usage in rds_loop_conn_alloc

Re: BUG: sleeping function called from invalid context at mm/slab.h:LINE (3)

2018-02-12 Thread Sowmini Varadhan
#syz dup: WARNING: suspicious RCU usage in rds_loop_conn_alloc

[PATCH net] netfilter: xt_hashlimit: fix lock imbalance

2018-02-12 Thread Eric Dumazet
From: Eric Dumazet syszkaller found that rcu was not held in hashlimit_mt_common() We only need to enable BH at this point. Fixes: bea74641e378 ("netfilter: xt_hashlimit: add rate match mode") Signed-off-by: Eric Dumazet Reported-by: syzkaller ---  net/netfilter/xt_hashlimit.c |2 +-  1 fi

Re: WARNING: suspicious RCU usage in rds_loop_conn_alloc

2018-02-12 Thread Sowmini Varadhan
> rcu_scheduler_active = 2, debug_locks = 1 > 1 lock held by syzkaller563791/4086: > #0: (rcu_read_lock){}, at: [] > __rds_conn_create+0xe46/0x1b50 net/rds/connection.c:218 > the rcu_read_lock() was added by ebeeb1ad9b. After we add that, everything in the rcu read critica

Re: lost connection to test machine (4)

2018-02-12 Thread Dmitry Vyukov
On Mon, Feb 12, 2018 at 5:00 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on bpf-next commit > 617aebe6a97efa539cc4b8a52adccd89596e6be0 (Sun Feb 4 00:25:42 2018 +) > Merge tag 'usercopy-v4.16-rc1' of > git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux > > So far this cr

Re: KASAN: stack-out-of-bounds Read in memcmp

2018-02-12 Thread Dmitry Vyukov
On Fri, Jan 5, 2018 at 11:06 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > bcecb4bbf88aa03171c30652bca761cf27755a6b > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is a

Re: Fwd: u32 ht filters

2018-02-12 Thread Jiri Pirko
Mon, Feb 12, 2018 at 04:32:16PM CET, j...@resnulli.us wrote: >Sat, Feb 10, 2018 at 09:41:57PM CET, xiyou.wangc...@gmail.com wrote: > >[...] > @@ -348,7 +340,7 @@ static struct tc_u_common *tc_u_common_find(const struct tcf_proto *tp) h = tc_u_hash(tp); hlist_for

Re: [PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-12 Thread David Miller
From: Finn Thain Date: Sun, 11 Feb 2018 22:08:43 -0500 (EST) > The lib8390 module parameter 'msg_enable' doesn't do anything useful: > it causes an ancient version string to be logged. Not true. You need to look at the various netif_*() et al. message logging interfaces, they check "p->msg_enab

Re: Fwd: u32 ht filters

2018-02-12 Thread Jiri Pirko
Sat, Feb 10, 2018 at 09:41:57PM CET, xiyou.wangc...@gmail.com wrote: [...] >>>@@ -348,7 +340,7 @@ static struct tc_u_common *tc_u_common_find(const >>>struct tcf_proto *tp) >>> >>>h = tc_u_hash(tp); >>>hlist_for_each_entry(tc, &tc_u_common_hash[h], hnode) { >>>- if (

Re: INFO: rcu detected stall in xfrm_confirm_neigh

2018-02-12 Thread Dmitry Vyukov
On Mon, Feb 12, 2018 at 4:23 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 9515a2e082f91457db0ecff4b65371d0fb5d9aad (Thu Jan 25 03:37:38 2018 +) > net/ipv4: Allow send to local broadcast from a socket bound to a VRF > > So far this crash happened 6 times on

Re: INFO: rcu detected stall in _decode_session6

2018-02-12 Thread Dmitry Vyukov
On Mon, Feb 12, 2018 at 4:23 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > d0adb51edb73c94a595bfa9d9bd8b35977e74fbf > > Unfortunately, I don't have any reproducer for this crash yet. > Raw console output is attached. > compiler: gcc (GCC) 7.1.1 20170620 > .conf

Re: INFO: rcu detected stall in __xfrm_decode_session

2018-02-12 Thread Dmitry Vyukov
On Mon, Feb 12, 2018 at 4:22 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > d0adb51edb73c94a595bfa9d9bd8b35977e74fbf > > Unfortunately, I don't have any reproducer for this crash yet. > Raw console output is attached. > compiler: gcc (GCC) 7.1.1 20170620 > .conf

Re: Serious performance degradation in Linux 4.15

2018-02-12 Thread Peter Zijlstra
On Fri, Feb 09, 2018 at 05:59:12PM +, Jon Maloy wrote: > Command for TCP: > "netperf TCP_STREAM (netperf -n 4 -f m -c 4 -C 4 -P 1 -H 10.0.0.1 -t > TCP_STREAM -l 10 -- -O THROUGHPUT)" > Command for TIPC: > "netperf TIPC_STREAM (netperf -n 4 -f m -c 4 -C 4 -P 1 -H 10.0.0.1 -t > TCP_STREAM -l 1

Re: [PATCH net] sctp: rename sctp_diag.c as diag.c

2018-02-12 Thread David Miller
From: Marcelo Ricardo Leitner Date: Mon, 12 Feb 2018 10:37:04 -0200 > On Mon, Feb 12, 2018 at 06:32:30PM +0800, Xin Long wrote: >> Remove sctp_ prefix for diag file, to keep consistent with other >> files' names, while at it, also to add file comments for diag.c. > > Okay but this should be a tw

Re: [PATCH net v2] tipc: fix missing RTNL lock protection during setting link properties

2018-02-12 Thread David Miller
From: Kirill Tkhai Date: Mon, 12 Feb 2018 13:10:34 +0300 > This err branch looks excess. It was before your patch, but in case of you > change this place, > can't we stop having it? it looks like we can simply do the below here: > > err = tipc_enable_bearer(net, bearer, domain, prio, attr

Re: [PATCH net] sctp: rename sctp_diag.c as diag.c

2018-02-12 Thread Neil Horman
On Mon, Feb 12, 2018 at 06:32:30PM +0800, Xin Long wrote: > Remove sctp_ prefix for diag file, to keep consistent with other > files' names, while at it, also to add file comments for diag.c. > > Signed-off-by: Xin Long I'm fine with this as a single patch Acked-by: Neil Horman > --- > net/sct

Re: [PATCH net] sctp: remove the useless check in sctp_renege_events

2018-02-12 Thread Neil Horman
On Mon, Feb 12, 2018 at 06:31:24PM +0800, Xin Long wrote: > Remove the 'if (chunk)' check in sctp_renege_events for idata process, > as all renege commands are generated in sctp_eat_data and it can't be > NULL. > > The same thing we already did for common data in sctp_ulpq_renege. > > Fixes: 9401

[PATCH] net: make getname() functions return length rather than use int* parameter

2018-02-12 Thread Denys Vlasenko
Before: All these functions either return a negative error indicator, or store length of sockaddr into "int *socklen" parameter and return zero on success. "int *socklen" parameter is awkward. For example, if caller does not care, it still needs to provide on-stack storage for the value it does no

Re: [PATCH net] sctp: fix some copy-paste errors for file comments

2018-02-12 Thread Neil Horman
On Mon, Feb 12, 2018 at 06:30:34PM +0800, Xin Long wrote: > This patch is to fix the file comments in stream.c and > stream_interleave.c > > Fixes: a83863174a61 ("sctp: prepare asoc stream for stream reconf") > Fixes: 0c3f6f655487 ("sctp: implement make_datafrag for > sctp_stream_interleave") > S

[PATCH net 1/2] net: thunderbolt: Tear down connection properly on suspend

2018-02-12 Thread Mika Westerberg
When suspending to mem or disk the Thunderbolt controller typically goes down as well tearing down the connection automatically. However, when suspend to idle is used this does not happen so we need to make sure the connection is properly disconnected before it can be re-established during resume.

[PATCH net 2/2] net: thunderbolt: Run disconnect flow asynchronously when logout is received

2018-02-12 Thread Mika Westerberg
The control channel calls registered callbacks when control messages such as XDomain protocol messages are received. The control channel handling is done in a worker running on system workqueue which means the networking driver can't run tear down flow which includes sending disconnect request and

Re: [PATCH net] sctp: add SCTP_CID_I_DATA and SCTP_CID_I_FWD_TSN conversion in sctp_cname

2018-02-12 Thread Neil Horman
On Mon, Feb 12, 2018 at 06:29:51PM +0800, Xin Long wrote: > After the support for SCTP_CID_I_DATA and SCTP_CID_I_FWD_TSN chunks, > the corresp conversion in sctp_cname should also be added. Otherwise, > in some places, pr_debug will print them as "unknown chunk". > > Signed-off-by: Xin Long > ---

Re: [PATCH net] sctp: do not pr_err for the duplicated node in transport rhlist

2018-02-12 Thread Neil Horman
On Mon, Feb 12, 2018 at 06:29:06PM +0800, Xin Long wrote: > The pr_err in sctp_hash_transport was supposed to report a sctp bug > for using rhashtable/rhlist. > > The err '-EEXIST' introduced in Commit cd2b70875058 ("sctp: check > duplicate node before inserting a new transport") doesn't belong >

Re: [PATCH v2] lockdep: Fix fs_reclaim warning.

2018-02-12 Thread Tetsuo Handa
Nikolay Borisov wrote: > I think I've hit another incarnation of that one. The call stack is: > http://paste.opensuse.org/3f22d013 > > The cleaned up callstack of all the ? entries look like: > > __lock_acquire+0x2d8a/0x4b70 > lock_acquire+0x110/0x330 > kmem_cache_alloc+0x29/0x2c0 > __clear_exten

[PATCH ipsec] xfrm_user: uncoditionally validate esn replay attribute struct

2018-02-12 Thread Florian Westphal
The sanity test added in ecd7918745234 can be bypassed, validation only occurs if XFRM_STATE_ESN flag is set, but rest of code doesn't care and just checks if the attribute itself is present. So always validate. Alternative is to reject if we have the attribute without the flag but that would cha

[PATCH v2] sh_eth: Remove obsolete explicit clock handling for WoL

2018-02-12 Thread Geert Uytterhoeven
Currently, if Wake-on-LAN is enabled, the SH-ETH device's module clock is manually kept running during system suspend, to make sure the device stays active. Since commits 91c719f5ec6671f7 ("soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend") and 744dddcae84441b1 ("clk: rene

Re: [PATCH] net: phy: fix wrong mask to phy_modify()

2018-02-12 Thread Andrew Lunn
On Mon, Feb 12, 2018 at 12:02:52PM +0100, Ingo van Lil wrote: > When forcing a specific link mode, the PHY driver must clear the > existing speed and duplex bits in BMCR while preserving some other > control bits. This logic was accidentally inverted with the introduction > of phy_modify(). > > Si

[PATCH v2] ravb: Remove obsolete explicit clock handling for WoL

2018-02-12 Thread Geert Uytterhoeven
Currently, if Wake-on-LAN is enabled, the EtherAVB device's module clock is manually kept running during system suspend, to make sure the device stays active. Since commit 91c719f5ec6671f7 ("soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend") , this workaround is no longer

[PATCH] ravb: Remove obsolete explicit clock handling for WoL

2018-02-12 Thread Geert Uytterhoeven
Currently, if Wake-on-LAN is enabled, the EtherAVB device's module clock is manually kept running during system suspend, to make sure the device stays active. Since commit 91c719f5ec6671f7 ("soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend") , this workaround is no longer

Re: Fwd: u32 ht filters

2018-02-12 Thread Jiri Pirko
Sat, Feb 10, 2018 at 09:41:57PM CET, xiyou.wangc...@gmail.com wrote: >On Wed, Feb 7, 2018 at 11:38 PM, Jiri Pirko wrote: >> Thu, Feb 08, 2018 at 12:08:36AM CET, xiyou.wangc...@gmail.com wrote: >>>On Tue, Feb 6, 2018 at 11:01 PM, Jiri Pirko wrote: Wed, Feb 07, 2018 at 06:09:15AM CET, xiyou.wa

Re: [PATCH net] sctp: rename sctp_diag.c as diag.c

2018-02-12 Thread Marcelo Ricardo Leitner
On Mon, Feb 12, 2018 at 06:32:30PM +0800, Xin Long wrote: > Remove sctp_ prefix for diag file, to keep consistent with other > files' names, while at it, also to add file comments for diag.c. Okay but this should be a two-patches series then. The changes made with the rename are hard to find/follo

Re: [PATCH net] sctp: remove the useless check in sctp_renege_events

2018-02-12 Thread Marcelo Ricardo Leitner
On Mon, Feb 12, 2018 at 06:31:24PM +0800, Xin Long wrote: > Remove the 'if (chunk)' check in sctp_renege_events for idata process, > as all renege commands are generated in sctp_eat_data and it can't be > NULL. > > The same thing we already did for common data in sctp_ulpq_renege. > > Fixes: 9401

Re: [PATCH net] sctp: add SCTP_CID_I_DATA and SCTP_CID_I_FWD_TSN conversion in sctp_cname

2018-02-12 Thread Marcelo Ricardo Leitner
On Mon, Feb 12, 2018 at 06:29:51PM +0800, Xin Long wrote: > After the support for SCTP_CID_I_DATA and SCTP_CID_I_FWD_TSN chunks, > the corresp conversion in sctp_cname should also be added. Otherwise, > in some places, pr_debug will print them as "unknown chunk". > > Signed-off-by: Xin Long Acke

Re: [PATCH net] sctp: do not pr_err for the duplicated node in transport rhlist

2018-02-12 Thread Marcelo Ricardo Leitner
On Mon, Feb 12, 2018 at 06:29:06PM +0800, Xin Long wrote: > The pr_err in sctp_hash_transport was supposed to report a sctp bug > for using rhashtable/rhlist. > > The err '-EEXIST' introduced in Commit cd2b70875058 ("sctp: check > duplicate node before inserting a new transport") doesn't belong >

Re: [PATCH] headers: untangle kmemleak.h from mm.h

2018-02-12 Thread Michael Ellerman
Randy Dunlap writes: > From: Randy Dunlap > > Currently #includes for no obvious > reason. It looks like it's only a convenience, so remove kmemleak.h > from slab.h and add to any users of kmemleak_* > that don't already #include it. > Also remove from source files that do not use it. > > Th

Re: [PATCH v2] lockdep: Fix fs_reclaim warning.

2018-02-12 Thread Nikolay Borisov
On 8.02.2018 13:43, Tetsuo Handa wrote: >>From 361d37a7d36978020dfb4c11ec1f4800937ccb68 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Thu, 8 Feb 2018 10:35:35 +0900 > Subject: [PATCH v2] lockdep: Fix fs_reclaim warning. > > Dave Jones reported fs_reclaim lockdep warnings. > > ==

[Crypto v4 12/12] Makefile Kconfig

2018-02-12 Thread Atul Gupta
Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/Kconfig| 11 +++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files changed, 16 insertions(+) create mode 1

[Crypto v4 11/12] chtls: Register the chtls Inline TLS with net tls

2018-02-12 Thread Atul Gupta
Add new uld driver for Inline TLS support. Register ULP for chtls. Setsockopt to program key on chip. support AES GCM key size 128. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chtls/chtls_main.c | 619 ++ include/uapi/linux/tls.h | 1 + 2 f

[Crypto v4 09/12] chtls: CPL handler definition

2018-02-12 Thread Atul Gupta
CPL handlers for TLS session, record transmit and receive. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2045 +++ net/ipv4/tcp_minisocks.c|1 + 2 files changed, 2046 insertions(+) create mode 100644 drivers/crypto/chelsi

[Crypto v4 06/12] cxgb4: LLD driver changes to enable TLS

2018-02-12 Thread Atul Gupta
Read FW capability. Read key area size. Dump the TLS record count. Signed-off-by: Atul Gupta --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 18 +++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 32 +-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 7 ++ drivers/net/

[Crypto v4 10/12] chtls: Inline crypto request Tx/Rx

2018-02-12 Thread Atul Gupta
TLS handler for record transmit and receive. Create Inline TLS work request and post to FW. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chtls/chtls_io.c | 1867 +++ 1 file changed, 1867 insertions(+) create mode 100644 drivers/crypto/chelsio/chtls/chtls_io.c

[Crypto v4 08/12] chtls: Key program

2018-02-12 Thread Atul Gupta
Program the tx and rx key on chip. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chtls/chtls_hw.c | 394 1 file changed, 394 insertions(+) create mode 100644 drivers/crypto/chelsio/chtls/chtls_hw.c diff --git a/drivers/crypto/chelsio/chtls/chtls_hw.c b/

[Crypto v4 07/12] chcr: Key Macro

2018-02-12 Thread Atul Gupta
Define macro for TLS Key context Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chcr_algo.h | 42 + drivers/crypto/chelsio/chcr_core.h | 55 +- 2 files changed, 96 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/chel

[Crypto v4 05/12] cxgb4: Inline TLS FW Interface

2018-02-12 Thread Atul Gupta
Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 121 ++- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 2 + drivers/net/ethernet/chelsio/cxgb4/

[Crypto v4 04/12] chtls: structure and macro definiton

2018-02-12 Thread Atul Gupta
Inline TLS state, connection management. Supporting macros definition. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chtls/chtls.h| 487 drivers/crypto/chelsio/chtls/chtls_cm.h | 203 + 2 files changed, 690 insertions(+) create mode 100644

[Crypto v4 03/12] support for inline tls

2018-02-12 Thread Atul Gupta
Signed-off-by: Atul Gupta --- net/tls/tls_main.c | 113 + 1 file changed, 113 insertions(+) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index e07ee3a..10a6d5d 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -38,6 +38,7 @@

[Crypto v4 02/12] ethtool: feature for Inline TLS in HW

2018-02-12 Thread Atul Gupta
Signed-off-by: Atul Gupta --- include/linux/netdev_features.h | 2 ++ net/core/ethtool.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index b1b0ca7..e1a33b7 100644 --- a/include/linux/netdev_features.h +++ b/i

[Crypto v4 01/12] tls: tls_device struct to register TLS drivers

2018-02-12 Thread Atul Gupta
added tls_device structure to register Inline TLS drivers with net/tls Signed-off-by: Atul Gupta --- include/net/tls.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/net/tls.h b/include/net/tls.h index 936cfc5..2a9f392 100644 --- a/include/net/tls.h +++ b/incl

[Crypto v4 00/12] Chelsio Inline TLS

2018-02-12 Thread Atul Gupta
RFC series for Chelsio Inline TLS driver (chtls.ko) Driver use the ULP infrastructure to register chtls as Inline TLS ULP. Chtls use TCP Sockets to transmit and receive TLS record. TCP proto_ops is extended to offload TLS record. T6 adapter provides the following features: -TLS record off

Re: xfrm, ip tunnel: non released device reference upon device unregistration

2018-02-12 Thread Eyal Birger
On Sun, 11 Feb 2018 16:46:48 +0100 Florian Westphal wrote: > Eyal Birger wrote: > > Sorry for taking so long to respond. > > > On Tue, 6 Feb 2018 14:15:09 +0100 > > Florian Westphal wrote: > > > > > Steffen Klassert wrote: > > > > I gave the patch a quick try, but still I get this: > >

[PATCH] net: phy: fix wrong mask to phy_modify()

2018-02-12 Thread Ingo van Lil
When forcing a specific link mode, the PHY driver must clear the existing speed and duplex bits in BMCR while preserving some other control bits. This logic was accidentally inverted with the introduction of phy_modify(). Signed-off-by: Ingo van Lil --- drivers/net/phy/phy_device.c | 2 +- 1 fil

[PATCH v5 1/1] tcp: Honor the eor bit in tcp_mtu_probe

2018-02-12 Thread Ilya Lesokhin
Avoid SKB coalescing if eor bit is set in one of the relevant SKBs. Fixes: c134ecb87817 ("tcp: Make use of MSG_EOR in tcp_sendmsg") Signed-off-by: Ilya Lesokhin --- Changes from v4: - Remove Gerrit Change-Id Changes from v3: - Fix coding style Changes from v2:

[PATCH net] sctp: rename sctp_diag.c as diag.c

2018-02-12 Thread Xin Long
Remove sctp_ prefix for diag file, to keep consistent with other files' names, while at it, also to add file comments for diag.c. Signed-off-by: Xin Long --- net/sctp/Makefile| 2 + net/sctp/diag.c | 557 +++ net/sctp/sctp_diag.c | 526 -

[PATCH net] sctp: remove the useless check in sctp_renege_events

2018-02-12 Thread Xin Long
Remove the 'if (chunk)' check in sctp_renege_events for idata process, as all renege commands are generated in sctp_eat_data and it can't be NULL. The same thing we already did for common data in sctp_ulpq_renege. Fixes: 94014e8d871a ("sctp: implement renege_events for sctp_stream_interleave") Si

<    1   2   3   >