Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Willem de Bruijn
On Tue, Feb 28, 2017 at 7:28 PM, Tom Herbert wrote: > On Tue, Feb 28, 2017 at 3:22 PM, Eric Dumazet wrote: >> On Tue, 2017-02-28 at 14:52 -0800, Andy Lutomirski wrote: >> >>> The user pages are a gift to the kernel. The application may not >>>

Re: [patch] net/mlx4: && vs & typo

2017-02-28 Thread Julia Lawall
On Tue, 28 Feb 2017, Bart Van Assche wrote: > On 02/28/2017 02:23 PM, Joe Perches wrote: > > On Tue, 2017-02-28 at 15:35 +, Bart Van Assche wrote: > >> On Tue, 2017-02-28 at 15:02 +0300, Dan Carpenter wrote: > >>> Bitwise & was obviously intended here. > > [] > >>> diff --git

[PATCH-v4-RESEND 2/4] vhost-vsock: add pkt cancel capability

2017-02-28 Thread Peng Tao
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Peng Tao --- drivers/vhost/vsock.c | 41 + include/net/af_vsock.h | 3

[PATCH-v4-RESEND 3/4] vsock: add pkt cancel capability

2017-02-28 Thread Peng Tao
Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao --- net/vmw_vsock/virtio_transport.c | 42 1 file changed, 42 insertions(+) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c

[PATCH-v4-RESEND 4/4] vsock: cancel packets when failing to connect

2017-02-28 Thread Peng Tao
Otherwise we'll leave the packets queued until releasing vsock device. E.g., if guest is slow to start up, resulting ETIMEDOUT on connect, guest will get the connect requests from failed host sockets. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen

[PATCH-v4-RESEND 0/4] vsock: cancel connect packets when failing to connect

2017-02-28 Thread Peng Tao
Hi David, These patchsets were sent before and reviewed by Stefan and Jorgen [https://www.spinics.net/lists/kvm/msg142367.html]. If there is any blocker, please do tell and I'll see to it. Thanks! Currently, if a connect call fails on a signal or timeout (e.g., guest is still in the process of

[PATCH-v4-RESEND 1/4] vsock: track pkt owner vsock

2017-02-28 Thread Peng Tao
So that we can cancel a queued pkt later if necessary. Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao --- include/linux/virtio_vsock.h| 2 ++ net/vmw_vsock/virtio_transport_common.c | 7 +++ 2 files changed, 9 insertions(+) diff

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Eric Dumazet
On Tue, 2017-02-28 at 22:28 -0500, David Miller wrote: > These device are already choking, because as I stated this can already > be done via sendfile(). > > Networking card wise this isn't an issue, chips bring the entire packet > into their FIFO, compute checksums on the fly mid-stream, and

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread David Miller
From: Andy Lutomirski Date: Tue, 28 Feb 2017 13:06:49 -0800 > On Tue, Feb 28, 2017 at 12:43 PM, Willem de Bruijn > wrote: >> On Tue, Feb 28, 2017 at 2:46 PM, Andy Lutomirski wrote: >>> On Mon, Feb 27, 2017 at 10:57 AM,

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread David Miller
From: Andy Lutomirski Date: Tue, 28 Feb 2017 11:46:23 -0800 > On Mon, Feb 27, 2017 at 10:57 AM, Michael Kerrisk > wrote: >> [CC += linux-...@vger.kernel.org] >> >> Hi Willem >> > >>> On a send call with MSG_ZEROCOPY, the kernel pins the user pages

Re: [PATCH RFC net-next v2 1/4] skbuff: add stub to help computing crc32c on SCTP packets

2017-02-28 Thread Tom Herbert
On Tue, Feb 28, 2017 at 2:46 PM, Alexander Duyck wrote: > On Tue, Feb 28, 2017 at 2:32 AM, Davide Caratti wrote: >> sctp_compute_checksum requires crc32c symbol (provided by libcrc32c), so >> it can't be used in net core. Like it has been done

Re: [PATCH v1 2/4] nvmet-rdma: use generic inet_pton_with_scope

2017-02-28 Thread Sagi Grimberg
Please add a changelog and mention that this adds IPv6 support. Will do, thanks!

[PATCH v2] net: pch_gbe: Fix TX RX descriptor accesses for big endian systems

2017-02-28 Thread Hassan Naveed
Fix pch_gbe driver for ethernet operations for a big endian CPU. Values written to and read from transmit and receive descriptors in the pch_gbe driver are byte swapped from the perspective of a big endian CPU, since the ethernet controller always operates in little endian mode. Rectify this by

Re: net: GPF in rt6_nexthop_info

2017-02-28 Thread David Ahern
On 2/28/17 3:14 PM, Eric Dumazet wrote: > On Tue, Feb 28, 2017 at 3:09 PM, David Ahern wrote: >> On 2/28/17 5:10 AM, Eric Dumazet wrote: >>> David, rt->rt6i_idev can be NULL. >> >> Do you know of an example where rt6i_idev can be NULL - besides the >> null_entry rt which

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Tom Herbert
On Tue, Feb 28, 2017 at 4:58 PM, Willem de Bruijn wrote: > On Tue, Feb 28, 2017 at 7:28 PM, Tom Herbert wrote: >> On Tue, Feb 28, 2017 at 3:22 PM, Eric Dumazet wrote: >>> On Tue, 2017-02-28 at 14:52 -0800, Andy

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Eric Dumazet
On Tue, 2017-02-28 at 14:25 -0800, Andy Lutomirski wrote: > On Tue, Feb 28, 2017 at 1:47 PM, Eric Dumazet wrote: > > On Tue, 2017-02-28 at 13:09 -0800, Andy Lutomirski wrote: > > > >> Does this mean that a user program that does a zerocopy send can cause > >> a

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Tom Herbert
On Tue, Feb 28, 2017 at 3:22 PM, Eric Dumazet wrote: > On Tue, 2017-02-28 at 14:52 -0800, Andy Lutomirski wrote: > >> The user pages are a gift to the kernel. The application may not >> modify this memory ever, otherwise the page cache and on-disk data may >> differ. >>

Re: [PATCH v2 net] net: solve a NAPI race

2017-02-28 Thread Stephen Hemminger
On Wed, 1 Mar 2017 01:22:40 +0100 Francois Romieu wrote: > David Miller : > > From: Eric Dumazet > > Date: Mon, 27 Feb 2017 08:44:14 -0800 > > > > > Any point doing a napi_schedule() not from device hard irq handler > > > is

Re: [PATCH] drivers: net: xgene: Fix crash on DT systems

2017-02-28 Thread Iyappan Subramanian
On Tue, Feb 28, 2017 at 9:08 AM, Alban Bedel wrote: > On DT systems the driver require a clock, but the probe just print a > warning and continue, leading to a crash when resetting the device. > To fix this crash and properly handle probe deferals only ignore the >

Re: [PATCH v2 net] net: solve a NAPI race

2017-02-28 Thread Francois Romieu
David Miller : > From: Eric Dumazet > Date: Mon, 27 Feb 2017 08:44:14 -0800 > > > Any point doing a napi_schedule() not from device hard irq handler > > is subject to the race for NIC using some kind of edge trigger > > interrupts. > > > > Since we

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Eric Dumazet
On Tue, 2017-02-28 at 16:28 -0800, Tom Herbert wrote: > The Mellanox team working on TLS offload pointed out to us that if > data is changed for a retransmit then it becomes trivial for someone > snooping to break the encryption. Sounds pretty scary and it would be > a shame if we couldn't use

Re: net: GPF in rt6_nexthop_info

2017-02-28 Thread David Ahern
On 2/28/17 5:10 AM, Eric Dumazet wrote: > David, rt->rt6i_idev can be NULL. Do you know of an example where rt6i_idev can be NULL - besides the null_entry rt which is null only because of init order?

[PATCH RFC net-next] Cancel any pending connection attempts before taking down connection

2017-02-28 Thread Sowmini Varadhan
This is a test patch being supplied for a trial run on syzkaller. Explicitly cancel the workq before releasing resources that will allow netns deletion, so that the connect request does not trip up on a use-after free of the netns afterward. Signed-off-by: Sowmini Varadhan

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
Actually, I'm not sure if I can assert that these are all manifestations of the same bug- was a netns-delete involved in this one as well? I see: > BUG: KASAN: use-after-free in memcmp+0xe3/0x160 lib/string.c:768 at : > memcmp+0xe3/0x160 lib/string.c:768 : > rds_find_bound+0x4fe/0x8a0

[PATCH net v1 3/3] amd-xgbe: Don't overwrite SFP PHY mod_absent settings

2017-02-28 Thread Tom Lendacky
If an SFP module is not present, xgbe_phy_sfp_phy_settings() should return after applying the default settings. Currently there is no return statement and the default settings are overwritten. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |

[PATCH] net: qcom/emac: optimize QDF2400 SGMII RX/TX impedence values

2017-02-28 Thread Timur Tabi
Adjust the impedance values of the RX and TX lanes in the SGMII block so that they are closer to optimal values. Signed-off-by: Timur Tabi --- drivers/net/ethernet/qualcomm/emac/emac-sgmii-qdf2400.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Eric Dumazet
On Tue, 2017-02-28 at 14:52 -0800, Andy Lutomirski wrote: > The user pages are a gift to the kernel. The application may not > modify this memory ever, otherwise the page cache and on-disk data may > differ. > > This is just not okay IMO. TCP works just fine in this case. TX checksum will

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Andy Lutomirski
On Tue, Feb 28, 2017 at 2:40 PM, Eric Dumazet wrote: > On Tue, 2017-02-28 at 14:25 -0800, Andy Lutomirski wrote: >> On Tue, Feb 28, 2017 at 1:47 PM, Eric Dumazet wrote: >> > On Tue, 2017-02-28 at 13:09 -0800, Andy Lutomirski wrote: >> > >> >> Does

Re: net: GPF in rt6_nexthop_info

2017-02-28 Thread Eric Dumazet
On Tue, Feb 28, 2017 at 3:09 PM, David Ahern wrote: > On 2/28/17 5:10 AM, Eric Dumazet wrote: >> David, rt->rt6i_idev can be NULL. > > Do you know of an example where rt6i_idev can be NULL - besides the > null_entry rt which is null only because of init order? I might

Re: [PATCH RFC net-next v2 1/4] skbuff: add stub to help computing crc32c on SCTP packets

2017-02-28 Thread Alexander Duyck
On Tue, Feb 28, 2017 at 2:32 AM, Davide Caratti wrote: > sctp_compute_checksum requires crc32c symbol (provided by libcrc32c), so > it can't be used in net core. Like it has been done previously with other > symbols (e.g. ipv6_dst_lookup), introduce a stub struct

[PATCH net-next v3 0/3] net: ethernet: bgmac: PM support and clean-ups

2017-02-28 Thread Jon Mason
Changes in v3: * Corrected a bug Florian found and added his Reviewed-by Changes in v2: * Reworked the PM patch with Florian's suggestions Add code to support Power Management (only tested on NS2), and add some code clean-ups Joey Zhong (1): net: ethernet: bgmac: driver power manangement

[PATCH net-next v3 1/3] net: ethernet: bgmac: use #defines for MAX size

2017-02-28 Thread Jon Mason
The maximum frame size is really just the standard ethernet frame size and FCS. So use those existing defines to make the code a little more beautiful. Signed-off-by: Jon Mason --- drivers/net/ethernet/broadcom/bgmac.h | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Andy Lutomirski
On Tue, Feb 28, 2017 at 1:47 PM, Eric Dumazet wrote: > On Tue, 2017-02-28 at 13:09 -0800, Andy Lutomirski wrote: > >> Does this mean that a user program that does a zerocopy send can cause >> a retransmitted segment to contain different data than the original >> segment?

Re: [PATCH v5 06/10] seccomp,landlock: Handle Landlock events per process hierarchy

2017-02-28 Thread Andy Lutomirski
On Tue, Feb 21, 2017 at 5:26 PM, Mickaël Salaün wrote: > The seccomp(2) syscall can be use to apply a Landlock rule to the > current process. As with a seccomp filter, the Landlock rule is enforced > for all its future children. An inherited rule tree can be updated >

Re: [patch] net/mlx4: && vs & typo

2017-02-28 Thread Bart Van Assche
On 02/28/2017 02:23 PM, Joe Perches wrote: > On Tue, 2017-02-28 at 15:35 +, Bart Van Assche wrote: >> On Tue, 2017-02-28 at 15:02 +0300, Dan Carpenter wrote: >>> Bitwise & was obviously intended here. > [] >>> diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h > [] >>> @@

[PATCH] net: smsc: smc911x: use new api ethtool_{get|set}_link_ksettings

2017-02-28 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/smsc/smc911x.c | 51

Re: [patch] net/mlx4: && vs & typo

2017-02-28 Thread Joe Perches
On Tue, 2017-02-28 at 15:35 +, Bart Van Assche wrote: > On Tue, 2017-02-28 at 15:02 +0300, Dan Carpenter wrote: > > Bitwise & was obviously intended here. [] > > diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h [] > > @@ -109,7 +109,7 @@ static inline void (u8 *addr,

Re: [Patch net] ipv6: ignore null_entry in inet6_rtm_getroute() too

2017-02-28 Thread David Ahern
On 2/28/17 11:48 AM, Cong Wang wrote: > On Tue, Feb 28, 2017 at 11:01 AM, David Ahern > wrote: >> On 2/28/17 10:44 AM, Cong Wang wrote: >>> Like commit 1f17e2f2c8a8 ("net: ipv6: ignore null_entry on route dumps"), >>> we need to ignore null entry in inet6_rtm_getroute()

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
On (03/01/17 00:14), Dmitry Vyukov wrote: > > But the other 2 use-after-frees happened on cp->cp_send_w. Shouldn't > we cancel it as well? And cp_recv_w? yes, good point, I missed that. let me see if I can refactor the code to release the netns as the last thing before free..

[PATCH] netfilter: Use pr_cont where appropriate

2017-02-28 Thread Joe Perches
Logging output was changed when simple printks without KERN_CONT are now emitted on a new line and KERN_CONT is required to continue lines so use pr_cont. Miscellanea: o realign arguments o use print_hex_dump instead of a local variant Signed-off-by: Joe Perches ---

[PATCH net-next v3 3/3] net: ethernet: bgmac: driver power manangement

2017-02-28 Thread Jon Mason
From: Joey Zhong Implement suspend/resume callbacks in the bgmac driver. This makes sure that we de-initialize and re-initialize the hardware correctly before entering suspend and when resuming. Signed-off-by: Joey Zhong Signed-off-by: Jon Mason

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Eric Dumazet
On Tue, 2017-02-28 at 13:09 -0800, Andy Lutomirski wrote: > Does this mean that a user program that does a zerocopy send can cause > a retransmitted segment to contain different data than the original > segment? If so, is that okay? Same remark applies to sendfile() already, or other zero copy

Re: [PATCH] iproute2: show network device dependency tree

2017-02-28 Thread Jiri Pirko
Tue, Feb 28, 2017 at 09:19:23PM CET, zaboj.camp...@post.cz wrote: >On Mon, 2017-02-27 at 10:55 -0800, Stephen Hemminger wrote: >> >> Another alternative format would be to make -tree a output modifier and >> ident (like ps tree options). >> >> $ ip -t link >> 1: lo: mtu

[PATCH net v1 0/3] amd-xgbe: AMD XGBE driver fixes 2017-02-28

2017-02-28 Thread Tom Lendacky
This patch series addresses some issues in the AMD XGBE driver. The following fixes are included in this driver update series: - Stop the PHY before disabling and releasing device interrupts so that MDIO requests issued by the device can be properly handled - Set the MDIO communication mode on

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Andy Lutomirski
On Tue, Feb 28, 2017 at 12:43 PM, Willem de Bruijn wrote: > >> I can see this working if you have a special type of skb that >> indicates that the data might be concurrently written and have all the >> normal skb APIs (including, especially, anything that clones

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Willem de Bruijn
>>> I can see this working if you have a special type of skb that >>> indicates that the data might be concurrently written and have all the >>> normal skb APIs (including, especially, anything that clones it) make >>> a copy first. >> >> Support for cloned skbs is required for TCP, both at

Re: [drivers/net/vxlan]Why rcu_read_lock is not obtained before rculist travelling

2017-02-28 Thread Cong Wang
On Tue, Feb 28, 2017 at 6:03 AM, 颜小波 wrote: > But I don’t find any rcu_read_lock invoked before travelling fdb_head list. > In vxlan_xmit and vxlan_snoop function, vxlan_find_mac function is called to > search the vxlan_fdb of the dst_mac or src_mac. Then information in

Re: Extending socket timestamping API for NTP

2017-02-28 Thread Willem de Bruijn
>> > With this change I'm getting two error messages per transmission, but >> > it looks like it may need some additional changes. >> > >> > If the first error message is received after the HW timestamp was >> > captured, >> >> When does this happen? The first timestamp is generated from >>

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Dmitry Vyukov
On Wed, Mar 1, 2017 at 12:06 AM, Sowmini Varadhan wrote: > Just posted an RFC patch, that I'm also testing here.. > hopefully we'll se the pr_info light up, and know that the problematic > situation actually happened (I'll remove the pr_info if/when this > gets

[PATCH] net/mlx5e: add IPV6 dependency

2017-02-28 Thread Arnd Bergmann
The ethernet support now calls directly into the ipv6 core code, which fails if IPV6 is a loadable module but mlx5 is built-in: drivers/net/ethernet/mellanox/mlx5/core/en_tc.o: In function `mlx5e_create_encap_header_ipv6': en_tc.c:(.text.mlx5e_create_encap_header_ipv6+0x110): undefined reference

[PATCH net v1 1/3] amd-xgbe: Stop the PHY before releasing interrupts

2017-02-28 Thread Tom Lendacky
Some configurations require the use of the hardware's MDIO support to communicate with external PHYs. The MDIO commands indicate completion through the device interrupt. When bringing down the device the interrupts were released before stopping the external PHY, resulting in MDIO command timeouts.

[PATCH net v1 2/3] amd-xgbe: Be sure to set MDIO modes on device (re)start

2017-02-28 Thread Tom Lendacky
The MDIO register mode is set when the device is probed. But when the device is brought down and then back up, the MDIO register mode has been reset. Be sure to reset the mode during device startup and only change the mode of the address specified. Signed-off-by: Tom Lendacky

ipv6 sysctl

2017-02-28 Thread Ani Sinha
Hi guys, Commit a79ca223e029 ('ipv6: fix bad free of addrconf_init_net') introduced in linux 3.9 tries to fix an issue involving free-ing statically allocated memory. Additionally, it subtly changes behavior of how certain ipv6 sysctl values are inherited from the default net namespace to the

RE: [Intel-wired-lan] [PATCH] e1000e: fix timing for 82579 Gigabit Ethernet controller

2017-02-28 Thread Keller, Jacob E
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Neftin, Sasha > Sent: Monday, February 27, 2017 12:40 AM > To: Bernd Faust ; Kirsher, Jeffrey T > ;

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
Just posted an RFC patch, that I'm also testing here.. hopefully we'll se the pr_info light up, and know that the problematic situation actually happened (I'll remove the pr_info if/when this gets submitted as a non-RFC patch).. thanks for helping with testing this.. --Sowmini

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Andy Lutomirski
On Tue, Feb 28, 2017 at 12:43 PM, Willem de Bruijn wrote: > On Tue, Feb 28, 2017 at 2:46 PM, Andy Lutomirski wrote: >> On Mon, Feb 27, 2017 at 10:57 AM, Michael Kerrisk >> wrote: >>> [CC += linux-...@vger.kernel.org]

Re: [PATCH] iproute2: show network device dependency tree

2017-02-28 Thread Zaboj Campula
On Mon, 2017-02-27 at 10:55 -0800, Stephen Hemminger wrote: > > Another alternative format would be to make -tree a output modifier and ident > (like ps tree options). > > $ ip -t link > 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode > DEFAULT group default qlen 1 >   

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Willem de Bruijn
On Tue, Feb 28, 2017 at 2:46 PM, Andy Lutomirski wrote: > On Mon, Feb 27, 2017 at 10:57 AM, Michael Kerrisk > wrote: >> [CC += linux-...@vger.kernel.org] >> >> Hi Willem >> > >>> On a send call with MSG_ZEROCOPY, the kernel pins the user pages and >>>

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Dmitry Vyukov
On Tue, Feb 28, 2017 at 6:33 PM, Sowmini Varadhan wrote: > On (02/28/17 17:51), Dmitry Vyukov wrote: >> Searching other crashes for "net/rds" I found 2 more crashes that may >> be related. They suggest that the delayed works are not properly >> stopped when the socket

Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY

2017-02-28 Thread Andy Lutomirski
On Mon, Feb 27, 2017 at 10:57 AM, Michael Kerrisk wrote: > [CC += linux-...@vger.kernel.org] > > Hi Willem > >> On a send call with MSG_ZEROCOPY, the kernel pins the user pages and >> creates skbuff fragments directly from these pages. On tx completion, >> it notifies the

Re: [PATCH] iproute2: show network device dependency tree

2017-02-28 Thread Zaboj Campula
On Mon, 2017-02-27 at 17:38 +0100, Jiri Benc wrote: > > It produces dot (graphviz) output or json and has no dependencies on > anything GUI related. Just run it on the remote machine and display the > output locally. > > ssh root@remote plotnetcfg | dot -Tpdf | whatever_pdf_viewer > > Note that

Re: [PATCH RFC net-next v2 3/4] net: more accurate checksumming in validate_xmit_skb

2017-02-28 Thread Tom Herbert
On Tue, Feb 28, 2017 at 2:32 AM, Davide Caratti wrote: > Introduce skb->csum_not_inet to identify not-yet-checksummed SCTP packets. > Use this bit in combination with netdev feature bit in validate_xmit_skb, > to discriminate whether skb needs crc32c or 2-complement Internet

Re: [Patch net] ipv6: ignore null_entry in inet6_rtm_getroute() too

2017-02-28 Thread Cong Wang
On Tue, Feb 28, 2017 at 11:01 AM, David Ahern wrote: > On 2/28/17 10:44 AM, Cong Wang wrote: >> Like commit 1f17e2f2c8a8 ("net: ipv6: ignore null_entry on route dumps"), >> we need to ignore null entry in inet6_rtm_getroute() too. >> >> Return -ENOENT here because we

Re: [Patch net] ipv6: ignore null_entry in inet6_rtm_getroute() too

2017-02-28 Thread David Ahern
On 2/28/17 10:44 AM, Cong Wang wrote: > Like commit 1f17e2f2c8a8 ("net: ipv6: ignore null_entry on route dumps"), > we need to ignore null entry in inet6_rtm_getroute() too. > > Return -ENOENT here because we return the same errno when deleting > the null entry. > > Fixes: a1a22c1206 ("net:

[PATCH v4 net] net: solve a NAPI race

2017-02-28 Thread Eric Dumazet
From: Eric Dumazet While playing with mlx4 hardware timestamping of RX packets, I found that some packets were received by TCP stack with a ~200 ms delay... Since the timestamp was provided by the NIC, and my probe was added in tcp_v4_rcv() while in BH handler, I was

Re: usb/net/hso: WARNING: ungligned urb->setup_dma

2017-02-28 Thread Baruch Siach
Hi Stefan, On Tue, Feb 28, 2017 at 05:21:18PM +0100, Stefan Wahren wrote: > Am 28.02.2017 um 13:01 schrieb Baruch Siach: > > On Tue, Feb 28, 2017 at 10:28:10AM +0200, Baruch Siach wrote: > > > I'm hitting this warning consistently on my Raspberry Pi 3 running > > > kernel > > > v4.10.1 with some

[PATCH net-next v3 2/3] net: ethernet: bgmac: unify code of the same family

2017-02-28 Thread Jon Mason
BCM471X and BCM535X are of the same family (from what I can derive from internal documents). Group them into the case statement together, which results in more code reuse. Also, use existing helper variables to make the code a little more readable too. Signed-off-by: Jon Mason

[PATCH net v4 1/2] net: ethernet: bgmac: init sequence bug

2017-02-28 Thread Jon Mason
Fix a bug in the 'bgmac' driver init sequence that blind writes for init sequence where it should preserve most bits other than the ones it is deliberately manipulating. The code now checks to see if the adapter needs to be brought out of reset (where as before it was doing an IDM write to bring

[PATCH net v4 0/2] net: ethernet: bgmac: bug fixes

2017-02-28 Thread Jon Mason
Changes in v4: * Added the udelays from the previous code (per David Miller) Changes in v3: * Reworked the init sequence patch to only remove the device reset if the device is actually in reset. Given that this code doesn't bear much resemblance to the original code, I'm changing the author

[Patch net] ipv6: ignore null_entry in inet6_rtm_getroute() too

2017-02-28 Thread Cong Wang
Like commit 1f17e2f2c8a8 ("net: ipv6: ignore null_entry on route dumps"), we need to ignore null entry in inet6_rtm_getroute() too. Return -ENOENT here because we return the same errno when deleting the null entry. Fixes: a1a22c1206 ("net: ipv6: Keep nexthop of multipath route on admin down")

[PATCH net v4 2/2] net: ethernet: bgmac: mac address change bug

2017-02-28 Thread Jon Mason
From: Hari Vyas ndo_set_mac_address() passes struct sockaddr * as 2nd parameter to bgmac_set_mac_address() but code assumed u8 *. This caused two bytes chopping and the wrong mac address was configured. Signed-off-by: Hari Vyas Signed-off-by: Jon Mason

Re: usb/net/hso: WARNING: ungligned urb->setup_dma

2017-02-28 Thread Stefan Wahren
Hi Baruch, > Baruch Siach hat am 28. Februar 2017 um 19:07 geschrieben: > > > Hi Stefan, > > On Tue, Feb 28, 2017 at 05:21:18PM +0100, Stefan Wahren wrote: > > Am 28.02.2017 um 13:01 schrieb Baruch Siach: > > > On Tue, Feb 28, 2017 at 10:28:10AM +0200, Baruch Siach wrote: >

Re: [patch] net/mlx4: && vs & typo

2017-02-28 Thread Tariq Toukan
On 28/02/2017 2:02 PM, Dan Carpenter wrote: Bitwise & was obviously intended here. Sure! Thanks for your patch. Fixes: 745d8ae4622c ("net/mlx4: Spoofcheck and zero MAC can't coexist") Signed-off-by: Dan Carpenter --- Applies to net.git. diff --git

Re: net: GPF in rt6_nexthop_info

2017-02-28 Thread Cong Wang
On Tue, Feb 28, 2017 at 5:10 AM, Eric Dumazet wrote: > On Tue, 2017-02-28 at 12:34 +0100, Dmitry Vyukov wrote: >> Hello, >> >> The following program triggers GPF in rt6_nexthop_info >> >> // autogenerated by syzkaller (http://github.com/google/syzkaller) >> #include >>

Re: [PATCH v2 net] net: solve a NAPI race

2017-02-28 Thread Alexander Duyck
On Mon, Feb 27, 2017 at 6:21 AM, Eric Dumazet wrote: > From: Eric Dumazet > > While playing with mlx4 hardware timestamping of RX packets, I found > that some packets were received by TCP stack with a ~200 ms delay... > > Since the timestamp was

Re: [PATCH v1 3/4] nvme-rdma: use inet_pton_with_scope helper

2017-02-28 Thread Sagi Grimberg
Could use a proper changelog. Will do, thanks!

[PATCH] drivers: net: xgene: Fix crash on DT systems

2017-02-28 Thread Alban Bedel
On DT systems the driver require a clock, but the probe just print a warning and continue, leading to a crash when resetting the device. To fix this crash and properly handle probe deferals only ignore the missing clock if DT isn't used or if the clock doesn't exist. Signed-off-by: Alban Bedel

Re: [PATCH v1 3/4] nvme-rdma: use inet_pton_with_scope helper

2017-02-28 Thread Christoph Hellwig
Could use a proper changelog. Otherwise looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH] MAINTAINERS: Orphan usb/net/hso driver

2017-02-28 Thread Greg KH
On Tue, Feb 28, 2017 at 10:38:44AM -0500, David Miller wrote: > From: Baruch Siach > Date: Tue, 28 Feb 2017 10:39:48 +0200 > > > The email address of Jan Dumon bounces, and there is not relevant > > information > > in the linked website. > > > > Signed-off-by: Baruch Siach

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
On (02/28/17 18:45), Dmitry Vyukov wrote: > > Yes, I can now apply custom patches to the bots. However, it fired > only 3 times, so it will give weak signal. But at least it will test > that the patch does not cause other bad things. Ok, let me do my bit of homework on this one and get back to

Re: [PATCH v2 net] net: solve a NAPI race

2017-02-28 Thread Eric Dumazet
On Tue, 2017-02-28 at 09:20 -0800, Alexander Duyck wrote: > On Mon, Feb 27, 2017 at 6:21 AM, Eric Dumazet wrote: > > +bool napi_schedule_prep(struct napi_struct *n) > > +{ > > + unsigned long val, new; > > + > > + do { > > + val =

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
On (02/28/17 17:51), Dmitry Vyukov wrote: > Searching other crashes for "net/rds" I found 2 more crashes that may > be related. They suggest that the delayed works are not properly > stopped when the socket is destroyed. That would explain how > rds_connect_worker accesses freed net, right? yes,

Re: [PATCH v3 net] net: solve a NAPI race

2017-02-28 Thread Eric Dumazet
On Tue, 2017-02-28 at 08:17 -0800, Stephen Hemminger wrote: > Maybe just as simple as using irqsave/irqrestore in driver. CPU can be differents. irqsave will not help.

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Dmitry Vyukov
On Tue, Feb 28, 2017 at 5:38 PM, Sowmini Varadhan wrote: > On (02/28/17 17:32), Dmitry Vyukov wrote: >> Not reproducible so far. >> >> rds is compiled into kernel (no modules): >> CONFIG_RDS=y >> CONFIG_RDS_TCP=y > > I see. So if it never gets unloaded, the

Re: [PATCH 1/1] rds: ib: add the static type to the variables

2017-02-28 Thread Santosh Shilimkar
On 2/27/2017 10:45 PM, Zhu Yanjun wrote: The variables rds_ib_mr_1m_pool_size and rds_ib_mr_8k_pool_size are used only in the ib.c file. As such, the static type is added to limit them in this file. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
On (02/28/17 17:32), Dmitry Vyukov wrote: > Not reproducible so far. > > rds is compiled into kernel (no modules): > CONFIG_RDS=y > CONFIG_RDS_TCP=y I see. So if it never gets unloaded, the rds_connections "should" be around forever.. let me inspect code and see if I spot some race-window.. >

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Dmitry Vyukov
On Tue, Feb 28, 2017 at 5:15 PM, Sowmini Varadhan wrote: > On (02/28/17 16:49), Dmitry Vyukov wrote: >> >> Grepping "socket" there, it was doing lots of things with sockets. Are >> we looking for some particular socket type? If there are few programs >> that create

Re: usb/net/hso: WARNING: ungligned urb->setup_dma

2017-02-28 Thread Stefan Wahren
Hi Baruch, Am 28.02.2017 um 13:01 schrieb Baruch Siach: Hi linux-usb list, (Dropped Jan's bouncing address, added Rpi3 platform lists) On Tue, Feb 28, 2017 at 10:28:10AM +0200, Baruch Siach wrote: Hi linux-usb list, I'm hitting this warning consistently on my Raspberry Pi 3 running kernel

Re: [PATCH v1 2/4] nvmet-rdma: use generic inet_pton_with_scope

2017-02-28 Thread Christoph Hellwig
Please add a changelog and mention that this adds IPv6 support. Otherwise looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH v1 1/4] net/utils: generic inet_pton_with_scope helper

2017-02-28 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 net] net: solve a NAPI race

2017-02-28 Thread Stephen Hemminger
On Mon, 27 Feb 2017 12:18:31 -0800 Eric Dumazet wrote: > This can happen with busy polling users, or if gro_flush_timeout is > used. But some other uses of napi_schedule() in drivers can cause this > as well. Where were IRQ's re-enabled? > thread 1

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
On (02/28/17 16:49), Dmitry Vyukov wrote: > > Grepping "socket" there, it was doing lots of things with sockets. Are > we looking for some particular socket type? If there are few programs > that create sockets of that type, then we can narrow down the set: Yes, we are looking for PF_RDS/AF_RDS

Re: usb/net/hso: WARNING: ungligned urb->setup_dma

2017-02-28 Thread Michael Zoran
On Tue, 2017-02-28 at 14:01 +0200, Baruch Siach wrote: > Hi linux-usb list, > > (Dropped Jan's bouncing address, added Rpi3 platform lists) > > On Tue, Feb 28, 2017 at 10:28:10AM +0200, Baruch Siach wrote: > > Hi linux-usb list, > > > > I'm hitting this warning consistently on my Raspberry Pi 3

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Dmitry Vyukov
On Tue, Feb 28, 2017 at 4:37 PM, Sowmini Varadhan wrote: > On (02/28/17 15:22), Dmitry Vyukov wrote: >> >> Hello, >> >> I've got the following report while running syzkaller fuzzer on >> linux-next/8d01c069486aca75b8f6018a759215b0ed0c91f0. So far it >> happened only

Re: [PATCH] MAINTAINERS: Orphan usb/net/hso driver

2017-02-28 Thread David Miller
From: Baruch Siach Date: Tue, 28 Feb 2017 10:39:48 +0200 > The email address of Jan Dumon bounces, and there is not relevant information > in the linked website. > > Signed-off-by: Baruch Siach This patch is fine and I will apply it later, however I will

Re: net/sctp: use-after-free in sctp_hash_transport

2017-02-28 Thread Xin Long
On Tue, Feb 28, 2017 at 11:35 PM, Dmitry Vyukov wrote: > On Mon, Feb 27, 2017 at 5:27 PM, Xin Long wrote: >> On Mon, Feb 27, 2017 at 11:45 PM, Andrey Konovalov >> wrote: >>> Hi, >>> >>> I've got the following error report while

Re: net/sctp: use-after-free in sctp_hash_transport

2017-02-28 Thread Dmitry Vyukov
On Mon, Feb 27, 2017 at 5:27 PM, Xin Long wrote: > On Mon, Feb 27, 2017 at 11:45 PM, Andrey Konovalov > wrote: >> Hi, >> >> I've got the following error report while fuzzing the kernel with syzkaller. >> >> On commit

Re: [patch] net/mlx4: && vs & typo

2017-02-28 Thread Bart Van Assche
On Tue, 2017-02-28 at 15:02 +0300, Dan Carpenter wrote: > Bitwise & was obviously intended here. > > Fixes: 745d8ae4622c ("net/mlx4: Spoofcheck and zero MAC can't coexist") > Signed-off-by: Dan Carpenter > --- > Applies to net.git. > > diff --git

Re: net/rds: use-after-free in inet_create

2017-02-28 Thread Sowmini Varadhan
On (02/28/17 15:22), Dmitry Vyukov wrote: > > Hello, > > I've got the following report while running syzkaller fuzzer on > linux-next/8d01c069486aca75b8f6018a759215b0ed0c91f0. So far it > happened only once. net was somehow deleted from underneath > inet_create. I've noticed that rds uses

Re: net/atm: vcc_sendmsg calls kmem_cache_alloc in non-blocking context

2017-02-28 Thread Eric Dumazet
On Tue, Feb 28, 2017 at 7:26 AM, Dmitry Vyukov wrote: > Hello, > > I've got the following WARNING while running syzkaller fuzzer: > > [ cut here ] > WARNING: CPU: 0 PID: 9197 at kernel/sched/core.c:6149 > __might_sleep+0x149/0x1a0

  1   2   >