[PATCH net-next] cxgb4: collect vpd info directly from hardware

2017-11-09 Thread Rahul Lakkireddy
Collect vpd information directly from hardware instead of software adapter context. Move EEPROM physical address to virtual address translation logic to t4_hw.c and update relevant files. Fixes: 6f92a6544f1a ("cxgb4: collect hardware misc dumps") Signed-off-by: Rahul Lakkireddy Signed-off-by: Gan

Re: [PATCH iproute2 2/2] devlink: add batch command support

2017-11-09 Thread Ivan Vecera
On 10.11.2017 07:57, Leon Romanovsky wrote: > On Fri, Nov 10, 2017 at 07:20:14AM +0100, Ivan Vecera wrote: >> The patch adds support to batch devlink commands. >> >> Cc: Jiri Pirko >> Cc: Arkadi Sharshevsky >> Signed-off-by: Ivan Vecera >> --- >> devlink/devlink.c | 70 >>

Re: [PATCH iproute2 2/2] devlink: add batch command support

2017-11-09 Thread Leon Romanovsky
On Fri, Nov 10, 2017 at 07:20:14AM +0100, Ivan Vecera wrote: > The patch adds support to batch devlink commands. > > Cc: Jiri Pirko > Cc: Arkadi Sharshevsky > Signed-off-by: Ivan Vecera > --- > devlink/devlink.c | 70 > +++--- > man/man8/devlink

Re: [net 3/6] net/mlx5: FPGA, return -EINVAL if size is zero

2017-11-09 Thread Saeed Mahameed
On Fri, 2017-11-10 at 15:23 +0900, Or Gerlitz wrote: > On Fri, Nov 10, 2017 at 3:13 PM, Saeed Mahameed > wrote: > > On Thu, 2017-11-09 at 18:12 +0900, Or Gerlitz wrote: > > > On Thu, Nov 9, 2017 at 4:43 PM, Kamal Heib > > > wrote: > > > > On Wed, 2017-11-08 at 23:13 +0900, Or Gerlitz wrote: > > >

Re: [net 3/6] net/mlx5: FPGA, return -EINVAL if size is zero

2017-11-09 Thread Or Gerlitz
On Fri, Nov 10, 2017 at 3:13 PM, Saeed Mahameed wrote: > On Thu, 2017-11-09 at 18:12 +0900, Or Gerlitz wrote: >> On Thu, Nov 9, 2017 at 4:43 PM, Kamal Heib >> wrote: >> > On Wed, 2017-11-08 at 23:13 +0900, Or Gerlitz wrote: >> > > On Wed, Nov 8, 2017 at 4:21 PM, Saeed Mahameed > > > om> >> > > wr

Re: [PATCH 30/31] dt-bindings: nds32 CPU Bindings

2017-11-09 Thread Greentime Hu
2017-11-09 21:57 GMT+08:00 Rob Herring : > On Thu, Nov 9, 2017 at 3:39 AM, Greentime Hu wrote: >> 2017-11-08 21:18 GMT+08:00 Rob Herring : >>> Please Cc the DT list on bindings. >> >> Sorry. I am not sure what you mean. >> Do you mean add devicet...@vger.kernel.org to cc list? > > Yes. Use get_mai

[PATCH iproute2 0/2] add batch command support to devlink

2017-11-09 Thread Ivan Vecera
This patch series adds support for devlink commands batching. The first just removes a requirement to have declared 'resolve_hosts' variable in any command that use any function implemented in utils.c (it is really confusing to see this declaration in utils like bridge or devlink). Ivan Vecera (2)

[PATCH iproute2 1/2] lib: make resolve_hosts variable common

2017-11-09 Thread Ivan Vecera
Any iproute utility that uses any function from lib/utils.c needs to declare its own resolve_hosts variable instance although it does not need/use hostname resolving functionality (currently only 'ip' and 'ss' commands uses this). The patch declares single common instance of resolve_hosts directly

[PATCH iproute2 2/2] devlink: add batch command support

2017-11-09 Thread Ivan Vecera
The patch adds support to batch devlink commands. Cc: Jiri Pirko Cc: Arkadi Sharshevsky Signed-off-by: Ivan Vecera --- devlink/devlink.c | 70 +++--- man/man8/devlink.8 | 16 + 2 files changed, 78 insertions(+), 8 deletions(-) diff

Re: [net 3/6] net/mlx5: FPGA, return -EINVAL if size is zero

2017-11-09 Thread Saeed Mahameed
On Thu, 2017-11-09 at 18:12 +0900, Or Gerlitz wrote: > On Thu, Nov 9, 2017 at 4:43 PM, Kamal Heib > wrote: > > On Wed, 2017-11-08 at 23:13 +0900, Or Gerlitz wrote: > > > On Wed, Nov 8, 2017 at 4:21 PM, Saeed Mahameed > > om> > > > wrote: > > > > From: Kamal Heib > > > > > > > > In the current c

Re: [PATCH net-next] sfc: don't warn on successful change of MAC

2017-11-09 Thread David Miller
From: Bert Kenward Date: Tue, 7 Nov 2017 17:30:30 + > From: Robert Stonehouse > > Fixes: 535a61777f44e ("sfc: suppress handled MCDI failures when changing the > MAC address") > Signed-off-by: Bert Kenward Applied, thank you.

Re: regression: UFO removal breaks kvm live migration

2017-11-09 Thread David Miller
From: Willem de Bruijn Date: Fri, 10 Nov 2017 14:32:29 +0900 > Okay, I will send a patch to reinstate UFO for this use case (only). Thank you.

Re: [RFD] Managed interrupt affinities [ Was: mlx5 broken affinity ]

2017-11-09 Thread Saeed Mahameed
On Thu, 2017-11-09 at 22:42 +0100, Thomas Gleixner wrote: > Find below a summary of the technical details, implications and > options > > What can be done for 4.14? > > We basically have two options: Revert at the driver level or ship > as > is. > I think we all came to the consensus that t

Re: [PATCH net] rds: ib: Fix NULL pointer dereference in debug code

2017-11-09 Thread David Miller
From: Håkon Bugge Date: Tue, 7 Nov 2017 16:33:34 +0100 > rds_ib_recv_refill() is a function that refills an IB receive > queue. It can be called from both the CQE handler (tasklet) and a > worker thread. > > Just after the call to ib_post_recv(), a debug message is printed with > rdsdebug(): >

Re: [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments

2017-11-09 Thread David Miller
From: Manish Kurup Date: Tue, 7 Nov 2017 08:50:00 -0500 > This commit consists of 3 patches: > > patch1 (1/3): > The VLAN action maintains one set of stats across all cores, and uses a > spinlock to synchronize updates to it from the same. Changed this to use a > per-CPU stats context instead.

Re: [PATCH net-next 0/2] ip_gre: add support for i/o_flags update

2017-11-09 Thread David Miller
From: Xin Long Date: Tue, 7 Nov 2017 16:33:07 +0800 > ip_gre is using as many ip_tunnel apis as possible, newlink works > fine as gre would do it's own part in .ndo_init. But when changing > link, ip_tunnel_changelink doesn't even update i/o_flags, and also > the update of these flags would caus

Re: [PATCH net-next 0/2] net: Namespace-ify sysctl_tcp_rmem and sysctl_tcp_wmem

2017-11-09 Thread David Miller
From: Eric Dumazet Date: Tue, 7 Nov 2017 00:29:26 -0800 > We need to get per netns sysctl for sysctl_[proto]_rmem and > sysctl_[proto]_wmem > > This patch series adds the basic infrastructure allowing per proto > conversion, and takes care of TCP. Series applied, thanks Eric.

[PATCHv2 0/2] capability controlled user-namespaces

2017-11-09 Thread Mahesh Bandewar
From: Mahesh Bandewar TL;DR version - Creating a sandbox environment with namespaces is challenging considering what these sandboxed processes can engage into. e.g. CVE-2017-6074, CVE-2017-7184, CVE-2017-7308 etc. just to name few. Current form of user-namespaces, however, if changed

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

2017-11-09 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

[PATCHv2 2/2] userns: control capabilities of some user namespaces

2017-11-09 Thread Mahesh Bandewar
From: Mahesh Bandewar With this new notion of "controlled" user-namespaces, the controlled user-namespaces are marked at the time of their creation while the capabilities of processes that belong to them are controlled using the global mask. Init-user-ns is always uncontrolled and a process that

Re: regression: UFO removal breaks kvm live migration

2017-11-09 Thread Willem de Bruijn
On Wed, Nov 8, 2017 at 9:53 PM, Jason Wang wrote: > > > On 2017年11月08日 20:32, David Miller wrote: >> >> From: Jason Wang >> Date: Wed, 8 Nov 2017 17:25:48 +0900 >> >>> On 2017年11月08日 17:08, Willem de Bruijn wrote: That won't help in the short term. I'm still reading up to see if th

Re: [PATCH] net: dsa: Don't add vlans when vlan filtering is disabled

2017-11-09 Thread David Miller
From: Andrew Lunn Date: Tue, 7 Nov 2017 00:04:24 +0100 > The software bridge can be build with vlan filtering support > included. However, by default it is turned off. In its turned off > state, it still passes VLANs via switchev, even though they are not to > be used. Don't pass these VLANs to

Re: [kernel-hardening] Re: [PATCH resend 2/2] userns: control capabilities of some user namespaces

2017-11-09 Thread महेश बंडेवार
On Fri, Nov 10, 2017 at 1:46 PM, Serge E. Hallyn wrote: > Quoting Eric W. Biederman (ebied...@xmission.com): >> single sandbox. I am not at all certain that the capabilities is the >> proper place to limit code reachability. > > Right, I keep having this gut feeling that there is another way we >

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

2017-11-09 Thread महेश बंडेवार
On Fri, Nov 10, 2017 at 1:30 PM, Serge E. Hallyn wrote: > Quoting Mahesh Bandewar (महेश बंडेवार) (mahe...@google.com): > ... >> >> >> >> == >> >> >> >> +controlled_userns_caps_whitelist >> >> + >> >> +Capability mask that is whitelisted

Re: [PATCH] tcp: Export to userspace the TCP state names for the trace events

2017-11-09 Thread Yafang Shao
2017-11-10 8:57 GMT+08:00 Steven Rostedt : > > From: "Steven Rostedt (VMware)" > > The TCP trace events (specifically tcp_set_state), maps emums to symbol > names via __print_symbolic(). But this only works for reading trace events > from the tracefs trace files. If perf or trace-cmd were to recor

Re: [pull request][net-next 0/8] Mellanox, mlx5 updates 2017-11-09

2017-11-09 Thread David Miller
From: Saeed Mahameed Date: Thu, 9 Nov 2017 14:15:45 +0900 > This series introduces vlan offloads related improvements for mlx5 > ethernet netdev driver Plus some trivial refactoring patches needed by > this series, from Gal Pressman. > > For more information please see tag log below. > > Pleas

Re: [kernel-hardening] Re: [PATCH resend 2/2] userns: control capabilities of some user namespaces

2017-11-09 Thread Serge E. Hallyn
Quoting Eric W. Biederman (ebied...@xmission.com): > single sandbox. I am not at all certain that the capabilities is the > proper place to limit code reachability. Right, I keep having this gut feeling that there is another way we should be doing that. Maybe based on ksplice or perf, or maybe m

Re: [PATCH v4 net-next 0/6] IGMP snooping for local traffic

2017-11-09 Thread David Miller
From: Andrew Lunn Date: Thu, 9 Nov 2017 23:10:56 +0100 > The linux bridge supports IGMP snooping. It will listen to IGMP > reports on bridge ports and keep track of which groups have been > joined on an interface. It will then forward multicast based on this > group membership. > > When the bri

Re: [PATCH net-next 3/4] net: phy: sfp: Separate enumerations and states

2017-11-09 Thread Florian Fainelli
On 11/08/2017 12:58 AM, Russell King - ARM Linux wrote: > On Tue, Nov 07, 2017 at 07:49:10PM -0800, Florian Fainelli wrote: >> Create separate enumerations for the SFP physical state (computed from >> GPIOs), >> device state, module state, and actual state machine. This will make it >> easier >

Re: [PATCH net-next 1/4] net: phy: sfp: Do not reject soldered down modules

2017-11-09 Thread Florian Fainelli
On 11/08/2017 03:15 AM, Russell King - ARM Linux wrote: > On Tue, Nov 07, 2017 at 07:49:08PM -0800, Florian Fainelli wrote: >> The SFP module identification code in sfp_sm_mod_probe() will reject SFF >> modules soldered down because they have an identified of 0x2, while the code >> currently chec

Re: [PATCH net-next 2/4] net: phy: sfp: Use correct endian for sfp->id.ext.options

2017-11-09 Thread Florian Fainelli
On 11/08/2017 12:56 AM, Russell King - ARM Linux wrote: > On Tue, Nov 07, 2017 at 07:49:09PM -0800, Florian Fainelli wrote: >> The extended ID options 16-bit value is big-endian (and actually annotated as >> such), but we would be accessing it with our CPU endian, which would not >> allow the cor

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

2017-11-09 Thread David Miller
From: Stephen Rothwell Date: Fri, 10 Nov 2017 10:31:00 +1100 > Hi all, > > Today's linux-next merge of the net-next tree got a conflict in: > > net/sched/cls_basic.c > net/sched/cls_u32.c > > between commits: > > 0b2a59894b76 ("cls_basic: use tcf_exts_get_net() before call_rcu()") > 3

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

2017-11-09 Thread Cong Wang
On Thu, Nov 9, 2017 at 3:31 PM, Stephen Rothwell wrote: > I fixed it up (I think - see below) and can carry the fix as necessary. > This is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for

Re: [kernel-hardening] Re: [PATCH resend 2/2] userns: control capabilities of some user namespaces

2017-11-09 Thread महेश बंडेवार
On Fri, Nov 10, 2017 at 6:58 AM, Eric W. Biederman wrote: > "Mahesh Bandewar (महेश बंडेवार)" writes: > >> [resend response as earlier one failed because of formatting issues] >> >> On Thu, Nov 9, 2017 at 12:21 PM, Serge E. Hallyn wrote: >>> >>> On Thu, Nov 09, 2017 at 09:55:41AM +0900, Mahesh Ba

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

2017-11-09 Thread Serge E. Hallyn
Quoting Mahesh Bandewar (महेश बंडेवार) (mahe...@google.com): ... > >> > >> == > >> > >> +controlled_userns_caps_whitelist > >> + > >> +Capability mask that is whitelisted for "controlled" user namespaces. > >> +Any capability that is miss

[RFC] hv_netvsc: safer orderly shutdown

2017-11-09 Thread Stephen Hemminger
Several types of control operations require that the underlying RNDIS infrastructure be restarted. This patch changes the ordering of the shutdown to avoid race conditions. Stop all transmits before doing RNDIS halt. This involves stopping the network device transmit queues, then waiting for all o

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

2017-11-09 Thread महेश बंडेवार
On Fri, Nov 10, 2017 at 2:30 AM, Serge E. Hallyn wrote: > Quoting Mahesh Bandewar (mah...@bandewar.net): >> From: Mahesh Bandewar >> >> Add a sysctl variable kernel.controlled_userns_caps_whitelist. This > > I understand the arguments in favor of whitelists in most cases for > security purposes.

RE: [Intel-wired-lan] [PATCH] i40e: remove redundant initialization of read_size

2017-11-09 Thread Brown, Aaron F
> From: Brown, Aaron F > Sent: Thursday, November 9, 2017 7:16 PM > To: 'Colin King' ; Kirsher, Jeffrey T > ; intel-wired-...@lists.osuosl.org; > netdev@vger.kernel.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kernel.org > Subject: RE: [Intel-wired-lan] [PATCH] i40e: remove redundan

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

2017-11-09 Thread महेश बंडेवार
On Fri, Nov 10, 2017 at 2:22 AM, Serge E. Hallyn wrote: > Quoting Mahesh Bandewar (mah...@bandewar.net): >> 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

RE: [Intel-wired-lan] [PATCH] i40e: remove redundant initialization of read_size

2017-11-09 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On Behalf > Of Colin King > Sent: Sunday, November 5, 2017 5:04 AM > To: Kirsher, Jeffrey T ; intel-wired- > l...@lists.osuosl.org; netdev@vger.kernel.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kernel.org > Subjec

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Fri, Nov 10, 2017 at 01:30:38PM +1100, Herbert Xu wrote: > > I found the problem. This crap is coming from clone_policy. Now > let me where this code came from. ---8<--- Subject: xfrm: Copy policy family in clone_policy The syzbot found an ancient bug in the IPsec code. When we cloned a so

Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl

2017-11-09 Thread Kaiwan N Billimoria
> > Yes, profiling and tracing are similar. And you need to be root to run > the recording anyway. Thus, as long as root user can read kallsyms, > trace-cmd should be fine. As trace-cmd requires root access to do any > ftrace tracing. > > -- Steve Got it, thanks..

[PATCH net-next] tcp: allow drivers to tweak TSQ logic

2017-11-09 Thread Eric Dumazet
From: Eric Dumazet I had many reports that TSQ logic breaks wifi aggregation. Current logic is to allow up to 1 ms of bytes to be queued into qdisc and drivers queues. But Wifi aggregation needs a bigger budget to allow bigger rates to be discovered by various TCP Congestion Controls algorithms

Re: rsi: rsi_91x_ps: remove redundant code in str_psstate

2017-11-09 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > "INVALID_STATE" is already being returned in the default case and this > code cannot be reached. > > Addresses-Coverity-ID: 1398384 > Signed-off-by: Gustavo A. R. Silva Patch applied to wireless-drivers-next.git, thanks. 4775ae7afec6 rsi: rsi_91x_ps: remove redu

Re: rt2x00: use monotonic timestamps for frame dump

2017-11-09 Thread Kalle Valo
Arnd Bergmann wrote: > rt2x00 uses the deprecated do_gettimeofday() function to get a timestamp > for its debugfs "dump" file interface. > > The timestamp is using an unsigned 32-bit value, so we could make it > work until 2106 by using ktime_get_real_ts64(), but it seems better to > use monoton

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Fri, Nov 10, 2017 at 01:11:45PM +1100, Herbert Xu wrote: > > Oh and this is an important clue. We have two policies with > identical index values. The index value is meant to be unique > so clearly something funny is going on. I found the problem. This crap is coming from clone_policy. Now

Re: [PATCH 0/4] make function arg and structures as const

2017-11-09 Thread J. Bruce Fields
On Tue, Oct 17, 2017 at 12:40:27PM -0400, Jeff Layton wrote: > On Tue, 2017-10-17 at 18:14 +0200, Bhumika Goyal wrote: > > Make the function argument as const. After thing change, make > > the cache_detail structures as const. > > > > Bhumika Goyal (4): > > sunrpc: make the function arg as const

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Fri, Nov 10, 2017 at 01:04:59PM +1100, Herbert Xu wrote: > > By castrating the reproducer to not perform a pfkey dump I have > captured the corrupted policy via xfrm: > > src ???/0 dst ???/0 uid 0 > socket in action allow index 2083 priority 0 ptype main share any > flag (0x)

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Thu, Nov 09, 2017 at 10:38:57PM +1100, Herbert Xu wrote: > > The xfrm code path is meant to forbid the creation of such a policy. > I don't currently see how this is bypassing that check. But > clearly it has found a way through the check since it's crashing. By castrating the reproducer to n

Re: [PATCH v4 net-next 0/6] IGMP snooping for local traffic

2017-11-09 Thread Nikolay Aleksandrov
On 10.11.2017 00:10, Andrew Lunn wrote: > The linux bridge supports IGMP snooping. It will listen to IGMP > reports on bridge ports and keep track of which groups have been > joined on an interface. It will then forward multicast based on this > group membership. > > When the bridge adds or remove

Re: [PATCH net-next v2 02/15] bpf: offload: add infrastructure for loading programs for a specific netdev

2017-11-09 Thread Jakub Kicinski
Hi! Sorry for the delay! On Mon, 06 Nov 2017 18:32:45 +0100, Daniel Borkmann wrote: > On 11/03/2017 09:56 PM, Jakub Kicinski wrote: > > @@ -1549,6 +1555,8 @@ static void bpf_prog_free_deferred(struct work_struct > > *work) > > struct bpf_prog_aux *aux; > > > > aux = container_of(work, st

Re: [PATCH resend 2/2] userns: control capabilities of some user namespaces

2017-11-09 Thread महेश बंडेवार
On Fri, Nov 10, 2017 at 2:25 AM, Serge E. Hallyn wrote: > Quoting Mahesh Bandewar (mah...@bandewar.net): >> From: Mahesh Bandewar >> >> With this new notion of "controlled" user-namespaces, the controlled >> user-namespaces are marked at the time of their creation while the >> capabilities of pro

Re: [Patch net] vlan: fix a use-after-free in vlan_device_event()

2017-11-09 Thread Girish Moodalbail
On 11/9/17 4:43 PM, Cong Wang wrote: After refcnt reaches zero, vlan_vid_del() could free dev->vlan_info via RCU: RCU_INIT_POINTER(dev->vlan_info, NULL); call_rcu(&vlan_info->rcu, vlan_info_rcu_free); However, the pointer 'grp' still points to that memory since it is set before

Re: [PATCH] tcp: Export to userspace the TCP state names for the trace events

2017-11-09 Thread Song Liu
> On Nov 9, 2017, at 4:57 PM, Steven Rostedt wrote: > > > From: "Steven Rostedt (VMware)" > > The TCP trace events (specifically tcp_set_state), maps emums to symbol > names via __print_symbolic(). But this only works for reading trace events > from the tracefs trace files. If perf or trace-c

[PATCH net-next] tcp: Namespace-ify sysctl_tcp_default_congestion_control

2017-11-09 Thread Stephen Hemminger
Make default TCP default congestion control to a per namespace value. The congestion control setting of new namespaces is inherited from the root namespace. Modules are only autoloaded in the root namespace. Signed-off-by: Stephen Hemminger --- include/net/netns/ipv4.h | 1 + include/net/tcp.

Re: [PATCH net-next 1/3] net: bgmac: Pad packets to a minimum size

2017-11-09 Thread Florian Fainelli
On 11/09/2017 05:06 PM, Andrew Lunn wrote: > On Thu, Nov 09, 2017 at 03:03:16PM -0800, Florian Fainelli wrote: >> On 11/09/2017 02:37 PM, Andrew Lunn wrote: >>> On Thu, Nov 09, 2017 at 02:26:04PM -0800, Florian Fainelli wrote: In preparation for enabling Broadcom tags with b53, pad packets to

Per-CPU Queueing for QoS

2017-11-09 Thread Michael Ma
Currently txq/qdisc selection is based on flow hash so packets from the same flow will follow the order when they enter qdisc/txq, which avoids out-of-order problem. To improve the concurrency of QoS algorithm we plan to have multiple per-cpu queues for a single TC class and do busy polling from a

Re: [PATCH net-next 1/3] net: bgmac: Pad packets to a minimum size

2017-11-09 Thread Andrew Lunn
On Thu, Nov 09, 2017 at 03:03:16PM -0800, Florian Fainelli wrote: > On 11/09/2017 02:37 PM, Andrew Lunn wrote: > > On Thu, Nov 09, 2017 at 02:26:04PM -0800, Florian Fainelli wrote: > >> In preparation for enabling Broadcom tags with b53, pad packets to a > >> minimum size of 64 bytes (sans FCS) in

[PATCH] tcp: Export to userspace the TCP state names for the trace events

2017-11-09 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" The TCP trace events (specifically tcp_set_state), maps emums to symbol names via __print_symbolic(). But this only works for reading trace events from the tracefs trace files. If perf or trace-cmd were to record these events, the event format file does not conver

Re: [PATCH] ipvlan: fix ipv6 outbound device

2017-11-09 Thread liuqifa
That's a good question. Recently, I am researching how to use ipvlan, I found when using L3 mode, the packet from the ipvlan slave interface can only get out from the phy device which the slave interface attached, and I found this is assigning the flowi4's output device result, so I tried to don

Re: [PATCH net-next] bpf: add support for SO_PRIORITY in bpf_getsockopt

2017-11-09 Thread Alexei Starovoitov
On 11/10/17 8:04 AM, Vlad Dumitrescu wrote: From: Vlad Dumitrescu Allows BPF_PROG_TYPE_SOCK_OPS programs to read sk_priority. Signed-off-by: Vlad Dumitrescu --- net/core/filter.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/net/core/filter.c b/net/cor

Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-09 Thread Steven Rostedt
On Thu, 9 Nov 2017 23:40:13 + Song Liu wrote: > > tcp_set_state uses __print_symbolic to show state in text format. I found > > trace-cmd cannot parse that part: > > > > [011] 147338.660560: tcp_set_state:sport=16262 dport=48346 \ > >saddr=127.0.0.6 daddr=127.0.0.6 saddrv6=2401:d

[Patch net] vlan: fix a use-after-free in vlan_device_event()

2017-11-09 Thread Cong Wang
After refcnt reaches zero, vlan_vid_del() could free dev->vlan_info via RCU: RCU_INIT_POINTER(dev->vlan_info, NULL); call_rcu(&vlan_info->rcu, vlan_info_rcu_free); However, the pointer 'grp' still points to that memory since it is set before vlan_vid_del(): vlan_info = rt

Re: [vlan_device_event] BUG: unable to handle kernel paging request at 6b6b6ccf

2017-11-09 Thread Cong Wang
On Thu, Nov 9, 2017 at 7:51 AM, Girish Moodalbail wrote: > > Upon receiving NETDEV_DOWN event, we are calling > > vlan_vid_del(dev, htons(ETH_P_8021Q), 0); > > which in turn calls call_rcu() to queue vlan_info_free_rcu() to be called at > some point. This free function frees the array[] >

Re: [Patch net 05/13] cls_cgroup: use tcf_exts_get_net() before call_rcu()

2017-11-09 Thread Cong Wang
On Thu, Nov 9, 2017 at 2:31 PM, Roman Mashak wrote: > Cong Wang writes: >> @@ -124,8 +130,10 @@ static int cls_cgroup_change(struct net *net, struct >> sk_buff *in_skb, >> goto errout; >> >> rcu_assign_pointer(tp->root, new); >> - if (head) >> + if (head) { >> +

Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-09 Thread Song Liu
> On Nov 9, 2017, at 10:34 AM, Song Liu wrote: > >> >> On Nov 9, 2017, at 10:18 AM, Steven Rostedt wrote: >> >> On Thu, 9 Nov 2017 15:43:29 +0900 >> Alexei Starovoitov wrote: >> +TRACE_EVENT(tcp_set_state, + TP_PROTO(struct sock *sk, int oldstate, int newstate), + TP_ARGS(s

[PATCH v2 0/6] wl1251: Fix MAC address for Nokia N900

2017-11-09 Thread Pali Rohár
This patch series fix processing MAC address for wl1251 chip found in Nokia N900. Changes since v1: * Added Acked-by for Pavel Machek * Fixed grammar * Magic numbers for NVS offsets are replaced by defines * Check for validity of mac address NVS data is moved into function * Changed order of patc

[PATCH v2 2/6] wl1251: Generate random MAC address only if driver does not have valid

2017-11-09 Thread Pali Rohár
Before this patch, driver generated random MAC address every time it was initialized. After that random MAC address could be overwritten with fixed one, if provided. This patch changes order. First it tries to read fixed MAC address and if it fails then driver generates random MAC address. Signed

[PATCH v2 1/6] wl1251: Update wl->nvs_len after wl->nvs is valid

2017-11-09 Thread Pali Rohár
If kmemdup fails, then wl->nvs_len will contain invalid non-zero size. Signed-off-by: Pali Rohár Acked-by: Pavel Machek --- drivers/net/wireless/ti/wl1251/main.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wire

[PATCH v2 5/6] firmware: Add request_firmware_prefer_user() function

2017-11-09 Thread Pali Rohár
This function works pretty much like request_firmware(), but it prefer usermode helper. If usermode helper fails then it fallback to direct access. Useful for dynamic or model specific firmware data. Signed-off-by: Pali Rohár --- drivers/base/firmware_class.c | 45 +

[PATCH v2 4/6] wl1251: Set generated MAC address back to NVS data

2017-11-09 Thread Pali Rohár
In case there is no valid MAC address kernel generates random one. This patch propagate this generated MAC address back to NVS data which will be uploaded to wl1251 chip. So HW would have same MAC address as linux kernel uses. This should not change any functionality, but it is better to tell wl12

[PATCH v2 3/6] wl1251: Parse and use MAC address from supplied NVS data

2017-11-09 Thread Pali Rohár
This patch implements parsing MAC address from NVS data which are sent to wl1251 chip. Calibration NVS data could contain valid MAC address and it will be used instead of randomly generated one. This patch also moves code for requesting NVS data from userspace to driver initialization code to make

[PATCH v2 6/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data

2017-11-09 Thread Pali Rohár
NVS calibration data for wl1251 are model specific. Every one device with wl1251 chip has different and calibrated in factory. Not all wl1251 chips have own EEPROM where are calibration data stored. And in that case there is no "standard" place. Every device has stored them on different place (som

[PATCH net-next] net: dsa: mv88e6xxx: Fix stats histogram mode

2017-11-09 Thread Andrew Lunn
The statistics histogram mode was not being explicitly initialized on devices other than the 6390 family. Clearing the statistics then overwrote the default setting, setting the histogram to a reserved mode. Explicitly set the histogram mode for all devices. Change the statistics clear into a read

linux-next: manual merge of the net-next tree with Linus' tree

2017-11-09 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/sched/cls_basic.c net/sched/cls_u32.c between commits: 0b2a59894b76 ("cls_basic: use tcf_exts_get_net() before call_rcu()") 35c55fc156d8 ("cls_u32: use tcf_exts_get_net() before call_rcu()") from Linus' tree a

[PATCH net-next] bpf: add support for SO_PRIORITY in bpf_getsockopt

2017-11-09 Thread Vlad Dumitrescu
From: Vlad Dumitrescu Allows BPF_PROG_TYPE_SOCK_OPS programs to read sk_priority. Signed-off-by: Vlad Dumitrescu --- net/core/filter.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/net/core/filter.c b/net/core/filter.c index 1afa17935954..61c791f9f628 10

Re: [PATCH net-next 1/3] net: bgmac: Pad packets to a minimum size

2017-11-09 Thread Florian Fainelli
On 11/09/2017 02:37 PM, Andrew Lunn wrote: > On Thu, Nov 09, 2017 at 02:26:04PM -0800, Florian Fainelli wrote: >> In preparation for enabling Broadcom tags with b53, pad packets to a >> minimum size of 64 bytes (sans FCS) in order for the Broadcom switch to >> accept ingressing frames. Without this

[PATCH] uprobes/x86: emulate push insns for uprobe on x86

2017-11-09 Thread Yonghong Song
Uprobe is a tracing mechanism for userspace programs. Typical uprobe will incur overhead of two traps. First trap is caused by replaced trap insn, and the second trap is to execute the original displaced insn in user space. To reduce the overhead, kernel provides hooks for architectures to emulate

Re: [PATCH net-next 1/3] net: bgmac: Pad packets to a minimum size

2017-11-09 Thread Andrew Lunn
On Thu, Nov 09, 2017 at 02:26:04PM -0800, Florian Fainelli wrote: > In preparation for enabling Broadcom tags with b53, pad packets to a > minimum size of 64 bytes (sans FCS) in order for the Broadcom switch to > accept ingressing frames. Without this, we would typically be able to > DHCP, but not

[PATCH net-next v2 2/3] net: dsa: b53: Stop using dev->cpu_port incorrectly

2017-11-09 Thread Florian Fainelli
dev->cpu_port is the driver local information that should only be used to look up register offsets for a particular port, when they differ (e.g: IMP port override), but it should certainly not be used in place of the DSA configured CPU port. Since the DSA switch layer calls port_vlan_{add,del}() o

[PATCH net-next v2 1/3] net: bgmac: Pad packets to a minimum size

2017-11-09 Thread Florian Fainelli
In preparation for enabling Broadcom tags with b53, pad packets to a minimum size of 64 bytes (sans FCS) in order for the Broadcom switch to accept ingressing frames. Without this, we would typically be able to DHCP, but not resolve with ARP because packets are too small and get rejected by the swi

[PATCH net-next v2 3/3] net: dsa: b53: Turn on Broadcom tags

2017-11-09 Thread Florian Fainelli
Enable Broadcom tags for b53 devices, except 5325 and 5365 which use a different Broadcom tag format not yet supported by net/dsa/tag_brcm.c. We also make sure that we can turn on Broadcom tags on a CPU port number that is capable of that: 5, 7 or 8. Signed-off-by: Florian Fainelli --- drivers/

[PATCH net-next v2 0/3] net: dsa: b53: Turn on Broadcom tags

2017-11-09 Thread Florian Fainelli
Hi all, This was long overdue, with this patch series, the b53 driver now turns on Broadcom tags except for 5325 and 5365 which use an older format that we do not support yet (TBD). First patch is necessary in order for bgmac, used on BCM5301X and Northstar Plus to work correctly and successfully

Re: [Patch net 05/13] cls_cgroup: use tcf_exts_get_net() before call_rcu()

2017-11-09 Thread Roman Mashak
Cong Wang writes: [...] > static void cls_cgroup_destroy_work(struct work_struct *work) > { > struct cls_cgroup_head *head = container_of(work, > struct cls_cgroup_head, > work); >

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

2017-11-09 Thread Andrew Lunn
> + if (link_changed != 0) { > + struct port_status status; > + > + if (link_changed > 0) { > + netdev_info(netdev, "Link is up - %d/%s\n", > + priv->phydev->speed, > + priv->phydev->dupl

Re: [PATCH net-next 0/3] net: dsa: b53: Turn on Broadcom tags

2017-11-09 Thread Florian Fainelli
On 11/09/2017 02:26 PM, Florian Fainelli wrote: > Hi all, > > This was long overdue, with this patch series, the b53 driver now > turns on Broadcom tags except for 5325 and 5365 which use an older > format that we do not support yet (TBD). > > First patch is necessary in order for bgmac, used on

Re: [PATCH net-next 2/3] net: dsa: b53: Stop using dev->cpu_port incorrectly

2017-11-09 Thread Florian Fainelli
On 11/09/2017 02:26 PM, Florian Fainelli wrote: > dev->cpu_port is the driver local information that should only be used > to look up register offsets for a particular port, when they differ > (e.g: IMP port override), but it should certainly not be used in place > of the DSA configured CPU port. >

[PATCH net-next 2/3] net: dsa: b53: Stop using dev->cpu_port incorrectly

2017-11-09 Thread Florian Fainelli
dev->cpu_port is the driver local information that should only be used to look up register offsets for a particular port, when they differ (e.g: IMP port override), but it should certainly not be used in place of the DSA configured CPU port. Since the DSA switch layer calls port_vlan_{add,del}() o

[PATCH net-next 0/3] net: dsa: b53: Turn on Broadcom tags

2017-11-09 Thread Florian Fainelli
Hi all, This was long overdue, with this patch series, the b53 driver now turns on Broadcom tags except for 5325 and 5365 which use an older format that we do not support yet (TBD). First patch is necessary in order for bgmac, used on BCM5301X and Northstar Plus to work correctly and successfully

[PATCH net-next 3/3] net: dsa: b53: Turn on Broadcom tags

2017-11-09 Thread Florian Fainelli
Enable Broadcom tags for b53 devices, except 5325 and 5365 which use a different Broadcom tag format not yet supported by net/dsa/tag_brcm.c. We also make sure that we can turn on Broadcom tags on a CPU port number that is capable of that: 5, 7 or 8. Signed-off-by: Florian Fainelli --- drivers/

[PATCH net-next 1/3] net: bgmac: Pad packets to a minimum size

2017-11-09 Thread Florian Fainelli
In preparation for enabling Broadcom tags with b53, pad packets to a minimum size of 64 bytes (sans FCS) in order for the Broadcom switch to accept ingressing frames. Without this, we would typically be able to DHCP, but not resolve with ARP because packets are too small and get rejected by the swi

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

2017-11-09 Thread Andrew Lunn
> + priv->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0); > + priv->phy_mode = of_get_phy_mode(pdev->dev.of_node); > + /* If phy-mode absent, default to SGMII. */ > + if (priv->phy_mode < 0) > + priv->phy_mode = PHY_INTERFACE_MODE_SGMII; > + > + if (pr

Re: [PATCH net-next v2] Revert "net: dsa: constify cpu_dp member of dsa_port"

2017-11-09 Thread Vivien Didelot
Hi David, Vivien Didelot writes: > We may have to pass a port's dedicated CPU port to port-wide functions > such as dsa_port_mdb_add, e.g. when offloading bridge device's MDB. > > The DSA port-wide functions currently take a non-const struct dsa_port * > as first argument so we cannot make cpu_d

Re: [PATCH net-next] Revert "net: dsa: constify cpu_dp member of dsa_port"

2017-11-09 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > And i will add the needed const attributes to these functions as part > of the IGMP patchset. Sounds good, not need for this revert then. Thanks, Vivien

Re: [PATCH v4 net-next 5/6] net: dsa: add more const attributes

2017-11-09 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The notify mechanism does not need to modify the port it is notifying. > So make the parameter const. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot

[PATCH v4 net-next 0/6] IGMP snooping for local traffic

2017-11-09 Thread Andrew Lunn
The linux bridge supports IGMP snooping. It will listen to IGMP reports on bridge ports and keep track of which groups have been joined on an interface. It will then forward multicast based on this group membership. When the bridge adds or removed groups from an interface, it uses switchdev to req

[PATCH v4 net-next 1/6] net: bridge: Rename mglist to host_joined

2017-11-09 Thread Andrew Lunn
The boolean mglist indicates the host has joined a particular multicast group on the bridge interface. It is badly named, obscuring what is means. Rename it. Signed-off-by: Andrew Lunn Acked-by: Nikolay Aleksandrov Acked-by: Florian Fainelli --- net/bridge/br_input.c | 2 +- net/bridge/br

[PATCH v4 net-next 3/6] net: bridge: Add/del switchdev object on host join/leave

2017-11-09 Thread Andrew Lunn
When the host joins or leaves a multicast group, use switchdev to add an object to the hardware to forward traffic for the group to the host. Signed-off-by: Andrew Lunn Acked-by: Nikolay Aleksandrov --- v4: Use switch statement in br_mdb_switchdev_host_port() --- include/net/switchdev.h | 1

[PATCH v4 net-next 5/6] net: dsa: add more const attributes

2017-11-09 Thread Andrew Lunn
The notify mechanism does not need to modify the port it is notifying. So make the parameter const. Signed-off-by: Andrew Lunn --- net/dsa/dsa_priv.h | 4 ++-- net/dsa/port.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h in

[PATCH v4 net-next 6/6] net: dsa: switch: Don't add CPU port to an mdb by default

2017-11-09 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- v4: Fix unrelated white space change --- net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/switch.

  1   2   3   >