[patch net-next 2/2] mlxsw: spectrum_dpipe: Fix host table dump

2017-08-25 Thread Jiri Pirko
From: Arkadi Sharshevsky During the neighbor traversal the neighbors from different families should be ignored. Fixes: c58035a74aba ("mlxsw: spectrum_dpipe: Add support for IPv4 host table dump") Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/ml

[patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs

2017-08-25 Thread Jiri Pirko
From: Jiri Pirko Arkadi Sharshevsky (1): mlxsw: spectrum_dpipe: Fix host table dump Jiri Pirko (1): mlxsw: spectrum: compile-in dpipe support only if devlink is enabled drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3

[patch net-next 1/2] mlxsw: spectrum: compile-in dpipe support only if devlink is enabled

2017-08-25 Thread Jiri Pirko
From: Jiri Pirko Makes no sense to have dpipe compiled in when devlink is not enabled, because the devlink dpipe registation is noop function. So don't compile it in. This also fixes missing extern structs errors. Reported-by: kbuild test robot Fixes: a86f030915f2 ("mlxsw: spectrum_dpipe: Add s

Re: [PATCH net-next v2 2/2] tcp_diag: report TCP MD5 signing keys and addresses

2017-08-25 Thread Ivan Delalande
On Fri, Aug 25, 2017 at 08:41:25PM -0700, Eric Dumazet wrote: > On Fri, 2017-08-25 at 18:53 -0700, Ivan Delalande wrote: > > Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to > > processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is > > not possible to retri

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 18:52 -0700, Eric Dumazet wrote: > I guess we should an SNMP counter for packets dropped in neigh queues. Info is already there : cat /proc/net/stat/arp_cache

[PATCH v3 net-next 1/1] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-25 Thread Dexuan Cui
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication mechanism between the host and the guest. It uses VMBus ringbuffer as the transportation layer. With hv_sock, applications between the host (Windows 10, Windows Server 2016 or newer) and the guest can talk with each other using

Re: UDP sockets oddities

2017-08-25 Thread David Miller
From: Eric Dumazet Date: Fri, 25 Aug 2017 20:40:44 -0700 > On Fri, 2017-08-25 at 20:25 -0700, Florian Fainelli wrote: > >> It would. Since the call trace involves udp_send_skb() how come we are >> not returning an error to write(2)? are there other code paths where the >> neighbor code can do dr

Re: UDP sockets oddities

2017-08-25 Thread David Miller
From: Florian Fainelli Date: Fri, 25 Aug 2017 20:25:26 -0700 > It would. Since the call trace involves udp_send_skb() how come we are > not returning an error to write(2)? are there other code paths where the > neighbor code can do drops like these? Keep in mind that the neighbour code isn't dro

Re: [PATCH net-next v2 2/2] tcp_diag: report TCP MD5 signing keys and addresses

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 18:53 -0700, Ivan Delalande wrote: > Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to > processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is > not possible to retrieve these from the kernel once they have been > configured on sockets.

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 20:25 -0700, Florian Fainelli wrote: > It would. Since the call trace involves udp_send_skb() how come we are > not returning an error to write(2)? are there other code paths where the > neighbor code can do drops like these? Are you suggesting write(2) should block until AR

Re: UDP sockets oddities

2017-08-25 Thread Florian Fainelli
On 08/25/2017 06:52 PM, Eric Dumazet wrote: > On Fri, 2017-08-25 at 18:17 -0700, Florian Fainelli wrote: >> On 08/25/2017 04:57 PM, Eric Dumazet wrote: >>> On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: >>> Eric, are there areas of the stack where we are allowed to drop packets,

Re: pull-request: wireless-drivers 2017-08-25

2017-08-25 Thread David Miller
From: Kalle Valo Date: Fri, 25 Aug 2017 16:37:57 +0300 > here's pull request to net tree for 4.13, more info in the signed > tag below. Please let me know if there are any problems. Pulled, thanks Kalle.

Re: [PATCH net-next] net: mvpp2: fix the packet size configuration for 10G

2017-08-25 Thread David Miller
From: Antoine Tenart Date: Fri, 25 Aug 2017 15:24:46 +0200 > The MVPP22_XLG_CTRL1_FRAMESIZELIMIT define is used as an offset, but is > defined as BIT(0). Updated its name to contains "OFFS" as in offset and > fix its value using the offset value, 0. > > Reported-by: Stefan Chulski > Signed-off-

Re: [PATCH net] udp6: set rx_dst_cookie on rx_dst updates

2017-08-25 Thread David Miller
From: Paolo Abeni Date: Fri, 25 Aug 2017 14:31:01 +0200 > Currently, in the udp6 code, the dst cookie is not initialized/updated > concurrently with the RX dst used by early demux. > > As a result, the dst_check() in the early_demux path always fails, > the rx dst cache is always invalidated, an

Re: [PATCH net-next v5] net: stmmac: Delete dead code for MDIO registration

2017-08-25 Thread David Miller
From: Romain Perier Date: Fri, 25 Aug 2017 08:49:59 +0200 > This code is no longer used, the logging function was changed by commit > fbca164776e4 ("net: stmmac: Use the right logging function in > stmmac_mdio_register"). > It was previously showing information about the type of the IRQ, if it's

Re: [PATCH] net: sxgbe: check memory allocation failure

2017-08-25 Thread David Miller
From: Christophe JAILLET Date: Fri, 25 Aug 2017 07:35:51 +0200 > Check memory allocation failure and return -ENOMEM in such a case, as > already done few lines below for another memory allocation. > > Signed-off-by: Christophe JAILLET Applied, thank you.

Re: [PATCH net-next 3/3 v9] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-25 Thread David Miller
From: Subash Abhinov Kasiviswanathan Date: Thu, 24 Aug 2017 22:39:26 -0600 > +static void rmnet_force_unassociate_device(struct net_device *dev) > +{ > + struct net_device *real_dev = dev; > + struct rmnet_walk_data d; > + LIST_HEAD(list); > + > + if (!rmnet_is_real_dev_registered

Re: [PATCH v2 net-next 1/8] bpf: Add support for recursively running cgroup sock filters

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 12:05:34PM -0700, David Ahern wrote: > Add support for recursively applying sock filters attached to a cgroup. > For now, start with the inner cgroup attached to the socket and work back > to the root or first cgroup without the recursive flag set. Once the > recursive flag

Re: [net-next v2 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-08-25

2017-08-25 Thread David Miller
From: Jeff Kirsher Date: Fri, 25 Aug 2017 15:00:44 -0700 > This series contains updates to i40e and i40evf only. Pulled, thanks Jeff.

Re: [PATCH v2 net-next 3/8] bpf: Allow cgroup sock filters to use get_current_uid_gid helper

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 12:05:36PM -0700, David Ahern wrote: > Allow BPF programs run on sock create to use the get_current_uid_gid > helper. IPv4 and IPv6 sockets are created in a process context so > there is always a valid uid/gid > > Signed-off-by: David Ahern Acked-by: Alexei Starovoitov

Re: [PATCH net-next 0/2] nfp: SR-IOV ndos support

2017-08-25 Thread David Miller
From: Jakub Kicinski Date: Thu, 24 Aug 2017 21:31:48 -0700 > This set adds basic SR-IOV including setting/getting VF MAC addresses, > VLANs, link state and spoofcheck settings. It is wired up for both > vNICs and representors (note: ip link will not report VF settings on > VF/PF representors bec

Re: [PATCH net 0/2] r8169: Be drop monitor friendly

2017-08-25 Thread David Miller
From: Florian Fainelli Date: Thu, 24 Aug 2017 18:33:57 -0700 > First patch may be questionable but no other driver appears to be doing that > and while it is defendable to account for left packets as dropped during TX > clean, this appears misleadning. I picked Stanislaw changes which brings us >

[PATCH net-next v2 1/2] inet_diag: allow protocols to provide additional data

2017-08-25 Thread Ivan Delalande
Extend inet_diag_handler to allow individual protocols to report additional data on INET_DIAG_INFO through idiag_get_aux. The size can be dynamic and is computed by idiag_get_aux_size. Signed-off-by: Ivan Delalande --- include/linux/inet_diag.h | 7 +++ net/ipv4/inet_diag.c | 22 ++

[PATCH net-next v2 2/2] tcp_diag: report TCP MD5 signing keys and addresses

2017-08-25 Thread Ivan Delalande
Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is not possible to retrieve these from the kernel once they have been configured on sockets. Signed-off-by: Ivan Delalande --- include/uapi/linux/inet_dia

Re: [PATCH v2 net-next 1/8] bpf: Add support for recursively running cgroup sock filters

2017-08-25 Thread Daniel Borkmann
On 08/25/2017 09:05 PM, David Ahern wrote: Add support for recursively applying sock filters attached to a cgroup. For now, start with the inner cgroup attached to the socket and work back to the root or first cgroup without the recursive flag set. Once the recursive flag is set for a cgroup all

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 18:17 -0700, Florian Fainelli wrote: > On 08/25/2017 04:57 PM, Eric Dumazet wrote: > > On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: > > > >> Eric, are there areas of the stack where we are allowed to drop packets, > >> not propagate that back to write(2) and als

[PATCH net-next v3] e1000e: Be drop monitor friendly

2017-08-25 Thread Florian Fainelli
e1000e_put_txbuf() can be called from normal reclamation path as well as when a DMA mapping failure, so we need to differentiate these two cases when freeing SKBs to be drop monitor friendly. e1000e_tx_hwtstamp_work() and e1000_remove() are processing TX timestamped SKBs and those should not be acc

Re: UDP sockets oddities

2017-08-25 Thread Florian Fainelli
On 08/25/2017 04:57 PM, Eric Dumazet wrote: > On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: > >> Eric, are there areas of the stack where we are allowed to drop packets, >> not propagate that back to write(2) and also not increment any counter >> either, or maybe I am not looking wher

Re: [PATCH net-next v7 05/10] landlock: Add LSM hooks related to filesystem

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 10:16:39AM +0200, Mickaël Salaün wrote: > > > >> +/* WRAP_ARG_SB */ > >> +#define WRAP_ARG_SB_TYPE WRAP_TYPE_FS > >> +#define WRAP_ARG_SB_DEC(arg) \ > >> + EXPAND_C(WRAP_TYPE_FS) wrap_##arg = \ > >> + { .type = BPF

Re: [PATCH net-next] selftests/bpf: check the instruction dumps are populated

2017-08-25 Thread Daniel Borkmann
On 08/25/2017 11:39 PM, Jakub Kicinski wrote: Add a basic test for checking whether kernel is populating the jited and xlated BPF images. It was used to confirm the behaviour change from commit d777b2ddbecf ("bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()"), which made bpf_obj_g

Re: [PATCH net-next v7 01/10] selftest: Enhance kselftest_harness.h with a step mechanism

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 09:58:33AM +0200, Mickaël Salaün wrote: > > > On 24/08/2017 04:31, Alexei Starovoitov wrote: > > On Mon, Aug 21, 2017 at 02:09:24AM +0200, Mickaël Salaün wrote: > >> This step mechanism may be useful to return an information about the > >> error without being able to write

Re: [PATCH net-next] bpf: fix oops on allocation failure

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 11:27:14PM +0300, Dan Carpenter wrote: > "err" is set to zero if bpf_map_area_alloc() fails so it means we return > ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not > expecting NULL returns and will oops. > > Fixes: 174a79ff9515 ("bpf: sockmap with sk red

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-25 Thread Willem de Bruijn
On Fri, Aug 25, 2017 at 7:32 PM, Michael S. Tsirkin wrote: > On Fri, Aug 25, 2017 at 06:44:36PM -0400, Willem de Bruijn wrote: >> >> >> > We don't enable network watchdog on virtio but we could and maybe >> >> >> > should. >> >> >> >> >> >> Can you elaborate? >> >> > >> >> > The issue is that hold

Re: Permissions for eBPF objects

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 10:07:27PM +0200, Daniel Borkmann wrote: > On 08/25/2017 09:52 PM, Chenbo Feng wrote: > > On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep > > wrote: > > > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley > > > wrote: > > > > On Fri, 2017-08-25 at 11:01 -0700, Jef

Re: [PATCH net-next] tcp: fix hang in tcp_sendpage_locked()

2017-08-25 Thread David Miller
From: Eric Dumazet Date: Fri, 25 Aug 2017 06:27:05 -0700 > From: Eric Dumazet > > syszkaller got a hang in tcp stack, related to a bug in > tcp_sendpage_locked() > > root@syzkaller:~# cat /proc/3059/stack > [] __lock_sock+0x1dc/0x2f0 > [] lock_sock_nested+0xf3/0x110 > [] tcp_sendmsg+0x21/0x50

Re: [Patch net-next v2 0/4] net_sched: clean up tc classes and u32 filter

2017-08-25 Thread David Miller
From: Cong Wang Date: Thu, 24 Aug 2017 16:51:26 -0700 > Patch 1 and patch 2 prepare for patch 3. Major changes > are in patch 3 and patch 4, details are there too. > > Cong Wang (4): > net_sched: get rid of more forward declarations > net_sched: introduce tclass_del_notify() > net_sched: r

Re: [PATCH net] tcp: fix refcnt leak with ebpf congestion control

2017-08-25 Thread David Miller
From: Sabrina Dubroca Date: Fri, 25 Aug 2017 13:10:12 +0200 > There are a few bugs around refcnt handling in the new BPF congestion > control setsockopt: > > - The new ca is assigned to icsk->icsk_ca_ops even in the case where we >cannot get a reference on it. This would lead to a use after

Re: [PATCH] hinic: skb_pad() frees on error

2017-08-25 Thread David Miller
From: Dan Carpenter Date: Fri, 25 Aug 2017 11:24:28 +0300 > The skb_pad() function frees the skb on error, so this code has a double > free. > > Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") > Signed-off-by: Dan Carpenter Applied, thanks.

Re: [PATCH net-next v2 0/5] net: updates for IPv6 Segment Routing

2017-08-25 Thread David Miller
From: David Lebrun Date: Fri, 25 Aug 2017 09:56:43 +0200 > v2: seg6_lwt_headroom() is not relevant for lwtunnel_input_redirect() > use cases, and L2ENCAP only uses this redirection. Fix incoherence > between arbitrary MAC header size support and fixed headroom > computation by setting

Re: [PATCH net] ipv6: Fix may be used uninitialized warning in rt6_check

2017-08-25 Thread David Miller
From: Steffen Klassert Date: Fri, 25 Aug 2017 09:05:42 +0200 > rt_cookie might be used uninitialized, fix this by > initializing it. > > Fixes: c5cff8561d2d ("ipv6: add rcu grace period before freeing fib6_node") > Signed-off-by: Steffen Klassert Applied, thanks.

Re: [PATCH net] ipv6: fix sparse warning on rt6i_node

2017-08-25 Thread Martin KaFai Lau
On Fri, Aug 25, 2017 at 03:03:10PM -0700, Wei Wang wrote: > From: Wei Wang > > Commit c5cff8561d2d adds rcu grace period before freeing fib6_node. This > generates a new sparse warning on rt->rt6i_node related code: > net/ipv6/route.c:1394:30: error: incompatible types in comparison > expressi

Re: [PATCH net] ipv6: Fix may be used uninitialized warning in rt6_check

2017-08-25 Thread David Miller
From: Stefano Brivio Date: Fri, 25 Aug 2017 11:02:06 +0200 > On Fri, 25 Aug 2017 09:52:17 +0200 > Steffen Klassert wrote: > >> On Fri, Aug 25, 2017 at 09:05:42AM +0200, Steffen Klassert wrote: >> > rt_cookie might be used uninitialized, fix this by >> > initializing it. >> > >> > Fixes: c5cff8

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: > Eric, are there areas of the stack where we are allowed to drop packets, > not propagate that back to write(2) and also not increment any counter > either, or maybe I am not looking where I should... What happens if you increase these s

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-25 Thread Michael S. Tsirkin
On Fri, Aug 25, 2017 at 06:44:36PM -0400, Willem de Bruijn wrote: > >> >> > We don't enable network watchdog on virtio but we could and maybe > >> >> > should. > >> >> > >> >> Can you elaborate? > >> > > >> > The issue is that holding onto buffers for very long times makes guests > >> > think they

Re: [PATCH net-next v6 2/3] net: gso: Add GSO support for NSH

2017-08-25 Thread Jiri Benc
On Fri, 25 Aug 2017 18:25:14 +0200, Jiri Benc wrote: > While looking at this, I realized that GSO for VXLAN-GPE is broken, > too. Let me fix it by implementing what I described above which will > make your patch much easier. Okay, it's not really broken and we don't need that complexity. At least

Re: UDP sockets oddities

2017-08-25 Thread Florian Fainelli
On 08/23/2017 07:23 PM, Florian Fainelli wrote: > On 08/23/2017 05:43 PM, Eric Dumazet wrote: >> On Wed, 2017-08-23 at 17:03 -0700, Florian Fainelli wrote: >> >>> Attached is the perf report --stdio of: >>> >>> # perf record -a -g -e skb:kfree_skb iperf -c 192.168.1.23 -b 800M -t 60 >>> WARNING: op

Re: [PATCH 2/2] drivers: net: xgene: Clean up all outstanding tx descriptors

2017-08-25 Thread Andrew Lunn
On Fri, Aug 25, 2017 at 03:23:30PM -0700, Iyappan Subramanian wrote: > When xgene_enet is rmmod'd and there are still outstanding tx descriptors > that have been setup but have not completed, it is possible on the next > modprobe of the driver to receive the oldest of such tx descriptors. This > re

Re: [PATCH net] tcp: fix refcnt leak with ebpf congestion control

2017-08-25 Thread Lawrence Brakmo
On 8/25/17, 4:10 AM, "Sabrina Dubroca" wrote: There are a few bugs around refcnt handling in the new BPF congestion control setsockopt: - The new ca is assigned to icsk->icsk_ca_ops even in the case where we cannot get a reference on it. This would lead to a use after fr

Re: [ethtool 1/1] ethtool: Add DMA Coalescing support

2017-08-25 Thread Stephen Hemminger
On Fri, 25 Aug 2017 15:39:10 -0700 Jeff Kirsher wrote: > diff --git a/ethtool-copy.h b/ethtool-copy.h > index 06fc04c..4bb91eb 100644 > --- a/ethtool-copy.h > +++ b/ethtool-copy.h > @@ -400,6 +400,7 @@ struct ethtool_modinfo { > * a TX interrupt, when the packet rate is above @pkt_rate_high.

Re: [PATCH net-next v2 09/14] net: mvpp2: dynamic reconfiguration of the PHY mode

2017-08-25 Thread Russell King - ARM Linux
On Fri, Aug 25, 2017 at 04:48:16PM +0200, Antoine Tenart wrote: > This patch adds logic to reconfigure the comphy/gop when the link status > change at runtime. This is very useful on boards such as the mcbin which > have SFP and Ethernet ports connected to the same MAC port: depending on > what the

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-25 Thread Willem de Bruijn
>> >> > We don't enable network watchdog on virtio but we could and maybe >> >> > should. >> >> >> >> Can you elaborate? >> > >> > The issue is that holding onto buffers for very long times makes guests >> > think they are stuck. This is funamentally because from guest point of >> > view this is a

Re: [PATCH net-next v2 05/14] net: mvpp2: do not force the link mode

2017-08-25 Thread Russell King - ARM Linux
On Fri, Aug 25, 2017 at 04:48:12PM +0200, Antoine Tenart wrote: > The link mode (speed, duplex) was forced based on what the phylib > returns. This should not be the case, and only forced by ethtool > functions manually. This patch removes the link mode enforcement from > the phylib link_event call

[ethtool 1/1] ethtool: Add DMA Coalescing support

2017-08-25 Thread Jeff Kirsher
From: Paul Greenwalt Add support for DMA Coalescing (DMAC) hardware feature. The feature allows synchronization of port DMA activity across ports in order to optimize power consumption. DMAC is supported on igb and ixgbe devices. Support for enabling and configuring the DMAC watchdog timer is vi

Re: [RFC PATCH] net: limit maximum number of packets to mark with xmit_more

2017-08-25 Thread Alexander Duyck
On Fri, Aug 25, 2017 at 8:58 AM, Stephen Hemminger wrote: > On Fri, 25 Aug 2017 15:36:22 + > "Waskiewicz Jr, Peter" wrote: > >> On 8/25/17 11:25 AM, Jacob Keller wrote: >> > Under some circumstances, such as with many stacked devices, it is >> > possible that dev_hard_start_xmit will bundle m

Re: [Intel-wired-lan] how to submit fixes for i40e/i40evf?

2017-08-25 Thread Stefano Brivio
On Fri, 25 Aug 2017 15:10:08 -0700 Alexander Duyck wrote: > On Fri, Aug 25, 2017 at 1:52 PM, Stefano Brivio wrote: > > [...] > > > Once patches reach Intel's patchwork, will they need to wait for some > > kind of periodically scheduled pull request process? > > Once in the patchwork they go t

[PATCH 1/2] drivers: net: xgene: Correct probe sequence handling

2017-08-25 Thread Iyappan Subramanian
From: Quan Nguyen The phy is connected at early stage of probe but not properly disconnected if error occurs. This patch fixes the issue. Also changing the return type of xgene_enet_check_phy_handle(), since this function always returns success. Signed-off-by: Quan Nguyen Signed-off-by: Iyapp

[PATCH 0/2] drivers: net: xgene: Misc bug fixes

2017-08-25 Thread Iyappan Subramanian
This patch set, 1. Adds call to PHY disconnect in the case of error 2. Cleans up all outstanding TX descriptors when the driver is being rmmod'd Signed-off-by: Iyappan Subramanian --- Iyappan Subramanian (1): drivers: net: xgene: Clean up all outstanding tx descriptors Quan

[PATCH 2/2] drivers: net: xgene: Clean up all outstanding tx descriptors

2017-08-25 Thread Iyappan Subramanian
When xgene_enet is rmmod'd and there are still outstanding tx descriptors that have been setup but have not completed, it is possible on the next modprobe of the driver to receive the oldest of such tx descriptors. This results in a kernel NULL pointer dereference. This patch attempts to clean up

Re: [Intel-wired-lan] how to submit fixes for i40e/i40evf?

2017-08-25 Thread Alexander Duyck
On Fri, Aug 25, 2017 at 1:52 PM, Stefano Brivio wrote: > Hi, > > As I'm currently preparing another fix for i40e, and the last one I > submitted has been stuck for about two weeks now, I would like to ask > some details about the process to submit fixes for i40e/i40evf drivers, > before I do somet

[PATCH net] ipv6: fix sparse warning on rt6i_node

2017-08-25 Thread Wei Wang
From: Wei Wang Commit c5cff8561d2d adds rcu grace period before freeing fib6_node. This generates a new sparse warning on rt->rt6i_node related code: net/ipv6/route.c:1394:30: error: incompatible types in comparison expression (different address spaces) ./include/net/ip6_fib.h:187:14: error

[net-next v2 02/13] i40evf: prevent VF close returning before state transitions to DOWN

2017-08-25 Thread Jeff Kirsher
From: Sudheer Mogilappagari Currently i40evf_close() can return before state transitions to __I40EVF_DOWN because of the latency involved in processing and receiving response from PF driver and scheduling of VF watchdog_task. Due to this inconsistency an immediate call to i40evf_open() fails beca

[net-next v2 10/13] i40evf: use netdev variable in reset task

2017-08-25 Thread Jeff Kirsher
From: Alan Brady If we're going to bother initializing a variable to reference it we might as well use it. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[net-next v2 03/13] i40e: Fix a bug with VMDq RSS queue allocation

2017-08-25 Thread Jeff Kirsher
From: Anjali Singhai Jain The X722 pf flag setup should happen before the VMDq RSS queue count is initialized for VMDq VSI to get the right number of queues for RSS in case of X722 devices. Signed-off-by: Anjali Singhai Jain Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by:

[net-next v2 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-08-25

2017-08-25 Thread Jeff Kirsher
This series contains updates to i40e and i40evf only. Mitch adjusts the max packet size to account for two VLAN tags. Sudheer provides a fix to ensure that the watchdog timer is scheduled immediately after admin queue operations are scheduled in i40evf_down(). Fixes an issue by adding locking aro

[net-next v2 11/13] i40e: use cpumask_copy instead of direct assignment

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller According to the header file cpumask.h, we shouldn't be directly copying a cpumask_t, since its a bitmap and might not be copied correctly. Lets use the provided cpumask_copy() function instead. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher

[net-next v2 13/13] i40e: synchronize nvmupdate command and adminq subtask

2017-08-25 Thread Jeff Kirsher
From: Sudheer Mogilappagari During NVM update, state machine gets into unrecoverable state because i40e_clean_adminq_subtask can get scheduled after the admin queue command but before other state variables are updated. This causes incorrect input to i40e_nvmupd_check_wait_event and state transiti

[net-next v2 06/13] i40e: Detect ATR HW Evict NVM issue and disable the feature

2017-08-25 Thread Jeff Kirsher
From: Anjali Singhai Jain This patch fixes a problem with the HW ATR eviction feature where the NVM setting was incorrect. This patch detects the issue on X720 adapters and disables the feature if the NVM setting is incorrect. Without this patch, HW ATR Evict feature does not work on broken NVM

[net-next v2 05/13] i40e: remove workaround for Open Firmware MAC address

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller Since commit b499ffb0a22c ("i40e: Look up MAC address in Open Firmware or IDPROM"), we've had support for obtaining the MAC address form Open Firmware or IDPROM. This code relied on sending the Open Firmware address directly to the device firmware instead of relying on our MAC

[net-next v2 04/13] i40e: separate hw_features from runtime changing flags

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller The number of flags found in pf->flags has grown quite large, and there are a lot of different types of flags. Most of the flags are simply hardware features which are enabled on some firmware or some MAC types. Other flags are dynamic run-time flags which enable or disable cer

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-25 Thread J. Bruce Fields
On Fri, Aug 18, 2017 at 06:00:47AM -0400, Vadim Lomovtsev wrote: > While running nfs/connectathon tests kernel NULL-pointer exception > has been observed due to races in svcsock.c. > > Race is appear when kernel accepts connection by kernel_accept > (which creates new socket) and start queuing ing

[net-next v2 08/13] i40e: move check for avoiding VID=0 filters into i40e_vsi_add_vlan

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller In i40e_vsi_add_vlan we treat attempting to add VID=0 as an error, because it does not do what the caller might expect. We already special case VID=0 in i40e_vlan_rx_add_vid so that we avoid this error when adding the VLAN. This special casing is necessary so that we do not ad

[net-next v2 09/13] i40e/i40evf: rename vf_offload_flags to vf_cap_flags in struct virtchnl_vf_resource

2017-08-25 Thread Jeff Kirsher
From: Stefan Assmann The current name of vf_offload_flags indicates that the bitmap is limited to offload related features. Make this more generic by renaming it to vf_cap_flags, which allows for other capabilities besides offloading to be added. Signed-off-by: Stefan Assmann Tested-by: Andrew

[net-next v2 01/13] i40e/i40evf: adjust packet size to account for double VLANs

2017-08-25 Thread Jeff Kirsher
From: Mitch Williams Now that the kernel supports double VLAN tags, we should at least play nice. Adjust the max packet size to account for two VLAN tags, not just one. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e

[net-next v2 12/13] i40e: prevent changing ITR if adaptive-rx/tx enabled

2017-08-25 Thread Jeff Kirsher
From: Alan Brady Currently the driver allows the user to change (or even disable) interrupt moderation if adaptive-rx/tx is enabled when this should not be the case. Adaptive RX/TX will not respect the user's ITR settings so allowing the user to change it is weird. This bug would also allow the

[net-next v2 07/13] i40e/i40evf: use cmpxchg64 when updating private flags in ethtool

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller When a user gives an invalid command to change a private flag which is not supported, either because it is read-only, or the device is not capable of the feature, we simply ignore the request. A naive solution would simply be to report error codes when one of the flags was not

Re: [PATCH] staging: rtlwifi: Improve debugging by using debugfs

2017-08-25 Thread Alexander Duyck
Fri, Aug 25, 2017 at 7:16 AM, Andrew Lunn wrote: > On Fri, Aug 25, 2017 at 08:47:00AM -0500, Larry Finger wrote: >> On 08/24/2017 08:54 PM, Andrew Lunn wrote: >> >netdev frowns upon debugfs. You should try to keep this altogether, >> >making it easy to throw away before the driver is moved out of

[PATCH net-next] selftests/bpf: check the instruction dumps are populated

2017-08-25 Thread Jakub Kicinski
Add a basic test for checking whether kernel is populating the jited and xlated BPF images. It was used to confirm the behaviour change from commit d777b2ddbecf ("bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()"), which made bpf_obj_get_info_by_fd() usable for retrieving the image

Re: [PATCH 31/35] wireless: realtek: rtl8187: constify usb_device_id

2017-08-25 Thread Hin-Tak Leung
On Tue, 8/8/17, Arvind Yadav wrote: Subject: [PATCH 31/35] wireless: realtek: rtl8187: constify usb_device_id To: kv...@codeaurora.org, her...@canonical.com, ht...@users.sourceforge.net, larry.fin...@lwfinger.net Cc: linux-ker...@vger.kernel.org,

Re: [PATCH net] cxgb4: Fix stack out-of-bounds read due to wrong size to t4_record_mbox()

2017-08-25 Thread Casey Leedom
| From: Stefano Brivio | Sent: Friday, August 25, 2017 1:48 PM |   | Passing commands for logging to t4_record_mbox() with size | MBOX_LEN, when the actual command size is actually smaller, | causes out-of-bounds stack accesses in t4_record_mbox() while | copying command words here: | ... Than

how to submit fixes for i40e/i40evf?

2017-08-25 Thread Stefano Brivio
Hi, As I'm currently preparing another fix for i40e, and the last one I submitted has been stuck for about two weeks now, I would like to ask some details about the process to submit fixes for i40e/i40evf drivers, before I do something wrong again. Do all the patches have to go through Intel's pa

Re: Permissions for eBPF objects

2017-08-25 Thread Chenbo Feng
On Fri, Aug 25, 2017 at 1:40 PM, Stephen Smalley wrote: > On Fri, 2017-08-25 at 12:52 -0700, Chenbo Feng via Selinux wrote: >> On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep > com> wrote: >> > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley > > v> wrote: >> > > On Fri, 2017-08-25 at 11:0

[PATCH net] cxgb4: Fix stack out-of-bounds read due to wrong size to t4_record_mbox()

2017-08-25 Thread Stefano Brivio
Passing commands for logging to t4_record_mbox() with size MBOX_LEN, when the actual command size is actually smaller, causes out-of-bounds stack accesses in t4_record_mbox() while copying command words here: for (i = 0; i < size / 8; i++) entry->cmd[i] = be64_to_cpu(cmd[i]

Re: [PATCH net-next] bpf: fix oops on allocation failure

2017-08-25 Thread Daniel Borkmann
On 08/25/2017 10:27 PM, Dan Carpenter wrote: "err" is set to zero if bpf_map_area_alloc() fails so it means we return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not expecting NULL returns and will oops. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off

Re: Permissions for eBPF objects

2017-08-25 Thread Stephen Smalley
On Fri, 2017-08-25 at 12:52 -0700, Chenbo Feng via Selinux wrote: > On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep com> wrote: > > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley > v> wrote: > > > On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via > > > Selinux > > > wrote: > >

[PATCH net-next] bpf: fix oops on allocation failure

2017-08-25 Thread Dan Carpenter
"err" is set to zero if bpf_map_area_alloc() fails so it means we return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not expecting NULL returns and will oops. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off-by: Dan Carpenter diff --git a/kernel/bpf/so

mlxsw and rtnl lock

2017-08-25 Thread David Ahern
Jiri / Ido: I was looking at the mlxsw driver and the places it holds the rtnl lock. There are a lot of them and from an admittedly short review it seems like the rtnl is protecting changes to mlxsw data structures as opposed to calling into the core networking stack. This is going to have huge im

Re: [PATCH net] ptr_ring: use kmalloc_array()

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 22:25 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 25, 2017 at 11:57:19AM -0700, Eric Dumazet wrote: > > On Fri, 2017-08-25 at 21:03 +0300, Michael S. Tsirkin wrote: > > > On Wed, Aug 16, 2017 at 10:36:47AM -0700, Eric Dumazet wrote: > > > > From: Eric Dumazet > > > > > >

Re: Permissions for eBPF objects

2017-08-25 Thread Daniel Borkmann
On 08/25/2017 09:52 PM, Chenbo Feng wrote: On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep wrote: On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley wrote: On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via Selinux wrote: I’d like to get your thoughts on adding LSM permission

Re: Permissions for eBPF objects

2017-08-25 Thread Casey Schaufler
Adding the LSM list to the thread. On 8/25/2017 11:01 AM, Jeffrey Vander Stoep via Selinux wrote: > I’d like to get your thoughts on adding LSM permission checks on BPF objects. Aside from the use of these objects requiring privilege, what sort of controls do you think might be reasonable? Who "o

Re: Permissions for eBPF objects

2017-08-25 Thread Chenbo Feng
On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep wrote: > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley wrote: >> On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via Selinux >> wrote: >>> I’d like to get your thoughts on adding LSM permission checks on BPF >>> objects. >>> >>> B

Re: [patch net-next 11/12] mlxsw: spectrum_dpipe: Add support for IPv4 host table dump

2017-08-25 Thread David Ahern
On 8/25/17 2:26 AM, Arkadi Sharshevsky wrote: > > > On 08/24/2017 10:26 PM, David Ahern wrote: >> On 8/23/17 11:40 PM, Jiri Pirko wrote: >>> +static int >>> +mlxsw_sp_dpipe_table_host_entries_get(struct mlxsw_sp *mlxsw_sp, >>> + struct devlink_dpipe_entry *entry, >

Re: Permissions for eBPF objects

2017-08-25 Thread Jeffrey Vander Stoep
On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley wrote: > On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via Selinux > wrote: >> I’d like to get your thoughts on adding LSM permission checks on BPF >> objects. >> >> By default, the ability to create and use eBPF maps/programs requires >>

Re: [RFC PATCH] net: limit maximum number of packets to mark with xmit_more

2017-08-25 Thread Jakub Kicinski
On Fri, 25 Aug 2017 08:24:49 -0700, Jacob Keller wrote: > Under some circumstances, such as with many stacked devices, it is > possible that dev_hard_start_xmit will bundle many packets together, and > mark them all with xmit_more. Excuse my ignorance but what are those stacked devices? Could the

Re: Permissions for eBPF objects

2017-08-25 Thread Stephen Smalley
On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via Selinux wrote: > I’d like to get your thoughts on adding LSM permission checks on BPF > objects. > > By default, the ability to create and use eBPF maps/programs requires > CAP_SYS_ADMIN [1]. Alternatively, all processes can be granted ac

Re: [PATCH net] ptr_ring: use kmalloc_array()

2017-08-25 Thread Michael S. Tsirkin
On Fri, Aug 25, 2017 at 11:57:19AM -0700, Eric Dumazet wrote: > On Fri, 2017-08-25 at 21:03 +0300, Michael S. Tsirkin wrote: > > On Wed, Aug 16, 2017 at 10:36:47AM -0700, Eric Dumazet wrote: > > > From: Eric Dumazet > > > > > > As found by syzkaller, malicious users can set whatever tx_queue_len

[PATCH 1/4] dt-bindings: net: Revert sun8i dwmac binding

2017-08-25 Thread Maxime Ripard
This binding still doesn't please everyone, and we're getting far too close from the release to allow it to reach a stable version. Let's remove it until the discussion settles down. Signed-off-by: Maxime Ripard --- .../devicetree/bindings/net/dwmac-sun8i.txt| 84 --

[PATCH 0/4] net: stmmac: revert the EMAC bindings

2017-08-25 Thread Maxime Ripard
Hi, The bindings of the stmmac glue for the new Allwinner EMAC controller are still controversial and being discussed, even though they've been merged in 4.13. In order not to introduce any binding we do not really want to commit to in a stable release, especially since that would mean we would h

[PATCH 2/4] arm64: dts: allwinner: Revert EMAC changes

2017-08-25 Thread Maxime Ripard
Since the discussion is not settled yet for the EMAC, and that the release in getting really close, let's revert the changes for now, and we'll reintroduce them later. Signed-off-by: Maxime Ripard --- .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 17 - .../boot/dts/allwi

[PATCH 3/4] arm: dts: sunxi: Revert EMAC changes

2017-08-25 Thread Maxime Ripard
Since the discussion is not settled yet for the EMAC, and that the release in getting really close, let's revert the changes for now, and we'll reintroduce them later. Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 9 arch/arm/boot/dts/sun8i-h3-ban

[PATCH 4/4] net: stmmac: sun8i: Remove the compatibles

2017-08-25 Thread Maxime Ripard
Since the bindings have been controversial, and we follow the DT stable ABI rule, we shouldn't let a driver with a DT binding that might change slip through in a stable release. Remove the compatibles to make sure the driver will not probe and no-one will start using the binding currently implemen

  1   2   3   >