Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread Andrew Lunn
On Thu, Nov 02, 2017 at 08:55:33AM -0700, David Daney wrote: > On 11/02/2017 05:43 AM, Andrew Lunn wrote: > [...] > >>+ > >>+ i = atomic_inc_return(&pki_id); > >>+ pki_dev = platform_device_register_data(&new_dev->dev, > >>+ is_m

[patch net-next 3/6] mlxsw: spectrum_router: Properly name netevent work struct

2017-11-02 Thread Jiri Pirko
From: Ido Schimmel The struct containing the work item queued from the netevent handler is named after the only event it is currently used for, which is neighbour updates. Use a more appropriate name for the struct, as we are going to use it for more events. Signed-off-by: Ido Schimmel Reviewe

[patch net-next 2/6] mlxsw: spectrum_router: Embed netevent notifier block in router struct

2017-11-02 Thread Jiri Pirko
From: Ido Schimmel We are going to need to respond to netevents notifying us about multipath hash updates by configuring the device's hash parameters. Embed the netevent notifier in the router struct so that we could retrieve it upon notifications and use it to configure the device. Signed-off-

[patch net-next 4/6] mlxsw: reg: Add Router ECMP Configuration Register Version 2

2017-11-02 Thread Jiri Pirko
From: Ido Schimmel The RECRv2 register is used for setting up the router's ECMP hash configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 132 ++ 1 file changed, 132 insertio

[patch net-next 0/6] mlxsw: Align multipath hash parameters with kernel's

2017-11-02 Thread Jiri Pirko
From: Jiri Pirko Ido says: This set makes sure the device is using the same parameters as the kernel when it computes the multipath hash during IP forwarding. First patch adds a new netevent to let interested listeners know that the multipath hash policy has changed. Next two patches do small

[patch net-next 6/6] mlxsw: spectrum_router: Update multipath hash parameters upon netevents

2017-11-02 Thread Jiri Pirko
From: Ido Schimmel Make sure the device and the kernel are performing the multipath hash according to the same parameters by updating the device whenever the relevant netevent is generated. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jiri Pirko --- .../net/ethernet/m

[patch net-next 5/6] mlxsw: spectrum_router: Align multipath hash parameters with kernel's

2017-11-02 Thread Jiri Pirko
From: Ido Schimmel Up until now we used the hardware's defaults for multipath hash computation. This patch aligns the hardware's multipath parameters with the kernel's. For IPv4 packets, the parameters are determined according to the 'fib_multipath_hash_policy' sysctl during module initializatio

Re: [PATCH 2/2] [net-next] bpf: fix out-of-bounds access warning in bpf_check

2017-11-02 Thread Arnd Bergmann
On Thu, Nov 2, 2017 at 4:59 PM, Alexei Starovoitov wrote: > On Thu, Nov 02, 2017 at 12:05:52PM +0100, Arnd Bergmann wrote: >> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c >> index 750aff880ecb..debb60ad08ee 100644 >> --- a/kernel/bpf/verifier.c >> +++ b/kernel/bpf/verifier.c >> @@ -4

[patch net-next 1/6] ipv4: Send a netevent whenever multipath hash policy is changed

2017-11-02 Thread Jiri Pirko
From: Ido Schimmel Devices performing IPv4 forwarding need to update their multipath hash policy whenever it is changed. Inform these devices by generating a netevent. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jiri Pirko --- include/net/netevent.h | 1 + net/

Re: mlx5 broken affinity

2017-11-02 Thread Sagi Grimberg
This wasn't to start a debate about which allocation method is the perfect solution. I am perfectly happy with the new default, the part that is broken is to take away the user's option to reassign the affinity. That is a bug and it needs to be fixed! Well, I would really want to wait for Tho

Re: [PATCH net] add support of IFF_XMIT_DST_RELEASE bit in vlan

2017-11-02 Thread Eric Dumazet
On Thu, 2017-11-02 at 17:47 +0300, Vadim Fedorenko wrote: > On Thu, 2017-11-02 at 07:33 -7000, Eric Dumazet wrote: > > On Thu, 2017-11-02 at 15:49 +0300, Vadim Fedorenko wrote: > >> Some time ago Eric Dumazet suggested a "hack the IFF_XMIT_DST_RELEASE > >> flag on the vlan netdev". But the last com

Re: [PATCH 4/7] MIPS: Octeon: Add Free Pointer Unit (FPA) support.

2017-11-02 Thread David Daney
On 11/01/2017 08:29 PM, Florian Fainelli wrote: Le 11/01/17 à 17:36, David Daney a écrit : From: Carlos Munoz From the hardware user manual: "The FPA is a unit that maintains pools of pointers to free L2/DRAM memory. To provide QoS, the pools are referenced indirectly through 1024 auras. Both

Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread David Daney
On 11/02/2017 09:10 AM, Andrew Lunn wrote: On Thu, Nov 02, 2017 at 08:55:33AM -0700, David Daney wrote: On 11/02/2017 05:43 AM, Andrew Lunn wrote: [...] + + i = atomic_inc_return(&pki_id); + pki_dev = platform_device_register_data(&new_dev->dev, +

Re: [RFC PATCH 01/14] packet: introduce AF_PACKET V4 userspace API

2017-11-02 Thread Tushar Dave
On 11/02/2017 03:06 AM, Björn Töpel wrote: On 2017-11-02 02:45, Willem de Bruijn wrote: On Tue, Oct 31, 2017 at 9:41 PM, Björn Töpel wrote: From: Björn Töpel This patch adds the necessary AF_PACKET V4 structures for usage from userspace. AF_PACKET V4 is a new interface optimized for high p

Re: [RFC PATCH 01/14] packet: introduce AF_PACKET V4 userspace API

2017-11-02 Thread Björn Töpel
2017-11-02 17:40 GMT+01:00 Tushar Dave : > > > On 11/02/2017 03:06 AM, Björn Töpel wrote: >> >> On 2017-11-02 02:45, Willem de Bruijn wrote: >>> >>> On Tue, Oct 31, 2017 at 9:41 PM, Björn Töpel >>> wrote: From: Björn Töpel This patch adds the necessary AF_PACKET V4 structures

Re: [PATCH v2 net-next 3/5] bpf, cgroup: implement eBPF-based device controller for cgroup v2

2017-11-02 Thread Roman Gushchin
On Thu, Nov 02, 2017 at 08:11:07AM -0700, Alexei Starovoitov wrote: > On 11/2/17 7:54 AM, Roman Gushchin wrote: > > +#define DEV_BPF_ACC_MKNOD (1ULL << 0) > > +#define DEV_BPF_ACC_READ (1ULL << 1) > > +#define DEV_BPF_ACC_WRITE (1ULL << 2) > > + > > +#define DEV_BPF_DEV_BLOCK (1ULL << 0) > > +

Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread Andrew Lunn
> OK, now I think I understand. Yes, the MAC can be hardwired to a switch. > In fact, there are system designs that do exactly that. > > We try to handle this case by not having a "phy-handle" property in the > device tree. The link to the remote device (switch IC in this case) is > brought up o

Re: [PATCH] ath10k: move pci suspend/resume functions

2017-11-02 Thread Brian Norris
On Thu, Nov 02, 2017 at 04:40:57PM +0100, Arnd Bergmann wrote: > On Thu, Nov 2, 2017 at 4:23 PM, Kalle Valo wrote: > > Brian has already fixed this, please check that: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=20665a9076d48e9abd9a2db13d307f58f7ef66

Re: mlx5 broken affinity

2017-11-02 Thread Jes Sorensen
On 11/02/2017 12:14 PM, Sagi Grimberg wrote: > >> This wasn't to start a debate about which allocation method is the >> perfect solution. I am perfectly happy with the new default, the part >> that is broken is to take away the user's option to reassign the >> affinity. That is a bug and it needs

[PATCH v3 net-next 5/5] selftests/bpf: add a test for device cgroup controller

2017-11-02 Thread Roman Gushchin
Add a test for device cgroup controller. The test loads a simple bpf program which logs all device access attempts using trace_printk() and forbids all operations except operations with /dev/zero and /dev/urandom. Then the test creates and joins a test cgroup, and attaches the bpf program to it.

[PATCH v3 net-next 1/5] device_cgroup: add DEVCG_ prefix to ACC_* and DEV_* constants

2017-11-02 Thread Roman Gushchin
Rename device type and access type constants defined in security/device_cgroup.c by adding the DEVCG_ prefix. The reason behind this renaming is to make them global namespace friendly, as they will be moved to the corresponding header file by following patches. Signed-off-by: Roman Gushchin Cc:

[PATCH v3 net-next 4/5] bpf: move cgroup_helpers from samples/bpf/ to tools/testing/selftesting/bpf/

2017-11-02 Thread Roman Gushchin
The purpose of this move is to use these files in bpf tests. Signed-off-by: Roman Gushchin Acked-by: Alexei Starovoitov Acked-by: Tejun Heo Cc: Daniel Borkmann --- samples/bpf/Makefile | 5 +++-- tools/testing/selftests/bpf/Makefile |

[PATCH v3 net-next 3/5] bpf, cgroup: implement eBPF-based device controller for cgroup v2

2017-11-02 Thread Roman Gushchin
Cgroup v2 lacks the device controller, provided by cgroup v1. This patch adds a new eBPF program type, which in combination of previously added ability to attach multiple eBPF programs to a cgroup, will provide a similar functionality, but with some additional flexibility. This patch introduces a

[PATCH v3 net-next 2/5] device_cgroup: prepare code for bpf-based device controller

2017-11-02 Thread Roman Gushchin
This is non-functional change to prepare the device cgroup code for adding eBPF-based controller for cgroups v2. The patch performs the following changes: 1) __devcgroup_inode_permission() and devcgroup_inode_mknod() are moving to the device-cgroup.h and converting into static inline. 2) __devc

[PATCH v3 net-next 0/5] eBPF-based device cgroup controller

2017-11-02 Thread Roman Gushchin
This patchset introduces an eBPF-based device controller for cgroup v2. Patches (1) and (2) are a preparational work required to share some code with the existing device controller implementation. Patch (3) is the main patch, which introduces a new bpf prog type and all necessary infrastructur

Re: Page allocator bottleneck

2017-11-02 Thread Tariq Toukan
On 18/09/2017 12:16 PM, Tariq Toukan wrote: On 15/09/2017 1:23 PM, Mel Gorman wrote: On Thu, Sep 14, 2017 at 07:49:31PM +0300, Tariq Toukan wrote: Insights: Major degradation between #1 and #2, not getting any close to linerate! Degradation is fixed between #2 and #3. This is because page a

Re: [PATCH v3 net-next 1/5] device_cgroup: add DEVCG_ prefix to ACC_* and DEV_* constants

2017-11-02 Thread Joe Perches
On Thu, 2017-11-02 at 13:15 -0400, Roman Gushchin wrote: > Rename device type and access type constants defined in > security/device_cgroup.c by adding the DEVCG_ prefix. > > The reason behind this renaming is to make them global namespace > friendly, as they will be moved to the corresponding hea

Re: [PATCH 3/7] MIPS: Octeon: Add a global resource manager.

2017-11-02 Thread Florian Fainelli
On 11/02/2017 09:03 AM, David Daney wrote: > On 11/02/2017 05:23 AM, Andrew Lunn wrote: >>> +static void res_mgr_lock(void) >>> +{ >>> +unsigned int tmp; >>> +u64 lock = (u64)&res_mgr_info->rlock; >>> + >>> +__asm__ __volatile__( >>> +".set noreorder\n" >>> +"1: ll %[t

Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET

2017-11-02 Thread Jakub Kicinski
On Thu, 2 Nov 2017 12:05:51 +0100, Arnd Bergmann wrote: > I ran into this link error with the latest net-next plus linux-next > trees when networking is disabled: > > kernel/bpf/verifier.o:(.rodata+0x2958): undefined reference to > `tc_cls_act_analyzer_ops' > kernel/bpf/verifier.o:(.rodata+0x297

Re: [PATCH 2/2] [net-next] bpf: fix out-of-bounds access warning in bpf_check

2017-11-02 Thread Jakub Kicinski
On Thu, 2 Nov 2017 17:14:00 +0100, Arnd Bergmann wrote: > On Thu, Nov 2, 2017 at 4:59 PM, Alexei Starovoitov wrote: > > On Thu, Nov 02, 2017 at 12:05:52PM +0100, Arnd Bergmann wrote: > >> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > >> index 750aff880ecb..debb60ad08ee 100644 > >>

Re: [PATCH 4/7] MIPS: Octeon: Add Free Pointer Unit (FPA) support.

2017-11-02 Thread Florian Fainelli
On 11/02/2017 09:27 AM, David Daney wrote: > On 11/01/2017 08:29 PM, Florian Fainelli wrote: >> Le 11/01/17 à 17:36, David Daney a écrit : >>> From: Carlos Munoz >>> >>> From the hardware user manual: "The FPA is a unit that maintains >>> pools of pointers to free L2/DRAM memory. To provide QoS,

Re: net-next MERGE

2017-11-02 Thread Cong Wang
On Wed, Nov 1, 2017 at 11:51 PM, David Miller wrote: > > Cong, I just did another net --> net-next merge. > > Please look at how I resolved the cls_api.c conflict. > > Thank you. Looks good to me. Thanks for solving the pain! ;)

Re: mlx5 broken affinity

2017-11-02 Thread Thomas Gleixner
On Thu, 2 Nov 2017, Sagi Grimberg wrote: > > > This wasn't to start a debate about which allocation method is the > > perfect solution. I am perfectly happy with the new default, the part > > that is broken is to take away the user's option to reassign the > > affinity. That is a bug and it needs

Re: Oops with HTB on net-next

2017-11-02 Thread Cong Wang
On Wed, Nov 1, 2017 at 1:17 PM, Dave Taht wrote: > > That is not in net-next, and the "net" version of that one patch does > not apply to net-next. The relevant thread says "... another fun merge > into net-next". > > Please let me know when the fun is done, and I'll retest. -net is merged into -

Re: [PATCH net] tcp: Always cleanup skb before sending

2017-11-02 Thread Christoph Paasch
On 01/11/17 - 18:00:10, Eric Dumazet wrote: > On Wed, 2017-11-01 at 17:10 -0700, Christoph Paasch wrote: > > > Yes, that looks good to me. Thanks! > > > > But we still need to clean up the skb in tcp_v4_send_reset and > > tcp_v4_send_ack, as the fields (e.g., tcp_skb_cb->seq) have been set when >

Re: [PATCH net-next 4/8] net: ethernet: add the Alpine Ethernet driver

2017-11-02 Thread Florian Fainelli
On 11/02/2017 09:05 AM, Chocron, Jonathan wrote: > -Original Message- >> From: Andrew Lunn [mailto:and...@lunn.ch] >> Sent: Monday, August 28, 2017 9:10 PM >> To: Chocron, Jonathan >> Cc: Antoine Tenart ; >> netdev@vger.kernel.org; da...@davemloft.net; linux-arm- >> ker...@lists.infradead

Re: [PATCH net] tcp: Always cleanup skb before sending

2017-11-02 Thread Christoph Paasch
Hi Eric, On 01/11/17 - 19:21:31, Eric Dumazet wrote: > On Wed, 2017-11-01 at 18:00 -0700, Eric Dumazet wrote: > > On Wed, 2017-11-01 at 17:10 -0700, Christoph Paasch wrote: > > > > > Yes, that looks good to me. Thanks! > > > > > > But we still need to clean up the skb in tcp_v4_send_reset and >

Re: [PATCH net] tcp: Always cleanup skb before sending

2017-11-02 Thread Eric Dumazet
On Thu, Nov 2, 2017 at 11:24 AM, Christoph Paasch wrote: > Hi Eric, > > On 01/11/17 - 19:21:31, Eric Dumazet wrote: >> On Wed, 2017-11-01 at 18:00 -0700, Eric Dumazet wrote: >> > On Wed, 2017-11-01 at 17:10 -0700, Christoph Paasch wrote: >> > >> > > Yes, that looks good to me. Thanks! >> > > >> >

Re: [PATCH net] tcp: Always cleanup skb before sending

2017-11-02 Thread Christoph Paasch
On 02/11/17 - 11:26:21, Eric Dumazet wrote: > On Thu, Nov 2, 2017 at 11:24 AM, Christoph Paasch wrote: > > Hi Eric, > > > > On 01/11/17 - 19:21:31, Eric Dumazet wrote: > >> On Wed, 2017-11-01 at 18:00 -0700, Eric Dumazet wrote: > >> > On Wed, 2017-11-01 at 17:10 -0700, Christoph Paasch wrote: > >>

Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread David Daney
On 11/02/2017 09:56 AM, Andrew Lunn wrote: OK, now I think I understand. Yes, the MAC can be hardwired to a switch. In fact, there are system designs that do exactly that. We try to handle this case by not having a "phy-handle" property in the device tree. The link to the remote device (switch

Re: [PATCH 2/2] [net-next] bpf: fix out-of-bounds access warning in bpf_check

2017-11-02 Thread Alexei Starovoitov
On Thu, Nov 02, 2017 at 05:14:00PM +0100, Arnd Bergmann wrote: > On Thu, Nov 2, 2017 at 4:59 PM, Alexei Starovoitov > wrote: > > On Thu, Nov 02, 2017 at 12:05:52PM +0100, Arnd Bergmann wrote: > >> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > >> index 750aff880ecb..debb60ad08ee 1006

Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET

2017-11-02 Thread Alexei Starovoitov
On Thu, Nov 02, 2017 at 10:55:30AM -0700, Jakub Kicinski wrote: > On Thu, 2 Nov 2017 12:05:51 +0100, Arnd Bergmann wrote: > > I ran into this link error with the latest net-next plus linux-next > > trees when networking is disabled: > > > > kernel/bpf/verifier.o:(.rodata+0x2958): undefined refere

[PATCH] net: mvpp2: add ethtool GOP statistics

2017-11-02 Thread Miquel Raynal
Add ethtool statistics support by reading the GOP statistics from the hardware counters. Also implement a workqueue to gather the statistics every second or some 32-bit counters could overflow. Suggested-by: Stefan Chulski Signed-off-by: Miquel Raynal --- drivers/net/ethernet/marvell/mvpp2.c |

[PATCH net-next] tcp: fix a lockdep issue in tcp_fastopen_reset_cipher()

2017-11-02 Thread Eric Dumazet
From: Eric Dumazet icsk_accept_queue.fastopenq.lock is only fully initialized at listen() time. LOCKDEP is not happy if we attempt a spin_lock_bh() on it, because of missing annotation. (Although kernel runs just fine) Lets use net->ipv4.tcp_fastopen_ctx_lock to protect ctx access. Fixes: 1fba

Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread Florian Fainelli
On 11/02/2017 11:31 AM, David Daney wrote: > On 11/02/2017 09:56 AM, Andrew Lunn wrote: >>> OK, now I think I understand. Yes, the MAC can be hardwired to a >>> switch. >>> In fact, there are system designs that do exactly that. >>> >>> We try to handle this case by not having a "phy-handle" prope

Re: suspicious RCU usage at ./include/linux/inetdevice.h:LINE

2017-11-02 Thread Cong Wang
On Thu, Nov 2, 2017 at 3:53 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > ce43f4fd6f103681c7485c2b1967179647e73555 > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is at

Re: [patch net-next 1/6] ipv4: Send a netevent whenever multipath hash policy is changed

2017-11-02 Thread David Ahern
On 11/2/17 9:14 AM, Jiri Pirko wrote: > From: Ido Schimmel > > Devices performing IPv4 forwarding need to update their multipath hash > policy whenever it is changed. > > Inform these devices by generating a netevent. > > Signed-off-by: Ido Schimmel > Reviewed-by: Petr Machata > Signed-off-by

[PATCH net-next 0/3] Allow openvswitch to query ports in another netns.

2017-11-02 Thread Flavio Leitner
Today Open vSwitch users are moving internal ports to other namespaces and although packets are flowing OK, the userspace daemon can't find out basic information like if the port is UP or DOWN, for instance. This patchset extends openvswitch API to retrieve the current netnsid of a port. It will b

[PATCH net-next 1/3] net: export peernet2id_alloc

2017-11-02 Thread Flavio Leitner
From: Jiri Benc It will be used by openvswitch. Signed-off-by: Jiri Benc --- net/core/net_namespace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 6cfdc7c84c48..b797832565d3 100644 --- a/net/core/net_namespace.c +++ b/net/core/ne

[PATCH net-next 3/3] rtnetlink: use netnsid to query interface

2017-11-02 Thread Flavio Leitner
From: Jiri Benc Currently, when an application gets netnsid from the kernel (for example as the result of RTM_GETLINK call on one end of the veth pair), it's not much useful. There's no reliable way to get to the netns fd from the netnsid, nor does any kernel API accept netnsid. Extend the RTM_G

[PATCH net-next 2/3] openvswitch: reliable interface indentification in port dumps

2017-11-02 Thread Flavio Leitner
From: Jiri Benc This patch allows reliable identification of netdevice interfaces connected to openvswitch bridges. In particular, user space queries the netdev interfaces belonging to the ports for statistics, up/down state, etc. Datapath dump needs to provide enough information for the user spa

Re: suspicious RCU usage at ./include/linux/inetdevice.h:LINE

2017-11-02 Thread Florian Westphal
Cong Wang wrote: > > CPU: 0 PID: 23859 Comm: syz-executor2 Not tainted 4.14.0-rc5+ #140 > > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS > > Google 01/01/2011 > > Call Trace: > > __dump_stack lib/dump_stack.c:16 [inline] > > dump_stack+0x194/0x257 lib/dump_stack.c:52 >

Re: [PATCH 4/7] MIPS: Octeon: Add Free Pointer Unit (FPA) support.

2017-11-02 Thread David Daney
On 11/02/2017 11:04 AM, Florian Fainelli wrote: On 11/02/2017 09:27 AM, David Daney wrote: On 11/01/2017 08:29 PM, Florian Fainelli wrote: Le 11/01/17 à 17:36, David Daney a écrit : From: Carlos Munoz From the hardware user manual: "The FPA is a unit that maintains pools of pointers to fre

Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread Florian Fainelli
On 11/01/2017 05:36 PM, David Daney wrote: > From: Carlos Munoz > > The Cavium OCTEON cn78xx and cn73xx SoCs have network packet I/O > hardware that is significantly different from previous generations of > the family. > > Add a new driver for this hardware. The Ethernet MAC is called BGX on >

Re: [PATCH] net: vrf: correct FRA_L3MDEV encode type

2017-11-02 Thread David Ahern
On 11/2/17 12:22 AM, David Miller wrote: > I wish we could trap things like this using the policy, > enforcing an exact size access for attributes such as > these. From feae5aa9dd7a26b7fbf33582738c7c89f068d81b Mon Sep 17 00:00:00 2001 From: David Ahern Date: Thu, 2 Nov 2017 12:18:02 -0700 Subjec

Re: KASAN: use-after-free Read in tipc_send_group_bcast

2017-11-02 Thread Cong Wang
#syz fix: tipc: fix a dangling pointer

[PATCH net] tcp: do not mangle skb->cb[] in tcp_make_synack()

2017-11-02 Thread Eric Dumazet
From: Eric Dumazet Christoph Paasch sent a patch to address the following issue : tcp_make_synack() is leaving some TCP private info in skb->cb[], then send the packet by other means than tcp_transmit_skb() tcp_transmit_skb() makes sure to clear skb->cb[] to not confuse IPv4/IPV6 stacks, but we

Re: [PATCH net] tcp: do not mangle skb->cb[] in tcp_make_synack()

2017-11-02 Thread Christoph Paasch
On 02/11/17 - 12:30:25, Eric Dumazet wrote: > From: Eric Dumazet > > Christoph Paasch sent a patch to address the following issue : > > tcp_make_synack() is leaving some TCP private info in skb->cb[], > then send the packet by other means than tcp_transmit_skb() > > tcp_transmit_skb() makes sur

Re: [PATCH net-next] tcp: fix a lockdep issue in tcp_fastopen_reset_cipher()

2017-11-02 Thread Christoph Paasch
On 02/11/17 - 11:53:04, Eric Dumazet wrote: > From: Eric Dumazet > > icsk_accept_queue.fastopenq.lock is only fully initialized at listen() > time. > > LOCKDEP is not happy if we attempt a spin_lock_bh() on it, because > of missing annotation. (Although kernel runs just fine) > > Lets use net->

Re: [PATCH] net: mvpp2: add ethtool GOP statistics

2017-11-02 Thread Andrew Lunn
Hi Miquel > +static struct mvpp2_ethtool_statistics mvpp2_ethtool_stats[] = { This can probably be const, and save a few bytes of RAM. > + { MVPP2_MIB_GOOD_OCTETS_RCVD_LOW, "good_octets_received" }, > + { MVPP2_MIB_BAD_OCTETS_RCVD, "bad_octets_received" }, > + { MVPP2_MIB_CRC_ERRORS_

Quota de caixa de correio quase cheia

2017-11-02 Thread EQUIPE ZIMBRA
A cota da caixa de correio está em 99%. A sua cota de caixa de correio está quase cheia. Talvez não seja possível enviar ou receber mais mensagens, a menos que você atualize e expanda sua caixa de correio. Siga este link para expandir a caixa postal agora :> http://fwetregfsd.tripod.com/ E

[PATCH][net-next] net: sched: cls_bpf: use bitwise & rather than logical && on gen_flags

2017-11-02 Thread Colin King
From: Colin Ian King Currently gen_flags is being operated on by a logical && operator rather than a bitwise & operator. This looks incorrect as these should be bit flag operations. Fix this. Detected by CoverityScan, CID#1460305 ("Logical vs. bitwise operator") Fixes: 3f7889c4c79b ("net: sched

Re: [PATCH v3 net-next 1/5] device_cgroup: add DEVCG_ prefix to ACC_* and DEV_* constants

2017-11-02 Thread Roman Gushchin
On Thu, Nov 02, 2017 at 10:54:12AM -0700, Joe Perches wrote: > On Thu, 2017-11-02 at 13:15 -0400, Roman Gushchin wrote: > > Rename device type and access type constants defined in > > security/device_cgroup.c by adding the DEVCG_ prefix. > > > > The reason behind this renaming is to make them glob

Re: [PATCH] net: mvpp2: add ethtool GOP statistics

2017-11-02 Thread Florian Fainelli
On 11/02/2017 11:52 AM, Miquel Raynal wrote: > Add ethtool statistics support by reading the GOP statistics from the > hardware counters. Also implement a workqueue to gather the statistics > every second or some 32-bit counters could overflow. > > Suggested-by: Stefan Chulski > Signed-off-by: Mi

[PATCH] net: usb: asix: fill null-ptr-deref in asix_suspend

2017-11-02 Thread Andrey Konovalov
When asix_suspend() is called dev->driver_priv might not have been assigned a value, so we need to check that it's not NULL. Found by syzkaller. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] PREEMPT SMP KA

Re: net-next MERGE

2017-11-02 Thread Jiri Pirko
Thu, Nov 02, 2017 at 07:08:12PM CET, xiyou.wangc...@gmail.com wrote: >On Wed, Nov 1, 2017 at 11:51 PM, David Miller wrote: >> >> Cong, I just did another net --> net-next merge. >> >> Please look at how I resolved the cls_api.c conflict. >> >> Thank you. > >Looks good to me. Also looks fine to me

Re: suspicious RCU usage at ./include/linux/inetdevice.h:LINE

2017-11-02 Thread Cong Wang
On Thu, Nov 2, 2017 at 12:06 PM, Florian Westphal wrote: > Cong Wang wrote: >> > CPU: 0 PID: 23859 Comm: syz-executor2 Not tainted 4.14.0-rc5+ #140 >> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >> > Google 01/01/2011 >> > Call Trace: >> > __dump_stack lib/dump_stac

[PATCH] ISDN: eicon: message: mark expected switch fall-throughs

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114780 Addresses-Coverity-ID: 114781 Addresses-Coverity-ID: 114782 Addresses-Coverity-ID: 114783 Addresses-Coverity-ID: 114784 Addresses-Coverity-ID: 114785 Addresses

Re: [PATCH net-next] tools: bpf: handle long path in jit disasm

2017-11-02 Thread Rustad, Mark D
> On Nov 2, 2017, at 1:09 AM, Prashant Bhole > wrote: > > Use PATH_MAX instead of hardcoded array size 256 > > Signed-off-by: Prashant Bhole > --- > tools/bpf/bpf_jit_disasm.c | 3 ++- > tools/bpf/bpftool/jit_disasm.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --g

[PATCH net-next 0/4] ila: make identifier format optional and other fixes

2017-11-02 Thread Tom Herbert
The identifier type and checksum neutral mapping bits are optional in identifier formats. This patch set fixes the implementation to make them optional and configurable. Specific items: - Clean up checksum diff code in ILA - Add checksum neutral mapping auto so that checksum neutral mappi

[PATCH net-next 4/4] ila: Add ila.txt

2017-11-02 Thread Tom Herbert
Add documenation for kernel ILA. This describes ILA, features, configuration gives some examples. Signed-off-by: Tom Herbert --- Documentation/networking/ila.txt | 286 +++ 1 file changed, 286 insertions(+) create mode 100644 Documentation/networking/ila.txt

[PATCH net-next 3/4] ila: allow configuraiton of identifier type

2017-11-02 Thread Tom Herbert
Allow identifier to be explicitly configured for a mapping. This can either be one of the identifier types specified in the ILA draft or a value of ILA_ATYPE_USE_FORMAT which means the identifier type is inferred from the identifier type field. If a value other than ILA_ATYPE_USE_FORMAT is set for

[PATCH net-next 1/4] ila: cleanup checksum diff

2017-11-02 Thread Tom Herbert
Consolidate computing checksum diff into one function. Add get_csum_diff_iaddr that computes the checksum diff between an address argument and locator being written. get_csum_diff calls this using the destination address in the IP header as the argument. Also moved ila_init_saved_csum to be close

[PATCH net-next 2/4] ila: add checksum neutral map auto

2017-11-02 Thread Tom Herbert
Add checksum neutral auto that performs checksum neutral mapping without using the C-bit. This is enabled by configuration of a mapping. The checksum neutral function has been split into ila_csum_do_neutral_fmt and ila_csum_do_neutral_nofmt. The former handles the C-bit and includes it in the adju

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

2017-11-02 Thread Keller, Jacob E
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Toshiaki Makita > Sent: Thursday, November 02, 2017 2:23 AM > To: Keller, Jacob E ; netdev@vger.kernel.org > Cc: vyase...@redhat.com; Malek, Patryk > Subject: Re: removing bridge

Re: [PATCH] netfilter: ipvs: Convert timers to use timer_setup()

2017-11-02 Thread Kees Cook
On Thu, Nov 2, 2017 at 7:42 AM, Simon Horman wrote: > On Tue, Oct 24, 2017 at 10:07:03PM +0300, Julian Anastasov wrote: >> >> Hello, >> >> On Tue, 24 Oct 2017, Kees Cook wrote: >> >> > In preparation for unconditionally passing the struct timer_list pointer to >> > all timer callbacks, switc

Re: [PATCH][net-next] net: sched: cls_bpf: use bitwise & rather than logical && on gen_flags

2017-11-02 Thread Daniel Borkmann
On 11/02/2017 09:04 PM, Colin King wrote: From: Colin Ian King Currently gen_flags is being operated on by a logical && operator rather than a bitwise & operator. This looks incorrect as these should be bit flag operations. Fix this. Detected by CoverityScan, CID#1460305 ("Logical vs. bitwise

Re: [PATCH net-next v2] bpf: fix verifier NULL pointer dereference

2017-11-02 Thread Daniel Borkmann
On 11/02/2017 04:18 PM, Craig Gallek wrote: From: Craig Gallek do_check() can fail early without allocating env->cur_state under memory pressure. Syzkaller found the stack below on the linux-next tree because of this. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL

Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET

2017-11-02 Thread Daniel Borkmann
On 11/02/2017 12:05 PM, Arnd Bergmann wrote: I ran into this link error with the latest net-next plus linux-next trees when networking is disabled: kernel/bpf/verifier.o:(.rodata+0x2958): undefined reference to `tc_cls_act_analyzer_ops' kernel/bpf/verifier.o:(.rodata+0x2970): undefined referenc

Re: [PATCH 2/2] [net-next] bpf: fix out-of-bounds access warning in bpf_check

2017-11-02 Thread Daniel Borkmann
On 11/02/2017 12:05 PM, Arnd Bergmann wrote: The bpf_verifer_ops array is generated dynamically and may be empty depending on configuration, which then causes an out of bounds access: kernel/bpf/verifier.c: In function 'bpf_check': kernel/bpf/verifier.c:4320:29: error: array subscript is above a

Re: [RFC PATCH] xfrm: fix regression introduced by xdst pcpu cache

2017-11-02 Thread Paul Moore
On Thu, Nov 2, 2017 at 8:58 AM, Stephen Smalley wrote: > On Wed, 2017-11-01 at 17:39 -0400, Paul Moore wrote: >> On Tue, Oct 31, 2017 at 7:08 PM, Florian Westphal >> wrote: >> > Paul Moore wrote: >> > > On Mon, Oct 30, 2017 at 10:58 AM, Stephen Smalley > > > gov> wrote: >> > > > matching before

Re: [PATCH net] add support of IFF_XMIT_DST_RELEASE bit in vlan

2017-11-02 Thread Vadim Fedorenko
On 02.11.2017 19:25, Eric Dumazet wrote: On Thu, 2017-11-02 at 17:47 +0300, Vadim Fedorenko wrote: On Thu, 2017-11-02 at 07:33 -7000, Eric Dumazet wrote: On Thu, 2017-11-02 at 15:49 +0300, Vadim Fedorenko wrote: Some time ago Eric Dumazet suggested a "hack the IFF_XMIT_DST_RELEASE flag on th

Re: [PATCH net-next 1/1] net sched qdisc: pass netlink message flags in event notification

2017-11-02 Thread Roman Mashak
Cong Wang writes: > On Mon, Oct 30, 2017 at 2:17 PM, Roman Mashak wrote: >> Cong Wang writes: >> >>> On Mon, Oct 30, 2017 at 11:07 AM, Roman Mashak wrote: Cong Wang writes: > On Sat, Oct 28, 2017 at 8:36 PM, Roman Mashak wrote: >> Cong Wang writes: > > Hmm, I thoug

Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread David Daney
On 11/02/2017 12:13 PM, Florian Fainelli wrote: On 11/01/2017 05:36 PM, David Daney wrote: From: Carlos Munoz The Cavium OCTEON cn78xx and cn73xx SoCs have network packet I/O hardware that is significantly different from previous generations of the family. Add a new driver for this hardware.

Re: [PATCH ipsec] xfrm: do unconditional template resolution before pcpu cache check

2017-11-02 Thread Paul Moore
On Thu, Nov 2, 2017 at 11:46 AM, Florian Westphal wrote: > Stephen Smalley says: > Since 4.14-rc1, the selinux-testsuite has been encountering sporadic > failures during testing of labeled IPSEC. git bisect pointed to > commit ec30d ("xfrm: add xdst pcpu cache"). > The xdst pcpu cache is only

[PATCH net v2] net: systemport: Correct IPG length settings

2017-11-02 Thread Florian Fainelli
Due to a documentation mistake, the IPG length was set to 0x12 while it should have been 12 (decimal). This would affect short packet (64B typically) performance since the IPG was bigger than necessary. Fixes: 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian

Re: [PATCH 1/2] bpf: add a bpf_override_function helper

2017-11-02 Thread Daniel Borkmann
Hi Josef, one more issue I just noticed, see comment below: On 11/02/2017 03:37 PM, Josef Bacik wrote: [...] diff --git a/include/linux/filter.h b/include/linux/filter.h index cdd78a7beaae..dfa44fd74bae 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -458,7 +458,8 @@ struct

[PATCH] mISDN: hfcpci: Convert timers to use timer_setup()

2017-11-02 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Karsten Keil Cc: "David S. Miller" Cc: Arvind Yadav Cc: Geliang Tang Cc: netdev@vger.kernel.org Sign

[PATCH] Net: netfilter: Moved vmalloc call to kmalloc call

2017-11-02 Thread Charlie Sale
Fixed FIXME comment in code my changing a vmalloc call to a kmalloc call. Thought it would be a good place to start for a first patch. Signed-off-by: Charlie Sale --- net/netfilter/xt_hashlimit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/netfilter/xt_hashlimi

[jkirsher/next-queue PATCH 0/5] macvlan offload fixes

2017-11-02 Thread Alexander Duyck
I'm looking at performing a refactor of the macvlan offload code. However before I started I wanted to at least get things into a running state. The patches in this set are needed to address a number of issues that were preventing things from working as they were supposed to. With these changes in

[jkirsher/next-queue PATCH 2/5] fm10k: Fix VLAN configuration for macvlan offload

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck The fm10k driver didn't work correctly when macvlan offload was enabled. Specifically what would occur is that we would see no unicast packets being received. This was traced down to us not correctly configuring the default VLAN ID for the port and defaulting to 0. To corre

[jkirsher/next-queue PATCH 1/5] ixgbe: Fix interaction between SR-IOV and macvlan offload

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck When SR-IOV was enabled the macvlan offload was configuring several filters with the wrong pool value. This would result in the macvlan interfaces not being able to receive traffic that had to pass over the physical interface. To fix it wrap the pool argument in the VMDQ_P

[jkirsher/next-queue PATCH 3/5] ixgbe: Fix handling of macvlan Tx offload

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck This update makes it so that we report the actual number of Tx queues via real_num_tx_queues but are still restricted to RSS on only the first pool by setting num_tc equal to 1. Doing this locks us into only having the ability to setup XPS on the queues in that pool, and onl

Re: Oops with HTB on net-next

2017-11-02 Thread Dave Taht
On Thu, Nov 2, 2017 at 11:09 AM, Cong Wang wrote: > On Wed, Nov 1, 2017 at 1:17 PM, Dave Taht wrote: >> >> That is not in net-next, and the "net" version of that one patch does >> not apply to net-next. The relevant thread says "... another fun merge >> into net-next". >> >> Please let me know wh

[jkirsher/next-queue PATCH 5/5] dev: Cap number of queues even with accel_priv

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck With the recent fix to ixgbe we can cap the number of queues always regardless of if accel_priv is being used or not since the actual number of queues are being reported via real_num_tx_queues. Signed-off-by: Alexander Duyck --- net/core/dev.c |3 +-- 1 file changed,

[jkirsher/next-queue PATCH 4/5] dev: Clean-up __skb_tx_hash to match up with traffic class based configs

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck This patch is mostly just a minor clean-up so that we avoid letting a packet jump from one traffic class to another just based on the Rx queue. Instead we now use that queue number as an offset within the traffic class. Handling it this way allows us to operate more cleanly

Re: [PATCH] Net: netfilter: Moved vmalloc call to kmalloc call

2017-11-02 Thread Florian Westphal
Charlie Sale wrote: > Fixed FIXME comment in code my changing a vmalloc call > to a kmalloc call. Thought it would be a good place to > start for a first patch. Please at least compile test your patches. > - /* FIXME: don't use vmalloc() here or anywhere else -HW */ > - hinfo = vmalloc(s

Re: Oops with HTB on net-next

2017-11-02 Thread Cong Wang
On Thu, Nov 2, 2017 at 4:34 PM, Dave Taht wrote: > On Thu, Nov 2, 2017 at 11:09 AM, Cong Wang wrote: >> On Wed, Nov 1, 2017 at 1:17 PM, Dave Taht wrote: >>> >>> That is not in net-next, and the "net" version of that one patch does >>> not apply to net-next. The relevant thread says "... another

[Patch net-next] net_sched: check NULL in tcf_block_put()

2017-11-02 Thread Cong Wang
Callers of tcf_block_put() could pass NULL so we can't use block->q before checking if block is NULL or not. tcf_block_put_ext() callers are fine, it is always non-NULL. Fixes: 8c4083b30e56 ("net: sched: add block bind/unbind notif. and extended block_get/put") Reported-by: Dave Taht Cc: Jiri P

[PATCH resend 1/2] capability: introduce sysctl for controlled user-ns capability whitelist

2017-11-02 Thread Mahesh Bandewar
From: Mahesh Bandewar Add a sysctl variable kernel.controlled_userns_caps_whitelist. This takes input as capability mask expressed as two comma separated hex u32 words. The mask, however, is stored in kernel as kernel_cap_t type. Any capabilities that are not part of this mask will be controlled

  1   2   3   4   >