Re: tty,net: use-after-free in x25_asy_open_tty

2015-11-26 Thread Sasha Levin
On 11/20/2015 02:59 PM, Peter Hurley wrote: > Thanks for the report, Sasha. > Would you please test the patch below? Fixes it for me, thanks! Thanks, Sasha -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo in

Re: 4.3+: Atheros ethernet fails after resume from s2ram, due to order 4 allocation

2015-11-26 Thread Francois Romieu
Pavel Machek : [...] > Ok, so what went on is easy.. any ideas how to fix it ? The driver should 1) prohibit holes in its receive ring, 2) allocate before pushing data up in the stack 3) drop packets when it can't allocate a fresh buffer and 4) stop releasing receive buffers - and any resource fo

Re: [PATCH] staging: net: core: skbuff.c: Added do-while pair for complex macros

2015-11-26 Thread David Miller
From: Jitendra Kumar Khasdev Date: Thu, 26 Nov 2015 22:06:03 +0530 > This patch is to file skbuff.c that fixes up following error, > reported by checkpatch.pl tool, > > 1. ERROR: Macros with multiple statements should be enclosed >in a do - while loop. > > Signed-off-by: Jitendra Kumar Khas

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Mark Brown
On Thu, Nov 26, 2015 at 08:34:20PM +0200, Kalle Valo wrote: > Mark Brown writes: > > It still ought to be fixed regardless of why it showed up - the > > intention of the code is that we build the real thermal code regardless > > of if that's modular or not but that's not what the code actually do

[PATCH] unix: use wq_has_sleeper in unix_dgram_recvmsg

2015-11-26 Thread Rainer Weikusat
The current unix_dgram_recvmsg does a wake up for every received datagram. This seems wasteful as only SOCK_DGRAM client sockets in an n:1 association with a server socket will ever wait because of the associated condition. The patch below changes the function such that the wake up only happens if

unix_dgram_recvmsg wakeups [test results & programs]

2015-11-26 Thread Rainer Weikusat
[to be followed by a patch] Currently, unix_dgram_recvmsg does a wake up on the peer_wait queue of a socket after every received datagram. This seems excessive, especially considering that only SOCK_DGRAM client sockets in an n:1 asssociation with a server socket ever wait for the associated condi

Re: [PATCH net-next 0/3] mvneta: Introduce RSS support

2015-11-26 Thread Marcin Wojtas
Hi Gregory, You can add: Tested-by: Marcin Wojtas I checked different queues, the traffic passed through, and the irqs came to proper CPU's. FYI, in my setup with A388-GP as a bridge, after attaching two ports to different CPU's there was an increase of ~50kpps (almost 9%) for 64B packets. Best

Re: [PATCH v2 net 6/6] net: mvneta: enable IP checksum with jumbo frames for Armada 38x on Port0

2015-11-26 Thread Marcin Wojtas
Thomas, 2015-11-26 19:33 GMT+01:00 Thomas Petazzoni : > Marcin, > > On Thu, 26 Nov 2015 19:08:13 +0100, Marcin Wojtas wrote: >> The Ethernet controller found in the Armada 38x SoC's family support >> TCP/IP checksumming with frame sizes larger than 1600 bytes, however >> only on port 0. >> >> Thi

Re: [PATCH v2 net 6/6] net: mvneta: enable IP checksum with jumbo frames for Armada 38x on Port0

2015-11-26 Thread Thomas Petazzoni
Marcin, On Thu, 26 Nov 2015 19:08:13 +0100, Marcin Wojtas wrote: > The Ethernet controller found in the Armada 38x SoC's family support > TCP/IP checksumming with frame sizes larger than 1600 bytes, however > only on port 0. > > This commit enables it by setting 'tx-csum-limit' to 9800B in > 'eth

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Kalle Valo
Mark Brown writes: > On Thu, Nov 26, 2015 at 06:58:32PM +0200, Kalle Valo wrote: >> Mark Brown writes: > >> > No, I didn't make much effort to check though since the use of ifdef was >> > clearly a bug waiting to happen anyway, I was more surprised it worked >> > at all than anything. > >> Micha

Re: [PATCH v2 net 1/6] net: mvneta: add configuration for MBUS windows access protection

2015-11-26 Thread Marcin Wojtas
Hi Thomas, 2015-11-26 19:25 GMT+01:00 Thomas Petazzoni : > Marcin, > > On Thu, 26 Nov 2015 19:08:08 +0100, Marcin Wojtas wrote: >> This commit adds missing configuration of MBUS windows access protection >> in mvneta_conf_mbus_windows function - a dedicated variable for that >> purpose remained th

Re: [PATCH v2 net 4/6] net: mvneta: fix error path for building skb

2015-11-26 Thread Simon Guinot
On Thu, Nov 26, 2015 at 07:08:11PM +0100, Marcin Wojtas wrote: > In the actual RX processing, there is same error path for both descriptor > ring refilling and building skb fails. This is not correct, because after > successful refill, the ring is already updated with newly allocated > buffer. Then

IPv4 tunnels: why IP-IP and SIT enforce DF bit, but GRE does not?

2015-11-26 Thread Konstantin Shemyak
The kernel has taken the decision to always enforce DF bit on IPv4 tunnels, which have fixed (not inherited) TTL (e.g. net/ipv4/ipip.c:ipip_tunnel_ioctl()). Commment by Alexey Kuznetsov in the head of ip_gre.c explains that the reason is attempting to avoid network loops. But the commit c5441

Re: [PATCH v2 net 2/6] net: mvneta: fix bit assignment in MVNETA_RXQ_CONFIG_REG

2015-11-26 Thread Thomas Petazzoni
Dear Marcin Wojtas, On Thu, 26 Nov 2015 19:08:09 +0100, Marcin Wojtas wrote: > MVNETA_RXQ_HW_BUF_ALLOC bit which controls enabling hardware buffer > allocation was mistakenly set as BIT(1). This commit fixes the assignment. > > Signed-off-by: Marcin Wojtas > Reviewed-by: Gregory CLEMENT > Cc:

Re: [PATCH v2 net 1/6] net: mvneta: add configuration for MBUS windows access protection

2015-11-26 Thread Thomas Petazzoni
Marcin, On Thu, 26 Nov 2015 19:08:08 +0100, Marcin Wojtas wrote: > This commit adds missing configuration of MBUS windows access protection > in mvneta_conf_mbus_windows function - a dedicated variable for that > purpose remained there unused since v3.8 initial mvneta support. Because > of that th

[PATCH v2 net 1/6] net: mvneta: add configuration for MBUS windows access protection

2015-11-26 Thread Marcin Wojtas
This commit adds missing configuration of MBUS windows access protection in mvneta_conf_mbus_windows function - a dedicated variable for that purpose remained there unused since v3.8 initial mvneta support. Because of that the register contents were inherited from the bootloader. Signed-off-by: Ma

[PATCH v2 net 0/6] Marvell Armada XP/370/38X Neta fixes

2015-11-26 Thread Marcin Wojtas
Hi, According to David's remark I split the original patchset into two. First one, which I submit is a list of fixes, all stable-CC'ed. On the occasion two new bugs were fixed - wrong define in one of registers and, more important, an error path in mvneta_rx() after failing of skb build. I'm loo

[PATCH v2 net 4/6] net: mvneta: fix error path for building skb

2015-11-26 Thread Marcin Wojtas
In the actual RX processing, there is same error path for both descriptor ring refilling and building skb fails. This is not correct, because after successful refill, the ring is already updated with newly allocated buffer. Then, in case of build_skb() fail, hitherto code left the original buffer u

[PATCH v2 net 2/6] net: mvneta: fix bit assignment in MVNETA_RXQ_CONFIG_REG

2015-11-26 Thread Marcin Wojtas
MVNETA_RXQ_HW_BUF_ALLOC bit which controls enabling hardware buffer allocation was mistakenly set as BIT(1). This commit fixes the assignment. Signed-off-by: Marcin Wojtas Reviewed-by: Gregory CLEMENT Cc: # v3.8+ Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")

[PATCH v2 net 5/6] net: mvneta: enable setting custom TX IP checksum limit

2015-11-26 Thread Marcin Wojtas
Since Armada 38x SoC can support IP checksum for jumbo frames only on a single port, it means that this feature should be enabled per-port, rather than for the whole SoC. This patch enables setting custom TX IP checksum limit by adding new optional property to the mvneta device tree node. If not u

[PATCH v2 net 3/6] net: mvneta: fix bit assignment for RX packet irq enable

2015-11-26 Thread Marcin Wojtas
A value originally defined in the driver was inappropriate. Even though the ingress was somehow working, writing MVNETA_RXQ_INTR_ENABLE_ALL_MASK to MVNETA_INTR_ENABLE didn't make any effect, because the bits [31:16] are reserved and read-only. This commit updates MVNETA_RXQ_INTR_ENABLE_ALL_MASK to

[PATCH v2 net 6/6] net: mvneta: enable IP checksum with jumbo frames for Armada 38x on Port0

2015-11-26 Thread Marcin Wojtas
The Ethernet controller found in the Armada 38x SoC's family support TCP/IP checksumming with frame sizes larger than 1600 bytes, however only on port 0. This commit enables it by setting 'tx-csum-limit' to 9800B in 'ethernet@7' node. Signed-off-by: Marcin Wojtas Cc: # v3.18+ --- arch/arm/

Re: [PATCH 04/13] net: mvneta: enable suspend/resume support

2015-11-26 Thread Marcin Wojtas
Hi Gregory, >> + /* Reset link status */ >> + pp->link = 0; >> + pp->duplex = -1; >> + pp->speed = 0; >> + > > Would it be possible to add a kind of mvneta_port_power_down(pp, > pp->phy_interface) here ? It would allow to save power in standby mode > too. > Sure, I'll try it. Be

Re: use-after-free in sock_wake_async

2015-11-26 Thread Eric Dumazet
On Thu, 2015-11-26 at 18:03 +0100, Hannes Frederic Sowa wrote: > Also isn't the reason why slub exists so it can track memory regions > per-cpu. call_rcu() and kfree_rcu() will add a grace period (multiple ms) where the cpu will likely evict from its caches the data contained in the 'about to be

Re: use-after-free in sock_wake_async

2015-11-26 Thread Hannes Frederic Sowa
On Thu, Nov 26, 2015, at 18:09, Eric Dumazet wrote: > On Thu, 2015-11-26 at 18:03 +0100, Hannes Frederic Sowa wrote: > > > My rationale was like this: we already have rcu to free the wq, so we > > don't add any more callbacks as current code. sock_alloc is right now > > 1136 bytes, which is huge,

Re: use-after-free in sock_wake_async

2015-11-26 Thread Eric Dumazet
On Thu, 2015-11-26 at 18:03 +0100, Hannes Frederic Sowa wrote: > My rationale was like this: we already have rcu to free the wq, so we > don't add any more callbacks as current code. sock_alloc is right now > 1136 bytes, which is huge, like 18 cachelines. I wouldn't think it does > matter a lot as

Re: use-after-free in sock_wake_async

2015-11-26 Thread Hannes Frederic Sowa
On Thu, Nov 26, 2015, at 16:51, Eric Dumazet wrote: > On Thu, 2015-11-26 at 14:32 +0100, Hannes Frederic Sowa wrote: > > Hannes Frederic Sowa writes: > > > > > > > I have seen filesystems already doing so in .destroy_inode, that's why I > > > am asking. The allocation happens the same way as we

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Mark Brown
On Thu, Nov 26, 2015 at 06:58:32PM +0200, Kalle Valo wrote: > Mark Brown writes: > > No, I didn't make much effort to check though since the use of ifdef was > > clearly a bug waiting to happen anyway, I was more surprised it worked > > at all than anything. > Michal Marek explains[1] that this

Re: [PATCH] staging: net: core: skbuff.c: Added do-while pair for complex macros

2015-11-26 Thread Joe Perches
On Thu, 2015-11-26 at 22:06 +0530, Jitendra Kumar Khasdev wrote: > This patch is to file skbuff.c that fixes up following error, > reported by checkpatch.pl tool, Your subject title is not correct. This is not a staging patch. > 1. ERROR: Macros with multiple statements should be enclosed >in

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Kalle Valo
Mark Brown writes: > On Thu, Nov 26, 2015 at 02:39:40PM +0200, Kalle Valo wrote: >> Mark Brown writes: > >> > It looks like this was somehow triggered as part of the reorganisation >> > of the WiFi directory structure. > >> This is surprising and also worrying, any ideas why? It would be good to

Re: [PATCH net-next 0/7] net: ipmr: more cleanups and mfc netlink support

2015-11-26 Thread Nikolay Aleksandrov
On 11/26/2015 05:35 PM, Andrew Lunn wrote: > On Thu, Nov 26, 2015 at 03:23:43PM +0100, Nikolay Aleksandrov wrote: >> From: Nikolay Aleksandrov >> >> Hi, >> This set continues with the minor cleanups in the first 6 patches and >> patch 7 adds the first new feature - MFC manipulation via netlink. >

Re: Kernel 4.1.12 crash

2015-11-26 Thread Guillaume Nault
On Wed, Nov 25, 2015 at 04:58:54PM +0200, Andrew wrote: > 25.11.2015 16:10, Guillaume Nault пишет: > >On Wed, Nov 25, 2015 at 12:59:52AM +0200, Andrew wrote: > >>Hi. > >> > >>I tried to reproduce errors in virtual environment (some VMs on my > >>notebook). > >> > >>I've tried to create 1000 client

Re: [PATCH 06/13] net: mvneta: enable mixed egress processing using HR timer

2015-11-26 Thread Simon Guinot
Hi Marcin, On Sun, Nov 22, 2015 at 08:53:52AM +0100, Marcin Wojtas wrote: > Mixed approach allows using higher interrupt threshold (increased back to > 15 packets), useful in high throughput. In case of small amount of data > or very short TX queues HR timer ensures releasing buffers with small >

[PATCH] staging: net: core: skbuff.c: Added do-while pair for complex macros

2015-11-26 Thread Jitendra Kumar Khasdev
This patch is to file skbuff.c that fixes up following error, reported by checkpatch.pl tool, 1. ERROR: Macros with multiple statements should be enclosed in a do - while loop. Signed-off-by: Jitendra Kumar Khasdev --- net/core/skbuff.c | 12 +++- 1 file changed, 7 insertions(+), 5 d

Re: [PATCH net-next 0/7] net: ipmr: more cleanups and mfc netlink support

2015-11-26 Thread Andrew Lunn
On Thu, Nov 26, 2015 at 03:23:43PM +0100, Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov > > Hi, > This set continues with the minor cleanups in the first 6 patches and > patch 7 adds the first new feature - MFC manipulation via netlink. Hi Nikolay Great to see somebody working on multi

[PATCH] staging: dgnc: dgnc_cls.c: Replaced udelay by usleep_range

2015-11-26 Thread Jitendra Kumar Khasdev
This patch is to file dgnc_cls.c that fixes up udelay function by usleep_range. It is safe to use according to the following documentation Documentation/timers/timers-howto.txt. So that is why I have given an appropriate time range. Signed-off-by: Jitendra Kumar Khasdev --- drivers/staging/dgnc/

4.3+: Atheros ethernet fails after resume from s2ram, due to order 4 allocation

2015-11-26 Thread Pavel Machek
Hi! ...and dmesg tells us what is going on: [ 6961.550240] NetworkManager: page allocation failure: order:4, mode:0x2080020 [ 6961.550249] CPU: 0 PID: 2590 Comm: NetworkManager Tainted: G W 4.3.0+ #124 [ 6961.550250] Hardware name: Acer Aspire 5732Z/Aspire 5732Z, BIOS V3.07 02/10/2010 [ 696

Re: [PATCH iproute2] ip_tunnel: determine tunnel address family from the tunnel type

2015-11-26 Thread Konstantin Shemyak
On 24.11.2015 02:26, Stephen Hemminger wrote: On Thu, 12 Nov 2015 21:10:08 + Konstantin Shemyak wrote: When creating an IP tunnel over IPv6, the address family must be passed in the option, e.g. ip -6 tunnel add mode ip6gre local 1::1 remote 2::2 This makes it impossible to create both I

[PATCH net] tcp: initialize tp->copied_seq in case of cross SYN connection

2015-11-26 Thread Eric Dumazet
From: Eric Dumazet Dmitry provided a syzkaller (http://github.com/google/syzkaller) generated program that triggers the WARNING at net/ipv4/tcp.c:1729 in tcp_recvmsg() : WARN_ON(tp->copied_seq != tp->rcv_nxt && !(flags & (MSG_PEEK | MSG_TRUNC))); His program is specifically attempting

Re: use-after-free in sock_wake_async

2015-11-26 Thread Eric Dumazet
On Thu, 2015-11-26 at 14:32 +0100, Hannes Frederic Sowa wrote: > Hannes Frederic Sowa writes: > > > > I have seen filesystems already doing so in .destroy_inode, that's why I > > am asking. The allocation happens the same way as we do with sock_alloc, > > e.g. shmem. I actually thought that stru

Re: [PATCH iproute2 -next v2 4/5] {f,m}_bpf: allow updates on program arrays

2015-11-26 Thread Daniel Borkmann
On 11/26/2015 04:19 PM, Hannes Frederic Sowa wrote: On Thu, Nov 26, 2015, at 15:38, Daniel Borkmann wrote: [...] Why does user space actually still have to deal with setting the mount point private? Isn't this handled by the kernel? + if (mount("bpf", target, "bpf", 0, NULL)) { +

Re: Crash in skb_segment / KVM GSO GRE IPV6

2015-11-26 Thread Oliver Francke
Hi, well, I think this is a serious bug, as I can crash a complete linux host running hundreds of VMs from within a QEMU-guest only. All I can add here is a test-setup where I can try out possible fixes without disturbing others. The only things that helps out ATM is switch all eth-offloading off,

pull-request: mac80211 2015-11-26

2015-11-26 Thread Johannes Berg
[resending with correct netdev address, not sure how that ended up in my autocompletion address book ... sorry about that!] Hi Dave, Sorry for being so late. These have been pending for a while (and in fact in linux-next too, I asked to be added there recently :) ). Let me know if there's any pr

Rendszergazda

2015-11-26 Thread ADMIN
-- A postaláda túllépte a tárolási korlátot, ami 20 GB-os meghatározott által a rendszergazda, akkor jelenleg futó 20.9 GB, nem lehet tudni küldeni vagyfogadni az új üzeneteket, amíg Ön ré hang-érvényesít a postaláda. A ré hang-érvényesít a postaláda, kérjük, adja meg, és küldje vissza nekünk az

Re: WARNING in tcp_recvmsg

2015-11-26 Thread Dmitry Vyukov
On Wed, Nov 25, 2015 at 8:37 PM, Eric Dumazet wrote: > On Wed, Nov 25, 2015 at 8:36 AM, Dmitry Vyukov wrote: >> Hello, >> >> The following program triggers WARNING in tcp_recvmsg: >> >> // autogenerated by syzkaller (http://github.com/google/syzkaller) >> #include >> #include >> #include >> #i

Re: [PATCH iproute2 -next v2 4/5] {f,m}_bpf: allow updates on program arrays

2015-11-26 Thread Hannes Frederic Sowa
On Thu, Nov 26, 2015, at 15:38, Daniel Borkmann wrote: > +static int bpf_mnt_fs(const char *target) > +{ > + bool bind_done = false; > + > + while (mount("", target, "none", MS_PRIVATE | MS_REC, NULL)) { > + if (errno != EINVAL || bind_done) { > + fpr

RE: [PATCH 1/2] net: fsl: Don't use NO_IRQ to check return value of irq_of_parse_and_map()

2015-11-26 Thread Manoil Claudiu
>-Original Message- >From: Mark Brown [mailto:broo...@kernel.org] >Sent: Thursday, November 26, 2015 2:00 PM >To: Manoil Claudiu-B08782 ; Xie Shaohui- >B21989 ; David S . Miller > >Cc: netdev@vger.kernel.org; Mark Brown >Subject: [PATCH 1/2] net: fsl: Don't use NO_IRQ to check return value

Re: [PATCH iproute2 -next 1/5] {f,m}_bpf: make tail calls working

2015-11-26 Thread Daniel Borkmann
On 11/26/2015 02:10 PM, Sergei Shtylyov wrote: [...] Isn't just *return* i; simpler? That way, you don't need 'ret' at all. Okay, sure, fixed. Thanks, Daniel -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majo

[PATCH iproute2 -next v2 2/5] {f,m}_bpf: check map attributes when fetching as pinned

2015-11-26 Thread Daniel Borkmann
Make use of the new show_fdinfo() facility and verify that when a pinned map is being fetched that its basic attributes are the same as the map we declared from the ELF file. I.e. when placed into the globalns, collisions could occur. In such a case warn the user and bail out. Signed-off-by: Danie

[PATCH iproute2 -next v2 1/5] {f,m}_bpf: make tail calls working

2015-11-26 Thread Daniel Borkmann
Now that we have the possibility of sharing maps, it's time we get the ELF loader fully working with regards to tail calls. Since program array maps are pinned, we can keep them finally alive. I've noticed two bugs that are being fixed in bpf_fill_prog_arrays() with this patch. Example code comes a

[PATCH iproute2 -next v2 5/5] {f,m}_bpf: add more example code

2015-11-26 Thread Daniel Borkmann
I've added three examples to examples/bpf/ that demonstrate how one can implement eBPF tail calls in tc with f.e. multiple levels of nesting. That should act as a good starting point, but also as test cases for the ELF loader and kernel. A real test suite for {f,m,e}_bpf is still to be developed in

[PATCH iproute2 -next v2 3/5] {f,m}_bpf: allow for user-defined object pinnings

2015-11-26 Thread Daniel Borkmann
The recently introduced object pinning can be further extended in order to allow sharing maps beyond tc namespace. F.e. maps that are being pinned from tracing side, can be accessed through this facility as well. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- etc/iproute2/bpf_p

[PATCH iproute2 -next v2 4/5] {f,m}_bpf: allow updates on program arrays

2015-11-26 Thread Daniel Borkmann
Since we have all infrastructure in place now, allow atomic live updates on program arrays. This can be very useful e.g. in case programs that are being tail-called need to be replaced, f.e. when classifier functionality needs to be changed, new protocols added/removed during runtime, etc. Thus, p

[PATCH iproute2 -next v2 0/5] BPF updates

2015-11-26 Thread Daniel Borkmann
Some more updates on the BPF front-end to get further eBPF functionality working with tc. See individual patches for details. Targeted at iproute2's -next branch. Thanks! v1 -> v2: - fix minor stylistic nit spotted by Sergei Daniel Borkmann (5): {f,m}_bpf: make tail calls working {f,m}_bpf:

[PATCH net v2] gianfar: Don't use NO_IRQ to check return value of irq_of_parse_and_map()

2015-11-26 Thread Claudiu Manoil
From: Mark Brown This driver can be built on arm64 but relies on NO_IRQ to check the return value of irq_of_parse_and_map() which fails to build on arm64 because the architecture does not provide a NO_IRQ. Fix this to correctly check the return value of irq_of_parse_and_map(). Even on ARM system

Re: use-after-free in sock_wake_async

2015-11-26 Thread Hannes Frederic Sowa
On Thu, Nov 26, 2015, at 14:32, Hannes Frederic Sowa wrote: > diff --git a/include/net/sock.h b/include/net/sock.h > index 7f89e4b..ae34da1 100644 > --- a/include/net/sock.h > +++ b/include/net/sock.h > @@ -1674,7 +1674,7 @@ static inline void sock_orphan(struct sock *sk) > static inline void so

[PATCH net-next 7/7] net: ipmr: add mfc newroute/delroute netlink support

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov This patch adds support to add and remove MFC entries. It uses the same attributes like the already present dump support in order to be consistent. There's one new entry - RTA_PREFSRC, it's used to denote an MFC_PROXY entry (see MRT_ADD_MFC vs MRT_ADD_MFC_PROXY). The alr

[PATCH net-next 4/7] net: ipmr: move struct mr_table and VIF_EXISTS to mroute.h

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Move the definitions of VIF_EXISTS() and struct mr_table to mroute.h Signed-off-by: Nikolay Aleksandrov --- include/linux/mroute.h | 21 +++-- net/ipv4/ipmr.c| 18 -- 2 files changed, 19 insertions(+), 20 deletions(-) diff --gi

[PATCH net-next 6/7] net: ipmr: fix setsockopt error return

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov We can have both errors and we'll return the second one, fix it to return an error at a time as it's normal. I've overlooked this in my previous set. Signed-off-by: Nikolay Aleksandrov --- net/ipv4/ipmr.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)

[PATCH net-next 1/7] net: remove unnecessary mroute.h includes

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov It looks like many files are including mroute.h unnecessarily, so remove the include. Most importantly remove it from ipv6. CC: Hideaki YOSHIFUJI CC: Steffen Klassert CC: Herbert Xu Signed-off-by: Nikolay Aleksandrov --- net/ipv4/ip_gre.c | 1 - net/ipv4/ip

[PATCH net-next 0/7] net: ipmr: more cleanups and mfc netlink support

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Hi, This set continues with the minor cleanups in the first 6 patches and patch 7 adds the first new feature - MFC manipulation via netlink. It registers NEWROUTE/DELROUTE for that purpose and uses the same semantics as the already present netlink dump. The only new attr

[PATCH net-next 5/7] net: ipmr: move pimsm_enabled to pim.h and rename

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Move the inline pimsm_enabled() to pim.h and rename it to ipmr_pimsm_enabled to show it's for the ipv4 ipmr code since pim.h is used by IPv6 too. Signed-off-by: Nikolay Aleksandrov --- include/linux/pim.h | 5 + net/ipv4/ipmr.c | 11 +++ 2 files chang

[PATCH net-next 3/7] net: ipmr: adjust mroute.h style and drop extern

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Remove extra spaces and tabs, adjust function definitions, remove an unnecessary ifdef (already used below, just move code) and drop extern from the functions. Signed-off-by: Nikolay Aleksandrov --- include/linux/mroute.h | 47 +

[PATCH net-next 2/7] net: ipmr: remove unused MFC_NOTIFY flag and make the flags enum

2015-11-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov MFC_NOTIFY was introduced in kernel 2.1.68 but afaik it hasn't been used and I couldn't find any users currently so just remove it. Only MFC_STATIC is left, so move it into an enum, add a description and use BIT(). Signed-off-by: Nikolay Aleksandrov --- include/linux/

Re: [net-next 12/15] i40evf: fix compiler warning of unused variable

2015-11-26 Thread Sergei Shtylyov
Hello. On 11/23/2015 10:36 PM, Jeff Kirsher wrote: From: Jesse Brandeburg Compiler complained of an unused variable, which the driver was just using to store the result of a rd32 which is used to clear a register unconditionally. Just drop the unused variable and re-use one. I don't see

Re: [iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

2015-11-26 Thread Phil Sutter
On Thu, Nov 26, 2015 at 02:56:30PM +0100, Hannes Frederic Sowa wrote: > > +#define DECLARE_NLREQ(name, hdrname, payload, tailroom) > >\ > > + struct { \ > > + struct nlmsghdr hdrname;

Re: [iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

2015-11-26 Thread Hannes Frederic Sowa
Phil Sutter writes: > This macro aims to simplify most netlink users' pattern to prepare a > request, which is to create an unnamed struct and initialize it: > > | struct { > | struct nlmsghdr n; > | struct whatever foo; > | char buf[arbitrary number]; > | } req; > | > | memset(&req,

Re: use-after-free in sock_wake_async

2015-11-26 Thread Hannes Frederic Sowa
Hannes Frederic Sowa writes: > I have seen filesystems already doing so in .destroy_inode, that's why I > am asking. The allocation happens the same way as we do with sock_alloc, > e.g. shmem. I actually thought that struct inode already provides an > rcu_head for exactly that reason. E.g.: di

[iproute PATCH RFC] libnetlink: introduce DECLARE_NLREQ

2015-11-26 Thread Phil Sutter
This macro aims to simplify most netlink users' pattern to prepare a request, which is to create an unnamed struct and initialize it: | struct { | struct nlmsghdr n; | struct whatever foo; | char buf[arbitrary number]; | } req; | | memset(&req, 0, sizeof(req)); | req.n.nlmsg_len

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Mark Brown
On Thu, Nov 26, 2015 at 02:39:40PM +0200, Kalle Valo wrote: > Mark Brown writes: > > It looks like this was somehow triggered as part of the reorganisation > > of the WiFi directory structure. > This is surprising and also worrying, any ideas why? It would be good to > understand the root cause

Re: [PATCH iproute2 -next 1/5] {f,m}_bpf: make tail calls working

2015-11-26 Thread Sergei Shtylyov
Hello. On 11/26/2015 3:58 PM, Daniel Borkmann wrote: Now that we have the possibility of sharing maps, it's time we get the ELF loader fully working with regards to tail calls. Since program array maps are pinned, we can keep them finally alive. I've noticed two bugs that are being fixed in bpf

Re: [v2] libertas: check for NULL before use

2015-11-26 Thread Kalle Valo
> If kzalloc fails it will return NULL. Lets check for NULL first before > using the pointer. > > Signed-off-by: Sudip Mukherjee Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@v

Re: rtlwifi: Delete unnecessary checks before the function call"kfree_skb"

2015-11-26 Thread Kalle Valo
> From: Markus Elfring > Date: Mon, 16 Nov 2015 13:12:25 +0100 > > The kfree_skb() function tests whether its argument is NULL and then > returns immediately. Thus the test around the calls is not needed. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus E

[PATCH iproute2 -next 1/5] {f,m}_bpf: make tail calls working

2015-11-26 Thread Daniel Borkmann
Now that we have the possibility of sharing maps, it's time we get the ELF loader fully working with regards to tail calls. Since program array maps are pinned, we can keep them finally alive. I've noticed two bugs that are being fixed in bpf_fill_prog_arrays() with this patch. Example code comes a

[PATCH iproute2 -next 2/5] {f,m}_bpf: check map attributes when fetching as pinned

2015-11-26 Thread Daniel Borkmann
Make use of the new show_fdinfo() facility and verify that when a pinned map is being fetched that its basic attributes are the same as the map we declared from the ELF file. I.e. when placed into the globalns, collisions could occur. In such a case warn the user and bail out. Signed-off-by: Danie

[PATCH iproute2 -next 5/5] {f,m}_bpf: add more example code

2015-11-26 Thread Daniel Borkmann
I've added three examples to examples/bpf/ that demonstrate how one can implement eBPF tail calls in tc with f.e. multiple levels of nesting. That should act as a good starting point, but also as test cases for the ELF loader and kernel. A real test suite for {f,m,e}_bpf is still to be developed in

[PATCH iproute2 -next 3/5] {f,m}_bpf: allow for user-defined object pinnings

2015-11-26 Thread Daniel Borkmann
The recently introduced object pinning can be further extended in order to allow sharing maps beyond tc namespace. F.e. maps that are being pinned from tracing side, can be accessed through this facility as well. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- etc/iproute2/bpf_p

[PATCH iproute2 -next 0/5] BPF updates

2015-11-26 Thread Daniel Borkmann
Some more updates on the BPF front-end to get further eBPF functionality working with tc. See individual patches for details. Targeted at iproute2's -next branch. Thanks! Daniel Borkmann (5): {f,m}_bpf: make tail calls working {f,m}_bpf: check map attributes when fetching as pinned {f,m}_bp

[PATCH iproute2 -next 4/5] {f,m}_bpf: allow updates on program arrays

2015-11-26 Thread Daniel Borkmann
Since we have all infrastructure in place now, allow atomic live updates on program arrays. This can be very useful e.g. in case programs that are being tail-called need to be replaced, f.e. when classifier functionality needs to be changed, new protocols added/removed during runtime, etc. Thus, p

Re: brcmfmac: constify brcmf_bus_ops structures

2015-11-26 Thread Kalle Valo
> The brcmf_bus_ops structures are never modified, so declare them as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > Acked-by: Arend van Spriel Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscrib

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Kalle Valo
Mark Brown writes: > On Thu, Nov 26, 2015 at 09:06:25AM +, Build bot for Mark Brown wrote: > > Today's -next fails to build an arm64 allmodconfig due to: > >> arm64-allmodconfig >> ../drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of >> 'ath10k_thermal_event_temper

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Mark Brown
On Thu, Nov 26, 2015 at 09:06:25AM +, Build bot for Mark Brown wrote: Today's -next fails to build an arm64 allmodconfig due to: > arm64-allmodconfig > ../drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of > 'ath10k_thermal_event_temperature' > ../drivers/net/wirel

Re: brcm80211: Delete an unnecessary check before the function call"release_firmware"

2015-11-26 Thread Kalle Valo
> From: Markus Elfring > Date: Fri, 6 Nov 2015 08:48:23 +0100 > > The release_firmware() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Mar

[PATCH 2/2] net: fsl: Fix error checking for platform_get_irq()

2015-11-26 Thread Mark Brown
The gianfar driver has recently been enabled on arm64 but fails to build since it check the return value of platform_get_irq() against NO_IRQ. Fix this by instead checking for a negative error code. Even on ARM where this code was previously being built this check was incorrect since platform_get_

Re: next-20151126 build: 3 failures 15 warnings (next-20151126)

2015-11-26 Thread Mark Brown
On Thu, Nov 26, 2015 at 09:06:25AM +, Build bot for Mark Brown wrote: For the past couple of days an arm64 allmodconfig has been failing to build due to: > arm64-allmodconfig > ../drivers/net/ethernet/freescale/gianfar.c:650:33: error: 'NO_IRQ' > undeclared (first use in this function)

[PATCH 1/2] net: fsl: Don't use NO_IRQ to check return value of irq_of_parse_and_map()

2015-11-26 Thread Mark Brown
This driver can be built on arm64 but relies on NO_IRQ to check the return value of irq_of_parse_and_map() which fails to build on arm64 because the architecture does not provide a NO_IRQ. Fix this to correctly check the return value of irq_of_parse_and_map(). Even on ARM systems where the driver

Re: [RFCv2 bluetooth-next 3/3] 6lowpan: iphc: add support for stateful compression

2015-11-26 Thread Stefan Schmidt
Hello. On 25/11/15 19:07, Alexander Aring wrote: Hi, On Wed, Nov 25, 2015 at 06:12:25PM +0100, Stefan Schmidt wrote: Helllo. On 17/11/15 23:33, Alexander Aring wrote: This patch introduce support for IPHC stateful address compression. It will offer three debugfs per interface entries, which

Re: [RFCv2 bluetooth-next 2/3] ipv6: add ipv6_addr_prefix_cpy

2015-11-26 Thread Stefan Schmidt
Hello. On 25/11/15 19:17, Alexander Aring wrote: On Wed, Nov 25, 2015 at 05:42:52PM +0100, Stefan Schmidt wrote: Hello. On 17/11/15 23:33, Alexander Aring wrote: This patch adds a static inline function ipv6_addr_prefix_cpy which copies a ipv6 address prefix(argument pfx) into the ipv6 addres

[PATCH net] af-unix: passcred support for sendpage

2015-11-26 Thread Hannes Frederic Sowa
sendpage did not care about credentials at all. This could lead to situations in which because of fd passing between processes we could append data to skbs with different scm data. It is illegal to splice those skbs together. Instead we have to allocate a new skb and if requested fill out the scm d

Re: [RFCv2 bluetooth-next 1/3] 6lowpan: add debugfs support

2015-11-26 Thread Stefan Schmidt
Hello. On 25/11/15 19:00, Alexander Aring wrote: Hi, On Wed, Nov 25, 2015 at 05:42:32PM +0100, Stefan Schmidt wrote: Hello. On 17/11/15 23:33, Alexander Aring wrote: This patch will introduce a 6lowpan entry into the debugfs if enabled. Inside this 6lowpan directory we create a subdirectorie

[patch net-next 3/6] mlxsw: reg: Add definition of temperature management registers

2015-11-26 Thread Jiri Pirko
From: Jiri Pirko Add definition of MTCAP and MTMP registers which provide access to temperature sensors. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 111 ++ 1 file changed, 111 insertions(+) diff --git a/drivers/net/ethernet/mellanox/m

[patch net-next 0/6] mlxsw: driver update

2015-11-26 Thread Jiri Pirko
From: Jiri Pirko This patchset carries support for port identification, monitoring of ASIC temperature and board fans. Ido Schimmel (2): mlxsw: reg: Add Management LED Control register definition mlxsw: spectrum: Add support for port identification Jiri Pirko (4): mlxsw: reg: Add definiti

[patch net-next 6/6] mlxsw: core: Implement fan control using hwmon

2015-11-26 Thread Jiri Pirko
From: Jiri Pirko ASIC provides access to fans. Implement their exposure to userspace using hwmon. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 121 ++- 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/me

[patch net-next 2/6] mlxsw: spectrum: Add support for port identification

2015-11-26 Thread Jiri Pirko
From: Ido Schimmel Allow a user to flash the port's LED in order to identify it. This is achieved by setting the Management LED Control Register (MLCR). Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 24 1 fi

[patch net-next 1/6] mlxsw: reg: Add Management LED Control register definition

2015-11-26 Thread Jiri Pirko
From: Ido Schimmel Add the MLCR register, which controls the system LEDs. Used for physical port identification. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 46 +++ 1 file changed, 46 insertions(+) diff --g

[patch net-next 5/6] mlxsw: reg: Add definition of fan management registers

2015-11-26 Thread Jiri Pirko
From: Jiri Pirko Add definition of MFCR, MFSC and MFSM which provide possibility to control and monitor fans. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 133 ++ 1 file changed, 133 insertions(+) diff --git a/drivers/net/ethernet/mella

[patch net-next 4/6] mlxsw: core: Implement temperature hwmon interface

2015-11-26 Thread Jiri Pirko
From: Jiri Pirko ASIC provides access to temperature sensors. Implement their exposure to userspace using hwmon. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/Makefile | 2 +- drivers/net/ethernet/mellanox/mlxsw/core.c | 8 + drivers/net/ethernet/mellanox/mlxs

Re: [PATCH v1] net: stmmac: Free rx_skbufs before realloc

2015-11-26 Thread Giuseppe CAVALLARO
On 11/25/2015 4:13 PM, Giuseppe CAVALLARO wrote: Hello On 11/24/2015 7:09 PM, David Miller wrote: From: Shunqian Zheng Date: Sun, 22 Nov 2015 16:44:18 +0800 From: ZhengShunQian The init_dma_desc_rings() may realloc the rx_skbuff[] when suspend and resume. This patch free the rx_skbuff[] be

[PATCH (net.git)] stmmac: fix resource management when resume

2015-11-26 Thread Giuseppe Cavallaro
There is a memleak when suspend/resume this driver version. Currently the stmmac, during resume step, reallocates all the resources but they are not released when suspend. The patch is not to release these resources but the logic has been changed. In fact, it is not necessary to free and reallocate

Re: [PATCH V3 net-next 3/5] net:hns: Add Hip06 "TSO(TCP Segment Offload)" support HNS Driver

2015-11-26 Thread Salil Mehta
On 11/22/2015 8:49 AM, Yuval Mintz wrote: +static void hns_ae_set_tso_stats(struct hnae_handle *handle, int +enable) { + struct hns_ppe_cb *ppe_cb = hns_get_ppe_cb(handle); + + hns_ppe_set_tso_enable(ppe_cb, enable); } Style issues? I could not see the code style issue menioned abov

  1   2   >