Re: [PATCH v2] sctp: Fix double free in sctp_sendmsg_to_asoc

2018-03-13 Thread Xin Long
On Tue, Mar 13, 2018 at 2:15 AM, Neil Horman wrote: > syzbot/kasan detected a double free in sctp_sendmsg_to_asoc: > BUG: KASAN: use-after-free in sctp_association_free+0x7b7/0x930 > net/sctp/associola.c:332 > Read of size 8 at addr 8801d8006ae0 by task syzkaller914861/4202 > > CPU: 1 PID: 420

[PATCH 2/9] xfrm: Fix policy hold queue after flowcache removal.

2018-03-13 Thread Steffen Klassert
Now that the flowcache is removed we need to generate a new dummy bundle every time we check if the needed SAs are in place because the dummy bundle is not cached anymore. Fix it by passing the XFRM_LOOKUP_QUEUE flag to xfrm_lookup(). This makes sure that we get a dummy bundle in case the SAs are n

[PATCH 1/9] xfrm: Refuse to insert 32 bit userspace socket policies on 64 bit systems

2018-03-13 Thread Steffen Klassert
We don't have a compat layer for xfrm, so userspace and kernel structures have different sizes in this case. This results in a broken configuration, so refuse to configure socket policies when trying to insert from 32 bit userspace as we do it already with policies inserted via netlink. Reported-a

[PATCH 8/9] xfrm: Verify MAC header exists before overwriting eth_hdr(skb)->h_proto

2018-03-13 Thread Steffen Klassert
From: Yossi Kuperman Artem Savkov reported that commit 5efec5c655dd leads to a packet loss under IPSec configuration. It appears that his setup consists of a TUN device, which does not have a MAC header. Make sure MAC header exists. Note: TUN device sets a MAC header pointer, although it does n

[PATCH 7/9] xfrm: Fix ESN sequence number handling for IPsec GSO packets.

2018-03-13 Thread Steffen Klassert
When IPsec offloading was introduced, we accidentally incremented the sequence number counter on the xfrm_state by one packet too much in the ESN case. This leads to a sequence number gap of one packet after each GSO packet. Fix this by setting the sequence number to the correct value. Fixes: d7db

[PATCH 9/9] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms()

2018-03-13 Thread Steffen Klassert
From: Greg Hackmann f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a __this_cpu_read() call inside ipcomp_alloc_tfms(). At the time, __this_cpu_read() required the caller to either not care about races or to handle preemption/interrupt issues. 3.15 tightened the rules arou

[PATCH 3/9] xfrm_user: uncoditionally validate esn replay attribute struct

2018-03-13 Thread Steffen Klassert
From: 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 th

[PATCH 5/9] xfrm: do not call rcu_read_unlock when afinfo is NULL in xfrm_get_tos

2018-03-13 Thread Steffen Klassert
From: Xin Long When xfrm_policy_get_afinfo returns NULL, it will not hold rcu read lock. In this case, rcu_read_unlock should not be called in xfrm_get_tos, just like other places where it's calling xfrm_policy_get_afinfo. Fixes: f5e2bb4f5b22 ("xfrm: policy: xfrm_get_tos cannot fail") Signed-off

[PATCH 6/9] xfrm: Fix infinite loop in xfrm_get_dst_nexthop with transport mode.

2018-03-13 Thread Steffen Klassert
On transport mode we forget to fetch the child dst_entry before we continue the while loop, this leads to an infinite loop. Fix this by fetching the child dst_entry before we continue the while loop. Fixes: 0f6c480f23f4 ("xfrm: Move dst->path into struct xfrm_dst") Reported-by: syzbot+7d03c810e50a

[PATCH 4/9] xfrm: reuse uncached_list to track xdsts

2018-03-13 Thread Steffen Klassert
From: Xin Long In early time, when freeing a xdst, it would be inserted into dst_garbage.list first. Then if it's refcnt was still held somewhere, later it would be put into dst_busy_list in dst_gc_task(). When one dev was being unregistered, the dev of these dsts in dst_busy_list would be set w

pull request (net): ipsec 2018-03-13

2018-03-13 Thread Steffen Klassert
1) Refuse to insert 32 bit userspace socket policies on 64 bit systems like we do it for standard policies. We don't have a compat layer, so inserting socket policies from 32 bit userspace will lead to a broken configuration. 2) Make the policy hold queue work without the flowcache. Du

Re: [PATCH net-next v2 3/4] ibmvnic: Pad small packets to minimum MTU size

2018-03-13 Thread kbuild test robot
-Falcon/ibmvnic-Fix-VLAN-and-other-device-errata/20180313-125518 config: powerpc-allmodconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-13 Thread Felix Fietkau
On 2018-02-27 11:08, Rafał Miłecki wrote: > I've problem when using OpenWrt/LEDE on a home router with Broadcom's > FullMAC WiFi chipset. > > > First of all OpenWrt/LEDE uses bridge interface for LAN network with: > 1) IFLA_BRPORT_MCAST_TO_UCAST > 2) Clients isolation in hostapd > 3) Hairpin mode

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-13 Thread Felix Fietkau
[resent with fixed typo in linux-wireless address] On 2018-02-27 11:08, Rafał Miłecki wrote: > I've problem when using OpenWrt/LEDE on a home router with Broadcom's > FullMAC WiFi chipset. > > > First of all OpenWrt/LEDE uses bridge interface for LAN network with: > 1) IFLA_BRPORT_MCAST_TO_UCAST

Re: [2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-13 Thread SF Markus Elfring
>> Use three values directly for a condition check without assigning them >> to intermediate variables. > > Hi, > > what is the benefit of this? I proposed a small source code reduction. Other software design directions might become more interesting for this use case. Regards, Markus

Re: [pci PATCH v5 1/4] pci: Add pci_sriov_configure_simple for PFs that don't manage VF resources

2018-03-13 Thread Christoph Hellwig
On Mon, Mar 12, 2018 at 01:17:00PM -0700, Alexander Duyck wrote: > No, I am aware of those. The problem is they aren't accessed as > function pointers. As such converting them to static inline functions > is easy. As I am sure you are aware an "inline" function doesn't > normally generate a functio

Re: aio poll, io_pgetevents and a new in-kernel poll API V5

2018-03-13 Thread Christoph Hellwig
ping? On Mon, Mar 05, 2018 at 01:27:07PM -0800, Christoph Hellwig wrote: > Hi all, > > this series adds support for the IOCB_CMD_POLL operation to poll for the > readyness of file descriptors using the aio subsystem. The API is based > on patches that existed in RHAS2.1 and RHEL3, which means it

Re: WARNING in kmalloc_slab (4)

2018-03-13 Thread Steffen Klassert
On Tue, Mar 13, 2018 at 12:33:02AM -0700, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > f44b1886a5f876c87b5889df463ad7b97834ba37 (Fri Mar 9 18:10:06 2018 +) > Merge branch 's390-qeth-next' > > Unfortunately, I don't have any reproducer for this crash yet. > Ra

Re: WARNING in kmalloc_slab (4)

2018-03-13 Thread Dmitry Vyukov
On Tue, Mar 13, 2018 at 10:51 AM, Steffen Klassert wrote: > On Tue, Mar 13, 2018 at 12:33:02AM -0700, syzbot wrote: >> Hello, >> >> syzbot hit the following crash on net-next commit >> f44b1886a5f876c87b5889df463ad7b97834ba37 (Fri Mar 9 18:10:06 2018 +) >> Merge branch 's390-qeth-next' >> >> U

Re: [pci PATCH v5 3/4] ena: Migrate over to unmanaged SR-IOV support

2018-03-13 Thread David Woodhouse
On Mon, 2018-03-12 at 10:23 -0700, Alexander Duyck wrote: > > -   .sriov_configure = ena_sriov_configure, > +#ifdef CONFIG_PCI_IOV > +   .sriov_configure = pci_sriov_configure_simple, > +#endif >  }; I'd like to see that ifdef go away, as discussed. I agree that just #define pci_sriov_con

Re: [pci PATCH v5 3/4] ena: Migrate over to unmanaged SR-IOV support

2018-03-13 Thread Christoph Hellwig
On Tue, Mar 13, 2018 at 08:12:52AM +, David Woodhouse wrote: > I'd also *really* like to see a way to enable this for PFs which don't > have (and don't need) a driver. We seem to have lost that along the > way. We've been forth and back on that. I agree that not having any driver just seems d

[PATCH] xfrm: fix rcu_read_unlock usage in xfrm_local_error

2018-03-13 Thread Taehee Yoo
In the xfrm_local_error, rcu_read_unlock should be called when afinfo is not NULL. because xfrm_state_get_afinfo calls rcu_read_unlock if afinfo is NULL. Signed-off-by: Taehee Yoo --- net/xfrm/xfrm_output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_ou

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

2018-03-13 Thread Leon Romanovsky
On Mon, Mar 12, 2018 at 10:53:03AM -0700, David Ahern wrote: > On 3/12/18 8:16 AM, Steve Wise wrote: > > Hey all, > > > > The kernel side of this series has been merged for rdma-next [1]. Let me > > know if this iproute2 series can be merged, of if it needs more changes. > > > > The problem is tha

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Steffen Klassert
On Mon, Mar 12, 2018 at 11:25:09PM -0700, Eric Dumazet wrote: > > > On 03/12/2018 11:08 PM, Yonghong Song wrote: > > > > > > On 3/12/18 11:04 PM, Eric Dumazet wrote: > > > > > > > > > On 03/12/2018 10:45 PM, Yonghong Song wrote: > > > > ... > > > > Setup: > > > > = > > > > > > > > The te

Re: [pci PATCH v5 3/4] ena: Migrate over to unmanaged SR-IOV support

2018-03-13 Thread David Woodhouse
On Tue, 2018-03-13 at 09:16 +0100, Christoph Hellwig wrote: > On Tue, Mar 13, 2018 at 08:12:52AM +, David Woodhouse wrote: > > > > I'd also *really* like to see a way to enable this for PFs which don't > > have (and don't need) a driver. We seem to have lost that along the > > way. > We've b

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-13 Thread Greg Kroah-Hartman
On Mon, Mar 12, 2018 at 10:22:00AM -0700, Alexei Starovoitov wrote: > On 3/10/18 7:34 AM, Luis R. Rodriguez wrote: > > Also, > > > > Alexei you never answered my questions out aliases with the umh modules. > > Long term this important to consider. > > aliases always felt like a crutch to me. > I

Re: [pci PATCH v5 3/4] ena: Migrate over to unmanaged SR-IOV support

2018-03-13 Thread Christoph Hellwig
On Tue, Mar 13, 2018 at 08:45:19AM +, David Woodhouse wrote: > > > On Tue, 2018-03-13 at 09:16 +0100, Christoph Hellwig wrote: > > On Tue, Mar 13, 2018 at 08:12:52AM +, David Woodhouse wrote: > > > > > > I'd also *really* like to see a way to enable this for PFs which don't > > > have (a

Re: [PATCH iproute2] Revert "iproute: "list/flush/save default" selected all of the routes"

2018-03-13 Thread Alexander Zubkov
Hello. May be the better way would be to change how "all"/"any" argument behaves? My original concern was about "default" only. I agree too, that "all" or "any" should work for all routes. But not for the default. 12.03.2018, 22:37, "Luca Boccassi" : > On Mon, 2018-03-12 at 14:03 -0700, Stephen

[PATCH net] qed: Use after free in qed_rdma_free()

2018-03-13 Thread Dan Carpenter
We're dereferencing "p_hwfn->p_rdma_info" but that is freed on the line before in qed_rdma_resc_free(p_hwfn). Fixes: 9de506a547c0 ("qed: Free RoCE ILT Memory on rmmod qedr") Signed-off-by: Dan Carpenter diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qe

Re: [pci PATCH v5 3/4] ena: Migrate over to unmanaged SR-IOV support

2018-03-13 Thread David Woodhouse
On Tue, 2018-03-13 at 09:54 +0100, Christoph Hellwig wrote: > On Tue, Mar 13, 2018 at 08:45:19AM +, David Woodhouse wrote: > Because binding to pci-stub means that you'd now enable the simple > SR-IOV for any device bound to PCI stub.  Which often might be the wrong > thing. No, *using* it w

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-13 Thread Arend van Spriel
On 3/13/2018 8:20 AM, Felix Fietkau wrote: [resent with fixed typo in linux-wireless address] On 2018-02-27 11:08, Rafał Miłecki wrote: I've problem when using OpenWrt/LEDE on a home router with Broadcom's FullMAC WiFi chipset. First of all OpenWrt/LEDE uses bridge interface for LAN network w

RE: [PATCH net] qed: Use after free in qed_rdma_free()

2018-03-13 Thread Kalderon, Michal
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Tuesday, March 13, 2018 11:10 AM > To: Elior, Ariel ; Kalderon, Michal > > Cc: Dept-Eng Everest Linux L2 ; > netdev@vger.kernel.org; kernel-janit...@vger.kernel.org > Subject: [PATCH net] qed: Use after free in qed_rdma_free() > > We

[PATCH V2 net 1/1] net/smc: simplify wait when closing listen socket

2018-03-13 Thread Ursula Braun
Closing of a listen socket wakes up kernel_accept() of smc_tcp_listen_worker(), and then has to wait till smc_tcp_listen_worker() gives up the internal clcsock. The wait logic introduced with commit 127f49705823 ("net/smc: release clcsock from tcp_listen_worker") might wait longer than necessary. T

[PATCH V2 net 0/1] net/smc: listen socket closing

2018-03-13 Thread Ursula Braun
Hi Dave, last week you asked for a better solution using generic infrastructure to fix the closing of a listening SMC socket. This made me realize that flush_work() is an appropriate way to make sure the smc_tcp_listen_worker has finished processing (incl. the release of the internal clcsock.) Th

[PATCH] bpf: fix semicolon.cocci warnings

2018-03-13 Thread kbuild test robot
From: Fengguang Wu kernel/bpf/stackmap.c:177:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: fd5c09555695 ("bpf: extend stackmap to save binary_build_id+offset instead of address") CC: Song Liu Signed-off-by: Fengguang Wu ---

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-13 Thread kbuild test robot
the system] url: https://github.com/0day-ci/linux/commits/Song-Liu/bpf-stackmap-with-build_id-offset/20180313-085825 coccinelle warnings: (new ones prefixed by >>) >> kernel/bpf/stackmap.c:177:2-3: Unneeded semicolon Please review and possibly fold the followup patch. --- 0-DAY

[PATCH 2/2] doc: Change the udp/sctp rmem/wmem default value.

2018-03-13 Thread Tonghao Zhang
The SK_MEM_QUANTUM was changed from PAGE_SIZE to 4096. Signed-off-by: Tonghao Zhang --- Documentation/networking/ip-sysctl.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 783675a.

[PATCH 1/2] udp: Move the udp sysctl to namespace.

2018-03-13 Thread Tonghao Zhang
This patch moves the udp_rmem_min, udp_wmem_min to namespace and init the udp_l3mdev_accept explicitly. Signed-off-by: Tonghao Zhang --- include/net/netns/ipv4.h | 3 ++ net/ipv4/sysctl_net_ipv4.c | 32 - net/ipv4/udp.c | 86 +++-

Re: [PATCH net 4/5] tcp: prevent bogus undos when SACK is not enabled

2018-03-13 Thread Ilpo Järvinen
On Fri, 9 Mar 2018, David Miller wrote: > From: Ilpo Järvinen > Date: Fri, 9 Mar 2018 16:11:47 +0200 (EET) > > > Unfortunately I don't have now permission to publish the time-seq > > graph about it but I've tried to improve the changelog messages so > > that you can better understand under which

[PATCH v3 net 0/5] tcp: fixes to non-SACK TCP

2018-03-13 Thread Ilpo Järvinen
Here is a series of fixes to issues that occur when SACK is not enabled for a TCP connection. These are not fixes to just some remote corner cases of recovery but many/almost all recoveries without SACK will be impacted by one (or even more than one) of them. The sender-side changes (1-4) are not m

[PATCH v3 net 4/5] tcp: prevent bogus undos when SACK is not enabled

2018-03-13 Thread Ilpo Järvinen
When a cumulative ACK lands to high_seq at the end of loss recovery and SACK is not enabled, the sender needs to avoid false fast retransmits (RFC6582). The avoidance mechanisms is implemented by remaining in the loss recovery CA state until one additional cumulative ACK arrives. During the operati

[PATCH v3 net 2/5] tcp: prevent bogus FRTO undos with non-SACK flows

2018-03-13 Thread Ilpo Järvinen
If SACK is not enabled and the first cumulative ACK after the RTO retransmission covers more than the retransmitted skb, a spurious FRTO undo will trigger (assuming FRTO is enabled for that RTO). The reason is that any non-retransmitted segment acknowledged will set FLAG_ORIG_SACK_ACKED in tcp_clea

[PATCH v3 net 3/5] tcp: move false FR condition into tcp_false_fast_retrans_possible()

2018-03-13 Thread Ilpo Järvinen
No functional changes. This change simplifies the next change slightly. Signed-off-by: Ilpo Järvinen --- net/ipv4/tcp_input.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c60745c..72ecfbb 100644 --- a/n

[PATCH v3 net 1/5] tcp: feed correct number of pkts acked to cc modules also in recovery

2018-03-13 Thread Ilpo Järvinen
A miscalculation for the number of acknowledged packets occurs during RTO recovery whenever SACK is not enabled and a cumulative ACK covers any non-retransmitted skbs. The reason is that pkts_acked value calculated in tcp_clean_rtx_queue is not correct for slow start after RTO as it may include seg

[PATCH v3 net 5/5] tcp: send real dupACKs by locking advertized window for non-SACK flows

2018-03-13 Thread Ilpo Järvinen
Currently, the TCP code is overly eager to increase window on almost every ACK. It makes those ACKs that the receiver should sent as dupACKs look like they update window that is not considered a real dupACK by the non-SACK sender-side code. Therefore the sender needs to resort to RTO to recover los

[PATCH net-next] cxgb4: Add HMA support

2018-03-13 Thread Arjun Vynipadath
HMA(Host Memory Access) maps a part of host memory for T6-SO memfree cards. This commit does the following: - Query FW to check if we have HMA support. If yes, the params will return HMA size configured in FW. We will dma map memory based on this size. - Also contains changes to get HMA memory

Re: [2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-13 Thread Oliver Neukum
Am Dienstag, den 13.03.2018, 08:24 +0100 schrieb SF Markus Elfring: > > > > > > > > Use three values directly for a condition check without assigning them > > > to intermediate variables. > > > > Hi, > > > > what is the benefit of this? > > I proposed a small source code reduction. > > Other

[PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations create and destroy net::sctp::ctl_sock. Since pernet_operations do not send sctp packets each other, they look safe to be marked as async. Signed-off-by: Kirill Tkhai --- net/sctp/protocol.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/sctp/protocol.c b/net/

[PATCH net-next 0/4] Converting pernet_operations (part #6)

2018-03-13 Thread Kirill Tkhai
Hi, this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces in the same time. There are sctp, tipc and rds in this series. Thanks, Kirill --- Kirill Tkhai (4): net: Convert sctp_defaults_ops net: Con

[PATCH net-next 1/4] net: Convert sctp_defaults_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations have a deal with sysctl, /proc entries and statistics. Also, there are freeing of net::sctp::addr_waitq queue and net::sctp::local_addr_list in exit method. All of them look pernet-divided, and it seems these items are only interesting for sctp_defaults_ops, which are safe t

[PATCH net-next 3/4] net: Convert tipc_net_ops

2018-03-13 Thread Kirill Tkhai
TIPC looks concentrated in itself, and other pernet_operations seem not touching its entities. tipc_net_ops look pernet-divided, and they should be safe to be executed in parallel for several net the same time. Signed-off-by: Kirill Tkhai --- net/tipc/core.c |1 + 1 file changed, 1 insertio

[PATCH net-next 4/4] net: Convert rds_tcp_net_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations create and destroy sysctl table and listen socket. Also, exit method flushes global workqueue and work. Everything looks per-net safe, so we can mark them async. Signed-off-by: Kirill Tkhai --- net/rds/tcp.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/rds/t

Re: BUG: corrupted list in sctp_association_free

2018-03-13 Thread Xin Long
On Tue, Mar 13, 2018 at 3:34 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > fd372a7a9e5e9d8011a0222d10edd3523abcd3b1 (Thu Mar 8 19:43:48 2018 +) > Merge tag 'mlx5-updates-2018-02-28-2' of > git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux > > Unf

Re: linux-next: manual merge of the net-next tree with the net tree

2018-03-13 Thread Petr Machata
Stephen Rothwell writes: > Today's linux-next merge of the net-next tree got conflicts in: > > drivers/net/ethernet/mellanox/mlxsw/spectrum.h > drivers/net/ethernet/mellanox/mlxsw/spectrum.c > > between commit: > > 663f1b26f9c1 ("mlxsw: spectrum: Prevent duplicate mirrors") > > from the net

Re: [PATCH net-next v2] sctp: fix error return code in sctp_sendmsg_new_asoc()

2018-03-13 Thread Neil Horman
On Tue, Mar 13, 2018 at 03:03:30AM +, Wei Yongjun wrote: > Return error code -EINVAL in the address len check error handling > case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()' > in the for loop. > > Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information fo

[PATCH net-next nfs 0/6] Converting pernet_operations (part #7)

2018-03-13 Thread Kirill Tkhai
Hi, this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces in the same time. There are nfs pernet_operations in this series. All of them look similar each other, they mostly create and destroy caches with small e

[PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations initialize and destroy sunrpc_net_id refered per-net items. Only used global list is cache_list, and accesses already serialized. sunrpc_destroy_cache_detail() check for list_empty() without cache_list_lock, but when it's called from unregister_pernet_subsys(), there can't

[PATCH net-next nfs 3/6] net: Convert nfsd_net_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another caches. So, they also can be async. Signed-off-by: Kirill Tkhai --- fs/nfsd/nfsctl.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index d107b4426f7e..1e3

[PATCH net-next nfs 4/6] net: Convert nfs4_dns_resolver_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another cache. Also they create and destroy directory. So, they also look safe to be async. Signed-off-by: Kirill Tkhai --- fs/nfs/dns_resolve.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/

[PATCH net-next nfs 2/6] net: Convert sunrpc_net_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another caches. So, they also can be async. Signed-off-by: Kirill Tkhai --- net/sunrpc/sunrpc_syms.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c

[PATCH net-next nfs 5/6] net: Convert nfs4blocklayout_net_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations create and destroy per-net pipe and dentry, and they seem safe to be marked as async. Signed-off-by: Kirill Tkhai --- fs/nfs/blocklayout/rpc_pipefs.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c i

[PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops

2018-03-13 Thread Kirill Tkhai
These pernet_operations modifies rxrpc_net_id-pointed per-net entities. There is external link to AF_RXRPC in fs/afs/Kconfig, but it seems there is no other pernet_operations interested in that per-net entities. Signed-off-by: Kirill Tkhai --- net/rxrpc/net_ns.c |1 + 1 file changed, 1 inser

[PATCH net-next] net: Add comment about pernet_operations methods and synchronization

2018-03-13 Thread Kirill Tkhai
Make locking scheme be visible for users, and provide a comment what for we are need exit_batch() methods, and when it should be used. Signed-off-by: Kirill Tkhai --- include/net/net_namespace.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/net/net_namespace.h b/i

Re: [PATCH iproute2] Revert "iproute: "list/flush/save default" selected all of the routes"

2018-03-13 Thread Alexander Zubkov
Hello again, The fun thing is that before the commit "ip route ls all" showed all routes, but "ip -[4|6] route ls all" showed only default. So it was broken too, but in other way. I see parsing of prefix was changed since my patch. So I need several days to propose fix. I think if "ip route ls

Re: BUG: corrupted list in sctp_association_free

2018-03-13 Thread Dmitry Vyukov
On Tue, Mar 13, 2018 at 1:44 PM, Xin Long wrote: > On Tue, Mar 13, 2018 at 3:34 PM, syzbot > wrote: >> Hello, >> >> syzbot hit the following crash on net-next commit >> fd372a7a9e5e9d8011a0222d10edd3523abcd3b1 (Thu Mar 8 19:43:48 2018 +) >> Merge tag 'mlx5-updates-2018-02-28-2' of >> git://gi

Re: BUG: corrupted list in sctp_association_free

2018-03-13 Thread Neil Horman
On Tue, Mar 13, 2018 at 02:09:09PM +0300, Dmitry Vyukov wrote: > On Tue, Mar 13, 2018 at 1:44 PM, Xin Long wrote: > > On Tue, Mar 13, 2018 at 3:34 PM, syzbot > > wrote: > >> Hello, > >> > >> syzbot hit the following crash on net-next commit > >> fd372a7a9e5e9d8011a0222d10edd3523abcd3b1 (Thu Mar 8

Re: question about bpf.test_progs.fail

2018-03-13 Thread Daniel Borkmann
Hi Shaoting, On 03/12/2018 02:52 AM, lst wrote: > hi, I have a question need your help. > > I get failure "libbpf: incorrect bpf_call opcode" when running below two > cases on v4.16-rc3: > - > test_l4lb_all(); >     const char *file2 = "./test_l4lb_noinline.o"; > > test_xdp_

Re: [PATCH 1/2] udp: Move the udp sysctl to namespace.

2018-03-13 Thread Paolo Abeni
Hi, On Tue, 2018-03-13 at 02:57 -0700, Tonghao Zhang wrote: > This patch moves the udp_rmem_min, udp_wmem_min > to namespace and init the udp_l3mdev_accept explicitly. Can you please be a little more descriptive on why this is needed/helpful? > Signed-off-by: Tonghao Zhang > --- > include/net/

[PATCH net-next] net: fix sysctl_fb_tunnels_only_for_init_net link error

2018-03-13 Thread Arnd Bergmann
The new variable is only available when CONFIG_SYSCTL is enabled, otherwise we get a link error: net/ipv4/ip_tunnel.o: In function `ip_tunnel_init_net': ip_tunnel.c:(.text+0x278b): undefined reference to `sysctl_fb_tunnels_only_for_init_net' net/ipv6/sit.o: In function `sit_init_net': sit.c:(.ini

Re: [PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops

2018-03-13 Thread Neil Horman
On Tue, Mar 13, 2018 at 01:37:02PM +0300, Kirill Tkhai wrote: > These pernet_operations create and destroy net::sctp::ctl_sock. > Since pernet_operations do not send sctp packets each other, > they look safe to be marked as async. > > Signed-off-by: Kirill Tkhai > --- > net/sctp/protocol.c |

Re: linux-next: build warning after merge of the net-next tree

2018-03-13 Thread Gustavo A. R. Silva
Hi Stephen, On 03/13/2018 01:11 AM, Stephen Rothwell wrote: Hi all, After merging the net-next tree, today's linux-next build (sparc defconfig) produced this warning: net/core/pktgen.c: In function 'pktgen_if_write': net/core/pktgen.c:1710:1: warning: the frame size of 1048 bytes is larger tha

Re: [PATCH iproute2] Revert "iproute: "list/flush/save default" selected all of the routes"

2018-03-13 Thread Luca Boccassi
On Tue, 2018-03-13 at 12:05 +0100, Alexander Zubkov wrote: > Hello again, > > The fun thing is that before the commit "ip route ls all" showed all > routes, but "ip -[4|6] route ls all" showed only default. So it was > broken too, but in other way. > I see parsing of prefix was changed since my pa

RE: [PATCH] drivers: net: wireless: ath: ath9: dfs: remove VLA usage

2018-03-13 Thread David Laight
From: Daniel Micay > Sent: 10 March 2018 23:45 > > > Just wondering. Is this actually a VLA. FFT_NUM_SAMPLES was static const so > > not really going to show a lot of variation. This array will always have the > > same size on the stack. > > The issue is that unlike in C++, a `static const` can't

Re: [PATCH 1/2] udp: Move the udp sysctl to namespace.

2018-03-13 Thread Tonghao Zhang
On Tue, Mar 13, 2018 at 7:36 PM, Paolo Abeni wrote: > Hi, > > On Tue, 2018-03-13 at 02:57 -0700, Tonghao Zhang wrote: >> This patch moves the udp_rmem_min, udp_wmem_min >> to namespace and init the udp_l3mdev_accept explicitly. > > Can you please be a little more descriptive on why this is > neede

RE: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-13 Thread David Laight
The amount of replicated defined could also be reduced by passing > or < to a min_max() macro. So you start off with something like: #define min(x, y) __min_max(x, <, y) #define max(x, y) __min_max(x, >, y) then have: #define __min_max(x, cond, y) ((x) cond (y) ? (x) : (y)) in all its associated fl

Re: [PATCH 00/30] Netfilter/IPVS updates for net-next

2018-03-13 Thread Florian Westphal
David Miller wrote: > From: Felix Fietkau > Date: Mon, 12 Mar 2018 20:30:01 +0100 > > > It's not dead and useless. In its current state, it has a software fast > > path that significantly improves nftables routing/NAT throughput, > > especially on embedded devices. > > On some devices, I've seen

Re: [PATCH v3 net 0/5] tcp: fixes to non-SACK TCP

2018-03-13 Thread Eric Dumazet
On Tue, Mar 13, 2018 at 3:25 AM, Ilpo Järvinen wrote: > Here is a series of fixes to issues that occur when SACK is not > enabled for a TCP connection. These are not fixes to just some > remote corner cases of recovery but many/almost all recoveries > without SACK will be impacted by one (or even

Re: [PATCH v4 net-next 3/4] net: macb: Add phy-handle DT support

2018-03-13 Thread Brad Mouring
On Mon, Mar 12, 2018 at 03:30:53PM -0700, Florian Fainelli wrote: > On 03/12/2018 02:57 PM, Andrew Lunn wrote: > >> + /* attempt to find a phy-handle */ > >> + if (!(bp->phy_node = of_parse_phandle(np, "phy-handle", > >> 0))) { > >> + > >> +

RE: mmiowb() vs wmb() with write combined MMIO

2018-03-13 Thread Elior, Ariel
> has uncovered an issue in qede NIC driver [/drivers/net/ethernet/qlogic/qede] > and > this driver is seriously broken for basic L2. That's a bit extreme. There is a race condition bug that needs fixing. > Before the series from John, driver was running fine, probably with hiding a > serious >

[PATCH v5 6/6] staging: fsl-dpaa2/ethsw: Add TODO

2018-03-13 Thread Razvan Stefanescu
Add a TODO file describing what needs to be added/changed before the driver can be moved out of staging. Signed-off-by: Razvan Stefanescu --- Changelog: v2: - no changes v3: - no changes v4: - remove fsl-mc bus driver dependency as it is out of staging v5: - no changes drive

[PATCH v5 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support

2018-03-13 Thread Razvan Stefanescu
Add driver information, link details and hardware statistics to be reported via ethtool -S. Signed-off-by: Razvan Stefanescu --- Changelog: v2: - no changes v3: - removed driver version v4: - no changes v5: - no changes drivers/staging/fsl-dpaa2/ethsw/Makefile| 2 +

[PATCH v5 5/6] staging: fsl-dpaa2/ethsw: Add README

2018-03-13 Thread Razvan Stefanescu
Add a README file describing the driver architecture, components and interfaces. Signed-off-by: Razvan Stefanescu --- Changelog: v2: - no changes v3: - no changes v4: - no changes v5: - no changes drivers/staging/fsl-dpaa2/ethsw/README | 106 +

[PATCH v5 4/6] staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver

2018-03-13 Thread Razvan Stefanescu
Signed-off-by: Razvan Stefanescu --- Changelog: v2: - no changes v3: - no changes v4: - no changes v5: - no changes MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c3c2b75..20d7bf2 100644 --- a/MAINTAINERS +++ b/MAINTA

[PATCH v5 1/6] staging: fsl-dpaa2/ethsw: Add APIs for DPSW object

2018-03-13 Thread Razvan Stefanescu
Add the command build/parse APIs for operating on DPSW objects through the DPAA2 Management Complex. Signed-off-by: Razvan Stefanescu --- Changelog: v2: - use u8 for en parameter of dpsw_if_set_flooding/broadcast() v3: - no changes v4: - adjust to moving MC-bus out of staging -

[PATCH v5 0/6] staging: Introduce DPAA2 Ethernet Switch driver

2018-03-13 Thread Razvan Stefanescu
This patchset introduces the Ethernet Switch Driver for Freescale/NXP SoCs with DPAA2 (DataPath Acceleration Architecture v2). The driver manages switch objects discovered on the fsl-mc bus. A description of the driver can be found in the associated README file. The patchset consists of: * A set o

[PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver

2018-03-13 Thread Razvan Stefanescu
Introduce the DPAA2 Ethernet Switch driver, which manages Datapath Switch (DPSW) objects discovered on the MC bus. Suggested-by: Alexandru Marginean Signed-off-by: Razvan Stefanescu --- Changelog: v2: - fix PVID cleanup in ethsw_port_add_vlan() - rename err2 to ret in ethsw_port_add/del

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

2018-03-13 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_sample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tc/m_sample.c b/tc/m_sample.c index ff5ee6bd1ef6..d88846c63be3 100644 --- a/tc/m_sample.c +++ b/tc/m_sample.c @@ -163,6 +163,8 @@ static int print_sample(struct action_util *au, FILE *f, struct rt

Re: [PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver

2018-03-13 Thread Andrew Lunn
> +/* For the moment, only flood setting needs to be updated */ > +static int port_bridge_join(struct net_device *netdev, > + struct net_device *upper_dev) > +{ > + struct ethsw_port_priv *port_priv = netdev_priv(netdev); > + struct ethsw_core *ethsw = port_priv->eth

Re: [PATCH net-next] ibmvnic: Fix recent errata commit

2018-03-13 Thread David Miller
From: Thomas Falcon Date: Mon, 12 Mar 2018 21:05:26 -0500 > Sorry, one of the patches I sent in an earlier series > has some dumb mistakes. One was that I had changed the > parameter for the errata workaround function but forgot > to make that change in the code that called it. > > The second mi

Re: pull request (net): ipsec 2018-03-13

2018-03-13 Thread David Miller
From: Steffen Klassert Date: Tue, 13 Mar 2018 08:09:44 +0100 > Please pull or let me know if there are problems. Pulled, thanks!

Re: [RFC PATCH net-next 3/5] bridge: allow switchdev port to handle flooding by itself

2018-03-13 Thread Roopa Prabhu
On Mon, Mar 12, 2018 at 6:11 PM, Andrew Lunn wrote: >> The flag was introduced to enable hardware switch capabilities of >> drivers/net/wireless/quantenna/qtnfmac wifi driver. It does not have any >> switchdev functionality in upstream tree at this moment, and this patchset >> was intended as a pr

Re: [PATCH net-next 1/4] net: qualcomm: rmnet: Fix casting issues

2018-03-13 Thread David Miller
From: Subash Abhinov Kasiviswanathan Date: Mon, 12 Mar 2018 20:26:06 -0600 > diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h > b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h > index 6ce31e2..65b074e 100644 > --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h > +++ b/drivers/ne

Re: [PATCH net-next v2] sctp: fix error return code in sctp_sendmsg_new_asoc()

2018-03-13 Thread David Miller
From: Wei Yongjun Date: Tue, 13 Mar 2018 03:03:30 + > Return error code -EINVAL in the address len check error handling > case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()' > in the for loop. > > Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for

Re: [PATCH v2 1/1] net: check before dereferencing netdev_ops during busy poll

2018-03-13 Thread David Miller
From: Josh Elsasser Date: Mon, 12 Mar 2018 22:32:00 -0700 > init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads > to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi > wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. > > Avoid this by ensuri

Re: [pci PATCH v5 3/4] ena: Migrate over to unmanaged SR-IOV support

2018-03-13 Thread Alexander Duyck
On Tue, Mar 13, 2018 at 1:12 AM, David Woodhouse wrote: > On Mon, 2018-03-12 at 10:23 -0700, Alexander Duyck wrote: >> >> - .sriov_configure = ena_sriov_configure, >> +#ifdef CONFIG_PCI_IOV >> + .sriov_configure = pci_sriov_configure_simple, >> +#endif >> }; > > I'd like to see that i

Re: [PATCH net] qed: Use after free in qed_rdma_free()

2018-03-13 Thread David Miller
From: Dan Carpenter Date: Tue, 13 Mar 2018 12:09:38 +0300 > We're dereferencing "p_hwfn->p_rdma_info" but that is freed on the line > before in qed_rdma_resc_free(p_hwfn). > > Fixes: 9de506a547c0 ("qed: Free RoCE ILT Memory on rmmod qedr") > Signed-off-by: Dan Carpenter Applied, thank you.

Re: [PATCH] netfilter: cttimeout: remove VLA usage

2018-03-13 Thread Pablo Neira Ayuso
On Mon, Mar 12, 2018 at 04:58:38PM -0700, Joe Perches wrote: > On Mon, 2018-03-12 at 18:14 -0500, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wvla, remove VLA and replace it > > with dynamic memory allocation. > > > > From a security viewpoint, the use of Variable Length Arrays can

Re: [pci PATCH v5 3/4] ena: Migrate over to unmanaged SR-IOV support

2018-03-13 Thread David Woodhouse
On Tue, 2018-03-13 at 07:51 -0700, Alexander Duyck wrote: > Actually the suggestion I had from Don Dutile was that we should be > looking at creating a pci-stub like driver specifically for those type > of devices, but without the ability to arbitrarily assign devices. > Basically we have to white

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

2018-03-13 Thread Liran Alon
Before this commit, dev_forward_skb() always cleared packet's per-network-namespace info. Even if the packet doesn't cross network namespaces. The comment above dev_forward_skb() describes that this is done because the receiving device may be in another network namespace. However, this case can ea

Re: [PATCH V2 net 1/1] net/smc: simplify wait when closing listen socket

2018-03-13 Thread David Miller
From: Ursula Braun Date: Tue, 13 Mar 2018 10:41:54 +0100 > Closing of a listen socket wakes up kernel_accept() of > smc_tcp_listen_worker(), and then has to wait till smc_tcp_listen_worker() > gives up the internal clcsock. The wait logic introduced with > commit 127f49705823 ("net/smc: release c

  1   2   3   >