Re: sky2: Use seq_putc() in sky2_debug_show()

2017-05-08 Thread Stephen Hemminger
On Mon, 8 May 2017 19:42:46 +0200 SF Markus Elfring wrote: > > Which issue do you mean? I dont see any issue you fix here. > > Are the run time characteristics a bit nicer for the function “seq_putc” > in comparison to the function “seq_puts” for printing a

[PATCH] net: fec: select queue depending on VLAN priority

2017-05-08 Thread Stefan Agner
Since the addition of the multi queue code with commit 59d0f7465644 ("net: fec: init multi queue date structure") the queue selection has been handelt by the default transmit queue selection implementation which tries to evenly distribute the traffic across all available queues. This selection

Re: [Patch net] ipv4: restore rt->fi for reference counting

2017-05-08 Thread David Miller
From: Eric Dumazet Date: Mon, 08 May 2017 19:18:22 -0700 > Keeping fib (and their reference to netdev) is apparently too much, > we probably need to implement a refcount on the metrics themselves, > being stand alone objects. I think I see the problem, when we flush the

Re: [PATCH net] ip6_tunnel: remove unreachable ICMP_REDIRECT code

2017-05-08 Thread Hangbin Liu
2017-05-09 3:59 GMT+08:00 David Miller : > From: Hangbin Liu > Date: Mon, 8 May 2017 19:11:03 +0800 > >> After call ip6_tnl_err(), the rel_type will be ether ICMPV6_DEST_UNREACH >> or ICMPV6_PKT_TOOBIG. We will never reach ICMP_REDIRECT. So remove it.

[PATCH] net: wireless: ath: ath9k: remove unnecessary code

2017-05-08 Thread Gustavo A. R. Silva
The name of an array used by itself will always return the array's address. So this test will always evaluate as true. Addresses-Coverity-ID: 1364903 Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] net: wireless: ath: ath10k: remove unnecessary code

2017-05-08 Thread Gustavo A. R. Silva
The name of an array used by itself will always return the array's address. So these tests will always evaluate as false and therefore the _return_ will never be executed. Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/ath/ath10k/wmi.c | 9 - 1 file

[PATCH] wcn36xx: Close SMD channel on device removal

2017-05-08 Thread Bjorn Andersson
The SMD channel is not the primary WCNSS channel and must explicitly be closed as the device is removed, or the channel will already by open on a subsequent probe call in e.g. the case of reloading the kernel module. This issue was introduced because I simplified the underlying SMD implementation

Re: [PATCH 0/4] TI Bluetooth serdev support

2017-05-08 Thread Baruch Siach
Hi Rob, On Mon, May 08, 2017 at 04:12:16PM -0500, Rob Herring wrote: > On Fri, May 5, 2017 at 9:51 AM, Adam Ford wrote: > > On Sun, Apr 30, 2017 at 11:04 AM, Sebastian Reichel wrote: > >> On Sun, Apr 30, 2017 at 10:14:20AM -0500, Adam Ford wrote: > >>> On

Re: [PATCH RFC net-next 3/6] net: Introduce IFF_LWT_NETDEV flag

2017-05-08 Thread Roopa Prabhu
On Mon, May 8, 2017 at 5:57 PM, David Ahern wrote: > On 5/8/17 1:11 PM, David Miller wrote: >> From: Johannes Berg >> Date: Mon, 08 May 2017 10:55:12 +0200 >> >>> +static inline bool netif_is_lwd(struct net_device *dev) +{ + return

Re: [PATCH] net: wireless: ath: ath10k: remove unnecessary code

2017-05-08 Thread Kalle Valo
"Gustavo A. R. Silva" writes: > The name of an array used by itself will always return the array's address. > So these tests will always evaluate as false and therefore the _return_ > will never be executed. > > Signed-off-by: Gustavo A. R. Silva

[PATCH net v2 1/1] xfrm: Fix NETDEV_DOWN with IPSec offload

2017-05-08 Thread ilant
From: Ilan Tayari Upon NETDEV_DOWN event, all xfrm_state objects which are bound to the device are flushed. The condition for this is wrong, though, testing dev->hw_features instead of dev->features. If a device has non-user-modifiable NETIF_F_HW_ESP, then its xfrm_state

[PATCH net v2 0/1] xfrm: Fix NETDEV_DOWN with IPSec offload

2017-05-08 Thread ilant
From: Ilan Tayari v1 -> v2: Added Fixes tag Ilan Tayari (1): xfrm: Fix NETDEV_DOWN with IPSec offload net/xfrm/xfrm_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0

Re: [PATCH v4 net-next 08/10] net/ncsi: Support NCSI packet generation

2017-05-08 Thread Gavin Shan
On Mon, May 08, 2017 at 02:56:32AM +0200, Andrew Lunn wrote: >> I need to dig how libpcap receives packets. It's appreciated if you >> can give some hints about that. However, I don't see the benefit to >> receive packets by libpcap, could you claim? > >The base interface should already be doing

Re: [PATCH net-next ] tcp: add new parameter tcp_inherit_buffsize to control the initial buffer size for new passive connetion

2017-05-08 Thread Shan Wei
at 2017/5/5 21:52 > On Fri, 2017-05-05 at 18:22 +0800, wrote: >> >> 2017-05-02 23:05 GMT+08:00 Eric Dumazet : >> >> >> Hi Shan >> >> 1) Your patch never reached netdev, because it was sent in >> HTML format. >> >>

net_sched strange in 4.11

2017-05-08 Thread Anton Ivanov
Hi all, I was revising some of my old work for UML to prepare it for submission and I noticed that skb->xmit_more does not seem to be set any more. I traced the issue as far as net/sched/sched_generic.c try_bulk_dequeue_skb() is never invoked (the drivers I am working on are dql enabled so

Re: Network cooling device and how to control NIC speed on thermal condition

2017-05-08 Thread Waldemar Rymarkiewicz
On 28 April 2017 at 13:56, Andrew Lunn wrote: > Is that a realistic test? No traffic over the network? If you are > hitting your thermal limit, to me that means one of two things: > > 1) The device is under very heavy load, consuming a lot of power to do >what it needs to to.

Re: [RFC PATCH 0/3] udp: scalability improvements

2017-05-08 Thread Paolo Abeni
On Sat, 2017-05-06 at 16:09 -0700, Tom Herbert wrote: > On Sat, May 6, 2017 at 1:42 PM, Paolo Abeni wrote: > > This patch series implement an idea suggested by Eric Dumazet to > > reduce the contention of the udp sk_receive_queue lock when the socket is > > under flood. > > >

[PATCH net] xfrm: Fix NETDEV_DOWN with IPSec offload

2017-05-08 Thread ilant
From: Ilan Tayari Upon NETDEV_DOWN event, all xfrm_state objects which are bound to the device are flushed. The condition for this is wrong, though, testing dev->hw_features instead of dev->features. If a device has non-user-modifiable NETIF_F_HW_ESP, then its xfrm_state

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Andy Shevchenko
e to handle kernel NULL pointer dereference at (null) [ 143.006193] IP: stmmac_xmit+0xf1/0x1080 [ 143.010168] *pde = [ 143.010177] [ 143.014762] Oops: 0002 [#1] [ 143.017672] Modules linked in: at24 nvmem_core pwm_pca9685 [ 143.023338] CPU: 0 PID: 0 Comm: swapper Not tainted 4.11.0-next-20170

[PATCH] ipvs: SNAT packet replies only for NATed connections

2017-05-08 Thread Simon Horman
From: Julian Anastasov We do not check if packet from real server is for NAT connection before performing SNAT. This causes problems for setups that use DR/TUN and allow local clients to access the real server directly, for example: - local client in director creates IPVS-DR/TUN

[GIT PULL 0/1] IPVS Fixes for v4.12

2017-05-08 Thread Simon Horman
Hi Pablo, please consider this fix to IPVS for v4.12. * It is a fix from Julian Anastasov to only SNAT SNAT packet replies only for NATed connections My understanding is that this fix is appropriate for 4.9.25, 4.10.13, 4.11 as well as the nf tree. Julian has separately posted backports for

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Joao Pinto
- flow control off > [ 142.988756] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready > [ 142.998810] BUG: unable to handle kernel NULL pointer dereference at > (null) > [ 143.006193] IP: stmmac_xmit+0xf1/0x1080 > [ 143.010168] *pde = > [ 143.010177] > [

[PATCH net] tcp: init tcp_options before using it.

2017-05-08 Thread Hangbin Liu
I searched 4308fc58dced ("tcp: Document use of undefined variable") in archive list, but did not find the thread. So I'm not sure why we only add a description about un-initialized value. Even we don't use tmp_opt.sack_ok, I think it would be more safe to initialize the value before using it.

[PATCH v2 net] vti: check nla_put_* return value

2017-05-08 Thread Hangbin Liu
Signed-off-by: Hangbin Liu --- net/ipv4/ip_vti.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 4097741..4ec9aff 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c @@ -546,12 +546,13 @@

[PATCH net] vit: check nla_put_* return value

2017-05-08 Thread Hangbin Liu
Signed-off-by: Hangbin Liu --- net/ipv4/ip_vti.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 4097741..4ec9aff 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c @@ -546,12 +546,13 @@

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Jan Kiszka
On 2017-03-15 12:04, Joao Pinto wrote: > This patch prepares DMA Operation Mode configuration for multiple queues. > The work consisted on breaking the DMA operation Mode configuration function > into RX and TX scope and adapting its mechanism in stmmac_main. > > Signed-off-by: Joao Pinto

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-08 Thread Daniel Borkmann
On 05/08/2017 12:04 AM, Daniel Borkmann wrote: The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we would when kptr_restrict is enabled on %pK. Given the

Re: [PATCH RFC net-next 3/6] net: Introduce IFF_LWT_NETDEV flag

2017-05-08 Thread Johannes Berg
> +static inline bool netif_is_lwd(struct net_device *dev) > +{ > + return !!(dev->priv_flags & IFF_LWT_NETDEV); > +} Am I the only one who thinks that this "LWT_NETDEV" vs "LWD" is a bit confusing? Is "netif_is_lwt_netdev()" really too long? johannes

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Andy Shevchenko
>> - flow control off >> [ 142.988756] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready >> [ 142.998810] BUG: unable to handle kernel NULL pointer dereference at >> (null) >> [ 143.006193] IP: stmmac_xmit+0xf1/0x1080 >> [ 143.010168] *pde =

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Joao Pinto
Às 11:12 AM de 5/8/2017, Andy Shevchenko escreveu: > On Mon, May 8, 2017 at 12:54 PM, Joao Pinto wrote: >> Hi Andy and Jan, >> >> Às 10:36 AM de 5/8/2017, Andy Shevchenko escreveu: >>> On Mon, May 8, 2017 at 9:56 AM, Jan Kiszka wrote: On

Re: bpf pointer alignment validation

2017-05-08 Thread Daniel Borkmann
On 05/06/2017 04:47 AM, David Miller wrote: From: David Miller Date: Fri, 05 May 2017 16:20:44 -0400 (EDT) Anyways, I'll play with this design and see what happens... Feedback is of course welcome. Here is a prototype that works for me with test_pkt_access.c, which

[PATCH net] ip6_tunnel: remove unreachable ICMP_REDIRECT code

2017-05-08 Thread Hangbin Liu
After call ip6_tnl_err(), the rel_type will be ether ICMPV6_DEST_UNREACH or ICMPV6_PKT_TOOBIG. We will never reach ICMP_REDIRECT. So remove it. Signed-off-by: Hangbin Liu --- net/ipv6/ip6_tunnel.c | 5 - 1 file changed, 5 deletions(-) diff --git

Re: [PATCH/RFC net-next v2 2/4] flow dissector: return error on icmp dissection under-run

2017-05-08 Thread Jamal Hadi Salim
On 17-05-05 08:47 AM, Simon Horman wrote: Return an error from __skb_flow_dissect() if insufficient packet data is present when dissecting icmp type and code. Without this patch the absence of the ICMP type and code in truncated ICMPv4 or IPVPv6 packets is treated the way same as the presence

Re: [PATCH/RFC net-next v2 1/4] flow dissector: return error on port dissection under-run

2017-05-08 Thread Jamal Hadi Salim
On 17-05-05 08:47 AM, Simon Horman wrote: Return an error from __skb_flow_dissect() if insufficient packet data is present when dissecting layer 4 ports. Without this patch the absence of ports in truncated - e.g. UDP - packets is treated the same way by the flow dissector as the presence of

Re: [PATCH/RFC net-next v2 3/4] net/sched: cls_flower: do not match if dissection fails

2017-05-08 Thread Jamal Hadi Salim
On 17-05-05 08:47 AM, Simon Horman wrote: If the flow skb_flow_dissect() returns an error it indicates that dissection was incomplete for some reason. Matching using the result of an incomplete dissection may cause unexpected results. For example: * A match on zero layer 4 ports will also match

[PATCH] net/fsl: remove func xgmac_wait_until_free() as duplicate

2017-05-08 Thread Alexandru Ardelean
Looking at xgmac_wait_until_done() and xgmac_wait_until_free() functions, they seem to have turned out completely identical. Though, judging from the git history it seems they initially weren't. Remove xgmac_wait_until_free() in favor of xgmac_wait_until_done(). Signed-off-by: Alexandru

Re: [PATCH/RFC net-next v2 4/4] net/sched: cls_flower: allow control of tree traversal on packet parse errors

2017-05-08 Thread Jamal Hadi Salim
On 17-05-05 08:47 AM, Simon Horman wrote: Allow control how the tree of qdisc, classes and filters is further traversed if an error is encountered when parsing the packet in order to match the cls_flower filters at a particular prio. By default continue to the next filter, the behaviour without

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Andy Shevchenko
On Mon, May 8, 2017 at 1:42 PM, Joao Pinto wrote: > Às 11:12 AM de 5/8/2017, Andy Shevchenko escreveu: >> On Mon, May 8, 2017 at 12:54 PM, Joao Pinto wrote: >>> Às 10:36 AM de 5/8/2017, Andy Shevchenko escreveu: JFYI: With today's

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Joao Pinto
Às 12:34 PM de 5/8/2017, Andy Shevchenko escreveu: > On Mon, May 8, 2017 at 1:42 PM, Joao Pinto wrote: >> Às 11:12 AM de 5/8/2017, Andy Shevchenko escreveu: >>> On Mon, May 8, 2017 at 12:54 PM, Joao Pinto wrote: Às 10:36 AM de 5/8/2017, Andy

Re: [PATCH net v2 1/1] xfrm: Fix NETDEV_DOWN with IPSec offload

2017-05-08 Thread Steffen Klassert
On Mon, May 08, 2017 at 10:39:34AM +0300, il...@mellanox.com wrote: > From: Ilan Tayari > > Upon NETDEV_DOWN event, all xfrm_state objects which are bound to > the device are flushed. > > The condition for this is wrong, though, testing dev->hw_features > instead of

Re: net/key: slab-out-of-bounds in pfkey_compile_policy

2017-05-08 Thread Steffen Klassert
On Fri, May 05, 2017 at 02:18:01PM +0200, Andrey Konovalov wrote: > On Fri, May 5, 2017 at 11:11 AM, Steffen Klassert > wrote: > > On Tue, May 02, 2017 at 06:45:03PM +0200, Andrey Konovalov wrote: > >> Hi, > >> > >> I've got the following error report while fuzzing

Re: [PATCH/RFC net-next v2 4/4] net/sched: cls_flower: allow control of tree traversal on packet parse errors

2017-05-08 Thread Simon Horman
On Mon, May 08, 2017 at 07:32:02AM -0400, Jamal Hadi Salim wrote: > On 17-05-05 08:47 AM, Simon Horman wrote: > >Allow control how the tree of qdisc, classes and filters is further > >traversed if an error is encountered when parsing the packet in order to > >match the cls_flower filters at a

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Andy Shevchenko
On Mon, May 8, 2017 at 2:40 PM, Joao Pinto wrote: > Às 12:34 PM de 5/8/2017, Andy Shevchenko escreveu: >> On Mon, May 8, 2017 at 1:42 PM, Joao Pinto wrote: >>> Às 11:12 AM de 5/8/2017, Andy Shevchenko escreveu: On Mon, May 8, 2017 at 12:54

Re: [PATCH v3 net-next 01/11] net: stmmac: prepare dma op mode config for multiple queues

2017-05-08 Thread Joao Pinto
Às 12:56 PM de 5/8/2017, Andy Shevchenko escreveu: > On Mon, May 8, 2017 at 2:40 PM, Joao Pinto wrote: >> Às 12:34 PM de 5/8/2017, Andy Shevchenko escreveu: >>> On Mon, May 8, 2017 at 1:42 PM, Joao Pinto wrote: Às 11:12 AM de 5/8/2017, Andy

Re: [ISSUE: sky2 - rx error] Link stops working under heavy traffic load connected to a mv88e6176

2017-05-08 Thread Rafa Corvillo
On 28/04/17 14:22, Andrew Lunn wrote: Since you are using DSA, you will have DSA tags enabled on frames to/from the switch. This adds an extra 8 byte header in the frame. My guess is, it is this header, not the VLAN tag which is causing you MTU issues. But it is strange because, as I have

RE: [PATCH] net: dsa: loop: Check for memory allocation failure

2017-05-08 Thread David Laight
From: Christophe JAILLET > Sent: 06 May 2017 06:30 > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > Return -ENOMEM instead, as done for some other memory allocation just a > few lines above. ... > --- a/drivers/net/dsa/dsa_loop.c > +++ b/drivers/net/dsa/dsa_loop.c > @@ -256,6

Re: [PATCH RFC net-next 4/6] net: Do not intialize kobject for lightweight netdevs

2017-05-08 Thread Florian Fainelli
On 05/06/2017 09:07 AM, David Ahern wrote: > Lightweight netdevices are not added to sysfs; bypass kobject > initialization. I was wondering if we actually needed a flag to tell: this is a lightweight device, but still let it show up in /sys. All use cases that I have in mind (getting the

Re: [PATCH RFC net-next 0/6] net: reducing memory footprint of network devices

2017-05-08 Thread Florian Fainelli
On 05/06/2017 09:07 AM, David Ahern wrote: > As I have mentioned many times[1], at ~43+kB per instance the use of > net_devices does not scale for deployments needing 10,000+ devices. At > netconf 1.2 there was a discussion about using a net_device_common for > the minimal set of common attributes

Re: [PATCH v2] vlan: Keep NETIF_F_HW_CSUM similar to other software devices

2017-05-08 Thread David Miller
From: Vladislav Yasevich Date: Fri, 5 May 2017 16:17:41 -0400 > Vlan devices, like all other software devices, enable > NETIF_F_HW_CSUM feature. However, unlike all the othe other > software devices, vlans will switch to using IP|IPV6_CSUM > features, if the underlying

[PATCH] net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control

2017-05-08 Thread Grygorii Strashko
When users set flow control using ethtool the bits are set properly in the CPGMAC_SL MACCONTROL register, but the FIFO depth in the respective Port n Maximum FIFO Blocks (Pn_MAX_BLKS) registers remains set to the minimum size reset value. When receive flow control is enabled on a port, the port's

Re: bpf pointer alignment validation

2017-05-08 Thread Alexei Starovoitov
On Fri, May 05, 2017 at 10:47:09PM -0400, David Miller wrote: > From: David Miller > Date: Fri, 05 May 2017 16:20:44 -0400 (EDT) > > > Anyways, I'll play with this design and see what happens... > > Feedback is of course welcome. > > Here is a prototype that works for me

Re: [PATCH net v2] Check for skb_put_padto return value

2017-05-08 Thread David Miller
From: Peter Heise Date: Sun, 7 May 2017 17:15:26 + > Return value of skb_put_padto is now checked as > reported by Dan Carpenter. skb might be freed in > case of error in skb_put_padto. > --- > net/hsr/hsr_device.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-05-08 Thread Thomas Petazzoni
Hello, On Mon, 8 May 2017 16:28:21 +0200, Giuseppe CAVALLARO wrote: > > I just see that GMAC_CONTROL and MAC_CTRL_REG are the same, so why not > > create a custom adjust_link for each dwmac type ? > > This will permit to call it instead of set_ps() and remove lots of if > > (has_gmac) and co

Re: [PATCH v1 0/4] stmmac: pci: Fix crash on Intel Galileo Gen2

2017-05-08 Thread Jan Kiszka
On 2017-05-08 16:14, Andy Shevchenko wrote: > Due to misconfiguration of PCI driver for Intel Quark the user will get > a kernel crash: > > # udhcpc -i eth0 > udhcpc: started, v1.26.2 > stmmaceth :00:14.6 eth0: device MAC address 98:4f:ee:05:ac:47 > Generic PHY stmmac-a6:01: attached PHY

Re: FEC on i.MX 7 transmit queue timeout

2017-05-08 Thread Stefan Agner
On 2017-05-07 19:13, Andy Duan wrote: > From: Andrew Lunn Sent: Friday, May 05, 2017 8:24 PM >>To: Andy Duan >>Cc: Stefan Agner ; feste...@gmail.com; >>netdev@vger.kernel.org; netdev-ow...@vger.kernel.org >>Subject: Re: FEC on i.MX 7 transmit

Re: [Patch net] ipv4: restore rt->fi for reference counting

2017-05-08 Thread David Miller
From: Cong Wang Date: Thu, 4 May 2017 14:54:17 -0700 > IPv4 dst could use fi->fib_metrics to store metrics but fib_info > itself is refcnt'ed, so without taking a refcnt fi and > fi->fib_metrics could be freed while dst metrics still points to > it. This triggers

Re: [PATCH] bna: Avoid reading past end of buffer

2017-05-08 Thread David Miller
From: Kees Cook Date: Fri, 5 May 2017 15:25:32 -0700 > Using memcpy() from a string that is shorter than the length copied means > the destination buffer is being filled with arbitrary data from the kernel > rodata segment. Instead, use strncpy() which will fill the

Re: [PATCH] bna: ethtool: Avoid reading past end of buffer

2017-05-08 Thread David Miller
From: Kees Cook Date: Fri, 5 May 2017 15:30:23 -0700 > Using memcpy() from a string that is shorter than the length copied means > the destination buffer is being filled with arbitrary data from the kernel > rodata segment. Instead, use strncpy() which will fill the

Re: [PATCH] qlge: Avoid reading past end of buffer

2017-05-08 Thread David Miller
From: Kees Cook Date: Fri, 5 May 2017 15:34:34 -0700 > Using memcpy() from a string that is shorter than the length copied means > the destination buffer is being filled with arbitrary data from the kernel > rodata segment. Instead, use strncpy() which will fill the

Re: [PATCH] bonding: check nla_put_be32 return value

2017-05-08 Thread David Miller
From: Hangbin Liu Date: Sat, 6 May 2017 11:17:06 +0800 > Signed-off-by: Hangbin Liu Applied.

Re: [PATCH v1 0/4] stmmac: pci: Fix crash on Intel Galileo Gen2

2017-05-08 Thread David Miller
From: Andy Shevchenko Date: Mon, 8 May 2017 17:14:18 +0300 > Due to misconfiguration of PCI driver for Intel Quark the user will get > a kernel crash: > > # udhcpc -i eth0 > udhcpc: started, v1.26.2 > stmmaceth :00:14.6 eth0: device MAC address

Re: [Patch net v2] ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf

2017-05-08 Thread David Miller
From: David Ahern Date: Thu, 4 May 2017 13:41:15 -0600 > On 5/4/17 11:36 AM, Cong Wang wrote: >> For each netns (except init_net), we initialize its null entry >> in 3 places: >> >> 1) The template itself, as we use kmemdup() >> 2) Code around dst_init_metrics() in

[PATCH] fm10k: Use seq_putc() in fm10k_dbg_desc_break()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 18:10:39 +0200 Two single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH] qca_debug: Reduce function calls for sequence output in qcaspi_info_show()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 19:21:27 +0200 A bit of data was put into a sequence by separate function calls. Print the same data together with adjusted seq_printf() calls instead. This issue was detected by using the Coccinelle software.

Re: [PATCH net] cxgb4: avoid disabling FEC by default

2017-05-08 Thread David Miller
From: Ganesh Goudar Date: Sat, 6 May 2017 14:25:06 +0530 > Recent Chelsio firmware started using few port capablity bits to > manage FEC and as driver was not aware of FEC changes those bits > were zeroed, consequently disabling FEC. > > Avoid zeroing those bits and

Re: [PATCH] net: dsa: loop: Check for memory allocation failure

2017-05-08 Thread David Miller
From: Christophe JAILLET Date: Sat, 6 May 2017 07:29:45 +0200 > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > Return -ENOMEM instead, as done for some other memory allocation just a > few lines above. > > Fixes: 98cd1552ea27 ("net: dsa: Mock-up

Re: [PATCH RFC] net: Fix inconsistent teardown and release of private netdev state.

2017-05-08 Thread Stephen Hemminger
On Mon, 08 May 2017 12:52:43 -0400 (EDT) David Miller wrote: > Network devices can allocate reasources and private memory using > netdev_ops->ndo_init(). However, the release of these resources > can occur in one of two different places. > > Either netdev_ops->ndo_uninit()

Re: [PATCH v2 net] vti: check nla_put_* return value

2017-05-08 Thread David Miller
From: Hangbin Liu Date: Mon, 8 May 2017 17:57:13 +0800 > Signed-off-by: Hangbin Liu Applied.

Re: [PATCH RFC net-next 5/6] net: Delay initializations for lightweight devices

2017-05-08 Thread Florian Fainelli
On 05/06/2017 09:07 AM, David Ahern wrote: > Delay ipv4 and ipv6 initializations on lightweight netdevices until an > address is added to the device. > > Skip sysctl initialization for neighbor path as well. Yeah, thanks for including the sysctl initialization. One thing that my earlier "L2

Re: sky2: Use seq_putc() in sky2_debug_show()

2017-05-08 Thread SF Markus Elfring
> Which issue do you mean? I dont see any issue you fix here. Are the run time characteristics a bit nicer for the function “seq_putc” in comparison to the function “seq_puts” for printing a single line break here? Regards, Markus

Re: [PATCH net-next 9/9] ipvlan: introduce individual MAC addresses

2017-05-08 Thread Dan Williams
On Mon, 2017-05-08 at 15:29 +, Chiappero, Marco wrote: > > -Original Message- > > From: Jiri Benc [mailto:jb...@redhat.com] > > Sent: Thursday, May 4, 2017 5:44 PM > > To: Chiappero, Marco > > Cc: Dan Williams ; netdev@vger.kernel.org; David

Re: [PATCH net] tcp: make congestion control optionally skip slow start after idle

2017-05-08 Thread David Miller
From: Wei Wang Date: Fri, 5 May 2017 12:53:23 -0700 > From: Wei Wang > > Congestion control modules that want full control over congestion > control behavior do not want the cwnd modifications controlled by > the sysctl_tcp_slow_start_after_idle code

Re: [PATCH] bonding: make multi if nla_put_failure check into one

2017-05-08 Thread David Miller
From: Hangbin Liu Date: Sat, 6 May 2017 11:17:52 +0800 > Signed-off-by: Hangbin Liu Changes like this neither make the code better nor worse, so please avoid this kind of churn. I'm not applying this. Thank you.

Re: [PATCH] net/hippi/rrunner: use memdup_user

2017-05-08 Thread David Miller
From: Geliang Tang Date: Sat, 6 May 2017 23:42:16 +0800 > Use memdup_user() helper instead of open-coding to simplify the code. > > Signed-off-by: Geliang Tang Applied.

Re: [PATCH] yam: use memdup_user

2017-05-08 Thread David Miller
From: Geliang Tang Date: Sat, 6 May 2017 23:42:22 +0800 > Use memdup_user() helper instead of open-coding to simplify the code. > > Signed-off-by: Geliang Tang Applied.

Re: [PATCH 0/4] TI Bluetooth serdev support

2017-05-08 Thread Sebastian Reichel
Hi, On Fri, May 05, 2017 at 09:51:33AM -0500, Adam Ford wrote: > On Sun, Apr 30, 2017 at 11:04 AM, Sebastian Reichel wrote: > > On Sun, Apr 30, 2017 at 10:14:20AM -0500, Adam Ford wrote: > >> On Wed, Apr 5, 2017 at 1:30 PM, Rob Herring wrote: > >> > This series

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-08 Thread David Miller
From: Daniel Borkmann Date: Mon, 8 May 2017 00:04:09 +0200 > The patch fixes two things at once: > > 1) It checks the env->allow_ptr_leaks and only prints the map address to >the log if we have the privileges to do so, otherwise it just dumps 0 >as we would when

Re: [PATCH RFC] net: Fix inconsistent teardown and release of private netdev state.

2017-05-08 Thread David Miller
From: Stephen Hemminger Date: Mon, 8 May 2017 12:13:59 -0700 > Thanks for addressing a confusing and messy semantic. If you merge > this then it would be good to update the documentation in > Doucmentation/networking to describe how drivers are supposed to > behave.

[PATCH RFC] net: Fix inconsistent teardown and release of private netdev state.

2017-05-08 Thread David Miller
Network devices can allocate reasources and private memory using netdev_ops->ndo_init(). However, the release of these resources can occur in one of two different places. Either netdev_ops->ndo_uninit() or netdev->destructor(). The decision of which operation frees the resources depends upon

Re: [PATCH] net: ipv4: add code comment for clarification

2017-05-08 Thread Gustavo A. R. Silva
Hi David, Quoting David Miller : From: "Gustavo A. R. Silva" Date: Thu, 4 May 2017 14:44:16 -0500 @@ -389,6 +389,12 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, nlmsg_flags, unlh,

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-08 Thread David Miller
From: Pavel Belous Date: Thu, 4 May 2017 23:10:56 +0300 > From: Pavel Belous > > This patch fixes the crash that happens when driver tries to collect > statistics > from already released "aq_vec" object. > If adapter is in "down" state we

[PATCH v1 4/4] stmmac: pci: split out common_default_data() helper

2017-05-08 Thread Andy Shevchenko
New helper is added in order to prevent misconfiguration happened for one of the platforms when configuration data is expanded. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 52 1 file changed,

[PATCH v1 1/4] stmmac: pci: set default number of rx and tx queues

2017-05-08 Thread Andy Shevchenko
The commit 26d6851fd24e ("net: stmmac: set default number of rx and tx queues in stmmac_pci") missed Intel Quark configuration. Append it here. Fixes: 26d6851fd24e ("net: stmmac: set default number of rx and tx queues in stmmac_pci") Cc: Joao Pinto

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-05-08 Thread Giuseppe CAVALLARO
Hello On 5/3/2017 4:30 PM, Corentin Labbe wrote: On Wed, May 03, 2017 at 10:13:56AM +0200, Giuseppe CAVALLARO wrote: Hello Thomas this was initially set by using the hw->link.port; both the core_init and adjust callback should invoke the hook and tuning the PS bit according to the speed and

Re: [RFC iproute2 0/8] RDMA tool

2017-05-08 Thread Stephen Hemminger
On Mon, 8 May 2017 15:19:28 + Bart Van Assche wrote: > On Sun, 2017-05-07 at 12:20 +0200, Jiri Pirko wrote: > > Sat, May 06, 2017 at 04:40:24PM CEST, bart.vanass...@sandisk.com wrote: > > > On Sat, 2017-05-06 at 12:40 +0200, Jiri Pirko wrote: > > > > Thu, May

Re: [RFC iproute2 0/8] RDMA tool

2017-05-08 Thread Dennis Dalessandro
On 05/04/2017 03:42 PM, Leon Romanovsky wrote: On Thu, May 04, 2017 at 03:26:13PM -0400, Dennis Dalessandro wrote: On 05/04/2017 02:45 PM, Leon Romanovsky wrote: On Thu, May 04, 2017 at 06:30:27PM +, Bart Van Assche wrote: On Thu, 2017-05-04 at 21:25 +0300, Leon Romanovsky wrote: On Thu,

Re: [RFC iproute2 0/8] RDMA tool

2017-05-08 Thread Andrew Lunn
> Several companies maintain embedded Linux > distributions and tools to build software images. These tools provide a user > interface that allows to select what packages go into such an image. The tools allow you to select what binary packages are placed into the image. You can build multiple

[PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison

2017-05-08 Thread Karim Eshapa
cast timeframe variable with (unsigned long) then use time_after() kernel macro for time comparison. Signed-off-by: Karim Eshapa --- drivers/net/wimax/i2400m/i2400m-usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] sky2: Use seq_putc() in sky2_debug_show()

2017-05-08 Thread Lino Sanfilippo
Hi, On 08.05.2017 18:42, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 8 May 2017 18:38:17 +0200 > > A single character (line break) should be put into a sequence. Why? > Thus use the corresponding function "seq_putc". > > This issue was detected

Re: [ISSUE: sky2 - rx error] Link stops working under heavy traffic load connected to a mv88e6176

2017-05-08 Thread Andrew Lunn
> >static unsigned sky2_get_rx_threshold(struct sky2_port *sky2) > >{ > > unsigned size; > > > > /* Space needed for frame data + headers rounded up */ > > size = roundup(sky2->netdev->mtu + ETH_HLEN + VLAN_HLEN, 8); > > > > /* Stopping point for hardware truncation

Re: [PATCH net] ipv6: make sure dev is not NULL before call ip6_frag_reasm

2017-05-08 Thread Eric Dumazet
On Mon, 2017-05-08 at 11:09 +0800, Hangbin Liu wrote: > Since ip6_frag_reasm() will call __in6_dev_get(dev), which will access > dev->ip6_ptr. We need to make sure dev is not NULL. > > Signed-off-by: Hangbin Liu > --- > net/ipv6/reassembly.c | 2 +- > 1 file changed, 1

Re: bpf pointer alignment validation

2017-05-08 Thread David Miller
From: Daniel Borkmann Date: Mon, 08 May 2017 12:49:25 +0200 > On 05/06/2017 04:47 AM, David Miller wrote: >> From: David Miller >> Date: Fri, 05 May 2017 16:20:44 -0400 (EDT) >> >>> Anyways, I'll play with this design and see what happens... >>>

Re: [PATCH] net: ipv4: add code comment for clarification

2017-05-08 Thread David Miller
From: "Gustavo A. R. Silva" Date: Thu, 4 May 2017 14:44:16 -0500 > @@ -389,6 +389,12 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff > *skb, > nlmsg_flags, unlh, net_admin); > } > > +/* > + * Ignore the position of the

[PATCH] sky2: Use seq_putc() in sky2_debug_show()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 18:38:17 +0200 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[Patch net v3] ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf

2017-05-08 Thread Cong Wang
For each netns (except init_net), we initialize its null entry in 3 places: 1) The template itself, as we use kmemdup() 2) Code around dst_init_metrics() in ip6_route_net_init() 3) ip6_route_dev_notify(), which is supposed to initialize it after loopback registers Unfortunately the last one

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-08 Thread Alexei Starovoitov
On Mon, May 08, 2017 at 12:04:09AM +0200, Daniel Borkmann wrote: > The patch fixes two things at once: > > 1) It checks the env->allow_ptr_leaks and only prints the map address to >the log if we have the privileges to do so, otherwise it just dumps 0 >as we would when kptr_restrict is

Re: Network cooling device and how to control NIC speed on thermal condition

2017-05-08 Thread Andrew Lunn
> However, the fact is that PHYs having active 1G/s link generate much > more heat than having 100M/s link independently from network traffic. Yes, this is true. I got an off-list email suggesting this power difference is very significant, more so than actually processing packets. > All cooling

Re: [PATCH v1 4/4] stmmac: pci: split out common_default_data() helper

2017-05-08 Thread Joao Pinto
Às 3:14 PM de 5/8/2017, Andy Shevchenko escreveu: > New helper is added in order to prevent misconfiguration happened > for one of the platforms when configuration data is expanded. > > Signed-off-by: Andy Shevchenko > --- >

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-08 Thread Alexander Duyck
On Mon, May 8, 2017 at 7:33 AM, Ding Tianhong wrote: > > > On 2017/5/7 2:07, Alexander Duyck wrote: >> On Fri, May 5, 2017 at 8:08 PM, Ding Tianhong >> wrote: >>> >>> >>> On 2017/5/5 22:04, Alexander Duyck wrote: On Thu, May 4, 2017 at 2:01

RE: [PATCH] net: dsa: loop: Check for memory allocation failure

2017-05-08 Thread Julia Lawall
On Mon, 8 May 2017, David Laight wrote: > From: Christophe JAILLET > > Sent: 06 May 2017 06:30 > > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > > Return -ENOMEM instead, as done for some other memory allocation just a > > few lines above. > ... > > ---

  1   2   >